:root {
    /* Compliance language: Intersection Observer with staggered `transitionDelay`. Active cells have a terracotta border that draws itself clockwise (border-animate pattern IntersectionObserver` for hexagon border-draw triggers (threshold: Interval(( (Google Fonts (Google Fonts */
    --hex-size: clamp(120px, 18vw, 280px);
    --hex-gap: 4px;
    --kiln: #1a0f09;
    --char: #2e1b12;
    --earth: #3a2117;
    --fired: #c4724e;
    --ember: #b85a3d;
    --clay: #8a6b56;
    --light: #e8a47a;
    --parchment: #f0d5c0;
    --smoke: #0d0805;
    --stone: #5a4a3c;
    --display: "Cormorant Garamond", Cormorant, Georgia, serif;
    --body: "Space Grotesk", Inter, system-ui, sans-serif;
    --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--smoke); }
body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 12%, rgba(196, 114, 78, 0.18), transparent 30vw),
        radial-gradient(circle at 80% 44%, rgba(232, 164, 122, 0.08), transparent 34vw),
        linear-gradient(180deg, var(--char) 0%, var(--kiln) 32%, var(--smoke) 100%);
    color: var(--parchment);
    font-family: var(--body);
}

.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.055;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' seed='12'/%3E%3C/filter%3E%3Crect width='200' height='200' fill='%23f0d5c0' filter='url(%23grain)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

.hex {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    aspect-ratio: 1 / 1.1547;
}

.floating-hexagons { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.floater {
    position: fixed;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--fired);
    opacity: 0.055;
}
.floater--1 { width: 30vmin; height: 34.64vmin; animation: drift-1 120s linear infinite, spin 300s linear infinite; }
.floater--2 { width: 42vmin; height: 48.5vmin; animation: drift-2 180s linear infinite, spin 420s linear infinite reverse; background: var(--light); opacity: 0.04; }
.floater--3 { width: 18vmin; height: 20.78vmin; animation: drift-3 95s linear infinite, spin 240s linear infinite; background: var(--clay); }
.floater--4 { width: 25vmin; height: 28.86vmin; animation: drift-4 150s linear infinite, spin 360s linear infinite reverse; background: var(--ember); opacity: 0.07; }

@keyframes drift-1 { from { transform: translate(-15vw, 80vh); } to { transform: translate(112vw, -20vh); } }
@keyframes drift-2 { from { transform: translate(95vw, 105vh); } to { transform: translate(-45vw, -30vh); } }
@keyframes drift-3 { from { transform: translate(-20vw, 20vh); } to { transform: translate(115vw, 75vh); } }
@keyframes drift-4 { from { transform: translate(45vw, -35vh); } to { transform: translate(80vw, 115vh); } }
@keyframes spin { to { rotate: 360deg; } }

.scroll-indicator {
    position: fixed;
    right: 24px;
    top: 10vh;
    bottom: 10vh;
    width: 2px;
    background: #2e1b12;
    z-index: 100;
}
.scroll-indicator__fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #c4724e, #e8a47a);
    transform-origin: top;
    transform: scaleY(var(--scroll-pct, 0));
}
.scroll-indicator__dot {
    position: absolute;
    left: 50%;
    width: 14px;
    height: 16px;
    background: #2e1b12;
    border: 1px solid #8a6b56;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transform: translateX(-50%);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.scroll-indicator__dot:nth-child(2) { top: 0; }
.scroll-indicator__dot:nth-child(3) { top: 25%; }
.scroll-indicator__dot:nth-child(4) { top: 50%; }
.scroll-indicator__dot:nth-child(5) { top: 75%; }
.scroll-indicator__dot:nth-child(6) { top: calc(100% - 16px); }
.scroll-indicator__dot.active { background: #c4724e; border-color: #e8a47a; box-shadow: 0 0 18px rgba(196, 114, 78, 0.75); }

.narrative { position: relative; z-index: 2; }
.zone { position: relative; display: grid; place-items: center; padding: 10vmin 7vw; }
.zone--anvil { min-height: 100vh; background: radial-gradient(circle, rgba(13,8,5,0.1), rgba(13,8,5,0.56)); }
.anvil-core {
    width: 60vmin;
    max-width: 680px;
    min-width: 300px;
    position: relative;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #3a2117, #2e1b12 60%, #1a0f09);
    box-shadow: 0 45px 100px rgba(13, 8, 5, 0.55), inset 0 0 60px rgba(232, 164, 122, 0.05);
}
.anvil-content { width: 78%; text-align: center; }
.eyebrow, .zone-kicker {
    font-family: var(--mono);
    font-size: clamp(0.7rem, 1vw, 0.9rem);
    color: #c4724e;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.anvil-core h1 {
    margin: 1rem 0 0.8rem;
    font-family: var(--display);
    font-weight: 300;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    letter-spacing: 0.05em;
    line-height: 1.15;
    color: #f0d5c0;
}
.anvil-core h1 span { color: #e8a47a; }
.anvil-line { color: #8a6b56; font-size: clamp(1rem, 1.6vw, 1.3rem); letter-spacing: 0.03em; }
.anvil-orbit { position: absolute; width: min(86vmin, 900px); height: min(86vmin, 900px); animation: orbit 120s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
.satellite {
    position: absolute;
    width: 80px;
    height: 92px;
    display: grid;
    place-items: center;
    background: rgba(58, 33, 23, 0.72);
    color: #c4724e;
    font-family: var(--mono);
    box-shadow: inset 0 0 0 1px rgba(196,114,78,0.25);
}
.satellite--1 { left: 48%; top: 0; } .satellite--2 { left: 72%; top: 7%; } .satellite--3 { right: 2%; top: 28%; }
.satellite--4 { right: 3%; bottom: 27%; } .satellite--5 { left: 72%; bottom: 7%; } .satellite--6 { left: 48%; bottom: 0; }
.satellite--7 { left: 24%; bottom: 7%; } .satellite--8 { left: 2%; bottom: 27%; } .satellite--9 { left: 2%; top: 28%; }
.satellite--10 { left: 24%; top: 7%; } .satellite--11 { left: 48%; top: 13%; } .satellite--12 { left: 48%; bottom: 13%; }

.hex-stroke { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.hex-border { fill: transparent; stroke: #c4724e; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 420; stroke-dashoffset: 420; transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal-hex.visible .hex-border { stroke-dashoffset: 0; }

.zone--lattice { min-height: 120vh; align-content: center; gap: 7vh; background: linear-gradient(180deg, rgba(26,15,9,0.2), rgba(46,27,18,0.48), rgba(26,15,9,0.12)); }
.zone-kicker { justify-self: start; margin-left: 8vw; font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.8rem); font-weight: 600; letter-spacing: 0.02em; color: #e8a47a; text-transform: none; }
.honeycomb { display: grid; gap: calc(var(--hex-gap) * -1); justify-items: center; width: min(1180px, 94vw); }
.honey-row { display: flex; gap: var(--hex-gap); margin-top: calc(var(--hex-size) * -0.135); }
.honey-row:first-child { margin-top: 0; }
.honey-row--offset { transform: translateX(calc(var(--hex-size) / 2 + var(--hex-gap) / 2)); }
.lattice-cell {
    width: var(--hex-size);
    background: rgba(58, 33, 23, 0.78);
    position: relative;
    display: grid;
    place-items: center;
    color: rgba(138, 107, 86, 0.72);
    transition: background 0.8s ease, color 0.8s ease, transform 0.8s ease;
}
.lattice-cell span { font-size: clamp(0.78rem, 1.2vw, 1rem); letter-spacing: 0.08em; text-transform: uppercase; }
.lattice-cell.visible { background: rgba(46, 27, 18, 0.96); color: #f0d5c0; transform: translateY(-4px); }

.zone--proof { min-height: 100vh; overflow: hidden; }
.proof-backdrop { position: fixed; width: 35vmin; background: #c4724e; opacity: 0.075; right: 8vw; top: 22vh; animation: proofFloat 36s ease-in-out infinite, spin 260s linear infinite; }
@keyframes proofFloat { 50% { translate: -7vw 7vh; scale: 1.08; } }
.proof-panel {
    width: min(80vw, 1080px);
    min-height: 54vmin;
    position: relative;
    display: grid;
    align-content: center;
    gap: 1.5rem;
    padding: clamp(3rem, 8vw, 8rem);
    background: linear-gradient(135deg, rgba(46,27,18,0.95), rgba(26,15,9,0.96));
    box-shadow: 0 50px 140px rgba(13,8,5,0.62);
}
.proof-panel h2 { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.8rem); line-height: 1.15; letter-spacing: 0.02em; font-weight: 600; color: #f0d5c0; max-width: 900px; }
.proof-panel p:not(.eyebrow) { font-family: var(--display); font-size: clamp(1.25rem, 2.1vw, 2rem); line-height: 1.8; letter-spacing: 0.03em; color: #d8b79e; max-width: 900px; }
.proof-panel code { font-family: var(--mono); font-size: 13px; color: rgba(138,107,86,0.7); }

.zone--bridge { min-height: 80vh; }
.bridge-stage { width: min(1050px, 92vw); min-height: 320px; position: relative; display: flex; align-items: center; justify-content: space-between; }
.bridge-node { width: min(28vw, 270px); min-width: 160px; position: relative; display: grid; place-items: center; align-content: center; gap: 0.4rem; text-align: center; z-index: 2; }
.bridge-node--l1 { background: #5a4a3c; color: #f0d5c0; }
.bridge-node--l2 { background: #c4724e; color: #2e1b12; box-shadow: 0 0 60px rgba(196,114,78,0.34); }
.bridge-node strong { font-family: var(--display); font-size: clamp(2.4rem, 5vw, 4.6rem); font-weight: 600; letter-spacing: 0.04em; }
.bridge-node span { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.bridge-svg { position: absolute; inset: 10% 14%; width: 72%; height: 80%; overflow: visible; z-index: 1; }
.bridge-path { fill: none; stroke: #8a6b56; stroke-width: 2; stroke-dasharray: 8 12; }
.packet { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #e8a47a; z-index: 4; filter: drop-shadow(0 0 8px #c4724e); offset-path: path("M85 124 C 210 12, 390 228, 515 116"); offset-rotate: 0deg; animation: packet 3s linear infinite; transform: translate(110px, 40px); }
.packet--2 { animation-delay: 0.6s; } .packet--3 { animation-delay: 1.2s; } .packet--4 { animation-delay: 1.8s; }
@keyframes packet { from { offset-distance: 0%; } to { offset-distance: 100%; } }

.zone--seal { min-height: 60vh; gap: 1.2rem; text-align: center; }
.wax-seal {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 45% 38%, #c4724e, #b85a3d 55%, #8a6b56 100%);
    box-shadow: inset 0 2px 4px #0d0805, 0 4px 12px #0d080580;
    transform: rotate(-8deg);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wax-seal:hover { transform: rotate(-8deg) scale(0.97); }
.wax-seal span { font-family: var(--display); font-size: 36px; font-weight: 600; color: #2e1b12; }
.zone--seal h2 { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 4.5rem); font-weight: 300; letter-spacing: 0.05em; color: #f0d5c0; }
.zone--seal p { font-family: var(--display); font-size: clamp(1.2rem, 2.2vw, 2rem); font-style: italic; color: #e8a47a; }

@media (max-width: 820px) {
    .scroll-indicator { right: 12px; }
    .satellite { width: 50px; height: 58px; }
    .honey-row, .honey-row--offset { transform: none; flex-wrap: wrap; justify-content: center; margin-top: var(--hex-gap); }
    .lattice-cell { width: clamp(120px, 42vw, 180px); }
    .proof-panel { width: 94vw; clip-path: polygon(50% 0%, 100% 18%, 100% 82%, 50% 100%, 0% 82%, 0% 18%); }
    .bridge-stage { flex-direction: column; gap: 6rem; }
    .bridge-svg, .packet { display: none; }
}
