/* ═══════════════════════════════════════════════
   JARVIS — Spline Orb Website
   ═══════════════════════════════════════════════ */

:root {
    --void: #04070D;
    --surface: #0A0F1A;
    --surface-2: #111827;
    --surface-3: #1A2235;
    --cyan: #38BDF8;
    --cyan-bright: #7DD3FC;
    --arc: #22D3EE;
    --arc-bright: #67E8F9;
    --mint: #34D399;
    --glow-sm: 0 0 15px rgba(56,189,248,0.3);
    --glow-md: 0 0 40px rgba(56,189,248,0.2);
    --glow-lg: 0 0 80px rgba(56,189,248,0.15);
    --text: #F1F5F9;
    --text-2: #CBD5E1;
    --text-3: #64748B;
    --text-4: #334155;
    --font: 'Outfit', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--void);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

::selection {
    background: rgba(56,189,248,0.3);
    color: #fff;
}

/* ── Film grain overlay ── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 10000;
}


/* ═══════════════════════════════════════════════
   SPLINE ORB — Fixed full-viewport background
   ═══════════════════════════════════════════════ */

#spline-orb {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    border: none;
}

/* Dark veil over Spline — hides the scene's built-in text
   while letting the bright orb glow through */
#spline-veil {
    position: fixed;
    inset: 0;
    z-index: 2;
    background: rgba(4, 7, 13, 0.75);
    pointer-events: none;
}


/* ═══════════════════════════════════════════════
   SECTIONS — Content overlaying the orb
   ═══════════════════════════════════════════════ */

.section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    pointer-events: none;
}

/* Hero is transparent so the orb shows through */
.section--hero {
    background: transparent;
}

/* All other sections get a solid dark background to mask Spline page content */
.section--capabilities,
.section--terminal,
.section--stats,
.section--cta {
    background: var(--void);
}

.section * {
    pointer-events: none;
}

.section a,
.section button,
.section .btn-primary,
.section .btn-ghost {
    pointer-events: auto;
}


/* ═══════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════ */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    background: rgba(4,7,13,0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(56,189,248,0.06);
    pointer-events: auto;
    transition: background 0.3s, border-color 0.3s;
}

.nav-inner {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-3);
    font-family: var(--mono);
    font-size: .8rem;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.nav-reactor {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--arc);
    box-shadow: 0 0 6px var(--arc), 0 0 15px rgba(34,211,238,0.4);
    animation: reactor-pulse 3s ease-in-out infinite;
}

@keyframes reactor-pulse {
    0%, 100% { box-shadow: 0 0 6px var(--arc), 0 0 15px rgba(34,211,238,0.4); }
    50% { box-shadow: 0 0 10px var(--arc), 0 0 25px rgba(34,211,238,0.6); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-3);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 400;
    padding: .45rem 1rem;
    border-radius: 8px;
    transition: all .25s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--cyan);
    background: rgba(56,189,248,0.06);
}


/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */

.section--hero {
    padding-bottom: 4rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 640px;
}

.boot-text {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--text-4);
    letter-spacing: .1em;
    margin-bottom: 2rem;
}

.boot-text .online {
    color: var(--mint);
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.04em;
    margin-bottom: 1.5rem;
}

.glow {
    background: linear-gradient(135deg, var(--arc-bright) 0%, var(--cyan) 40%, var(--cyan-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(56,189,248,0.3));
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    font-weight: 300;
    color: var(--text-2);
    max-width: 520px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}


/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--cyan);
    color: var(--void);
    font-weight: 600;
    font-size: .95rem;
    padding: .85rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all .3s;
    box-shadow: 0 0 30px rgba(56,189,248,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(56,189,248,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: transparent;
    color: var(--text-2);
    font-weight: 400;
    font-size: .95rem;
    padding: .85rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid rgba(56,189,248,0.15);
    transition: all .3s;
}

.btn-ghost:hover {
    border-color: rgba(56,189,248,0.4);
    background: rgba(56,189,248,0.05);
    color: var(--cyan);
}


/* ═══════════════════════════════════════════════
   SCROLL INDICATOR
   ═══════════════════════════════════════════════ */

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--cyan);
    border-bottom: 2px solid var(--cyan);
    transform: rotate(45deg);
    animation: scroll-bounce 2s ease-in-out infinite;
    opacity: 0.5;
}

.scroll-label {
    font-family: var(--mono);
    font-size: .65rem;
    color: var(--text-4);
    letter-spacing: .1em;
    text-transform: uppercase;
}

@keyframes scroll-bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(6px); }
}


/* ═══════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════ */

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.eyebrow {
    display: block;
    font-family: var(--mono);
    font-size: .7rem;
    font-weight: 400;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 1rem;
    opacity: .7;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.2;
}


/* ═══════════════════════════════════════════════
   CAPABILITIES — Holographic cards
   ═══════════════════════════════════════════════ */

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    width: 100%;
}

.holo-panel {
    position: relative;
    padding: 1.5rem;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56,189,248,0.12);
    border-radius: 12px;
    transition: box-shadow 0.5s ease;
}

.holo-panel.visible {
    box-shadow: 0 0 30px rgba(56,189,248,0.08), inset 0 0 30px rgba(56,189,248,0.03);
}

/* Corner brackets */
.holo-bracket {
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--cyan);
    border-style: solid;
    opacity: 0.4;
}

.holo-bracket.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.holo-bracket.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.holo-bracket.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.holo-bracket.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }

.holo-icon {
    font-size: 1.5rem;
    margin-bottom: .75rem;
}

.holo-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .5rem;
    color: var(--text);
}

.holo-desc {
    font-size: .82rem;
    font-weight: 300;
    color: var(--text-3);
    line-height: 1.7;
}

/* Scan line animation */
.holo-panel.visible::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    animation: scan-line 3s linear infinite;
    opacity: 0.3;
}

@keyframes scan-line {
    0% { top: 0; opacity: 0.3; }
    50% { opacity: 0.5; }
    100% { top: 100%; opacity: 0.3; }
}


/* ═══════════════════════════════════════════════
   TERMINAL
   ═══════════════════════════════════════════════ */

.terminal-panel {
    width: clamp(320px, 50vw, 600px);
    background: var(--surface);
    border: 1px solid rgba(56,189,248,0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 120px rgba(56,189,248,0.1), 0 20px 60px rgba(0,0,0,0.4);
}

.terminal-chrome {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 16px 20px;
    background: var(--surface-2);
    border-bottom: 1px solid rgba(56,189,248,0.06);
}

.term-dots {
    display: flex;
    gap: 7px;
}

.term-dots .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot.r { background: #FF5F57; }
.dot.y { background: #FEBC2E; }
.dot.g { background: #28C840; }

.term-label {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--text-4);
    margin-left: 10px;
}

.terminal-body {
    padding: 2rem 2.2rem;
    font-family: var(--mono);
    font-size: .82rem;
    line-height: 2.4;
}

.term-line {
    display: flex;
    gap: .8rem;
}

.term-line.total {
    margin-top: .5rem;
}

.t-prompt { color: var(--cyan); flex-shrink: 0; }
.t-cmd { color: var(--text); }
.t-comment { color: var(--text-4); }
.t-label { color: var(--text-3); }
.t-dots { color: var(--text-4); }
.t-val { color: var(--mint); }
.t-total { color: var(--mint); font-weight: 500; }


/* ═══════════════════════════════════════════════
   STATS — HUD counters
   ═══════════════════════════════════════════════ */

.stats-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hud-stat {
    text-align: center;
    padding: 1.5rem 2rem;
    background: rgba(10, 15, 26, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(56,189,248,0.1);
    border-radius: 12px;
    min-width: 160px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease;
}

.hud-stat.visible {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 0 20px rgba(56,189,248,0.08);
}

.hud-value {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -.03em;
    background: linear-gradient(135deg, var(--arc-bright), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hud-label {
    font-size: .78rem;
    color: var(--text-4);
    margin-top: .3rem;
}


/* ═══════════════════════════════════════════════
   CTA
   ═══════════════════════════════════════════════ */

.section--cta {
    padding-bottom: 8rem;
}

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cta-heading {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.cta-sub {
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--text-3);
    max-width: 460px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}


/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */

footer {
    position: relative;
    z-index: 10;
    padding: 1.5rem clamp(1.5rem, 4vw, 3rem);
    border-top: 1px solid rgba(56,189,248,0.06);
    background: rgba(4,7,13,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-family: var(--mono);
    font-size: .75rem;
    color: var(--text-4);
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    font-size: .82rem;
    color: var(--text-4);
    text-decoration: none;
    transition: color .2s;
    pointer-events: auto;
}

.footer-nav a:hover {
    color: var(--cyan);
}


/* ═══════════════════════════════════════════════
   RESPONSIVE — Tablet (1024px)
   ═══════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .holo-panel {
        padding: 1.2rem;
    }
}


/* ═══════════════════════════════════════════════
   RESPONSIVE — Mobile (768px)
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* ── Nav: Ghost mode ── */
    nav {
        height: 44px;
        background: transparent !important;
        border-bottom-color: transparent !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-brand {
        font-size: 0.6rem;
        opacity: 0.25;
        letter-spacing: 0.18em;
    }

    .nav-links { display: none; }

    /* ── Sections ── */
    .section {
        padding: 4rem 1.5rem;
    }

    /* ── Hero: Bottom-sheet gradient ── */
    .section--hero {
        justify-content: flex-end;
        padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(
            to top,
            rgba(4,7,13,0.94) 0%,
            rgba(4,7,13,0.75) 35%,
            rgba(4,7,13,0.15) 60%,
            transparent 100%
        );
    }

    .hero-content {
        align-items: flex-start;
        text-align: left;
    }

    .hero-headline {
        font-size: clamp(2.8rem, 10vw, 4rem);
        margin-bottom: 0.4rem;
        letter-spacing: -0.03em;
    }

    .hero-subtitle {
        font-size: 0.82rem;
        max-width: 100%;
        line-height: 1.55;
        color: var(--text-3);
        margin-bottom: 1.4rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }

    .btn-primary, .btn-ghost {
        width: 100%;
        justify-content: center;
        padding: 0.82rem 1.5rem;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .boot-text {
        font-size: 0.52rem;
        letter-spacing: 0.2em;
        text-shadow: 0 0 24px rgba(56,189,248,0.12);
    }

    /* ── Scroll indicator ── */
    .scroll-indicator {
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    .scroll-arrow { width: 16px; height: 16px; opacity: 0.35; }
    .scroll-label { font-size: 0.5rem; letter-spacing: 0.15em; }

    /* ── Capabilities: Single column ── */

    .capabilities-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 400px;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-heading {
        font-size: clamp(1.3rem, 5vw, 1.7rem);
        line-height: 1.3;
    }

    .eyebrow {
        font-size: 0.52rem;
        margin-bottom: 0.4rem;
        letter-spacing: 0.25em;
    }

    .holo-panel {
        padding: 20px 22px;
        background: rgba(4, 7, 13, 0.82);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(56,189,248,0.06);
        border-radius: 14px;
    }

    .holo-panel.visible {
        box-shadow:
            0 0 60px rgba(56,189,248,0.04),
            0 -1px 0 rgba(56,189,248,0.08),
            inset 0 1px 0 rgba(255,255,255,0.02);
    }

    .holo-bracket { opacity: 0.2; }
    .holo-icon { font-size: 1.6rem; margin-bottom: 0.5rem; }

    .holo-title {
        font-size: 0.92rem;
        margin-bottom: 0.3rem;
        color: var(--cyan-bright);
        letter-spacing: 0.01em;
    }

    .holo-desc {
        font-size: 0.76rem;
        line-height: 1.6;
        color: var(--text-2);
    }

    /* ── Terminal ── */

    .terminal-panel {
        width: calc(100vw - 32px);
        max-width: 400px;
        border-radius: 14px;
        background: rgba(4, 7, 13, 0.88);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-color: rgba(56,189,248,0.05);
        box-shadow:
            0 -4px 60px rgba(0,0,0,0.5),
            0 0 80px rgba(56,189,248,0.04);
    }

    .terminal-chrome { padding: 10px 14px; gap: 5px; }
    .term-dots .dot { width: 8px; height: 8px; }
    .term-label { font-size: 0.55rem; letter-spacing: 0.08em; }

    .terminal-body {
        padding: 0.8rem 1rem;
        font-size: 0.6rem;
        line-height: 2.0;
    }

    .term-line { gap: 0.3rem; }

    /* ── Stats ── */

    .stats-grid {
        gap: 1rem;
    }

    .hud-stat {
        min-width: 100px;
        padding: 10px 14px;
        border-radius: 8px;
        background: rgba(4, 7, 13, 0.7);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(56,189,248,0.06);
    }

    .hud-stat.visible {
        box-shadow:
            0 0 24px rgba(56,189,248,0.05),
            inset 0 0 16px rgba(56,189,248,0.02);
    }

    .hud-value { font-size: 1.5rem; }
    .hud-label {
        font-size: 0.58rem;
        letter-spacing: 0.06em;
    }

    /* ── CTA: Bottom-sheet gradient ── */
    .section--cta {
        justify-content: flex-end;
        padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(
            to top,
            rgba(4,7,13,0.94) 0%,
            rgba(4,7,13,0.55) 45%,
            transparent 100%
        );
    }

    .cta-content {
        align-items: flex-start;
        text-align: left;
    }

    .cta-heading {
        font-size: clamp(2.2rem, 9vw, 3rem);
        margin-bottom: 0.5rem;
    }

    .cta-sub {
        font-size: 0.82rem;
        max-width: 100%;
        line-height: 1.55;
        color: var(--text-3);
        margin-bottom: 1.4rem;
    }

    /* ── Footer ── */
    footer {
        padding: 0.6rem 1rem;
        padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
        background: rgba(4,7,13,0.95);
    }

    .footer-inner {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
    }

    .footer-nav {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-nav a { font-size: 0.65rem; }
    .footer-copy { font-size: 0.58rem; }
}


/* ═══════════════════════════════════════════════
   RESPONSIVE — Small phone (480px)
   ═══════════════════════════════════════════════ */

@media (max-width: 480px) {
    .section {
        padding: 3rem 1rem;
    }

    .hero-headline {
        font-size: clamp(2.2rem, 12vw, 3rem);
    }

    .stats-grid {
        flex-direction: column;
        align-items: center;
    }

    .hud-stat {
        width: 100%;
        max-width: 200px;
    }

    .terminal-panel {
        width: calc(100vw - 24px);
    }
}


/* ═══════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════ */

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