/*
 * Vendored from polynomial-branding design-system/tokens.css @ 72bde49.
 * Change: the Google Fonts @import is removed, because this page renders
 * no text in the brand fonts (the only visible type is the lockup SVG).
 * Sync from the branding repo; do not edit values here.
 */

:root {
  /* ---- Primitive colour: Ink Navy scale (brand hue ≈ 221°) ---- */
  --poly-navy-950: #061127; /* Ink Navy — the logo colour */
  --poly-navy-900: #0C1B3A;
  --poly-navy-800: #14264D;
  --poly-navy-700: #1F3563;
  --poly-navy-600: #34497A;
  --poly-navy-500: #536594;
  --poly-navy-400: #7B89B0;
  --poly-navy-300: #A6B0CC;
  --poly-navy-200: #CDD3E3;
  --poly-navy-100: #E6E9F1;
  --poly-navy-50:  #F4F6FA;
  --poly-white:    #FFFFFF;

  /* ---- Primitive colour: Curve Blue (single accent) ---- */
  --poly-curve-700: #173FA8;
  --poly-curve-600: #1E4FD1;
  --poly-curve-500: #2B63F0; /* Curve Blue */
  --poly-curve-300: #7FA6FF;
  --poly-curve-100: #E3ECFF;

  /* ---- Primitive colour: status ---- */
  --poly-green-600: #0F7A55;
  --poly-green-100: #DDF3EA;
  --poly-amber-600: #9A5B00;
  --poly-amber-100: #FFF4E0;
  --poly-red-600:   #C2332F;
  --poly-red-100:   #FDE6E5;

  /* ---- Semantic colour (light theme) ---- */
  --color-bg:             var(--poly-white);
  --color-bg-subtle:      var(--poly-navy-50);
  --color-bg-inverse:     var(--poly-navy-950);
  --color-surface:        var(--poly-white);
  --color-surface-raised: var(--poly-white);
  --color-border:         var(--poly-navy-200);
  --color-border-strong:  var(--poly-navy-400);
  --color-text:           var(--poly-navy-950);
  --color-text-muted:     var(--poly-navy-600);
  --color-text-subtle:    var(--poly-navy-500);
  --color-text-inverse:   var(--poly-white);
  --color-brand:          var(--poly-navy-950);
  --color-accent:         var(--poly-curve-500);
  --color-accent-hover:   var(--poly-curve-600);
  --color-accent-subtle:  var(--poly-curve-100);
  --color-link:           var(--poly-curve-600);
  --color-focus:          var(--poly-curve-500);
  --color-field:          var(--poly-navy-950); /* Polynomial Field strokes, at --field-opacity-* */
  --color-success:        var(--poly-green-600);
  --color-success-subtle: var(--poly-green-100);
  --color-warning:        var(--poly-amber-600);
  --color-warning-subtle: var(--poly-amber-100);
  --color-danger:         var(--poly-red-600);
  --color-danger-subtle:  var(--poly-red-100);

  /* ---- Typography ---- */
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-text:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale — 1.25 (major third) from a 16px base */
  --text-xs:   0.75rem;   /* 12 */
  --text-sm:   0.875rem;  /* 14 */
  --text-md:   1rem;      /* 16 */
  --text-lg:   1.25rem;   /* 20 */
  --text-xl:   1.5625rem; /* 25 */
  --text-2xl:  1.9375rem; /* 31 */
  --text-3xl:  2.4375rem; /* 39 */
  --text-4xl:  3.0625rem; /* 49 */
  --text-5xl:  3.8125rem; /* 61 */

  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold: 600;
  --weight-bold:    700;
  --weight-black:   800;

  --leading-tight: 1.1;
  --leading-snug:  1.3;
  --leading-body:  1.55;
  --tracking-display: -0.02em;
  --tracking-body: 0;
  --tracking-caps: 0.08em;

  /* ---- Spacing — 4px base ---- */
  --space-0: 0;
  --space-1: 0.25rem; /* 4 */
  --space-2: 0.5rem;  /* 8 */
  --space-3: 0.75rem; /* 12 */
  --space-4: 1rem;    /* 16 */
  --space-5: 1.5rem;  /* 24 */
  --space-6: 2rem;    /* 32 */
  --space-7: 3rem;    /* 48 */
  --space-8: 4rem;    /* 64 */
  --space-9: 6rem;    /* 96 */
  --space-10: 8rem;   /* 128 */

  /* ---- Radius — echoes the mark's corners ---- */
  --radius-none: 0;
  --radius-sm: 4px;   /* the mark's tight top-left corner */
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 24px;  /* the mark's sweeping descender corner */
  --radius-pill: 999px;
  /* "Stem" signature shape: tight top-left, sweeping bottom-right */
  --radius-stem: var(--radius-sm) var(--radius-md) var(--radius-xl) var(--radius-md);

  /* ---- Elevation — navy-tinted, never pure black ---- */
  --shadow-1: 0 1px 2px rgb(6 17 39 / 0.06), 0 1px 1px rgb(6 17 39 / 0.04);
  --shadow-2: 0 4px 12px rgb(6 17 39 / 0.08), 0 1px 3px rgb(6 17 39 / 0.06);
  --shadow-3: 0 12px 32px rgb(6 17 39 / 0.12), 0 2px 6px rgb(6 17 39 / 0.06);

  /* ---- Motion — eased like the curve ---- */
  --ease-curve: cubic-bezier(0.333, 0, 0.667, 1); /* exactly p(t) = 3t² − 2t³, the brand Curve */
  --ease-out:   cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 360ms;

  /* ---- Polynomial Field — ambient drifting polynomials (guidelines §6.2, field.js) ---- */
  --field-opacity-min: 0.07;
  --field-opacity-max: 0.13; /* never exceed */
  --field-stroke-min: 1px;
  --field-stroke-max: 1.5px;
  --field-count-max: 5;

  /* ---- Layout ---- */
  --container-max: 1200px;
  --stroke-curve: 3px; /* minimum; scale to ~1/60 of the curve's run */
}

/* ---- Dark theme ---- */
[data-theme="dark"] {
  --color-bg:             var(--poly-navy-950);
  --color-bg-subtle:      var(--poly-navy-900);
  --color-bg-inverse:     var(--poly-white);
  --color-surface:        var(--poly-navy-900);
  --color-surface-raised: var(--poly-navy-800);
  --color-border:         var(--poly-navy-700);
  --color-border-strong:  var(--poly-navy-500);
  --color-text:           var(--poly-white);
  --color-text-muted:     var(--poly-navy-300);
  --color-text-subtle:    var(--poly-navy-400);
  --color-text-inverse:   var(--poly-navy-950);
  --color-brand:          var(--poly-white);
  --color-accent:         var(--poly-curve-300);
  --color-accent-hover:   var(--poly-curve-100);
  --color-accent-subtle:  var(--poly-navy-800);
  --color-link:           var(--poly-curve-300);
  --color-focus:          var(--poly-curve-300);
  --color-field:          var(--poly-white);
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-fast: 0ms; --duration-base: 0ms; --duration-slow: 0ms; }
}
