/* =====================================================================
   THE STORY BOOK FAMILY: DESIGN TOKENS  (v1.0, 18 Nov 2026)
   ---------------------------------------------------------------------
   Single source of truth for colour, type, spacing, radius, shadow and motion.
   Shared by:  storybookboldon.co.uk (the pub)  +  playbookboldon.co.uk (the soft play).
   Sister sites: copy this file + /assets/fonts/*.woff2. Keep the --sb-* and --play-*
   names stable. Each site remaps the "semantic" layer (--c-*) to its own personality.
   Fonts: Fraunces (display serif, variable: opsz/wght/SOFT/WONK) + Manrope (body),
   both SIL Open Font License, self-hosted (no Google requests).
   ===================================================================== */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(../fonts/Fraunces.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300 900; font-display: swap; src: url(../fonts/Fraunces-italic.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/Manrope.woff2) format('woff2'); }
/* Metric-matched fallbacks keep layout shift near zero while the web fonts load. */
@font-face { font-family: 'Fraunces Fallback'; src: local('Georgia'), local('Times New Roman'); size-adjust: 106%; ascent-override: 92%; descent-override: 24%; }
@font-face { font-family: 'Manrope Fallback'; src: local('Arial'), local('Helvetica'); size-adjust: 103%; ascent-override: 102%; descent-override: 29%; }

:root {
  /* ---- Family palette: "The Story Book" (pub) ---- */
  --sb-forest-950: #081a15;
  --sb-forest-900: #0c241e;
  --sb-forest-800: #11332a;   /* signature bottle green */
  --sb-forest-700: #18463a;
  --sb-forest-600: #22584a;
  --sb-moss:       #3f7a5f;
  --sb-leaf:       #5e9a6e;

  --sb-paper:      #f8f2e6;   /* page background, warm book paper */
  --sb-paper-2:    #efe5d1;
  --sb-paper-3:    #e2d2b2;
  --sb-cream:      #fffaf0;

  --sb-ink:        #1b2622;   /* body text on paper (AAA) */
  --sb-ink-soft:   #46524d;   /* secondary text on paper (AA) */

  --sb-gold:       #e0a948;   /* brass: on dark only */
  --sb-gold-lt:    #f3d593;
  --sb-gold-text:  #8a5d12;   /* gold for text on paper (AA 4.9:1) */

  --sb-berry:      #a3322b;   /* book-cloth red */
  --sb-berry-dk:   #7c211c;

  /* ---- Family palette: "Playbook" (soft play sister site) ---- */
  --play-coral:  #ff6b57;
  --play-sky:    #3db5e6;
  --play-sun:    #ffc533;
  --play-mint:   #41c79a;
  --play-lilac:  #9b7bea;
  --play-bg:     #fff3dd;
  --play-ink:    #1f2a44;

  /* ---- Type ---- */
  --font-display: 'Fraunces', 'Fraunces Fallback', Georgia, serif;
  --font-body:    'Manrope', 'Manrope Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-hero:  clamp(2.75rem, 1.2rem + 5vw, 5.3rem);
  --fs-h1:    clamp(2.5rem, 1.5rem + 4.4vw, 5rem);
  --fs-h2:    clamp(2.05rem, 1.35rem + 3vw, 3.75rem);
  --fs-h3:    clamp(1.35rem, 1.15rem + .8vw, 1.8rem);
  --fs-lead:  clamp(1.075rem, 1rem + .45vw, 1.32rem);
  --fs-body:  1.0625rem;
  --fs-small: .9rem;
  --fs-micro: .76rem;
  --lh-tight: 1.02;
  --lh-snug:  1.2;
  --lh-body:  1.65;
  --track-caps: .16em;

  /* ---- Space, layout, shape ---- */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.5rem;
  --space-6: 2rem;   --space-7: 3rem;  --space-8: 4.5rem; --space-9: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --wrap:    1240px;
  --gutter:  clamp(16px, 4vw, 40px);
  --r-sm: 8px; --r-md: 14px; --r-lg: 24px; --r-xl: 36px; --r-pill: 999px;

  --shadow-1: 0 1px 2px rgb(12 36 30 / .08), 0 2px 8px rgb(12 36 30 / .06);
  --shadow-2: 0 2px 6px rgb(12 36 30 / .08), 0 14px 34px rgb(12 36 30 / .12);
  --shadow-3: 0 6px 16px rgb(12 36 30 / .12), 0 30px 70px rgb(12 36 30 / .22);
  --shadow-glow: 0 0 0 1px rgb(224 169 72 / .35), 0 10px 40px rgb(224 169 72 / .25);

  /* ---- Motion ---- */
  --ease-out:  cubic-bezier(.2, .8, .2, 1);
  --ease-pop:  cubic-bezier(.3, 1.45, .45, 1);
  --dur-1: .18s; --dur-2: .35s; --dur-3: .7s; --dur-4: 1.2s;

  /* ---- Semantic layer (the pub). The Playbook site remaps these. ---- */
  --c-bg:        var(--sb-paper);
  --c-surface:   var(--sb-cream);
  --c-text:      var(--sb-ink);
  --c-muted:     var(--sb-ink-soft);
  --c-line:      rgb(27 38 34 / .14);
  --c-dark:      var(--sb-forest-800);
  --c-dark-2:    var(--sb-forest-900);
  --c-on-dark:   #f6efe0;
  --c-on-dark-muted: rgb(246 239 224 / .74);
  --c-accent:    var(--sb-berry);
  --c-highlight: var(--sb-gold);
  --c-focus:     #2f7df6;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0s; --dur-2: 0s; --dur-3: 0s; --dur-4: 0s; }
}
