/* Magnetar AI — "Magnetar Field" theme. See docs/magnetar-3d-redesign-spec.md */

@font-face {
  font-family: 'Inter'; src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk'; src: url('/assets/fonts/space-grotesk-var.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono'; src: url('/assets/fonts/jetbrains-mono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --bg-0: #05060A;
  --bg-1: #0B0D14;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.07);
  --surface-border: rgba(255,255,255,0.08);
  --text-1: #F4F6FB;
  --text-2: #A7AFC2;
  --text-3: #7D869C; /* spec #6B7389 lifted to pass WCAG AA (4.5:1) on --bg-0 */
  --cyan: #22D3EE;
  --violet: #8B5CF6;
  --amber: #F59E0B;
  --success: #34D399;
  --danger: #F87171;
  --grad-field: linear-gradient(135deg, #22D3EE 0%, #8B5CF6 100%);

  --font-head: 'Space Grotesk', 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 16px;
  --gutter: clamp(16px, 5vw, 64px);
  --maxw: 1200px;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  background: var(--bg-0);
  color: var(--text-1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(34,211,238,0.3); }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  padding: 10px 16px; border-radius: 8px;
  background: var(--amber); color: #111; font-weight: 600; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; }
.section { padding: clamp(80px, 12vw, 140px) 0; }
.section-alt { background: var(--bg-1); }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 3rem); }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.label {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.15em; color: var(--cyan);
  margin-bottom: 18px;
}
.lead { color: var(--text-2); font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); max-width: 60ch; }
.muted { color: var(--text-2); }
.grad-text { background: var(--grad-field); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin-top: 16px; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

/* ── Icons ── */
.icon { width: 24px; height: 24px; flex: none; color: var(--cyan); }
.icon-sm { width: 18px; height: 18px; }
.icon-box {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.2);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px; border-radius: 12px;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.3s;
}
.btn .icon { width: 18px; height: 18px; color: currentColor; }
.btn-primary { background: var(--amber); color: #111318; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(245,158,11,0.35); }
.btn-secondary {
  color: var(--text-1);
  background: linear-gradient(var(--bg-0), var(--bg-0)) padding-box, var(--grad-field) border-box;
  border: 1px solid transparent;
}
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(34,211,238,0.18); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* ── Glass card ── */
.glass {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s;
  transform-style: preserve-3d;
}
.glass::after { /* gradient border glow on hover */
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--grad-field);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.glass:hover::after, .glass:focus-within::after, a.glass:focus-visible::after { opacity: 1; }
.glass:hover { background: var(--surface-2); }

/* ── Reveal ── */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.visible { opacity: 1; transform: none; }

/* ── Navigation ── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, -webkit-backdrop-filter 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(5,6,10,0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-color: var(--surface-border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1320px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad-field); color: #05060A; font-size: 0.9rem; letter-spacing: 0;
  box-shadow: 0 0 22px rgba(34,211,238,0.35);
}
.brand span.ai { color: var(--cyan); }
.brand-name { white-space: nowrap; }
.brand-sub { font-weight: 500; color: var(--text-2); }
.nav-toggle { flex-shrink: 0; }
.brand { min-width: 0; }
@media (max-width: 400px) {
  .brand-name { white-space: normal; display: flex; flex-direction: column; line-height: 1.1; font-size: 1rem; }
  .brand-sub { font-size: 0.78rem; }
}
.nav-links { display: flex; gap: clamp(16px, 2.2vw, 32px); list-style: none; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color 0.2s; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text-1); }
.nav-links a.oem-link { color: var(--cyan); }
.nav .btn { min-height: 42px; padding: 9px 20px; font-size: 0.92rem; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface); cursor: pointer; place-items: center; }
.nav-toggle .icon { color: var(--text-1); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; padding: calc(var(--nav-h) + 24px) var(--gutter) 32px;
  background: rgba(5,6,10,0.96); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mobile-menu li { opacity: 0; transform: translateY(16px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); transition-delay: calc(var(--i) * 60ms + 80ms); }
.mobile-menu.open li { opacity: 1; transform: none; }
.mobile-menu ul a { display: block; padding: 12px 0; font-family: var(--font-head); font-size: 2rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--surface-border); }
.mobile-menu .btn { width: 100%; }
body.menu-open { overflow: hidden; }

/* ── Hero ── */
.hero-wrap { position: relative; height: 100vh; height: 100svh; min-height: 640px; }
.m3d .hero-wrap { height: 190vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; }
.hero-visual { position: absolute; inset: 0; z-index: 0; }
.hero-poster {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 70% 50%, rgba(255,255,255,0.9) 0, rgba(34,211,238,0.55) 3%, rgba(34,211,238,0.12) 12%, transparent 30%),
    radial-gradient(ellipse 36% 60% at 70% 50%, rgba(139,92,246,0.18), transparent 70%),
    var(--bg-0);
}
.hero-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero-canvas { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-canvas.ready { opacity: 1; }
.hero-poster { transition: opacity 1.2s var(--ease); }
.hero-visual:has(.hero-canvas.ready) .hero-poster { opacity: 0; }
.hero-canvas canvas { width: 100% !important; height: 100% !important; display: block; }
.hero-scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5,6,10,0.92) 0%, rgba(5,6,10,0.7) 38%, rgba(5,6,10,0) 62%),
              linear-gradient(0deg, var(--bg-0) 0%, rgba(5,6,10,0) 22%); }
.hero-content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--nav-h);
}
.hero-text { max-width: min(620px, 52%); will-change: opacity, transform; }
.hero-text h1 { margin-bottom: 24px; }
.hero-text .lead { margin-bottom: 36px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-strip {
  margin-top: 40px; display: flex; gap: 10px 18px; flex-wrap: wrap; align-items: center;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2);
}
.trust-strip span { display: inline-flex; align-items: center; gap: 8px; }
.trust-strip span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.morph-caption {
  position: absolute; z-index: 2; left: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter))); bottom: 14vh; max-width: 440px;
  opacity: 0; transform: translateY(24px); pointer-events: none;
}
.morph-caption p { font-family: var(--font-head); font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 600; line-height: 1.2; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 28px; transform: translateX(-50%); width: 22px; height: 36px; border: 1.5px solid var(--text-3); border-radius: 12px; }
.scroll-cue::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ── About ── */
.about { overflow: hidden; }
.field-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.35; pointer-events: none; }
.field-bg svg { width: 100%; height: 100%; }
.about .container { position: relative; z-index: 1; }
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.about-body p + p { margin-top: 16px; }
.check-list { list-style: none; margin-top: 28px; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.check-list .icon { width: 20px; height: 20px; margin-top: 3px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { padding: 24px; }
.stat-val { font-family: var(--font-head); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.stat-val .unit { color: var(--cyan); }
.stat-label { margin-top: 10px; color: var(--text-2); font-size: 0.95rem; }
.stat-wide { grid-column: 1 / -1; }
.stat-regions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 0.8rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--surface-border); text-decoration: none; }
a.chip:hover { color: var(--text-1); border-color: rgba(34,211,238,0.4); }
a.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; }
@media (pointer: coarse) { a.chip { min-height: 40px; } }
.pillars { margin-top: 16px; display: grid; gap: 16px; }
.pillar { padding: 22px 24px; display: flex; gap: 16px; }
.pillar h3 { margin-bottom: 6px; }
.pillar p { color: var(--text-2); font-size: 0.95rem; }

/* ── OEM section ── */
.oem-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: stretch; }
.twin-stage { position: relative; min-height: 520px; border-radius: 20px; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, rgba(34,211,238,0.10), transparent 65%), var(--bg-0); border: 1px solid var(--surface-border); }
.twin-poster { position: absolute; inset: 0; display: grid; place-items: center; }
.twin-poster img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.twin-canvas { position: absolute; inset: 0; opacity: 0; transition: opacity 1s var(--ease); }
.twin-canvas.ready { opacity: 1; }
.twin-poster { transition: opacity 1s var(--ease); }
.twin-stage:has(.twin-canvas.ready) .twin-poster { opacity: 0; }
.twin-canvas canvas { width: 100% !important; height: 100% !important; display: block; }
.hotspot {
  position: absolute; left: 0; top: 0; z-index: 3; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border-radius: 50%; border: 1px solid var(--cyan); background: rgba(5,6,10,0.7); cursor: pointer;
  display: grid; place-items: center; color: var(--cyan); font-family: var(--font-mono); font-size: 0.8rem;
  transition: background 0.3s, box-shadow 0.3s, opacity 0.3s;
  opacity: 0; pointer-events: none;
}
.twin-canvas.ready ~ .hotspot { opacity: 1; pointer-events: auto; }
.hotspot::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(34,211,238,0.5); animation: ping 2.4s var(--ease) infinite; }
.hotspot:hover, .hotspot[aria-expanded="true"] { background: var(--cyan); color: #05060A; box-shadow: 0 0 24px rgba(34,211,238,0.6); }
@keyframes ping { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.twin-hint .hs { display: none; }
.twin-canvas.ready ~ .twin-hint .hs { display: inline; }
.motion .twin-poster img { animation: kenburns 16s ease-in-out infinite alternate; }
.twin-stage:has(.twin-canvas.ready) .twin-poster img { animation: none; }
@media (pointer: coarse) { .hotspot { width: 40px; height: 40px; margin: -20px 0 0 -20px; } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.1) translate(-2%, 1.5%); } }
.twin-hint { position: absolute; left: 16px; bottom: 14px; z-index: 3; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; }
.oem-caps { display: flex; flex-direction: column; gap: 12px; }
.cap { overflow: hidden; }
.cap-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: none; border: 0; cursor: pointer; text-align: left; }
.cap-head h3 { flex: 1; font-size: 1.05rem; }
.cap-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); }
.cap-head .chev { color: var(--text-2); transition: transform 0.4s var(--ease); }
.cap-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.cap-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.cap-head[aria-expanded="true"] + .cap-body { grid-template-rows: 1fr; }
.cap-body > div { overflow: hidden; }
.cap-body p { padding: 0 20px 20px 54px; color: var(--text-2); font-size: 0.95rem; }
.cap-body a { color: var(--cyan); }
.cap.active { border-color: rgba(34,211,238,0.45); }
.oem-cta { margin-top: 8px; }

/* ── Services orbit ── */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.svc-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; text-decoration: none; min-height: 100%; }
.svc-card h3 { font-size: 1.08rem; }
.svc-card p { color: var(--text-2); font-size: 0.93rem; flex: 1; }
.svc-card .more { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font-size: 0.9rem; font-weight: 600; }
.svc-card .more .icon { width: 16px; height: 16px; transition: transform 0.4s var(--ease); }
.svc-card:hover .more .icon { transform: translateX(4px); }
.orbit-hint { display: none; }

.orbit-on .svc-stage { position: relative; height: 470px; perspective: 1600px; cursor: grab; touch-action: pan-y; user-select: none; }
.orbit-on .svc-stage.dragging { cursor: grabbing; }
.orbit-on .svc-grid { position: absolute; left: 50%; top: 50%; width: 0; height: 0; display: block; transform-style: preserve-3d; }
.orbit-on .svc-card {
  position: absolute; width: 270px; height: 300px; left: -135px; top: -150px;
  -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(14,17,26,0.9);
  backface-visibility: hidden;
}
.orbit-on .svc-card:hover { background: rgba(20,24,36,0.96); }
.orbit-on .orbit-hint { display: block; text-align: center; margin-top: 8px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.orbit-core { display: none; }
.orbit-on .orbit-core { display: block; position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 0, rgba(34,211,238,0.8) 12%, rgba(34,211,238,0.15) 45%, transparent 70%); filter: blur(2px); }

/* ── GCC-as-a-Service panel (inside Services) ── */
.gcc { margin-top: clamp(48px, 7vw, 88px); padding: clamp(24px, 4vw, 48px); overflow: hidden; scroll-margin-top: calc(var(--nav-h) + 16px);
  background: radial-gradient(ellipse at 100% 0%, rgba(34,211,238,0.09), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(139,92,246,0.08), transparent 50%), var(--surface); }
.gcc:hover { background: radial-gradient(ellipse at 100% 0%, rgba(34,211,238,0.09), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(139,92,246,0.08), transparent 50%), var(--surface); }
.gcc-title { font-size: clamp(1.5rem, 2.8vw, 2.3rem); max-width: 28ch; margin-bottom: 16px; }
.gcc-head .lead { max-width: 72ch; }
.bot { list-style: none; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 40px 0; }
.bot::before { content: ''; position: absolute; top: 28px; left: 28px; right: calc((100% - 48px) / 3 - 28px); height: 2px; background: var(--grad-field); opacity: 0.4; }
.bot-step { position: relative; }
.bot-icon { position: relative; z-index: 1; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-0); border: 1px solid rgba(34,211,238,0.45); box-shadow: 0 0 26px rgba(34,211,238,0.18); }
.bot-num { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); }
.bot-step h4, .gcc-col h4 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.bot-step p { color: var(--text-2); font-size: 0.95rem; }
.gcc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-top: 32px; border-top: 1px solid var(--surface-border); }
.gcc-col h4 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.gcc-col h4 .icon { width: 20px; height: 20px; }
.gcc-list { list-style: none; display: grid; gap: 9px; color: var(--text-2); font-size: 0.93rem; }
.gcc-list li { position: relative; padding-left: 16px; }
.gcc-list li::before { content: ''; position: absolute; left: 0; top: 0.68em; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.gcc-list strong { color: var(--text-1); font-weight: 600; }
.gcc-cta { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.gcc-cta .muted { font-size: 0.93rem; }
@media (max-width: 1080px) { .gcc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .bot { grid-template-columns: 1fr; gap: 26px; }
  .bot::before { top: 28px; bottom: 28px; left: 27px; right: auto; width: 2px; height: auto; background: linear-gradient(var(--cyan), var(--violet)); }
  .bot-step { padding-left: 76px; min-height: 56px; }
  .bot-icon { position: absolute; left: 0; top: 0; margin: 0; }
  .gcc-grid { grid-template-columns: 1fr; gap: 24px; }
  .gcc-cta .btn { width: 100%; }
}

/* Phones: swipeable 3D coverflow instead of the orbit (site.js sets .carousel-on) */
.svc-dots, .swipe-hint { display: none; }
.carousel-on .svc-grid {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--gutter)); padding: 12px 9% 20px; scrollbar-width: none; perspective: 900px;
}
.carousel-on .svc-grid::-webkit-scrollbar { display: none; }
.carousel-on .svc-card { flex: 0 0 82%; scroll-snap-align: center; transition: none !important; will-change: transform, opacity; }
.carousel-on .svc-dots { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.svc-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,0.2); transition: width 0.4s var(--ease), background 0.4s; }
.svc-dots button[aria-current="true"] { width: 24px; background: var(--cyan); }
.carousel-on .swipe-hint { display: block; text-align: center; margin-top: 12px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }

/* ── Process pipeline ── */
.pipe-wrap { position: relative; }
.pipe-on .pipe-wrap { height: 260vh; }
.pipe-on .pipe-sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.pipe-svg { display: none; width: 100%; height: 140px; overflow: visible; }
.pipe-on .pipe-svg { display: block; margin: 12px 0 8px; }
.pipe-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 2; }
.pipe-fill { fill: none; stroke: url(#pipeGrad); stroke-width: 2.5; }
.pipe-node { fill: var(--bg-0); stroke: rgba(255,255,255,0.18); stroke-width: 1.5; transition: stroke 0.5s, fill 0.5s; }
.pipe-node.lit { stroke: var(--cyan); fill: rgba(34,211,238,0.15); }
.pipe-packet { fill: #fff; }
.pipe-packet-glow { fill: var(--cyan); opacity: 0.6; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; }
.step { padding: 24px; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), border-color 0.5s; }
.step .num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); letter-spacing: 0.1em; }
.step h3 { margin: 12px 0 8px; display: flex; align-items: center; gap: 10px; }
.step p { color: var(--text-2); font-size: 0.95rem; }
.pipe-on .step { opacity: 0.35; transform: translateY(12px); }
.pipe-on .step.lit { opacity: 1; transform: none; border-color: rgba(34,211,238,0.4); }

/* Phones: scroll-driven timeline (site.js sets .pipe-mobile and --p) */
.pipe-dot { display: none; }
.pipe-mobile .steps::after { content: ''; position: absolute; left: 8px; top: 8px; width: 2px; height: calc((100% - 16px) * var(--p, 0));
  background: linear-gradient(var(--cyan), var(--violet)); box-shadow: 0 0 10px rgba(34,211,238,0.6); }
.pipe-mobile .pipe-dot { display: block; position: absolute; z-index: 1; left: 3px; top: calc(8px + (100% - 16px) * var(--p, 0)); width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(34,211,238,0.25), 0 0 18px var(--cyan); }
.pipe-mobile .step { opacity: 0.45; transition: opacity 0.5s var(--ease), border-color 0.5s !important; }
.pipe-mobile .step.lit { opacity: 1; border-color: rgba(34,211,238,0.4); }
.pipe-mobile .step.lit::before { background: var(--cyan) !important; box-shadow: 0 0 12px var(--cyan); }

/* ── Products ── */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prod-card { display: flex; flex-direction: column; text-decoration: none; overflow: hidden; }
.device { perspective: 1000px; padding: 28px 28px 0; }
.device-frame {
  border-radius: 12px 12px 0 0; border: 1px solid rgba(255,255,255,0.12); border-bottom: 0;
  background: #0E1119; padding: 8px 8px 0; aspect-ratio: 16 / 10;
  transform: rotateX(14deg) rotateY(-10deg); transform-origin: 50% 100%;
  transition: transform 0.7s var(--ease); box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.prod-card:hover .device-frame, .prod-card:focus-visible .device-frame { transform: none; }
.device-bar { display: flex; gap: 5px; padding: 2px 4px 8px; }
.device-bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.device-screen { height: calc(100% - 17px); border-radius: 6px 6px 0 0; overflow: hidden; position: relative; }
.device-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-placeholder { position: absolute; inset: 0; } /* TODO: screenshot — replace with a real product screenshot */
.shot-placeholder::before, .shot-placeholder::after { content: ''; position: absolute; border-radius: 4px; background: rgba(255,255,255,0.07); }
.shot-placeholder::before { left: 6%; top: 10%; width: 22%; height: 80%; }
.shot-placeholder::after { left: 33%; top: 10%; width: 61%; height: 34%; }
.ph-leafbag { background: linear-gradient(135deg, rgba(52,211,153,0.35), rgba(34,211,238,0.12) 60%, #0E1119); }
.ph-lightlink { background: linear-gradient(135deg, rgba(34,211,238,0.35), rgba(139,92,246,0.15) 60%, #0E1119); }
.ph-qmach { background: linear-gradient(135deg, rgba(139,92,246,0.4), rgba(34,211,238,0.12) 60%, #0E1119); }
.prod-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; border-top: 1px solid var(--surface-border); }
.prod-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prod-body h3 { font-size: 1.35rem; }
.prod-tagline { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); }
.prod-body p { color: var(--text-2); font-size: 0.93rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-live { color: var(--success); background: rgba(52,211,153,0.1); }
.status-beta { color: var(--amber); background: rgba(245,158,11,0.1); }
.prod-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-1); font-weight: 600; font-size: 0.92rem; }
.prod-link .icon { width: 16px; height: 16px; }

/* ── Proof (flagged) ── */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.case { padding: 24px; }
.case dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); margin-top: 14px; }
.case dd { color: var(--text-2); }
.logo-strip { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.logo-slot { width: 150px; height: 56px; border-radius: 10px; border: 1px dashed var(--surface-border); display: grid; place-items: center; color: var(--text-3); font-size: 0.8rem; }

/* ── Research ── */
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.res-card { padding: 0 0 26px; overflow: hidden; }
.res-viz { height: 170px; border-bottom: 1px solid var(--surface-border); background: radial-gradient(ellipse at 50% 100%, rgba(34,211,238,0.08), transparent 70%); }
.res-viz svg { width: 100%; height: 100%; }
.res-card .label { margin: 22px 26px 8px; font-size: 0.75rem; }
.res-card h3 { margin: 0 26px 10px; font-size: 1.3rem; }
.res-card p { margin: 0 26px 16px; color: var(--text-2); font-size: 0.93rem; }
.res-card .tags { margin: 0 26px; }
.viz-line { stroke: rgba(34,211,238,0.35); stroke-width: 1; fill: none; }
.viz-node { fill: var(--bg-0); stroke: var(--cyan); stroke-width: 1.5; }
.viz-pulse { stroke: var(--cyan); stroke-width: 1.5; fill: none; stroke-dasharray: 6 60; animation: dash 3s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -66; } }
.radar-sweep { transform-origin: 160px 85px; animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.radar-blip { fill: var(--violet); animation: blip 4s ease-out infinite; }
@keyframes blip { 0%, 100% { opacity: 0; } 10% { opacity: 1; } 60% { opacity: 0.1; } }
.tree-path { stroke: var(--violet); stroke-width: 1.5; fill: none; stroke-dasharray: 200; stroke-dashoffset: 200; animation: grow 5s var(--ease) infinite; }
@keyframes grow { 0% { stroke-dashoffset: 200; } 45%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -200; } }
.node-pulse { animation: npulse 2.4s ease-in-out infinite; }
@keyframes npulse { 0%, 100% { fill: var(--bg-0); } 50% { fill: rgba(34,211,238,0.6); } }

/* ── Contact ── */
.contact { overflow: hidden; }
.contact::before { content: ''; position: absolute; left: 50%; top: 40%; width: 900px; height: 900px; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(circle, rgba(34,211,238,0.12), rgba(139,92,246,0.06) 35%, transparent 65%); }
.contact .container { position: relative; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-info { display: grid; gap: 14px; margin-top: 32px; }
.contact-info a, .contact-info div { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); text-decoration: none; }
.contact-info a:hover { color: var(--text-1); }
.contact-info strong { color: var(--text-1); display: block; font-weight: 600; }
.perks { list-style: none; margin-top: 28px; display: grid; gap: 10px; }
.perks li { display: flex; gap: 10px; color: var(--text-2); font-size: 0.95rem; }
.perks .icon { width: 18px; height: 18px; margin-top: 4px; color: var(--success); }
.form { padding: clamp(24px, 4vw, 36px); display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.field label .req { color: var(--amber); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px;
  background: rgba(5,6,10,0.6); border: 1px solid var(--surface-border); color: var(--text-1);
  font: inherit; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--bg-1); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,0.18); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field-err { font-size: 0.82rem; color: var(--danger); min-height: 0; }
.details summary { min-height: 44px; cursor: pointer; color: var(--cyan); font-weight: 600; font-size: 0.92rem; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.details summary::-webkit-details-marker { display: none; }
.details summary .icon { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.details[open] summary .icon { transform: rotate(180deg); }
.details .form-row { margin-top: 16px; }
.form .btn { width: 100%; }
.form-status { display: none; padding: 14px 16px; border-radius: 10px; font-size: 0.95rem; }
.form-status.success { display: block; background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3); color: var(--success); }
.form-status.error { display: block; background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: var(--danger); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.25); border-top-color: #111; animation: spin 0.8s linear infinite; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--surface-border); padding: 72px 0 32px; background: var(--bg-0); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer h2 { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--cyan); margin-bottom: 16px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a, .footer .link-btn { color: var(--text-2); text-decoration: none; font-size: 0.92rem; background: none; border: 0; cursor: pointer; text-align: left; padding: 0; }
.footer a:hover, .footer .link-btn:hover { color: var(--text-1); }
.footer-bottom { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--surface-border); display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.footer-bottom p { color: var(--text-3); font-size: 0.88rem; }
.footer-tag { color: var(--text-2) !important; }

/* ── Cookie consent (existing behaviour, restyled) ── */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300; max-width: 980px; margin: 0 auto; display: none;
  padding: 20px 22px; border-radius: 16px; background: rgba(11,13,20,0.97); border: 1px solid var(--surface-border); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.cookie-banner.open { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-copy { flex: 1 1 420px; }
.cookie-copy h2, .cookie-panel h2 { font-size: 1.05rem; margin-bottom: 6px; }
.cookie-copy p, .cookie-panel p, .cookie-panel li { color: var(--text-2); font-size: 0.86rem; line-height: 1.55; }
.cookie-actions, .cookie-panel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.cookie-btn { min-height: 42px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--surface-border); background: var(--surface); color: var(--text-1); font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.cookie-btn.primary { background: var(--amber); color: #111318; border-color: transparent; }
.cookie-modal { position: fixed; inset: 0; z-index: 310; display: none; place-items: center; padding: 16px; background: rgba(0,0,0,0.6); }
.cookie-modal.open { display: grid; }
.cookie-panel { width: min(640px, 100%); max-height: 88vh; overflow: auto; padding: 26px; border-radius: 16px; background: var(--bg-1); border: 1px solid var(--surface-border); }
.cookie-panel ul { margin: 12px 0 12px 18px; display: grid; gap: 6px; }
.cookie-pref { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--surface-border); }
.cookie-pref input { width: 20px; height: 20px; accent-color: var(--cyan); flex: none; }
body.cookie-lock { overflow: auto; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .nav .btn-cta-desktop { display: none; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .prod-grid, .res-grid, .case-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .oem-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero-scrim { background: linear-gradient(0deg, rgba(5,6,10,0.96) 0%, rgba(5,6,10,0.78) 50%, rgba(5,6,10,0.2) 85%, rgba(5,6,10,0.1) 100%); }
  .hero-poster { background:
    radial-gradient(circle at 60% 30%, rgba(255,255,255,0.7) 0, rgba(34,211,238,0.45) 4%, rgba(34,211,238,0.1) 16%, transparent 38%),
    var(--bg-0); }
  .hero-text { max-width: 100%; }
  .hero-content { justify-content: flex-end; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 72px; height: auto; min-height: 100%; }
  /* Phones: let the hero grow with its content so short screens never push text under the nav. */
  .hero-wrap, .hero-stage { height: auto; min-height: 100vh; min-height: 100svh; }
  .hero-stage { position: relative; display: flex; flex-direction: column; }
  .hero-stage > .hero-content { flex: 1 0 auto; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .svc-grid, .steps, .prod-grid, .res-grid, .case-grid, .form-row { grid-template-columns: 1fr; }
  .twin-stage { min-height: 340px; }
  .steps { position: relative; padding-left: 28px; }
  .steps::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--cyan), var(--violet)); opacity: 0.5; }
  .step::before { content: ''; position: absolute; left: -26px; top: 28px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-0); border: 2px solid var(--cyan); }
  .footer-grid { grid-template-columns: 1fr; }
  .cap-body p { padding-left: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
