/* ==========================================================================
   Pixelspa — Design Tokens
   Source of truth: Pixelspa Design System (Figma)
   Primitives below are exact values pulled from the design system.
   Semantic tokens map primitives to roles; refine as designs are confirmed.
   ========================================================================== */

:root {
  /* ---------- Primitive: Grey (contrast vs white in comments) ------------ */
  --grey-00: #FFFFFF; /* 1.00 */
  --grey-05: #F2F2F2; /* 1.12 */
  --grey-10: #E5E5E5; /* 1.26 */
  --grey-20: #D8D8DA; /* 1.43 */
  --grey-30: #B1B0B3; /* 2.15 */
  --grey-40: #929295; /* 3.10 */
  --grey-50: #6F6F74; /* AA  5.00 */
  --grey-60: #545358; /* AAA 7.61 */
  --grey-70: #323133; /* AAA 12.90 */
  --grey-80: #1E1E1E; /* AAA 16.72 */

  /* ---------- Primitive: Blue -------------------------------------------- */
  --blue-01: #C8ECFE; /* 1.24 */
  --blue-02: #00C3FF; /* 2.04 */
  --blue-03: #146EF6; /* AA  4.57 */
  --blue-04: #1D4ED8; /* AA  6.70 */
  --blue-05: #0A1F40; /* AAA 16.37 */

  /* ---------- Primitive: Pink -------------------------------------------- */
  --pink-01: #FFF0FE; /* 1.10 */
  --pink-02: #FF43BD; /* 3.09 */
  --pink-03: #CE198E; /* AA  5.06 */

  /* ---------- Primitive: Purple ------------------------------------------ */
  --purple-01: #220B73; /* AAA 15.40 */

  /* ---------- Primitive: Yellow ------------------------------------------ */
  --yellow-01: #FDD800; /* 1.40 */

  /* ---------- Primitive: Green ------------------------------------------- */
  --green-01: #E7FFE8; /* 1.06 */
  --green-02: #46DB83; /* 1.79 */
  --green-03: #00521D; /* AAA 9.44 */
  --green-04: #051E04; /* AAA 17.59 */

  /* ---------- Primitive: Red --------------------------------------------- */
  --red-01: #FEE2E2; /* 1.22 */
  --red-02: #FB7171; /* 2.77 */
  --red-03: #DC2626; /* AA  4.83 */
  --red-04: #450A0A; /* AAA 16.14 */

  /* ---------- Primitive: Amber ------------------------------------------- */
  --amber-01: #FEF3C7; /* 1.11 */
  --amber-02: #F59E0B; /* 2.15 */
  --amber-03: #92400E; /* AAA 7.09 */
  --amber-04: #4B1A03; /* AAA 14.98 */

  /* ======================================================================
     Semantic tokens (role-based). Provisional mapping — adjust to match
     confirmed page designs.
     ====================================================================== */
  --color-bg:            var(--grey-00);
  --color-bg-subtle:     var(--grey-05);
  --color-canvas:        #F6F6F3; /* off-white "FigJam" canvas (dotted background pages) */
  --color-surface:       var(--grey-00);
  --color-border:        var(--grey-10);
  --color-border-strong: var(--grey-20);

  --color-text:          var(--grey-80);
  --color-text-muted:    var(--grey-50);
  --color-text-subtle:   var(--grey-40);
  --color-text-invert:   var(--grey-00);

  --color-accent:        var(--blue-03);
  --color-accent-hover:  var(--blue-04);
  --color-accent-press:  var(--blue-05);
  --color-link:          var(--blue-03);

  --color-focus-ring:    var(--blue-03);

  /* ======================================================================
     Typography — Hanken Grotesk (brand typeface)
     ====================================================================== */
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", monospace;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Fluid type scale (clamp: min, preferred, max) */
  --fs-page-title: clamp(2rem, 1.45rem + 2.4vw, 2.75rem); /* shared H1 (home + page heads) */
  --fs-display: clamp(2.75rem, 1.6rem + 5.1vw, 5rem);   /* hero */
  --fs-h1:      clamp(2.25rem, 1.5rem + 3.3vw, 3.5rem);
  --fs-h2:      clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --fs-h3:      clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
  --fs-h4:      clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --fs-body-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --fs-body:    1rem;     /* 16px */
  --fs-small:   0.875rem; /* 14px */
  --fs-caption: 0.75rem;  /* 12px */

  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;

  /* ======================================================================
     Spacing — 8px base scale (design uses 8px increments, 80px gutters)
     ====================================================================== */
  --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: 2.5rem;   /* 40 */
  --space-8: 3rem;     /* 48 */
  --space-9: 4rem;     /* 64 */
  --space-10: 5rem;    /* 80  (page gutter) */
  --space-11: 6rem;    /* 96 */
  --space-12: 8rem;    /* 128 */

  /* ======================================================================
     Layout
     ====================================================================== */
  --header-h: 64px; /* sticky header height (matches .site-header__inner min-height) */
  --container-max: 1080px;
  --container-narrow: 720px; /* reading column (text) width */
  --gutter: clamp(1.25rem, 5vw, 5rem); /* responsive page margin (20px → 80px) */
  --gutter-narrow: clamp(1.25rem, 4vw, 1.5rem); /* tighter side padding for reading column */

  /* Breakpoints (for reference in media queries)
     mobile  : < 640px
     tablet  : 640–1023px
     desktop : >= 1024px */

  /* ======================================================================
     Radii, borders, shadows, motion
     ====================================================================== */
  /* Corners are capped at 8px across the site (images, cards, panels, etc.) */
  --radius-xs: 8px; /* uniform card/panel/callout radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --radius-pill: 999px;

  /* Thumbnail / media corner radius */
  --radius-media: 8px;

  --border-width: 1px;

  --shadow-sm: 0 1px 2px rgba(30, 30, 30, 0.06);
  --shadow-md: 0 6px 24px rgba(30, 30, 30, 0.08);
  --shadow-lg: 0 18px 48px rgba(30, 30, 30, 0.12);

  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 320ms cubic-bezier(0.4, 0, 0.2, 1);

  --z-header: 100;
  --z-overlay: 200;
  --z-modal: 300;
}
