/* =========================================================================
   Design tokens — the single source for color, type, spacing, radius, motion.
   Change values here; components in site.css only reference these variables.
   Every text/background pair below meets WCAG 2.2 AA (ratios noted vs --bg).
   ========================================================================= */

:root {
  /* ---- Color: light (default) ---- */
  --bg: #FBF5EC;          /* Cream — page background */
  --surface: #F3E6D6;     /* Sand — quiet panels, testimonials */
  --raised: #FFFBF5;      /* Card background */
  --ink: #2D231E;         /* Espresso — body text, 14.1:1 */
  --muted: #6A5A50;       /* Walnut — secondary text, 6.1:1 (5.4:1 on --surface) */
  --line: #E4D3C0;        /* Decorative borders only (not used for meaning) */
  --line-strong: #8C7A6D; /* Borders that identify controls, 3.6:1 */
  --accent: #A9481F;      /* Terracotta — links, buttons, focus, 5.3:1 */
  --on-accent: #FFFFFF;   /* Text on --accent, 5.8:1 */
  --sage: #4E6B50;        /* Labels/kickers, 5.5:1 */
  --blob: #F0D9C2;        /* Decorative shape behind the portrait */
  --blob-2: #DCE5D5;      /* Decorative accent circle */
  --inverse-bg: #2D231E;  /* Dark contact panel */
  --inverse-ink: #FBF5EC;

  /* ---- Type ---- */
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --soft: "SOFT" 100;     /* Fraunces softness axis, used on all serif text */

  /* Fluid type scale (360px → 1280px), roughly a 1.25 ratio */
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --step-1: clamp(1.22rem, 1.1rem + 0.55vw, 1.45rem);
  --step-2: clamp(1.55rem, 1.3rem + 1.2vw, 2.15rem);
  --step-3: clamp(2.1rem, 1.55rem + 2.6vw, 3.5rem);
  --step-4: clamp(2.6rem, 1.7rem + 5vw, 5.75rem);
  --leading-tight: 1.1;
  --leading: 1.7;
  --measure: 40rem;       /* Comfortable reading width for long-form text */

  /* ---- Spacing ---- */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 0.75rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
  --space-3xl: clamp(3.5rem, 2rem + 5vw, 7rem);
  --gutter: clamp(1rem, 0.4rem + 3vw, 3rem);
  --gap: clamp(1rem, 0.6rem + 1.8vw, 2.25rem);
  --max: 72rem;

  /* ---- Shape ---- */
  --radius-s: 12px;
  --radius-m: 24px;
  --radius-l: 40px;
  --radius-pill: 999px;

  /* ---- Motion (all motion is disabled under prefers-reduced-motion) ---- */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 150ms;
  --dur: 350ms;

  color-scheme: light;
}

/* ---- Color: dark. Applied when the browser prefers dark (and no override),
        or when the visitor picks Dark in the footer theme switch. ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1714;        /* Ember */
    --surface: #2A221D;
    --raised: #241D19;
    --ink: #F4EADF;       /* Linen, 15.0:1 */
    --muted: #BFAE9F;     /* Sand, 8.3:1 */
    --line: #3A302A;
    --line-strong: #7D6C60;
    --accent: #F09B74;    /* Apricot, 8.2:1 */
    --on-accent: #1C1714;
    --sage: #9DBF9F;      /* 8.8:1 */
    --blob: #3A2A21;
    --blob-2: #26302A;
    --inverse-bg: #F4EADF;
    --inverse-ink: #1C1714;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1C1714;
  --surface: #2A221D;
  --raised: #241D19;
  --ink: #F4EADF;
  --muted: #BFAE9F;
  --line: #3A302A;
  --line-strong: #7D6C60;
  --accent: #F09B74;
  --on-accent: #1C1714;
  --sage: #9DBF9F;
  --blob: #3A2A21;
  --blob-2: #26302A;
  --inverse-bg: #F4EADF;
  --inverse-ink: #1C1714;
  color-scheme: dark;
}
