/* =========================================================================
   conc.quest — Concurrency HUD
   inflated-3d / hud-overlay / muted aquatic palette
   Reveal animations are driven by JS via IntersectionObserver`.
   Body falls back to 'Inter' between 'Sen' and system-ui.
   ========================================================================= */

:root {
    --hull-ink: #1B2329;
    --abyss: #0E1418;
    --shadow-tone: #06090B;
    --visor-white: #E7ECEC;
    --mist: #C7CFD2;
    --ley-cyan: #7FB7C5;
    --bladder-teal: #3C6E78;
    --brass: #E2C58A;
    --coral-warning: #D98873;
    --bubble-pearl: rgba(231, 236, 236, 0.08);

    --rail-gap: 12px;
    --rail-radius: 28px;
    --cap-radius: 24px;

    --inset-hi: inset 0 1.5px 0 rgba(255, 255, 255, 0.18);
    --inset-hi-bold: inset 0 2.5px 0 rgba(255, 255, 255, 0.28), inset 0 -1.5px 0 rgba(6, 9, 11, 0.35);
    --outer-drop: 0 14px 30px -10px rgba(6, 9, 11, 0.55);
    --outer-drop-soft: 0 8px 22px -10px rgba(6, 9, 11, 0.55);

    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    /* Body uses 'Sen' (Google Fonts), with 'Inter' as a humanist-geometric fallback */
    font-family: 'Sen', 'Inter', system-ui, sans-serif;
    color: var(--mist);
    font-size: 16px;
    line-height: 1.55;
    background: linear-gradient(180deg, var(--hull-ink) 0%, var(--hull-ink) 35%, var(--abyss) 100%);
    background-attachment: fixed;
    cursor: none;
    overflow-y: scroll;
    position: relative;
    --bg-cool: 0;
}

/* dynamic cool descent overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(120% 80% at 50% 100%, rgba(14, 20, 24, 0.6) 0%, transparent 60%);
    z-index: 0;
}

/* vignette */
.vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        radial-gradient(ellipse at center, transparent 50%, rgba(6, 9, 11, 0.35) 100%),
        radial-gradient(ellipse at 50% 110%, rgba(127, 183, 197, 0.05) 0%, transparent 55%);
}

/* caustics */
.caustics {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: caustics-drift 22s linear infinite;
}

@keyframes caustics-drift {
    0%   { transform: translateX(-4%) translateY(0); }
    50%  { transform: translateX(4%) translateY(-3%); }
    100% { transform: translateX(-4%) translateY(0); }
}

/* bubble field overlay */
.bubble-field {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 3;
}

.bubble-field circle {
    will-change: transform;
}

/* =========================================================================
   Cursor system
   ========================================================================= */

.cursor-cross {
    position: fixed;
    top: 0; left: 0;
    width: 24px;
    height: 24px;
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    will-change: transform;
}

.cursor-halo {
    position: fixed;
    top: 0; left: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(231, 236, 236, 0.16) 0%, rgba(127, 183, 197, 0.10) 40%, transparent 75%);
    border: 1px solid rgba(231, 236, 236, 0.18);
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    will-change: transform;
}

.cursor-trail {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.shy-bubbles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.shy-bubble {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(231, 236, 236, 0.18), rgba(127, 183, 197, 0.06) 70%);
    border: 1px solid rgba(231, 236, 236, 0.10);
    pointer-events: none;
    will-change: transform;
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
}

.trail-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    mix-blend-mode: screen;
}

/* =========================================================================
   Inflated-3d capsule skin (shared mixin via class)
   ========================================================================= */

.cap-skin,
.disc-skin {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(165deg,
            color-mix(in srgb, var(--cap-base, var(--bladder-teal)) 100%, transparent) 0%,
            color-mix(in srgb, var(--cap-base, var(--bladder-teal)) 60%, white 18%) 100%);
    box-shadow:
        var(--inset-hi),
        inset 0 -2px 0 rgba(6, 9, 11, 0.35),
        inset 0 24px 30px -22px rgba(255, 255, 255, 0.25),
        var(--outer-drop);
    pointer-events: none;
    z-index: 0;
}

.cap-noise,
.disc-noise {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.6) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(0,0,0,0.4) 0 1px, transparent 1px 3px);
    background-size: 3px 3px, 3px 3px;
    z-index: 1;
}

/* =========================================================================
   Top rail
   ========================================================================= */

.rail {
    position: fixed;
    z-index: 50;
    color: var(--visor-white);
    font-family: 'Jost', sans-serif;
}

.rail-top {
    top: var(--rail-gap);
    left: var(--rail-gap);
    right: var(--rail-gap);
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-radius: var(--rail-radius);
    --cap-base: #2A3A42;
    background:
        linear-gradient(165deg, #2A3A42 0%, color-mix(in srgb, #2A3A42 80%, white 18%) 100%);
    box-shadow:
        var(--inset-hi),
        inset 0 -1px 0 rgba(6, 9, 11, 0.4),
        var(--outer-drop),
        0 0 0 1px rgba(127, 183, 197, 0.10),
        0 0 22px -2px rgba(127, 183, 197, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.rail-cluster {
    display: flex;
    align-items: center;
    gap: 18px;
}

.rail-center { flex: 1; justify-content: center; }
.rail-right  { justify-content: flex-end; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 15px;
    color: var(--visor-white);
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--brass), color-mix(in srgb, var(--brass) 60%, var(--shadow-tone) 40%));
    box-shadow: 0 0 8px rgba(226, 197, 138, 0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}

.brand-name {
    text-transform: lowercase;
}

.brand-dot-mid {
    color: var(--ley-cyan);
}

.reg-mark {
    opacity: 0.7;
}

.telemetry-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.tel-label {
    font-family: 'Jost', sans-serif;
    color: var(--mist);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 10.5px;
    opacity: 0.75;
}

.tel-value {
    font-family: 'Jost', sans-serif;
    color: var(--visor-white);
    font-weight: 500;
    letter-spacing: 0.08em;
    font-size: 12px;
    text-transform: uppercase;
}

.tel-on { color: var(--ley-cyan); }

.tel-num {
    font-family: 'Major Mono Display', monospace;
    color: var(--ley-cyan);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
}

.tel-unit {
    font-family: 'Major Mono Display', monospace;
    color: var(--ley-cyan);
    font-size: 11px;
    margin-left: 1px;
}

.tel-sep {
    color: rgba(127, 183, 197, 0.4);
    font-size: 12px;
}

.cursor-blink {
    display: inline-block;
    width: 6px;
    height: 12px;
    background: var(--ley-cyan);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1.05s steps(2) infinite;
}

@keyframes blink {
    0%, 50%   { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.energy-gauge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gauge-track {
    width: 78px;
    height: 6px;
    background: rgba(14, 20, 24, 0.7);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.4), inset 0 -1px 0 rgba(255,255,255,0.04);
}

.gauge-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--bladder-teal), var(--ley-cyan));
    box-shadow: 0 0 8px rgba(127, 183, 197, 0.5);
    transition: width 1.2s ease-out;
}

.clock {
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px dashed rgba(127, 183, 197, 0.25);
}

/* =========================================================================
   Left flank nav
   ========================================================================= */

.rail-left-flank {
    top: calc(56px + var(--rail-gap) * 2);
    left: var(--rail-gap);
    width: 72px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 8px;
    border-radius: var(--rail-radius);
    --cap-base: #232E35;
    background: linear-gradient(165deg, #232E35 0%, color-mix(in srgb, #232E35 80%, white 18%) 100%);
    box-shadow:
        var(--inset-hi),
        inset 0 -1px 0 rgba(6, 9, 11, 0.4),
        var(--outer-drop),
        0 0 0 1px rgba(127, 183, 197, 0.08);
}

.nav-pill {
    cursor: none;
    border: none;
    background: linear-gradient(165deg, #2C3A42 0%, color-mix(in srgb, #2C3A42 60%, white 22%) 100%);
    border-radius: 18px;
    padding: 10px 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--mist);
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(6, 9, 11, 0.4),
        0 6px 14px -8px rgba(6, 9, 11, 0.6);
    transition: transform 320ms var(--spring),
                box-shadow 280ms ease,
                color 240ms ease,
                background 320ms ease;
    position: relative;
    overflow: hidden;
    font-family: 'Jost', sans-serif;
}

.nav-pill::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%),
                                rgba(255,255,255,0.20) 0%,
                                transparent 55%);
    opacity: 0;
    transition: opacity 240ms ease;
    pointer-events: none;
}

.nav-pill:hover {
    transform: scale(1.05);
    color: var(--visor-white);
    box-shadow:
        inset 0 2.5px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(6, 9, 11, 0.4),
        0 10px 20px -8px rgba(6, 9, 11, 0.6);
}

.nav-pill:hover::after { opacity: 1; }

.nav-pill:active {
    transform: scale(0.97);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -1px 0 rgba(6, 9, 11, 0.4),
        0 4px 8px -6px rgba(6, 9, 11, 0.6);
    transition-duration: 90ms;
}

.nav-pill-active {
    color: var(--brass);
    background: linear-gradient(165deg, #3a4a52 0%, color-mix(in srgb, #3a4a52 65%, white 22%) 100%);
}
.nav-pill-active::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    width: 3px;
    height: 22px;
    border-radius: 3px;
    background: var(--brass);
    box-shadow: 0 0 8px rgba(226, 197, 138, 0.5);
    transform: translateY(-50%);
}

.pill-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: inherit;
}

.pill-label {
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 500;
}

/* =========================================================================
   Right Oracle drawer
   ========================================================================= */

.rail-oracle {
    top: calc(56px + var(--rail-gap) * 2);
    right: var(--rail-gap);
    width: 320px;
    max-height: calc(100vh - 56px - var(--rail-gap) * 4 - 88px);
    padding: 18px 22px 16px;
    border-radius: var(--rail-radius);
    background: linear-gradient(165deg, #232E35 0%, color-mix(in srgb, #232E35 80%, white 14%) 100%);
    box-shadow:
        var(--inset-hi),
        inset 0 -1px 0 rgba(6, 9, 11, 0.4),
        var(--outer-drop),
        0 0 0 1px rgba(127, 183, 197, 0.10);
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--visor-white);
}

.oracle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(127, 183, 197, 0.2);
    padding-bottom: 10px;
}

.oracle-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ley-cyan);
    box-shadow: 0 0 8px var(--ley-cyan), 0 0 0 0 rgba(127, 183, 197, 0.5);
    animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 8px var(--ley-cyan), 0 0 0 0 rgba(127, 183, 197, 0.5); }
    100% { box-shadow: 0 0 8px var(--ley-cyan), 0 0 0 12px rgba(127, 183, 197, 0); }
}

.oracle-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    max-height: 230px;
    font-family: 'Sen', sans-serif;
}

.oracle-line {
    font-size: 11.5px;
    color: var(--mist);
    letter-spacing: 0.02em;
    line-height: 1.45;
    opacity: 0;
    animation: fadeUp 600ms ease-out forwards;
}

.oracle-line:nth-child(1) { animation-delay: 0.4s; }
.oracle-line:nth-child(2) { animation-delay: 0.7s; }
.oracle-line:nth-child(3) { animation-delay: 1.0s; }
.oracle-line:nth-child(4) { animation-delay: 1.3s; }
.oracle-line:nth-child(5) { animation-delay: 1.6s; }

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

.ln-time {
    font-family: 'Major Mono Display', monospace;
    color: rgba(127, 183, 197, 0.7);
    font-size: 10.5px;
}

.ln-tag {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(127, 183, 197, 0.10);
    color: var(--mist);
    font-family: 'Major Mono Display', monospace;
    font-size: 9.5px;
    letter-spacing: 0.08em;
    margin: 0 4px;
}

.tag-cyan { color: var(--ley-cyan); background: rgba(127, 183, 197, 0.18); }
.tag-brass { color: var(--brass); background: rgba(226, 197, 138, 0.14); }

.oracle-prompt {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 20, 24, 0.55);
    border-radius: 14px;
    padding: 8px 12px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.4), inset 0 -1px 0 rgba(255,255,255,0.04);
}

.prompt-prefix {
    color: var(--ley-cyan);
    font-family: 'Major Mono Display', monospace;
    font-size: 13px;
}

.prompt-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--visor-white);
    font-family: 'Sen', sans-serif;
    font-size: 12.5px;
    letter-spacing: 0.02em;
    cursor: none;
}

.prompt-input::placeholder {
    color: rgba(199, 207, 210, 0.5);
    font-style: italic;
}

.oracle-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px dashed rgba(127, 183, 197, 0.2);
    padding-top: 10px;
    font-size: 10px;
}

.dot-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(127, 183, 197, 0.4);
}

/* =========================================================================
   Stage / main scroll content
   ========================================================================= */

.stage {
    position: relative;
    z-index: 10;
    padding: calc(56px + var(--rail-gap) * 3) 144px calc(var(--rail-gap) + 88px) 108px;
    max-width: 100vw;
    pointer-events: none;
}

.stage > * {
    pointer-events: auto;
}

.stage > section {
    margin: 0 auto 130px;
    max-width: 920px;
    position: relative;
}

.stage > section:last-of-type {
    margin-bottom: 80px;
}

/* corner brackets for act-one */
.bracket {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(127, 183, 197, 0.35);
    pointer-events: none;
}

.bracket-tl { top: -16px; left: -16px; border-right: none; border-bottom: none; }
.bracket-tr { top: -16px; right: -16px; border-left: none; border-bottom: none; }
.bracket-bl { bottom: -16px; left: -16px; border-right: none; border-top: none; }
.bracket-br { bottom: -16px; right: -16px; border-left: none; border-top: none; }

.act {
    padding: 60px 40px;
    border-radius: 32px;
    position: relative;
}

.act-one {
    padding-top: 110px;
    padding-bottom: 80px;
    text-align: left;
}

.act-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-title,
.section-title {
    font-family: 'Jost', sans-serif;
    color: var(--visor-white);
    font-weight: 300;
    letter-spacing: -0.015em;
    line-height: 0.96;
    text-transform: lowercase;
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    max-width: 16ch;
}

.section-title {
    font-size: clamp(1.9rem, 3.5vw, 3.2rem);
    margin-bottom: 36px;
}

.section-title-tight {
    margin-bottom: 22px;
}

/* letter-by-letter glyph reveal */
.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 320ms ease, transform 320ms ease;
}
.letter.in {
    opacity: 1;
    transform: translateY(0);
}
.letter.space { width: 0.32em; }

/* word underline draw-on after-complete */
.word-wrap {
    display: inline-block;
    position: relative;
    margin-right: 0.32em;
}
.word-wrap::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: -4px;
    height: 1px;
    background: var(--ley-cyan);
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 340ms ease;
    opacity: 0.6;
}
.word-wrap.drew::after {
    transform: scaleX(1);
}

.hero-sub {
    color: var(--mist);
    font-size: clamp(0.95rem, 1.05vw, 1.05rem);
    line-height: 1.65;
    max-width: 56ch;
    margin-bottom: 50px;
}

.hero-readout {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    padding: 18px 24px;
    border-radius: 20px;
    background: rgba(14, 20, 24, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -1px 0 rgba(6, 9, 11, 0.5),
        0 0 0 1px rgba(127, 183, 197, 0.10);
    width: fit-content;
}

.readout-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 1px dashed rgba(127, 183, 197, 0.15);
    padding-right: 28px;
}
.readout-block:last-child { border-right: none; padding-right: 0; }

.readout-block .tel-num {
    font-size: 22px;
    color: var(--ley-cyan);
}
.readout-depth { color: var(--brass) !important; }

/* horizon */
.horizon {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 60px auto !important;
    max-width: 920px;
}

.horizon-rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(127, 183, 197, 0.4), transparent);
}

.horizon-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(14, 20, 24, 0.55);
    border: 1px solid rgba(127, 183, 197, 0.18);
}

/* =========================================================================
   Fiber capsule grid
   ========================================================================= */

.fiber-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
    gap: 22px;
}

.fiber-cap {
    position: relative;
    border-radius: var(--cap-radius);
    padding: 22px 22px 20px;
    min-height: 224px;
    overflow: hidden;
    isolation: isolate;
    cursor: none;
    transition: transform 320ms var(--spring), box-shadow 280ms ease, filter 320ms ease;
}

/* tone variants */
.fiber-cap[style*="cyan"]  { --cap-base: #2D4A55; }
.fiber-cap[style*="teal"]  { --cap-base: #2A4148; }
.fiber-cap[style*="brass"] { --cap-base: #3D3A2C; }
.fiber-cap[style*="coral"] { --cap-base: #4A2E2A; }

.fiber-cap > .cap-skin::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 25%),
                                rgba(255, 255, 255, 0.18) 0%,
                                transparent 50%);
    pointer-events: none;
}

.fiber-cap > * {
    position: relative;
    z-index: 2;
}
.fiber-cap > .cap-skin,
.fiber-cap > .cap-noise { z-index: 0; }
.fiber-cap > .cap-noise { z-index: 1; }

.fiber-cap:hover {
    transform: scale(1.04) translateY(-2px);
    filter: brightness(1.06);
}

.fiber-cap:active {
    transform: scale(0.98);
    transition-duration: 90ms;
}

.cap-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cap-state {
    font-family: 'Major Mono Display', monospace;
    font-size: 9.5px;
    letter-spacing: 0.16em;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(14, 20, 24, 0.4);
}

.state-on   { color: var(--ley-cyan); border: 1px solid rgba(127, 183, 197, 0.35); }
.state-warn { color: var(--coral-warning); border: 1px solid rgba(217, 136, 115, 0.35); }
.state-seal { color: var(--brass); border: 1px solid rgba(226, 197, 138, 0.35); }

.cap-sigil {
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
    display: grid;
    place-items: center;
    filter: drop-shadow(0 4px 8px rgba(6, 9, 11, 0.4));
}

.cap-name {
    font-family: 'Jost', sans-serif;
    color: var(--visor-white);
    font-weight: 400;
    font-size: 19px;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-bottom: 6px;
    text-transform: lowercase;
}

.cap-meta {
    color: var(--mist);
    font-size: 12.5px;
    line-height: 1.45;
    margin-bottom: 16px;
    opacity: 0.9;
}

.cap-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px dashed rgba(127, 183, 197, 0.18);
}

.cap-foot .tel-num { font-size: 11px; }

/* reveal stagger */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.86);
    filter: blur(6px);
    transition:
        opacity 720ms ease,
        transform 720ms var(--spring),
        filter 720ms ease;
}
.reveal.in {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* =========================================================================
   Protocol act-three
   ========================================================================= */

.protocol-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.protocol-cap {
    position: relative;
    border-radius: var(--cap-radius);
    padding: 28px 26px 26px;
    min-height: 240px;
    overflow: hidden;
    isolation: isolate;
    --cap-base: #25323A;
}

.protocol-cap > * {
    position: relative;
    z-index: 2;
}
.protocol-cap > .cap-skin { z-index: 0; }
.protocol-cap > .cap-noise { z-index: 1; }

.proto-num {
    color: var(--brass);
    font-size: 22px;
    margin-bottom: 16px;
    display: inline-block;
}

.proto-name {
    font-family: 'Jost', sans-serif;
    color: var(--visor-white);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.012em;
    text-transform: lowercase;
    margin-bottom: 14px;
}

.proto-body {
    color: var(--mist);
    font-size: 13.5px;
    line-height: 1.55;
}

.proto-rule {
    margin-top: 20px;
    height: 1px;
    background: linear-gradient(90deg, rgba(127, 183, 197, 0.4), transparent);
}

/* =========================================================================
   Act 4 - CTA Open Helmet
   ========================================================================= */

.act-four {
    text-align: center;
    padding-top: 80px;
    padding-bottom: 100px;
}

.act-four .act-tag {
    justify-content: center;
}

.act-four .section-title {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 16ch;
}

.cta-sub {
    color: var(--mist);
    font-size: clamp(0.95rem, 1.05vw, 1.05rem);
    max-width: 50ch;
    margin: 0 auto 56px;
    line-height: 1.65;
}

.cta-disc-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 40px;
    display: grid;
    place-items: center;
}

.cta-orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
    animation: spin-slow 28s linear infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.cta-disc {
    position: relative;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    border: none;
    cursor: none;
    overflow: hidden;
    isolation: isolate;
    --cap-base: #E2C58A;
    transition: transform 320ms var(--spring), filter 320ms ease;
    color: var(--hull-ink);
    font-family: 'Jost', sans-serif;
    background: transparent;
}

.cta-disc > * {
    position: relative;
    z-index: 2;
}
.cta-disc > .disc-skin { z-index: 0; }
.cta-disc > .disc-noise { z-index: 1; }

.disc-label {
    display: block;
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--hull-ink);
    margin-bottom: 4px;
    margin-top: 10px;
}

.disc-arrow {
    display: grid;
    place-items: center;
    margin: 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(27, 35, 41, 0.12);
}

.cta-disc:hover {
    transform: scale(1.06);
    filter: brightness(1.05);
}
.cta-disc:active {
    transform: scale(0.97);
    transition-duration: 90ms;
}

.cta-foot {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(14, 20, 24, 0.55);
    border: 1px solid rgba(127, 183, 197, 0.18);
}

/* =========================================================================
   Bottom corner cluster
   ========================================================================= */

.rail-bottom-cluster {
    bottom: var(--rail-gap);
    right: var(--rail-gap);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(165deg, #232E35 0%, color-mix(in srgb, #232E35 80%, white 14%) 100%);
    box-shadow:
        var(--inset-hi),
        inset 0 -1px 0 rgba(6, 9, 11, 0.4),
        var(--outer-drop),
        0 0 0 1px rgba(127, 183, 197, 0.08);
}

.disc-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform 320ms var(--spring), filter 320ms ease;
    background: transparent;
}

.disc-btn > * {
    position: relative;
    z-index: 2;
}
.disc-btn > .disc-skin { z-index: 0; }
.disc-btn > .disc-noise { z-index: 1; }

.disc-spawn { --cap-base: #E2C58A; }
.disc-mic   { --cap-base: #3C6E78; }

.disc-btn:hover {
    transform: scale(1.08);
    filter: brightness(1.06);
}
.disc-btn:active {
    transform: scale(0.95);
    transition-duration: 90ms;
}

.disc-glyph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.depth-readout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 0 6px;
    line-height: 1;
}

.depth-readout .tel-label {
    font-size: 8.5px;
    margin-bottom: 2px;
}
.depth-readout .tel-num {
    color: var(--brass);
    font-size: 13px;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 1080px) {
    .rail-oracle {
        display: none;
    }
    .stage {
        padding-right: 36px;
    }
}

@media (max-width: 760px) {
    .rail-top {
        height: auto;
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .rail-center { display: none; }
    .rail-left-flank {
        flex-direction: row;
        top: auto;
        bottom: calc(var(--rail-gap) + 76px);
        left: var(--rail-gap);
        right: var(--rail-gap);
        width: auto;
        justify-content: space-between;
    }
    .nav-pill {
        flex: 1;
    }
    .stage {
        padding: 110px 16px 200px;
    }
    .hero-title {
        font-size: 2.4rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .rail-bottom-cluster {
        bottom: var(--rail-gap);
        right: 50%;
        transform: translateX(50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .caustics { animation: none; }
}
