/* ============================================================
   Exavitech — design system
   Palette: void navy-black, brand red #E63946, brand cream #F1FAEE
   Type: Space Grotesk (display/body) + IBM Plex Mono (system voice)
   ============================================================ */

@font-face {
    font-family: 'Space Grotesk';
    src: url('/assets/fonts/SpaceGrotesk-var.woff2') format('woff2');
    font-weight: 300 700;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Mono';
    src: url('/assets/fonts/IBMPlexMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Mono';
    src: url('/assets/fonts/IBMPlexMono-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

:root {
    --ink-0: #06070B;
    --ink-1: #0B0E16;
    --ink-2: #121724;
    --panel: rgba(19, 24, 38, 0.55);
    --panel-solid: #10141F;
    --red: #E63946;
    --red-hot: #FF5A66;
    --red-dim: rgba(230, 57, 70, 0.14);
    --cream: #F1FAEE;
    --steel: #93A0B8;
    --steel-dim: #5D6980;
    --line: rgba(147, 160, 184, 0.14);
    --line-strong: rgba(147, 160, 184, 0.28);

    --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

    --container: 1200px;
    --radius: 14px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; }

html { background: var(--ink-0); }

body {
    background: transparent; /* ambient starfield canvas sits between html bg and content */
    color: var(--cream);
    font-family: var(--font-display);
    font-weight: 380;
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: var(--red); color: var(--cream); }

h1, h2, h3 { font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }

h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }

p { color: var(--steel); }

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

img { max-width: 100%; display: block; }

.mono { font-family: var(--font-mono); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--red); color: var(--cream);
    padding: 10px 18px; font-family: var(--font-mono);
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible {
    outline: 2px solid var(--red-hot);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---------- cursor glow ---------- */

.cursor-glow {
    position: fixed; z-index: 0; pointer-events: none;
    width: 560px; height: 560px; border-radius: 50%;
    left: 0; top: 0; transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(230, 57, 70, 0.07) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.6s ease;
}
body.has-pointer .cursor-glow { opacity: 1; }

/* ---------- nav ---------- */

.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    border-bottom: 1px solid transparent;
    transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}
.site-nav.scrolled {
    background: rgba(6, 7, 11, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}
.nav-inner {
    max-width: var(--container); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; gap: 36px;
    height: 76px;
    transition: height 0.35s ease;
}
.site-nav.scrolled .nav-inner { height: 60px; }

.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.15rem; letter-spacing: 0.01em; }

.brand-logo {
    width: 28px; height: 28px; flex: none;
    filter: drop-shadow(0 0 10px rgba(230, 57, 70, 0.45));
}

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
    font-size: 0.92rem; color: var(--steel);
    transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--cream); }

.nav-toggle { display: none; }

/* mobile menu */
.mobile-menu {
    position: fixed; inset: 0; z-index: 99;
    background: rgba(6, 7, 11, 0.96);
    backdrop-filter: blur(10px);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
    font-size: 1.4rem;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
    padding: 12px 26px; border-radius: 999px; border: 1px solid transparent;
    cursor: pointer; white-space: nowrap;
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease,
                background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    will-change: transform;
}
.btn-lg { padding: 15px 34px; font-size: 1.02rem; }

.btn-solid {
    background: var(--red); color: var(--cream);
    box-shadow: 0 0 0 rgba(230, 57, 70, 0);
}
.btn-solid:hover {
    background: var(--red-hot);
    box-shadow: 0 6px 32px rgba(230, 57, 70, 0.45);
    transform: translateY(-2px);
}

.btn-ghost {
    border-color: var(--line-strong); color: var(--cream);
    background: rgba(19, 24, 38, 0.3);
}
.btn-ghost:hover {
    border-color: var(--red); color: var(--red-hot);
    box-shadow: inset 0 0 24px rgba(230, 57, 70, 0.08);
    transform: translateY(-2px);
}

/* ---------- hero ---------- */

.hero {
    position: relative; min-height: 100svh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    padding: 120px 24px 140px;
    touch-action: pan-y; /* vertical swipes scroll; horizontal drags spin the sphere */
}
.hero.dragging { user-select: none; }

#plexus { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-vignette {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 50% 45%, transparent 30%, var(--ink-0) 100%),
        linear-gradient(to bottom, rgba(6,7,11,0.5), transparent 30%, transparent 70%, var(--ink-0));
}

.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; }

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 0.8rem; letter-spacing: 0.06em; color: var(--steel);
    border: 1px solid var(--line); border-radius: 999px;
    padding: 8px 18px; margin-bottom: 36px;
    background: rgba(11, 14, 22, 0.5);
    backdrop-filter: blur(6px);
}

.status-dot {
    width: 7px; height: 7px; border-radius: 50%; flex: none;
    background: var(--red);
    box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.6);
    animation: pulse 2.4s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(230, 57, 70, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

.hero-title {
    font-size: clamp(3rem, 9.5vw, 7.2rem);
    font-weight: 640;
    letter-spacing: -0.035em;
    margin-bottom: 28px;
}
.scramble-line { display: block; min-height: 1.08em; }
.scramble-line .ch {
    display: inline-block;
    transition: transform 0.45s var(--ease-out);
    will-change: transform;
}
.scramble-line.accent {
    color: var(--red);
    text-shadow: 0 0 42px rgba(230, 57, 70, 0.45);
}

.hero-sub {
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    max-width: 640px; margin: 0 auto 44px;
    color: var(--steel);
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-foot {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: 12px 0;
    padding: 18px 24px;
    border-top: 1px solid var(--line);
    background: rgba(6, 7, 11, 0.55);
    backdrop-filter: blur(8px);
    font-size: 0.78rem; letter-spacing: 0.05em; color: var(--steel-dim);
}
.hero-foot-item { padding: 0 22px; }
.hero-foot-item + .hero-foot-item { border-left: 1px solid var(--line); }

.scroll-cue {
    position: absolute; bottom: 76px; left: 50%; transform: translateX(-50%);
    z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--steel-dim);
}
.scroll-cue-line {
    width: 1px; height: 34px;
    background: linear-gradient(to bottom, var(--red), transparent);
    animation: cueDrop 2s var(--ease-out) infinite;
    transform-origin: top;
}
@keyframes cueDrop {
    0% { transform: scaleY(0); opacity: 0; }
    35% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1) translateY(10px); opacity: 0; }
}

/* ---------- sections ---------- */

.section { padding: 130px 0; position: relative; }
.section-alt {
    background: linear-gradient(180deg, transparent, rgba(16, 20, 31, 0.55) 18%, rgba(16, 20, 31, 0.55) 82%, transparent);
}

.section-head { max-width: 680px; margin-bottom: 72px; }

.section-label {
    color: var(--red); font-size: 0.82rem; font-weight: 500;
    letter-spacing: 0.08em; margin-bottom: 18px;
}

.section-intro { margin-top: 20px; font-size: 1.1rem; }

/* ---------- capability cards ---------- */

.card-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}

.card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px 30px 30px;
    backdrop-filter: blur(8px);
    transition: border-color 0.35s ease, transform 0.35s var(--ease-out), box-shadow 0.35s ease;
    transform-style: preserve-3d;
}
.card:hover {
    border-color: rgba(230, 57, 70, 0.55);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 34px rgba(230, 57, 70, 0.10);
}

.card-icon {
    width: 46px; height: 46px; margin-bottom: 22px;
    display: grid; place-items: center;
    color: var(--red-hot);
    background: var(--red-dim);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 11px;
}
.card-icon svg { width: 23px; height: 23px; }

.card h3 { font-size: 1.22rem; margin-bottom: 12px; }
.card p { font-size: 0.95rem; margin-bottom: 20px; }

.card ul { list-style: none; font-size: 0.78rem; color: var(--steel-dim); letter-spacing: 0.03em; }
.card ul li { padding: 7px 0; border-top: 1px solid var(--line); }
.card ul li::before { content: '+ '; color: var(--red); }

/* ---------- about ---------- */

.about-grid {
    display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: start;
}
.about-copy h2 { margin-bottom: 26px; }
.about-copy p { margin-bottom: 20px; max-width: 480px; }
.about-copy .btn { margin-top: 14px; }

.about-pillars { display: flex; flex-direction: column; gap: 34px; padding-top: 54px; }
.pillar { border-left: 2px solid var(--red); padding-left: 24px; }
.pillar h3 {
    font-size: 0.85rem; font-weight: 500; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--cream); margin-bottom: 8px;
}
.pillar p { font-size: 0.95rem; }

/* ---------- process ---------- */

.process-track {
    list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
    position: relative; counter-reset: step;
}
.process-track::before {
    content: ''; position: absolute; top: 21px; left: 3%; right: 3%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
}
.process-step { position: relative; padding-top: 58px; }
.process-step::before {
    content: ''; position: absolute; top: 16px; left: 0;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--ink-0); border: 2px solid var(--red);
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.55);
}
.step-num {
    position: absolute; top: 0; right: 0;
    font-size: 2.4rem; font-weight: 500; line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--steel-dim);
    opacity: 0.5;
}
.process-step h3 { font-size: 1.08rem; margin-bottom: 10px; }
.process-step p { font-size: 0.9rem; }

/* ---------- stats ---------- */

.stats-band {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(230, 57, 70, 0.06), transparent 30%, transparent 70%, rgba(230, 57, 70, 0.06)),
        var(--ink-1);
    padding: 64px 0;
    margin: 40px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-value {
    display: block; font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 500;
    color: var(--cream); line-height: 1.1; margin-bottom: 8px;
}
.stat-value span { color: var(--red-hot); }
.stat-label { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel-dim); }

/* ---------- marquee ---------- */

.marquee { overflow: hidden; padding: 34px 0; border-bottom: 1px solid var(--line); }
.marquee-track {
    display: flex; gap: 0; width: max-content;
    animation: marquee 36s linear infinite;
    font-size: 0.85rem; letter-spacing: 0.1em; color: var(--steel-dim);
}
.marquee-track span { padding: 0 28px; position: relative; white-space: nowrap; }
.marquee-track span::after {
    content: '·'; position: absolute; right: -4px; color: var(--red);
}
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 80px; align-items: start; }
.contact-copy h2 { margin-bottom: 24px; }
.contact-copy p { max-width: 420px; margin-bottom: 34px; }

.contact-email {
    display: inline-block; font-size: 1.02rem; color: var(--red-hot);
    border-bottom: 1px solid rgba(230, 57, 70, 0.4);
    padding-bottom: 3px;
    transition: border-color 0.2s ease;
}
.contact-email:hover { border-color: var(--red-hot); }

.contact-form {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px;
    backdrop-filter: blur(8px);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label {
    display: block; font-size: 0.82rem; font-weight: 500;
    letter-spacing: 0.04em; margin-bottom: 8px; color: var(--steel);
}
.form-field .optional { font-size: 0.7rem; color: var(--steel-dim); margin-left: 6px; }

.form-field input,
.form-field textarea {
    width: 100%;
    background: rgba(6, 7, 11, 0.6);
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    color: var(--cream);
    font-family: var(--font-display);
    font-size: 0.98rem;
    padding: 13px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.hp-wrap { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.form-status { margin-top: 16px; font-size: 0.85rem; min-height: 1.4em; }
.form-status.ok { color: #7fd88f; }
.form-status.err { color: var(--red-hot); }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 48px; background: var(--ink-1); }
.footer-inner {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 40px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; flex-wrap: wrap; }
.footer-tag { width: 100%; font-size: 0.75rem; color: var(--steel-dim); letter-spacing: 0.08em; margin-top: 6px; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { font-size: 0.9rem; color: var(--steel); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--cream); }
.footer-copy { font-size: 0.75rem; color: var(--steel-dim); letter-spacing: 0.05em; }

/* ---------- reveal animations ---------- */

.reveal {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(5px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* once revealed, cards return to fast transforms so tilt feels crisp */
.card.reveal.in {
    transition: border-color 0.35s ease, transform 0.18s ease-out, box-shadow 0.35s ease;
}

.card-grid .card:nth-child(2), .process-step:nth-child(2), .stat:nth-child(2) { transition-delay: 0.08s; }
.card-grid .card:nth-child(3), .process-step:nth-child(3), .stat:nth-child(3) { transition-delay: 0.16s; }
.card-grid .card:nth-child(4), .process-step:nth-child(4), .stat:nth-child(4) { transition-delay: 0.24s; }
.card-grid .card:nth-child(5), .process-step:nth-child(5) { transition-delay: 0.32s; }
.card-grid .card:nth-child(6) { transition-delay: 0.4s; }
.about-pillars .pillar:nth-child(2) { transition-delay: 0.1s; }
.about-pillars .pillar:nth-child(3) { transition-delay: 0.2s; }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .process-track { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
    .process-track::before { display: none; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 56px; }
    .about-pillars { padding-top: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .nav-toggle {
        display: flex; flex-direction: column; gap: 6px; margin-left: auto;
        background: none; border: none; cursor: pointer; padding: 10px;
    }
    .nav-toggle span {
        width: 24px; height: 2px; background: var(--cream);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

    .section { padding: 90px 0; }
    .card-grid { grid-template-columns: 1fr; }
    .process-track { grid-template-columns: 1fr; }
    .hero-foot { display: none; }
    .scroll-cue { bottom: 28px; }
    .contact-form { padding: 26px 20px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ============================================================
   HIGH-IMPACT LAYER: boot, HUD, cursor, terminal, glitch,
   spotlight cards, dual marquee, process draw
   ============================================================ */

/* ---------- boot sequence overlay ---------- */

.boot {
    position: fixed; inset: 0; z-index: 300;
    background: var(--ink-0);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-inner {
    font-family: var(--font-mono); font-size: 0.85rem;
    color: var(--steel); min-width: min(420px, 84vw); line-height: 1.9;
}
.boot-inner .b-head { color: var(--red-hot); letter-spacing: 0.12em; margin-bottom: 10px; }
.boot-inner .b-ok { color: #7fd88f; }
.boot-inner .b-caret::after {
    content: '▌'; color: var(--red); animation: blink 0.8s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- scroll progress ---------- */

.scroll-progress {
    position: fixed; top: 0; left: 0; z-index: 120;
    height: 2px; width: 0;
    background: linear-gradient(90deg, var(--red), var(--red-hot));
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.7);
}

/* ---------- section HUD ---------- */

.section-hud {
    position: fixed; right: 22px; top: 50%; transform: translateY(-50%);
    z-index: 90; display: flex; flex-direction: column; gap: 14px;
}
.section-hud a {
    display: flex; align-items: center; gap: 8px; justify-content: flex-end;
    font-size: 0.68rem; letter-spacing: 0.1em;
    color: var(--steel-dim);
    transition: color 0.25s ease;
}
.section-hud .hud-name {
    opacity: 0; transform: translateX(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    order: -1;
}
.section-hud a:hover .hud-name { opacity: 1; transform: none; }
.section-hud .hud-num {
    position: relative; padding-right: 14px;
}
.section-hud .hud-num::after {
    content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    width: 8px; height: 1px; background: currentColor;
    transition: width 0.25s ease;
}
.section-hud a.active { color: var(--red-hot); }
.section-hud a.active .hud-num::after { width: 14px; }
@media (max-width: 1180px) { .section-hud { display: none; } }

/* ---------- custom cursor ---------- */

body.custom-cursor, body.custom-cursor a, body.custom-cursor button,
body.custom-cursor input, body.custom-cursor textarea, body.custom-cursor label {
    cursor: none;
}
.cursor-dot, .cursor-ring {
    position: fixed; left: 0; top: 0; z-index: 250; pointer-events: none;
    border-radius: 50%; transform: translate(-50%, -50%);
    opacity: 0;
}
body.custom-cursor .cursor-dot, body.custom-cursor .cursor-ring { opacity: 1; }
.cursor-dot { width: 5px; height: 5px; background: var(--red-hot); }
.cursor-ring {
    width: 34px; height: 34px;
    border: 1px solid rgba(230, 57, 70, 0.55);
    transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.cursor-ring.on {
    width: 52px; height: 52px;
    border-color: var(--red-hot);
    background: rgba(230, 57, 70, 0.08);
}
.cursor-ring.drag {
    width: 22px; height: 22px;
    border-color: var(--red-hot);
    background: rgba(230, 57, 70, 0.2);
}

/* ---------- hero grid overlay ---------- */

.hero::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        linear-gradient(rgba(147, 160, 184, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 160, 184, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 75% 60% at 50% 45%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 45%, black 30%, transparent 75%);
}

/* ---------- glitch on the accent line ---------- */

.glitch { position: relative; }
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute; inset: 0;
    color: var(--red);
    opacity: 0;
    pointer-events: none;
}
.glitch::before {
    text-shadow: -2px 0 #22d3ee;
    animation: glitchA 7s infinite steps(1);
}
.glitch::after {
    text-shadow: 2px 0 var(--red-hot);
    animation: glitchB 7s infinite steps(1);
}
@keyframes glitchA {
    0%, 92.9%, 96.3%, 100% { opacity: 0; }
    93% { opacity: 0.85; clip-path: inset(12% 0 58% 0); transform: translate(-4px, -2px); }
    94% { opacity: 0.85; clip-path: inset(62% 0 8% 0);  transform: translate(4px, 2px); }
    95.2% { opacity: 0.85; clip-path: inset(38% 0 36% 0); transform: translate(-3px, 1px); }
}
@keyframes glitchB {
    0%, 92.9%, 96.3%, 100% { opacity: 0; }
    93.4% { opacity: 0.85; clip-path: inset(55% 0 18% 0); transform: translate(4px, 2px); }
    94.6% { opacity: 0.85; clip-path: inset(8% 0 70% 0);  transform: translate(-4px, -1px); }
    95.8% { opacity: 0.85; clip-path: inset(42% 0 30% 0); transform: translate(3px, -2px); }
}

/* ---------- ship / terminal section ---------- */

.ship-grid {
    display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 70px; align-items: center;
}
.ship-copy h2 { margin-bottom: 24px; }
.ship-copy p { max-width: 440px; margin-bottom: 26px; }
.ship-points { list-style: none; font-size: 0.82rem; color: var(--steel-dim); letter-spacing: 0.03em; }
.ship-points li { padding: 9px 0; border-top: 1px solid var(--line); }
.ship-points li::before { content: '▸ '; color: var(--red); }

.terminal {
    background: #0A0D14;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(230, 57, 70, 0.06);
}
.terminal-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px;
    background: rgba(19, 24, 38, 0.8);
    border-bottom: 1px solid var(--line);
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-red { background: #ff5f57; } .t-yellow { background: #febc2e; } .t-green { background: #28c840; }
.terminal-title { margin-left: 10px; font-size: 0.72rem; color: var(--steel-dim); letter-spacing: 0.08em; }

.terminal-body {
    padding: 22px 22px 26px;
    font-size: 0.82rem; line-height: 1.9;
    min-height: 300px;
    white-space: pre-wrap; word-break: break-word;
    color: var(--steel);
}
.terminal-body .t-prompt { color: var(--red-hot); }
.terminal-body .t-ok { color: #7fd88f; }
.terminal-body .t-dim { color: var(--steel-dim); }
.terminal-body .t-caret::after {
    content: '▌'; color: var(--red); animation: blink 0.8s steps(1) infinite;
}

/* ---------- card spotlight + conic edge ---------- */

.card { overflow: hidden; }
.card::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
                rgba(230, 57, 70, 0.10), transparent 65%);
    opacity: 0; transition: opacity 0.35s ease;
}
.card:hover::after { opacity: 1; }

/* ---------- dual marquee ---------- */

.marquee-reverse {
    animation-direction: reverse;
    animation-duration: 46s;
    margin-top: 16px;
    opacity: 0.55;
}
.marquee-reverse span::after { color: var(--steel-dim); }

/* ---------- process line draw ---------- */

.process-track::before {
    transform: scaleX(0); transform-origin: left center;
    transition: transform 1.6s var(--ease-out) 0.2s;
}
.process-track.in::before { transform: scaleX(1); }

/* ---------- responsive for new layers ---------- */

@media (max-width: 1024px) {
    .ship-grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 768px) {
    .terminal-body { min-height: 240px; font-size: 0.74rem; }
    .cursor-dot, .cursor-ring { display: none; }
}

/* ============================================================
   STEROIDS LAYER: ambient field, conic card borders, metrics HUD,
   process pulse, overdrive mode
   ============================================================ */

/* ---------- ambient starfield (whole page) ---------- */

#ambient {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    width: 100%; height: 100%;
}

/* ---------- rotating conic border on card hover ---------- */

@property --ang {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
.card::before {
    content: ''; position: absolute; inset: 0; border-radius: var(--radius);
    padding: 1px; pointer-events: none;
    background: conic-gradient(from var(--ang),
        transparent 0deg 250deg,
        rgba(230, 57, 70, 0.9) 305deg,
        rgba(255, 90, 102, 0.4) 330deg,
        transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0; transition: opacity 0.35s ease;
}
.card:hover::before {
    opacity: 1;
    animation: spinAng 2.6s linear infinite;
}
@keyframes spinAng { to { --ang: 360deg; } }

/* ---------- system metrics HUD ---------- */

.metrics {
    position: fixed; left: 22px; bottom: 20px; z-index: 90;
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em;
    color: var(--steel-dim);
    background: rgba(11, 14, 22, 0.6);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 14px;
    backdrop-filter: blur(8px);
    display: flex; gap: 16px; align-items: center;
    pointer-events: none;
}
.metrics .m-val { color: var(--steel); }
.metrics .m-hot { color: var(--red-hot); }
.metrics .m-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; }
.metrics .m-bars i {
    width: 3px; background: var(--red); opacity: 0.85;
    transition: height 0.4s ease;
}
@media (max-width: 1180px) { .metrics { display: none; } }

/* ---------- pulse riding the process line ---------- */

.process-track::after {
    content: ''; position: absolute; top: 18px; left: 3%;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--red-hot);
    box-shadow: 0 0 14px rgba(230, 57, 70, 0.9);
    opacity: 0;
}
.process-track.in::after {
    opacity: 1;
    animation: trackPulse 5s var(--ease-out) 1.8s infinite;
}
@keyframes trackPulse {
    0%   { left: 3%; opacity: 0; }
    6%   { opacity: 1; }
    88%  { opacity: 1; }
    100% { left: 96%; opacity: 0; }
}
@media (max-width: 1024px) { .process-track.in::after { display: none; } }

/* ---------- marquee velocity skew ---------- */

.marquee-track { will-change: transform; }

/* ---------- overdrive mode (type "boom") ---------- */

body.overdrive .status-dot { animation-duration: 0.5s; }
body.overdrive .marquee-track { animation-duration: 9s; }
body.overdrive .marquee-reverse { animation-duration: 12s; }
body.overdrive .scroll-progress { box-shadow: 0 0 22px rgba(230, 57, 70, 1); height: 3px; }
body.overdrive .brand-logo { animation: markSpin 1.2s linear infinite; }
@keyframes markSpin { to { transform: rotate(360deg); } }
body.overdrive .glitch::before { animation-duration: 2.2s; }
body.overdrive .glitch::after { animation-duration: 2.2s; }

.overdrive-tag {
    position: fixed; top: 76px; right: 24px; z-index: 130;
    font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em;
    color: var(--red-hot); text-transform: uppercase;
    border: 1px solid rgba(230, 57, 70, 0.5); border-radius: 4px;
    padding: 5px 12px;
    background: rgba(230, 57, 70, 0.08);
    animation: blink 0.9s steps(1) infinite;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; filter: none; }
    #plexus { display: none; }
    .marquee-track { animation: none; }
    .cursor-glow { display: none; }
    .cursor-dot, .cursor-ring, .boot { display: none; }
    .glitch::before, .glitch::after { animation: none; opacity: 0; }
    .process-track::before { transform: scaleX(1); }
    #ambient, .metrics, .overdrive-tag { display: none; }
    .process-track.in::after { display: none; }
    .card:hover::before { animation: none; opacity: 0; }
}
