/* ==========================================================================
   MoccaGino — Stylesheet
   Handgebaut, keine Abhängigkeiten, kein Framework, keine externen Requests.
   Das ist Absicht: Standard-Datenschutz, keine Cookie-Einwilligung für Fonts
   nötig, schnellste Ladezeit.
   ========================================================================== */

/* ---------- Design-Tokens ---------- */
:root {
  --espresso:   #2b1d14;
  --espresso-2: #3d2a1d;
  --crema:      #f7f1e8;
  --crema-2:    #efe4d6;
  --terra:      #a8442a;   /* italienisches Terrakotta */
  --terra-dark: #8a3620;
  --olive:      #5c6b4a;
  --ink:        #241c16;
  --muted:      #6f6157;
  --line:       #ddd0c0;
  --ok:         #2f7d4f;
  --warn:       #b06a00;

  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 2px 14px rgba(43,29,20,.08);
  --maxw: 1080px;
  --font: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Der Kopfbereich ist sticky und 80 px hoch. Ohne diese Reserve landet ein
     Sprungziel (Skip-Link, Anker) unter dem Header — WCAG 2.4.11. */
  scroll-padding-top: 90px;
}

/* Lange deutsche Komposita und URL-Texte dürfen umbrechen.
   Sonst schieben sie bei 320 px die Seite seitlich auf — WCAG 1.4.10 (Reflow). */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
.legal-page a { overflow-wrap: anywhere; }

/* Sichtbarer Tastaturfokus. Der Browser-Standardring ist nur 1 px und
   damit stark browserabhängig — hier fest 3 px in Markenfarbe. */
:focus-visible { outline: 3px solid var(--espresso); outline-offset: 2px; border-radius: 3px; }
header.site :focus-visible,
footer.site :focus-visible { outline-color: var(--crema); }

/* Wer Bewegung reduziert haben will, bekommt harte Sprünge statt Scrollen. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--crema);
  /* WICHTIG: kein user-scalable=no. Pinch-Zoom muss funktionieren (WCAG 1.4.4). */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra-dark); text-underline-offset: 3px; }
a:hover { color: var(--terra); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

/* ---------- Utilities ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--espresso); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
header.site {
  background: var(--espresso);
  color: var(--crema);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--crema); }
.brand .mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--terra); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  flex: 0 0 42px;
}
.brand .name { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; }
.brand .tag { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #cbb9a6; }

nav.main ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav.main a {
  display: block; padding: 9px 13px; border-radius: var(--radius);
  color: var(--crema); text-decoration: none; font-size: .93rem;
}
nav.main a:hover, nav.main a[aria-current="page"] { background: rgba(255,255,255,.13); }
nav.main a[aria-current="page"] { font-weight: 600; }

/* Mobil-Navigation */
.nav-toggle {
  display: none; background: rgba(255,255,255,.12); border: 0; color: var(--crema);
  padding: 10px 14px; border-radius: var(--radius); font-size: 1rem; cursor: pointer;
}
@media (max-width: 780px) {
  .nav-toggle { display: block; }
  nav.main { display: none; width: 100%; }
  nav.main.open { display: block; }
  nav.main ul { flex-direction: column; padding-top: 8px; }
  nav.main a { padding: 12px 13px; }
}

/* ---------- Öffnungszeiten-Leiste ---------- */
.status {
  background: var(--olive); color: #fff; font-size: .93rem;
  padding: 9px 20px; text-align: center;
  /* Mindesthöhe reservieren: verhindert Layout-Sprung, wenn der Text
     per JavaScript eingesetzt wird (Cumulative Layout Shift).
     62px, weil drei der fünf Statustexte auf schmalen Displays drei Zeilen
     brauchen — mit 44px sprang die Seite beim Laden um 16px. */
  min-height: 62px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1.35;
}
.status strong { font-weight: 600; }
/* Der Statusinhalt ist EIN Element. Vorher waren es drei (strong, Text, span) —
   Flex hat daraus auf dem Handy drei schmale Spalten nebeneinander gemacht. */
.status .status-inner { display: block; max-width: 92ch; }
.status.closed { background: #7a3b2e; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--espresso) 0%, var(--espresso-2) 100%);
  color: var(--crema); padding: 64px 0 56px;
}
.hero h1 { color: #fff; margin-bottom: .35em; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.hero .lead { font-size: 1.12rem; color: #e6d8c8; max-width: 60ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.btn {
  display: inline-block; padding: 13px 22px; border-radius: var(--radius);
  text-decoration: none; font-weight: 600; font-size: .97rem;
  border: 2px solid transparent; transition: .15s;
}
.btn-primary { background: var(--terra); color: #fff; }
.btn-primary:hover { background: var(--terra-dark); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.45); color: var(--crema); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-line { border-color: var(--terra); color: var(--terra-dark); }
.btn-line:hover { background: var(--terra); color: #fff; }

/* ---------- Sections ---------- */
section { padding: 52px 0; }
section.alt { background: var(--crema-2); }
section > .wrap > h2 { margin-top: 0; }
.section-sub { color: var(--muted); max-width: 68ch; margin-bottom: 32px; }

/* ---------- Eyebrow: kleine Zeile über einer Überschrift ---------- */
.eyebrow {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terra); font-weight: 700; margin: 0 0 10px;
}
.hero .eyebrow { color: #e2b799; }

/* ---------- Hero mit Bild ---------- */
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-foto { margin: 0; }
.hero-foto img {
  width: 100%; height: auto; border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-foto { order: -1; }
  .hero-foto img { max-width: 340px; margin: 0 auto; }
}

/* ---------- Mittagsangebot ---------- */
.highlight {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 34px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 36px; box-shadow: var(--shadow);
}
.highlight h2 { margin-top: 0; }
.highlight p { color: var(--muted); }
.preis-box { background: var(--crema); border-radius: var(--radius); padding: 18px 22px; }
.preis-box > div {
  display: grid; grid-template-columns: 1fr auto auto; align-items: baseline;
  gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line);
}
.preis-box > div:last-of-type { border-bottom: 0; }
.p-name { font-weight: 600; color: var(--ink); }
.p-old { color: var(--muted); text-decoration: line-through; font-size: .92rem; }
.p-new { font-family: var(--font-display); font-size: 1.32rem; font-weight: 700; color: var(--terra-dark); }
.p-hint { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
@media (max-width: 880px) { .highlight { grid-template-columns: 1fr; padding: 26px 22px; gap: 22px; } }

/* ---------- Instagram-Karte ---------- */
.ig-card {
  display: block; max-width: 470px; margin: 0 auto; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 24px; box-shadow: var(--shadow); transition: .15s;
}
.ig-card:hover { border-color: var(--terra); box-shadow: 0 8px 26px rgba(43,29,20,.14); }
.ig-handle { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--espresso); font-weight: 700; }
.ig-facts { display: block; color: var(--muted); font-size: .92rem; margin-top: 4px; }
.ig-cta { display: block; margin-top: 14px; color: var(--terra-dark); font-weight: 700; }
/* ---------- Stempelkarte ---------- */
.stempel-box { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.stempel-box > span {
  display: grid; place-items: center; aspect-ratio: 1;
  border: 2px dashed var(--line); border-radius: 50%;
  font-size: .78rem; color: var(--muted); background: var(--crema);
  font-family: var(--font-display); font-weight: 700;
}
.stempel-box .frei {
  grid-column: 1 / -1; aspect-ratio: auto; border-radius: var(--radius);
  border-style: solid; border-color: var(--terra); color: var(--terra-dark);
  padding: 9px; font-size: .9rem;
}

/* ---------- Kacheln: die drei Tageszeiten ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow);
}
.tile .time {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terra); font-weight: 700; margin-bottom: 8px;
}
.tile h3 { margin-bottom: .3em; }
.tile p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---------- Fakten-Leiste ---------- */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.facts div { background: #fff; padding: 22px 20px; text-align: center; }
.facts .big { font-family: var(--font-display); font-size: 1.7rem; color: var(--terra-dark); display: block; }
.facts .lbl { font-size: .85rem; color: var(--muted); }

/* ---------- Hinweisboxen ---------- */
.note {
  border-left: 4px solid var(--warn); background: #fdf7ec;
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 22px 0;
}
.note.info { border-color: #2a6fa8; background: #eef5fb; }
.note.good { border-color: var(--ok); background: #eef8f2; }
/* Nur die erste starke Zeile ist eine Überschrift und darf umbrechen.
   Vorher galt das für JEDES <strong> im Kasten — dadurch sind Preise mitten
   im Satz auf eigene Zeilen gesprungen (Mittagsangebot auf der Speisekarte). */
.note > strong:first-child { display: block; margin-bottom: 4px; }

/* ---------- Speisekarte ---------- */
.menu-cat { margin-bottom: 40px; }
.menu-cat > h3 {
  font-family: var(--font-display); font-size: 1.35rem;
  border-bottom: 2px solid var(--terra); padding-bottom: 8px; margin-bottom: 6px;
}
.menu-cat .cat-note { font-size: .88rem; color: var(--muted); margin: 6px 0 16px; }
.dish { display: flex; gap: 16px; padding: 13px 0; border-bottom: 1px dotted var(--line); }
.dish:last-child { border-bottom: 0; }
.dish .d-main { flex: 1; }
.dish .d-name { font-weight: 600; }
.dish .d-desc { font-size: .92rem; color: var(--muted); }
.dish .d-main { min-width: 0; }
.dish .d-price {
  font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap;
  color: var(--espresso); font-weight: 700;
}
/* Ausnahme: Zusatzangaben unter dem Preis dürfen umbrechen, sonst wird die
   Speisekarte bei 320 px seitlich scrollbar — WCAG 1.4.10. */
.dish .d-price small { white-space: normal; }
.dish.rec { background: #fff; border-radius: var(--radius); padding: 13px 14px; border-bottom: 1px solid var(--line); }
.dish.rec .d-name::after {
  content: "Empfehlung"; display: inline-block; margin-left: 8px;
  background: var(--terra); color: #fff; font-size: .66rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px; vertical-align: 2px; letter-spacing: .04em;
}

.allergen-legend {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; font-size: .87rem; color: var(--muted); margin-top: 30px;
}
.allergen-legend dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 10px 0 0; }
.allergen-legend dt { font-weight: 700; color: var(--ink); }

/* ---------- Tabellen (Öffnungszeiten, Winterkarte) ---------- */
table.plain { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
table.plain th, table.plain td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.plain th { background: var(--espresso); color: var(--crema); font-size: .86rem; letter-spacing: .05em; text-transform: uppercase; }
table.plain tr:last-child td { border-bottom: 0; }
.tbl-scroll { overflow-x: auto; }
.tbl-scroll:focus-visible { outline: 3px solid var(--espresso); outline-offset: 2px; }

/* Markiert die gerade gültige Saison — als TEXT, nicht nur als Farbe (WCAG 1.4.1). */
tr[aria-current="true"] th { position: relative; }
.badge {
  display: inline-block; margin-left: 7px; background: var(--terra); color: #fff;
  font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 20px; vertical-align: 2px;
}

/* ---------- Footer ---------- */
footer.site { background: var(--espresso); color: #cbb9a6; padding: 46px 0 30px; font-size: .93rem; }
/* h3 statt h4: Der Footer folgt direkt auf h2-Abschnitte.
   Eine Überschrift darf keine Ebene überspringen (Barrierefreiheit). */
footer.site h3 { color: var(--crema); font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 14px; }
footer.site a { color: #e6d8c8; }
footer.site a:hover { color: #fff; }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 30px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 7px; }
footer.site .legal {
  border-top: 1px solid rgba(255,255,255,.14); margin-top: 34px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem;
}
footer.site .impressum-line { font-weight: 600; }

/* ---------- Eissorten-Liste ---------- */
.sorten {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.sorten li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 8px 17px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--espresso);
}
.sorten li::before {
  content: "●";
  color: var(--terra);
  font-size: .7rem;
  margin-right: 8px;
  vertical-align: 1px;
}

/* ---------- Bildergalerie ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--crema-2);
}
.gallery figcaption {
  font-size: .85rem;
  color: var(--muted);
  margin-top: 7px;
}
.gallery .tall img { aspect-ratio: 3 / 4; }
/* Einzelbild im Fließtext (z. B. bei Gerichten) */
.foto-breit { margin: 26px 0; }
.foto-breit img {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.foto-breit figcaption {
  font-size: .87rem; color: var(--muted); margin-top: 8px;
}

/* ---------- Rechtsseiten ---------- */
.legal-page { max-width: 74ch; }
.legal-page h2 { margin-top: 2em; }
.legal-page h2:first-of-type { margin-top: 0; }

/* ---------- Print: Speisekarte druckfertig ---------- */
@media print {
  header.site, nav.main, .status, footer.site .cols, .btn, .nav-toggle { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  section { padding: 0 0 14pt; }
  .hero { background: #fff !important; color: #000 !important; padding: 0 0 12pt; }
  .hero h1, .hero .lead { color: #000 !important; }
  .dish { break-inside: avoid; }
  .menu-cat { break-inside: avoid-page; }
  a { color: #000; text-decoration: none; }
}
