/* Eat Healthy — menu styles.
 * Palette + type sampled/approximated from the 2026 print sticker menu (see README).
 * Headings/names: Nunito (rounded, Greek-capable) ≈ the print display face.
 * Descriptions: Georgia serif (system, Greek-capable) ≈ the print body serif. */

:root {
  --coral:        #f2543d;
  --coral-ink:    #e4442f;
  --teal:         #206a5d;
  --teal-badge:   #2d746f;
  --cream:        #fdfbf4;
  --ink:          #35322c;
  --muted:        #6a655c;
  --line:         #efe7d8;

  /* category pill tints */
  --pill-breakfast:     #fbf1a8;
  --pill-sandwiches:    #f8bdb6;
  --pill-protein-bowls: #d7edc4;
  --pill-strict-meals:  #f8bdb6;
  --pill-yogurt-bowls:  #f6d3e6;
  --pill-protein-bars:  #e3eea4;
  --pill-smoothies:     #e7d8f0;

  --font-display: "Nunito", system-ui, sans-serif;
  --font-body: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* clip (not hidden) so it doesn't become a scroll container and break position:sticky */
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
  background: rgba(253,251,244,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-logo { height: 34px; width: auto; display: block; }

.lang-toggle {
  display: inline-flex; border: 2px solid var(--teal);
  border-radius: 999px; overflow: hidden; font-family: var(--font-display);
}
.lang-toggle button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: 800 13px/1 var(--font-display); letter-spacing: .04em;
  color: var(--teal); padding: 7px 13px;
}
.lang-toggle button.active { background: var(--teal); color: #fff; }

/* ---------- category nav (sticky chips) ---------- */
.catnav {
  position: sticky; top: 55px; z-index: 20;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 16px; background: rgba(253,251,244,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}
.catnav::-webkit-scrollbar { display: none; }
.catnav a {
  flex: 0 0 auto; text-decoration: none;
  font: 700 13px/1 var(--font-display);
  color: var(--teal); background: #fff;
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 14px; white-space: nowrap; transition: .15s;
}
.catnav a.current { background: var(--coral); border-color: var(--coral); color: #fff; }

/* ---------- menu body ---------- */
main {
  max-width: 720px; margin: 0 auto; padding: 8px 16px 40px;
}
.section { position: relative; scroll-margin-top: 150px; padding-top: 26px; }
.section[hidden] { display: none; }
/* give the last section enough trailing runway that near-bottom categories can
   still scroll their heading clear of the sticky top bar when jumped to (esp.
   multi-column, where sections are shorter). The ~232px footer below adds the
   rest of the runway, so this stays short of a full viewport to avoid a big gap. */
.section:last-child { min-height: calc(100vh - 350px); }

/* decorative pastel blob behind each section (scrolls with content; mirrors the
   print's per-column pastel shapes). Alternates side + colour per category. */
.section > * { position: relative; z-index: 1; }
.section::before {
  content: ""; position: absolute; z-index: 0; top: 34px;
  width: 82%; max-width: 460px; aspect-ratio: 1.15 / 1;
  border-radius: 46% 54% 62% 38% / 55% 42% 58% 45%;
  filter: blur(11px); opacity: .5; pointer-events: none;
}
/* left column of the print → blob peeks from the left; right column → from the right */
#s-breakfast::before    { background: var(--pill-breakfast);     left: -16%; }
#s-yogurt-bowls::before  { background: var(--pill-yogurt-bowls);  left: -16%; }
#s-protein-bars::before  { background: var(--pill-smoothies);     left: -16%; }
#s-sandwiches::before    { background: #d9efc7;                   right: -16%; }
#s-protein-bowls::before { background: var(--pill-protein-bowls); right: -16%; }
#s-strict-meals::before  { background: #fbcfc9;                   right: -16%; }
#s-smoothies::before     { background: #fbcfc9;                   right: -16%; }

.section-head {
  display: flex; align-items: center; gap: 14px; margin: 6px 0 18px;
}
.section-head h2 {
  margin: 0; display: inline-block;
  font: 800 clamp(21px, 5.2vw, 27px)/1 var(--font-display);
  color: var(--coral); letter-spacing: .01em;
  background: var(--pill, #fbf1a8);
  padding: 11px 20px; border-radius: 999px;
}
.section-head .doodle { height: 62px; width: auto; opacity: .92; margin-left: auto; }

#s-breakfast     .section-head h2 { background: var(--pill-breakfast); }
#s-sandwiches    .section-head h2 { background: var(--pill-sandwiches); }
#s-protein-bowls .section-head h2 { background: var(--pill-protein-bowls); }
#s-strict-meals  .section-head h2 { background: var(--pill-strict-meals); }
#s-yogurt-bowls  .section-head h2 { background: var(--pill-yogurt-bowls); }
#s-protein-bars  .section-head h2 { background: var(--pill-protein-bars); }
#s-smoothies     .section-head h2 { background: var(--pill-smoothies); }

/* ---------- item ---------- */
.item { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.item[hidden] { display: none; }
.item:last-child { border-bottom: 0; }

.item-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.item-name {
  margin: 0; font: 800 17px/1.15 var(--font-display); color: var(--teal);
}
.item-price {
  margin-left: auto; font: 800 17px/1 var(--font-display);
  color: var(--teal); white-space: nowrap;
}
.item-desc { margin: 5px 0 0; font-size: 14.5px; color: var(--ink); }

/* nutrition badge */
.macro {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 4px 10px; border-radius: 8px;
  background: var(--teal-badge); color: #fff;
  font: 700 11.5px/1 var(--font-display); letter-spacing: .01em;
}
.macro .cal { font-weight: 900; }
.macro .sep { opacity: .5; }
.macro .m { font-weight: 700; opacity: .95; }

/* extras / notes */
.extra, .note {
  margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
}
.extra-label, .note-label {
  font: 800 13px/1.2 var(--font-display); color: var(--coral);
}
.extra-label span, .note-label span { font-family: var(--font-body); font-weight: 400; color: var(--ink); }
.extra-price, .note-price { font: 800 13px/1 var(--font-display); color: var(--coral); }
.note .plus98 {
  font: 800 10.5px/1 var(--font-display); color: #fff; background: var(--coral);
  padding: 3px 6px; border-radius: 5px;
}
.extra .macro { margin-top: 0; }

/* strict-meal variants */
.variant { margin-top: 12px; padding-top: 4px; }
.variant .item-top { align-items: baseline; }
.variant .item-name { font-size: 15.5px; }
.variant .item-desc { color: var(--muted); }

/* ---------- footer ---------- */
.footer {
  text-align: center; padding: 30px 16px 44px; margin-top: 20px;
  border-top: 1px solid var(--line);
}
.footer-logo { height: 92px; width: auto; }
.manager { margin: 14px 0 4px; font: 400 13px/1.4 var(--font-body); color: var(--muted); }
.credit { display: inline-block; margin-top: 6px; font: 700 12px/1 var(--font-display); color: var(--teal); text-decoration: none; letter-spacing: .03em; }

/* ---------- wider screens: print-style multi-column ---------- */
/* Tablet+: 2 balanced columns per section (mirrors the print's 2-column layout),
   section heading spans the full width. Each .item stays whole (break-inside). */
@media (min-width: 760px) {
  main { max-width: 1000px; padding: 8px 24px 48px; }
  .section { column-count: 2; column-gap: 48px; }
  .section-head { column-span: all; }
  .item { break-inside: avoid; }
  .section-head .doodle { height: 78px; }
  .item-name { font-size: 18px; }
}

/* Wide desktop: 3 columns, wider blob margins */
@media (min-width: 1240px) {
  main { max-width: 1180px; }
  .section { column-count: 3; column-gap: 44px; }
}

/* Contain the decorative section blobs within the content column at narrow/mid
   widths, where the column nearly fills the screen and their -16% bleed would
   otherwise poke past the viewport and cause horizontal scroll (shifting the
   whole sticky header). `clip` doesn't create a scroll container, so sticky bars
   and the scroll-jump behaviour are unaffected. Above 1560px the side margins are
   wide enough that the bleed stays on-screen, so the desktop look is untouched. */
@media (max-width: 1560px) {
  main { overflow-x: clip; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
