/* ============================================================
   stray-commerce — PRIMITIVE TOKENS  (FINAL)
   Raw, context-free values: the foundation of the design system.
   This file is the swappable SKIN. Re-skin by changing values
   here (and in semantic.css) — never edit components.

   BREAKPOINTS (reference — CSS can't tokenize media conditions):
     tablet  : 768px  (48rem)
     desktop : 1024px (64rem)
   Use these exact values in every @media rule across the theme.
   ============================================================ */

:root {
  /* ---------------- TYPOGRAPHY ---------------- */
  --font-primary: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* size scale */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md:   1.125rem;  /* 18px */
  --text-lg:   1.25rem;   /* 20px */
  --text-xl:   1.5rem;    /* 24px */
  --text-2xl:  1.875rem;  /* 30px */
  --text-3xl:  2.25rem;   /* 36px */
  --text-4xl:  3rem;      /* 48px */
  --text-5xl:  3.75rem;   /* 60px */

  /* line-height */
  --leading-tight:   1.1;
  --leading-snug:    1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.625;

  /* weight (Jost ships 100–900) */
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* letter-spacing (Jost is geometric; display benefits from slight negative tracking) */
  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;

  /* readable line length for prose */
  --measure: 65ch;

  /* ---------------- SPACING (4px base) ---------------- */
  --space-0:  0;
  --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-7:  3rem;     /* 48px  */
  --space-8:  4rem;     /* 64px  */
  --space-9:  6rem;     /* 96px  */
  --space-10: 8rem;     /* 128px */

  /* ---------------- COLOR: neutral ramp (your brand palette) ---------------- */
  --gray-0:   #ffffff;  /* white */
  --gray-50:  #f3f3f3;
  --gray-100: #e8e8e8;
  --gray-200: #dddddd;
  --gray-300: #bbbbbb;
  --gray-400: #a6a6a6;
  --gray-500: #868686;
  --gray-600: #727272;
  --gray-700: #5e5e5e;
  --gray-800: #4b4b4b;
  --gray-900: #282828;
  --gray-950: #000000;  /* black */

  /* ---------------- COLOR: status (only non-gray hues; functional) ---------------- */
  --green-50: #e7f6ee;  --green-500: #1f9d55;  --green-600: #136a37; /* AA on green-50 (~5.98:1) & white (~6.68:1) */
  --amber-50: #fdf3e7;  --amber-500: #d97706;  --amber-600: #b45309;
  --red-50:   #fdeaea;  --red-500:   #dc2626;  --red-600:   #b91c1c;
  --blue-50:  #eaf0fd;  --blue-500:  #2563eb;  --blue-600:  #1d4ed8;

  /* ---------------- RADII ---------------- */
  --radius-sm:   0.25rem;  /* 4px  */
  --radius-md:   0.5rem;   /* 8px  */
  --radius-lg:   1rem;     /* 16px */
  --radius-full: 9999px;

  /* ---------------- SHADOWS ---------------- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  /* ---------------- MOTION ---------------- */
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-out:      cubic-bezier(0, 0, 0, 1);
  --ease-in:       cubic-bezier(0.5, 0, 1, 1);

  /* ---------------- Z-INDEX LADDER ---------------- */
  --z-base:     0;
  --z-raised:   1;
  --z-sticky:   50;
  --z-header:   100;
  --z-dropdown: 200;   /* mega menu */
  --z-overlay:  900;   /* drawer / modal scrim */
  --z-drawer:   1000;  /* cart drawer, filter drawer, mobile nav */
  --z-modal:    1100;
  --z-toast:    1200;

  /* ---------------- ICON SIZES (Remix Icon) ---------------- */
  --icon-sm: 1rem;     /* 16px */
  --icon-md: 1.25rem;  /* 20px */
  --icon-lg: 1.5rem;   /* 24px */
  --icon-xl: 2rem;     /* 32px */

  /* ---------------- FOCUS RING ---------------- */
  --focus-ring-width:  2px;
  --focus-ring-offset: 2px;

  /* ---------------- TOUCH TARGET ---------------- */
  --tap-target: 44px;  /* WCAG min interactive size on coarse pointers */

  /* ---------------- OPACITY ---------------- */
  --opacity-disabled: 0.5;

  /* ---------------- ASPECT RATIOS (from spec) ---------------- */
  --ratio-product: 4 / 5;
  --ratio-hero:    16 / 9;
  --ratio-gallery: 3 / 4;   /* PDP gallery — tall portrait crop */

  /* ---------------- LAYOUT GRID (mobile-first; from spec) ---------------- */
  --grid-columns:  6;
  --grid-gutter:   0.25rem;  /* 4px  */
  --container-pad: 1rem;     /* 16px horizontal margin */
  --container-max: 90rem;    /* 1440px content cap */

  /* ---------------- OFF-CANVAS DRAWER ---------------- */
  --drawer-width: min(90vw, 24rem);  /* shared by nav panel, cart & filter drawers */
}

/* Tablet: 768px+ */
@media (min-width: 48rem) {
  :root {
    --grid-gutter:   0.5rem;  /* 8px  */
    --container-pad: 2rem;    /* 32px */
  }
}

/* Desktop: 1024px+ */
@media (min-width: 64rem) {
  :root {
    --grid-columns: 12;
  }
}
