/* ==========================================================================
   SignLater Design 2.0 — Global Design Tokens
   The single source of truth for the visual system. All pages and components
   consume these tokens; no page may redefine them.

   Laws:
   - Amber (#B45309) = reveal / Second Number logic ONLY. Never for CTAs,
     links, categories, decoration, or stale-data warnings.
   - Radii: 3px (detail) / 6px (control) / 8px (elevated surface).
     20px is permitted ONLY for pill-shaped elements (half-height capsules).
   - --faint is contrast-fixed to #72726A (4.76:1 on paper, WCAG AA PASS
     per GATE 10 audit). Never revert to #9A9A92 (2.78:1 FAIL).
   ========================================================================== */

:root {
  /* ---------- Surfaces ---------- */
  --paper:        #FDFDFB;  /* page background */
  --paper-warm:   #FAF7EF;  /* warm section background */
  --field1:       #F5F2E9;  /* input/control surface */
  --field2:       #ECE8D9;  /* input track / inset */
  --inkbg:        #161614;  /* dark section background */
  --inkbg2:       #1E1E1A;  /* dark elevated surface */

  /* ---------- Ink scale ---------- */
  --ink:          #1B1B19;  /* primary text — 16.94:1 on paper */
  --muted:        #6E6E66;  /* secondary text — 5.05:1 on paper */
  --faint:        #72726A;  /* tertiary text — 4.76:1 on paper (CONTRAST FIXED) */

  /* ---------- Amber (reveal only) ---------- */
  --amber:        #B45309;  /* Second Number / delta / gap — 4.93:1 on paper */
  --amber-soft:   #D97706;  /* gradients only — 3.13:1, NEVER as text on paper */
  --amber-pale:   #F3D9AE;  /* washes / highlights */
  --amber-wash:   #FBF1DE;  /* light amber surface */
  --amber-on-dark:#E8A33D;  /* amber on dark — 8.55:1 on #141412 */

  /* ---------- Functional tones ---------- */
  --red:          #B91C1C;  /* errors — calm, local */
  --red-wash:     #FDF0F0;
  --green:        #15803D;  /* verified / success */
  --blue:         #1D4ED8;  /* informational only — rare */

  /* ---------- Lines & borders ---------- */
  --hairline:     #E3E1D6;  /* default 1px divider */
  --hairline-dark:#3A3A34;  /* dividers on dark */

  /* ---------- Typography ---------- */
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Helvetica Neue", Arial, sans-serif;

  /* Type scale (desktop-first; mobile overrides in components) */
  --fs-display:   clamp(44px, 6vw, 84px);   /* hero Second Number contexts */
  --fs-h1:        clamp(34px, 4.4vw, 56px);
  --fs-h2:        clamp(26px, 3.2vw, 38px);
  --fs-h3:        clamp(20px, 2.2vw, 26px);
  --fs-body:      17px;
  --fs-small:     15px;
  --fs-caption:   13px;
  --fs-eyebrow:   12px;

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-bold:    700;
  --fw-black:   800;

  /* ---------- Radii ---------- */
  --r-3: 3px;   /* detail: tags, ticks, focus rings inner */
  --r-6: 6px;   /* controls: inputs, buttons, sliders */
  --r-8: 8px;   /* elevated/product surfaces: cards, panels */
  --r-pill: 999px; /* pill exception ONLY for half-height capsules */

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

  /* ---------- Shadows (product surfaces only — text sections stay flat) ---------- */
  --sh-card:   0 2px 6px rgba(27,27,25,.07), 0 28px 56px -24px rgba(27,27,25,.25);
  --sh-tool:   0 2px 6px rgba(27,27,25,.08), 0 48px 96px -32px rgba(27,27,25,.30);
  --sh-result: 0 2px 8px rgba(27,27,25,.10), 0 56px 110px -28px rgba(120,53,15,.40);
  --sh-float:  0 8px 24px rgba(27,27,25,.10), 0 32px 64px -24px rgba(27,27,25,.28);

  /* ---------- Motion ---------- */
  --ease:        cubic-bezier(.22,.9,.28,1);
  --ease-settle: cubic-bezier(.2,.85,.3,1.12);
  --t-fast:  .18s;
  --t-med:   .35s;
  --t-slow:  .8s;

  /* ---------- Layout ---------- */
  --wrap: 1280px;
  --wrap-narrow: 880px;
  --gutter: 48px;
  --gutter-mobile: 20px;

  /* ---------- Breakpoints (for reference in media queries) ----------
     --bp-mobile: 640px | --bp-tablet: 960px | --bp-desktop: 1280px        */
}

/* ==========================================================================
   Base reset — every page includes this via components.css
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip; /* reveal transforms must never create horizontal scroll */
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Tabular numerals — the brand's numerical voice */
.num, .tnum {
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-variant-numeric: tabular-nums lining-nums;
}

a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* iOS zoom guard — form controls must be >= 16px (GATE 9 fix) */
input, select, textarea { font-size: 16px; }

/* Visible focus — keyboard users (GATE 10) */
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: var(--r-3);
}
