/* ============================================================
   introduction.css
   Merged from: index-scroll.css + top-nav-bar-intro.css
   Removed: .hero, .glyphHero, stats, books, cards, split
   layouts, #stats, #books, #waitlist, #partners, footer,
   waitlist form, old unsuffixed #model3d, hero .marquee
   ============================================================ */

/* ===================== RESET & ROOT ===================== */

:root {
    --navH: 64px;
    --bg: #000;
    --fg: #fff;
    --muted: rgba(255, 255, 255, .72);
    --faint: rgba(255, 255, 255, .10);
    --fainter: rgba(255, 255, 255, .08);
    --max: 1400px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--navH) + 18px);
    scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
    html {
        overflow-y: scroll;
    }
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===================== TOP NAVIGATION ===================== */

.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navH);
    display: flex;
    align-items: center;
    z-index: 999;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 700ms ease, transform 700ms ease;
}

.topnav.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.navInner {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    font-family: "Unbounded", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-weight: 500;
    letter-spacing: -0.02em;
    font-size: 22px;
    white-space: nowrap;
    transform: translateY(1px);
}

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

.navLinks a {
    font-family: "IBM Plex Mono", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: 13px;
    color: rgba(255, 255, 255, .78);
    padding: 9px 7px 9px 9px;
    border: 1px solid transparent;
    transform: translateY(1px);
}

.navLinks a:hover {
    color: rgba(255, 255, 255, .95);
    border-color: rgba(255, 255, 255, .18);
}

.navLinks a.is-active {
    color: rgba(255, 255, 255, .95);
    border-color: rgba(255, 255, 255, .22);
}

/* Waitlist CTA — animated rotating border */

@property --angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

.navLinks a[href="waitlist.html"] {
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    padding: 9px 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)) padding-box,
        conic-gradient(from var(--angle),
            #006655, #00c9b1, #b0fff5, #00c9b1, #006655) border-box;
    animation: rotateBorder 5s linear infinite;
}

@keyframes rotateBorder {
    to {
        --angle: 360deg;
    }
}

.navLinks a[href="waitlist.html"]:hover {
    color: #fff;
    background:
        linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)) padding-box,
        conic-gradient(from var(--angle),
            #006655, #00c9b1, #b0fff5, #00c9b1, #006655) border-box;
    box-shadow:
        0 0 12px rgba(0, 201, 177, 0.4),
        0 0 28px rgba(176, 255, 245, 0.25);
}

/* ===================== REVEAL ANIMATIONS ===================== */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 900ms ease, transform 900ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

/* Manual reveal — same motion, driven by JS step index */
.revealManual {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 300ms ease, transform 300ms ease;
}

.revealManual.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 600ms ease 320ms, transform 600ms ease 320ms;
    will-change: opacity, transform;
}

/* ===================== SCROLL SECTIONS ===================== */

.scrollSection {
    position: fixed;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s ease;
}

.scrollSection.is-active {
    opacity: 1;
    pointer-events: auto;
}

.scrollSection .model3dStage {
    height: 100vh !important;
}

.scrollSection .model3dSticky {
    position: relative !important;
    height: 100vh !important;
}

/* ===================== 3D MODEL SECTIONS ===================== */

section[id^="model3d-"] {
    background: transparent;
    padding: 0;
}

section[id^="model3d-"] .model3dStage {
    height: var(--model3dStageHeight, 200vh);
    position: relative;
}

section[id^="model3d-"] .model3dSticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

section[id^="model3d-"] .model3dViewport {
    width: 100vw;
    height: 100vh;
    background: #000;
    border: none;
    overflow: hidden;
    position: relative;
    pointer-events: auto;
}

canvas[id^="model3dCanvas-"] {
    width: 100%;
    height: 100%;
    display: block;
}

.model3dOverlay {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

/* Hide overlay when its section is active (scroll-driven transitions) */
.scrollSection.is-active .model3dOverlay,
.model3dOverlay.is-hidden {
    opacity: 0;
}

/* ===================== HINT PANEL ===================== */

#hintBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 89;
    background: transparent;
    cursor: default;
}

#hintBackdrop.active {
    display: block;
}

[id^="model3dHint-"] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.13);
    padding: 28px 40px 24px;
    opacity: 0;
    transition: opacity 350ms ease, transform 350ms ease;
    pointer-events: none;
    z-index: 90;
    min-width: 340px;
}

[id^="model3dHint-"].show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

[id^="model3dHint-"].hide {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.97);
    pointer-events: none;
}

.hintMethods {
    display: flex;
    align-items: center;
    gap: 24px;
}

.hintDivider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.13);
    flex-shrink: 0;
}

.hintMethod {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.hintIcon {
    display: block;
    opacity: 0.85;
}

.hintLabel {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

.hintTagline {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.38);
    text-align: center;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 14px;
    width: 100%;
}

.hintClose {
    position: absolute;
    top: 14px;
    left: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    transition: color 150ms ease;
}

.hintClose:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ===================== 3D STATS OVERLAY ===================== */

.model3dStatsOverlay {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    justify-content: center;
    padding: 0;
    pointer-events: none;
    font-family: "Asimovian", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-weight: 500;
}

.model3dStatsPart {
    grid-area: 1 / 1;
}

.model3dStatsBox {
    display: inline-block;
    max-width: min(900px, 86vw);
    width: auto;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 1);
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(6px);
}

.model3dStatsList {
    text-align: center;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
    letter-spacing: 0.01em;
    line-height: 1.55;
    font-size: 2rem;
}

@media (max-width: 720px) {
    .model3dStatsList {
        font-size: 1.35rem;
        gap: 10px;
    }
}

.statMobile {
    display: none;
}

.statDesktop {
    display: inline;
}

/* ===================== 3D MODEL CAPTIONS ===================== */

.model3dCaption {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 100;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
    text-align: left;
    font-weight: 500;
}

.model3dCaption.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.model3dCaption .capTitle {
    font-family: "Space Grotesk", monospace;
    font-size: 14px;
    color: rgba(255, 255, 255, 1);
    margin: 0 0 7px;
    line-height: 1;
    font-weight: 500;
}

.model3dCaption .capSubtitle {
    font-family: "Space Grotesk", monospace;
    font-size: 14px;
    color: rgb(170, 170, 170);
    margin: 0 0 5px;
    padding: 0;
    line-height: 1;
}

.model3dCaption .capMeta {
    font-family: "Space Grotesk", monospace;
    font-size: 14px;
    color: rgb(170, 170, 170);
    line-height: 1;
    margin: 0;
}

/* ===================== ABOUT SECTION ===================== */

#about {
    display: flex;
    flex-direction: column;
    border-top: none;
    overflow: hidden;
}

.aboutBg {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 0;
}

.aboutOuter {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.aboutInner {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: var(--max);
    width: 100%;
    margin: 0 auto;
    padding: 114px 28px 40px 28px;
    box-sizing: border-box;
    flex: 1;
}

.aboutText {
    font-size: clamp(13px, 1.6vw, 20px);
    line-height: 1.55;
    color: rgb(255, 255, 255);
    max-width: 820px;
    text-align: left;
}

.aboutText p {
    margin: 0 0 18px;
}

.aboutMarquee {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    overflow: hidden;
    flex-shrink: 0;
}

.track {
    display: flex;
    gap: clamp(32px, 4vw, 72px);
    padding: 20px 0;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
}

@keyframes marqueeScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.track.is-running {
    animation: marqueeScroll 40s linear infinite;
}

.track.is-paused {
    animation-play-state: paused;
}

.marqueeItem {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.marqueeItem:hover {
    opacity: 0.9;
}

/* Size is set by JS (naturalWidth/Height × SCALE) to preserve relative proportions */
.marqueeImg {
    display: block;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.marqueeSep {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    user-select: none;
}

/* ===================== PROGRESS NAV ===================== */

.progressNav {
    position: fixed;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 600ms ease;
}

.progressNav.hint-dismissed {
    opacity: 1;
    pointer-events: auto;
}

.progressGroup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.progressGroupLabel {
    font-family: "IBM Plex Mono", monospace;
    font-size: 14px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    margin-bottom: 2px;
}

.progressDot {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 29px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1;
    transition: color 0.4s ease, transform 0.3s ease;
    width: 44px;
    text-align: center;
}

.progressDot:hover {
    color: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.progressDot.is-active {
    color: rgba(255, 255, 255, 1);
}

.progressDot.is-visited {
    color: rgb(255, 255, 255);
}

/* ===================== INTRO PERLIN WIPE ===================== */

#introPerlinCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    pointer-events: none;
    will-change: opacity;
}

/* Hide UI instantly before intro fires */
body:not(.intro-ui-visible) .topnav {
    opacity: 0 !important;
    transform: translateY(-100%) !important;
    pointer-events: none !important;
    transition: opacity 0ms, transform 0ms !important;
    will-change: transform, opacity;
}

body:not(.intro-ui-visible) .progressNav {
    opacity: 0 !important;
    transform: translateY(-50%) translateX(40px) !important;
    pointer-events: none !important;
    transition: opacity 0ms, transform 0ms !important;
    will-change: transform, opacity;
}

body:not(.intro-ui-visible) [id^="model3dHint-"] {
    opacity: 0 !important;
    transform: translate(-50%, -46%) scale(0.97) !important;
    pointer-events: none !important;
    transition: opacity 0ms, transform 0ms !important;
}

body:not(.intro-ui-visible) .model3dCaption {
    transition: opacity 0ms, transform 0ms !important;
}

/* Fade/slide in on reveal */
body.intro-ui-visible .topnav {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 250ms ease, transform 250ms ease !important;
}

body.intro-ui-visible .progressNav {
    transform: translateY(-50%) translateX(0) !important;
    transition: opacity 600ms ease, transform 250ms ease !important;
}

body.intro-ui-visible .progressNav.hint-dismissed {
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (max-width: 640px) {
    body.intro-ui-visible .progressNav {
        transform: none !important;
    }

    body.intro-ui-visible.is-exiting .progressNav {
        transform: translateY(-20px) !important;
    }

    body:not(.intro-ui-visible) .progressNav {
        transform: translateY(-20px) !important;
    }
}

body.intro-ui-visible [id^="model3dHint-"] {
    transition: opacity 300ms ease, transform 300ms ease !important;
}

body.intro-ui-visible .model3dCaption {
    transition: opacity 350ms ease, transform 350ms ease !important;
}

/* ===================== EXIT SEQUENCE ===================== */

body.intro-ui-visible.is-exiting .topnav {
    opacity: 0 !important;
    transform: translateY(-100%) !important;
    transition: opacity 400ms ease 350ms, transform 400ms ease 350ms !important;
}

body.intro-ui-visible.is-exiting .progressNav {
    opacity: 0 !important;
    transform: translateY(-50%) translateX(40px) !important;
    transition: opacity 400ms ease, transform 400ms ease !important;
}

.hintMethodsMobile,
.hintTaglineMobile {
    display: none;
}

@media (max-width: 640px) {
    .hintTaglineMobile {
        font-size: 13px !important;
    }
}

/* ===================== MENU TOGGLE ===================== */

.menuToggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .28);
    color: rgba(255, 255, 255, .82);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: 7px 0 7px .3em;
    width: 60px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 200ms ease, color 200ms ease;
    flex-shrink: 0;
}

.menuToggle:hover {
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
}

/* ===================== FULL-SCREEN NAV PANEL ===================== */

.navPanel {
    position: fixed;
    inset: 0;
    z-index: 1002;
    background: rgba(3, 3, 3, .97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    transition: opacity 500ms ease;
    pointer-events: none;
}

.navPanel.is-open {
    opacity: 1;
    pointer-events: auto;
}

.navPanelClose {
    position: absolute;
    top: calc(var(--navH) / 2);
    right: 28px;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .28);
    color: rgba(255, 255, 255, .72);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: 7px 0 7px .3em;
    width: 60px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 180ms ease, color 180ms ease;
}

.navPanelClose:hover {
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
}

.navPanelLinks {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: var(--navH) 0;
    box-sizing: border-box;
}

.navPanelLinks a {
    display: inline-block;
    text-decoration: none;
    font-family: "IBM Plex Mono", monospace;
    font-size: clamp(14px, 3.8vw, 20px);
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .65);
    -webkit-tap-highlight-color: transparent;
    transition: color 160ms ease;
    padding: 6px 20px;
    cursor: pointer;
}

.navPanelLinks a:hover,
.navPanelLinks a.is-active {
    color: #fff;
}

/* ===================== RESPONSIVE ≤ 900px ===================== */

@media (max-width: 900px) {
    .navLinks {
        display: none;
    }

    .menuToggle {
        display: flex;
        margin-left: auto;
    }

    .navPanelClose {
        right: 20px;
    }

    .navInner {
        padding: 0 20px;
    }

    .progressNav {
        right: 10px;
    }
}

@media (max-width: 640px) {
    :root {
        --navH: 56px;
    }

    .brand {
        font-size: 19px;
    }

    .navInner {
        padding: 0 20px;
    }

    .navPanelClose {
        right: 20px;
    }

    .model3dCaption {
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.38);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        padding: 12px;
    }

    .model3dCaption .capTitle {
        margin: 0 0 5px;
        line-height: 1.2;
    }

    .model3dCaption .capSubtitle {
        margin: 0 0 3px;
        line-height: 1.2;
    }

    .model3dCaption .capMeta {
        line-height: 1.2;
    }

    /* ── Progress nav: horizontal strip just below nav ── */
    .progressNav {
        left: 20px;
        right: 20px;
        top: calc(var(--navH) + 8px);
        transform: none;
        flex-direction: row;
        gap: 0;
        border: 1px solid rgba(255, 255, 255, .28);
        padding: 4px 0;
        justify-content: center;
        width: auto;
        background: rgba(0, 0, 0, 0.38);
    }

    .progressGroupLabel {
        display: none;
    }

    .progressGroup {
        flex-direction: row;
        gap: 0;
    }

    .progressDot {
        font-size: 20px;
        width: 32px;
    }

    /* ── Hint panel close button: double size on mobile ── */
    .hintClose {
        font-size: 28px;
        top: 10px;
        left: 12px;
        padding: 4px 8px;
    }

    /* ── Hint panel: 15px narrower each side on mobile ── */
    [id^="model3dHint-"] {
        width: calc(100vw - 150px);
        left: 75px;
        right: 75px;
    }

    /* ── Stats overlay: shift upward so panel reads as vertically centered
          within the visible area (accounts for top nav + progress bar) ── */
    .model3dStatsOverlay {
        justify-content: center;
        align-items: center;
        padding: 0 0 120px 0;
    }

    /* ── Stats box: 20px narrower on each side ── */
    .model3dStatsBox {
        width: calc(100vw - 80px);
        max-width: none;
        padding: 18px 20px;
        border: 1px solid rgba(255, 255, 255, .28);
        background: rgba(0, 0, 0, 0.38);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        margin: 0 40px;
        box-sizing: border-box;
    }

    .model3dStatsList {
        text-align: center;
        font-family: "Space Grotesk", sans-serif;
        font-size: 1.15rem;
        gap: 10px;
        letter-spacing: 0;
    }

    .statBr br {
        display: none;
    }

    .statDesktop {
        display: none;
    }

    .statMobile {
        display: inline;
    }

    /* ── About section ── */
    .aboutMarquee {
        display: none;
    }

    .aboutText {
        font-size: 15px;
        line-height: 1.6;
    }

    .aboutInner {
        padding: calc(var(--navH) + 54px) 24px 24px;
        align-items: flex-start;
    }

    /* Hint panel: 60px gaps on mobile — narrower, text stays single-line */
    [id^="model3dHint-"] {
        width: calc(100vw - 120px);
        min-width: unset;
        left: 60px;
        right: 60px;
        transform: translateY(-50%);
    }

    [id^="model3dHint-"].show {
        transform: translateY(-50%);
    }

    [id^="model3dHint-"].hide {
        transform: translateY(-50%);
    }

    .hintTaglineMobile {
        white-space: nowrap;
    }

    /* Show progress nav from the start on mobile */
    .progressNav.hint-dismissed,
    .progressNav {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .hintMethodsDesktop,
    .hintTaglineDesktop {
        display: none;
    }

    .hintMethodsMobile,
    .hintTaglineMobile {
        display: flex;
    }

    .hintTaglineMobile {
        display: block;
    }
}