/* ============================================================
   Style Marking — Professional Mockup
   Design language: pure-black canvas, hairline structure,
   industrial typography, restrained motion, single accent.
   ============================================================ */

:root {
    --bg: #04060a;
    --bg-1: #060912;
    --bg-2: #0a0d18;
    --surface: #0e0e0e;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #ffffff;
    --text-2: rgba(255, 255, 255, 0.88);
    --text-3: rgba(255, 255, 255, 0.64);
    --text-4: rgba(255, 255, 255, 0.42);
    --accent: #d4a017;
    --accent-soft: rgba(212, 160, 23, 0.12);
    --maxw: 1280px;
    --maxw-tight: 1080px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: -0.005em;
    overflow-x: hidden;
    position: relative;
}

/* =================================================================
   IMMERSIVE BACKGROUND — system topology, data flows, code drift
   Fully layered, mouse-reactive, custom. Not just black.
   Stack (back to front):
     1. Animated mesh gradient (deep navy + warm pools, slow drift)
     2. Topographic SVG contour (architectural blueprint feel)
     3. Dot grid (structural substrate)
     4. Network topology canvas (mouse-reactive nodes + edges + pulses)
     5. Cursor halo (soft glow following pointer)
     6. Code rails + telemetry readouts
     7. Vignette
   ================================================================= */
.bg-stage {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Layer 1: animated mesh gradient — replaces pure black */
.bg-mesh {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(circle at 18% 28%, rgba(212, 160, 23, 0.16), transparent 38%),
        radial-gradient(circle at 82% 72%, rgba(70, 130, 200, 0.13), transparent 42%),
        radial-gradient(circle at 62% 18%, rgba(120, 80, 200, 0.10), transparent 36%),
        radial-gradient(circle at 28% 82%, rgba(200, 100, 60, 0.09), transparent 38%),
        radial-gradient(circle at 50% 50%, rgba(40, 80, 130, 0.10), transparent 60%),
        linear-gradient(135deg, #05080f 0%, #0a0612 45%, #06090f 100%);
    animation: meshDrift 28s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes meshDrift {
    0%   { transform: translate(0, 0) scale(1.02); }
    50%  { transform: translate(-2%, 1.5%) scale(1.04); }
    100% { transform: translate(1.5%, -1%) scale(1.02); }
}

/* Layer 2: topographic blueprint — slow drift across the page */
.bg-contour {
    position: absolute;
    inset: -5%;
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: contourDrift 80s linear infinite;
}
@keyframes contourDrift {
    from { transform: translate(0, 0); }
    to   { transform: translate(-100px, -60px); }
}

/* Layer 3: dot grid — engineering substrate */
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 0);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 100% 80% at 50% 40%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 40%, #000 30%, transparent 100%);
}

/* Cursor halo — soft glow tracking the mouse */
.bg-halo {
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.16) 0%, rgba(212, 160, 23, 0.04) 30%, transparent 65%);
    transform: translate3d(-9999px, -9999px, 0);
    transition: opacity 0.4s ease;
    opacity: 0;
    will-change: transform;
    pointer-events: none;
    mix-blend-mode: screen;
}
.bg-halo.is-active { opacity: 1; }

/* Layer 7: vignette — pulls focus inward */
.bg-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 70% at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.5) 80%, rgba(0, 0, 0, 0.75) 100%);
}
canvas.bg-network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.bg-code {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 200px;
    overflow: hidden;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.06);
    line-height: 1.7;
    white-space: nowrap;
}
.bg-code-left { left: 0; mask-image: linear-gradient(to right, #000, transparent); -webkit-mask-image: linear-gradient(to right, #000, transparent); }
.bg-code-right { right: 0; mask-image: linear-gradient(to left, #000, transparent); -webkit-mask-image: linear-gradient(to left, #000, transparent); text-align: right; }
.bg-code-stream {
    padding: 24px 16px;
    animation: codeDrift 90s linear infinite;
}
.bg-code-right .bg-code-stream { animation-duration: 110s; animation-direction: reverse; }
@keyframes codeDrift {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
}
.bg-readouts {
    position: absolute;
    inset: 0;
}
.bg-readout {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.18);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    padding-left: 10px;
    text-transform: uppercase;
}
.bg-readout-1 { top: 18%; left: 6%; }
.bg-readout-2 { top: 36%; right: 6%; text-align: right; border-left: none; border-right: 1px solid rgba(255, 255, 255, 0.12); padding-left: 0; padding-right: 10px; }
.bg-readout-3 { bottom: 26%; left: 8%; }
.bg-readout-4 { bottom: 14%; right: 7%; text-align: right; border-left: none; border-right: 1px solid rgba(255, 255, 255, 0.12); padding-left: 0; padding-right: 10px; }
.bg-readout span { color: rgba(212, 160, 23, 0.45); }

/* Lift page content above the fixed background stage */
.nav, .hero, .section, .clients, .final, .footer { position: relative; z-index: 2; }

/* Stronger scrim under content — text legibility is non-negotiable */
.hero, .clients, .section, .final {
    background:
        linear-gradient(180deg, rgba(4, 6, 10, 0.55), rgba(4, 6, 10, 0.78) 50%, rgba(4, 6, 10, 0.55));
}
/* Soft radial scrim concentrated where the .wrap content sits, so text
   never has to compete with section visuals directly underneath it. */
.section::before,
.clients::before,
.final::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse 65% 70% at 50% 50%, rgba(4, 6, 10, 0.55), transparent 75%);
}

@media (prefers-reduced-motion: reduce) {
    canvas.bg-network, .bg-code-stream { animation: none !important; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Helpers ----------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.wrap-tight { max-width: var(--maxw-tight); margin: 0 auto; padding: 0 32px; }
.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.eyebrow { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); }
.divider-h { height: 1px; background: var(--border); width: 100%; }

/* =================================================================
   NAV
   ================================================================= */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-size: 15px;
}
.nav-brand-mark {
    width: 22px; height: 22px;
    border: 1.5px solid var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}
.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--text);
    color: var(--bg);
    font-size: 13px;
    font-weight: 600;
    border-radius: 1px;
    transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--accent); color: var(--bg); }

/* =================================================================
   HERO
   ================================================================= */
.hero {
    padding: 180px 0 140px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 80% 0%, rgba(212, 160, 23, 0.04), transparent 60%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(255, 255, 255, 0.02), transparent 60%);
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 32px;
    position: relative;
}
.hero-index {
    color: var(--text-4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.hero-body {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}
.hero-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 48px;
}
.hero h1 {
    font-size: clamp(48px, 7.5vw, 104px);
    line-height: 0.98;
    font-weight: 500;
    letter-spacing: -0.03em;
    max-width: 14ch;
    margin-bottom: 40px;
}
.hero h1 em {
    font-style: normal;
    color: var(--text-3);
}
.hero-sub {
    font-size: 18px;
    line-height: 1.55;
    color: var(--text-2);
    max-width: 56ch;
    margin-bottom: 56px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    border-radius: 1px;
    cursor: pointer;
    transition: all 0.18s ease;
    border: none;
}
.btn-primary {
    background: var(--text);
    color: var(--bg);
}
.btn-primary:hover { background: var(--accent); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--text); }
.btn-arrow { font-size: 14px; line-height: 1; transition: transform 0.18s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.hero-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 96px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.hero-meta-item .mono { color: var(--text-4); margin-bottom: 12px; }
.hero-meta-item-value {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.1;
}
.hero-meta-item-label {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 4px;
}

/* =================================================================
   SECTION SHELL
   ================================================================= */
.section {
    padding: 120px 0;
    border-bottom: 1px solid var(--border);
}
.section-head {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 32px;
    margin-bottom: 80px;
}
.section-head-index {
    color: var(--text-4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.section-head-body {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}
.section-head .eyebrow {
    color: var(--text-3);
    margin-bottom: 28px;
    display: block;
}
.section-head h2 {
    font-size: clamp(36px, 4.5vw, 64px);
    line-height: 1.02;
    font-weight: 500;
    letter-spacing: -0.025em;
    max-width: 18ch;
    margin-bottom: 24px;
}
.section-head p {
    font-size: 18px;
    line-height: 1.55;
    color: var(--text-2);
    max-width: 56ch;
}

/* =================================================================
   CLIENTS STRIP
   ================================================================= */
.clients {
    padding: 64px 0;
    border-bottom: 1px solid var(--border);
}
.clients-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-3);
    text-align: center;
    margin-bottom: 36px;
}
.clients-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.client {
    padding: 28px 24px;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-3);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.005em;
    transition: color 0.2s ease, background 0.2s ease;
}
.client:last-child { border-right: none; }
.client:hover { color: var(--text); background: rgba(255, 255, 255, 0.02); }
.client-mark {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--text-4);
}

/* =================================================================
   CAPABILITIES — alternating large rows
   ================================================================= */
.cap-row {
    display: grid;
    grid-template-columns: 64px 1fr 1fr;
    gap: 32px;
    padding: 64px 0;
    border-top: 1px solid var(--border);
    align-items: start;
}
.cap-row:last-child { border-bottom: 1px solid var(--border); }
.cap-index {
    color: var(--text-4);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
}
.cap-text .eyebrow { color: var(--text-3); margin-bottom: 16px; display: block; }
.cap-text h3 {
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.08;
    margin-bottom: 20px;
    max-width: 16ch;
}
.cap-text p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-2);
    max-width: 48ch;
    margin-bottom: 24px;
}
.cap-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border-strong);
    padding-bottom: 4px;
    transition: border-color 0.2s ease;
}
.cap-link:hover { border-color: var(--accent); color: var(--accent); }
.cap-detail {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border-left: 1px solid var(--border);
    padding-left: 24px;
}
.cap-detail-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.cap-detail-item:last-child { border-bottom: none; }
.cap-detail-key {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    padding-top: 2px;
}
.cap-detail-val { color: var(--text-2); }

/* =================================================================
   APPROACH (3-column principle grid)
   ================================================================= */
.approach-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}
.approach-cell {
    padding: 48px 36px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.approach-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--text-4);
    margin-bottom: 32px;
}
.approach-cell h4 {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin-bottom: 16px;
}
.approach-cell p {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
}

/* =================================================================
   PROOF — testimonial / quote block
   ================================================================= */
.proof {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 32px;
    padding: 80px 0;
    border-top: 1px solid var(--border);
}
.proof-index { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.1em; color: var(--text-4); }
.proof-quote {
    font-size: clamp(28px, 3.2vw, 44px);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
    max-width: 24ch;
    margin-bottom: 40px;
}
.proof-attrib {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.proof-attrib-mark {
    width: 36px; height: 36px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
    color: var(--text-2);
}
.proof-attrib-name { font-size: 14px; font-weight: 500; color: var(--text); }
.proof-attrib-role { font-size: 13px; color: var(--text-3); }

/* =================================================================
   ENGAGEMENT
   ================================================================= */
.engage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--border);
}
.engage-step {
    padding: 40px 28px 48px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.engage-step:last-child { border-right: none; }
.engage-step-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--text-4);
    margin-bottom: 64px;
    display: block;
}
.engage-step h4 {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}
.engage-step p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-2);
}

/* =================================================================
   FINAL CTA
   ================================================================= */
.final {
    padding: 160px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.final::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(212, 160, 23, 0.05), transparent 70%);
    pointer-events: none;
}
.final-inner {
    position: relative;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 32px;
}
.final .eyebrow { color: var(--text-3); display: block; margin-bottom: 32px; }
.final h2 {
    font-size: clamp(40px, 5.5vw, 80px);
    line-height: 1.02;
    font-weight: 500;
    letter-spacing: -0.025em;
    margin-bottom: 32px;
}
.final p {
    font-size: 18px;
    color: var(--text-2);
    margin-bottom: 48px;
    line-height: 1.55;
}
.final-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =================================================================
   FOOTER
   ================================================================= */
.footer {
    padding: 80px 0 40px;
    background: var(--bg);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 64px;
    border-bottom: 1px solid var(--border);
}
.footer-brand h5 {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}
.footer-brand p {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.6;
    max-width: 36ch;
}
.footer-col h6 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 20px;
    font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
    font-size: 14px;
    color: var(--text-2);
    transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--text); }
.footer-base {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    font-size: 12px;
    color: var(--text-4);
    flex-wrap: wrap;
    gap: 16px;
}
.footer-base-left { display: flex; gap: 24px; align-items: center; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 1024px) {
    .clients-row { grid-template-columns: repeat(2, 1fr); }
    .client { border-bottom: 1px solid var(--border); }
    .client:nth-child(2n) { border-right: none; }
    .approach-grid { grid-template-columns: repeat(2, 1fr); }
    .engage-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cap-row { grid-template-columns: 32px 1fr; }
    .cap-detail { grid-column: 2; margin-top: 24px; padding-left: 0; border-left: none; border-top: 1px solid var(--border); padding-top: 24px; }
}
@media (max-width: 720px) {
    .wrap { padding: 0 20px; }
    .nav-links { display: none; }
    .hero { padding: 140px 0 100px; }
    .hero-grid, .section-head { grid-template-columns: 1fr; }
    .hero-index, .section-head-index { display: none; }
    .hero-meta { grid-template-columns: 1fr; gap: 24px; }
    .section { padding: 80px 0; }
    .approach-grid, .clients-row { grid-template-columns: 1fr; }
    .approach-cell, .client { border-right: none; }
    .engage-grid { grid-template-columns: 1fr; }
    .engage-step { border-right: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .cap-row { grid-template-columns: 1fr; padding: 48px 0; }
    .cap-index { display: none; }
}

/* =================================================================
   LOGO — actual brand image in the nav
   ================================================================= */
.nav-brand-img {
    height: 32px;
    width: auto;
    display: block;
    filter: brightness(1.05);
}
.nav-brand {
    text-decoration: none;
}

/* =================================================================
   SMOOTH TRANSITIONS — site-wide reveal + page fade
   ================================================================= */

/* Page transition — fade OUT only on outbound nav.
   Body is always visible by default — never hidden waiting on JS. */
body { transition: opacity 0.32s ease; }
body.is-leaving { opacity: 0; }

/* Scroll reveal — applied automatically to common selectors via JS */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.85s cubic-bezier(0.2, 0.7, 0.3, 1),
        transform 0.85s cubic-bezier(0.2, 0.7, 0.3, 1);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal[data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1),
        transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal[data-reveal-stagger].is-visible > * { opacity: 1; transform: translateY(0); }
.reveal[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 60ms; }
.reveal[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 140ms; }
.reveal[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 220ms; }
.reveal[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 300ms; }
.reveal[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 380ms; }
.reveal[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 460ms; }
.reveal[data-reveal-stagger].is-visible > *:nth-child(7) { transition-delay: 540ms; }
.reveal[data-reveal-stagger].is-visible > *:nth-child(8) { transition-delay: 620ms; }

/* Enhanced hover micro-interactions */
.cap-row, .approach-cell, .engage-step, .tier, .client {
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.approach-cell:hover, .engage-step:hover, .tier:hover {
    background: rgba(255, 255, 255, 0.018);
}
.tier:hover { transform: translateY(-3px); }
.btn, .nav-cta, .cap-link, .tier-cta {
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn-primary:hover { transform: translateY(-1px); }
.client { transition: color 0.3s ease, background 0.3s ease, letter-spacing 0.4s ease; }
.client:hover { letter-spacing: 0.005em; }
.cap-link, .tier-cta { position: relative; }
.cap-link::after, .tier-cta::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.cap-link:hover::after, .tier-cta:hover::after { transform: scaleX(1); }

/* Nav links — animated underline */
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* =================================================================
   HERO FILM — cinematic wireframe globe behind hero content
   ================================================================= */
.hero { position: relative; overflow: hidden; }
canvas.hero-film {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
}
/* Left-side scrim so hero text remains legible while film dominates the right */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(4, 6, 10, 0.92) 0%, rgba(4, 6, 10, 0.72) 35%, rgba(4, 6, 10, 0.35) 60%, rgba(4, 6, 10, 0.55) 100%),
        linear-gradient(180deg, rgba(4, 6, 10, 0.6) 0%, transparent 25%, transparent 75%, rgba(4, 6, 10, 0.6) 100%);
}
.hero > .wrap { position: relative; z-index: 2; }

/* Subtle film telemetry overlay (top-right corner of hero) */
.hero-telemetry {
    position: absolute;
    top: 100px;
    right: 32px;
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.32);
    text-align: right;
    pointer-events: none;
    text-transform: uppercase;
    line-height: 1.9;
}
.hero-telemetry span { color: rgba(212, 160, 23, 0.55); }
.hero-telemetry-row { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.hero-telemetry-row::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(212, 160, 23, 0.6);
    animation: telemetryBlink 2.4s ease-in-out infinite;
}
@keyframes telemetryBlink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@media (max-width: 720px) {
    .hero-telemetry { display: none; }
    canvas.hero-film { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal[data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
    body { opacity: 1 !important; }
}

/* =================================================================
   PER-SECTION BACKGROUNDS — each section gets its own visual
   The global bg-stage is dimmed; .sec-bg dominates each section.
   ================================================================= */
section, header.hero { position: relative; overflow: hidden; }
.sec-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.45;
}
.sec-bg svg { width: 100%; height: 100%; display: block; }
.section > .wrap,
.hero > .wrap,
.clients > .wrap,
.final > .final-inner,
.section > .container,
.proof { position: relative; z-index: 3; }

/* Tone down the global network so per-section bgs dominate */
canvas.bg-network { opacity: 0.32; }
.bg-readouts { opacity: 0.55; }
.bg-code { opacity: 0.7; }

/* Per-section ambient color washes — each bg type gets a tinted glow */
.sec-bg.bg-constellation::before,
.sec-bg.bg-architecture::before,
.sec-bg.bg-hexlattice::before,
.sec-bg.bg-waveform::before,
.sec-bg.bg-pipeline::before,
.sec-bg.bg-radial::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.sec-bg.bg-constellation::before { background: radial-gradient(ellipse 70% 60% at 80% 30%, rgba(120, 180, 255, 0.06), transparent 60%), radial-gradient(ellipse 50% 40% at 20% 80%, rgba(212, 160, 23, 0.04), transparent 60%); }
.sec-bg.bg-architecture::before { background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(80, 160, 240, 0.05), transparent 60%); }
.sec-bg.bg-hexlattice::before   { background: radial-gradient(ellipse 70% 50% at 30% 40%, rgba(212, 160, 23, 0.06), transparent 60%), radial-gradient(ellipse 60% 50% at 80% 70%, rgba(140, 100, 200, 0.04), transparent 60%); }
.sec-bg.bg-waveform::before     { background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(180, 220, 255, 0.05), transparent 60%); }
.sec-bg.bg-pipeline::before     { background: linear-gradient(90deg, rgba(212, 160, 23, 0.03), transparent 30%, transparent 70%, rgba(212, 160, 23, 0.03)); }
.sec-bg.bg-radial::before       { background: radial-gradient(circle at 50% 50%, rgba(212, 160, 23, 0.12), rgba(212, 160, 23, 0.02) 30%, transparent 60%); }

/* SVG element animations */
.sec-pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: secPulse 4s ease-in-out infinite alternate;
}
@keyframes secPulse {
    from { opacity: 0.35; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1.25); }
}
.sec-dash {
    stroke-dasharray: 6 8;
    animation: secDashShift 12s linear infinite;
}
@keyframes secDashShift {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -56; }
}
.sec-glow { filter: drop-shadow(0 0 4px rgba(212, 160, 23, 0.6)); }
.sec-rotate {
    transform-box: fill-box;
    transform-origin: center;
    animation: secRotate 60s linear infinite;
}
@keyframes secRotate { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .sec-pulse, .sec-dash, .sec-rotate { animation: none !important; }
}

/* =================================================================
   SVG-BASED HERO FILM (non-home pages) — about/services/portfolio/pricing/contact
   ================================================================= */
.hero-film-svg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    overflow: hidden;
}
.hero-film-svg svg { width: 100%; height: 100%; display: block; }

/* Ambient color washes for the NEW background types */
.sec-bg.bg-compass::before      { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(212,160,23,0.10), transparent 50%), radial-gradient(circle at 70% 30%, rgba(120,160,220,0.06), transparent 50%); pointer-events: none; }
.sec-bg.bg-stratigraphy::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(60,40,30,0.10), rgba(20,30,50,0.10) 50%, rgba(80,60,30,0.08)); pointer-events: none; }
.sec-bg.bg-terminal::before     { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(50,90,140,0.10), transparent 70%); pointer-events: none; }
.sec-bg.bg-coords::before       { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(120,180,240,0.08), transparent 70%); pointer-events: none; }
.sec-bg.bg-ledger::before       { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,30,15,0.12), rgba(20,15,8,0.08)); pointer-events: none; }
.sec-bg.bg-spectrum::before     { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 90% 60% at 50% 70%, rgba(160,210,255,0.08), transparent 70%), radial-gradient(circle at 30% 30%, rgba(212,160,23,0.05), transparent 60%); pointer-events: none; }
.sec-bg.bg-pins::before         { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 70% at 40% 50%, rgba(60,100,140,0.08), transparent 70%); pointer-events: none; }

/* Hero film SVG version gets stronger scrim than canvas globe (text legibility) */
.hero-film-svg + .hero-telemetry { /* still relies on existing positioning */ }

@media (max-width: 720px) {
    .hero-film-svg { opacity: 0.55; }
}
