/* TEGRITY V2 — DESIGN TOKENS
   Single source of truth. Imported by every surface, never copied.
   Values from the brand system v3 + the V2 typography sheet. */

/* Self-hosted faces */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  /* --- Color: warm mono ramp --- */
  --color-bg: #FAFAF7;       /* paper */
  --color-ink: #050505;      /* primary, near-black */
  --color-body: #1A1A1A;     /* body text */
  --color-functional: #767369; /* muted, meaning-bearing */
  --color-hairline: #B8B6B0; /* decorative rules only, fails contrast on purpose */
  --color-surface: #E8E6E0;  /* raised surface */
  --color-paper-2: #F2F1EC;  /* secondary paper for cards */

  /* --- Color: semantic states (the only color allowed) --- */
  --color-success: #15803D;  /* green */
  --color-warning: #B45309;  /* orange */
  --color-danger:  #B91C1C;  /* red */
  --color-info:    #1E3A8A;  /* blue */
  --color-royal:   #5B21B6;  /* royal purple — reserved for the fifth principle */

  /* --- Type families --- */
  --font-display: "Inter", "Helvetica Neue", Arial, sans-serif; /* target: Helvetica Neue Black, deferred */
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* --- Type scale (V2 sheet: size / weight / tracking) --- */
  --fs-display: clamp(3rem, 8vw, 5.5rem); /* fluid 48–88, v3 supersedes the 32 cap */
  --fw-display: 900;
  --tr-display: -0.03em;

  --fs-h1: 1.75rem;  --fw-h1: 700;  --tr-h1: -0.01em;   /* 28 / 700 */
  --fs-h2: 1.375rem; --fw-h2: 600;  --tr-h2: -0.005em;  /* 22 / 600 */
  --fs-h3: 1.125rem; --fw-h3: 600;  --tr-h3: 0;         /* 18 / 600 */
  --fs-body: 1rem;   --fw-body: 400; --lh-body: 1.6;    /* 16 / 400 */
  --fs-small: 0.8125rem; --fw-small: 400;               /* 13 / 400 */

  --measure: 68ch;   /* body line length cap */
  --measure-head: 18ch;

  /* --- Spacing scale --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Layout --- */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* --- Radius --- */
  --radius: 4px;   /* ceiling */
  --radius-pill: 9999px;

  /* --- Elevation: one documented shadow --- */
  --shadow-1: 0 1px 2px rgba(5, 5, 5, 0.06), 0 8px 24px rgba(5, 5, 5, 0.06);

  /* --- Motion signature: monotonic easing, no bounce --- */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 140ms;
  --dur: 320ms;
  --dur-slow: 600ms;
}
