/* ============================================================================
   Utya CDN — Visual System
   Self-contained. No external fonts, scripts or styles.
   Dark theme is the product's canonical look.
   Sections: fonts · tokens · reset · type · layout · nav · buttons · badges
             · hero · cards · stats · code · pricing · tables · map/diagram
             · chart · forms · footer · utilities · motion · responsive
   ============================================================================ */

/* ---------------------------------------------------------------------------
   1. FONTS  (progressive enhancement — files self-hosted, never a CDN)
   Drop InterVariable.woff2 and JetBrainsMono[wght].woff2 into
   /assets/fonts/. If the files are absent the system stacks below render a
   clean, near-identical result — the site never depends on a network fetch.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: "InterVariable";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------------
   2. DESIGN TOKENS
   --------------------------------------------------------------------------- */
:root {
  /* — Surfaces (deepest → most elevated) — */
  --bg-0: #0A0C10;   /* page */
  --bg-1: #0E1116;   /* alternating sections */
  --bg-2: #14181F;   /* cards */
  --bg-3: #1A1F28;   /* raised / input / hover surface */
  --bg-inset: #070809; /* code well, deepest */

  /* — Hairlines — */
  --line: #212834;
  --line-2: #2C3542;
  --line-accent: rgba(47, 212, 184, 0.32);

  /* — Text — */
  --fg-hi: #EAEEF4;   /* headings */
  --fg: #B7C0CC;      /* body */
  --fg-mut: #7C8797;  /* secondary */
  --fg-faint: #515B6A;/* captions, footnotes */

  /* — Brand (teal / edge-signal) — */
  --brand: #2FD4B8;
  --brand-2: #45E7CE;  /* hover / bright */
  --brand-3: #1FA48F;  /* pressed */
  --brand-ink: #04211D; /* text on brand fills */
  --brand-soft: rgba(47, 212, 184, 0.10);
  --brand-glow: rgba(47, 212, 184, 0.24);

  /* — Data-viz series & secondary accents — */
  --blue: #6E8BFF;
  --violet: #B98BFF;
  --amber: #F2C14E;

  /* — Semantic / status — */
  --ok: #3FCF8E;      --ok-soft: rgba(63, 207, 142, 0.12);
  --warn: #F2C14E;    --warn-soft: rgba(242, 193, 78, 0.12);
  --down: #F0616D;    --down-soft: rgba(240, 97, 109, 0.12);

  /* — Elevation — */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.40);
  --shadow-2: 0 18px 48px -20px rgba(0, 0, 0, 0.70);
  --glow-brand: 0 0 0 1px rgba(47, 212, 184, 0.40),
                0 10px 34px -10px rgba(47, 212, 184, 0.30);

  /* — Radii — */
  --r-sm: 8px;  --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;

  /* — Spacing scale (4px base) — */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* — Layout — */
  --maxw: 1200px;
  --maxw-wide: 1320px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(4rem, 9vw, 8rem);
  --measure: 68ch;

  /* — Type — */
  --font-sans: "InterVariable", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
               Menlo, Consolas, "Liberation Mono", monospace;

  /* — Motion — */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 140ms;
  --dur-2: 220ms;
  --dur-3: 420ms;
}

/* ---------------------------------------------------------------------------
   3. RESET & BASE
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--line-2) transparent;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg-0);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv05" 1, "ss01" 1, "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

::selection { background: var(--brand-glow); color: var(--fg-hi); }

/* Custom scrollbar (WebKit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: var(--r-full);
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover { background: #3a4553; }

/* Focus — visible only for keyboard users */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------------
   4. TYPOGRAPHY
   --------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--fg-hi);
  font-weight: 640;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4rem); line-height: 1.04; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); letter-spacing: -0.01em; }
h4 { font-size: 1.0625rem; letter-spacing: -0.01em; }

p { text-wrap: pretty; }
strong, b { color: var(--fg-hi); font-weight: 600; }
small { font-size: 0.8125rem; }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.9em; }
:not(pre) > code {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  font-size: 0.85em;
  color: var(--brand-2);
}

a.link {
  color: var(--fg-hi);
  border-bottom: 1px solid var(--line-2);
  transition: color var(--dur-1), border-color var(--dur-1);
}
a.link:hover { color: var(--brand-2); border-color: var(--line-accent); }

/* Long-form copy */
.prose { max-width: var(--measure); color: var(--fg); }
.prose > * + * { margin-top: 1em; }

/* ---------------------------------------------------------------------------
   5. LAYOUT
   --------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--maxw-wide); }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-1); border-block: 1px solid var(--line); }

/* 12-col grid helper */
.grid { display: grid; gap: var(--sp-6); }
.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/flex items keep an automatic minimum size = their content's min-content,
   which lets a wide child (a min-width table, a long code line) stretch the whole
   column past the viewport. Reset it so wide content scrolls in its own box. */
.grid > *, .hero__grid > *, .docs-grid > *, .between > * { min-width: 0; }
.table-wrap, .code, .chart-wrap { max-width: 100%; }

.stack   { display: flex; flex-direction: column; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }

.divider { height: 1px; background: var(--line); border: 0; }

/* Section header block */
.section-head { max-width: 640px; margin-bottom: var(--sp-12); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: var(--sp-4); color: var(--fg-mut); font-size: 1.0625rem; }

/* Eyebrow / kicker */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--brand);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 10px var(--brand-glow);
}

/* Decorative backgrounds */
.bg-grid {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 78%);
  opacity: 0.5;
}
.bg-aurora {
  background:
    radial-gradient(60% 55% at 20% 0%, rgba(47, 212, 184, 0.12), transparent 60%),
    radial-gradient(50% 50% at 85% 10%, rgba(110, 139, 255, 0.10), transparent 60%);
}

/* ---------------------------------------------------------------------------
   6. BUTTONS
   --------------------------------------------------------------------------- */
.btn {
  --_pad-y: 0.6rem; --_pad-x: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  padding: var(--_pad-y) var(--_pad-x);
  border-radius: var(--r-md);
  font-size: 0.9375rem; font-weight: 560; line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--dur-1), border-color var(--dur-1),
              color var(--dur-1), transform var(--dur-1), box-shadow var(--dur-2);
}
.btn:active { transform: translateY(0.5px) scale(0.995); }
.btn svg { width: 1.05em; height: 1.05em; }

.btn--primary {
  background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 24px -12px var(--brand-glow);
}
.btn--primary:hover {
  background: var(--brand-2);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 12px 30px -10px var(--brand-glow);
}
.btn--primary:active { background: var(--brand-3); }

.btn--secondary {
  background: var(--bg-3); color: var(--fg-hi);
  border-color: var(--line-2);
}
.btn--secondary:hover {
  border-color: var(--line-accent); background: #202631;
  transform: translateY(-1px);
}

.btn--ghost { color: var(--fg); padding-inline: 0.7rem; }
.btn--ghost:hover { color: var(--fg-hi); }

.btn--sm { --_pad-y: 0.45rem; --_pad-x: 0.8rem; font-size: 0.875rem; }
.btn--lg { --_pad-y: 0.8rem; --_pad-x: 1.4rem; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }

/* ---------------------------------------------------------------------------
   7. BADGES · PILLS · STATUS DOT
   --------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 0.28rem 0.6rem;
  font-size: 0.75rem; font-weight: 560; letter-spacing: 0.01em;
  color: var(--fg-mut);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
}
.badge--brand { color: var(--brand-2); border-color: var(--line-accent); background: var(--brand-soft); }

/* status dot with soft pulse */
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fg-mut); flex: none; position: relative;
}
.dot--ok   { background: var(--ok); }
.dot--warn { background: var(--warn); }
.dot--down { background: var(--down); }
.dot--ok::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--ok); opacity: 0.35; animation: pulse 2.4s var(--ease) infinite;
}

/* ---------------------------------------------------------------------------
   8. NAVIGATION
   --------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-0) 72%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2), background var(--dur-2);
}
.nav[data-scrolled="true"] {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg-0) 88%, transparent);
}
.nav__inner {
  display: flex; align-items: center; gap: var(--sp-8);
  height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: var(--sp-3); font-weight: 620; color: var(--fg-hi); letter-spacing: -0.01em; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--brand), var(--brand-3));
  color: var(--brand-ink);
  box-shadow: 0 6px 18px -8px var(--brand-glow);
}
.brand__mark svg { width: 18px; height: 18px; }

.nav__links { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.nav__link {
  padding: 0.4rem 0.7rem; border-radius: var(--r-sm);
  font-size: 0.9375rem; color: var(--fg-mut);
  transition: color var(--dur-1), background var(--dur-1);
}
.nav__link:hover { color: var(--fg-hi); background: var(--bg-2); }
.nav__link[aria-current="page"] { color: var(--fg-hi); }
.nav__cta { margin-left: var(--sp-3); }

/* mobile menu toggle */
.nav__toggle { display: none; width: 40px; height: 40px; border-radius: var(--r-sm); color: var(--fg-hi); }
.nav__toggle:hover { background: var(--bg-2); }

/* mobile drawer */
.nav__drawer { display: none; }

/* ---------------------------------------------------------------------------
   9. HERO
   --------------------------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(3rem, 6vw, 6rem); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-top: var(--sp-5); }
.hero__lede { margin-top: var(--sp-6); font-size: 1.1875rem; color: var(--fg-mut); max-width: 44ch; }
.hero__actions { margin-top: var(--sp-8); }
.hero__note { margin-top: var(--sp-4); font-size: 0.8125rem; color: var(--fg-faint); }
.hero__panel { position: relative; }

/* ---------------------------------------------------------------------------
   10. CARDS
   --------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  transition: border-color var(--dur-2), transform var(--dur-2), background var(--dur-2);
}
.card--hover:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  background: #161b23;
}
/* thin brand accent that reveals on hover */
.card--glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; pointer-events: none; opacity: 0;
  background: linear-gradient(140deg, var(--line-accent), transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity var(--dur-2);
}
.card--glow:hover::before { opacity: 1; }

.icon-chip {
  width: 42px; height: 42px; border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--brand-2);
  background: var(--brand-soft);
  border: 1px solid var(--line-accent);
  margin-bottom: var(--sp-5);
}
.icon-chip svg { width: 20px; height: 20px; }
.card h3 { margin-bottom: var(--sp-3); }
.card p { color: var(--fg-mut); font-size: 0.9375rem; }

/* ---------------------------------------------------------------------------
   11. STAT / METRIC TILES
   --------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat { background: var(--bg-2); padding: var(--sp-6); }
.stat__value { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem); font-weight: 640; letter-spacing: -0.02em; color: var(--fg-hi); font-variant-numeric: tabular-nums; }
.stat__value .unit { font-size: 0.55em; color: var(--fg-mut); font-weight: 560; margin-left: 2px; }
.stat__label { margin-top: var(--sp-2); font-size: 0.8125rem; color: var(--fg-mut); }

/* ---------------------------------------------------------------------------
   12. CODE BLOCK
   --------------------------------------------------------------------------- */
.code {
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.code__bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0.6rem 0.9rem;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
}
.code__dots { display: inline-flex; gap: 6px; }
.code__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.code__name { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--fg-mut); }
.code__copy { margin-left: auto; color: var(--fg-mut); padding: 4px 8px; border-radius: 6px; font-size: 0.8125rem; }
.code__copy:hover { color: var(--fg-hi); background: var(--bg-3); }
.code pre {
  margin: 0; padding: var(--sp-5) var(--sp-5);
  overflow-x: auto; line-height: 1.7;
  font-size: 0.8125rem; color: var(--fg);
  tab-size: 2;
}
.code pre::-webkit-scrollbar { height: 8px; }

/* Syntax tokens (apply via spans, no external highlighter needed) */
.tok-com  { color: var(--fg-faint); font-style: italic; }
.tok-key  { color: var(--violet); }
.tok-str  { color: var(--ok); }
.tok-num  { color: var(--amber); }
.tok-fn   { color: var(--blue); }
.tok-prop { color: var(--brand-2); }
.tok-punc { color: var(--fg-mut); }

/* ---------------------------------------------------------------------------
   13. PRICING
   --------------------------------------------------------------------------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); align-items: start; }
.plan {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-8) var(--sp-6);
  display: flex; flex-direction: column;
}
.plan--featured {
  border-color: var(--line-accent);
  background: linear-gradient(180deg, rgba(47,212,184,0.06), transparent 32%), var(--bg-2);
  box-shadow: var(--glow-brand);
  position: relative;
}
.plan--featured::after {
  content: "Popular"; position: absolute; top: -1px; right: var(--sp-6);
  transform: translateY(-50%);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brand-ink); background: var(--brand);
  padding: 0.25rem 0.6rem; border-radius: var(--r-full);
}
.plan__name { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-mut); }
.plan__price { margin-top: var(--sp-4); font-size: 2.6rem; font-weight: 660; letter-spacing: -0.02em; color: var(--fg-hi); font-variant-numeric: tabular-nums; }
.plan__price .per { font-size: 0.95rem; color: var(--fg-mut); font-weight: 500; }
.plan__desc { margin-top: var(--sp-3); color: var(--fg-mut); font-size: 0.9375rem; min-height: 2.6em; }
.plan__cta { margin-top: var(--sp-6); }
.plan__features { margin-top: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.plan__features li { display: flex; gap: var(--sp-3); font-size: 0.9375rem; color: var(--fg); }
.plan__features svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 2px; }
.plan__features .muted { color: var(--fg-faint); }
.plan__features .muted svg { color: var(--fg-faint); }

/* ---------------------------------------------------------------------------
   14. TABLES (status page / comparison)
   --------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 560px; }
.tbl th, .tbl td { text-align: left; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); }
.tbl thead th {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-mut); font-weight: 600; background: var(--bg-1);
}
.tbl tbody tr { transition: background var(--dur-1); }
.tbl tbody tr:hover { background: var(--bg-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.num { font-variant-numeric: tabular-nums; color: var(--fg-hi); }
.status-cell { display: inline-flex; align-items: center; gap: var(--sp-2); }

/* ---------------------------------------------------------------------------
   15. POP MAP · NETWORK DIAGRAM
   Three points of presence — honest, not "200 cities".
   Markers positioned with --x / --y (percent) over an SVG world silhouette.
   --------------------------------------------------------------------------- */
.map {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.map__world { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }
.map__world path, .map__world circle { fill: var(--line-2); }
.pop {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  width: 12px; height: 12px;
}
.pop__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(47,212,184,0.18), 0 0 16px var(--brand-glow); }
.pop__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--brand); animation: ripple 2.8s var(--ease) infinite; }
.pop__label {
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  white-space: nowrap; font-size: 0.75rem; color: var(--fg-mut);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 7px;
}

/* Network diagram: client → edge → origin */
.net { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: var(--sp-4); }
.node {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-2); padding: var(--sp-4); text-align: center;
  font-size: 0.8125rem; color: var(--fg-mut);
}
.node strong { display: block; color: var(--fg-hi); font-size: 0.9375rem; margin-top: 4px; }
.node--edge { border-color: var(--line-accent); box-shadow: 0 0 0 1px var(--brand-soft) inset; }
.edge-line { height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--line-2), var(--brand), var(--line-2)); position: relative; overflow: hidden; }
.edge-line::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--brand-2), transparent); animation: flow 2.2s linear infinite; }

/* ---------------------------------------------------------------------------
   16. LATENCY CHART (styling for a hand-drawn SVG — no chart library)
   Expects <svg class="chart"> with .chart-grid lines, .chart-area, .chart-line
   --------------------------------------------------------------------------- */
.chart-wrap { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-6); }
.chart { width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { fill: var(--fg-faint); font-size: 11px; font-family: var(--font-mono); }
.chart-area { fill: url(#areaFill); }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-line--2 { stroke: var(--blue); }
.chart-dot { fill: var(--bg-0); stroke: var(--brand); stroke-width: 2; }
.chart-legend { display: flex; gap: var(--sp-5); margin-top: var(--sp-4); font-size: 0.8125rem; color: var(--fg-mut); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------------------------------------------------------------------------
   17. FORMS  (request-access only — no sensitive data collected)
   --------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label { font-size: 0.8125rem; color: var(--fg-mut); }
.input {
  width: 100%; padding: 0.65rem 0.85rem;
  background: var(--bg-3); color: var(--fg-hi);
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
}
.input::placeholder { color: var(--fg-faint); }
.input:hover { border-color: #38424f; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.input-row .input { flex: 1 1 240px; }
.form-note { font-size: 0.8125rem; color: var(--fg-faint); }

/* ---------------------------------------------------------------------------
   18. FOOTER
   --------------------------------------------------------------------------- */
.footer { background: var(--bg-1); border-top: 1px solid var(--line); padding-block: var(--sp-16) var(--sp-8); }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--sp-8); }
.footer__brand { max-width: 30ch; }
.footer__brand p { margin-top: var(--sp-4); color: var(--fg-mut); font-size: 0.9375rem; }
.footer h5 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-mut); margin-bottom: var(--sp-4); font-weight: 600; }
.footer__col a { display: block; padding: 0.28rem 0; color: var(--fg-mut); font-size: 0.9375rem; transition: color var(--dur-1); }
.footer__col a:hover { color: var(--fg-hi); }
.footer__bottom { margin-top: var(--sp-12); padding-top: var(--sp-6); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); font-size: 0.8125rem; color: var(--fg-faint); }
.footer__status { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--fg-mut); }

/* ---------------------------------------------------------------------------
   19. UTILITIES
   --------------------------------------------------------------------------- */
.muted { color: var(--fg-mut); }
.faint { color: var(--fg-faint); }
.hi { color: var(--fg-hi); }
.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-4 { margin-top: var(--sp-4); }  .mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }  .mt-12 { margin-top: var(--sp-12); }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.no-scroll { overflow: hidden; }

/* ---------------------------------------------------------------------------
   20. MOTION
   --------------------------------------------------------------------------- */
@keyframes pulse  { 0%,100% { transform: scale(1); opacity: 0.35; } 50% { transform: scale(1.6); opacity: 0; } }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3.4); opacity: 0; } }
@keyframes flow   { to { left: 120%; } }
@keyframes rise   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* scroll reveal — JS adds .in when element enters viewport */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 70ms; }
.reveal[data-delay="2"] { transition-delay: 140ms; }
.reveal[data-delay="3"] { transition-delay: 210ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .pop__ring, .edge-line::after, .dot--ok::after { display: none; }
}

/* ---------------------------------------------------------------------------
   21. RESPONSIVE
   --------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; max-width: 44ch; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__panel { order: -1; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .plan--featured { order: -1; }

  /* nav → drawer */
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: grid; place-items: center; margin-left: auto; }
  .nav__drawer {
    display: block; position: fixed; inset: 64px 0 auto 0;
    background: var(--bg-1); border-bottom: 1px solid var(--line);
    padding: var(--sp-4) var(--gutter) var(--sp-6);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--dur-2), transform var(--dur-2);
  }
  .nav__drawer[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav__drawer a { display: block; padding: 0.7rem 0.4rem; color: var(--fg); border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav__drawer a:last-of-type { border-bottom: 0; }
  .nav__drawer .btn { margin-top: var(--sp-4); }
  .net { grid-template-columns: 1fr; }
  .net .edge-line { height: 28px; width: 2px; justify-self: center; background: linear-gradient(180deg, var(--line-2), var(--brand), var(--line-2)); }
  .net .edge-line::after { display: none; }
}

@media (max-width: 560px) {
  :root { --section-y: clamp(3rem, 12vw, 4.5rem); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__bottom { justify-content: flex-start; }
  .hero__actions .btn { width: 100%; }
  .hero__actions.cluster { flex-direction: column; align-items: stretch; }
  h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
  .stat { padding: var(--sp-5); }
  .plan__price { font-size: 2.2rem; }
}

/* ---------------------------------------------------------------------------
   22. PRINT (graceful, rarely used but cheap)
   --------------------------------------------------------------------------- */
@media print {
  :root { --bg-0: #fff; --fg: #111; --fg-hi: #000; }
  body { background: #fff; color: #111; }
  .nav, .footer, .hero__bg { display: none; }
}

/* ── FAQ accordion ─────────────────────────────────────────────── */
.faq { padding: 0; }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  cursor: pointer; list-style: none; color: var(--fg-hi); font-weight: 560;
  padding: var(--sp-5) var(--sp-6); }
.faq__q::-webkit-details-marker { display: none; }
.faq__chev { width: 20px; height: 20px; color: var(--fg-mut); flex: none;
  transition: transform var(--dur-2) var(--ease); }
.faq[open] .faq__chev { transform: rotate(180deg); color: var(--brand); }
.faq__a { margin: 0; padding: 0 var(--sp-6) var(--sp-5); }
.faq:hover .faq__q { color: var(--fg-hi); }
.faq[open] { border-color: var(--line-2); }
