/* ==========================================================================
   Design tokens — Holiday Shopping Insights
   Light: warm ivory, soft sage, champagne gold, festive red accents.
   Dark:  deep forest green, charcoal, muted gold, softly illuminated cards.
   Theme selection: [data-theme="light|dark"] on <html>, or the OS setting
   when no data-theme is present ("System").
   ========================================================================== */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #f6f1e6;
  --bg-deep: #ede6d6;
  --surface: #f8f4eb;
  --surface-hi: #fbf8f1;
  --surface-sunk: #efe8da;
  --line: #e0d7c4;
  --line-strong: #cdbfa3;

  /* Text — all pairs meet WCAG AA on --bg / --surface */
  --ink: #1f2b25;
  --ink-soft: #3a4740;
  --muted: #5b675f;

  /* Brand */
  --sage: #7f9e86;
  --sage-strong: #3c6a50;
  --sage-ink: #2f5a42;
  --sage-soft: #e1eadb;
  --gold: #b8924a;
  --gold-ink: #7f6125;
  --gold-soft: #f1e5c8;
  --red: #b4473b;
  --red-ink: #9b382d;
  --red-soft: #f6e0db;

  --on-primary: #fbf8f1;
  --on-danger: #ffffff;
  --primary: #335f46;
  --primary-hover: #2b5440;

  /* Soft neumorphism */
  --shade: rgba(138, 114, 72, 0.34);
  --shade-strong: rgba(120, 98, 60, 0.42);
  --light: rgba(255, 255, 255, 0.92);
  --raised: 10px 10px 26px var(--shade), -10px -10px 24px var(--light);
  --raised-sm: 4px 4px 10px var(--shade), -4px -4px 10px var(--light);
  --raised-xs: 2px 2px 5px var(--shade), -2px -2px 5px var(--light);
  --inset: inset 3px 3px 7px var(--shade), inset -3px -3px 7px var(--light);
  --inset-sm: inset 2px 2px 4px var(--shade), inset -2px -2px 4px var(--light);
  --card-glow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);

  /* Illustration */
  --art-sage: #8fae94;
  --art-sage-deep: #6d8f75;
  --art-gold: #c9a35a;
  --art-gold-soft: #e6cf9b;
  --art-red: #c0564a;
  --art-ivory: #fbf7ee;
  --art-paper: #efe4cc;

  /* Focus */
  --focus: #2f5a42;
  --focus-ring: 0 0 0 3px var(--bg), 0 0 0 5.5px var(--focus);

  /* Type */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-q: clamp(1.45rem, 1.1rem + 1.6vw, 2.05rem);
  --fs-hero: clamp(2.6rem, 1.6rem + 4.6vw, 4.6rem);

  /* Shape & rhythm */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;
  --gutter: clamp(16px, 4vw, 32px);
  --maxw: 1140px;

  /* Motion */
  --ease: cubic-bezier(.22, .8, .24, 1);
  --t-fast: 140ms;
  --t-med: 260ms;
}

/* ---- Dark theme ---------------------------------------------------------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121c18;
  --bg-deep: #0d1512;
  --surface: #17231e;
  --surface-hi: #1c2a24;
  --surface-sunk: #101915;
  --line: #2a3a32;
  --line-strong: #3a4d43;
  --ink: #ece6d6;
  --ink-soft: #d3cdbd;
  --muted: #a6b0a5;
  --sage: #7fa58a;
  --sage-strong: #9cc4a7;
  --sage-ink: #b5d6bd;
  --sage-soft: #213a2d;
  --gold: #cfae6b;
  --gold-ink: #dcc08a;
  --gold-soft: #3a3222;
  --red: #e08b7e;
  --red-ink: #f0a093;
  --red-soft: #3c2421;
  --on-primary: #10201a;
    --on-danger: #2a1411;
  --primary: #a9cfb2;
  --primary-hover: #bfdcc6;
  --shade: rgba(0, 0, 0, 0.55);
  --shade-strong: rgba(0, 0, 0, 0.65);
  --light: rgba(120, 160, 135, 0.07);
  --card-glow: inset 0 1px 0 rgba(220, 192, 138, 0.10);
  --art-sage: #5f8a6c;
  --art-sage-deep: #4a7157;
  --art-gold: #c9a660;
  --art-gold-soft: #8f7a4c;
  --art-red: #c76a5c;
  --art-ivory: #26362e;
  --art-paper: #2f3f36;
  --focus: #d8bd82;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121c18;
    --bg-deep: #0d1512;
    --surface: #17231e;
    --surface-hi: #1c2a24;
    --surface-sunk: #101915;
    --line: #2a3a32;
    --line-strong: #3a4d43;
    --ink: #ece6d6;
    --ink-soft: #d3cdbd;
    --muted: #a6b0a5;
    --sage: #7fa58a;
    --sage-strong: #9cc4a7;
    --sage-ink: #b5d6bd;
    --sage-soft: #213a2d;
    --gold: #cfae6b;
    --gold-ink: #dcc08a;
    --gold-soft: #3a3222;
    --red: #e08b7e;
    --red-ink: #f0a093;
    --red-soft: #3c2421;
    --on-primary: #10201a;
    --on-danger: #2a1411;
    --primary: #a9cfb2;
    --primary-hover: #bfdcc6;
    --shade: rgba(0, 0, 0, 0.55);
    --shade-strong: rgba(0, 0, 0, 0.65);
    --light: rgba(120, 160, 135, 0.07);
    --card-glow: inset 0 1px 0 rgba(220, 192, 138, 0.10);
    --art-sage: #5f8a6c;
    --art-sage-deep: #4a7157;
    --art-gold: #c9a660;
    --art-gold-soft: #8f7a4c;
    --art-red: #c76a5c;
    --art-ivory: #26362e;
    --art-paper: #2f3f36;
    --focus: #d8bd82;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-med: 0ms; }
}
