:root {
    /* compliance language: annotations float in the left margin (columns 1–2); IBM Plex Mono" (Google Fonts; Interactive elements use Intersection Observer API (NOT scroll event listeners) to control Lottie's `goToAndStop(); Playfair Display 900 at massive scale (one per card); Playfair Display at `clamp(3rem, 6vw, 5rem)`; reduced size. Below Playfair Display" (Google Fonts. */
    --void: #0b0e17;
    --deep: #060810;
    --surface: #141926;
    --surface-2: #1a2236;
    --silver: #c0c8d8;
    --pewter: #8a94a8;
    --mercury: #d4dce8;
    --steel: #9aa4b8;
    --lapis: #4a6fa5;
    --copper: #b87333;
    --copper-glow: 8px;
    --thread-reveal: 70%;
    --summon: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; scroll-snap-type: y proximity; }

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--void);
    color: var(--pewter);
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.75;
}

.descent { position: relative; isolation: isolate; }

.copper-thread {
    position: fixed;
    top: 0;
    left: calc((100vw / 16) * 6);
    width: 2px;
    height: 100vh;
    z-index: 40;
    background: var(--copper);
    box-shadow: 0 0 var(--copper-glow) rgba(184, 115, 51, .48);
    clip-path: inset(0 0 var(--thread-reveal) 0);
}

.copper-thread span {
    position: absolute;
    bottom: 7vh;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--copper);
    transform: translateX(-50%) scale(var(--terminal-scale, 0));
    box-shadow: 0 0 22px rgba(184, 115, 51, .75);
    animation: pulseCopper 2.8s ease-in-out infinite;
}

.threshold {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    align-items: stretch;
}

.threshold::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 18vh;
    z-index: 4;
    background: linear-gradient(135deg, transparent 0 28%, rgba(6, 8, 16, .22) 28% 34%, transparent 34% 58%, rgba(192, 200, 216, .035) 58% 62%, transparent 62%);
    clip-path: polygon(0 28%, 16% 100%, 31% 42%, 46% 100%, 63% 34%, 79% 100%, 100% 22%, 100% 100%, 0 100%);
    pointer-events: none;
}

.threshold-portal { background: var(--void); }
.threshold-reading { background: linear-gradient(180deg, #0b0e17, #141926); }
.threshold-transmutation { background: var(--surface); }
.threshold-orbit { background: linear-gradient(180deg, #141926, #1a2236); }
.threshold-mist { background: var(--void); }
.threshold-revelation { background: linear-gradient(180deg, #0b0e17, #060810); }

.threshold-grid {
    position: relative;
    z-index: 8;
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    grid-template-rows: repeat(10, 1fr);
    padding: 2rem;
}

.retro-pattern {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-size: 120px 120px;
    background-repeat: repeat;
    opacity: .04;
    pointer-events: none;
}

.pattern-circles { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%234a6fa5'%3E%3Ccircle cx='60' cy='60' r='50' stroke-width='2'/%3E%3Ccircle cx='60' cy='60' r='34'/%3E%3Ccircle cx='60' cy='60' r='18'/%3E%3Cpath d='M10 60h100M60 10v100' stroke-width='.7'/%3E%3C/g%3E%3C/svg%3E"); }
.pattern-hex, .pattern-tessellate { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%234a6fa5' stroke-width='1.3'%3E%3Cpath d='M60 10 94 30v40L60 90 26 70V30Z'/%3E%3Cpath d='M26 70 60 50l34 20M26 30l34 20 34-20M60 50v40'/%3E%3C/g%3E%3C/svg%3E"); }
.pattern-rays { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg stroke='%234a6fa5' stroke-width='1' stroke-linecap='round'%3E%3Cpath d='M60 60V6M60 60l38-38M60 60h54M60 60l38 38M60 60v54M60 60l-38 38M60 60H6M60 60L22 22'/%3E%3C/g%3E%3C/svg%3E"); }
.pattern-low-rays { opacity: .02; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg stroke='%234a6fa5' stroke-width='1'%3E%3Cpath d='M0 120 120 0M0 120 90 0M0 120 60 0M0 120 30 0M0 120 120 30M0 120 120 60M0 120 120 90'/%3E%3C/g%3E%3C/svg%3E"); }
.pattern-converge { opacity: .025; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%234a6fa5' stroke-width='.9'%3E%3Ccircle cx='60' cy='60' r='48'/%3E%3Ccircle cx='60' cy='60' r='27'/%3E%3Cpath d='M60 12 104 92H16ZM60 108 104 28H16Z'/%3E%3Cpath d='M12 60h96M60 12v96'/%3E%3C/g%3E%3C/svg%3E"); }

.glass-card {
    position: relative;
    background: rgba(20, 25, 38, .6);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(192, 200, 216, .08);
    border-radius: 8px;
    box-shadow: 20px 40px 80px rgba(0, 0, 0, .5);
    opacity: 0;
    transform: translateY(40px) rotate(var(--card-rotation, 0deg));
    transition: opacity 1.2s var(--summon), transform 1.2s var(--summon), border-color .5s ease;
}

.glass-card.in-view, .annotation.in-view, .revelation-wordmark.in-view, .final-line.in-view {
    opacity: 1;
    transform: translateY(0) rotate(var(--card-rotation, 0deg));
}

.glass-card:hover { border-color: rgba(184, 115, 51, .24); }

.portal-card {
    grid-column: 8 / 16;
    grid-row: 4 / 8;
    width: 450px;
    height: 320px;
    align-self: start;
    justify-self: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 3rem;
}

.wordmark, .revelation-wordmark, .transmutation-card span {
    font-family: "Playfair Display", serif;
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: .94;
}

.shimmer {
    color: var(--silver);
    background: linear-gradient(135deg, #c0c8d8 0%, #8a94a8 40%, #d4dce8 60%, #9aa4b8 100%);
    background-size: 180% 180%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: filter .6s ease, background-position .6s ease;
}

.shimmer:hover { background-position: 100% 50%; filter: drop-shadow(0 0 12px rgba(192, 200, 216, .15)); }
.wordmark { font-size: clamp(3rem, 6vw, 5rem); }
.tagline { margin-top: 1.2rem; color: var(--silver); font-style: italic; letter-spacing: .05em; }

.sigil { position: absolute; z-index: 2; pointer-events: none; opacity: .5; }
.sigil-mandala { inset: 8vh 4vw auto auto; width: 58vw; height: 58vw; max-width: 760px; max-height: 760px; animation: rotateSlow 38s linear infinite; }
.sigil-mandala i { position: absolute; inset: calc(var(--n, 0) * 7%); border: 1px solid rgba(192, 200, 216, .45); border-radius: 50%; animation: breathe 4s ease-in-out infinite alternate; }
.sigil-mandala i:nth-child(1) { --n: 0; }
.sigil-mandala i:nth-child(2) { --n: 1; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.sigil-mandala i:nth-child(3) { --n: 2; }
.sigil-mandala i:nth-child(4) { --n: 3; border-radius: 8px; transform: rotate(45deg); }
.sigil-mandala i:nth-child(5) { --n: 4; }
.sigil-mandala i:nth-child(6) { --n: 5; border-radius: 0; transform: rotate(30deg); }

.reading-card { grid-column: 7 / 15; grid-row: 4 / 7; width: min(500px, 84vw); padding: 2.5rem; z-index: 3; }
.reading-card p { max-width: 38ch; color: var(--pewter); }
.reading-back { grid-column: 4 / 12; grid-row: 5 / 8; width: 520px; height: 240px; z-index: 2; overflow: hidden; }
.annotation { position: relative; z-index: 6; opacity: 0; transform: translateY(20px); transition: opacity 1.2s var(--summon), transform 1.2s var(--summon); font-family: "IBM Plex Mono", monospace; font-size: .7rem; font-weight: 300; letter-spacing: .15em; color: var(--lapis); text-transform: uppercase; line-height: 1.6; }
.annotation-a { grid-column: 1 / 3; grid-row: 2; }
.annotation-b { grid-column: 2 / 4; grid-row: 8; }

.constellation-field { position: absolute; inset: 0; z-index: 2; opacity: .24; background: radial-gradient(circle at 22% 25%, #c0c8d8 0 1px, transparent 2px), radial-gradient(circle at 67% 35%, #c0c8d8 0 1px, transparent 2px), radial-gradient(circle at 44% 70%, #c0c8d8 0 1px, transparent 2px); }
.constellation-field span, .mini-constellation b { position: absolute; height: 1px; background: rgba(192, 200, 216, .55); transform-origin: left; animation: connect 5s ease-in-out infinite; }
.constellation-field span:nth-child(1) { left: 18%; top: 28%; width: 24vw; transform: rotate(18deg); }
.constellation-field span:nth-child(2) { left: 42%; top: 38%; width: 18vw; transform: rotate(-28deg); animation-delay: -1s; }
.constellation-field span:nth-child(3) { left: 29%; top: 68%; width: 31vw; transform: rotate(8deg); animation-delay: -2s; }
.mini-constellation { position: absolute; inset: 0; filter: blur(1px); }
.mini-constellation b:nth-child(1) { left: 12%; top: 38%; width: 70%; transform: rotate(9deg); }
.mini-constellation b:nth-child(2) { left: 32%; top: 18%; width: 44%; transform: rotate(61deg); animation-delay: -1.8s; }
.mini-constellation b:nth-child(3) { left: 20%; top: 72%; width: 54%; transform: rotate(-24deg); animation-delay: -.7s; }

.sigil-alchemy { left: 50%; top: 50%; width: 52vw; height: 52vw; max-width: 650px; max-height: 650px; transform: translate(-50%, -50%); opacity: .38; }
.sigil-alchemy i { position: absolute; inset: 12%; border: 2px solid rgba(192, 200, 216, .42); animation: assemble 7s var(--summon) infinite; }
.sigil-alchemy i:nth-child(1) { border-radius: 50%; }
.sigil-alchemy i:nth-child(2) { clip-path: polygon(50% 0, 100% 86%, 0 86%); }
.sigil-alchemy i:nth-child(3) { inset: 25%; transform: rotate(45deg); }
.sigil-alchemy i:nth-child(4) { inset: 40%; border-radius: 50%; }
.transmutation-stack { grid-column: 1 / -1; grid-row: 1 / -1; position: relative; display: flex; align-items: center; justify-content: center; }
.transmutation-card { position: absolute; width: min(520px, 88vw); height: 300px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 2rem; }
.transmutation-card span { font-size: clamp(3.5rem, 9vw, 8rem); color: var(--silver); text-transform: uppercase; white-space: nowrap; }
.card-one { margin: -120px 0 0 -170px; }
.card-two { margin: 0 0 0 70px; }
.card-three { margin: 125px 0 0 -40px; }

.orbit-card { grid-column: 5 / 18; grid-row: 3 / 8; width: 80vw; height: 50vh; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 3rem; }
.orbit-card p { position: relative; z-index: 2; max-width: 45ch; text-align: center; color: var(--silver); font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.8; }
.moon-cycle { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: clamp(.5rem, 2vw, 1.5rem); opacity: .3; animation: driftMoon 12s ease-in-out infinite alternate; }
.moon-cycle i { width: clamp(28px, 5vw, 72px); height: clamp(28px, 5vw, 72px); border: 2px solid var(--silver); border-radius: 50%; background: linear-gradient(90deg, transparent var(--phase, 50%), rgba(192, 200, 216, .55) var(--phase, 50%)); }
.moon-cycle i:nth-child(1) { --phase: 0%; } .moon-cycle i:nth-child(2) { --phase: 18%; } .moon-cycle i:nth-child(3) { --phase: 34%; } .moon-cycle i:nth-child(4) { --phase: 50%; } .moon-cycle i:nth-child(5) { --phase: 66%; } .moon-cycle i:nth-child(6) { --phase: 82%; } .moon-cycle i:nth-child(7) { --phase: 100%; }

.mist-field { position: absolute; inset: 0; z-index: 2; opacity: .15; filter: blur(8px); }
.mist-field i { position: absolute; bottom: -12vh; width: 18vw; height: 72vh; border-radius: 50%; border-left: 14px solid rgba(192, 200, 216, .32); transform: rotate(var(--r)); animation: riseMist 10s ease-in-out infinite; }
.mist-field i:nth-child(1) { left: 8%; --r: 12deg; } .mist-field i:nth-child(2) { left: 28%; --r: -8deg; animation-delay: -3s; } .mist-field i:nth-child(3) { left: 48%; --r: 16deg; animation-delay: -5s; } .mist-field i:nth-child(4) { left: 66%; --r: -14deg; animation-delay: -2s; } .mist-field i:nth-child(5) { left: 82%; --r: 7deg; animation-delay: -7s; }
.mist-card { grid-column: 10 / 14; grid-row: 4 / 7; width: 280px; height: 200px; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.mist-card p { font-family: "IBM Plex Mono", monospace; font-size: .85rem; font-weight: 300; letter-spacing: .2em; color: var(--lapis); text-align: center; }

.revelation-grid { align-items: center; justify-items: center; }
.revelation-wordmark { grid-column: 5 / 13; grid-row: 2; opacity: 0; transform: translateY(20px); transition: opacity 1.2s var(--summon), transform 1.2s var(--summon); font-size: clamp(2rem, 4vw, 2.5rem); }
.eye { grid-column: 4 / 14; grid-row: 3 / 8; position: relative; width: min(40vw, 500px); aspect-ratio: 1; opacity: .95; transform: scaleY(var(--eye-open, .08)); transition: transform .1s linear; }
.eye::before { content: ""; position: absolute; inset: 25% 3%; border: 3px solid var(--silver); border-radius: 50% / 42%; box-shadow: inset 0 0 60px rgba(74, 111, 165, .24), 0 0 40px rgba(192, 200, 216, .12); }
.eye i, .eye b, .eye em { position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.eye i { width: 34%; height: 34%; border: 2px solid var(--mercury); box-shadow: 0 0 0 18px rgba(74, 111, 165, .08), 0 0 0 40px rgba(192, 200, 216, .035); animation: rotateSlow 18s linear infinite; }
.eye b { width: 13%; height: 13%; background: var(--deep); box-shadow: 0 0 22px rgba(184, 115, 51, .18); }
.eye em { width: 60%; height: 60%; border: 1px dashed rgba(192, 200, 216, .45); animation: rotateSlow 28s linear reverse infinite; }
.final-line { grid-column: 5 / 13; grid-row: 8; opacity: 0; transform: translateY(20px); transition: opacity 1.2s var(--summon), transform 1.2s var(--summon); color: var(--pewter); font-style: italic; font-size: 1.3rem; text-align: center; }

@keyframes rotateSlow { to { transform: rotate(360deg); } }
@keyframes breathe { from { opacity: .6; } to { opacity: 1; } }
@keyframes connect { 0%, 100% { opacity: .15; transform: scaleX(.25) rotate(var(--angle, 0deg)); } 50% { opacity: .9; transform: scaleX(1); } }
@keyframes assemble { 0%, 100% { opacity: 0; transform: translate(34px, -18px) rotate(18deg) scale(.75); } 22%, 72% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); } }
@keyframes driftMoon { from { transform: translateX(-3vw); } to { transform: translateX(3vw); } }
@keyframes riseMist { 0%, 100% { transform: translateY(10vh) rotate(var(--r)); opacity: .35; } 50% { transform: translateY(-8vh) rotate(calc(var(--r) * -1)); opacity: .9; } }
@keyframes pulseCopper { 0%, 100% { opacity: .55; transform: translateX(-50%) scale(.8); } 50% { opacity: 1; transform: translateX(-50%) scale(1.18); } }

@media (max-width: 768px) {
    .threshold-grid { grid-template-columns: repeat(8, 1fr); padding: 1rem; }
    .copper-thread { display: none; }
    .portal-card, .reading-card, .reading-back, .orbit-card, .mist-card, .revelation-wordmark, .final-line, .eye { grid-column: 1 / -1; }
    .portal-card { width: 86vw; height: 260px; }
    .reading-card { grid-row: 4 / 7; }
    .reading-back { grid-row: 5 / 8; width: 85vw; }
    .annotation-b { display: none; }
    .transmutation-card { height: 220px; }
    .card-one { margin-left: -20px; } .card-two { margin-left: 30px; } .card-three { margin-left: -10px; }
    .orbit-card { grid-row: 3 / 8; width: 96vw; }
    .mist-card { justify-self: center; }
    .eye { width: 66vw; }
}

@media (max-width: 480px) {
    .glass-card { padding: 1.5rem; }
    .wordmark { font-size: clamp(2.1rem, 11vw, 3rem); }
    .transmutation-card span { font-size: clamp(2.4rem, 13vw, 4rem); }
    .orbit-card p { font-size: 1rem; }
}
