/* BLOOM DATES · design tokens (R1a · Atelier). The only file with raw colour values.
   Atelier = Concept A "Quiet Luxury" (artifacts/design-direction/concept-a.*) on the brand kit (assets/brand):
   warm off-white paper, 1 px hairlines, square corners, serif display with a wine italic accent, wine only for
   action and selection. Contrast pairs are checked by server/ui.test.mjs (WCAG 2.2 AA) in both themes.
   Theme: system preference unless <html data-theme="light|dark"> forces one. The two dark blocks below must stay
   identical (the test compares them). */

:root {
  color-scheme: light;

  /* Colour · light */
  --c-bg: #F8F6F2;            /* page (Atelier --bg) */
  --c-surface: #FFFEFC;       /* cards, inputs, dialogs (Atelier --paper) */
  --c-surface-2: #F1EEE8;     /* sidebar, table header, subtle fills (Atelier sidebar) */
  --c-cream: #FEF6EB;         /* brand cream: logo plate, landing bands */
  --c-ink: #221C1A;           /* brand ink in every theme: logo on the cream plate */
  --c-text: #221C1A;          /* brand ink */
  --c-text-muted: #6B625C;    /* hints, secondary text (Atelier #756D66 darkened for AA on --c-surface-2) */
  --c-line: #DDD7CF;          /* decorative hairlines only */
  --c-line-strong: #8C7F76;   /* input / checkbox borders (≥ 3:1, WCAG 1.4.11) */
  --c-accent: #5C1F33;        /* brand wine: primary action, links, selection, focus */
  --c-accent-hover: #4A1828;
  --c-on-accent: #FFFEFC;
  --c-accent-tint: #EDE6E2;   /* active nav, selected row, featured item (Atelier) */
  --c-success: #2E6B4E;
  --c-success-tint: #E8F2EC;
  --c-warning: #8A5A12;
  --c-warning-tint: #FBF1DF;
  --c-danger: #A3302B;
  --c-danger-tint: #FBE9E7;
  --c-info: #2F5470;
  --c-info-tint: #E7EEF4;
  --c-focus: var(--c-accent);
  --c-scrim: rgb(34 28 26 / .44);

  /* Typography (self-hosted, see fonts.css). Display serif only at ≥ 20 px.
     R3 · hairlines: Bodoni Moda keeps font-optical-sizing:auto (base.css; the opsz axis follows the size), and the
     display weights are one step up from the cut's 400 so the hairlines survive Windows/Chrome rasterising: 500 for
     display and h1 (30–56 px), 600 for h2-size headings and shop names (24–28 px), where they were thinnest. */
  --font-display: 'Bodoni Moda', Didot, 'Bodoni 72', Georgia, serif;
  --font-sans: 'DM Sans', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --t-display: 500 40px/44px var(--font-display);
  --t-h1: 500 30px/36px var(--font-display);
  --t-h2: 600 24px/30px var(--font-display);
  --t-h3: 600 18px/26px var(--font-sans);
  --t-body-lg: 400 18px/28px var(--font-sans);
  --t-body: 400 16px/24px var(--font-sans);
  --t-label: 500 14px/20px var(--font-sans);
  --t-small: 400 14px/20px var(--font-sans);
  --t-caption: 600 12px/16px var(--font-sans);
  --tracking-display: -.03em;
  --tracking-caption: .1em;

  /* Spacing (4 px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px;

  /* Layout */
  --gutter: 16px;
  --content-max: 1200px;
  --customer-max: 560px;
  --nav-width: 240px;
  --control-height: 48px;
  --control-height-sm: 40px;
  --target-min: 44px;

  /* Shape: Atelier is square. Shop styles (R1b) may set --radius-control to round. */
  --radius-control: 0;
  --radius-surface: 0;
  --radius-check: 2px;
  --radius-pill: 999px;
  --line-width: 1px;
  --focus-ring: 2px solid var(--c-focus);
  --focus-offset: 2px;

  /* Elevation: hairlines first; shadows only for floating layers. */
  --e-1: 0 1px 2px rgb(34 28 26 / .06);
  --e-2: 0 4px 16px rgb(34 28 26 / .08);
  --e-3: 0 16px 48px rgb(34 28 26 / .14);

  /* Motion */
  --motion-fast: 150ms ease-out;
  --motion-panel: 200ms ease-out;
}

@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 768px) {
  :root {
    --t-display: 500 56px/60px var(--font-display);
    --t-h1: 500 40px/46px var(--font-display);
    --t-h2: 600 28px/34px var(--font-display);
    --t-h3: 600 20px/28px var(--font-sans);
  }
}
@media (min-width: 1024px) { :root { --gutter: 40px; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --c-bg: #171312;
    --c-surface: #211B19;
    --c-surface-2: #2A2321;
    --c-cream: #FEF6EB;
    --c-text: #FEF6EB;
    --c-text-muted: #BDB2A9;
    --c-line: #3A322F;
    --c-line-strong: #7A6F68;
    --c-accent: #E8B4C5;
    --c-accent-hover: #F2C9D6;
    --c-on-accent: #2A0F19;
    --c-accent-tint: #3A1C26;
    --c-success: #7FC4A1;
    --c-success-tint: #1E2E26;
    --c-warning: #E3B467;
    --c-warning-tint: #33291A;
    --c-danger: #F09A8E;
    --c-danger-tint: #3A2220;
    --c-info: #9DBFDB;
    --c-info-tint: #1D2A35;
    --c-scrim: rgb(0 0 0 / .6);
    --e-1: none;
    --e-2: 0 0 0 1px var(--c-line);
    --e-3: 0 0 0 1px var(--c-line);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --c-bg: #171312;
  --c-surface: #211B19;
  --c-surface-2: #2A2321;
  --c-cream: #FEF6EB;
  --c-text: #FEF6EB;
  --c-text-muted: #BDB2A9;
  --c-line: #3A322F;
  --c-line-strong: #7A6F68;
  --c-accent: #E8B4C5;
  --c-accent-hover: #F2C9D6;
  --c-on-accent: #2A0F19;
  --c-accent-tint: #3A1C26;
  --c-success: #7FC4A1;
  --c-success-tint: #1E2E26;
  --c-warning: #E3B467;
  --c-warning-tint: #33291A;
  --c-danger: #F09A8E;
  --c-danger-tint: #3A2220;
  --c-info: #9DBFDB;
  --c-info-tint: #1D2A35;
  --c-scrim: rgb(0 0 0 / .6);
  --e-1: none;
  --e-2: 0 0 0 1px var(--c-line);
  --e-3: 0 0 0 1px var(--c-line);
}
