/* =============================================================================
   Hambone — Design Tokens
   -----------------------------------------------------------------------------
   Single source of every visual constant on the marketing site. No stylesheet
   below this file may contain a literal color, size, radius, weight, easing, or
   duration — they all resolve through these custom properties.

   Two layers:
     1. PRIMITIVES  — raw scales (space, radius, type ramp, easing). Theme-agnostic.
     2. SEMANTICS   — role tokens (--bg, --ink, --accent, fonts…). Themes override
                      ONLY this layer. See themes.css.

   A theme = a redefinition of the semantic layer under [data-theme="…"].
   Nothing else in the codebase knows a theme exists.
   ========================================================================== */

:root {
  /* --- Spacing (4px base, fluid multiples) ------------------------------- */
  --space-1: 0.25rem;   /*  4px */
  --space-2: 0.5rem;    /*  8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-8: 3rem;      /* 48px */
  --space-10: 4rem;     /* 64px */
  --space-12: 6rem;     /* 96px */
  --space-16: 8rem;     /* 128px */
  --space-20: 12rem;    /* 192px */

  /* --- Type ramp (fluid: clamp(min, vw, max)) ---------------------------- */
  --fs-xs:  clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --fs-sm:  clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
  --fs-md:  clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --fs-lg:  clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-xl:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --fs-2xl: clamp(2rem, 1.6rem + 2vw, 3rem);
  --fs-3xl: clamp(2.75rem, 2rem + 3.75vw, 4.5rem);
  --fs-display: clamp(3.5rem, 2rem + 7.5vw, 8rem);

  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-normal: 1.5;
  --lh-loose: 1.7;

  --tracking-tighter: -0.03em;
  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.08em;
  --tracking-wider: 0.2em;
  --tracking-widest: 0.35em;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-black: 900;

  /* --- Radius ------------------------------------------------------------ */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* --- Borders ----------------------------------------------------------- */
  --border-hair: 1px;
  --border-thin: 2px;
  --border-thick: 3px;

  /* --- Motion ------------------------------------------------------------ */
  --dur-fast: 140ms;
  --dur-base: 260ms;
  --dur-slow: 520ms;
  --dur-slower: 900ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Layout ------------------------------------------------------------ */
  --measure: 65ch;          /* readable line length */
  --container: 1200px;
  --container-narrow: 820px;
  --z-base: 0;
  --z-raised: 10;
  --z-nav: 100;
  --z-overlay: 1000;
  --z-modal: 1100;

  /* --- Shadow scale (theme may tint via --shadow-color) ------------------ */
  --shadow-color: 0 0 0;
  --shadow-sm: 0 1px 2px rgba(var(--shadow-color) / 0.2);
  --shadow-md: 0 8px 24px rgba(var(--shadow-color) / 0.28);
  --shadow-lg: 0 24px 64px rgba(var(--shadow-color) / 0.4);

  /* --- Touch target (accessibility) -------------------------------------- */
  --touch: 44px;
}

/* Respect reduced-motion globally (see themes for the toggle-able override). */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
    --dur-slower: 0ms;
  }
}
