/* ================================================
   CINEMATIC DESCENT — scroll-driven domain worlds
   Layers on top of styles.css. Progressive enhancement:
   without JS the descent reads as stacked, captioned sections.
   ================================================ */

:root {
    --c-void: #0a0d14;
    --c-navy: #1a1f2e;
    --c-navy-2: #10141f;
    --c-accent: #c45d08;
    --c-accent-hover: #a34d06;
    --c-offwhite: #f8f7f4;
    --c-slate: #94a3b8;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
}

/* ---- container + stage ---- */
.descent {
    position: relative;
    background: var(--c-void);
}

/* Base (no-JS / mobile / reduced-motion fallback): readable stacked sections */
.descent-stage { position: relative; }

.layer {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--c-navy-2);
}

.layer-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--c-navy-2);
}

/* Cinematic mode (JS-enabled, desktop): pinned viewport, cross-faded layers */
.descent.is-cinematic .descent-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.descent.is-cinematic .layer {
    position: absolute;
    inset: 0;
    min-height: 0;
    opacity: 0;
    will-change: opacity;
}

/* ---- grade + atmosphere over each clip ---- */
.layer-grade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(10,13,20,.55) 0%, rgba(10,13,20,.12) 38%, rgba(10,13,20,.72) 100%),
        radial-gradient(120% 80% at 72% 18%, rgba(196,93,8,.20), transparent 58%);
}

.layer-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 240px rgba(0,0,0,.72);
}

/* ---- per-beat copy ---- */
.beat-copy {
    position: relative;
    z-index: 3;
    max-width: min(680px, 86vw);
    padding: 0 clamp(1.25rem, 6vw, 7rem) clamp(3rem, 12vh, 9rem);
    color: var(--c-offwhite);
}

.beat-kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    /* brightened from slate + a soft shadow so the company name reads over the
       moving footage (visitor feedback: "names hard to see") */
    color: rgba(248, 247, 244, .92);
    text-shadow: 0 1px 14px rgba(0, 0, 0, .65);
}

/* company brand lockup: white logo + kicker, sitting above the beat title */
.beat-brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: .5rem;
}

.beat-logo {
    height: clamp(26px, 3.4vw, 36px);
    width: auto;
    /* flatten any source logo (red / two-tone / black) to clean white, and
       lift it off the video with a soft shadow */
    filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0, 0, 0, .6));
}

/* HP and Rackspace are compact icons — nudge them up to balance the wordmarks */
.layer[data-beat="hp"] .beat-logo,
.layer[data-beat="rackspace"] .beat-logo { height: clamp(30px, 4vw, 42px); }

/* Phoenix Contact is a dense square (icon + two-line wordmark), so it reads
   small at the wordmark height — give it more size and breathing room */
.layer[data-beat="phoenix"] .beat-logo { height: clamp(52px, 7vw, 72px); }
.layer[data-beat="phoenix"] .beat-brand { gap: 1rem; margin-bottom: .7rem; }

.beat-title {
    font-family: var(--font-display, 'Crimson Pro', serif);
    font-weight: 600;
    font-size: clamp(2rem, 5.4vw, 3.6rem);
    line-height: 1.04;
    letter-spacing: -.01em;
    color: var(--c-offwhite);
    margin: .55rem 0 .6rem;
}

.beat-sub {
    color: rgba(248, 247, 244, .74);
    max-width: 46ch;
    font-size: 1.02rem;
    line-height: 1.6;
}

.beat-stat {
    display: flex;
    align-items: baseline;
    gap: .7rem;
    margin-top: 1.4rem;
}

.stat-num {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(1.9rem, 4.4vw, 3rem);
    letter-spacing: -.02em;
    color: var(--c-accent);
}

.stat-cap {
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--c-slate);
    max-width: 22ch;
}

/* ---- beat 0: rooftop / intro title card ---- */
.layer--intro {
    align-items: center;
    background: radial-gradient(130% 90% at 50% 0%, #1b2435 0%, #0a0d14 68%);
}

.intro-copy {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: min(940px, 90vw);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 6vw, 7rem);
    color: var(--c-offwhite);
}

.intro-name {
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--c-slate);
}

.intro-thesis {
    font-family: var(--font-display, 'Crimson Pro', serif);
    font-weight: 600;
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 1.02;
    letter-spacing: -.015em;
    color: var(--c-offwhite);
    margin: 1rem 0 1.1rem;
    max-width: 18ch;
}

.intro-thesis em {
    font-style: italic;
    color: var(--c-accent);
}

.intro-meta {
    color: rgba(248, 247, 244, .68);
    font-size: 1.05rem;
    max-width: 44ch;
}

/* talking-head slot (intro film drops in here later) */
.intro-slot {
    margin-top: 2rem;
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .9rem;
    border: 1px dashed rgba(148, 163, 184, .4);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-slate);
}

.intro-slot::before {
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent var(--c-accent);
}

/* scroll cue */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: clamp(1.4rem, 5vh, 3rem);
    transform: translateX(-50%);
    z-index: 4;
    font-family: var(--font-mono);
    font-size: .64rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--c-slate);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.scroll-cue span {
    width: 1px;
    height: 34px;
    background: linear-gradient(var(--c-slate), transparent);
    animation: cuefall 1.8s ease-in-out infinite;
}

@keyframes cuefall {
    0% { transform: scaleY(.3); transform-origin: top; opacity: .3; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    100% { transform: scaleY(.3); transform-origin: top; opacity: .3; }
}

/* ---- beat 4: pending clip (BioNTech) — intentional placeholder ---- */
.layer--pending {
    background:
        radial-gradient(120% 90% at 62% 26%, rgba(176, 206, 224, .18), transparent 58%),
        linear-gradient(180deg, #0e1622 0%, #16212d 58%, #1b2a36 100%);
}

.layer--pending .layer-grade {
    background:
        linear-gradient(180deg, rgba(10,13,20,.30) 0%, transparent 40%, rgba(10,13,20,.55) 100%);
}

.pending-tag {
    position: absolute;
    top: clamp(5rem, 12vh, 7rem);
    left: clamp(1.25rem, 6vw, 7rem);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--c-slate);
}

.pending-tag::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c-accent);
    box-shadow: 0 0 0 0 rgba(196, 93, 8, .6);
    animation: pendingpulse 1.8s ease-out infinite;
}

@keyframes pendingpulse {
    0% { box-shadow: 0 0 0 0 rgba(196, 93, 8, .55); }
    100% { box-shadow: 0 0 0 12px rgba(196, 93, 8, 0); }
}

/* ---- capstone beat: resolve clip dissolves to light, REPOSITION reveals ---- */
.layer--capstone {
    align-items: center;
    background: var(--c-offwhite); /* fallback before the clip paints */
}

/* faint top scrim only, so the nav reads during the clip's dark first half
   without muddying the off-white resolve */
.layer--capstone .layer-grade {
    background: linear-gradient(180deg, rgba(10, 13, 20, .5) 0%, transparent 38%);
}

/* in cinematic mode the capstone starts hidden; JS fades it in as the clip
   resolves to light. In the static fallback it stays visible. */
.descent.is-cinematic .layer--capstone .capstone-inner { opacity: 0; }

.capstone-inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: min(820px, 92vw);
    margin: 0 auto;
    padding: clamp(2rem, 7vh, 4.5rem) clamp(1.25rem, 6vw, 3rem);
    text-align: center;
    color: var(--c-navy);
    /* soft light bloom guarantees legibility over the resolved frame */
    background: radial-gradient(ellipse 94% 86% at 50% 50%,
        rgba(248, 247, 244, .95) 0%,
        rgba(248, 247, 244, .78) 52%,
        rgba(248, 247, 244, 0) 82%);
}

.capstone-kicker {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--c-accent);
}

.capstone-title {
    font-family: var(--font-display, 'Crimson Pro', serif);
    font-weight: 600;
    font-size: clamp(2.6rem, 8vw, 5rem);
    line-height: 1;
    letter-spacing: .04em;
    color: var(--c-navy);
    margin: .7rem 0 .8rem;
}

.capstone-sub {
    color: var(--color-text-secondary, #4a5568);
    font-size: 1.06rem;
    line-height: 1.6;
    max-width: 54ch;
    margin: 0 auto 1.8rem;
}

.repos-steps {
    list-style: none;
    margin: 0 0 1.8rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .9rem clamp(.8rem, 3vw, 2rem);
    text-align: left;
}

.repos-steps li {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: .6rem;
    align-items: baseline;
    padding-top: .7rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.repos-letter {
    grid-row: 1 / 3;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--c-accent);
    width: 1.2em;
}

.repos-word {
    font-family: var(--font-mono);
    font-size: .82rem;
    letter-spacing: .04em;
    color: var(--c-navy);
    font-weight: 600;
}

.repos-gloss {
    grid-column: 2;
    font-size: .76rem;
    color: var(--c-slate);
}

.capstone-link,
.lobby-extra {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .1em;
    color: var(--c-accent);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}

.capstone-link:hover,
.lobby-extra:hover { border-bottom-color: var(--c-accent); }

.lobby-extra { margin-top: 1.4rem; }

/* ---- final beat: invitation (off-white brand) ---- */
.layer--lobby {
    align-items: center;
    background: var(--c-offwhite);
}

.lobby-inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: min(880px, 92vw);
    margin: 0 auto;
    padding: clamp(2rem, 8vh, 5rem) clamp(1.25rem, 6vw, 3rem);
    text-align: center;
    color: var(--c-navy);
}

.lobby-band {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1.2rem, 4vw, 2.6rem);
    padding-bottom: 2.2rem;
    margin-bottom: 2.2rem;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.lobby-band .band-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
}

.lobby-band .band-num {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(1.3rem, 3.4vw, 1.9rem);
    color: var(--c-navy);
    letter-spacing: -.02em;
}

.lobby-band .band-cap {
    font-family: var(--font-mono);
    font-size: .64rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-slate);
}

.lobby-kicker {
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--c-accent);
}

.lobby-title {
    font-family: var(--font-display, 'Crimson Pro', serif);
    font-weight: 600;
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.05;
    letter-spacing: -.015em;
    color: var(--c-navy);
    margin: .8rem 0 .7rem;
}

.lobby-sub {
    color: var(--color-text-secondary, #4a5568);
    font-size: 1.08rem;
    max-width: 52ch;
    margin: 0 auto 2rem;
}

.lobby-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .9rem;
}

.c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-weight: 600;
    font-size: .98rem;
    padding: .85rem 1.6rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 150ms ease, background 200ms ease, border-color 200ms ease;
}

.c-btn:active { transform: translateY(1px) scale(.99); }

.c-btn--primary {
    background: var(--c-accent);
    color: #fff;
}

.c-btn--primary:hover { background: var(--c-accent-hover); }

.c-btn--ghost {
    background: transparent;
    color: var(--c-navy);
    border-color: var(--color-border, #cbd5e1);
}

.c-btn--ghost:hover { border-color: var(--c-navy); }

/* ---- "view the case" open button (quiet, in-world) ---- */
.case-open {
    margin-top: 1.4rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: transparent;
    border: 1px solid rgba(248, 247, 244, .26);
    color: var(--c-offwhite);
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: .52rem .9rem;
    border-radius: 9px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}

.case-open:hover { border-color: var(--c-accent); background: rgba(196, 93, 8, .12); }
.case-open:active { transform: translateY(1px); }
.case-open .plus { color: var(--c-accent); font-size: 1.05rem; line-height: 0; }

/* light-context variant (used on the off-white About coda) */
.case-open--light {
    color: var(--c-navy);
    border-color: rgba(26, 31, 46, .28);
    margin-top: 2rem;
}
.case-open--light:hover { border-color: var(--c-accent); background: rgba(196, 93, 8, .07); }

/* ============================================================
   POST-DESCENT BRAND HARMONY
   Aligns the off-white closing sections (the record, waitlist,
   footer) with the cinematic vocabulary: mono labels, mono data,
   one accent — so the bottom reads as the same piece as the top.
   ============================================================ */

/* all small labels -> the mono kicker voice from the descent */
.about .section-label,
.creds-title,
.journey-title,
.waitlist-badge .badge-text,
.footer-links-title {
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 500;
}

.about .section-label { color: var(--c-accent); }
.journey-title,
.footer-links-title { color: var(--c-slate); }

/* all data / numerals -> mono (data is mono) */
.journey-year,
.count-number {
    font-family: var(--font-mono);
    letter-spacing: -.01em;
}

.journey-company { letter-spacing: -.01em; }

/* the closing section gets a thin accent rule, tying it to the brand */
.about { border-top: 1px solid var(--color-border, #e2e8f0); }

/* ---- About coda: credentials block ---- */
.creds { margin-top: 1.9rem; }

.creds-title {
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--c-slate);
}

.creds-list {
    list-style: none;
    margin: .8rem 0 0;
    padding: 0;
    display: grid;
    gap: .55rem;
}

.creds-list li {
    position: relative;
    padding-left: 1.3rem;
    color: var(--color-text-secondary, #4a5568);
}

.creds-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-accent);
}

/* ---- in-world cinematic case panel ---- */
.case-panel {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vh, 3rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .4s ease, visibility .4s ease;
}

.case-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.case-panel-scrim {
    position: absolute;
    inset: 0;
    /* dim the backdrop firmly so the glass reads consistently whether the
       panel opens over a dark floor or the off-white record section */
    background: rgba(8, 11, 18, .74);
}

.case-panel-card {
    position: relative;
    width: min(660px, 94vw);
    max-height: 86vh;
    overflow-y: auto;
    padding: clamp(1.6rem, 4vw, 2.6rem);
    border-radius: 22px;
    color: var(--c-offwhite);
    /* liquid glass: translucent fill + heavy backdrop blur refracts the floor
       behind it; bright 1px edge + inner top highlight read as a real bevel */
    background: linear-gradient(155deg, rgba(34, 41, 59, .46) 0%, rgba(16, 20, 31, .56) 100%);
    backdrop-filter: blur(22px) saturate(1.7);
    -webkit-backdrop-filter: blur(22px) saturate(1.7);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .22),
        inset 0 0 0 1px rgba(255, 255, 255, .04),
        inset 0 -40px 60px -40px rgba(0, 0, 0, .5),
        0 30px 80px -24px rgba(0, 0, 0, .62);
    transform: translateY(20px) scale(.985);
    transition: transform .45s cubic-bezier(.16, 1, .3, 1);
}

.case-panel.is-open .case-panel-card { transform: none; }

.case-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: transparent;
    color: var(--c-slate);
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease;
}

.case-close:hover { border-color: rgba(255, 255, 255, .3); color: var(--c-offwhite); }

.case-panel-kicker {
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--c-accent);
}

.case-panel-title {
    font-family: var(--font-display, 'Crimson Pro', serif);
    font-weight: 600;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.08;
    color: var(--c-offwhite);
    margin: .5rem 0 1.2rem;
}

.case-panel-lead {
    color: rgba(248, 247, 244, .82);
    font-size: 1.02rem;
    line-height: 1.65;
    margin-bottom: 1.2rem;
}

.case-panel-list {
    list-style: none;
    margin: 0 0 1.4rem;
    padding: 0;
    display: grid;
    gap: .7rem;
}

.case-panel-list li {
    position: relative;
    padding-left: 1.4rem;
    color: rgba(248, 247, 244, .76);
    line-height: 1.55;
}

.case-panel-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-accent);
}

.case-panel-results {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 4vw, 2.2rem);
    padding: 1.2rem 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-bottom: 1.2rem;
}

.case-panel-results .cpr {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.case-panel-results .cpr-num {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(1.3rem, 3.4vw, 1.7rem);
    color: var(--c-accent);
    letter-spacing: -.02em;
}

.case-panel-results .cpr-cap {
    font-family: var(--font-mono);
    font-size: .64rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-slate);
}

.case-panel-tech {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.case-panel-tech span {
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-slate);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: .32rem .7rem;
}

/* ---- "Built in the open" panel: open-source project list ---- */
.oss-list {
    display: grid;
    gap: 1.4rem;
}

.oss-item {
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.oss-item:first-child { padding-top: 0; border-top: none; }

.oss-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .4rem;
}

.oss-head h4 {
    font-family: var(--font-display, 'Crimson Pro', serif);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--c-offwhite);
}

.oss-head a {
    flex: none;
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .1em;
    color: var(--c-accent);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}

.oss-head a:hover { border-bottom-color: var(--c-accent); }

.oss-item p {
    color: rgba(248, 247, 244, .74);
    line-height: 1.55;
    margin-bottom: .7rem;
}

.oss-tech {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.oss-tech span {
    font-family: var(--font-mono);
    font-size: .62rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-slate);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: .28rem .6rem;
}

/* the record section's two panel openers */
.record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 2rem;
}

.record-actions .case-open--light { margin-top: 0; }

/* hide the depth rail while a case panel is open */
.case-locked .descent-rail { opacity: 0 !important; }

@media (prefers-reduced-motion: reduce) {
    .case-panel, .case-panel-card { transition: none; }
}

/* ---- descent rail (depth indicator on the right) ---- */
.descent-rail {
    position: fixed;
    top: 50%;
    right: clamp(.8rem, 2.4vw, 2rem);
    transform: translateY(-50%);
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    opacity: 0;
    transition: opacity 400ms ease;
    pointer-events: none;
}

.descent.is-cinematic ~ .descent-rail,
body.descent-active .descent-rail { opacity: 1; }

.rail-track {
    position: relative;
    width: 2px;
    height: clamp(150px, 26vh, 240px);
    background: rgba(148, 163, 184, .22);
    border-radius: 2px;
    overflow: hidden;
}

.rail-fill {
    position: absolute;
    inset: 0;
    transform: scaleY(0);
    transform-origin: top;
    background: linear-gradient(var(--c-accent), rgba(196, 93, 8, .3));
}

.rail-ticks {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rail-tick {
    align-self: center;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(148, 163, 184, .35);
    transition: background 250ms ease, transform 250ms ease;
}

.rail-tick.is-active {
    background: var(--c-accent);
    transform: scale(1.5);
}

/* ---- nav over the dark descent ---- */
.nav.nav--dark {
    background: transparent;
    backdrop-filter: none;
    border-bottom-color: transparent;
}

.nav.nav--dark .logo-name,
.nav.nav--dark .logo-title,
.nav.nav--dark .nav-link:not(.nav-link-primary) {
    color: var(--c-offwhite);
}

.nav.nav--dark .nav-link:not(.nav-link-primary):hover {
    color: #fff;
}

/* ---- mobile / static fallback tuning ---- */
@media (max-width: 768px) {
    .beat-copy { padding-bottom: clamp(2.5rem, 10vh, 5rem); }
    .descent-rail { display: none; }
    .intro-thesis { font-size: clamp(2.1rem, 9vw, 3.2rem); }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-cue span,
    .pending-tag::before { animation: none; }
}
