/* ==========================================================================
   Royalty Technology — Design Tokens
   Primitive -> Semantic. Never use a raw hex outside this file.
   ========================================================================== */

:root {
  /* ---- Primitive: Ink (navy) ------------------------------------------ */
  --ink-950: #030c14;
  --ink-900: #061725;
  --ink-800: #0a2135;
  --ink-700: #113049;
  --ink-600: #1b4260;
  --ink-500: #2b5a7d;

  /* ---- Primitive: Brand (green, drawn from the mark) ------------------- */
  --brand-700: #146b06;
  --brand-600: #1a8508;
  --brand-500: #22a30a;   /* core brand */
  --brand-400: #34c40e;
  --brand-300: #63dd44;
  --brand-200: #a6ee92;
  --brand-050: #eefbe9;

  /* ---- Primitive: Neutral --------------------------------------------- */
  --n-000: #ffffff;
  --n-025: #fafbfc;
  --n-050: #f4f6f8;
  --n-100: #eaeef2;
  --n-200: #dbe2e8;
  --n-300: #c2ccd6;
  --n-400: #94a3b1;
  --n-500: #63727f;   /* 4.95:1 on white, 4.57:1 on subtle — WCAG AA */
  --n-600: #4e5d6c;
  --n-700: #38454f;
  --n-900: #101a22;

  /* ---- Primitive: Status ---------------------------------------------- */
  --red-600: #c02626;
  --amber-500: #b4780a;

  /* ======================================================================
     Semantic
     ====================================================================== */

  /* Surface */
  --surface: var(--n-000);
  --surface-subtle: var(--n-050);
  --surface-sunken: var(--n-100);
  --surface-inverse: var(--ink-950);
  --surface-inverse-raised: var(--ink-800);

  /* Text */
  --text: var(--n-900);
  --text-muted: var(--n-600);
  --text-subtle: var(--n-500);
  --text-on-inverse: var(--n-000);
  --text-on-inverse-muted: #a9bcc9;
  --text-on-inverse-subtle: #7e94a3;

  /* Brand */
  --brand: var(--brand-500);
  --brand-strong: var(--brand-600);
  --brand-on-light: var(--brand-700);   /* 5.9:1 on white — safe for text */
  --brand-on-dark: var(--brand-300);    /* 8.4:1 on ink-950 — safe for text */
  --text-on-brand: #ffffff;

  /* Border */
  --border: var(--n-200);
  --border-strong: var(--n-300);
  --border-inverse: rgba(255, 255, 255, .14);
  --border-inverse-strong: rgba(255, 255, 255, .26);

  /* Focus */
  --focus-ring: var(--brand-600);

  /* ---- Container & layout --------------------------------------------- */
  --container: 1240px;
  --container-narrow: 940px;
  --gutter: 24px;

  /* ---- Radius ---------------------------------------------------------- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* ---- Elevation ------------------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(6, 23, 37, .06);
  --shadow-sm: 0 2px 6px rgba(6, 23, 37, .06), 0 1px 2px rgba(6, 23, 37, .04);
  --shadow-md: 0 8px 24px rgba(6, 23, 37, .08), 0 2px 6px rgba(6, 23, 37, .04);
  --shadow-lg: 0 20px 48px rgba(6, 23, 37, .12), 0 4px 12px rgba(6, 23, 37, .05);
  --shadow-xl: 0 32px 72px rgba(6, 23, 37, .16);
  --shadow-brand: 0 10px 26px rgba(26, 133, 8, .24);

  /* ---- Spacing (4pt rhythm) -------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;
  --space-32: 128px;

  /* Section rhythm */
  --section-y: clamp(72px, 8vw, 128px);
  --section-y-tight: clamp(56px, 6vw, 88px);

  /* ---- Typography ------------------------------------------------------ */
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  /* Type scale */
  --fs-display: clamp(2.75rem, 1.6rem + 4.2vw, 4.5rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 2.8vw, 3.5rem);
  --fs-h2: clamp(1.875rem, 1.35rem + 1.9vw, 2.75rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .55vw, 1.5rem);
  --fs-h4: 1.125rem;
  --fs-lead: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  --fs-body: 1rem;
  --fs-sm: .9375rem;
  --fs-xs: .8125rem;
  --fs-label: .75rem;

  --lh-tight: 1.08;
  --lh-heading: 1.18;
  --lh-snug: 1.45;
  --lh-body: 1.65;

  --tracking-display: -.035em;
  --tracking-heading: -.022em;
  --tracking-label: .12em;

  /* ---- Motion ---------------------------------------------------------- */
  --ease-out: cubic-bezier(.22, .68, .35, 1);
  --ease-in-out: cubic-bezier(.65, .05, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .5, 1);
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;
  --dur-reveal: 620ms;

  /* ---- Z-index scale ---------------------------------------------------- */
  --z-base: 0;
  --z-raised: 10;
  --z-sticky: 40;
  --z-header: 50;
  --z-overlay: 100;
  --z-modal: 200;
  --z-skip: 300;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 1ms;
    --dur-base: 1ms;
    --dur-slow: 1ms;
    --dur-reveal: 1ms;
  }
}
