/* ============================================================
   HomeIQ LA — Global Stylesheet
   Structure:
     1. Reset & tokens
     2. Base / utilities
     3. Custom cursor
     4. Navigation (desktop dropdown + mobile menu)
     5. Hero
     6. Marquee
     7. Service sections & 3D stages
     8. Sub-page layout (page hero, detail blocks, service cards)
     9. About / stats
    10. CTA / footer
    11. Reveal system & keyframes
    12. Media queries
   ============================================================ */

/* ── 1. RESET & TOKENS ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #04070F;
  --bg2:       #060C1A;
  --bg3:       #0A1428;
  --blue:      #2E9BFF;
  --blue-l:    #6FC0FF;
  --blue-ll:   rgba(46,155,255,.12);
  --blue-glow: rgba(46,155,255,.28);
  --amber:      #FFB25E;
  --amber-glow: rgba(255,178,94,.25);
  --white:    #F2F5FA;
  --white-d:  rgba(242,245,250,.55);
  --white-dd: rgba(242,245,250,.24);
  --glass: rgba(255,255,255,.03);
  --gb:    rgba(255,255,255,.07);
  --nav-bg: rgba(4,7,15,.9);
  --mono: 'IBM Plex Mono', monospace;
  --disp: 'Syncopate', sans-serif;
  --body: 'Jost', sans-serif;
}

/* ── 2. BASE ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--white); font-family: var(--body); overflow-x: hidden; }
a, button { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--blue); color: var(--bg); }

/* film grain — static texture, above everything except the cursor.
   (deliberately not animated: an animated fullscreen layer forces
   constant repaints over the WebGL canvases) */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .03;
}

/* shared buttons */
.btn-blue, .btn-ghost {
  position: relative; overflow: hidden; display: inline-block;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  padding: 18px 40px; text-decoration: none; transition: all .3s;
}
.btn-blue { background: var(--blue); color: var(--bg); font-weight: 700; }
.btn-blue:hover { background: var(--blue-l); transform: translateY(-3px); box-shadow: 0 20px 48px rgba(46,155,255,.3); }
.btn-ghost { border: 1px solid var(--gb); color: var(--white); font-weight: 400; letter-spacing: .14em; background: rgba(10,16,30,.55); }
.btn-ghost:hover { border-color: var(--blue-glow); color: var(--blue); transform: translateY(-3px); }
/* sweeping shine on primary buttons */
.btn-blue::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn-blue:hover::after { left: 130%; }

/* ── 3. CUSTOM CURSOR (fine pointers only) ─────────────────── */
@media (pointer: fine) {
  body, a, button { cursor: none; }
  /* positioned purely via transform from JS — never left/top (avoids style recalc per frame) */
  .cdot { position: fixed; top: 0; left: 0; width: 6px; height: 6px; background: var(--blue); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%,-50%); will-change: transform; }
  .cring {
    position: fixed; top: 0; left: 0; width: 34px; height: 34px; border: 1px solid rgba(46,155,255,.45);
    border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%,-50%); will-change: transform;
  }
}
@media (pointer: coarse) { .cdot, .cring { display: none; } }

/* ── 4. NAVIGATION ─────────────────────────────────────────── */
/* no backdrop-filter here: blurring over a live WebGL canvas re-renders the blur every frame */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 22px 52px; display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(to bottom, var(--nav-bg) 30%, transparent);
  transition: padding .4s, background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
nav.scrolled { padding: 14px 52px; background: var(--nav-bg); border-bottom-color: var(--gb); }
.logo { font-family: var(--disp); font-size: 15px; font-weight: 700; letter-spacing: .14em; text-decoration: none; color: var(--white); }
.logo b { color: var(--blue); }
.nav-links { display: flex; gap: 34px; list-style: none; align-items: center; }
.nav-links > li { position: relative; }
.nav-links a { font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--white-d); text-decoration: none; transition: color .3s; }
.nav-links a:hover { color: var(--blue); }
.nav-cta { font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); border: 1px solid var(--blue-glow); padding: 12px 26px; text-decoration: none; transition: all .3s; }
.nav-cta:hover { background: var(--blue); color: var(--bg); }

/* services dropdown */
.has-dd > a::after { content: ' ▾'; font-size: 8px; opacity: .7; }
.dd {
  position: absolute; top: calc(100% + 16px); left: 50%; transform: translate(-50%, 8px);
  min-width: 250px; list-style: none; padding: 10px 0;
  background: rgba(6,12,26,.97); border: 1px solid var(--gb);
  opacity: 0; visibility: hidden; transition: opacity .3s, transform .3s, visibility .3s;
}
.dd::before { content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 16px; } /* hover bridge */
.has-dd:hover .dd, .has-dd:focus-within .dd { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dd li a {
  display: flex; align-items: center; gap: 12px; padding: 11px 22px;
  font-size: 10px; letter-spacing: .18em;
  transition: color .25s, background .25s, padding-left .25s;
}
.dd li a::before { content: ''; width: 12px; height: 1px; background: var(--blue); opacity: 0; transition: opacity .25s; }
.dd li a:hover { background: var(--blue-ll); padding-left: 28px; }
.dd li a:hover::before { opacity: 1; }
.dd .dd-all { border-top: 1px solid var(--gb); margin-top: 8px; padding-top: 8px; }
.dd .dd-all a { color: var(--blue); }

/* hamburger */
.burger { display: none; flex-direction: column; gap: 6px; background: none; border: 0; padding: 6px; z-index: 620; }
.burger span { display: block; width: 26px; height: 1.5px; background: var(--white); transition: transform .35s, opacity .35s; }
.burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* mobile menu overlay */
.mnav {
  position: fixed; inset: 0; z-index: 600; background: rgba(4,7,15,.98);
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 96px 36px 48px; overflow-y: auto; /* scrollable on short screens */
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.mnav.open { opacity: 1; visibility: visible; }
.mnav a { text-decoration: none; }
.mnav .m-main {
  display: block; font-family: var(--disp); font-size: 22px; font-weight: 700; color: var(--white);
  padding: 13px 0; letter-spacing: .06em;
  opacity: 0; transform: translateY(18px); transition: opacity .5s, transform .5s, color .3s;
}
.mnav.open .m-main { opacity: 1; transform: none; }
.mnav .m-main:hover { color: var(--blue); }
.mnav .m-sub {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--white-d); padding: 9px 0 9px 22px; border-left: 1px solid var(--gb);
  opacity: 0; transform: translateY(18px); transition: opacity .5s, transform .5s, color .3s, border-color .3s;
}
.mnav.open .m-sub { opacity: 1; transform: none; }
.mnav .m-sub:hover { color: var(--blue); border-left-color: var(--blue); }
.mnav .m-label { font-family: var(--mono); font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--blue); margin: 22px 0 8px; }
.mnav .close-x { position: absolute; top: 24px; right: 24px; }
body.menu-locked { overflow: hidden; }

/* ── 5. HERO ───────────────────────────────────────────────── */
#hero { position: relative; width: 100%; height: 100vh; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 18%, rgba(4,7,15,.55) 68%, var(--bg) 100%); pointer-events: none; }
.hero-bottom { position: absolute; bottom: 0; left: 0; right: 0; height: 220px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 32px; z-index: 3; }
.hero-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 30px; opacity: 0; animation: fadeUp 1s ease .5s forwards;
  display: flex; align-items: center; gap: 18px;
}
.hero-tag::before, .hero-tag::after { content: ''; width: 36px; height: 1px; background: var(--blue-glow); }
h1.hero-h1 {
  font-family: var(--disp); font-size: clamp(36px, 8.2vw, 106px); font-weight: 700;
  line-height: .94; letter-spacing: -.02em; margin-bottom: 14px;
  opacity: 0; animation: fadeUp 1s ease .7s forwards;
}
h1.hero-h1 .accent {
  background: linear-gradient(100deg, var(--blue) 20%, var(--blue-l) 45%, #BFE3FF 50%, var(--blue-l) 55%, var(--blue) 80%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--blue);
  animation: fadeUp 1s ease .7s forwards, shimmer 7s linear 1.8s infinite;
}
.hero-sub { font-size: clamp(15px, 1.7vw, 19px); font-weight: 300; color: var(--white-d); max-width: 540px; line-height: 1.75; margin-bottom: 48px; opacity: 0; animation: fadeUp 1s ease .9s forwards; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; opacity: 0; animation: fadeUp 1s ease 1.1s forwards; }
.scroll-hint { position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 3; opacity: 0; animation: fadeUp 1s ease 1.5s forwards; }
.scroll-hint span { font-family: var(--mono); font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--white-dd); }
.scroll-line { width: 1px; height: 52px; background: linear-gradient(to bottom, var(--blue), transparent); animation: scrollAnim 2s ease infinite; }

/* ── 6. MARQUEE ────────────────────────────────────────────── */
.marquee { padding: 30px 0; overflow: hidden; border-top: 1px solid var(--gb); border-bottom: 1px solid var(--gb); background: var(--bg2); }
.marquee-track { display: flex; white-space: nowrap; animation: marquee 34s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mitem { display: inline-flex; align-items: center; gap: 52px; font-family: var(--disp); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--white-dd); flex-shrink: 0; padding-right: 52px; transition: color .3s; }
.mitem:hover { color: var(--blue); }
.mdot { width: 4px; height: 4px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }

/* ── 7. SERVICE SECTIONS & 3D STAGES ───────────────────────── */
.svc { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; border-bottom: 1px solid var(--gb); }
.svc:nth-of-type(odd)  { background: var(--bg); }
.svc:nth-of-type(even) { background: var(--bg2); }
.svc-inner { max-width: 1440px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0; min-height: 100vh; padding: 120px 52px; align-items: center; }
.svc-inner.flip .svc-text { order: 2; padding-right: 0; padding-left: 72px; }
.svc-inner.flip .svc-visual { order: 1; }
.svc-text { display: flex; flex-direction: column; justify-content: center; padding-right: 72px; }
.svc-eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--blue); margin-bottom: 18px; display: block; }
.svc.warm .svc-eyebrow { color: var(--amber); }
.svc-h2 { font-family: var(--disp); font-size: clamp(25px, 3.6vw, 52px); font-weight: 700; line-height: 1.1; margin-bottom: 22px; }
.svc-h2 .hl { color: var(--blue); }
.svc.warm .svc-h2 .hl { color: var(--amber); }
.svc-desc { font-size: 15px; font-weight: 300; color: var(--white-d); line-height: 1.85; margin-bottom: 28px; max-width: 520px; }
.svc-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.svc-features li { font-size: 13.5px; font-weight: 400; color: var(--white-d); display: flex; align-items: center; gap: 12px; }
.svc-features li::before { content: ''; width: 20px; height: 1px; background: var(--blue); flex-shrink: 0; transition: width .3s; }
.svc-features li:hover::before { width: 32px; }
.svc.warm .svc-features li::before { background: var(--amber); }
.svc-more { font-family: var(--mono); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--blue); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; transition: gap .3s; align-self: flex-start; }
.svc-more::after { content: '→'; transition: transform .3s; }
.svc-more:hover { gap: 16px; }
.svc.warm .svc-more { color: var(--amber); }
.spec-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--white-d); border: 1px solid var(--gb); background: var(--glass); padding: 8px 14px; transition: all .3s; }
.chip:hover { border-color: var(--blue-glow); color: var(--blue); transform: translateY(-2px); }
.svc.warm .chip:hover { border-color: var(--amber-glow); color: var(--amber); }

/* 3D stage frame */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.svc-visual { display: flex; align-items: center; justify-content: center; position: relative; }
.stage {
  width: 100%; max-width: 640px; height: 540px; position: relative; touch-action: pan-y; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, rgba(46,155,255,.05), transparent 70%), #03060D;
  border: 1px solid var(--gb); transition: border-color .3s, box-shadow .3s;
}
.stage:hover { box-shadow: 0 0 60px rgba(46,155,255,.08) inset; }
.stage:active { border-color: var(--blue-glow); }
.svc.warm .stage { background: radial-gradient(ellipse at 50% 60%, rgba(255,178,94,.05), transparent 70%), #03060D; }
.svc.warm .stage:hover { box-shadow: 0 0 60px rgba(255,178,94,.07) inset; }
.stage::before { content: ''; position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-top: 1px solid var(--blue); border-left: 1px solid var(--blue); z-index: 4; }
.stage::after  { content: ''; position: absolute; bottom: 0; right: 0; width: 20px; height: 20px; border-bottom: 1px solid var(--blue); border-right: 1px solid var(--blue); z-index: 4; }
.svc.warm .stage::before, .svc.warm .stage::after { border-color: var(--amber); }
.telemetry { position: absolute; top: 14px; left: 16px; z-index: 4; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--white-dd); display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.telemetry .tv { color: var(--blue); }
.svc.warm .telemetry .tv { color: var(--amber); }
.stage-label { position: absolute; bottom: 14px; right: 16px; z-index: 4; font-family: var(--mono); font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--white-dd); pointer-events: none; }
.drag-hint { position: absolute; bottom: 14px; left: 16px; z-index: 4; font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--blue); pointer-events: none; display: flex; align-items: center; gap: 8px; opacity: .85; transition: opacity .6s; }
.drag-hint::before { content: '⟲'; font-size: 13px; animation: hintSpin 3s linear infinite; display: inline-block; }
.svc.warm .drag-hint { color: var(--amber); }
.stage.dragged .drag-hint { opacity: 0; }

/* stage controls (Ketra sliders) */
.dim-ctl {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 40px; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em; color: var(--white-d);
  background: rgba(4,7,15,.82); padding: 8px 14px; border: 1px solid var(--gb);
}
.dim-ctl input { touch-action: none; -webkit-appearance: none; appearance: none; width: 150px; height: 2px; background: linear-gradient(90deg, #3a2c1a, var(--amber)); outline: none; }
.dim-ctl input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--amber); border: 2px solid #0a0f18; }
.dim-ctl input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--amber); border: 2px solid #0a0f18; }
.ketra-ctls { flex-direction: column; gap: 9px; align-items: stretch; }
.ctl-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.ctl-row span { min-width: 44px; }
.ctl-row span:last-child { text-align: right; }
.ketra-ctls input[data-k="cct"] { background: linear-gradient(90deg, #FF8A2A, #FFD9A8, #FFF6E8, #CFE4FF, #9CC8FF); }

/* scanline — travels via transform (compositor-only), never `top` (layout per frame) */
.stage .scanline { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--blue-glow), transparent); z-index: 3; animation: scan 5s linear infinite; pointer-events: none; will-change: transform; }
.svc.warm .stage .scanline { background: linear-gradient(90deg, transparent, var(--amber-glow), transparent); }

/* ── 8. SUB-PAGE LAYOUT ────────────────────────────────────── */
.page-hero { position: relative; padding: 190px 52px 70px; text-align: center; background: var(--bg2); border-bottom: 1px solid var(--gb); overflow: hidden; }
.page-hero::before { content: ''; position: absolute; top: -40%; left: 50%; transform: translateX(-50%); width: 900px; height: 500px; background: radial-gradient(ellipse, rgba(46,155,255,.1), transparent 65%); pointer-events: none; }
.page-hero.warm::before { background: radial-gradient(ellipse, rgba(255,178,94,.09), transparent 65%); }
.crumbs { font-family: var(--mono); font-size: 9px; letter-spacing: .26em; text-transform: uppercase; color: var(--white-dd); margin-bottom: 26px; position: relative; }
.crumbs a { color: var(--white-dd); text-decoration: none; transition: color .3s; }
.crumbs a:hover { color: var(--blue); }
.crumbs .sep { margin: 0 12px; color: var(--blue); }
.page-hero h1 { font-family: var(--disp); font-size: clamp(30px, 5.4vw, 68px); font-weight: 700; line-height: 1.06; margin-bottom: 18px; position: relative; }
.page-hero h1 .hl { color: var(--blue); }
.page-hero.warm h1 .hl { color: var(--amber); }
.page-hero .lede { font-size: clamp(15px, 1.6vw, 18px); font-weight: 300; color: var(--white-d); max-width: 640px; margin: 0 auto; line-height: 1.8; position: relative; }

/* full-width stage band on service pages */
.stage-band { padding: 70px 52px; background: var(--bg); border-bottom: 1px solid var(--gb); display: flex; justify-content: center; }
.stage-band .stage { max-width: 980px; height: 560px; }
.stage-band.warm .stage { background: radial-gradient(ellipse at 50% 60%, rgba(255,178,94,.05), transparent 70%), #03060D; }
.stage-band.warm .stage::before, .stage-band.warm .stage::after { border-color: var(--amber); }
.stage-band.warm .telemetry .tv, .stage-band.warm .drag-hint { color: var(--amber); }
.stage-band.warm .scanline { background: linear-gradient(90deg, transparent, var(--amber-glow), transparent); }

/* detail grid */
.detail { padding: 110px 52px; background: var(--bg2); border-bottom: 1px solid var(--gb); }
.detail-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr .8fr; gap: 80px; align-items: start; }
.detail h2 { font-family: var(--disp); font-size: clamp(21px, 2.6vw, 34px); font-weight: 700; line-height: 1.2; margin-bottom: 24px; }
.detail h2 .hl { color: var(--blue); }
.detail.warm h2 .hl { color: var(--amber); }
.detail p { font-size: 15px; font-weight: 300; color: var(--white-d); line-height: 1.9; margin-bottom: 16px; }
.detail-side { display: flex; flex-direction: column; gap: 2px; }
.d-card { background: var(--glass); border: 1px solid var(--gb); padding: 26px 28px; transition: border-color .3s, transform .3s; }
.d-card:hover { border-color: var(--blue-glow); transform: translateX(6px); }
.detail.warm .d-card:hover { border-color: var(--amber-glow); }
.d-card h3 { font-family: var(--mono); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; font-weight: 500; }
.detail.warm .d-card h3 { color: var(--amber); }
.d-card p { font-size: 13.5px; margin: 0; line-height: 1.75; }

/* services index cards */
.svc-grid { padding: 90px 52px 120px; background: var(--bg); }
.svc-grid-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.s-card {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  background: var(--glass); border: 1px solid var(--gb); padding: 44px 38px 38px;
  text-decoration: none; overflow: hidden;
  transition: border-color .35s, transform .35s, background .35s;
}
.s-card::before { content: ''; position: absolute; top: 0; left: 0; width: 0; height: 1px; background: var(--blue); transition: width .5s ease; }
.s-card:hover { border-color: var(--blue-glow); background: rgba(46,155,255,.04); transform: translateY(-6px); }
.s-card:hover::before { width: 100%; }
.s-card.warm:hover { border-color: var(--amber-glow); background: rgba(255,178,94,.04); }
.s-card.warm::before { background: var(--amber); }
.s-num { font-family: var(--mono); font-size: 10px; letter-spacing: .3em; color: var(--white-dd); }
.s-card svg { width: 42px; height: 42px; stroke: var(--blue); fill: none; stroke-width: 1.1; opacity: .9; transition: transform .4s; }
.s-card.warm svg { stroke: var(--amber); }
.s-card:hover svg { transform: translateY(-4px) scale(1.06); }
.s-card h3 { font-family: var(--disp); font-size: 15px; font-weight: 700; letter-spacing: .04em; line-height: 1.4; color: var(--white); }
.s-card p { font-size: 13.5px; font-weight: 300; color: var(--white-d); line-height: 1.75; flex: 1; }
.s-card .go { font-family: var(--mono); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--blue); display: inline-flex; gap: 10px; transition: gap .3s; }
.s-card.warm .go { color: var(--amber); }
.s-card:hover .go { gap: 16px; }

/* ── 8b. TESTIMONIALS ──────────────────────────────────────── */
#testimonials { padding: 140px 52px; background: var(--bg2); border-top: 1px solid var(--gb); }
.t-head { text-align: center; margin-bottom: 56px; }
.t-head .svc-eyebrow { margin-bottom: 16px; }
.t-head h2 { font-family: var(--disp); font-size: clamp(24px, 3.4vw, 46px); font-weight: 700; line-height: 1.15; }
.t-head h2 .hl { color: var(--blue); }
.t-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.t-card {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  background: var(--glass); border: 1px solid var(--gb); padding: 38px 32px 32px;
  transition: border-color .35s, transform .35s, background .35s;
}
.t-card::before {
  content: '\201C'; position: absolute; top: 10px; right: 24px;
  font-family: Georgia, serif; font-size: 72px; line-height: 1; color: var(--blue-ll); pointer-events: none;
}
.t-card:hover { border-color: var(--blue-glow); background: rgba(46,155,255,.03); transform: translateY(-6px); }
.t-stars { display: flex; gap: 4px; }
.t-stars svg { width: 14px; height: 14px; fill: var(--amber); }
.t-quote { font-size: 14.5px; font-weight: 300; color: var(--white-d); line-height: 1.85; flex: 1; }
.t-who { border-top: 1px solid var(--gb); padding-top: 16px; }
.t-name { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--white); }
.t-role { font-size: 12px; font-weight: 300; color: var(--white-dd); margin-top: 5px; }

/* ── 9. ABOUT / STATS ──────────────────────────────────────── */
#about { padding: 140px 52px; position: relative; overflow: hidden; background: var(--bg); }
.about-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 50%, rgba(46,155,255,.06) 0%, transparent 55%), radial-gradient(ellipse at 20% 80%, rgba(46,155,255,.04) 0%, transparent 50%); }
.about-inner { position: relative; z-index: 2; max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.about-text .big { font-family: var(--disp); font-size: clamp(23px, 3vw, 46px); font-weight: 700; line-height: 1.16; margin-bottom: 30px; }
.about-text .big em { font-style: normal; color: var(--blue); }
.about-text p { font-size: 15px; font-weight: 300; color: var(--white-d); line-height: 1.9; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.stat-box { background: var(--glass); border: 1px solid var(--gb); padding: 38px 34px; transition: border-color .3s; }
.stat-box:hover { border-color: var(--blue-glow); }
.stat-n { font-family: var(--disp); font-size: 46px; font-weight: 700; color: var(--blue); line-height: 1; margin-bottom: 10px; }
.stat-l { font-size: 13px; font-weight: 300; color: var(--white-d); letter-spacing: .08em; }

/* ── 10. CTA / FOOTER ──────────────────────────────────────── */
#cta { padding: 170px 32px; text-align: center; position: relative; overflow: hidden; background: var(--bg2); border-top: 1px solid var(--gb); }
.cta-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 800px; height: 500px; background: radial-gradient(ellipse, rgba(46,155,255,.1), transparent 65%); pointer-events: none; animation: glowPulse 6s ease-in-out infinite; }
.cta-h { font-family: var(--disp); font-size: clamp(28px, 5vw, 64px); font-weight: 700; line-height: 1.1; margin-bottom: 20px; position: relative; }
.cta-h .accent { color: var(--blue); }
.cta-sub { font-size: 16px; font-weight: 300; color: var(--white-d); margin-bottom: 44px; position: relative; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

footer { padding: 70px 52px 46px; border-top: 1px solid var(--gb); background: var(--bg); }
.foot-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 60px; margin-bottom: 54px; }
.lf { font-family: var(--disp); font-size: 13px; font-weight: 700; letter-spacing: .14em; margin-bottom: 16px; }
.lf b { color: var(--blue); }
.foot-inner p { font-size: 13px; font-weight: 300; color: var(--white-d); line-height: 1.9; max-width: 320px; }
.foot-col h4 { font-family: var(--mono); font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--blue); margin-bottom: 18px; font-weight: 500; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 13px; font-weight: 300; color: var(--white-d); text-decoration: none; transition: color .3s, padding-left .3s; }
.foot-col a:hover { color: var(--blue); padding-left: 6px; }
.foot-base { max-width: 1240px; margin: 0 auto; padding-top: 26px; border-top: 1px solid var(--gb); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.foot-base p { font-size: 11.5px; font-weight: 300; color: var(--white-dd); }

/* ── 11. REVEALS & KEYFRAMES ───────────────────────────────── */
.fi { opacity: 0; transform: translateY(36px); transition: opacity .9s ease, transform .9s ease; }
.fi.vis { opacity: 1; transform: none; }
body:not(.js-ok) .fi { opacity: 1 !important; transform: none !important; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes scrollAnim { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(620px); opacity: 0; } }
@keyframes hintSpin { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
@keyframes glowPulse { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes shimmer { to { background-position: -220% center; } }

/* reduced-motion: calmer, slower motion rather than a frozen page —
   many Windows machines have "Animation effects" off for performance,
   not accessibility, so a dead hero reads as a bug */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation-duration: 68s; }
  .scroll-line, .cta-glow { animation: none; }
  .stage .scanline { display: none; }
  h1.hero-h1 .accent { animation: fadeUp 1s ease .7s forwards, shimmer 14s linear 1.8s infinite; }
  .fi { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ── 12. MEDIA QUERIES ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .svc-inner { grid-template-columns: 1fr; padding: 100px 24px; gap: 44px; }
  .svc-text, .svc-inner.flip .svc-text { padding: 0; order: 1; }
  .svc-visual, .svc-inner.flip .svc-visual { order: 2; }
  .stage { height: 420px; max-width: 100%; }
  .about-inner { grid-template-columns: 1fr; gap: 56px; }
  #about { padding: 100px 24px; }
  .svc-grid-inner { grid-template-columns: repeat(2, 1fr); }
  .detail-inner { grid-template-columns: 1fr; gap: 50px; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .t-grid { grid-template-columns: 1fr 1fr; }
  #testimonials { padding: 100px 24px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .burger { display: flex; }
  nav, nav.scrolled { padding: 18px 24px; }
  .page-hero, .stage-band, .detail, .svc-grid { padding-left: 24px; padding-right: 24px; }
  footer { padding: 56px 24px 40px; }
}
@media (max-width: 640px) {
  .stage { height: 360px; }
  .stage-band .stage { height: 420px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-box { padding: 26px 22px; }
  .stat-n { font-size: 34px; }
  .svc-grid-inner { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr; gap: 36px; }
  .nav-cta { display: none; }
  .t-grid { grid-template-columns: 1fr; }
}

/* ── 13. THEME TOGGLE & LIGHT MODE ─────────────────────────── */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 34px; padding: 0;
  background: var(--glass); border: 1px solid var(--gb); transition: border-color .3s;
}
.theme-toggle:hover { border-color: var(--blue-glow); }
.theme-toggle svg { width: 15px; height: 15px; fill: none; stroke: var(--white-d); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.theme-toggle:hover svg { stroke: var(--blue); }
.theme-toggle .ic-moon { display: none; }
html[data-theme="light"] .theme-toggle .ic-sun { display: none; }
html[data-theme="light"] .theme-toggle .ic-moon { display: block; }

/* smooth cross-fade only while switching (class added briefly by JS) —
   keeps zero transition overhead the rest of the time */
html.theming, html.theming *, html.theming *::before, html.theming *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease, fill .35s ease, stroke .35s ease, opacity .35s ease !important;
}

/* light palette — the hero and the 3D stages deliberately stay dark
   (the WebGL scenes are glow-on-dark and would wash out on white) */
html[data-theme="light"] {
  --bg: #F3F5F9; --bg2: #FFFFFF; --bg3: #E7ECF4;
  --blue: #0F72D4; --blue-l: #3E97F0; --blue-ll: rgba(15,114,212,.10); --blue-glow: rgba(15,114,212,.32);
  --amber: #B96F16; --amber-glow: rgba(185,111,22,.32);
  --white: #0C1524; --white-d: rgba(12,21,36,.64); --white-dd: rgba(12,21,36,.40);
  --glass: rgba(12,21,36,.03); --gb: rgba(12,21,36,.13);
  --nav-bg: rgba(246,248,251,.94);
}
html[data-theme="light"] .dd { background: #FFFFFF; box-shadow: 0 18px 40px rgba(12,21,36,.10); }
html[data-theme="light"] .mnav { background: rgba(243,245,249,.98); }
html[data-theme="light"] .btn-ghost { background: rgba(255,255,255,.65); }
html[data-theme="light"] body::after { opacity: .02; }

/* hero: always-dark island */
html[data-theme="light"] #hero { background: #04070F; }
html[data-theme="light"] h1.hero-h1 { color: #F2F5FA; }
html[data-theme="light"] h1.hero-h1 .accent { background: linear-gradient(100deg, #2E9BFF 20%, #6FC0FF 45%, #BFE3FF 50%, #6FC0FF 55%, #2E9BFF 80%); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .hero-sub { color: rgba(242,245,250,.6); }
html[data-theme="light"] .hero-tag { color: #6FC0FF; }
html[data-theme="light"] .hero-tag::before, html[data-theme="light"] .hero-tag::after { background: rgba(46,155,255,.28); }
html[data-theme="light"] .hero-vignette { background: radial-gradient(ellipse at center, transparent 18%, rgba(4,7,15,.55) 68%, #04070F 100%); }
html[data-theme="light"] .scroll-hint span { color: rgba(242,245,250,.35); }
html[data-theme="light"] .scroll-line { background: linear-gradient(to bottom, #2E9BFF, transparent); }
html[data-theme="light"] #hero .btn-ghost { border-color: rgba(255,255,255,.18); color: #F2F5FA; background: rgba(10,16,30,.55); }
html[data-theme="light"] #hero .btn-ghost:hover { color: #6FC0FF; border-color: rgba(46,155,255,.4); }

/* 3D stages: always-dark islands — overlay text keeps its on-dark colors */
html[data-theme="light"] .telemetry { color: rgba(242,245,250,.45); }
html[data-theme="light"] .telemetry .tv { color: #2E9BFF; }
html[data-theme="light"] .svc.warm .telemetry .tv, html[data-theme="light"] .stage-band.warm .telemetry .tv { color: #FFB25E; }
html[data-theme="light"] .stage-label { color: rgba(242,245,250,.38); }
html[data-theme="light"] .drag-hint { color: #2E9BFF; }
html[data-theme="light"] .svc.warm .drag-hint, html[data-theme="light"] .stage-band.warm .drag-hint { color: #FFB25E; }
html[data-theme="light"] .dim-ctl { color: rgba(242,245,250,.62); border-color: rgba(255,255,255,.1); }
html[data-theme="light"] .stage { border-color: rgba(12,21,36,.16); }
html[data-theme="light"] .stage::before, html[data-theme="light"] .stage::after { border-color: #2E9BFF; }
html[data-theme="light"] .svc.warm .stage::before, html[data-theme="light"] .svc.warm .stage::after,
html[data-theme="light"] .stage-band.warm .stage::before, html[data-theme="light"] .stage-band.warm .stage::after { border-color: #FFB25E; }
html[data-theme="light"] .stage .scanline { background: linear-gradient(90deg, transparent, rgba(46,155,255,.28), transparent); }
html[data-theme="light"] .svc.warm .stage .scanline, html[data-theme="light"] .stage-band.warm .scanline { background: linear-gradient(90deg, transparent, rgba(255,178,94,.25), transparent); }

/* ── 14. MOBILE POLISH ─────────────────────────────────────── */
/* svh = small viewport height: stable when mobile browser URL bars
   collapse/expand, so full-height sections don't jump mid-scroll.
   Browsers without svh ignore these and keep the vh values above. */
#hero { height: 100svh; }
.svc { min-height: 100svh; }
.svc-inner { min-height: 100svh; }

@media (max-width: 420px) {
  /* Syncopate is a very wide face — "INTELLIGENT." must fit a 320px screen */
  h1.hero-h1 { font-size: 9.2vw; }
  .hero-sub { font-size: 14px; }
  .hero-ctas { width: 100%; }
  .hero-ctas .btn-blue, .hero-ctas .btn-ghost { padding: 16px 26px; }
  .svc-inner { padding: 80px 20px; }
  .page-hero { padding-left: 20px; padding-right: 20px; }
  .telemetry { font-size: 8.5px; }
  .dim-ctl input { width: 120px; }
}
