/* ============================================================
   THE FILED CHARTER — startaup.com design tokens
   Direction: engraved stock-certificate / corporate-charter aesthetic.
   Ground: pine #1b4332 (constitution) · bond paper cream · brass rules ·
   vermilion FILED stamp · Didone display serif · zero external assets.
   Engine lineage: Axis motion system (tokens → motion.css → axis-motion.js).
   Token names match the motion engine contract exactly.
   ============================================================ */

:root {
  /* ---- Type families (3: display / UI / mono — zero external fonts) ---- */
  --font-display: Didot, "Bodoni 72", "Bodoni MT", "Didot LT STD", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ---- Weights (engine + page) ---- */
  --w-regular: 400;
  --w-book: 400;
  --w-medium: 500;
  --w-demi: 600;
  --w-bold: 700;

  /* ---- Display scale — fluid clamp(vw), the engraved charter headlines ---- */
  --display-1: clamp(3.25rem, 7.2vw, 7.75rem);
  --display-2: clamp(2.5rem, 4.6vw, 4.5rem);
  --display-3: clamp(1.9rem, 3.2vw, 2.9rem);

  /* ---- Title scale ---- */
  --title-1: clamp(1.6rem, 2.2vw, 2.1rem);
  --title-2: clamp(1.4rem, 1.8vw, 1.7rem);
  --title-3: clamp(1.22rem, 1.5vw, 1.4rem);

  /* ---- Text scale ---- */
  --text-1: clamp(1.0625rem, 1.1vw, 1.1875rem);
  --text-2: 1rem;
  --text-3: 0.9375rem;
  --text-small: 0.875rem;
  --text-mini: 0.8125rem;
  --text-micro: 0.75rem;

  /* ---- Ground ramp — dark pine charter ---- */
  --bg-0: #0c1c15;   /* pine-black */
  --bg-1: #12291f;   /* pine-deeper */
  --bg-2: #1b4332;   /* pine — the constitution ground */
  --bg-3: #faf6ea;   /* cream content sheets */
  --bg-4: #f7f2e3;   /* bond paper */
  --bg-5: #efe8d4;   /* bond-deep — rules on paper */
  --bg-canvas: #0c1c15;  /* preloader ground */

  /* ---- Text on dark ground ---- */
  --text-1: #faf6ea;
  --text-2: rgba(250, 246, 234, 0.78);
  --text-3: rgba(250, 246, 234, 0.58);
  --text-4: rgba(250, 246, 234, 0.42);

  /* ---- Ink on paper surfaces ---- */
  --ink-1: #1a1712;
  --ink-2: #3c362c;
  --ink-3: #6b6255;

  /* ---- Border / hairline ramps ---- */
  --border-thin: rgba(250, 246, 234, 0.14);
  --border-1: rgba(250, 246, 234, 0.14);
  --border-2: rgba(250, 246, 234, 0.24);
  --border-solid: rgba(250, 246, 234, 0.24);
  --border-strong: rgba(250, 246, 234, 0.4);
  --border-paper: #d8cfb4;  /* hairline rule on bond */

  /* ---- Signal — brass rules and embossing (engine's --sig-500) ---- */
  --sig-500: #c9a24b;
  --sig-1: #c9a24b;
  --sig-2: #b8863d;
  --sig-3: #8a6230;
  --edge-lamp: rgba(201, 162, 75, 0.14);

  /* ---- Action — vermilion rubber-stamp ink ---- */
  --action-1: #c8402a;
  --action-2: #a33321;
  --action-3: #7d271a;

  /* ---- CTA system — pill iris-wipe ---- */
  --cta-bg: #c8402a;
  --cta-text: #faf6ea;
  --cta-wipe: #a33321;
  --cta-hover: #a33321;
  --cta-secondary-bg: rgba(250, 246, 234, 0.06);
  --cta-secondary-border: rgba(250, 246, 234, 0.24);
  --cta-secondary-text: #faf6ea;
  --lift-1: rgba(250, 246, 234, 0.05);

  /* ---- Paper band (exhibit / certificate card) ---- */
  --paper-bg: #f7f2e3;
  --paper-rule: #d8cfb4;
  --paper-ink: #1a1712;

  /* ---- Shadow stacks — pine-tinted depth ---- */
  --shadow-stack: 0 1px 2px rgba(12, 28, 21, 0.12),
                  0 8px 24px rgba(12, 28, 21, 0.18),
                  0 24px 64px rgba(12, 28, 21, 0.28);
  --shadow-medium: 0 12px 32px rgba(12, 28, 21, 0.35);

  /* ---- Space scale — fluid clamp ---- */
  --space-1: clamp(0.375rem, 0.5vw, 0.5rem);
  --space-2: clamp(0.625rem, 0.8vw, 0.875rem);
  --space-3: clamp(0.875rem, 1.2vw, 1.25rem);
  --space-4: clamp(1.25rem, 1.8vw, 2rem);
  --space-5: clamp(1.75rem, 2.6vw, 3rem);
  --space-6: clamp(2.25rem, 3.6vw, 4.5rem);
  --space-7: clamp(3rem, 5.5vw, 7rem);

  /* ---- Motion tokens (engine contract) ---- */
  --speed-quick: 120ms;
  --speed-fast: 180ms;
  --speed-regular: 280ms;
  --speed-slow: 500ms;
  --ease-rise: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-settle: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-leave: cubic-bezier(0.4, 0, 0.6, 1);
  --ease-slip: cubic-bezier(0.83, 0, 0.17, 1);
  --reveal-blur: 10px;
  --reveal-distance: 20%;
  --reveal-guard: 30px;
  --stagger-1: 70ms;
  --stagger-2: 110ms;
  --stagger-3: 150ms;
  --marquee-duration: 30s;
  --header-blur: 20px;
  --rail-width: 3px;
  --label-ls: 0.14em;

  /* ---- Radii ---- */
  --radius-1: 6px;
  --radius-2: 10px;
  --radius-3: 16px;
  --radius-4: 24px;
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* ---- Pill CTA heights ---- */
  --pill-sm: 32px;
  --pill-md: 44px;
  --pill-lg: 56px;

  --content-max: 1344px;
  --header-height: 64px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-2);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: var(--text-2);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

::selection {
  background: var(--action-1);
  color: var(--bg-4);
}

/* ---- Display serif: the engraved charter voice ---- */
.display {
  font-family: var(--font-display);
  font-weight: var(--w-book);
  letter-spacing: 0.01em;
  line-height: 1.06;
  text-wrap: balance;
}

/* ---- Mono docket labels ---- */
.label {
  font-family: var(--font-mono);
  font-size: var(--text-mini);
  letter-spacing: var(--label-ls);
  text-transform: uppercase;
}

/* ---- Structural ---- */
.content-wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.section {
  padding-block: var(--space-6);
}

.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;
}
