/* =====================================================================
   Heaven on a Spoon — Global Stylesheet (style.css)
   ---------------------------------------------------------------------
   Client:  Heaven on a Spoon — authentic Italian gelato shop (Mesa, AZ)
            + Greater-Phoenix wholesale gelato/sorbet supplier.
   Purpose: The complete, reusable design-system foundation for the
            future static MPA build (index / menu / about / wholesale /
            contact + 404). Page-build prompts consume these tokens and
            components without re-deciding the design.

   Follows: 02_CSS_DESIGN_BLUEPRINT.md ("Fresh Sicilian Gelateria" —
            light, fresh, appetizing; warm cream canvas + pistachio +
            berry + espresso; footer is the only dark surface) and
            03_OUTPUT_CONTRACT.md (single stylesheet, no framework,
            no inline styles, no external imports).

   NOTE — Recommended direction, not confirmed brand assets:
            The palette hex values and font family names below are a
            RECOMMENDED design direction. They are NOT confirmed official
            brand colors or fonts. Reconcile against the real logo/brands
            when supplied. No external font is imported in this step;
            font-family stacks prefer the intended faces and fall back to
            safe system fonts. No image URLs are referenced (image slots
            use gradient/colour fallbacks until approved photos exist).

   Architecture order (do not reorder):
     1. Reset / base
     2. Design tokens (:root)
     3. Typography
     4. Global layout (primitives)
     5. Components (header, hero, buttons, cards, menu, wholesale,
        about, contact, footer)
     6. Page-specific compositions
     7. Utilities
     8. Responsive rules
     9. Accessibility
   ===================================================================== */


/* =====================================================================
   1. RESET / BASE
   ===================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Sticky-header-aware anchor scrolling for every page with #fragment links */
  scroll-padding-top: var(--scroll-offset);
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
ul, ol {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

body {
  min-height: 100vh;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: max(1px, 0.06em);
  text-underline-offset: 0.15em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

:where(h1, h2, h3, h4, h5, h6) {
  overflow-wrap: break-word;
}

::selection {
  background: rgba(192, 69, 95, 0.18); /* soft berry tint */
  color: var(--color-heading, #2b1f17);
}


/* =====================================================================
   2. DESIGN TOKENS (:root)
   All project values live here. No hardcoded hex/px outside :root,
   except the reduced-motion guard and documented one-offs.
   ===================================================================== */

:root {

  /* --- Surface / background colours --- */
  --color-bg: #fbf6ee;             /* warm cream canvas */
  --color-surface: #ffffff;        /* clean card surface */
  --color-surface-alt: #f4ead9;    /* soft almond/sand band */
  --color-surface-pistachio: #eaf0de; /* pale pistachio accent band */

  /* --- Brand / accent colours --- */
  --color-primary: #5e7f3e;        /* pistachio — brand */
  --color-primary-dark: #46602d;   /* pistachio hover / button fill */
  --color-accent: #c0455f;         /* berry — appetite accent */
  --color-cta: #a8324a;            /* berry-deep — high-emphasis button fill */
  --color-caramel: #c2853a;        /* caramel — small/large-text accents only */

  /* --- Text colours --- */
  --color-ink: #33261e;            /* body text — warm espresso */
  --color-heading: #2b1f17;        /* headings — deep espresso */
  --color-text-muted: #6e5d50;     /* captions / helper text */
  --color-text-invert: #faf5ec;    /* text on dark/colour surfaces */

  /* --- Border / line colours --- */
  --color-border: #e6d9c6;         /* warm sand dividers / inputs */
  --color-border-strong: #d8c6ad;

  /* --- Footer (the only dark surface) --- */
  --color-footer: #2b1f17;         /* warm espresso */
  --color-footer-text: #f4ead9;    /* cream */
  --color-footer-muted: #c9b9a6;

  /* --- Dietary badge dot colours (secondary cue only; text always shown) --- */
  --diet-df: #5b7c99;  /* dairy-free  — soft blue  */
  --diet-v:  #5e7f3e;  /* vegan       — pistachio  */
  --diet-gf: #c2853a;  /* gluten-free — wheat      */
  --diet-ls: #4e8c84;  /* low sugar   — teal       */
  --diet-ef: #8a5a8c;  /* egg-free    — plum       */

  /* --- Feedback colours --- */
  --color-error: #b3344f;
  --color-error-bg: #fbe9ec;
  --color-success: #3f7a4f;
  --color-success-bg: #e8f1e6;

  /* --- Gradients (light & subtle; never heavy) --- */
  --gradient-hero: linear-gradient(
      to right,
      rgba(251, 246, 238, 0.94) 0%,
      rgba(251, 246, 238, 0.94) 45%,
      rgba(251, 246, 238, 0.35) 70%,
      rgba(251, 246, 238, 0) 100%);
  --gradient-cta: linear-gradient(135deg, #c0455f 0%, #a8324a 100%);
  --gradient-surface: linear-gradient(to bottom, #fbf6ee 0%, #f4ead9 100%);
  --gradient-card-media: linear-gradient(135deg, #f4ead9 0%, #eaf0de 100%);

  /* --- Shadows (warm-tinted; used selectively) --- */
  --shadow-soft: 0 2px 10px rgba(75, 55, 40, 0.06);
  --shadow-lift: 0 10px 28px rgba(75, 55, 40, 0.14);
  --shadow-nav:  0 2px 12px rgba(75, 55, 40, 0.08);

  /* --- Typography: families (stacks prefer brand faces, then safe system fallbacks; no font imports / no external font loading) --- */
  --font-display: "Fraunces", "Recoleta", Georgia, "Times New Roman", "Iowan Old Style", serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, "Helvetica Neue", sans-serif;

  /* --- Typography: fluid scale --- */
  --text-xs:  0.75rem;
  --text-sm:  0.875rem;
  --text-base: 1rem;
  --text-lg:  1.125rem;
  --text-xl:  1.375rem;
  --text-2xl: clamp(1.5rem, 1.2rem + 1.4vw, 1.875rem);
  --text-3xl: clamp(1.75rem, 1.3rem + 2.1vw, 2.5rem);
  --text-4xl: clamp(2rem, 1.4rem + 2.8vw, 3rem);
  --text-5xl: clamp(2.5rem, 1.7rem + 3.8vw, 3.75rem);

  /* --- Typography: line-heights --- */
  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-heading: 1.25;
  --leading-normal: 1.65;
  --leading-relaxed: 1.75;

  /* --- Typography: weights --- */
  --weight-normal: 400;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* --- Spacing scale (4px base) --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-section: clamp(3rem, 2rem + 5vw, 6rem); /* fluid major-section padding */

  /* --- Radius scale --- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* --- Layout widths --- */
  --container-max: 1200px;
  --container-wide: 1320px;
  --container-narrow: 720px;
  --container-gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

  /* --- Sticky offsets --- */
  --header-height: 4.5rem;
  --scroll-offset: 6.5rem; /* header + jump-nav clearance for anchor targets */

  /* --- Transitions --- */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* --- Z-index --- */
  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;

  /* --- Focus ring --- */
  --focus-ring: 3px solid var(--color-primary);
  --focus-ring-invert: 3px solid var(--color-text-invert);
}


/* =====================================================================
   3. TYPOGRAPHY
   ===================================================================== */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  color: var(--color-ink);
  background-color: var(--color-bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-heading);
  text-wrap: balance;
}

h1 { font-size: var(--text-5xl); line-height: var(--leading-tight); letter-spacing: -0.01em; }
h2 { font-size: var(--text-3xl); line-height: var(--leading-snug); letter-spacing: -0.005em; }
h3 { font-size: var(--text-xl); line-height: var(--leading-snug); }
h4 { font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: var(--leading-snug); }

p { max-width: 68ch; }

a {
  color: var(--color-primary-dark);
  transition: color var(--transition-fast);
}

a:hover { color: var(--color-cta); }

strong, b { font-weight: var(--weight-bold); }

small { font-size: var(--text-sm); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-3);
}

.eyebrow--caramel { color: var(--color-caramel); }

.lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.text-muted { color: var(--color-text-muted); }


/* =====================================================================
   4. GLOBAL LAYOUT (PRIMITIVES)
   Reusable structural classes: page shell, container, section, grids,
   split, stack, cluster.
   ===================================================================== */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: var(--container-wide); }

/* Section spacing + surface variants for rhythm/contrast (light-first) */
.section { padding-block: var(--space-section); }
.section--tight { padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); }
.section--alt { background-color: var(--color-surface-alt); }
.section--pistachio { background-color: var(--color-surface-pistachio); }
.section--surface { background-color: var(--color-surface); }
.section--gradient { background: var(--gradient-surface); }

.section-header { margin-bottom: var(--space-12); max-width: 60ch; }
.section-header--center { margin-inline: auto; text-align: center; }
.section-header p { margin-top: var(--space-3); }

/* Stack: vertical rhythm between flow children */
.stack > * + * { margin-top: var(--space-4); }
.stack--lg > * + * { margin-top: var(--space-8); }
.stack--sm > * + * { margin-top: var(--space-2); }

/* Cluster: wrapping flex row */
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}
.cluster--center { justify-content: center; }

/* Split: two-column layout (stacks on small screens) */
.split {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}

/* Generic responsive grids (auto-fit avoids orphan rows) */
.grid { display: grid; gap: var(--space-6); }
.card-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}


/* =====================================================================
   5. COMPONENTS
   ===================================================================== */

/* --------------------------------------------------------------
   5.1 Header & navigation (CSS-only, wraps on mobile — no JS needed)
   -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background-color: rgba(251, 246, 238, 0.9);
  -webkit-backdrop-filter: saturate(1.1) blur(6px);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  min-height: var(--header-height);
  padding-block: var(--space-3);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-xl);
  color: var(--color-heading);
  text-decoration: none;
  line-height: 1.1;
}

.site-brand:hover { color: var(--color-primary-dark); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-ink);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.site-nav a:hover { color: var(--color-primary-dark); background-color: var(--color-surface-pistachio); }

/* Active page state: colour + weight + underline (not colour alone) */
.site-nav a[aria-current="page"] {
  color: var(--color-primary-dark);
  font-weight: var(--weight-bold);
  box-shadow: inset 0 -2px 0 0 var(--color-primary);
}

/* CTA link inside nav */
.site-nav .nav-cta {
  background-color: var(--color-cta);
  color: var(--color-text-invert);
}

.site-nav .nav-cta:hover {
  background-color: var(--color-accent);
  color: var(--color-text-invert);
}

/* --------------------------------------------------------------
   5.2 Hero system (homepage / interior / wholesale)
   Default media panel uses a gradient fallback — no image required.
   -------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-surface);
}

.hero__inner {
  display: grid;
  gap: var(--space-12);
  align-items: center;
  padding-block: clamp(3rem, 2rem + 6vw, 7rem);
}

.hero__content { max-width: 40rem; }

.hero h1 { margin-bottom: var(--space-4); }

.hero__intro {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  max-width: 46ch;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* Media panel: gradient fallback now; an <img> can fill it later */
.hero__media {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--gradient-card-media);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Interior hero: shorter, content-first */
.hero--interior { background: var(--gradient-surface); }
.hero--interior .hero__inner { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }

.hero--menu {
    background-image: linear-gradient(rgba(251, 246, 238, 0.52), rgba(244, 234, 217, 0.55)), url("../img/menu-hero-image.jpg");
    background-size: cover;
    background-position: center 52%;
    background-repeat: no-repeat;
    min-height: 950px;
}s
.hero--menu .hero__inner { min-height: 830px; align-content: center; }

/* Wholesale hero variant: pistachio-leaning band for B2B credibility */
.hero--wholesale { background: linear-gradient(to bottom, var(--color-surface-pistachio), var(--color-bg)); }

/* --------------------------------------------------------------
   5.3 Buttons & links
   -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color var(--transition-base),
              border-color var(--transition-base),
              color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-base);
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(0); }

/* Primary — retail appetite action (berry) */
.btn--primary {
  background-color: var(--color-cta);
  color: var(--color-text-invert);
  border-color: var(--color-cta);
}
.btn--primary:hover { background-color: var(--color-accent); border-color: var(--color-accent); color: var(--color-text-invert); }

/* Secondary — pistachio outline / ghost-fill */
.btn--secondary {
  background-color: transparent;
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
}
.btn--secondary:hover { background-color: var(--color-surface-pistachio); color: var(--color-primary-dark); }

/* Ghost / text button */
.btn--ghost {
  background-color: transparent;
  color: var(--color-primary-dark);
  border-color: transparent;
  padding-inline: var(--space-3);
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
}
.btn--ghost:hover { color: var(--color-cta); box-shadow: none; transform: none; }

/* Wholesale CTA — pistachio brand fill (distinct from retail berry) */
.btn--wholesale {
  background-color: var(--color-primary-dark);
  color: var(--color-text-invert);
  border-color: var(--color-primary-dark);
}
.btn--wholesale:hover { background-color: var(--color-primary); border-color: var(--color-primary); color: var(--color-text-invert); }

/* Disabled / unavailable */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--block { width: 100%; }

/* --------------------------------------------------------------
   5.4 Cards & content components
   -------------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.card__body { flex: 1 1 auto; }
.card__actions { margin-top: var(--space-6); } /* pins actions to a shared baseline */

/* Interactive cards (links/buttons inside) get a designed hover */
.card--interactive:hover,
a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--color-border-strong);
}

.card__title { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.card__text { color: var(--color-text-muted); }

/* Media area inside a card — gradient fallback, no image required */
.card__media {
  border-radius: var(--radius-md);
  background: var(--gradient-card-media);
  aspect-ratio: 4 / 3;
  margin-bottom: var(--space-4);
  overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }

/* Feature card — featured/flagship emphasis */
.feature-card { border-top: 4px solid var(--color-primary); }

/* Trust / proof strip */
.trust-strip {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  padding: var(--space-8);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.trust-strip__item { text-align: center; }
.trust-strip__stat {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-3xl);
  color: var(--color-primary-dark);
  line-height: 1.1;
}
.trust-strip__label { color: var(--color-text-muted); font-size: var(--text-sm); }

/* Callout panel (general) */
.callout {
  border-left: 4px solid var(--color-accent);
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
}

/* Quote callout (story / testimonial-style emphasis) */
.quote-callout {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  color: var(--color-heading);
  border-left: 4px solid var(--color-primary);
  padding: var(--space-4) var(--space-8);
}

/* Badges / pills / chips (generic) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  background-color: var(--color-surface-alt);
  color: var(--color-heading);
  border: 1px solid var(--color-border);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  font-weight: var(--weight-semibold);
  color: var(--color-ink);
}


/* --------------------------------------------------------------
   5.5 Menu / product system
   -------------------------------------------------------------- */

/* Sticky jump-nav: horizontal, scrollable on small screens (no JS needed) */
.menu-nav {
  position: sticky;
  top: var(--header-height);
  z-index: var(--z-dropdown);
  background-color: rgba(251, 246, 238, 0.95);
  border-block: 1px solid var(--color-border);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.menu-nav__list {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-block: var(--space-3);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.menu-nav a {
  scroll-snap-align: start;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--color-ink);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.menu-nav a:hover,
.menu-nav a[aria-current="true"] {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-text-invert);
}

/* Menu category section + scroll offset so headings clear the sticky bars */
.menu-section { padding-block: var(--space-12); scroll-margin-top: var(--scroll-offset); }
.menu-section + .menu-section { border-top: 1px solid var(--color-border); }
.menu-section__intro { color: var(--color-text-muted); margin-top: var(--space-2); max-width: 60ch; }

/* Size key / note panel (shown once) */
.note-panel {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-6);
  background-color: var(--color-surface-pistachio);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.note-panel__label { font-weight: var(--weight-bold); color: var(--color-heading); }

/* Flavor chip grid — even rows via auto-fit (no orphan single card) */
.flavor-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}

.flavor-chip {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.flavor-chip:hover { background-color: var(--color-surface-pistachio); border-color: var(--color-border-strong); }
.flavor-chip__name { font-weight: var(--weight-bold); color: var(--color-heading); }
.flavor-chip__badges { display: flex; flex-wrap: wrap; gap: var(--space-1); }

/* Dietary badges — TEXT label always present; colour dot is a secondary cue only */
.dietary-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  padding: var(--space-6);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.dietary-legend__item { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }

.dietary-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background-color: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-heading);
  letter-spacing: 0.03em;
}
/* Colour dot via ::before — decorative; the abbreviation text carries the meaning */
.dietary-badge::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background-color: var(--dot, var(--color-text-muted));
  flex: none;
}
.dietary-badge--df { --dot: var(--diet-df); }
.dietary-badge--v  { --dot: var(--diet-v); }
.dietary-badge--gf { --dot: var(--diet-gf); }
.dietary-badge--ls { --dot: var(--diet-ls); }
.dietary-badge--ef { --dot: var(--diet-ef); }

/* Specialty / taco / Corleone's product cards (image-forward) */
.product-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--color-border-strong); }
.product-card__media { background: var(--gradient-card-media); aspect-ratio: 4 / 3; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6); flex: 1 1 auto; }
.product-card__name { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: var(--text-xl); color: var(--color-heading); }
.product-card__desc { color: var(--color-text-muted); }
.product-card__badges { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: auto; padding-top: var(--space-2); }

/* Corleone's "house creations" accent */
.product-card--corleones {  }
.product-card--corleones .product-card__name { color: var(--color-cta); }

/* Drinks / tea / coffee — compact two-column list (not heavy cards) */
.drink-list {
  display: grid;
  gap: var(--space-3) var(--space-12);
  grid-template-columns: 1fr;
}
.drink-list__item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.drink-list__name { font-weight: var(--weight-bold); color: var(--color-heading); }
.drink-list__detail { color: var(--color-text-muted); font-size: var(--text-sm); text-align: right; }


/* --------------------------------------------------------------
   5.6 Wholesale page system
   -------------------------------------------------------------- */

.wholesale-intro { max-width: 60ch; }

/* Who-we-serve / what-we-offer grids (auto-fit; no orphan single card) */
.wholesale-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-6);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.service-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background-color: var(--color-surface-pistachio);
  color: var(--color-primary-dark);
}
.service-card__title { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--color-heading); }
.service-card__text { color: var(--color-text-muted); font-size: var(--text-sm); }

/* Service-area section — grouped, readable; never a keyword wall */
.service-area__groups {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.service-area__group-title { font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--color-primary-dark); margin-bottom: var(--space-3); }
.city-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.city-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--color-ink);
}

/* FAQ list (static; accordion-ready via <details>) */
.faq-list { display: grid; gap: var(--space-4); max-width: 52rem; }
.faq-item {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
}
.faq-item > summary {
  cursor: pointer;
  font-weight: var(--weight-bold);
  color: var(--color-heading);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: 44px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-primary-dark);
  transition: transform var(--transition-base);
}
.faq-item[open] > summary::after { content: "\2013"; } /* en dash when open */
.faq-item__answer { margin-top: var(--space-3); color: var(--color-text-muted); }
.faq-item__answer > * + * { margin-top: var(--space-3); }

/* Inquiry CTA band (berry gradient) */
.cta-band {
  background: var(--gradient-cta);
  color: var(--color-text-invert);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.cta-band h2 { color: var(--color-text-invert); }
.cta-band p { color: rgba(250, 245, 236, 0.92); margin-inline: auto; }
.cta-band .btn--primary {
  background-color: var(--color-text-invert);
  color: var(--color-cta);
  border-color: var(--color-text-invert);
}
.cta-band .btn--primary:hover { background-color: #fff; color: var(--color-cta); }


/* --------------------------------------------------------------
   5.7 About / story system
   -------------------------------------------------------------- */

.story-split {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}
.story-media {
  border-radius: var(--radius-lg);
  background: var(--gradient-card-media);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.story-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 13%; }

/* Timeline */
.timeline { display: grid; gap: var(--space-6); border-left: 2px solid var(--color-border-strong); padding-left: var(--space-6); }
.timeline__item { position: relative; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-6) - 6px);
  top: 0.35em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-bg);
}
.timeline__year { font-family: var(--font-display); font-weight: var(--weight-bold); color: var(--color-primary-dark); font-size: var(--text-lg); }
.timeline__text { color: var(--color-text-muted); }

/* Client-review note / unresolved-wording callout (visible flag pattern) */
.review-note {
  border: 1px dashed var(--color-caramel);
  background-color: #fbf1e3;
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-ink);
}
.review-note__label { font-weight: var(--weight-bold); color: var(--color-caramel); text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--text-xs); }


/* --------------------------------------------------------------
   5.8 Contact / form system
   -------------------------------------------------------------- */

.contact-grid {
  display: grid;
  gap: var(--space-12);
  align-items: start;
}

.contact-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-soft);
}
.contact-card__title { font-size: var(--text-lg); margin-bottom: var(--space-2); }

.contact-line { display: flex; gap: var(--space-3); align-items: baseline; padding-block: var(--space-2); }
.contact-line__label { font-weight: var(--weight-bold); color: var(--color-heading); min-width: 7rem; }
.contact-line a { font-weight: var(--weight-semibold); }

/* Hours table / list */
.hours-list { display: grid; gap: var(--space-1); }
.hours-list__row { display: flex; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-1); border-bottom: 1px solid var(--color-border); }
.hours-list__day { font-weight: var(--weight-semibold); }

/* Map panel — styled placeholder; a real embed/iframe can fill it (no image url) */
.map-panel {
  border-radius: var(--radius-lg);
  background: var(--gradient-card-media);
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-6);
  overflow: hidden;
}
.map-panel iframe { width: 100%; height: 100%; border: 0; }

/* Forms */
.form { display: grid; gap: var(--space-4); }
.form__row { display: grid; gap: var(--space-2); }
.form__label { font-weight: var(--weight-bold); color: var(--color-heading); }
.form__required { color: var(--color-cta); }
.form__hint { font-size: var(--text-sm); color: var(--color-text-muted); }

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  color: var(--color-ink);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form__textarea { min-height: 8rem; resize: vertical; line-height: var(--leading-normal); }

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(94, 127, 62, 0.18);
}

.form__input:user-invalid,
.form__textarea:user-invalid { border-color: var(--color-error); }

/* Inline feedback messages */
.form-message { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-weight: var(--weight-semibold); }
.form-message--error { background-color: var(--color-error-bg); color: var(--color-error); border: 1px solid var(--color-error); }
.form-message--success { background-color: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success); }

/* Visible fallback-contact notice (used when a form endpoint is unconfirmed) */
.fallback-notice {
  border-left: 4px solid var(--color-primary);
  background-color: var(--color-surface-pistachio);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-sm);
}
.fallback-notice strong { color: var(--color-heading); }


/* --------------------------------------------------------------
   5.9 Footer (the only dark surface — warm, not heavy)
   -------------------------------------------------------------- */

.site-footer {
  background-color: var(--color-footer);
  color: var(--color-footer-text);
  padding-block: var(--space-16) var(--space-8);
  margin-top: var(--space-24);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-12);
  grid-template-columns: 1fr;
}

.site-footer h2,
.site-footer h3 { color: var(--color-footer-text); }

.site-footer a {
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.site-footer a:hover { color: #f4c9d2; } /* light berry tint, readable on espresso */

.footer-brand { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: var(--text-xl); }

.footer-nav { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-nav a { display: inline-flex; min-height: 40px; align-items: center; }

.footer-contact { color: var(--color-footer-text); font-size: var(--text-sm); }
.footer-contact a { font-weight: var(--weight-semibold); }

.footer-social { display: flex; gap: var(--space-4); }
.footer-social a { display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; }

.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(244, 234, 217, 0.2);
  color: var(--color-footer-muted);
  font-size: var(--text-sm);
}


/* =====================================================================
   6. PAGE-SPECIFIC COMPOSITIONS
   Minimal — most layout is componentised above. Body-class hooks only.
   ===================================================================== */

.page-home .hero__inner { gap: var(--space-16); }
.page-menu main { scroll-padding-top: var(--scroll-offset); }


/* =====================================================================
   7. UTILITIES
   Low-specificity, single-purpose helpers.
   ===================================================================== */

.visually-hidden,
.sr-only {
  position: absolute !important; /* screen-reader-only utility — standard a11y pattern */
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  z-index: var(--z-modal);
  padding: var(--space-3) var(--space-6);
  background-color: var(--color-cta);
  color: var(--color-text-invert);
  border-radius: var(--radius-md);
  font-weight: var(--weight-bold);
  text-decoration: none;
  transform: translateY(-150%); /* fully hidden offscreen until focused — no resting peek */
  transition: transform var(--transition-fast);
}
.skip-link:focus { transform: translateY(0); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.measure { max-width: 60ch; }
.measure-narrow { max-width: 46ch; }
.full-bleed-pad { padding-inline: var(--container-gutter); }
[hidden] { display: none !important; } /* honour the HTML hidden attribute */


/* =====================================================================
   8. RESPONSIVE RULES (mobile-first; min-width enhancements)
   Base styles above target small screens. Breakpoints recompose upward.
   ===================================================================== */

/* Small tablet and up */
@media (min-width: 48em) {

  .split { grid-template-columns: 1fr 1fr; }
  .hero__inner { grid-template-columns: 1.05fr 0.95fr; }
  .story-split { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1.1fr 0.9fr; }

  .drink-list { grid-template-columns: 1fr 1fr; }

  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1.2fr; }
}

/* Tablet / small laptop and up */
@media (min-width: 64em) {

  .site-header__inner { flex-wrap: nowrap; }

  /* Wider container gutter breathing room handled by clamp tokens */
  .section-header { margin-bottom: var(--space-16); }
}

/* Wide desktop: constrain content, don't stretch line lengths */
@media (min-width: 80em) {
  .hero__inner { padding-block: clamp(4rem, 3rem + 4vw, 7rem); }
}

/* Order-of-source mobile safeguards: stacked layouts already default to
   single column; ensure nav + jump-nav never force horizontal page scroll. */
@media (max-width: 47.99em) {
  .hero__media { order: -1; } /* image/media above text on small screens */
  .cluster--center-mobile { justify-content: center; }
  .contact-line__label { min-width: 6rem; }
}


/* =====================================================================
   9. ACCESSIBILITY
   Focus, reduced motion, touch, contrast-conscious defaults.
   ===================================================================== */

/* Visible keyboard focus on every interactive element */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Focus on dark / coloured surfaces uses a light ring for contrast */
.btn--primary:focus-visible,
.btn--wholesale:focus-visible,
.nav-cta:focus-visible,
.cta-band a:focus-visible,
.site-footer a:focus-visible {
  outline: var(--focus-ring-invert);
  outline-offset: 3px;
}

/* Do not remove focus visibility for mouse users without a replacement:
   keep a subtle outline fallback where :focus-visible is unsupported. */
a:focus,
button:focus { outline-color: var(--color-primary); }

/* Smooth scrolling only when motion is acceptable */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Reduced motion: near-instant state changes */
@media (prefers-reduced-motion: reduce) {
  /* !important here is the standard reduced-motion override to defeat
     component transition/animation declarations for sensitive users. */
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover,
  .card--interactive:hover,
  .product-card:hover { transform: none; }
}

/* Honour increased-contrast preference: firm up borders */
@media (prefers-contrast: more) {
  :root { --color-border: #b9a98f; --color-border-strong: #9c8a6e; }
  .btn--secondary { border-width: 2px; }
}

/* Guarantee comfortable tap targets for interactive controls */
a,
button,
input,
select,
textarea,
summary,
[role="button"] { touch-action: manipulation; }


/* =====================================================================
   10. PRINT (minimal finishing)
   ===================================================================== */

@media print {
  .site-header,
  .menu-nav,
  .site-footer,
  .cta-band,
  .skip-link { display: none !important; } /* hide non-content chrome in print */

  body { background: #fff; color: #000; }
  .card,
  .product-card,
  .service-card { box-shadow: none; border-color: #999; }
  a { text-decoration: underline; }
}

/* ===== End of Heaven on a Spoon global stylesheet ===== */


/* ============================================================
   Animated rainbow trailing border — Specialty creations,
   Frozen Italian Tacos, Corleone's layered creations,
   and Cannoli & Sicilian Granita cards.
   The rotation is driven by JS (see menu.html) which updates the
   global --angle on :root; here we just paint and reveal the trail.
   ============================================================ */

/* Fallback registration for engines that DO honor the at-rule.
   inherits:true so the :root --angle cascades down to the cards. */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: true;
}

/* Default angle so the gradient is valid even before JS runs */
:root { --angle: 0deg; }

#specialties .product-card,
#tacos .product-card,
#corleones .product-card,
#cannoli-granita .product-card {
  position: relative;
  overflow: visible;
  border-radius: 24px;
}

#specialties .product-card::before,
#tacos .product-card::before,
#corleones .product-card::before,
#cannoli-granita .product-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 2px;
  background: conic-gradient(
    from var(--angle),
    transparent 40%,
    #ff0055 55%,
    #7a00ff 70%,
    #00e5ff 82%,
    #00ff66 92%,
    #ff0055 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

/* Reveal the (continuously rotating) trail on hover / focus */
#specialties .product-card:hover::before,
#specialties .product-card:focus-within::before,
#tacos .product-card:hover::before,
#tacos .product-card:focus-within::before,
#corleones .product-card:hover::before,
#corleones .product-card:focus-within::before,
#cannoli-granita .product-card:hover::before,
#cannoli-granita .product-card:focus-within::before {
  opacity: 1;
}


/* Home hero gelato background */
.hero--home {
  background-image: linear-gradient(rgba(251,246,238,0.52), rgba(244,234,217,0.55)), url('../img/gelato-hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero--about {
  background-image: linear-gradient(rgba(251,246,238,0.52), rgba(244,234,217,0.55)), url("../img/storefront-hero.jpg?v=1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero--about .hero__inner { grid-template-columns: 1fr; min-height: 830px; align-content: center; }
.hero--home .hero__inner {
  grid-template-columns: 1.05fr 0.95fr;	min-height: 830px;
	align-content: center;
}

.hero--home .hero__media--logo {
  background: none;
  box-shadow: none;
  border-radius: 0;
  display: grid;
  place-items: center;
}
.hero--home .hero__media--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes heroLogoFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hero--home .hero__media--logo img {
  opacity: 0;
}
