/* Design tokens from docs/planning/design-wireframes/DESIGN.md sections 3 to 5.
   Storefront (warm neutrals) on :root; the admin (graphite) under [data-theme="admin"].
   Dark mode is not designed yet (DESIGN.md section 15). */

:root {
  color-scheme: light;

  /* Storefront neutrals */
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --raised: #F1ECE3;
  --line: rgba(31, 27, 22, 0.08);
  --line-strong: rgba(31, 27, 22, 0.14);
  --ink: #1F1B16;
  --ink-2: #5E554A;
  --ink-3: #7B7266;

  /* Accent and status */
  --accent: #1F7A3A;
  --accent-ink: #FFFFFF;
  --accent-soft: #E5F3E7;
  --nav-ink: #5A7448;        /* header category links (5.2:1 on white) */
  --nav-ink-strong: #3F5530; /* their hover and current page */
  --footer-bg: #E8F2EA;
  --warning: #D97706;
  --warning-soft: #FEF6E7;
  --warning-ink: #7A4A06;
  --danger-ink: #B42318;
  --wagon-red: #B4232A;
  --new-bg: #FFE9A8;
  --new-ink: #6B4A00;

  /* Category tile pastels, in order */
  --tint-1: #FDECEA; --tint-2: #FFF4D6; --tint-3: #E5F3E7; --tint-4: #FCE8F1;
  --tint-5: #E4F1FB; --tint-6: #EFEAFB; --tint-7: #EAF4DD; --tint-8: #FFF0E0;

  /* "How ordering works" icon circles */
  --fact-red: #FDE8E6; --fact-yellow: #FFF3D1; --fact-yellow-ink: #8A5A00; --fact-green: #E5F3E7;

  /* Hero scene */
  --hero-sky: #E4F1FB; --hero-grass: #D5EBCB; --hero-sun: #FFE08A;

  /* Type */
  --font-latin: 'DM Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-arabic: 'IBM Plex Sans Arabic', 'DM Sans', system-ui, sans-serif;
  --font: var(--font-latin);
  --heading-track: -0.02em;

  /* Spacing (4px grid) */
  --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;

  /* Layout */
  --page-pad: 16px;
  --content-max: 1240px;

  /* Radius */
  --r-tag: 4px; --r-control: 10px; --r-row: 8px; --r-card: 16px; --r-panel: 24px;

  /* Depth: hairlines only; these shadows are the exceptions */
  --shadow-sticky: 0 -8px 24px rgba(0, 0, 0, 0.06);
  --shadow-segment: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.12); /* toasts floating over the page */

  --focus-ring: 2px solid var(--accent);
}

@media (min-width: 640px) { :root { --page-pad: 24px; } }
@media (min-width: 1024px) { :root { --page-pad: 32px; } }

:root:lang(ar) {
  --font: var(--font-arabic);
  --heading-track: 0;
}

[data-theme="admin"] {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --raised: #F4F4F5;
  --line: rgba(23, 23, 23, 0.08);
  --line-strong: rgba(23, 23, 23, 0.14);
  --ink: #171717;
  --ink-2: #525252;
  --ink-3: #737373;
  --content-max: 1440px;
}
