/* ==========================================================================
   Design tokens
   --------------------------------------------------------------------------
   One storefront codebase, many sites. A site's look is ONLY this file's
   variables: a preset ([data-theme]) plus per-site overrides written inline
   on <html> by the server (here: by the prototype bar).
   site.css must never contain a raw colour, font name or radius.
   ========================================================================== */

/* ---- Self-hosted fonts (SIL OFL) ---------------------------------------- */
@font-face { font-family: "Marcellus"; src: url("fonts/marcellus-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-500.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-700.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-var.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* ---- Shared scale (same for every theme) -------------------------------- */
:root {
  --maxw: 1200px;
  --gutter: 20px;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: clamp(1.75rem, 1.6vw + 1.3rem, 2.5rem);
  --fs-hero: clamp(2.35rem, 4.4vw + 1rem, 4.25rem);

  --dur: 160ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Derived from --brand, so a site only ever overrides ONE colour. */
  --brand-hover: color-mix(in oklab, var(--brand) 86%, var(--text));
  --brand-soft: color-mix(in srgb, var(--brand) 14%, transparent);
  --brand-line: color-mix(in srgb, var(--brand) 55%, transparent);
}
@media (min-width: 760px) { :root { --gutter: 32px; } }

/* ==========================================================================
   Preset A - "Ember Hall": dark fantasy. Warm near-black, forged gold,
   roman serif display, sharp corners, hairline rules.
   ========================================================================== */
[data-theme="ember"] {
  color-scheme: dark;

  /* colour */
  --bg: #13100d;
  --bg-alt: #19150f;
  --surface: #1f1a14;
  --surface-2: #2a231a;
  --line: #3a3024;
  --line-strong: #5a4a36;
  --text: #f3ebdc;
  --text-2: #c2b59c;
  --text-3: #8d806a;
  --brand: #e3a73f;
  --on-brand: #1b1305;
  --brand-text: var(--brand);
  --accent: #cf5b36;
  --on-accent: #fff6ef;
  --ok: #86c797;
  --page-glow: radial-gradient(1100px 520px at 85% -8%, rgba(227, 167, 63, 0.09), transparent 62%);

  /* type */
  --font-display: "Marcellus", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  /* Prices never use the display serif: its round zero reads as a capital O. */
  --font-num: var(--font-body);
  --num-weight: 700;
  --body-size: 1.0625rem;
  --display-weight: 400;
  --display-tracking: 0.005em;
  --brand-tracking: 0.06em;
  --brand-case: uppercase;
  --label-case: uppercase;
  --label-tracking: 0.16em;
  --btn-case: uppercase;
  --btn-tracking: 0.09em;
  --btn-weight: 700;
  --btn-size: 0.875rem;

  /* shape */
  --r-s: 2px;
  --r-m: 3px;
  --r-l: 4px;
  --r-btn: 2px;
  --bw: 1px;
  --card-line: var(--line);
  --card-top: linear-gradient(90deg, transparent, var(--brand-line), transparent);
  --shadow-1: 0 10px 28px rgba(0, 0, 0, 0.32);
  --shadow-2: 0 28px 70px rgba(0, 0, 0, 0.6);
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 22px color-mix(in srgb, var(--brand) 22%, transparent);
  --ornament-display: block;
  --tile-pattern: repeating-linear-gradient(135deg, rgba(255, 236, 200, 0.035) 0 1px, transparent 1px 11px);

  /* density */
  --pad-card: 24px;
  --gap: 20px;
  --section-y: clamp(56px, 7vw, 96px);

  /* hero illustration palette */
  --art-sky-1: #13100d;
  --art-sky-2: #5c3521;
  --art-glow: #f0b85a;
  --art-disc: #f1c873;
  --art-disc-ring: #b9862c;
  --art-star: #f6dfa6;
  --art-cloud: transparent;
  --art-far: #3f2819;
  --art-mid: #2a1b12;
  --art-near: #120e0b;
  --art-ink: #080604;
  --art-window: #f3c463;
}

/* ==========================================================================
   Preset B - "Daybreak": bright market morning. Warm paper, pine green,
   geometric sans, soft radii, shadows instead of rules.
   ========================================================================== */
[data-theme="daybreak"] {
  color-scheme: light;

  /* colour */
  --bg: #f6f3ea;
  --bg-alt: #ede8da;
  --surface: #fffdf8;
  --surface-2: #f2eee2;
  --line: #e1dac8;
  --line-strong: #c8bfa8;
  --text: #15211b;
  --text-2: #4c5a52;
  --text-3: #7c8880;
  --brand: #0e6e52;
  --on-brand: #ffffff;
  --brand-text: var(--brand);
  --accent: #e0603a;
  --on-accent: #ffffff;
  --ok: #1c8758;
  --page-glow: none;

  /* type */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-num: var(--font-display);
  --num-weight: 600;
  --body-size: 1rem;
  --display-weight: 600;
  --display-tracking: -0.025em;
  --brand-tracking: -0.02em;
  --brand-case: none;
  --label-case: none;
  --label-tracking: 0;
  --btn-case: none;
  --btn-tracking: 0;
  --btn-weight: 600;
  --btn-size: 0.9375rem;

  /* shape */
  --r-s: 8px;
  --r-m: 16px;
  --r-l: 24px;
  --r-btn: 999px;
  --bw: 1px;
  --card-line: transparent;
  --card-top: none;
  --shadow-1: 0 1px 2px rgba(21, 33, 27, 0.06), 0 10px 30px rgba(21, 33, 27, 0.07);
  --shadow-2: 0 2px 4px rgba(21, 33, 27, 0.06), 0 28px 60px rgba(21, 33, 27, 0.14);
  --btn-shadow: 0 1px 2px rgba(21, 33, 27, 0.16);
  --ornament-display: none;
  --tile-pattern: radial-gradient(color-mix(in srgb, var(--brand) 16%, transparent) 1px, transparent 1.6px) 0 0 / 14px 14px;

  /* density */
  --pad-card: 28px;
  --gap: 24px;
  --section-y: clamp(64px, 8vw, 112px);

  /* hero illustration palette */
  --art-sky-1: #f6f3ea;
  --art-sky-2: #f6d9b0;
  --art-glow: #ffc861;
  --art-disc: #ffdf9c;
  --art-disc-ring: #dc9a3c;
  --art-star: transparent;
  --art-cloud: #fffdf8;
  --art-far: #c3d6c6;
  --art-mid: #86ad95;
  --art-near: #2e6b53;
  --art-ink: #143a2c;
  --art-window: #f6d9b0;
}
