/* ============================================================================
   IXM — site.css · design system for ixm.ai
   ----------------------------------------------------------------------------
   Source of truth: docs/BRAND.md §8 (palette, type, motion, accessibility).
   Order: tokens → base → layout → components → utilities → motion → media.

   Component classes defined here (reuse on every page, do not redefine):
     Layout      .container  .section  .section-head  .section-sub  .grid  .grid-2  .grid-3
     Nav         .nav  .nav-inner  .logo  .logo-mark  .logo-word  .nav-links  .nav-cta
                 .nav-toggle  .site-header  .site-header.is-scrolled  .nav-links.is-open
     Hero        .hero  .hero-canvas  .hero-vignette  .hero-inner  .hero-sub  .hero-actions
     Type        .eyebrow  .gradient-text  .lede  .small  .caption  .muted  .footnote
     Buttons     .btn  .btn-primary  .btn-ghost  .btn-lg  .btn-block
     Cards       .card  .card-featured  .card-title  .card-body
     Stats       .proof  .stat  .stat-value  .stat-label
     Steps       .steps  .step  .step-num
     Tables      .table-wrap  table  th  td
     Badges      .badge  .badge-verified  .badge-strong  .badge-inferred  .badge-neutral
     Pricing     .pricing-grid  .tier  .tier-name  .tier-price  .tier-period  .tier-list
     FAQ         .faq  .faq details  .faq summary
     Forms       .form  .field  .field label  .field input/select/textarea  .field-help
                 .field-error  .form-status (.is-error .is-success)  .form-consent
     Footer      .footer  .footer-cols  .footer-col  .footer-brand  .footer-legal
     A11y        .skip-link  .visually-hidden
     Motion      .reveal  .reveal.is-visible
     Utilities   .text-center  .mt-*  .mb-*  .stack  .cluster  .divider  .frame
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* BRAND §8 palette, exact */
  --bg: #070B14;
  --surface: #0D1425;
  --ink: #E6EDF7;
  --muted: #8B97AD;
  --cyan: #22D3EE;
  --violet: #8B5CF6;
  --success: #34D399;
  --warning: #FBBF24;
  --border: rgba(230, 237, 247, 0.08);
  --gradient: linear-gradient(135deg, #22D3EE 0%, #8B5CF6 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Derived (not in BRAND, kept subtle) */
  --border-strong: rgba(230, 237, 247, 0.16);
  --surface-2: #111A2E;               /* hover state for surfaces */
  --cyan-dim: rgba(34, 211, 238, 0.12);
  --violet-dim: rgba(139, 92, 246, 0.14);
  --warning-dim: rgba(251, 191, 36, 0.14);
  --success-dim: rgba(52, 211, 153, 0.14);

  /* Type */
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-h1: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);     /* 40 → 72px */
  --fs-h2: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);  /* 28 → 40px */
  --fs-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);   /* 20 → 24px */
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);/* 16 → 17px */
  --fs-small: 0.875rem;                               /* 14px */
  --fs-caption: 0.8125rem;                            /* 13px */
  --fs-stat: clamp(2.5rem, 1.8rem + 2.6vw, 4rem);    /* 40 → 64px */

  /* Shape and space */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --max: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --section-y: clamp(4rem, 6vw + 2rem, 8rem);
  --nav-h: 72px;

  /* Motion */
  --dur: 600ms;
  --dur-fast: 200ms;

  color-scheme: dark;
}

/* ---------- 2. Base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 100%;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-size: var(--fs-body);
  overflow-x: hidden;               /* belt-and-braces against 360px overflow */
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -0.01em; }
h4 { font-size: 1.0625rem; line-height: 1.35; }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25rem; }
li { margin-bottom: var(--s-2); }
strong, b { font-weight: 600; color: var(--ink); }
small { font-size: var(--fs-small); }

a {
  color: var(--cyan);
  text-decoration: none;
  text-underline-offset: 0.18em;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--violet); text-decoration: underline; }

img, svg, canvas, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-7) 0; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }
::selection { background: rgba(34, 211, 238, 0.28); color: var(--ink); }

/* ---------- 3. Layout ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: 780px; }

.section { padding-block: var(--section-y); position: relative; }
.section + .section { border-top: 1px solid var(--border); }
.section-alt { background: linear-gradient(180deg, rgba(13, 20, 37, 0) 0%, rgba(13, 20, 37, 0.7) 50%, rgba(13, 20, 37, 0) 100%); }

.section-head { max-width: 720px; margin-bottom: var(--s-7); }
.section-head h2 { margin-bottom: var(--s-3); }
.section-sub { color: var(--muted); font-size: 1.125rem; margin: 0; }
.section-head.text-center { margin-inline: auto; }

.grid { display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
.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)); }

.stack > * + * { margin-top: var(--s-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.divider { border-top: 1px solid var(--border); }

/* Surface frame for screenshots / illustrations (BRAND §8 imagery rule) */
.frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.frame img { width: 100%; }

/* ---------- 4. Header / nav ---------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(7, 11, 20, 0.55);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.site-header.is-scrolled {
  background: rgba(13, 20, 37, 0.85);
  border-bottom-color: var(--border);
}

.nav { height: 100%; }
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

/* Logo lockup: mark 32px, wordmark Space Grotesk 600, 0.08em tracking, gap = 1/4 mark width */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  min-height: 44px;
  text-decoration: none;
}
.logo:hover { color: var(--ink); text-decoration: none; }
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex: none;
}
.logo-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;             /* cap height ≈ 55% of 32px mark */
  letter-spacing: 0.08em;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links li { margin: 0; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-3);
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
}
.nav-links a[aria-current="page"] { color: var(--cyan); }
.nav-cta { margin-left: var(--s-2); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  place-items: center;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- 5. Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 52px; padding: 0 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Primary: cyan fill, Background text (ink-on-cyan fails contrast, BRAND §8) */
.btn-primary {
  background: var(--cyan);
  color: var(--bg);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--dur-fast) var(--ease);
}
.btn-primary:hover { color: var(--bg); }
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--cyan);
  background: var(--cyan-dim);
}

/* ---------- 6. Hero ------------------------------------------------------ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  /* No-JS fallback: the still render, dimmed. The canvas covers it when JS runs. */
  background: var(--bg) url("../img/hero-infinity.jpg") center / cover no-repeat;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--bg);
}
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 30% 50%, rgba(7, 11, 20, 0.55) 0%, rgba(7, 11, 20, 0) 70%),
    linear-gradient(180deg, rgba(7, 11, 20, 0.35) 0%, rgba(7, 11, 20, 0) 30%, rgba(7, 11, 20, 0) 70%, var(--bg) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: var(--s-9);
  max-width: 680px;
}
.hero h1 { margin-bottom: var(--s-5); }
.hero-sub {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
  max-width: 560px;
  margin-bottom: var(--s-6);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- 7. Type components ------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--s-3);
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.lede { font-size: 1.125rem; color: var(--muted); }
.small { font-size: var(--fs-small); }
.caption { font-size: var(--fs-caption); letter-spacing: 0.01em; color: var(--muted); }
.muted { color: var(--muted); }
.footnote {
  font-size: var(--fs-small);
  color: var(--muted);
  border-left: 2px solid var(--warning);
  padding-left: var(--s-4);
  margin-top: var(--s-5);
  max-width: 720px;
}

/* ---------- 8. Cards ----------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-6);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.card:hover { border-color: var(--border-strong); }
.card-title { font-size: var(--fs-h3); margin-bottom: var(--s-3); }
.card-body { color: var(--muted); }
.card-body p:last-child { margin-bottom: 0; }
.card > .btn, .card-actions { margin-top: var(--s-5); }

/* Featured: gradient 1px top rule (BRAND §8: never a full fill) */
.card-featured { overflow: hidden; }
.card-featured::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient);
}

/* ---------- 9. Proof strip / stats -------------------------------------- */
.proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-5);
  padding-block: var(--s-7);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat { min-width: 0; }
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-stat);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin-bottom: var(--s-2);
}
.stat-label {
  display: block;
  color: var(--muted);
  font-size: var(--fs-small);
  max-width: 22ch;
}

/* ---------- 10. Steps ---------------------------------------------------- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}
.step {
  counter-increment: step;
  margin: 0;
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
  margin-bottom: var(--s-4);
}
.step-num::before { content: counter(step, decimal-leading-zero); }
.step h3 { margin-bottom: var(--s-2); }
.step p { color: var(--muted); }

/* ---------- 11. Tables --------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  scrollbar-width: thin;
}
table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}
thead th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(230, 237, 247, 0.02);
  white-space: nowrap;
}
tbody th { font-weight: 600; color: var(--ink); width: 22%; }
td { color: var(--muted); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
th.col-ixm, td.col-ixm { color: var(--ink); background: var(--cyan-dim); }
thead th.col-ixm { color: var(--cyan); }
.table-caption { padding: var(--s-3) var(--s-4); font-size: var(--fs-caption); color: var(--muted); }

/* ---------- 12. Badges (grades always carry text) ------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.2em 0.65em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--ink);
  background: transparent;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-verified { color: var(--cyan); border-color: rgba(34, 211, 238, 0.4); background: var(--cyan-dim); }
.badge-strong   { color: var(--violet); border-color: rgba(139, 92, 246, 0.45); background: var(--violet-dim); }
.badge-inferred { color: var(--warning); border-color: rgba(251, 191, 36, 0.4); background: var(--warning-dim); }
.badge-success  { color: var(--success); border-color: rgba(52, 211, 153, 0.4); background: var(--success-dim); }
.badge-neutral  { color: var(--muted); }

/* ---------- 13. Pricing -------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-5);
  align-items: stretch;
}
.tier {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-6);
  position: relative;
}
.tier-name { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); margin-bottom: var(--s-2); }
.tier-price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-1);
}
.tier-period { color: var(--muted); font-size: var(--fs-small); margin-bottom: var(--s-5); }
.tier-list { list-style: none; padding: 0; margin: 0 0 var(--s-5); color: var(--muted); font-size: var(--fs-small); flex: 1; }
.tier-list li { padding-left: 1.4rem; position: relative; margin-bottom: var(--s-2); }
.tier-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 10px; height: 5px;
  border-left: 1.5px solid var(--success);
  border-bottom: 1.5px solid var(--success);
  transform: rotate(-45deg);
}
.tier .btn { margin-top: auto; }

/* ---------- 14. FAQ ------------------------------------------------------ */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.5rem 1.1rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  position: relative;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.5rem; top: 50%;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details[open] summary { color: var(--cyan); }
.faq details > *:not(summary) { color: var(--muted); padding: 0 0 1.25rem; max-width: 720px; }

/* ---------- 15. Forms ---------------------------------------------------- */
.form { display: grid; gap: var(--s-5); max-width: 640px; }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 600; font-size: var(--fs-small); }
.field-help { font-size: var(--fs-caption); color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(139, 151, 173, 0.7); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--cyan);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B97AD' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}
.field [aria-invalid="true"] { border-color: var(--warning); }
.field-error {
  font-size: var(--fs-caption);
  color: var(--warning);
  min-height: 1.2em;
}
.field-error:empty { display: none; }
.form-consent { font-size: var(--fs-caption); color: var(--muted); }
.form-status {
  display: none;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font-size: var(--fs-small);
}
.form-status.is-success { display: block; border-color: rgba(52, 211, 153, 0.5); background: var(--success-dim); color: var(--ink); }
.form-status.is-error { display: block; border-color: rgba(251, 191, 36, 0.5); background: var(--warning-dim); color: var(--ink); }

/* ---------- 16. Footer --------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--s-8) var(--s-6);
  color: var(--muted);
  font-size: var(--fs-small);
}
.footer-cols {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--s-6);
  margin-bottom: var(--s-7);
}
.footer-brand p { max-width: 36ch; margin-top: var(--s-4); }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--s-3);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0; }
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--muted);
}
.footer-col a:hover { color: var(--ink); text-decoration: none; }
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: var(--fs-caption);
}
.footer-legal p { margin: 0; }

/* ---------- 17. Accessibility helpers ----------------------------------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-4);
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--cyan);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--s-4); outline-offset: 4px; text-decoration: none; color: var(--bg); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 18. Utilities ------------------------------------------------ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }     .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--s-4); } .mb-4 { margin-bottom: var(--s-4); }
.mt-6 { margin-top: var(--s-6); } .mb-6 { margin-bottom: var(--s-6); }
.mt-7 { margin-top: var(--s-7); } .mb-7 { margin-bottom: var(--s-7); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

/* ---------- 19. Motion --------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
/* Stagger siblings inside a grid/steps/proof strip */
.grid > .reveal:nth-child(2), .steps > .reveal:nth-child(2), .proof > .reveal:nth-child(2) { transition-delay: 80ms; }
.grid > .reveal:nth-child(3), .steps > .reveal:nth-child(3), .proof > .reveal:nth-child(3) { transition-delay: 160ms; }
.grid > .reveal:nth-child(4), .proof > .reveal:nth-child(4) { transition-delay: 240ms; }
.grid > .reveal:nth-child(5) { transition-delay: 320ms; }
.grid > .reveal:nth-child(6) { transition-delay: 400ms; }
/* No JS: everything visible */
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 20. Media queries -------------------------------------------- */
@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-4) var(--gutter) var(--s-6);
    background: rgba(13, 20, 37, 0.97);
    border-top: 1px solid var(--border);
    overflow-y: auto;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { min-height: 48px; font-size: 1rem; padding: 0 var(--s-3); }
  .nav-cta { margin: var(--s-4) 0 0; }
  .nav-cta .btn { width: 100%; }

  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .hero-inner { padding-block: var(--s-8); }
}

@media (max-width: 600px) {
  :root { --nav-h: 64px; }
  .logo-mark { width: 28px; height: 28px; }
  .grid-2, .grid-3, .grid-4, .pricing-grid { grid-template-columns: 1fr; }
  .proof { grid-template-columns: 1fr 1fr; }
  .stat-label { font-size: var(--fs-caption); }
  .footer-cols { grid-template-columns: 1fr; }
  .card, .step, .tier { padding: var(--s-5); }

  .hero { min-height: auto; text-align: center; }
  .hero-inner { margin-inline: auto; padding-block: var(--s-8) var(--s-7); }
  .hero-sub { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-vignette {
    background:
      radial-gradient(ellipse 90% 60% at 50% 50%, rgba(7, 11, 20, 0.6) 0%, rgba(7, 11, 20, 0) 70%),
      linear-gradient(180deg, rgba(7, 11, 20, 0.35) 0%, rgba(7, 11, 20, 0) 30%, rgba(7, 11, 20, 0) 70%, var(--bg) 100%);
  }
  .cta-row .btn, .card-actions .btn { width: 100%; }
}

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

@media (hover: none) {
  .card:hover { border-color: var(--border); }
}

@media print {
  .site-header, .hero-canvas, .hero-vignette, .skip-link, .nav-toggle { display: none; }
  .hero { min-height: auto; background: none; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}

/* --- inner pages --- */
/* Compact hero for data/solutions/pricing/about/contact/404: same dark bg, no canvas. */
.page-hero { padding-block: var(--s-8) var(--s-7); border-bottom: 1px solid var(--border); }
.page-hero h1 { margin-bottom: var(--s-4); max-width: 20ch; }
.page-hero .hero-sub { margin-bottom: 0; }
.page-hero .hero-actions { margin-top: var(--s-6); }

/* Solutions: copy | bullet card, sides swap on even blocks (desktop only). */
.solution { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7); align-items: center; padding-block: var(--s-7); }
.solution + .solution { border-top: 1px solid var(--border); }
.solution:nth-child(even) > .solution-copy { order: 2; }
.solution h2 { margin-bottom: var(--s-3); }
.solution-copy > p { color: var(--muted); }

/* Pricing: featured tier needs a positioning context for the gradient rule + flag. */
.tier.card-featured { position: relative; border-color: var(--border-strong); }
.tier-flag {
  display: inline-block;
  align-self: flex-start;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.65rem;
  margin-bottom: var(--s-3);
}

/* Contact: inline checkbox row (overrides the full-width .field input rule). */
.field-check { display: flex; align-items: flex-start; gap: var(--s-3); }
.field-check input { width: 18px; height: 18px; min-height: 0; margin-top: 0.2em; padding: 0; flex: none; accent-color: var(--cyan); }
.field-check label { font-weight: 400; font-size: var(--fs-small); }

@media (max-width: 900px) {
  .solution { grid-template-columns: 1fr; gap: var(--s-5); }
  .solution:nth-child(even) > .solution-copy { order: 0; }
}
