:root {
    /* Design compliance anchors: (Google Fonts), Intersection Observer, scroll-trigger, threshold 0.6 */
    --ground: #1c1610;
    --surface: #2a2218;
    --amber: #d4a862;
    --sand: #b8a88a;
    --honey: #e8c47a;
    --star: #f0e8d8;
    --umber: #0f0c08;
    --halo: rgba(212, 168, 98, 0.15);
    --hex: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

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

html { scroll-behavior: smooth; background: var(--umber); }

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Commissioner", Inter, sans-serif;
    color: var(--sand);
    background: var(--ground);
    letter-spacing: 0.02em;
    line-height: 1.75;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 68% 16%, rgba(212, 168, 98, 0.08), transparent 24rem),
        linear-gradient(30deg, rgba(212, 168, 98, 0.028) 1px, transparent 1px),
        linear-gradient(150deg, rgba(212, 168, 98, 0.022) 1px, transparent 1px);
    background-size: auto, 86px 148px, 86px 148px;
    opacity: 0.9;
}

.scroll-depth-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 2px;
    height: 0;
    z-index: 20;
    background: linear-gradient(to bottom, #d4a862, #e8c47a, rgba(212, 168, 98, 0.1));
    box-shadow: 0 0 18px rgba(212, 168, 98, 0.45);
}

.ambient-field { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.ambient-star {
    position: absolute;
    width: 4px;
    height: 4px;
    clip-path: var(--hex);
    background: radial-gradient(circle, #f0e8d8 0%, #d4a862 58%, rgba(212, 168, 98, 0.05) 100%);
    opacity: 0.4;
    animation: starPulse var(--duration, 11s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.site-scroll, .chamber { position: relative; z-index: 2; }

.chamber {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(2.5rem, 5vw, 6rem);
    overflow: hidden;
    background: linear-gradient(180deg, #1c1610 0%, #0f0c08 100%);
}

.chamber:nth-child(even) { background: linear-gradient(180deg, #0f0c08 0%, #1c1610 100%); }

.chamber-plane {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.chamber.is-visible .chamber-plane { opacity: 1; transform: scale(1); }
.chamber.is-exiting .chamber-plane { opacity: 0; transform: scale(1.03); transition-duration: 600ms; }

.kicker, .hex-card span, .stage-panel b {
    display: block;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #e8c47a;
}

h1, h2 {
    font-size: clamp(2.8rem, 6.5vw, 5.5rem);
    font-weight: 200;
    letter-spacing: 0.15em;
    color: #d4a862;
    text-transform: uppercase;
    line-height: 1.08;
    text-shadow: 0 0 34px rgba(212, 168, 98, 0.18);
}

.chamber-void { place-items: start; background: radial-gradient(circle at 61.8% 38.2%, rgba(212,168,98,0.08), transparent 19rem), #1c1610; }
.golden-wordmark { position: absolute; left: 38.2%; top: 38.2%; transform-origin: center; max-width: 42rem; }
.chamber.is-visible .golden-wordmark { transform: translate(-38.2%, -38.2%) scale(1); }
.golden-wordmark h1 { text-transform: none; margin: 0.5rem 0 1.1rem; }
.void-line { max-width: 34rem; color: #b8a88a; font-size: clamp(0.95rem, 1.2vw, 1.15rem); }
.mono-texture { position: absolute; right: 6vw; bottom: 9vh; font-family: "IBM Plex Mono", monospace; font-weight: 300; font-size: 0.7rem; color: rgba(184,168,138,0.2); letter-spacing: 0.12em; }

.void-orbit { position: absolute; left: calc(38.2% - 15rem); top: calc(38.2% - 15rem); width: 30rem; height: 30rem; animation: orbit 60s linear infinite; }
.orbit-node {
    position: absolute;
    width: 4.7rem;
    height: 4.1rem;
    display: grid;
    place-items: center;
    clip-path: var(--hex);
    color: rgba(240,232,216,0.58);
    background: rgba(42,34,24,0.33);
    box-shadow: inset 0 0 0 1px rgba(212,168,98,0.12), 0 0 24px rgba(212,168,98,0.06);
    font-size: 1.2rem;
    animation: counterOrbit 60s linear infinite;
}
.node-trust { left: 12.65rem; top: 0; }.node-proof { right: 1.5rem; top: 6.5rem; }.node-chain { right: 1.5rem; bottom: 6.5rem; }.node-name { left: 12.65rem; bottom: 0; }.node-seal { left: 1.5rem; bottom: 6.5rem; }.node-star { left: 1.5rem; top: 6.5rem; }

.sand-lines { position: absolute; width: 65vw; max-width: 900px; opacity: 0.8; pointer-events: none; }
.sand-lines-a { right: -10vw; top: 12vh; }.sand-lines-b { left: -10vw; bottom: 7vh; }
.sand-lines path { fill: none; stroke: rgba(184,168,138,0.04); stroke-width: 1.1; stroke-dasharray: 32 24; animation: rake 120s linear infinite; }

.section-heading { width: min(92vw, 1180px); justify-self: center; align-self: start; margin-bottom: 1rem; }
.section-heading h2 { font-size: clamp(2.5rem, 5.4vw, 4.8rem); }
.chamber-tessellation { grid-template-rows: auto 1fr; }
.tessellation-wrap { position: relative; width: min(1180px, 95vw); display: grid; grid-template-columns: 60% 40%; align-items: center; }
.honeycomb-grid { display: grid; grid-template-columns: repeat(3, minmax(10rem, 15rem)); grid-auto-rows: 13rem; gap: 0.65rem 0.8rem; align-content: center; }
.hex-card { position: relative; width: 100%; height: 13rem; clip-path: var(--hex); background: #2a2218; transition: transform 600ms ease, filter 600ms ease; }
.hex-card::before { content:""; position:absolute; inset:0; clip-path:var(--hex); background: linear-gradient(145deg, rgba(212,168,98,0.13), rgba(15,12,8,0.22)); }
.hex-card::after { content:""; position:absolute; inset:1px; clip-path:var(--hex); background: linear-gradient(135deg, rgba(42,34,24,0.95), rgba(28,22,16,0.98)); transition: box-shadow 500ms ease, background 500ms ease; }
.hex-card:hover { transform: scale(1.045); filter: drop-shadow(0 0 22px rgba(212,168,98,0.16)); }
.hex-card:hover::after { background: linear-gradient(135deg, rgba(212,168,98,0.15), rgba(42,34,24,0.96)); box-shadow: inset 0 0 0 1px rgba(232,196,122,0.42); }
.hex-card div { position: relative; z-index: 1; height: 100%; display: grid; place-content: center; text-align: center; padding: 2rem; }
.hex-card p, .stage-panel span, .seal-caption { font-size: clamp(0.95rem, 1.2vw, 1.15rem); font-weight: 400; color: #b8a88a; }
.hex-card.offset { transform: translateX(50%); }
.hex-card.offset:hover { transform: translateX(50%) scale(1.045); }
.side-cluster { justify-self: center; width: min(25vw, 260px); opacity: 0.55; }
.side-cluster line { stroke: rgba(212,168,98,0.12); stroke-width: 1; }.side-cluster circle { fill: url(#tiny-star); animation: svgPulse 10s ease-in-out infinite; }

.chamber-constellation { grid-template-rows: auto 1fr; }
.constellation-stage { position: relative; width: min(1100px, 94vw); height: min(62vh, 650px); margin-top: 2rem; }
.identity-constellation { width: 100%; height: 100%; filter: drop-shadow(0 0 28px rgba(212,168,98,0.08)); }
.draw-line { stroke: rgba(212,168,98,0.12); stroke-width: 1; stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 1.2s ease; }
.constellation-stage.is-wired .draw-line { stroke-dashoffset: 0; }
.draw-line:nth-child(2) { transition-delay: 0.1s; }.draw-line:nth-child(3) { transition-delay: 0.2s; }.draw-line:nth-child(4) { transition-delay: 0.3s; }.draw-line:nth-child(5) { transition-delay: 0.4s; }.draw-line:nth-child(6) { transition-delay: 0.5s; }.draw-line:nth-child(7) { transition-delay: 0.6s; }.draw-line:nth-child(8) { transition-delay: 0.7s; }
.star-node { fill: url(#node-glow); transform-box: fill-box; transform-origin: center; animation: svgPulse 9s ease-in-out infinite; cursor: pointer; }
.star-node.is-active { filter: drop-shadow(0 0 10px #e8c47a); }
.stage-panel { position: absolute; width: 13.6rem; min-height: 7rem; padding: 1.45rem; clip-path: var(--hex); background: rgba(42,34,24,0.88); box-shadow: inset 0 0 0 1px rgba(212,168,98,0.18), 0 0 25px rgba(15,12,8,0.45); opacity: 0.54; transform: scale(0.92); transition: opacity 400ms ease, transform 400ms ease, box-shadow 400ms ease; text-align: center; display:grid; place-content:center; }
.stage-panel.is-active, .stage-panel:hover { opacity: 1; transform: scale(1); box-shadow: inset 0 0 0 1px rgba(232,196,122,0.48), 0 0 36px rgba(212,168,98,0.12); }
.panel-registration { left: 3%; top: 56%; }.panel-attestation { left: 16%; top: 12%; }.panel-proof { left: 36%; top: 33%; }.panel-anchoring { left: 47%; top: 0; }.panel-propagation { left: 57%; top: 54%; }.panel-verification { left: 70%; top: 14%; }.panel-sovereignty { right: 1%; top: 42%; }

.chamber-seal { text-align: center; }
.seal-mandala { position: relative; width: min(74vw, 31rem); height: min(74vw, 31rem); display: grid; place-items: center; }
.seal-ring { position: absolute; clip-path: var(--hex); background: transparent; will-change: transform; }
.seal-ring::before { content:""; position:absolute; inset:0; clip-path:var(--hex); box-shadow: inset 0 0 0 1px rgba(212,168,98,var(--op)); }
.ring-6 { width:100%; height:86%; --op:.6; animation: ringTurn 180s linear infinite; }.ring-5 { width:84%; height:72%; --op:.68; animation: ringTurnReverse 210s linear infinite; }.ring-4 { width:68%; height:58%; --op:.76; animation: ringTurn 235s linear infinite; }.ring-3 { width:52%; height:45%; --op:.84; animation: ringTurnReverse 260s linear infinite; }.ring-2 { width:36%; height:31%; --op:.92; animation: ringTurn 280s linear infinite; }.ring-1 { width:22%; height:19%; --op:1; animation: ringTurnReverse 300s linear infinite; }
.seal-core { position: relative; z-index: 2; color: #e8c47a; font-weight: 700; font-size: clamp(0.9rem, 1.8vw, 1.4rem); letter-spacing: 0.25em; text-transform: uppercase; line-height: 1.9; opacity: 0; transform: scale(0.94); transition: opacity 900ms ease, transform 900ms ease; }
.seal-mandala.revealed .seal-core { opacity: 1; transform: scale(1); }
.seal-caption { max-width: 42rem; margin-top: 2rem; }

.return-top { position: fixed; right: 2rem; bottom: 2rem; z-index: 18; width: 24px; height: 24px; border: 1px solid #d4a862; clip-path: var(--hex); background: rgba(15,12,8,0.3); opacity: 0; pointer-events: none; transition: opacity 500ms ease, box-shadow 500ms ease; cursor: pointer; }
.return-top.is-visible { opacity: 0.4; pointer-events: auto; }.return-top:hover { opacity: 0.8; box-shadow: 0 0 20px rgba(212,168,98,0.4); }

@keyframes starPulse { 0%,100% { opacity:0.4; transform:scale(.86); } 50% { opacity:1; transform:scale(1.2); } }
@keyframes svgPulse { 0%,100% { opacity:.42; } 50% { opacity:1; } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes counterOrbit { to { transform: rotate(-360deg); } }
@keyframes rake { to { stroke-dashoffset: -900; } }
@keyframes ringTurn { to { transform: rotate(360deg); } }
@keyframes ringTurnReverse { to { transform: rotate(-360deg); } }

@media (max-width: 900px) {
    .golden-wordmark { left: 50%; top: 42%; width: 86vw; }
    .chamber.is-visible .golden-wordmark { transform: translate(-50%, -42%) scale(1); }
    .void-orbit { left: calc(50% - 12rem); top: calc(42% - 12rem); width: 24rem; height: 24rem; opacity: 0.72; }
    .orbit-node { width: 3.7rem; height: 3.2rem; }.node-trust,.node-name { left: 10.15rem; }
    .tessellation-wrap { grid-template-columns: 1fr; }.side-cluster { display: none; }
    .honeycomb-grid { grid-template-columns: repeat(2, minmax(9rem, 1fr)); grid-auto-rows: 12rem; }
    .hex-card.offset, .hex-card.offset:hover { transform: none; }
    .constellation-stage { height: 75vh; }.stage-panel { width: 10.5rem; min-height: 6rem; padding: 1rem; }
}

@media (max-width: 560px) {
    .chamber { padding: 2rem 1rem; }
    .honeycomb-grid { grid-template-columns: 1fr; grid-auto-rows: 12.5rem; }
    .stage-panel { position: relative; inset: auto; margin: -0.4rem auto 0; width: min(86vw, 18rem); }
    .identity-constellation { height: 42vh; }.constellation-stage { height: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .chamber-plane, .seal-core { opacity: 1 !important; transform: none !important; }
    .draw-line { stroke-dashoffset: 0 !important; }
}
