/* ===========================================================================
   Foundry Bakehouse — design tokens
   ---------------------------------------------------------------------------
   Three light palettes and three two-family type pairings. Nothing downstream
   references a literal colour, so switching a pairing is a one-line change.

   Every text/background pair below meets WCAG AA at the size it is used:
   body copy at 4.5:1 or better, large display and card faces at 3:1 or better.
   =========================================================================== */

:root {
  /* -- Type scale (fluid, 320px → 1440px) ---------------------------------- */
  --fbh-step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.89rem);
  --fbh-step-0:  clamp(1rem, 0.96rem + 0.18vw, 1.09rem);
  --fbh-step-1:  clamp(1.19rem, 1.12rem + 0.33vw, 1.38rem);
  --fbh-step-2:  clamp(1.41rem, 1.3rem + 0.57vw, 1.73rem);
  --fbh-step-3:  clamp(1.68rem, 1.5rem + 0.91vw, 2.18rem);
  --fbh-step-4:  clamp(2rem, 1.71rem + 1.42vw, 2.75rem);
  --fbh-step-5:  clamp(2.38rem, 1.94rem + 2.18vw, 3.46rem);
  --fbh-step-6:  clamp(2.83rem, 2.17rem + 3.27vw, 4.36rem);

  --fbh-leading-tight: 1.08;
  --fbh-leading-head: 1.14;
  --fbh-leading-body: 1.62;

  /* -- Spacing -------------------------------------------------------------- */
  --fbh-space-3xs: 0.25rem;
  --fbh-space-2xs: 0.5rem;
  --fbh-space-xs:  0.75rem;
  --fbh-space-s:   1rem;
  --fbh-space-m:   1.5rem;
  --fbh-space-l:   2.25rem;
  --fbh-space-xl:  3.5rem;
  --fbh-space-2xl: 5rem;
  --fbh-space-3xl: clamp(4.5rem, 3rem + 6vw, 7.5rem);

  --fbh-measure: 62ch;
  --fbh-wrap: 78rem;
  --fbh-gutter: clamp(1.25rem, 0.8rem + 2.2vw, 3rem);

  --fbh-radius: 2px;
  --fbh-radius-card: 3px;
  --fbh-radius-pill: 999px;

  --fbh-shadow-card: 0 1px 2px rgb(49 41 35 / 0.05), 0 8px 24px -12px rgb(49 41 35 / 0.14);
  --fbh-shadow-lift: 0 2px 4px rgb(49 41 35 / 0.07), 0 18px 40px -18px rgb(49 41 35 / 0.22);

  --fbh-transition: 160ms cubic-bezier(0.2, 0, 0.2, 1);

  /* Fonts are injected by inc/enqueue.php from the selected pairing; these are
     the fallbacks if that inline style is ever missing. */
  /* H1/H2 and the wordmark. Falls back to the display serif, so the a/b/c
     pairings keep working unchanged when the brand face is not in play. */
  --fbh-font-heading: "Charcuterie Block", "Fraunces", "Iowan Old Style", Georgia, serif;
  /* Decorative only — see .fbh-script in components.css. */
  --fbh-font-script: "Monthoers Signature", "Snell Roundhand", cursive;
  --fbh-font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --fbh-font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ===========================================================================
   Palette A — Warm Bakehouse (default)
   Cream and butter grounds, terracotta and honey accents, espresso text.
   =========================================================================== */

:root,
[data-fbh-palette="warm"] {
  --fbh-ground:      #FAF7F3;
  --fbh-ground-2:    #F1E8DD;
  --fbh-ground-3:    #CCDEDF;
  --fbh-ground-warm: #DBCAB2;
  --fbh-ground-cool: #CCDEDF;   /* the teal rung, named for intent */
  --fbh-teal:        #5E9598;   /* the FBD teal as a band or large type */
  --fbh-teal-ink:    #466F71;   /* darkened for small text: the band teal is only 3.6:1 on sand */
  /* Calls to action. The FBD teal at full strength carries cream text at only
     2.78:1, so the button fill is the same hue taken down to 0.105 luminance,
     where cream clears 4.5. --fbh-teal stays the brand teal for tints, faces
     and large type. */
  --fbh-cta:         #3D6163;
  --fbh-cta-hover:   #355456;
  --fbh-on-cta:      #F1E8DD;
  --fbh-band:        var(--fbh-cta);
  --fbh-on-band:     #F1E8DD;
  --fbh-surface:     #FCFAF8;
  --fbh-surface-2:   #F8F3ED;

  --fbh-ink:         #312923;
  --fbh-ink-2:       #735C4E;
  --fbh-ink-3:       #7C6354;
  --fbh-line:        #E5D8C7;
  --fbh-line-strong: #CFB899;

  --fbh-brand:       #844E31;
  --fbh-brand-hover: #704229;
  --fbh-on-brand:    #F1E8DD;

  --fbh-accent:      #BA785D;
  --fbh-on-accent:   #F1E8DD;
  --fbh-accent-2:    #9B9E7F;
  --fbh-on-accent-2: #F1E8DD;
  --fbh-accent-3:    #5E9598;
  --fbh-on-accent-3: #F1E8DD;

  --fbh-contrast:    #312923;
  --fbh-on-contrast: #F1E8DD;
  --fbh-contrast-muted: #C9AF8C;
  --fbh-accent-soft: #A57C52;  /* highlight for the dark utility bar */

  --fbh-focus:       #4D797C;   /* the FBD teal. Was #1A5E86, a blue that
                                   belonged to nothing else here and read
                                   as a browser default on the cream. */

  /* Status: notices and field errors. */
  --fbh-success:     #686A50;
  --fbh-info:        #466F71;
  --fbh-danger:      #955840;

  /* Card faces */
  --fbh-face-clay:  #94573F;
  --fbh-face-teal:  #456E70;
  --fbh-face-sage:  #66694F;
  --fbh-face-honey: #846034;
  --fbh-face-ink:   #312923;

  /* The cool and sand bands are dark enough that the muted ink and the
     brand stop clearing 4.5:1 on them. These are the same hues taken
     darker, applied only inside those bands (see layout.css). */
  --fbh-deep-ink-2:  #665245;
  --fbh-deep-brand:  #7C492E;

}

/* ===========================================================================
   Palette B — Bright Counter
   Paper white and sky grounds, teal primary, clay secondary.
   =========================================================================== */

[data-fbh-palette="bright"] {
  --fbh-ground:      #FAF7F3;
  --fbh-ground-2:    #E0EBEC;
  --fbh-ground-3:    #CCDEDF;
  --fbh-ground-warm: #DBCAB2;
  --fbh-ground-cool: #CCDEDF;   /* the teal rung, named for intent */
  --fbh-teal:        #5E9598;   /* the FBD teal as a band or large type */
  --fbh-teal-ink:    #466F71;   /* darkened for small text: the band teal is only 3.6:1 on sand */
  /* Calls to action. The FBD teal at full strength carries cream text at only
     2.78:1, so the button fill is the same hue taken down to 0.105 luminance,
     where cream clears 4.5. --fbh-teal stays the brand teal for tints, faces
     and large type. */
  --fbh-cta:         #3D6163;
  --fbh-cta-hover:   #355456;
  --fbh-on-cta:      #F1E8DD;
  --fbh-band:        var(--fbh-cta);
  --fbh-on-band:     #F1E8DD;
  --fbh-surface:     #FCFAF8;
  --fbh-surface-2:   #F8F3ED;

  --fbh-ink:         #312923;
  --fbh-ink-2:       #735C4E;
  --fbh-ink-3:       #7C6354;
  --fbh-line:        #E5D8C7;
  --fbh-line-strong: #CFB899;

  --fbh-brand:       #3D6163;
  --fbh-brand-hover: #345354;
  --fbh-on-brand:    #F1E8DD;

  --fbh-accent:      #BA785D;
  --fbh-on-accent:   #F1E8DD;
  --fbh-accent-2:    #9B9E7F;
  --fbh-on-accent-2: #F1E8DD;
  --fbh-accent-3:    #5E9598;
  --fbh-on-accent-3: #F1E8DD;

  --fbh-contrast:    #312923;
  --fbh-on-contrast: #F1E8DD;
  --fbh-contrast-muted: #C9AF8C;
  --fbh-accent-soft: #A57C52;  /* highlight for the dark utility bar */

  --fbh-focus:       #4D797C;

  /* Status: notices and field errors. */
  --fbh-success:     #676A50;
  --fbh-info:        #466F71;
  --fbh-danger:      #95583F;

  --fbh-face-clay:  #94573F;
  --fbh-face-teal:  #456E70;
  --fbh-face-sage:  #66694F;
  --fbh-face-honey: #846034;
  --fbh-face-ink:   #312923;

  /* The cool and sand bands are dark enough that the muted ink and the
     brand stop clearing 4.5:1 on them. These are the same hues taken
     darker, applied only inside those bands (see layout.css). */
  --fbh-deep-ink-2:  #665245;
  --fbh-deep-brand:  #3A5B5D;

}

/* ===========================================================================
   Palette C — Morning Garden
   Oat and soft-green grounds, sage primary, apricot secondary.
   =========================================================================== */

[data-fbh-palette="garden"] {
  --fbh-ground:      #FAF7F3;
  --fbh-ground-2:    #E9EAE3;
  --fbh-ground-3:    #CCDEDF;
  --fbh-ground-warm: #DBCAB2;
  --fbh-ground-cool: #CCDEDF;   /* the teal rung, named for intent */
  --fbh-teal:        #5E9598;   /* the FBD teal as a band or large type */
  --fbh-teal-ink:    #466F71;   /* darkened for small text: the band teal is only 3.6:1 on sand */
  /* Calls to action. The FBD teal at full strength carries cream text at only
     2.78:1, so the button fill is the same hue taken down to 0.105 luminance,
     where cream clears 4.5. --fbh-teal stays the brand teal for tints, faces
     and large type. */
  --fbh-cta:         #3D6163;
  --fbh-cta-hover:   #355456;
  --fbh-on-cta:      #F1E8DD;
  --fbh-band:        var(--fbh-cta);
  --fbh-on-band:     #F1E8DD;
  --fbh-surface:     #FCFAF8;
  --fbh-surface-2:   #F8F3ED;

  --fbh-ink:         #312923;
  --fbh-ink-2:       #735C4E;
  --fbh-ink-3:       #7C6354;
  --fbh-line:        #E5D8C7;
  --fbh-line-strong: #CFB899;

  --fbh-brand:       #5B5D47;
  --fbh-brand-hover: #4D4F3C;
  --fbh-on-brand:    #F1E8DD;

  --fbh-accent:      #BA785D;
  --fbh-on-accent:   #F1E8DD;
  --fbh-accent-2:    #B8864B;
  --fbh-on-accent-2: #F1E8DD;
  --fbh-accent-3:    #5E9598;
  --fbh-on-accent-3: #F1E8DD;

  --fbh-contrast:    #312923;
  --fbh-on-contrast: #F1E8DD;
  --fbh-contrast-muted: #C9AF8C;
  --fbh-accent-soft: #A57C52;  /* highlight for the dark utility bar */

  --fbh-focus:       #4D797C;

  /* Status: notices and field errors. */
  --fbh-success:     #686A50;
  --fbh-info:        #466F71;
  --fbh-danger:      #955940;

  --fbh-face-clay:  #94573F;
  --fbh-face-teal:  #456E70;
  --fbh-face-sage:  #66694F;
  --fbh-face-honey: #846034;
  --fbh-face-ink:   #312923;

  /* The cool and sand bands are dark enough that the muted ink and the
     brand stop clearing 4.5:1 on them. These are the same hues taken
     darker, applied only inside those bands (see layout.css). */
  --fbh-deep-ink-2:  #665245;
  --fbh-deep-brand:  #555742;

}
