/* Agentevo design tokens. Shared by the marketing site (index.html) and the
 * console (console/index.html loads ../tokens.css). Load before any page CSS.
 * Source of truth: redesign brief 2026-09-26 + Apple-direction addendum.
 * Dark-only by design; every text pair below is >= 4.8:1 on its surface. */

/* Metric-matched fallbacks, so Geist swapping in moves nothing. Arial and its metric clones
 * (Liberation Sans on Linux, Arimo on ChromeOS) share one advance table, so one set of overrides
 * fits them all; Android has none of them and gets Roboto, scaled on its own. Each has a face per
 * weight: Geist Medium is wider than Regular, while the fallback draws both from its regular
 * glyphs. size-adjust is Geist's average advance over the fallback's, measured on this site's
 * copy (400: x1.025 Arial, x1.030 Roboto; 500: x1.052, x1.058); ascent and descent are Geist's
 * (1.005, 0.295) over size-adjust. */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans"), local("Arimo"), local("Arimo-Regular");
  font-weight: 400;
  size-adjust: 102.8%;
  ascent-override: 97.8%;
  descent-override: 28.7%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans"), local("Arimo"), local("Arimo-Regular");
  font-weight: 500;
  size-adjust: 105.2%;
  ascent-override: 95.5%;
  descent-override: 28%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Fallback Roboto";
  src: local("Roboto"), local("Roboto Regular"), local("Roboto-Regular");
  font-weight: 400;
  size-adjust: 103%;
  ascent-override: 97.6%;
  descent-override: 28.6%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Fallback Roboto";
  src: local("Roboto"), local("Roboto Regular"), local("Roboto-Regular");
  font-weight: 500;
  size-adjust: 105.8%;
  ascent-override: 95%;
  descent-override: 27.9%;
  line-gap-override: 0%;
}

:root {
  color-scheme: dark;

  /* ---------- surfaces (zinc, never pure black) ---------- */
  --bg-0: #09090b;          /* page canvas */
  --bg-sunken: #060607;     /* terminals, code, inputs */
  --bg-1: #111113;          /* nav material, raised sections */
  --bg-2: #18181b;          /* cards, tiles, panels */
  --bg-3: #1f1f23;          /* hover / pressed rows */

  /* ---------- text ---------- */
  --fg-0: #f4f4f5;          /* primary text, solid button fill */
  --fg-1: #a1a1aa;          /* secondary text */
  --fg-2: #8a8a93;          /* mono labels, meta (AA on every surface) */
  --fg-3: #8e939b;          /* muted micro-labels; darkest AA-safe tone on dark surfaces */

  /* ---------- lines ---------- */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-hover: rgba(255, 255, 255, 0.22);
  --line-input: #63636b;    /* component boundary, 3.34:1 */

  /* ---------- the one accent: Signal Green ---------- */
  --accent: #5bd08a;
  --accent-hover: #7adba2;
  --accent-press: #46b874;
  --on-accent: #09090b;     /* never white on accent */
  --accent-soft: rgba(91, 208, 138, 0.1);
  --accent-line: rgba(91, 208, 138, 0.32);

  /* ---------- semantics (state only, never decoration) ---------- */
  --info: #72b3ea;          /* Candidate, C2, MODIFY, running */
  --warn: #e5b454;          /* Stale, Quarantined, C3, REQUIRE_APPROVAL */
  --danger: #ee7b72;        /* Rejected, Revoked, C4, DENY, errors */
  --info-soft: rgba(114, 179, 234, 0.1);
  --warn-soft: rgba(229, 180, 84, 0.1);
  --danger-soft: rgba(238, 123, 114, 0.1);
  --info-line: rgba(114, 179, 234, 0.28);
  --warn-line: rgba(229, 180, 84, 0.28);
  --danger-line: rgba(238, 123, 114, 0.28);

  /* ---------- texture ---------- */
  --tex-dot: rgba(244, 244, 245, 0.18);
  --tex-dot-accent: rgba(91, 208, 138, 0.5);
  --tex-glyph: #52525b;
  --glow-from: #72b3ea;     /* Candidate blue ... */
  --glow-to: #5bd08a;       /* ... becomes Verified green */
  --scrim: rgba(9, 9, 11, 0.72);

  /* ---------- materials (Apple-style translucent chrome) ---------- */
  --material-thin: rgba(17, 17, 19, 0.6);
  --material: rgba(17, 17, 19, 0.72);
  --material-thick: rgba(17, 17, 19, 0.88);
  --material-blur: blur(20px) saturate(1.6);
  --material-edge: inset 0 1px 0 rgba(255, 255, 255, 0.06); /* light catching the top edge */

  /* ---------- type ---------- */
  --font-sans: "Geist", "Geist Fallback", "Geist Fallback Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Archivo", "Geist", "Geist Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ---------- redesign v2: phosphor blueprint ---------- */
  --phosphor: #8df0b3;        /* headline glint, never body text */
  --grid-line: rgba(244, 244, 245, 0.05);
  --grid-line-strong: rgba(244, 244, 245, 0.09);
  --beam: rgba(91, 208, 138, 0.55);
  --scanline: rgba(255, 255, 255, 0.025);
  --spot: rgba(141, 240, 179, 0.09);
  --d-hero: 900ms;
  /* Size-specific tracking: large type tightens, small labels open up. */
  --t-display: clamp(44px, 4.6vw + 16px, 80px);
  --t-h2: clamp(34px, 3vw + 14px, 58px);
  --t-h3: clamp(22px, 0.8vw + 16px, 28px);
  --t-h4: 18px;
  --t-body-l: 18px;
  --t-body: 16px;
  --t-body-s: 14px;
  --t-label: 11px;
  --t-mono-s: 12px;
  --t-code: 13px;
  --t-num: 24px;
  --t-num-xl: clamp(40px, 3vw + 20px, 56px);
  --t-wordmark: clamp(96px, 21vw, 320px);
  --tr-display: -0.045em;
  --tr-h2: -0.04em;
  --tr-h3: -0.02em;
  --tr-body: -0.005em;
  --tr-label: 0.12em;

  /* ---------- space (4/8) ---------- */
  --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;
  --sp-32: 128px;
  --sp-40: 160px;
  --section-y: clamp(96px, 9vw + 40px, 168px);
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --grid-gap: 24px;

  /* ---------- radii ---------- */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ---------- elevation (tinted to the canvas) ---------- */
  --hairline: 1px solid var(--line);
  --frame: 1px solid var(--line-strong);
  --e-1: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0, 0, 0, 0.5);
  --e-2: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --e-3: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 32px 80px -24px rgba(0, 0, 0, 0.8);

  /* ---------- z scale ---------- */
  --z-sticky: 20;
  --z-nav: 40;
  --z-pop: 50;
  --z-drawer: 60;
  --z-modal: 70;
  --z-toast: 80;
  --z-boot: 90;
  --z-skip: 100;

  /* ---------- motion ----------
   * Springs, not durations: --spring is a critically damped spring
   * (response 0.4s, damping 1.0) sampled into linear(); --spring-bounce is
   * damping 0.8 and is reserved for momentum (a flick, a drag release).
   * Use the paired --d-spring* durations with them. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
  --spring-bounce: cubic-bezier(0.34, 1.3, 0.64, 1);
  --d-instant: 100ms;
  --d-fast: 160ms;
  --d-base: 240ms;
  --d-slow: 480ms;
  --d-spring: 640ms;
  --d-spring-bounce: 700ms;
  --d-reveal: 720ms;
  --d-draw: 1400ms;
  --stagger: 60ms;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.067, 0.205, 0.358, 0.499, 0.619, 0.715, 0.79, 0.848, 0.89, 0.921, 0.944, 0.96, 0.972, 0.981, 0.986, 0.991, 0.993, 0.995, 0.997, 0.998, 0.999, 0.999, 0.999, 1);
    --spring-bounce: linear(0, 0.049, 0.163, 0.304, 0.448, 0.581, 0.695, 0.788, 0.861, 0.916, 0.955, 0.982, 0.999, 1.008, 1.013, 1.015, 1.015, 1.013, 1.011, 1.009, 1.007, 1.005, 1.004, 1.002, 1.001, 1.001, 1);
  }
}

@media (max-width: 1023px) {
  :root {
    --grid-gap: 16px;
  }
}

/* Accessibility preferences: gentler motion, solid materials, crisper edges. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --d-reveal: 1ms;
    --d-draw: 1ms;
    --d-hero: 1ms;
    --d-spring: 160ms;
    --d-spring-bounce: 160ms;
    --stagger: 0ms;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --material-thin: #111113;
    --material: #111113;
    --material-thick: #111113;
    --material-blur: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --fg-1: #d4d4d8;
    --fg-2: #b4b4bb;
    --line: rgba(255, 255, 255, 0.2);
    --line-strong: rgba(255, 255, 255, 0.32);
    --material: #111113;
    --material-thick: #111113;
  }
}
