/* ============================================================================
   PIZZERIA FILIPO — digital menu page (QR target)
   Warm "paper" theme: cream page, navy ink, gold + ember accents. Highly
   legible on phones outdoors; honours the look of the printed menu.
   Depends on tokens from style.css (loaded first).
   ==========================================================================*/

body.menupage {
  --accent: var(--ember);
  background-color: var(--paper);
  color: var(--ink);
  background-image:
    radial-gradient(1200px 500px at 50% -10%, rgba(232,198,82,.16), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
html[data-theme="light"] body.menupage {
  --ink: #20304f; --ink-soft: #5c6580; --paper: #f4ead2; --paper-card: #fbf5e6; --rule: rgba(32, 48, 79, .16);
}
html[data-theme="dark"] body.menupage {
  --ink: #f2e9cf; --ink-soft: rgba(242, 233, 207, .62); --paper: #101d31; --paper-card: #17273f; --rule: rgba(242, 233, 207, .14);
}
body.menupage::after { opacity: .03; }

/* --------------------------------------------------------- menu top bar */
.menu-top {
  position: sticky; top: 0; z-index: 100;
  background: #0d1727;
  border-bottom: 2px solid var(--gold);
  color: #f6ecc9;
}
.menu-top__inner { display: flex; align-items: center; gap: .8rem; padding: .7rem var(--pad); max-width: var(--maxw); margin: 0 auto; }
.menu-top .brand { margin-right: auto; }
.menu-top .brand img { width: 42px; height: 42px; }
.menu-top .brand__name { font-size: 1.05rem; color: #f6ecc9; }
.menu-top a.home { font-size: .82rem; color: rgba(246,236,201,.75); display: inline-flex; align-items: center; gap: .4rem; }
.menu-top a.home:hover { color: var(--gold); }
.menu-top .themetoggle { color: rgba(246,236,201,.8); border-color: rgba(246,236,201,.2); }
.menu-top .themetoggle:hover { color: var(--gold); border-color: var(--gold); }
.menu-top .langsw { border-color: rgba(246,236,201,.25); }
.menu-top .langsw button { color: rgba(246,236,201,.6); }
.menu-top .langsw button[aria-pressed="true"] { background: var(--gold); color: #16223c; }

/* quick category nav */
.menu-nav { position: sticky; top: 57px; z-index: 90; background: var(--paper); border-bottom: 1px solid var(--rule); }
.menu-nav__inner { display: flex; gap: .5rem; overflow-x: auto; padding: .7rem var(--pad); max-width: var(--maxw); margin: 0 auto; scrollbar-width: none; }
.menu-nav__inner::-webkit-scrollbar { display: none; }
.menu-nav a {
  white-space: nowrap; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .42rem .85rem; border-radius: 4px; color: var(--ink-soft);
  border: 1px solid transparent; transition: all .25s var(--ease);
}
.menu-nav a:hover { color: var(--ink); }
.menu-nav a.active { background: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------ menu hero */
.menu-hero { text-align: center; padding: clamp(2.5rem, 6vw, 4rem) var(--pad) 1rem; max-width: var(--maxw); margin: 0 auto; }
.menu-hero .flag { display: inline-flex; margin-bottom: 1.2rem; }
.menu-hero .flag svg { width: 54px; height: 36px; border-radius: 3px; display: block; box-shadow: 0 4px 14px rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.08); overflow: hidden; }
.menu-hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 7vw, 4rem); color: var(--ink); line-height: .95; letter-spacing: -.02em; }
.menu-hero p { color: var(--ink-soft); margin-top: .8rem; font-size: 1rem; }
.menu-hero .updated { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); opacity: .7; margin-top: 1rem; }

/* ------------------------------------------------------------ menu body */
.menu-body { max-width: 900px; margin: 0 auto; padding: 2rem var(--pad) 4rem; }

.menu-section { margin-top: 3.2rem; scroll-margin-top: 120px; }
.menu-section:first-child { margin-top: 1rem; }
.menu-section__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: .4rem; }
.menu-section__head h2 {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  color: var(--ink); position: relative; white-space: nowrap; letter-spacing: -.02em;
}
.menu-section__head .rule { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 18px); opacity: .6; }
.menu-section__blurb { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1.4rem; max-width: 60ch; }

.menu-subgroup { margin-top: 1.8rem; }
.menu-subgroup h3 {
  font-family: var(--font-script); font-weight: 700; font-size: 1.7rem; color: var(--accent);
  margin-bottom: .5rem; line-height: 1;
}

.menu-list { list-style: none; }
.menu-list.cols { columns: 2; column-gap: 2.4rem; }
@media (max-width: 560px) { .menu-list.cols { columns: 1; } }

.mitem { display: flex; align-items: baseline; gap: .5rem; padding: .62rem 0; border-bottom: 1px dotted var(--rule); break-inside: avoid; }
.mitem:last-child { border-bottom: none; }
.mitem__main { min-width: 0; }
.mitem__name { font-weight: 700; color: var(--ink); font-size: 1.02rem; letter-spacing: .005em; }
.mitem__desc { color: var(--ink-soft); font-size: .86rem; margin-top: .1rem; line-height: 1.4; }
.mitem__dots { flex: 1; border-bottom: 1px dotted var(--rule); transform: translateY(-3px); min-width: 12px; }
.mitem__price { font-weight: 700; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mitem__variants { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; white-space: nowrap; }
.mitem__variant { display: inline-flex; gap: .5rem; align-items: baseline; font-variant-numeric: tabular-nums; }
.mitem__variant .sz { font-size: .74rem; color: var(--ink-soft); font-weight: 600; }
.mitem__variant .pr { font-weight: 700; color: var(--accent); }

.menu-note { margin-top: 3rem; padding: 1.2rem 1.4rem; background: var(--paper-card); border: 1px solid var(--rule); border-radius: 6px; font-size: .84rem; color: var(--ink-soft); text-align: center; }

.menu-foot { text-align: center; padding: 2.5rem var(--pad); border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: .9rem; }
.menu-foot a { color: var(--accent); font-weight: 700; }
.menu-foot .contact { margin-top: .6rem; display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; }

.printbtn {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.4rem;
  padding: .6rem 1.2rem; border-radius: 4px; border: 1px solid var(--ink-soft);
  color: var(--ink); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transition: all .25s var(--ease);
}
.printbtn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* reveal for menu sections */
.menu-section { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.menu-section.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- PRINT */
@media print {
  body.menupage { background: #fff; color: #000; }
  body.menupage::after, .menu-top, .menu-nav, .printbtn, .menu-hero .flag { display: none !important; }
  .menu-hero { padding-top: 0; }
  .menu-section { opacity: 1; transform: none; break-inside: avoid; }
  .menu-section__head .rule { background: #000; opacity: 1; }
  .mitem__price, .mitem__variant .pr, .menu-subgroup h3 { color: #000; }
  a { color: #000; text-decoration: none; }
}
