/* ============================================================
   Live Every Day With Cheryl — design tokens (shared)
   ------------------------------------------------------------
   Loaded BEFORE every page stylesheet:
     tokens.css -> components.css -> page styles
   Change brand colours, type scale and spacing here only.
   Palette: pink #CE6BBD · cream #F0E4CF · sage #A9BA9E · blue #66C2E6
   Ink values are contrast-corrected (WCAG AA on cream).
   ============================================================ */

:root {
  /* ---------- surfaces ---------- */
  --bg: #F0E4CF;
  --bg-2: #F7EFE2;
  --bg2: var(--bg-2);
  --bg-warm: #F2E6D2;
  --surface: #FFFBF5;
  --surface-pure: #FFFFFF;
  --panel: #FFF7EE;
  --beige: #C7B297;
  --line: rgba(199, 178, 151, 0.55);
  --line-strong: rgba(199, 178, 151, 0.8);

  /* ---------- ink (AA on --bg) ---------- */
  --ink: #3F302B;          /* 10.1:1 */
  --ink-soft: #6B554E;     /* 5.5:1  */
  --muted: #6E574D;        /* 5.3:1  */
  --caption: #766055;      /* 4.7:1  */
  --faint: #766055;        /* small print, placeholders */
  --charcoal: #1A1A1A;     /* legacy alias (voucher page) */

  /* ---------- brand ---------- */
  --pink: #CE6BBD;         /* decorative / >=24px accents only */
  --pink-deep: #A23B90;    /* 4.7:1 on cream, white text 5.9:1 */
  --pink-hover: #8F2F79;
  --pink-soft: #F3DBEC;

  /* ---------- support ---------- */
  --blue: #66C2E6;
  --blue-soft: #DCF0F9;
  --blue-ink: #2A6B85;
  --sage: #A9BA9E;
  --sage-soft: #E2E9DC;
  --sage-ink: #3C5A2E;
  --gold: #C9A84C;         /* voucher page accent, charcoal text only */

  /* ---------- glass ---------- */
  --glass-bg: rgba(255, 250, 242, 0.55);
  --glass-border: rgba(199, 178, 151, 0.5);
  --glass-hairline: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --glass-blur: 20px;
  --glass-saturate: 1.4;

  /* ---------- radii ---------- */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-pill: 999px;
  --radius: var(--r-lg);

  /* ---------- spacing (4pt scale) ---------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* ---------- elevation (warm-tinted) ---------- */
  --shadow-xs: 0 1px 2px rgba(63, 48, 43, 0.06);
  --shadow-sm: 0 4px 12px rgba(63, 48, 43, 0.07);
  --shadow-md: 0 12px 28px rgba(63, 48, 43, 0.1);
  --shadow-lg: 0 28px 60px rgba(63, 48, 43, 0.14);
  --shadow: 0 18px 44px rgba(120, 96, 78, 0.14);
  --glow-pink: 0 12px 32px rgba(166, 63, 148, 0.28);

  /* ---------- motion ---------- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur: 180ms;
  --dur-slow: 280ms;
  --transition: var(--dur) var(--ease);

  /* ---------- focus ---------- */
  --focus-color: #A63F94;
  --focus-outline: 3px solid var(--focus-color);
  --focus-ring: 0 0 0 3px rgba(166, 63, 148, 0.3);

  /* ---------- type families ---------- */
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --script: 'Great Vibes', cursive;
  --font-heading: var(--serif);
  --font-subheading: var(--sans);
  --font-body: var(--body);
  --font-script: var(--script);

  /* ---------- type scale ---------- */
  --fs-display: clamp(2.25rem, 4.6vw, 3.5rem);
  --fs-h1: clamp(1.9rem, 3.6vw, 2.6rem);
  --fs-h2: clamp(1.45rem, 2.6vw, 1.95rem);
  --fs-h3: 1.15rem;
  --fs-lead: clamp(1.02rem, 1.4vw, 1.15rem);
  --fs-body: 1rem;
  --fs-sm: 0.9375rem;
  --fs-cap: 0.8125rem;
  --fs-overline: 0.6875rem;
  --lh-tight: 1.08;
  --lh-heading: 1.2;
  --lh-body: 1.65;
  --track-tight: -0.02em;
  --track-overline: 0.16em;

  /* ---------- legacy aliases (older stylesheets) ---------- */
  --cream: var(--bg);
  --warm-alabaster: var(--bg-warm);
  --off-white: var(--surface);
  --card: var(--surface);
}

/* ============================================================
   Base / accessibility
   ============================================================ */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* One visible focus treatment for every keyboard user. */
:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Never lose the ring on buttons/links that reset outlines. */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

::selection {
  background: rgba(206, 107, 189, 0.28);
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
