/* ==========================================================================
   AnvesionTech — core design system
   Shared by every page. Page-specific styles live in /assets/css/pages/*.css
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #05070b;
  --bg-elev: #090c12;
  --surface-solid: #0c1018;
  --surface-solid-2: #111723;
  --surface: rgba(255, 255, 255, 0.028);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-3: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);

  /* Text */
  --text: #eef2f7;
  --text-2: #a9b3c2;
  --text-3: #727d8f;

  /* Brand + status */
  --brand: #3ee6c1;         /* signal teal */
  --brand-2: #b6f24a;       /* lime */
  --ok: #3ee69a;
  --warn: #ffb547;
  --bad: #ff6b6b;
  --info: #6ea8ff;

  /* Product accents */
  --dm: #9b7bff;            /* DeviceManager violet */
  --dm-2: #6ea8ff;
  --sos: #3ee6c1;           /* SecureOS teal */
  --sos-2: #b6f24a;
  --ztna: #f4b544;          /* Sovereign ZTNA gold */
  --ztna-2: #ff8a4c;
  --vdi: #4fb8ff;           /* VDI sky blue */
  --vdi-2: #7cf0ff;
  --sol: #f472b6;           /* Solutions rose */
  --sol-2: #ffa3c4;

  /* Page accent (overridden per product on <body data-product>) */
  --pa: var(--brand);
  --pa-2: var(--brand-2);
  --pa-rgb: 62, 230, 193;

  /* Shape */
  --radius-xs: 6px;
  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 24px;
  --radius-xl: 32px;

  /* Layout */
  --container: 1240px;
  --container-wide: 1440px;
  --container-narrow: 820px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --space-section: clamp(64px, 9vw, 150px);
  --space-block: clamp(28px, 4vw, 56px);

  /* Type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;

  --fs-2xs: 0.6875rem;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: clamp(0.975rem, 0.94rem + 0.18vw, 1.0625rem);
  --fs-lead: clamp(1.0625rem, 0.99rem + 0.42vw, 1.3125rem);
  --fs-h4: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem);
  --fs-h3: clamp(1.3125rem, 1.15rem + 0.8vw, 1.875rem);
  --fs-h2: clamp(1.875rem, 1.35rem + 2.5vw, 3.5rem);
  --fs-h1: clamp(2.375rem, 1.5rem + 4.3vw, 5.25rem);
  --fs-display: clamp(2.625rem, 1.3rem + 6.4vw, 7.25rem);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.9s;
}

body[data-product="dm"]   { --pa: var(--dm);   --pa-2: var(--dm-2);   --pa-rgb: 155, 123, 255; }
body[data-product="sos"]  { --pa: var(--sos);  --pa-2: var(--sos-2);  --pa-rgb: 62, 230, 193; }
body[data-product="ztna"] { --pa: var(--ztna); --pa-2: var(--ztna-2); --pa-rgb: 244, 181, 68; }
body[data-product="vdi"]  { --pa: var(--vdi);  --pa-2: var(--vdi-2);  --pa-rgb: 79, 184, 255; }
body[data-product="sol"]  { --pa: var(--sol);  --pa-2: var(--sol-2);  --pa-rgb: 244, 114, 182; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, h5, h6, li, dd, dt, figcaption { overflow-wrap: break-word; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: rgba(var(--pa-rgb), 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--pa); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

/* Ambient film grain over everything (very subtle) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -100px; z-index: 1000;
  background: var(--pa); color: #05070b; padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: calc(var(--container-wide) + var(--gutter) * 2); }
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

.section { position: relative; padding-block: var(--space-section); }
.section--tight { padding-block: calc(var(--space-section) * 0.6); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.section-head { max-width: 860px; margin-bottom: var(--space-block); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head .lead { margin-top: 18px; }

.grid { display: grid; gap: clamp(12px, 1.6vw, 20px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  /* keep a compact 2-up grid on phones to avoid endless stacking */
  .grid.grid-m2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
}
.split--rev > :first-child { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split--rev > :first-child { order: 0; }
}
.stack > * + * { margin-top: var(--stack, 16px); }
.center { text-align: center; }

/* ---------- Typography ---------- */
.h-display, .h1, .h2, .h3, .h4 {
  font-family: var(--font-sans);
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.h-display { font-size: var(--fs-display); letter-spacing: -0.05em; line-height: 0.95; font-weight: 600; }
.h1 { font-size: var(--fs-h1); letter-spacing: -0.045em; }
.h2 { font-size: var(--fs-h2); line-height: 1.04; }
.h3 { font-size: var(--fs-h3); letter-spacing: -0.025em; line-height: 1.12; }
.h4 { font-size: var(--fs-h4); letter-spacing: -0.015em; line-height: 1.25; font-weight: 600; }
.lead { font-size: var(--fs-lead); color: var(--text-2); line-height: 1.55; max-width: 64ch; text-wrap: pretty; }
.body { color: var(--text-2); max-width: 68ch; text-wrap: pretty; }
.small { font-size: var(--fs-sm); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--font-mono); font-feature-settings: normal; letter-spacing: 0; }
.serif-i {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: 1.08em;
  line-height: 0.9;
}
.accent { color: var(--pa); }
.text-gradient {
  background: linear-gradient(100deg, var(--text) 10%, var(--pa) 55%, var(--pa-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pa);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(var(--pa-rgb), 0.15), 0 0 14px currentColor;
}
.eyebrow--plain::before { display: none; }
.footnote { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.5; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  --btn-bd: var(--line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 550;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), background-color 0.3s, border-color 0.3s, box-shadow 0.4s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.5s var(--ease-out); }
.btn:hover svg:last-child { transform: translateX(3px); }
.btn:active { transform: scale(0.98); }
.btn--primary {
  --btn-bg: var(--pa);
  --btn-fg: #04060a;
  --btn-bd: transparent;
  box-shadow: 0 0 0 0 rgba(var(--pa-rgb), 0), 0 10px 40px -12px rgba(var(--pa-rgb), 0.7);
}
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease-out);
}
.btn--primary:hover::after { transform: translateX(120%); }
.btn--primary:hover { box-shadow: 0 0 0 6px rgba(var(--pa-rgb), 0.14), 0 14px 50px -10px rgba(var(--pa-rgb), 0.8); }
.btn--ghost { --btn-bg: transparent; }
.btn--ghost:hover { --btn-bg: var(--surface-2); --btn-bd: rgba(var(--pa-rgb), 0.5); }
.btn--sm { min-height: 40px; padding: 9px 16px; font-size: 0.875rem; }
.btn--lg { min-height: 56px; padding: 16px 28px; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--pa); font-weight: 550;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.4s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
  line-height: 1.3;
}
.chip--pa   { color: var(--pa);  border-color: rgba(var(--pa-rgb), 0.35); background: rgba(var(--pa-rgb), 0.08); }
.chip--ok   { color: var(--ok);  border-color: rgba(62, 230, 154, 0.35); background: rgba(62, 230, 154, 0.08); }
.chip--warn { color: var(--warn); border-color: rgba(255, 181, 71, 0.35); background: rgba(255, 181, 71, 0.08); }
.chip--bad  { color: var(--bad); border-color: rgba(255, 107, 107, 0.35); background: rgba(255, 107, 107, 0.08); }
.chip--info { color: var(--info); border-color: rgba(110, 168, 255, 0.35); background: rgba(110, 168, 255, 0.08); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot--live { position: relative; }
.dot--live::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: currentColor; opacity: 0.5;
  animation: live-pulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite; will-change: transform, opacity;
}
@keyframes live-pulse { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(2.6); opacity: 0; } }

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--bg-elev);
  overflow: hidden;
  isolation: isolate;
}
.card--glow::before {
  /* gradient hairline border */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(var(--pa-rgb), 0.55), transparent 40%, transparent 65%, rgba(var(--pa-rgb), 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card--glow::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 70%; height: 70%;
  top: -35%; right: -20%;
  background: radial-gradient(closest-side, rgba(var(--pa-rgb), 0.16), transparent);
  pointer-events: none;
}
.card h3, .card .h4 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 0.95rem; line-height: 1.55; }
.card--compact { padding: 16px; border-radius: var(--radius); }
@media (max-width: 640px) {
  .card { border-radius: var(--radius); }
  .grid-m2 .card { padding: 14px; }
  .grid-m2 .card p { font-size: 0.82rem; line-height: 1.45; }
}

.icon-box {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  color: var(--pa);
  background: rgba(var(--pa-rgb), 0.1);
  border: 1px solid rgba(var(--pa-rgb), 0.22);
  margin-bottom: 16px;
  flex: none;
}
.icon-box svg { width: 22px; height: 22px; stroke-width: 1.75; }
.icon-box--sm { width: 34px; height: 34px; border-radius: 10px; margin-bottom: 12px; }
.icon-box--sm svg { width: 17px; height: 17px; }
.icon { width: 20px; height: 20px; stroke-width: 1.75; flex: none; }

/* ---------- Lists ---------- */
.checklist { list-style: none; padding: 0; display: grid; gap: 10px; }
.checklist li {
  position: relative;
  padding-left: 28px;
  color: var(--text-2);
  line-height: 1.5;
}
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 0.2em;
  width: 18px; height: 18px; border-radius: 6px;
  background: rgba(var(--pa-rgb), 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
  border: 1px solid rgba(var(--pa-rgb), 0.4);
}
.checklist--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
@media (max-width: 640px) { .checklist--2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Stats ---------- */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__num {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat__num .unit { color: var(--pa); }
.stat__label { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.4; max-width: 26ch; }

/* ---------- Browser / app frame for product screenshots ---------- */
.frame {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #0b0f17;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 120px -30px rgba(0, 0, 0, 0.9),
    0 30px 90px -40px rgba(var(--pa-rgb), 0.45);
  overflow: hidden;
}
.frame__bar {
  display: flex; align-items: center; gap: 12px;
  height: 34px; padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #121826, #0d121c);
}
.frame__dots { display: flex; gap: 6px; }
.frame__dots i { width: 9px; height: 9px; border-radius: 50%; background: #2a3242; display: block; }
.frame__dots i:nth-child(1) { background: #ff6b6b; opacity: 0.8; }
.frame__dots i:nth-child(2) { background: #ffb547; opacity: 0.8; }
.frame__dots i:nth-child(3) { background: #3ee69a; opacity: 0.8; }
.frame__url {
  flex: 1; max-width: 360px; margin-inline: auto;
  height: 22px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px;
}
.frame__url::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px; border: 1.5px solid var(--ok); flex: none;
}
.frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.frame--tilt { transform: perspective(1800px) rotateX(var(--rx, 8deg)) rotateY(var(--ry, -10deg)); transform-origin: center; }
@media (max-width: 640px) {
  .frame { border-radius: 10px; }
  .frame__bar { height: 26px; }
  .frame__dots i { width: 7px; height: 7px; }
  .frame__url { font-size: 9px; height: 18px; }
}

/* ---------- Background decoration ---------- */
.bg-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}
.bg-glow {
  position: absolute; pointer-events: none; z-index: -1;
  width: min(900px, 120vw); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--pa-rgb), 0.22), rgba(var(--pa-rgb), 0.06) 45%, transparent 70%);
  filter: blur(10px);
}
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); border: 0; }

/* Light section variant (use sparingly, 1–2 per page) */
.section--light {
  --text: #0b0f17;
  --text-2: #3d4757;
  --text-3: #6b7585;
  --line: rgba(11, 15, 23, 0.1);
  --line-strong: rgba(11, 15, 23, 0.18);
  --surface: rgba(11, 15, 23, 0.03);
  --surface-2: rgba(11, 15, 23, 0.05);
  --bg-elev: #ffffff;
  color-scheme: light;
  background: #f3f5f8;
  color: var(--text);
}
.section--light .card { background: #fff; box-shadow: 0 1px 2px rgba(11, 15, 23, 0.04), 0 12px 40px -20px rgba(11, 15, 23, 0.2); }
.section--light .eyebrow { color: color-mix(in srgb, var(--pa) 60%, #0b0f17); }

/* ---------- Marquee (auto-moving, no interaction) ---------- */
.marquee {
  --gap: 12px;
  --speed: 40s;
  position: relative;
  display: flex;
  overflow: hidden;
  gap: var(--gap);
  min-width: 0;
  max-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; flex: none; gap: var(--gap); min-width: 100%;
  justify-content: space-around;
  animation: marquee var(--speed) linear infinite;
}
.marquee--reverse .marquee__track { animation-direction: reverse; }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }

/* ---------- Site header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: transform 0.6s var(--ease-out), background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(5, 7, 11, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: calc(var(--container-wide) + var(--gutter) * 2);
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
  margin-right: auto;
}
.wordmark__a { font-weight: 650; color: var(--text); }
.wordmark__b { font-weight: 380; color: var(--text-2); }
.wordmark::after {
  content: "";
  width: 6px; height: 6px; border-radius: 2px; margin-left: 4px;
  background: var(--pa);
  box-shadow: 0 0 12px var(--pa);
  align-self: center;
  transform: translateY(-5px);
}
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: color 0.25s, background-color 0.25s;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--pa); transform: translateX(-50%);
}
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--text); border-radius: 2px;
  transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out);
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: rgba(5, 7, 11, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu a.mm-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 1.35rem; font-weight: 550; letter-spacing: -0.03em;
}
.mobile-menu a.mm-sub { padding: 10px 4px 10px 18px; font-size: 1rem; color: var(--text-2); border-bottom: 1px solid var(--line); }
.mobile-menu .mm-contact { margin-top: 24px; display: grid; gap: 10px; color: var(--text-2); font-size: 0.95rem; }
.mobile-menu .mm-contact a { color: var(--text); }
@media (max-width: 1120px) {
  .nav__links a { padding: 8px 10px; font-size: 0.86rem; }
}
@media (max-width: 1000px) {
  .nav__links, .nav__cta { display: none; }
  .nav-toggle { display: block; }
}
body.menu-open { overflow: hidden; }

/* Product sub-navigation (DeviceManager family) */
.subnav {
  position: sticky;
  top: 0;
  z-index: 40;
  transition: top 0.6s var(--ease-out);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header:not(.is-hidden) ~ main .subnav,
.site-header:not(.is-hidden) ~ .subnav { top: var(--header-h); }
.subnav__inner {
  display: flex; align-items: center; gap: 6px;
  height: 52px;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav__inner::-webkit-scrollbar { display: none; }
@media (max-width: 640px) {
  .subnav__inner {
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
    padding-right: 32px;
  }
  .subnav__label { display: none; }
}
.subnav__label { font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-right: 10px; white-space: nowrap; }
.subnav a {
  padding: 7px 12px; border-radius: 999px; font-size: 0.85rem; color: var(--text-2); white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}
.subnav a:hover { color: var(--text); background: var(--surface-2); }
.subnav a[aria-current="page"] { color: #04060a; background: var(--pa); font-weight: 550; }

/* ---------- Scroll progress + chapter HUD ---------- */
.scroll-progress {
  position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 60;
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll, 0));
  background: linear-gradient(90deg, var(--pa), var(--pa-2));
  box-shadow: 0 0 12px rgba(var(--pa-rgb), 0.8);
  pointer-events: none;
}
.chapter-hud {
  position: fixed;
  left: var(--gutter);
  bottom: 22px;
  z-index: 45;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s, transform 0.5s var(--ease-out);
}
.chapter-hud.is-visible { opacity: 1; transform: none; }
.chapter-hud__num { color: var(--pa); }
.chapter-hud__bar { width: 40px; height: 1px; background: var(--line-strong); position: relative; overflow: hidden; }
.chapter-hud__bar::after { content: ""; position: absolute; inset: 0; background: var(--pa); transform-origin: left; transform: scaleX(var(--chapter-p, 0)); }
.chapter-hud__label { color: var(--text-2); }
@media (max-width: 1100px) { .chapter-hud { display: none; } }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  overflow: hidden;
  isolation: isolate;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 40px;
}
.footer__brand p { color: var(--text-2); margin-top: 16px; max-width: 38ch; font-size: 0.95rem; }
.footer__col h2 {
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px;
}
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer__col a { color: var(--text-2); font-size: 0.95rem; transition: color 0.2s; }
.footer__col a:hover { color: var(--text); }
.footer__contact a { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.footer__contact svg { width: 16px; height: 16px; color: var(--pa); flex: none; }
.footer__mega {
  margin-top: clamp(48px, 7vw, 96px);
  font-size: clamp(3rem, 12.6vw, 12.5rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.8;
  white-space: nowrap;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.015) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none;
  pointer-events: none;
}
.footer__bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  color: var(--text-3); font-size: var(--fs-xs);
}
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer__brand { grid-column: 1 / -1; }
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-strong);
  padding: clamp(32px, 6vw, 88px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(var(--pa-rgb), 0.22), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(var(--pa-rgb), 0.1), transparent 60%),
    var(--bg-elev);
}
.cta-band .h2 { max-width: 18ch; }
.cta-band__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; }
@media (max-width: 900px) { .cta-band__grid { grid-template-columns: 1fr; gap: 24px; } }
.contact-lines { display: grid; gap: 12px; }
.contact-line {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s, background-color 0.3s;
}
.contact-line:hover { border-color: rgba(var(--pa-rgb), 0.45); background: rgba(var(--pa-rgb), 0.06); }
.contact-line .icon-box { margin: 0; }
.contact-line small { display: block; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.contact-line strong { font-weight: 550; font-size: 1.02rem; letter-spacing: -0.01em; }

/* ---------- Comparison table ---------- */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.95rem; }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
.compare tbody th { font-weight: 550; color: var(--text); width: 30%; }
.compare td { color: var(--text-2); }
.compare .is-us { color: var(--text); background: rgba(var(--pa-rgb), 0.06); }
.compare thead .is-us { color: var(--pa); }

/* ---------- FAQ (always open: no clicks needed) ---------- */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq__item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.faq__item dt { font-weight: 600; font-size: var(--fs-h4); letter-spacing: -0.02em; line-height: 1.3; }
.faq__item dd { color: var(--text-2); }
@media (max-width: 760px) { .faq__item { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; } }

/* ==========================================================================
   Scroll-driven primitives (driven by /assets/js/core.js)
   Hidden "before" states only apply under html.motion, so content is always
   visible without JS, with reduced motion, or if scripts fail.
   ========================================================================== */

/* Reveal */
html.motion [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity var(--dur) var(--ease-out) var(--d, 0ms),
    transform calc(var(--dur) * 1.2) var(--ease-out) var(--d, 0ms),
    filter var(--dur) var(--ease-out) var(--d, 0ms),
    clip-path calc(var(--dur) * 1.3) var(--ease-out) var(--d, 0ms);
  will-change: opacity, transform;
}
html.motion [data-reveal="fade"]  { transform: none; }
html.motion [data-reveal="left"]  { transform: translate3d(-40px, 0, 0); }
html.motion [data-reveal="right"] { transform: translate3d(40px, 0, 0); }
html.motion [data-reveal="scale"] { transform: scale(0.94); }
html.motion [data-reveal="blur"]  { transform: translate3d(0, 16px, 0); filter: blur(12px); }
html.motion [data-reveal="clip"]  { transform: none; opacity: 1; clip-path: inset(0 0 100% 0 round 16px); }
html.motion [data-reveal="rise"]  { transform: perspective(1400px) rotateX(18deg) translate3d(0, 80px, 0) scale(0.96); transform-origin: 50% 100%; }
html.motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}
html.motion [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0 round 16px); }

/* Stagger: children of [data-stagger] reveal one after another */
html.motion [data-stagger] > * {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 0.8s var(--ease-out) calc(var(--i, 0) * var(--stagger, 80ms) + var(--d, 0ms)),
    transform 1s var(--ease-out) calc(var(--i, 0) * var(--stagger, 80ms) + var(--d, 0ms));
}
html.motion [data-stagger].is-in > * { opacity: 1; transform: none; }

/* Split headings (lines masked by JS). Hidden until JS has split them. */
html.motion [data-split]:not(.is-split) { opacity: 0; }
[data-split] .split-line { display: block; overflow: clip; padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* Scroll-linked progress: elements with [data-progress] get --p from 0 to 1 */
[data-progress] { --p: 0; }
html:not(.motion) [data-progress] { --p: 1; }

/* SVG path drawing: give paths pathLength="1" and class "draw" inside a [data-progress] or [data-reveal] host */
.draw { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 1)); }
html.motion [data-reveal] .draw-in { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-in-out) var(--d, 0ms); }
html.motion [data-reveal].is-in .draw-in { stroke-dashoffset: 0; }

/* ---------- Story: sticky scrollytelling ----------
   <section class="story" data-story style="--steps:4">
     <div class="story__sticky">
       <div class="story__visual"> ... [data-on="0 1"] elements ... </div>
       <div class="story__panels">
         <article class="story__panel" data-step-panel="0">…</article> …
       </div>
     </div>
   </section>
   JS sets: section[data-step="n"], --p (0..1 across the story), --sp (0..1 within step),
            .is-active on the current panel, .is-on on [data-on] elements listing the step,
            .is-past on [data-on-from="n"] elements once step >= n.
*/
.story { position: relative; --steps: 3; --step-h: 85svh; }
html.motion .story { height: calc(100svh + (var(--steps) - 0.35) * var(--step-h)); }
html.motion .story__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}
html.motion .story--visual-left .story__sticky { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
html.motion .story--visual-left .story__visual { order: -1; }
html.motion .story__panels { position: relative; display: grid; }
html.motion .story__panel {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  filter: blur(6px);
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out), filter 0.7s var(--ease-out);
  pointer-events: none;
}
html.motion .story__panel.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; }
html.motion .story__panel.is-past { transform: translate3d(0, -36px, 0); }
.story__visual { position: relative; min-width: 0; }
/* Stage: a box with a fixed aspect ratio that always fits the sticky viewport.
   Put your visual inside <div class="story__stage" style="--ratio: 4/3">. */
.story__stage {
  --ratio: 4 / 3;
  position: relative;
  aspect-ratio: var(--ratio);
  width: min(100%, calc(68svh * (var(--ratio))));
  margin-inline: auto;
}
@media (max-width: 900px) {
  .story__stage { width: min(100%, calc(40svh * (var(--ratio)))); }
}
html.motion [data-on] { transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out), filter 0.7s; }
html.motion [data-on]:not(.is-on) { opacity: 0; }
html:not(.motion) .story__panel + .story__panel { margin-top: 32px; }
html:not(.motion) .story__sticky { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: var(--space-section); }
html:not(.motion) .story__sticky > * { min-width: 0; }
/* DeviceManager pages carry a sticky sub-navigation under the header */
html.motion body:has(.subnav) .story__sticky { padding-top: calc(var(--header-h) + 52px); }
body:has(.subnav) { scroll-padding-top: calc(var(--header-h) + 68px); }

.story__dots { display: flex; gap: 8px; margin-top: 28px; }
.story__dots i { width: 22px; height: 3px; border-radius: 3px; background: var(--line-strong); transition: background-color 0.4s, width 0.5s var(--ease-out); }
.story__dots i.is-on { width: 40px; background: var(--pa); }
html:not(.motion) .story__dots { display: none; }

@media (max-width: 900px) {
  .story { --step-h: 66svh; }
  /* Touch phones: one swipe ≈ one step. Overrides page-level values so steps never race past. */
  html.motion.touch .story { --step-h: 96svh !important; }
  html.motion.touch { scroll-snap-type: y proximity; }
  .story__snap { position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; scroll-snap-stop: normal; pointer-events: none; visibility: hidden; }
  html.motion .story__sticky {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
    padding-top: calc(var(--header-h) + 8px);
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  html.motion .story--visual-left .story__sticky { grid-template-columns: minmax(0, 1fr); }
  html.motion .story__visual { order: -1; display: grid; place-items: center; min-height: 0; }
  html.motion .story__panels { align-content: start; }
  .story__dots { margin-top: 16px; }
}

/* ---------- Horizontal scroll track (vertical scroll drives it) ----------
   <section class="hscroll" data-hscroll>
     <div class="hscroll__head container">…</div>
     <div class="hscroll__viewport"><div class="hscroll__track"> <article class="hscroll__item">…</article> … </div></div>
   </section>
*/
.hscroll { position: relative; overflow: hidden; }
.hscroll__viewport { overflow: hidden; }
.hscroll__track, ol.hscroll__track, ul.hscroll__track {
  display: flex;
  gap: clamp(14px, 1.6vw, 22px);
  padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2));
  width: max-content;
  will-change: transform;
}
.hscroll__item { width: clamp(270px, 30vw, 400px); flex: none; }
html:not(.motion) .hscroll__viewport { overflow-x: auto; scroll-snap-type: x mandatory; }
html:not(.motion) .hscroll__item { scroll-snap-align: start; }
@media (max-width: 640px) { .hscroll__item { width: 78vw; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track[aria-hidden="true"] { display: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .scroll-progress, .chapter-hud, .mobile-menu, .footer__mega, body::before { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Sales / support addresses under the main contact lines */
.contact-alt {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.contact-alt span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 11px 14px 11px 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03) no-repeat 14px 50% / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b3c2' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  position: relative;
  transition: border-color 0.3s, background-color 0.3s;
}
.contact-alt span:hover { border-color: rgba(var(--pa-rgb), 0.45); background-color: rgba(var(--pa-rgb), 0.06); }
.contact-alt a {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
  font-weight: 550;
  overflow-wrap: anywhere;
}
.contact-alt a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.contact-alt a:hover { color: var(--pa); }
@media (max-width: 420px) { .contact-alt { grid-template-columns: minmax(0, 1fr); } }
