/**
 * Nordic Pectin — minimal design tokens
 * Proposal only. Link from pages later (see MIGRATION.md).
 * Roles are semantic; values reconcile live styleguide + store.css cascade winner.
 *
 * Naming: --color-* / --text-* / --space-* / --radius-* / --shadow-* / --motion-* / --layout-*
 * Do not add speculative tokens for unused patterns.
 */

:root {
  /* ——— Color (roles) ——— */
  --color-bg: #f5f2eb;                 /* page cream */
  --color-surface: #fffcf7;            /* paper / card / secondary fill */
  --color-surface-raised: #ffffff;     /* tables, pure white chips when needed */
  --color-ink: #141210;                /* primary text (live) */
  --color-mute: #6b6560;               /* secondary text */
  --color-line: rgba(0, 0, 0, 0.08);   /* ≈ #00000014 borders */
  --color-strong: #1a1a1a;             /* primary button / nav CTA / chrome */
  --color-on-strong: #ffffff;          /* text on strong */
  --color-accent: #b8893a;             /* gold — focus, Fiber highlight, kicker */
  --color-system-zero: #4a5560;        /* Zero system accent only */
  --color-focus: #b8893a;              /* :focus-visible ring */
  --color-danger: #a33;                /* form error hint */
  --color-success: #2f6b3a;            /* form ok / DK badge green */

  /* Glass / sticky (observed, keep minimal) */
  --color-nav-glass: rgba(251, 247, 240, 0.42);
  --color-sticky: rgba(245, 242, 235, 0.94);

  /* ——— Typography ——— */
  --font-sans: "Outfit", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --text-xs: 0.6875rem;    /* 11px — kickers, sku-tags, filt */
  --text-sm: 0.75rem;      /* 12px — pills, proof, footer */
  --text-md: 0.8125rem;    /* 13px — nav, labels, live primary btn */
  --text-base: 1.0625rem;  /* 17px — store body (keep site as-is) */
  --text-lede: 1.12rem;    /* hero/section lede */
  --text-h4: 1.375rem;     /* ~22px live h4 */
  --text-h3: 1.9375rem;    /* ~31px live h3 */
  --text-h2: 2.625rem;     /* ~42px live h2 — desktop target; prefer clamp in CSS */
  --text-h1: 3.625rem;     /* ~58px live h1 — desktop target; prefer clamp in CSS */

  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-body: 1.47;
  --leading-lede: 1.55;

  --tracking-display: -0.03em;   /* h1-ish (live h1 ≈ -1.752px @ 58 ≈ -0.03em) */
  --tracking-title: -0.02em;     /* h2 */
  --tracking-label: 0.06em;      /* uppercase labels */
  --tracking-kicker: 0.1em;      /* section kickers */

  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 650;            /* buttons / current page */
  --weight-heavy: 700;           /* display / step nums */

  /* ——— Space (live scale; adopt callers-first) ——— */
  --space-xs: 2px;
  --space-sm: 10px;
  --space-md: 18px;
  --space-lg: 38px;
  --space-xl: 76px;
  /* pragmatic grid gap used everywhere today */
  --space-gap: 1rem;

  /* ——— Radius ——— */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-card: 16px;           /* live card; prefer over 18/22 */
  --radius-lg: 24px;             /* hero still / sku shot */
  --radius-pill: 999px;          /* buttons, pills, chips */

  /* ——— Shadow ——— */
  --shadow-sm: 0 14px 36px rgba(20, 28, 24, 0.12);   /* live */
  --shadow-btn: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-btn-hover: 0 10px 28px rgba(0, 0, 0, 0.16);
  --shadow-lift: 0 16px 40px rgba(0, 0, 0, 0.08);

  /* ——— Motion ——— */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 0.2s;
  --dur-med: 0.55s;
  --reveal-distance: 14px;

  /* ——— Layout ——— */
  --layout-wrap: min(1080px, calc(100% - 2rem));
}

/**
 * Optional aliases for gradual migration from existing names.
 * Prefer role names above in new CSS; aliases keep old var() calls working
 * once this file is linked ahead of store.css.
 */
:root {
  --ink: var(--color-ink);
  --mute: var(--color-mute);
  --line: var(--color-line);
  --bg: var(--color-bg);
  --cream: var(--color-bg);
  --card: var(--color-surface);
  --paper: var(--color-surface);
  --pine: var(--color-strong);
  --gold: var(--color-accent);
  --citrus: var(--color-accent);
  --fiber: var(--color-accent);
  --zs: var(--color-system-zero);
  --blue: var(--color-strong);   /* kill Apple blue; .btn.blue → strong */
  --wrap: var(--layout-wrap);
  --glass: rgba(255, 255, 255, 0.72);
}
