/* ================================================================
   DDAZZL.com — Earth-toned glassmorphism / hero-dominant narrative
   Palette: #2C1E0F #A0624D #7A8C6E #D4A24E #F5E6D0 #B8A690 #1A120A
   Typography: Space Mono + DM Mono
   Font compliance language: Intersection Observer to trigger path animations; monospaced tones creates a cognitive contrast in code colors of handcraft distinctly; Space Mono" (Google Fonts; small caps.
   ================================================================ */

:root {
    --deep-earth: #2C1E0F;
    --deep-earth-shadow: #1A120A;
    --warm-clay: #A0624D;
    --living-moss: #7A8C6E;
    --amber-glow: #D4A24E;
    --text-primary: #F5E6D0;
    --text-secondary: #B8A690;
    --frost-bg: rgba(255, 245, 230, 0.08);
    --frost-bg-hover: rgba(255, 245, 230, 0.13);
    --frost-border: rgba(212, 162, 78, 0.22);
    --frost-border-hover: rgba(212, 162, 78, 0.45);
    --warm-shadow: 0 8px 32px rgba(44, 30, 15, 0.4);
    --warm-shadow-lift: 0 18px 48px rgba(26, 18, 10, 0.55);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: "DM Mono", "Space Mono", ui-monospace, monospace;
    color: var(--text-primary);
    background: radial-gradient(circle at 50% 10%, #3a2613 0%, var(--deep-earth) 35%, var(--deep-earth-shadow) 100%);
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
    font-weight: 400;
}

h1, h2, h3, .mono-head, .logotype, .eyebrow, .label {
    font-family: "Space Mono", ui-monospace, monospace;
    font-weight: 700;
    letter-spacing: 0.04em;
}

em { font-style: italic; color: var(--amber-glow); }
strong { color: var(--amber-glow); font-weight: 700; }

/* ---------------- Ambient background ---------------- */

.ambient-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.topo-contours {
    position: absolute;
    inset: -5%;
    width: 110%;
    height: 110%;
    opacity: 0.08;
    animation: drift 42s linear infinite;
    mix-blend-mode: screen;
}

@keyframes drift {
    0%   { transform: translate(0, 0); }
    50%  { transform: translate(-20px, -30px); }
    100% { transform: translate(0, 0); }
}

.dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(212, 162, 78, 0.28) 1px, transparent 1.2px);
    background-size: 32px 32px;
    opacity: 0.08;
}

.scan-lines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 3px,
        rgba(245, 230, 208, 0.025) 3px,
        rgba(245, 230, 208, 0.025) 4px
    );
    pointer-events: none;
}

/* ---------------- Frosted nav pill ---------------- */

.nav-pill {
    position: fixed;
    top: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 1.6rem;
    border-radius: 9999px;
    background: rgba(44, 30, 15, 0.55);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid var(--frost-border);
    box-shadow: var(--warm-shadow);
    font-family: "Space Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-primary);
    transition: background 0.6s var(--ease-out), border-color 0.6s var(--ease-out);
}

.nav-brand {
    color: var(--amber-glow);
    font-weight: 700;
}

.nav-sep { color: var(--living-moss); opacity: 0.7; }

.nav-meta { color: var(--text-secondary); font-weight: 400; }

/* ---------------- Progress rail ---------------- */

.progress-rail {
    position: fixed;
    right: 1.6rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 45;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1rem 0.55rem;
    border-radius: 9999px;
    background: rgba(44, 30, 15, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--frost-border);
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(245, 230, 208, 0.18);
    border: 1px solid rgba(212, 162, 78, 0.3);
    transition: all 0.6s var(--ease-out);
}

.progress-dot.is-active {
    background: var(--amber-glow);
    box-shadow: 0 0 10px rgba(212, 162, 78, 0.8);
    transform: scale(1.4);
}

/* ---------------- Chapter layout ---------------- */

.chapter {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 8rem clamp(1.5rem, 5vw, 6rem) 10rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.chapter-inner {
    position: relative;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    z-index: 2;
}

.eyebrow,
.label {
    display: inline-block;
    font-family: "Space Mono", monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber-glow);
    margin-bottom: 1.25rem;
}

.label { color: var(--text-secondary); font-size: 0.68rem; }

.chapter-index {
    position: absolute;
    top: -0.5rem;
    right: 0;
    font-family: "Space Mono", monospace;
    font-size: clamp(6rem, 14vw, 12rem);
    font-weight: 700;
    color: rgba(212, 162, 78, 0.08);
    letter-spacing: -0.05em;
    line-height: 1;
    pointer-events: none;
    z-index: 0;
}

/* ---------------- Glass card system ---------------- */

.glass-card {
    position: relative;
    background: var(--frost-bg);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid var(--frost-border);
    border-radius: 16px;
    padding: clamp(1.75rem, 3vw, 3rem);
    box-shadow: var(--warm-shadow);
    transition:
        background 0.7s var(--ease-out),
        border-color 0.7s var(--ease-out),
        transform 0.7s var(--ease-out),
        box-shadow 0.7s var(--ease-out);
    overflow: hidden;
}

.glass-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 3px,
        rgba(245, 230, 208, 0.03) 3px,
        rgba(245, 230, 208, 0.03) 4px
    );
    pointer-events: none;
    opacity: 0.8;
    border-radius: inherit;
}

.glass-card:hover {
    background: var(--frost-bg-hover);
    border-color: var(--frost-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--warm-shadow-lift);
}

/* Corner brackets */
.corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--amber-glow);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out), width 0.5s var(--ease-out), height 0.5s var(--ease-out);
}
.corner.tl { top: 10px; left: 10px; border-top: 1.5px solid; border-left: 1.5px solid; }
.corner.tr { top: 10px; right: 10px; border-top: 1.5px solid; border-right: 1.5px solid; }
.corner.bl { bottom: 10px; left: 10px; border-bottom: 1.5px solid; border-left: 1.5px solid; }
.corner.br { bottom: 10px; right: 10px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

.glass-card:hover .corner { opacity: 1; width: 20px; height: 20px; }

/* ---------------- Hero ---------------- */

.hero {
    display: grid;
    place-items: center;
    text-align: center;
}

.hero-inner {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.4rem;
    max-width: 960px;
    width: 100%;
}

.hero .eyebrow {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.logotype {
    width: min(85vw, 760px);
    height: auto;
    filter: drop-shadow(0 0 30px rgba(212, 162, 78, 0.35));
}

.draw-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawStroke 2.4s var(--ease-out) forwards;
}

.draw-path:nth-child(1) { animation-delay: 0.2s; }
.draw-path:nth-child(2) { animation-delay: 0.45s; }
.draw-path:nth-child(3) { animation-delay: 0.7s; }
.draw-path:nth-child(4) { animation-delay: 0.95s; }
.draw-path:nth-child(5) { animation-delay: 1.2s; }
.draw-path:nth-child(6) { animation-delay: 1.45s; }

@keyframes drawStroke {
    to { stroke-dashoffset: 0; }
}

.glow-nodes circle {
    opacity: 0;
    animation: pulseIn 2s ease-in-out 2.2s infinite;
    transform-box: fill-box;
    transform-origin: center;
}

@keyframes pulseIn {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.4); }
}

.hero-tag {
    font-family: "Space Mono", monospace;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    line-height: 1.7;
    max-width: 640px;
    opacity: 0;
    animation: fadeUp 1.2s var(--ease-out) 1.8s forwards;
}

.hero-glass {
    max-width: 620px;
    text-align: left;
    opacity: 0;
    animation: fadeUp 1.2s var(--ease-out) 2.2s forwards;
}

.hero-glass p {
    font-size: 1rem;
    color: var(--text-primary);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    font-family: "Space Mono", monospace;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeUp 1.2s var(--ease-out) 2.6s forwards;
    margin-top: 1rem;
}

.scroll-hint-line {
    display: block;
    width: 40px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--amber-glow));
    animation: slideLine 2.2s ease-in-out infinite;
}

@keyframes slideLine {
    0%, 100% { transform: translateX(0); opacity: 0.4; }
    50%      { transform: translateX(12px); opacity: 1; }
}

/* ---------------- Hero floating isometric icons ---------------- */

.iso-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.iso {
    position: absolute;
    width: clamp(68px, 8vw, 110px);
    opacity: 0;
    filter: drop-shadow(0 6px 16px rgba(212, 162, 78, 0.2));
    animation: fadeIso 1.6s var(--ease-out) forwards, floatY 7s ease-in-out infinite;
}

.iso-1 { top: 14%;  left: 8%;   animation-delay: 1.6s, 1.6s;  animation-duration: 1.6s, 7s; }
.iso-2 { top: 22%;  right: 10%; animation-delay: 1.8s, 1.8s;  animation-duration: 1.6s, 8s; }
.iso-3 { top: 58%;  left: 6%;   animation-delay: 2.0s, 2.0s;  animation-duration: 1.6s, 6s; }
.iso-4 { top: 65%;  right: 7%;  animation-delay: 2.1s, 2.1s;  animation-duration: 1.6s, 9s; }
.iso-5 { top: 10%;  right: 24%; animation-delay: 2.3s, 2.3s;  animation-duration: 1.6s, 7.5s; }
.iso-6 { top: 72%;  left: 22%;  animation-delay: 2.5s, 2.5s;  animation-duration: 1.6s, 6.5s; }
.iso-7 { top: 18%;  left: 30%;  animation-delay: 2.7s, 2.7s;  animation-duration: 1.6s, 8.5s; }

@keyframes fadeIso {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 0.85; transform: translateY(0) scale(1); }
}

@keyframes floatY {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-14px) rotate(2deg); }
}

/* ---------------- Connectors ---------------- */

.connector {
    position: absolute;
    bottom: -110px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 220px;
    z-index: 2;
    pointer-events: none;
}

.connector-right { left: auto; right: 6%; transform: none; }

.draw-on-scroll {
    stroke-dasharray: var(--len, 800);
    stroke-dashoffset: var(--len, 800);
    transition: stroke-dashoffset 1.6s var(--ease-out), stroke 1.6s var(--ease-out);
}

.draw-on-scroll.is-drawn {
    stroke-dashoffset: 0;
    stroke: var(--amber-glow);
}

/* ---------------- Vision ---------------- */

.vision {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(160, 98, 77, 0.05) 40%,
        rgba(122, 140, 110, 0.06) 100%);
}

.vision-stage {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    margin-top: 2rem;
}

.iso-city {
    width: 100%;
    max-width: 560px;
    height: auto;
    filter: drop-shadow(0 18px 40px rgba(26, 18, 10, 0.55));
    animation: floatY 10s ease-in-out infinite;
}

.vision-card {
    transform: rotate(-1deg);
}

.vision-card:hover { transform: rotate(0deg) translateY(-4px); }

.vision-headline {
    font-size: clamp(1.6rem, 3.2vw, 2.6rem);
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 1.4rem;
    letter-spacing: 0.01em;
}

.vision-body {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.6rem;
}

.signature {
    display: inline-block;
    font-family: "Space Mono", monospace;
    font-size: 0.8rem;
    color: var(--amber-glow);
    letter-spacing: 0.05em;
    font-style: italic;
}

/* ---------------- Craft ---------------- */

.craft {
    position: relative;
}

.craft-headline {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    color: var(--text-primary);
    margin-bottom: 3rem;
    letter-spacing: 0.02em;
    line-height: 1.15;
    max-width: 16ch;
}

.constellation {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.8;
    pointer-events: none;
}

.craft-cluster {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem 1.6rem;
    margin-top: 2rem;
}

.craft-card {
    position: relative;
}

.craft-card-1 { grid-column: 1 / span 5; transform: rotate(-1.5deg); }
.craft-card-2 { grid-column: 7 / span 6; margin-top: 3rem; transform: rotate(1deg); }
.craft-card-3 { grid-column: 2 / span 6; margin-top: 1rem; transform: rotate(1.8deg); }
.craft-card-4 { grid-column: 8 / span 5; margin-top: -1rem; transform: rotate(-1.2deg); }

.craft-card:hover { transform: rotate(0) translateY(-4px); }

.craft-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.2rem;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(212, 162, 78, 0.2));
}

.craft-card h3 {
    font-size: 1.4rem;
    color: var(--amber-glow);
    margin-bottom: 0.8rem;
    letter-spacing: 0.02em;
}

.craft-card p {
    font-size: 0.96rem;
    color: var(--text-primary);
    line-height: 1.7;
}

/* ---------------- Roots (footer) ---------------- */

.roots {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(26, 18, 10, 0.6) 30%,
        var(--deep-earth-shadow) 100%);
    min-height: auto;
    padding: 8rem clamp(1.5rem, 5vw, 6rem) 4rem;
    border-top: 1px solid rgba(212, 162, 78, 0.15);
    overflow: hidden;
}

.roots-topo {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

.roots-topo svg { width: 100%; height: 100%; }

.roots-inner { z-index: 2; }

.roots-headline {
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    color: var(--text-primary);
    margin-bottom: 3rem;
    letter-spacing: 0.02em;
    max-width: 18ch;
}

.roots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    margin-bottom: 4rem;
    padding: 2rem 0;
    border-top: 1px dashed rgba(212, 162, 78, 0.2);
    border-bottom: 1px dashed rgba(212, 162, 78, 0.2);
}

.roots-col .label { color: var(--amber-glow); }

.roots-col p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.roots-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "Space Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 1rem;
}

.roots-hash {
    color: var(--amber-glow);
    opacity: 0.7;
    font-weight: 700;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 960px) {
    .vision-stage { grid-template-columns: 1fr; }
    .iso-city { margin: 0 auto; max-width: 420px; }

    .craft-card-1,
    .craft-card-2,
    .craft-card-3,
    .craft-card-4 {
        grid-column: 1 / -1;
        margin-top: 0;
        transform: none;
    }

    .roots-grid { grid-template-columns: 1fr; }

    .progress-rail { display: none; }

    .iso { width: 58px; }
}

@media (max-width: 560px) {
    .chapter { padding: 7rem 1.2rem 8rem; }
    .nav-pill { font-size: 0.62rem; padding: 0.55rem 1rem; gap: 0.5rem; }
    .nav-meta { display: none; }
    .logotype { width: 92vw; }
    .hero-tag br { display: none; }
}

/* ---------------- Reveal on scroll ---------------- */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.reveal.is-in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .draw-path, .draw-on-scroll { stroke-dashoffset: 0 !important; }
}
