/* =========================================================================
   Lúcuma Menu — English recreation
   Built from a flattened-raster source (see STYLE-REPORT.md for full
   font/color sourcing notes). Colors are CSS custom properties sampled
   from the source render — "closest match, please confirm", never exact.
   Fonts (Urbanist body / Kaffe headings) are owner-confirmed identities,
   not visual guesses — see the --font-display comment below re: Kaffe's
   unresolved licensing/webfont-availability status.
   ========================================================================= */

/* Kaffe @font-face — commented out on purpose. No licensed, webfont-servable
   file for "Kaffe" is in hand (not on Google Fonts or Adobe Fonts; see
   STYLE-REPORT.md §1a). Once the owner supplies a licensed .woff2 (either a
   purchased file from Jolicia Type Foundry, or a different source if "Kaffe"
   turns out to mean a different/proprietary brand font), drop it in
   /assets/fonts/ and uncomment:
@font-face {
  font-family: "Kaffe";
  src: url("../assets/fonts/Kaffe-Regular.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
*/

:root {
  /* --- Sampled palette (see STYLE-REPORT.md §2 for sample locations) --- */
  --color-cream:        #f3f1e6; /* cover / breakfast / kids page background */
  --color-sage:         #63967a; /* Desayunos headline + icon fill on cream pages */
  --color-sage-bright:  #8ebc9f; /* LÚCUMA wordmark fill */
  --color-sage-bg:      #8cbc9d; /* Platos Fuertes page background */
  --color-sage-dark:    #325240; /* ink + icon fill on the green page */
  --color-tan-bg:       #f1bb6e; /* Entradas / Panadería·Bebidas background */
  --color-brown-ink:    #815e39; /* body ink + icon fill on tan pages */
  --color-gold:         #e6b25a; /* MENÚ / Pizzas headline gold */
  --color-charcoal:     #4a4a42; /* cover border rule (estimate, thin stroke) */
  --color-cream-ink:    #f3f1e6; /* headline text set on colored backgrounds */

  --color-page-bg: #fbfaf5;
  --color-body-ink: #3a352c;

  /* --- Fonts: see STYLE-REPORT.md §1 ---
     Owner-confirmed identities (2026-08-24 review), overriding the prior
     closest-match guesses (Fraunces/Fredoka):
       body/normal text -> Urbanist   (on Google Fonts, loaded in <head>, licensed OFL)
       headings          -> Kaffe     (NOT found on Google Fonts or Adobe Fonts under
                                        this name; a same-named commercial product exists
                                        from Jolicia Type Foundry but (a) has no legally
                                        webfont-servable file in hand yet and (b) its
                                        specimen does not visually resemble the serif
                                        display face in the source render. See
                                        STYLE-REPORT.md §1a and OPEN-QUESTIONS.md #0.)
     --font-display therefore lists "Kaffe" first so a licensed file can be wired in
     later via the commented @font-face block below with zero further edits — until
     then the page renders on the Fraunces fallback, same as the prior build. */
  --font-display: "Kaffe", "Fraunces", "Rozha One", Georgia, "Times New Roman", serif;
  --font-sans: "Urbanist", "Trebuchet MS", "Segoe UI", Arial, sans-serif;

  /* --- Spacing / scale, all relative (see STYLE-REPORT.md §3) --- */
  --space-page-margin: clamp(1rem, 4vw, 3rem);
  --space-section-gap: clamp(2.5rem, 6vw, 5rem);
  --gutter: clamp(1.5rem, 4vw, 3rem);
  --box-radius: 2px;

  --fs-page-title: clamp(2.75rem, 7vw, 5rem);
  --fs-section-title: clamp(2rem, 4.5vw, 3rem);
  --fs-subsection-title: clamp(1.35rem, 2.6vw, 1.9rem);
  --fs-item: clamp(1rem, 1.6vw, 1.15rem);
  --fs-body: clamp(0.92rem, 1.3vw, 1.02rem);
  --fs-fine: clamp(0.82rem, 1.1vw, 0.92rem);
  --fs-es-gloss: clamp(0.72rem, 1vw, 0.8rem);

  --icon-color: var(--color-sage);
}

/* ---------------------------------------------------------------------- */
/* Reset-ish base                                                          */
/* ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-page-bg);
  color: var(--color-body-ink);
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  /* Defensive net, not a fix for any specific bug: a single overflowing
     child anywhere on a 150+ line menu page would otherwise widen the
     whole document and silently push content off-screen on narrow phones.
     The real fix for the one case we found (the header logo) is the
     min-width: 0 above — this is a backstop in case anything else, now or
     later, does the same thing. */
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 800; }
p { margin: 0 0 0.75em; }
ul, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

.visually-hidden {
  position: absolute; 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: -999px; top: 0; background: var(--color-sage-dark);
  color: #fff; padding: 0.75rem 1.25rem; z-index: 100;
}
.skip-link:focus { left: var(--space-page-margin); top: 0.5rem; }

/* ---------------------------------------------------------------------- */
/* Fixed/sticky top bar — logo + EN/ES language switch                    */
/* `position: sticky` (not `fixed`) is used deliberately: it keeps the bar
   in normal document flow, so it reserves its own height and can never
   overlap the cover/content beneath it — no compensating body padding
   needed, and it degrades safely if JS fails to load. It still behaves as
   a "stays visible on scroll" fixed bar once the page scrolls past it.
   Background is plain white — a deliberate match to the logo file's own
   baked-in opaque white background (confirmed via pixel-alpha sampling,
   see STYLE-REPORT.md §7), not the sampled --color-cream token, specifically
   to avoid a visible mismatched box around the artwork. */
/* ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #ffffff;
  border-bottom: 1px solid color-mix(in srgb, var(--color-charcoal) 20%, transparent);
}
.site-header__inner {
  max-width: 75rem;
  margin: 0 auto;
  padding: 0.4rem var(--space-page-margin);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.75rem, 3vw, 1.5rem);
  min-width: 0;
}
.site-header__brand {
  display: inline-flex;
  flex-shrink: 1;
  /* Without this, the <img>'s intrinsic 1189px width (from its width/height
     attributes, kept for CLS-free loading) becomes the flex item's
     automatic min-width, which silently refuses to shrink below ~1189px
     and forces the whole page to overflow horizontally on narrow phones —
     classic flexbox-plus-image footgun. min-width: 0 overrides that. */
  min-width: 0;
}
.site-header__logo {
  display: block;
  height: clamp(2.1rem, 6vw, 3.25rem);
  width: auto;
  max-width: 100%;
  min-width: 0;
}
.lang-switch {
  display: inline-flex;
  border: 1.5px solid var(--color-sage);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-switch__btn {
  border: 0;
  background: transparent;
  color: var(--color-sage-dark);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--fs-fine);
  letter-spacing: 0.04em;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  line-height: 1;
}
.lang-switch__btn + .lang-switch__btn { border-left: 1.5px solid var(--color-sage); }
/* --color-sage-dark (not the lighter --color-sage) behind white text here:
   white-on-sage measures 3.40:1 — the same ratio the pre-existing nav-pill
   :hover/:focus-visible state already ships at, which is acceptable for a
   transient hover flash but not for this toggle's PRESSED state, which
   stays visibly "on" indefinitely for whichever language is active.
   white-on-sage-dark measures 8.69:1 (verified via the standard relative-
   luminance formula), comfortably clearing WCAG AA. */
.lang-switch__btn[aria-pressed="true"] { background: var(--color-sage-dark); color: #fff; }
.lang-switch__btn:not([aria-pressed="true"]):hover,
.lang-switch__btn:not([aria-pressed="true"]):focus-visible {
  background: color-mix(in srgb, var(--color-sage) 18%, transparent);
}
.lang-switch__btn:focus-visible { outline: 2px solid var(--color-sage-dark); outline-offset: 2px; }

@media (max-width: 30rem) {
  .site-header__inner { padding: 0.35rem 1rem; }
  .site-header__logo { height: clamp(1.9rem, 9vw, 2.4rem); }
  .lang-switch__btn { padding: 0.35rem 0.65rem; }
}

/* Small-italic secondary-language gloss spans (e.g. "Breakfast" ->
   "Desayunos" shown underneath): once the page-wide language switch is set
   to Spanish, the primary text of these same elements already IS Spanish
   (or, for dish names already kept in Spanish, the gloss was the English
   explanation) — showing the small gloss line underneath becomes redundant
   in either case, so it's hidden while data-lang="es". Reversible any time;
   see OPEN-QUESTIONS.md. */
html[data-lang="es"] .es { display: none; }

/* In-page anchor targets (section-nav links, the "Skip to menu" link, and
   the logo's "back to top" link) need scroll-margin-top so the sticky
   header doesn't cover the top of the section being jumped to — the
   estimate below tracks the header's own clamp() height with a small
   margin of safety; imprecision here only affects a few px of scroll
   position, never actual overlap/hidden content. */
.menu-section, #top, #main {
  scroll-margin-top: clamp(3.25rem, 9vw, 4.75rem);
}

/* ---------------------------------------------------------------------- */
/* Cover / hero                                                            */
/* ---------------------------------------------------------------------- */
.cover {
  background: var(--color-cream);
  border: 1px solid var(--color-charcoal);
  border-radius: var(--box-radius);
  margin: var(--space-page-margin);
  padding: clamp(2rem, 8vw, 5rem) var(--space-page-margin);
  text-align: center;
}
.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--color-sage-bright);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.brand-wordmark .dot { color: var(--color-gold); }
.menu-title {
  font-size: var(--fs-page-title);
  color: var(--color-gold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.section-nav {
  margin: 0 var(--space-page-margin) var(--space-section-gap);
}
.section-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
}
.section-nav a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--color-sage);
  border-radius: 999px;
  text-decoration: none;
  color: var(--color-sage-dark);
  font-size: var(--fs-fine);
}
.section-nav a:hover, .section-nav a:focus-visible { background: var(--color-sage); color: #fff; }

/* ---------------------------------------------------------------------- */
/* Dietary legend                                                          */
/* ---------------------------------------------------------------------- */
.legend {
  margin: 0 var(--space-page-margin) var(--space-section-gap);
  padding: 1rem var(--space-page-margin);
  background: var(--color-cream);
  border: 1px dashed var(--color-sage);
  border-radius: var(--box-radius);
  text-align: center;
}
.legend-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-sage-dark);
  font-size: var(--fs-body);
}
.legend-list li { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-list svg { width: 1.4em; height: 1.4em; }

/* ---------------------------------------------------------------------- */
/* Menu sections                                                          */
/* ---------------------------------------------------------------------- */
.menu-section {
  padding: clamp(2.5rem, 6vw, 4rem) var(--space-page-margin);
  margin-bottom: var(--space-section-gap);
  border-radius: var(--box-radius);
}
.menu-section.theme-cream   { background: var(--color-cream); --icon-color: var(--color-sage); }
.menu-section.theme-sage    { background: var(--color-sage-bg); --icon-color: var(--color-sage-dark); color: var(--color-sage-dark); }
.menu-section.theme-tan     { background: var(--color-tan-bg); --icon-color: var(--color-brown-ink); color: var(--color-brown-ink); }

.section-title {
  font-size: var(--fs-section-title);
  text-align: center;
  margin-bottom: 0.25em;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.menu-section.theme-cream .section-title { color: var(--color-sage); }
.menu-section.theme-sage  .section-title { color: var(--color-cream-ink); }
.menu-section.theme-tan   .section-title { color: #fff; }

.section-title .es,
.subsection-title .es,
.item-name .es {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-style: italic;
  font-size: var(--fs-es-gloss);
  text-transform: none;
  opacity: 0.75;
  letter-spacing: 0;
}
.section-title .es { text-align: center; }

.section-intro {
  max-width: 46em;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: var(--fs-body);
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gutter);
}
@media (min-width: 46rem) {
  .columns {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
  }
  .columns .divider {
    width: 2px;
    align-self: stretch;
    background: currentColor;
    opacity: 0.35;
  }
}
.columns .divider { display: none; }
@media (min-width: 46rem) { .columns .divider { display: block; } }
.columns .column { min-width: 0; }

/* Prevent flex/grid children from blowing out their container to fit
   unbroken content (the classic min-width:auto overflow gotcha). */
.item-line, .two-col-grid, .modifier-list li {
  min-width: 0;
}
.item-line > *, .two-col-grid > *, .modifier-list li > * {
  min-width: 0;
}
.item-name, .price, .label {
  overflow-wrap: break-word;
}

.subsection-title {
  font-size: var(--fs-subsection-title);
  margin-bottom: 0.4em;
}
.menu-section.theme-cream .subsection-title { color: var(--color-sage); }
.menu-section.theme-sage  .subsection-title { color: var(--color-cream-ink); }
.menu-section.theme-tan   .subsection-title { color: var(--color-brown-ink); }

.subsection-note {
  font-size: var(--fs-fine);
  margin-bottom: 1rem;
  opacity: 0.9;
}
.subsection-note.modifiers { font-weight: 700; }

.menu-list { margin-bottom: 1.5rem; }
.menu-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 15%, transparent);
}
.menu-item:last-child { border-bottom: none; }
.item-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-weight: 700;
  font-size: var(--fs-item);
}
.item-name { flex: 1; }
.icon-group {
  display: inline-flex;
  gap: 0.25rem;
  vertical-align: middle;
  margin-left: 0.35rem;
}
.icon-group svg { width: 1.15em; height: 1.15em; color: var(--icon-color); }
.price {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.item-desc {
  font-size: var(--fs-body);
  font-weight: 500;
  margin-top: 0.15em;
}

/* Feature / boxed callouts (Chilaquiles, Guacamole Griego, Hazlo Combo, etc.) */
.feature-box {
  border: 2px solid currentColor;
  clip-path: polygon(
    16px 0, calc(100% - 16px) 0, 100% 16px,
    100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%,
    0 calc(100% - 16px), 0 16px
  );
  padding: clamp(1.25rem, 3vw, 2rem);
  margin: 1.5rem 0;
}
.feature-box + .feature-box { margin-top: 2rem; }
.feature-box .subsection-title { text-align: center; }
.feature-box .item-line { justify-content: center; gap: 1rem; }
.feature-box .item-line.spread { justify-content: space-between; }
.feature-box .section-intro { margin-bottom: 1rem; }

.modifier-list { margin: 0.5rem 0 1rem; font-size: var(--fs-body); }
.modifier-list li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.15rem 0; }
.modifier-list .label { font-weight: 600; }

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--gutter);
}
@media (min-width: 30rem) {
  .two-col-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
footer.site-footer {
  text-align: center;
  padding: 2rem var(--space-page-margin) 3rem;
  color: var(--color-sage-bright);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------------- */
/* Print                                                                   */
/* ---------------------------------------------------------------------- */
@media print {
  .section-nav, .skip-link, .site-header { display: none; }
  .menu-section { break-inside: avoid-page; }
}
