/* ==========================================================================
   ENAF Theme — 1. Tokens
   Every colour, space, radius, shadow and type value used by the theme is
   defined here. No raw values appear in the other layers.
   ========================================================================== */
:root {
  /* Brand — locked. Do not change. */
  --color-primary: #6F2C8F;            /* RGB 111, 44, 143 */
  --color-primary-dark: #571F72;       /* hover / pressed */
  --color-primary-deep: #2A1236;       /* near-black plum: footer, dark sections */
  --color-primary-tint: #F5F0F8;       /* lightest surface tint */
  --color-primary-tint-2: #E9DDF0;     /* borders on tinted surfaces, chips */
  --color-primary-tint-3: #CDB4DA;     /* decorative rules, muted purple text on dark */
  --color-on-primary: #FFFFFF;

  /* Restrained warm accent — highlights only, never body text */
  --color-accent: #C99A3B;
  --color-accent-soft: #F7EDD6;

  /* Warm-leaning neutrals */
  --color-text: #1F1A22;
  --color-text-secondary: #4E4653;
  --color-text-muted: #7B737F;
  --color-text-on-dark: #FFFFFF;
  --color-text-on-dark-secondary: #D9CFDF;
  --color-bg: #FFFFFF;
  --color-surface: #F8F6F9;
  --color-surface-2: #F1EEF2;
  --color-border: #E7E2E9;
  --color-border-strong: #CFC7D3;
  /* Translucent lines and scrims (only place alpha colours are defined) */
  --color-line-on-dark: rgba(255, 255, 255, 0.14);
  --color-line-on-dark-mid: rgba(255, 255, 255, 0.2);
  --color-line-on-dark-strong: rgba(255, 255, 255, 0.45);
  --color-scrim-0: rgba(31, 26, 34, 0);
  --color-scrim-1: rgba(31, 26, 34, 0.08);
  --color-scrim-2: rgba(31, 26, 34, 0.35);
  --color-scrim-3: rgba(31, 26, 34, 0.45);
  --color-scrim-4: rgba(31, 26, 34, 0.72);
  --color-scrim-5: rgba(31, 26, 34, 0.82);
  --color-scrim-6: rgba(31, 26, 34, 0.92);

  /* Status */
  --color-success: #2E7D4F;
  --color-warning: #B7791F;
  --color-error: #B42318;
  --color-focus: #6F2C8F;

  /* Typography */
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --text-display: clamp(2.75rem, 1.9rem + 3.8vw, 5.5rem);
  --text-h1: clamp(2.375rem, 1.7rem + 2.8vw, 4.25rem);
  --text-h2: clamp(1.875rem, 1.4rem + 2vw, 3.125rem);
  --text-h3: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  --text-h4: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
  --text-lead: clamp(1.125rem, 1.05rem + 0.45vw, 1.4375rem);
  --text-body: 1.0625rem;
  --text-small: 0.9375rem;
  --text-meta: 0.8125rem;
  --text-nav: 0.9375rem;
  --text-button: 0.9375rem;
  --text-stat: clamp(3rem, 2rem + 5vw, 6.5rem);

  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;

  --tracking-tight: -0.025em;
  --tracking-snug: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.06em;
  --tracking-caps: 0.12em;

  --measure: 68ch;
  --measure-narrow: 52ch;
  --measure-heading: 22ch;

  /* Spacing (8pt base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --space-10: 5rem;
  --space-11: 6rem;
  --space-12: 8rem;
  --section-y: clamp(4.5rem, 6rem + 3vw, 9rem);
  --section-y-sm: clamp(3rem, 3rem + 2vw, 5rem);

  /* Layout */
  --container: 80rem;        /* 1280px */
  --container-wide: 92rem;   /* 1472px */
  --container-narrow: 46rem; /* 736px  */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --grid-gap: clamp(1.25rem, 2.5vw, 2.5rem);
  --header-height: 5rem;
  --header-height-sm: 4.25rem;

  /* Radius — deliberately restrained */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Shadows — hairline first, elevation second */
  --shadow-hairline: 0 0 0 1px var(--color-border);
  --shadow-sm: 0 1px 2px rgba(31, 26, 34, 0.06), 0 1px 1px rgba(31, 26, 34, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(31, 26, 34, 0.18);
  --shadow-lg: 0 24px 50px -24px rgba(31, 26, 34, 0.28);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur: 280ms;
  --dur-slow: 600ms;

  --z-header: 100;
  --z-overlay: 200;
  --z-skip: 1000;
}
