/* ==========================================================================
   ECORTIQ design system
   One source of truth for every page. Sharp, bold, skeuomorphic.
   Dark graphite surfaces, machined bevels, a single amber signal accent.
   Token scale is fixed: do not introduce ad hoc colors, spacing, or radii.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Neutral graphite ramp */
  --c-900: #0b0d10;
  --c-850: #0f1216;
  --c-800: #14181d;
  --c-750: #1a1f26;
  --c-700: #20262e;
  --c-650: #272e37;
  --c-600: #313a44;
  --c-500: #45505d;
  --c-400: #5d6b7a;
  --c-300: #7d8b9a;
  --c-200: #a6b2be;
  --c-100: #cdd5dd;
  --c-050: #e9edf1;

  /* Surfaces and ink */
  --bg: var(--c-900);
  --bg-alt: var(--c-850);
  --ink: #eef2f6;
  --ink-muted: #a6b2be;
  --ink-faint: #6f7c8a;
  --ink-invert: #120a03;

  /* Single signal accent */
  --accent: #ff6a1f;
  --accent-hi: #ff8a45;
  --accent-lo: #d24d0c;
  --accent-ink: #1c0d02;
  --accent-glow: rgba(255, 106, 31, 0.35);

  /* Status */
  --ok: #3fd08a;
  --warn: #ffc24d;
  --bad: #ff5d5d;

  /* Hairlines */
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.045);
  --line-strong: rgba(255, 255, 255, 0.14);
  --edge-light: rgba(255, 255, 255, 0.09);
  --edge-dark: rgba(0, 0, 0, 0.55);

  /* Metallic panel gradients */
  --grad-panel: linear-gradient(180deg, #232a33 0%, #1a2027 52%, #161b21 100%);
  --grad-panel-raised: linear-gradient(180deg, #2a323c 0%, #1e252d 55%, #171c22 100%);
  --grad-inset: linear-gradient(180deg, #12161b 0%, #171c22 100%);
  --grad-bar: linear-gradient(180deg, #262d37 0%, #1b212880 40%, #14181d 100%);
  --grad-accent: linear-gradient(180deg, var(--accent-hi) 0%, var(--accent) 48%, var(--accent-lo) 100%);
  --grad-brushed: repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 3px);

  /* Skeuomorphic shadow recipes */
  --sh-raised:
    inset 0 1px 0 var(--edge-light),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 2px 4px rgba(0,0,0,0.5),
    0 14px 34px rgba(0,0,0,0.5);
  --sh-flat:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 1px 2px rgba(0,0,0,0.5),
    0 8px 20px rgba(0,0,0,0.35);
  --sh-inset:
    inset 0 2px 6px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(0,0,0,0.5),
    0 1px 0 rgba(255,255,255,0.05);
  --sh-btn:
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -2px 3px rgba(0,0,0,0.3),
    0 2px 3px rgba(0,0,0,0.55),
    0 8px 18px rgba(0,0,0,0.4);
  --sh-btn-accent:
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -3px 5px rgba(120,40,0,0.55),
    0 2px 3px rgba(0,0,0,0.5),
    0 10px 22px var(--accent-glow);
  --sh-pressed:
    inset 0 2px 5px rgba(0,0,0,0.6),
    inset 0 -1px 0 rgba(255,255,255,0.06);

  /* Radius: sharp */
  --r-xs: 2px;
  --r-sm: 3px;
  --r-md: 4px;
  --r-lg: 6px;
  --r-pill: 100px;

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;

  --fs-xs: 0.75rem;     /* 12 */
  --fs-sm: 0.8125rem;   /* 13 */
  --fs-base: 0.9375rem; /* 15 */
  --fs-md: 1.0625rem;   /* 17 */
  --fs-lg: 1.25rem;     /* 20 */
  --fs-xl: 1.5rem;      /* 24 */
  --fs-2xl: 1.9375rem;  /* 31 */
  --fs-3xl: 2.5rem;     /* 40 */
  --fs-4xl: 3.25rem;    /* 52 */

  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-normal: 1.6;

  /* Spacing scale (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Layout */
  --container: 1200px;
  --container-narrow: 860px;
  --gutter: 24px;
  --header-h: 68px;
  --section-y: clamp(64px, 9vw, 120px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.18s;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 78% -10%, rgba(255,106,31,0.06), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(60,80,110,0.06), transparent 55%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img, svg, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }

input, textarea, select { font: inherit; color: inherit; }

ul, ol { list-style: none; padding: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: var(--fs-4xl); line-height: var(--lh-tight); letter-spacing: -0.03em; }
h2 { font-size: var(--fs-3xl); letter-spacing: -0.025em; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }

p { color: var(--ink-muted); }

strong, b { color: var(--ink); font-weight: 600; }

.lead {
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 60ch;
}

.mono { font-family: var(--font-mono); }

.display { font-family: var(--font-display); }

.text-accent { color: var(--accent); }
.text-ink { color: var(--ink); }
.text-muted { color: var(--ink-muted); }
.text-faint { color: var(--ink-faint); }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Eyebrow: mono, uppercase, with a machined accent tick */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--grad-accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.eyebrow--muted { color: var(--ink-faint); }
.eyebrow--muted::before { background: var(--c-500); box-shadow: none; }
.eyebrow--center { justify-content: center; }

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

.section { position: relative; z-index: 1; padding-block: var(--section-y); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--flush-top { padding-top: 0; }
.section--alt { background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(0,0,0,0.15)); border-block: 1px solid var(--line-soft); }

.section-head { max-width: 62ch; margin-bottom: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lead { margin-inline: auto; }
.section-head .eyebrow { margin-bottom: var(--sp-4); }
.section-head h2 { margin-bottom: var(--sp-4); }
.section-head--center .eyebrow { justify-content: center; }

.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.stack-lg > * + * { margin-top: var(--sp-6); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-sidebar { grid-template-columns: 1.4fr 1fr; gap: var(--sp-7); align-items: start; }
.grid-split { grid-template-columns: 1fr 1fr; gap: var(--sp-7); align-items: center; }

.divider {
  height: 1px;
  border: 0;
  background: var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-py: 12px;
  --btn-px: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--btn-py) var(--btn-px);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  border-radius: var(--r-sm);
  border: 1px solid rgba(0,0,0,0.5);
  background: var(--grad-panel-raised);
  box-shadow: var(--sh-btn);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
  white-space: nowrap;
  position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: var(--sh-pressed); }

.btn .icon { width: 1.05em; height: 1.05em; }

.btn--primary {
  color: var(--accent-ink);
  background: var(--grad-accent);
  border-color: var(--accent-lo);
  box-shadow: var(--sh-btn-accent);
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}
.btn--primary:hover { background: linear-gradient(180deg, #ff9a58 0%, #ff7a2f 48%, #e2560f 100%); }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,106,31,0.06); }

.btn--sm { --btn-py: 9px; --btn-px: 15px; font-size: var(--fs-xs); }
.btn--lg { --btn-py: 15px; --btn-px: 30px; font-size: var(--fs-base); }
.btn--block { display: flex; width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  transition: gap var(--dur) var(--ease);
}
.link-arrow .icon { width: 1em; height: 1em; }
.link-arrow:hover { gap: var(--sp-3); }

/* --------------------------------------------------------------------------
   6. Panels and cards
   -------------------------------------------------------------------------- */
.panel {
  position: relative;
  background: var(--grad-panel);
  background-blend-mode: overlay;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-flat);
}
.panel--raised { background: var(--grad-panel-raised); box-shadow: var(--sh-raised); }
.panel--inset { background: var(--grad-inset); box-shadow: var(--sh-inset); border-color: rgba(0,0,0,0.4); }
.panel--pad { padding: var(--sp-6); }
.panel--pad-lg { padding: var(--sp-7); }

/* Top hairline highlight, the machined edge */
.panel::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge-light) 20%, var(--edge-light) 80%, transparent);
  border-radius: var(--r-md) var(--r-md) 0 0;
  pointer-events: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  background: var(--grad-panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-flat);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge-light), transparent);
  pointer-events: none;
}
.card--link:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--sh-raised);
}
.card--link:hover .card__icon { border-color: var(--accent); color: var(--accent); }

/* Icon chip: raised machined square */
.card__icon,
.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  color: var(--accent);
  background: var(--grad-panel-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-btn), 0 0 0 1px rgba(0,0,0,0.4);
  margin-bottom: var(--sp-5);
}
.card__icon .icon,
.icon-chip .icon { width: 24px; height: 24px; }
.icon-chip--sm { width: 36px; height: 36px; margin-bottom: 0; }
.icon-chip--sm .icon { width: 18px; height: 18px; }

.card__index {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.card h3, .card h4 { margin-bottom: var(--sp-3); }
.card p { font-size: var(--fs-base); }
.card__foot { margin-top: auto; padding-top: var(--sp-5); }

/* Generic icon span sizing */
.icon { display: inline-flex; width: 1.15em; height: 1.15em; }
.icon svg { width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   7. Header and navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--grad-bar);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 6px 22px rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
}
.site-header.is-stuck { box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 30px rgba(0,0,0,0.6); border-bottom-color: var(--line-strong); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__mark {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--grad-panel-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-btn);
}
.brand__mark svg { width: 20px; height: 20px; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.brand__word b { color: var(--accent); font-weight: 700; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.site-nav a {
  padding: 9px 13px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-muted);
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-nav a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: rgba(255,106,31,0.08);
  border-color: rgba(255,106,31,0.22);
}
/* The in-nav CTA is only for the collapsed mobile menu. */
.site-nav .btn { display: none; }

.site-header__actions { display: flex; align-items: center; gap: var(--sp-3); margin-left: var(--sp-2); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--grad-panel-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-btn);
}
.nav-toggle .icon { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   8. Hero (home) and page hero (interior)
   -------------------------------------------------------------------------- */
.hero { position: relative; z-index: 1; padding-block: clamp(64px, 10vw, 130px); overflow: hidden; }
.hero__grid { position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(1000px 620px at 60% 20%, #000 30%, transparent 78%);
}
.hero__inner { max-width: 46rem; }
.hero h1 { margin-bottom: var(--sp-5); }
.hero .lead { margin-bottom: var(--sp-6); font-size: var(--fs-lg); max-width: 44ch; }
.hero__actions { margin-bottom: var(--sp-7); }

.page-hero {
  position: relative;
  z-index: 1;
  padding-top: clamp(56px, 8vw, 92px);
  padding-bottom: clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.page-hero__inner { max-width: 52rem; }
.page-hero .eyebrow { margin-bottom: var(--sp-4); }
.page-hero h1 { font-size: var(--fs-3xl); margin-bottom: var(--sp-4); }
.page-hero .lead { font-size: var(--fs-md); }

/* Breadcrumb */
.crumbs { display: flex; align-items: center; gap: var(--sp-2); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-faint); margin-bottom: var(--sp-5); letter-spacing: 0.04em; }
.crumbs a:hover { color: var(--accent); }
.crumbs .icon { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   9. Stats / LED readouts
   -------------------------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.stat {
  padding: var(--sp-5);
  background: var(--grad-inset);
  border: 1px solid rgba(0,0,0,0.45);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-inset);
}
.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent-glow);
  letter-spacing: -0.02em;
}
.stat__value small { font-size: 0.55em; color: var(--accent-hi); }
.stat__label {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   10. Tags, chips, status
   -------------------------------------------------------------------------- */
.tag-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  background: var(--grad-panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.tag .icon { width: 14px; height: 14px; color: var(--accent); }
.tag--accent { color: var(--accent); border-color: rgba(255,106,31,0.28); background: rgba(255,106,31,0.06); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.status__dot {
  width: 8px; height: 8px; border-radius: var(--r-pill);
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok), inset 0 0 2px rgba(255,255,255,0.6);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* --------------------------------------------------------------------------
   11. Feature lists
   -------------------------------------------------------------------------- */
.list-check { display: grid; gap: var(--sp-3); }
.list-check li { display: flex; gap: var(--sp-3); align-items: flex-start; color: var(--ink-muted); font-size: var(--fs-base); }
.list-check .icon {
  flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--accent);
}
.list-check li strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

.spec-list { display: grid; gap: 0; }
.spec-list > div {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-base);
}
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt, .spec-list .k { color: var(--ink-faint); font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em; text-transform: uppercase; }
.spec-list dd, .spec-list .v { color: var(--ink); font-weight: 500; text-align: right; }

/* --------------------------------------------------------------------------
   12. Process steps
   -------------------------------------------------------------------------- */
.steps { display: grid; gap: var(--sp-4); counter-reset: step; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--sp-5);
  padding: var(--sp-6);
  background: var(--grad-panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-flat);
}
.step__num {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-lg);
  color: var(--accent);
  background: var(--grad-inset);
  border: 1px solid rgba(0,0,0,0.5);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-inset);
  text-shadow: 0 0 12px var(--accent-glow);
}
.step h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.step p { font-size: var(--fs-base); }
.step__meta { margin-top: var(--sp-4); }

/* --------------------------------------------------------------------------
   13. Case study cards
   -------------------------------------------------------------------------- */
.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: var(--sp-6);
  background: var(--grad-panel-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-flat);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.case-card::before {
  content: "";
  position: absolute;
  inset: auto -30% -40% auto;
  width: 60%; height: 60%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}
.case-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--sh-raised); }
.case-card__tag {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
}
.case-card h3 { margin: var(--sp-3) 0 var(--sp-3); font-size: var(--fs-xl); }
.case-card__metric { margin-top: auto; padding-top: var(--sp-5); display: flex; gap: var(--sp-6); }
.case-card__metric .m-val { font-family: var(--font-mono); font-size: var(--fs-xl); font-weight: 700; color: var(--ink); display: block; }
.case-card__metric .m-lab { font-size: var(--fs-xs); color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   14. Logo strip
   -------------------------------------------------------------------------- */
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-6) var(--sp-8); }
.logo-strip__item {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.85;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.logo-strip__item .icon { width: 20px; height: 20px; color: var(--c-400); }
.logo-strip__item:hover { color: var(--ink-muted); opacity: 1; }

/* --------------------------------------------------------------------------
   15. Quote / testimonial
   -------------------------------------------------------------------------- */
.quote { padding: var(--sp-7); }
.quote blockquote { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.35; letter-spacing: -0.02em; color: var(--ink); }
.quote blockquote::before { content: "\201C"; color: var(--accent); }
.quote blockquote::after { content: "\201D"; color: var(--accent); }
.quote__by { margin-top: var(--sp-5); display: flex; align-items: center; gap: var(--sp-3); }
.quote__avatar {
  width: 44px; height: 44px; flex: none; border-radius: var(--r-sm);
  background: var(--grad-panel-raised); border: 1px solid var(--line-strong);
  box-shadow: var(--sh-btn); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; color: var(--accent);
}
.quote__name { font-weight: 600; color: var(--ink); font-size: var(--fs-base); }
.quote__role { font-size: var(--fs-xs); color: var(--ink-faint); font-family: var(--font-mono); }

/* --------------------------------------------------------------------------
   16. Accordion
   -------------------------------------------------------------------------- */
.accordion { display: grid; gap: var(--sp-3); }
.accordion__item {
  background: var(--grad-panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-flat);
  overflow: hidden;
}
.accordion__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  width: 100%; text-align: left;
  padding: var(--sp-5) var(--sp-6);
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); color: var(--ink);
}
.accordion__trigger .icon { flex: none; width: 20px; height: 20px; color: var(--accent); transition: transform var(--dur) var(--ease); }
.accordion__item.is-open .accordion__trigger .icon { transform: rotate(45deg); }
.accordion__panel {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s var(--ease);
}
.accordion__panel-inner { padding: 0 var(--sp-6) var(--sp-6); color: var(--ink-muted); font-size: var(--fs-base); }

/* --------------------------------------------------------------------------
   17. Tabs
   -------------------------------------------------------------------------- */
.tabs__list {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px;
  background: var(--grad-inset); border: 1px solid rgba(0,0,0,0.45);
  border-radius: var(--r-md); box-shadow: var(--sh-inset);
  margin-bottom: var(--sp-6);
}
.tabs__tab {
  padding: 9px 16px; font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-muted);
  border-radius: var(--r-sm); border: 1px solid transparent;
  transition: all var(--dur) var(--ease);
}
.tabs__tab:hover { color: var(--ink); }
.tabs__tab.is-active {
  color: var(--accent-ink); background: var(--grad-accent);
  box-shadow: var(--sh-btn-accent); border-color: var(--accent-lo);
}
.tabs__panel { display: none; }
.tabs__panel.is-active { display: block; animation: fade 0.25s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   18. Forms
   -------------------------------------------------------------------------- */
.field { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.field label {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-muted);
}
.field label .req { color: var(--accent); }
.input, .textarea, .select {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--grad-inset);
  border: 1px solid rgba(0,0,0,0.5);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-inset);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  font-size: var(--fs-base);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--sh-inset), 0 0 0 3px var(--accent-glow);
}
.textarea { min-height: 140px; resize: vertical; }
.select { appearance: none; background-image: none; cursor: pointer; }
.field__error { font-size: var(--fs-xs); color: var(--bad); font-family: var(--font-mono); display: none; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--bad); }
.field.has-error .field__error { display: block; }
.form-note { font-size: var(--fs-xs); color: var(--ink-faint); }

.form-success {
  display: none;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: rgba(63,208,138,0.08);
  border: 1px solid rgba(63,208,138,0.3);
  border-radius: var(--r-sm);
  color: var(--ink);
}
.form-success.is-visible { display: flex; }
.form-success .icon { color: var(--ok); width: 22px; height: 22px; flex: none; }

/* Checkbox */
.check { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--ink-muted); }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   19. Tables
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-flat); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-base); background: var(--grad-panel); }
table.data th, table.data td { padding: var(--sp-4) var(--sp-5); text-align: left; border-bottom: 1px solid var(--line); }
table.data thead th {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-faint); background: rgba(0,0,0,0.25);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: rgba(255,255,255,0.02); }
table.data td strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   20. Code / terminal panel
   -------------------------------------------------------------------------- */
.terminal {
  background: linear-gradient(180deg, #0c1014, #0a0d10);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-raised);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}
.terminal__bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px var(--sp-4);
  background: var(--grad-bar);
  border-bottom: 1px solid var(--line);
}
.terminal__dots { display: flex; gap: 6px; }
.terminal__dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--c-600); box-shadow: inset 0 1px 1px rgba(0,0,0,0.6); }
.terminal__title { font-size: var(--fs-xs); color: var(--ink-faint); letter-spacing: 0.05em; }
.terminal__body { padding: var(--sp-5); line-height: 1.7; color: var(--ink-muted); overflow-x: auto; }
.terminal__body .tok-key { color: var(--accent); }
.terminal__body .tok-str { color: var(--ok); }
.terminal__body .tok-num { color: var(--accent-hi); }
.terminal__body .tok-com { color: var(--ink-faint); }
.terminal__body .tok-fn { color: #7fb4ff; }
.terminal__prompt { color: var(--accent); }

/* --------------------------------------------------------------------------
   21. CTA band
   -------------------------------------------------------------------------- */
.cta-band { position: relative; z-index: 1; padding-block: var(--section-y); }
.cta-band__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6);
  padding: clamp(32px, 5vw, 56px);
  overflow: hidden;
  position: relative;
}
.cta-band__inner::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 100% 0%, var(--accent-glow), transparent 60%),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: auto, 40px 40px;
  opacity: 0.5; pointer-events: none;
}
.cta-band__inner > * { position: relative; }
.cta-band h2 { font-size: var(--fs-2xl); margin: var(--sp-3) 0; max-width: 20ch; }
.cta-band .lead { margin-bottom: 0; }
.cta-band__actions { display: flex; flex-direction: column; gap: var(--sp-3); flex: none; }

/* --------------------------------------------------------------------------
   22. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative; z-index: 1;
  margin-top: var(--sp-8);
  background: linear-gradient(180deg, var(--c-850), var(--c-900));
  border-top: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--sp-7);
  padding-block: var(--sp-8) var(--sp-7);
}
.site-footer__brand .brand { margin-bottom: var(--sp-4); }
.site-footer__brand p { font-size: var(--fs-sm); max-width: 32ch; margin-bottom: var(--sp-5); }
.footer-col h5 {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--sp-4);
}
.footer-col ul { display: grid; gap: var(--sp-3); }
.footer-col a { font-size: var(--fs-sm); color: var(--ink-muted); transition: color var(--dur) var(--ease); display: inline-flex; align-items: center; gap: 8px; }
.footer-col a:hover { color: var(--accent); }
.footer-col a .icon { width: 15px; height: 15px; color: var(--ink-faint); }
.footer-contact a:hover .icon { color: var(--accent); }
.site-footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  flex-wrap: wrap;
  padding-block: var(--sp-5);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs); color: var(--ink-faint); font-family: var(--font-mono);
}
.site-footer__bottom a:hover { color: var(--accent); }
.site-footer__legal { display: flex; gap: var(--sp-5); flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   23. Utilities
   -------------------------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.w-full { width: 100%; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.flex-wrap { flex-wrap: wrap; }
.hide { display: none; }

.overline {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  padding: 10px 16px; background: var(--accent); color: var(--accent-ink);
  border-radius: var(--r-sm); font-weight: 600;
}
.skip-link:focus { left: 8px; }

/* --------------------------------------------------------------------------
   24. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
}

@media (max-width: 860px) {
  :root { --fs-4xl: 2.6rem; --fs-3xl: 2.05rem; }
  .site-nav, .site-header__actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header__actions { margin-left: auto; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: var(--sp-4) var(--gutter) var(--sp-6);
    margin: 0;
    background: var(--grad-bar);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    transform: translateY(-120%);
    transition: transform 0.3s var(--ease);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav a:not(.btn) { padding: 13px 14px; font-size: var(--fs-md); border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .site-nav .btn { display: flex; margin-top: var(--sp-3); justify-content: center; }

  .grid-2, .grid-3, .grid-split, .grid-sidebar { grid-template-columns: 1fr; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
  .cta-band__actions { flex-direction: row; width: 100%; }
}

@media (max-width: 560px) {
  :root { --gutter: 18px; }
  .grid-4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
  .btn-row .btn { flex: 1 1 auto; }
  .case-card__metric { gap: var(--sp-4); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .status__dot { animation: none; }
}
