/* Farben und Formen nach der gedruckten Speisekarte:
   Creme mit Sternmuster, dunkelgrüne Serifen-Titel, rote Kapitälchen, goldene Preise,
   anthrazitfarbene Flächen und Fotos im Torbogen. */
:root {
  --cream: #ede3cc;
  --cream-2: #f6efdf;
  --paper: #fbf7ee;
  --line: #d8c7a3;
  --green: #1f3d30;
  --green-v: #2f6b45;
  --red: #b4432f;
  --gold: #a8792f;
  --gold-light: #c9a25e;
  --charcoal: #4a4a48;
  --charcoal-2: #3b3b3a;
  --text: #2b2924;
  --muted: #6c6457;
  --radius: 18px;
  --shadow: 0 2px 6px rgba(70, 50, 20, .06), 0 12px 30px rgba(70, 50, 20, .10);
  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pattern-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' fill='none' stroke='%23d6c49c' stroke-width='1.1'%3E%3Cpath d='M19 19h26v26H19z'/%3E%3Cpath d='M32 13l19 19-19 19-19-19z'/%3E%3Cpath d='M0 32h13M51 32h13M32 0v13M32 51v13'/%3E%3C/svg%3E");
  --pattern-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' fill='none' stroke='%235a5a57' stroke-width='1.1'%3E%3Cpath d='M19 19h26v26H19z'/%3E%3Cpath d='M32 13l19 19-19 19-19-19z'/%3E%3Cpath d='M0 32h13M51 32h13M32 0v13M32 51v13'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { scroll-padding-top: 130px; }
body { margin: 0; background: var(--cream) var(--pattern-light); color: var(--text); font: 15px/1.55 var(--sans); }
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--green); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.kicker { margin: 0 0 4px; font: 700 12.5px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.kicker.light { color: #f0cf8e; text-shadow: 0 1px 10px rgba(0,0,0,.9); }

/* ---------- Intro: Zoom bis durch die Tür ---------- */
#intro { --door-x: 50%; --door-y: 65.5%; position: fixed; inset: 0; z-index: 100; background: #1a1a1a; overflow: hidden; transition: opacity .55s ease, visibility .55s; }
#intro.hide { opacity: 0; visibility: hidden; }
/* Unten die kleine Version (lädt sofort), darüber blendet die scharfe Version ein, sobald sie da ist */
.intro-img { position: absolute; inset: 0; background: url(assets/intro/blaue-moschee-klein.jpg) var(--door-x) var(--door-y)/cover no-repeat; transform-origin: var(--door-x) var(--door-y); opacity: 0; will-change: transform; }
.intro-img::after { content: ''; position: absolute; inset: 0; background: url(assets/intro/blaue-moschee.jpg) var(--door-x) var(--door-y)/cover no-repeat; opacity: 0; transition: opacity .45s ease; }
#intro.hd .intro-img::after { opacity: 1; }
.intro-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at var(--door-x) var(--door-y), transparent 25%, rgba(0,0,0,.6)); }
.intro-brand { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding-inline: 16px; animation: brandIn .6s ease both; }
/* Der Zoom läuft erst mit .go, also sobald das Bild geladen ist */
#intro.go .intro-img { animation: dive 2.3s cubic-bezier(.62, 0, .85, .45) forwards; }
#intro.go .intro-shade { animation: shade 2.3s ease forwards; }
#intro.go .intro-brand { animation: brand 2.3s ease forwards; }
#intro.go .intro-light { animation: light 2.3s ease-in forwards; }
.intro-brand img { width: min(300px, 64vw); filter: drop-shadow(0 6px 30px rgba(0,0,0,.65)); }
.intro-brand p { margin: 10px 0 0; font: 400 clamp(22px, 3.6vw, 38px)/1.2 var(--serif); color: #fff6e2; text-shadow: 0 2px 14px rgba(0,0,0,.85); }
.intro-light { position: absolute; inset: 0; background: radial-gradient(circle at var(--door-x) var(--door-y), #fffaf0 0%, var(--cream) 60%); opacity: 0; }
@keyframes dive { 0% { opacity: 0; transform: scale(1.02); } 8% { opacity: 1; } 100% { opacity: 1; transform: scale(9); } }
@keyframes shade { 0% { opacity: 1; } 70%, 100% { opacity: 0; } }
@keyframes brandIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes brand { 0%, 52% { opacity: 1; transform: none; } 68%, 100% { opacity: 0; transform: scale(1.15); } }
@keyframes light { 0%, 70% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .intro-img { opacity: 1; }
  #intro.go .intro-img, #intro.go .intro-shade, #intro.go .intro-light, .intro-brand, #intro.go .intro-brand { animation: none; }
}

/* ---------- Kopfleiste ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); background: var(--charcoal) var(--pattern-dark); color: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.18); }
.brand img { height: 46px; }
.status { font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 99px; background: rgba(0,0,0,.25); color: #e6dfcf; }
.status.open { color: #9fdcab; }
.status.closed { color: #ffb8a8; }
/* Sprachwahl: sitzt in der festen Kopfleiste, ist also immer erreichbar */
.lang { display: flex; margin-inline-start: auto; padding: 3px; border-radius: 99px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.22); }
.lang button { min-width: 40px; height: 34px; padding: 0 10px; border: 0; border-radius: 99px; background: none; color: #d9d1bf; font-size: 13.5px; font-weight: 800; letter-spacing: .04em; transition: background .2s, color .2s; }
.lang button:hover { color: #fff; }
.lang button[aria-pressed="true"] { background: var(--paper); color: var(--green); }
.cart-btn { margin-inline-start: 10px; display: flex; align-items: center; gap: 6px; background: var(--gold-light); color: var(--charcoal-2); border: 0; border-radius: 99px; padding: 8px 15px; font-weight: 800; transition: transform .2s; }
.cart-btn.bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* ---------- Hero mit Parallax ---------- */
.hero { position: relative; overflow: hidden; min-height: min(64vh, 580px); display: flex; align-items: flex-end; padding: 90px max(16px, env(safe-area-inset-right, 0px)) 52px max(16px, env(safe-area-inset-left, 0px)); color: #fff; background: var(--charcoal); }
.hero-bg { position: absolute; inset: -12% 0 -12% 0; background: linear-gradient(180deg, rgba(20,20,18,.1) 0%, rgba(20,20,18,.3) 45%, rgba(25,20,12,.82) 100%), url(assets/intro/blaue-moschee.jpg) 50% 58%/cover, url(assets/intro/blaue-moschee-klein.jpg) 50% 58%/cover; background-color: #3a2f2a; transform: translate3d(0, var(--parallax, 0px), 0) scale(1.04); will-change: transform; }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 30px; background: var(--cream) var(--pattern-light); border-radius: 30px 30px 0 0; }
.hero-inner { position: relative; z-index: 1; max-width: 1240px; width: 100%; margin: 0 auto; }
.hero h1 { font: 400 clamp(48px, 8.5vw, 92px)/1 var(--serif); margin: 0; text-shadow: 0 3px 22px rgba(0,0,0,.5); text-wrap: balance; }
.lead { font: 400 clamp(19px, 2.6vw, 26px)/1.3 var(--serif); margin: 10px 0 20px; color: #fff3da; text-shadow: 0 1px 12px rgba(0,0,0,.8); }
.facts { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: rgba(255,248,232,.14); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.22); padding: 6px 13px; border-radius: 99px; font-size: 14px; font-weight: 500; }
.facts a { color: #fff; }
.mode { display: inline-flex; background: var(--paper); border-radius: 99px; padding: 4px; box-shadow: var(--shadow); }
.mode button { border: 0; background: none; color: var(--text); padding: 9px 22px; border-radius: 99px; font-weight: 700; transition: background .25s, color .25s; }
.mode button.active { background: var(--green); color: #fff; }
.mode.small { margin-bottom: 14px; background: var(--cream-2); box-shadow: none; }

/* Hero-Text erscheint nacheinander, sobald das Intro vorbei ist */
.hero-inner > * { opacity: 0; transform: translateY(22px); }
body.ready .hero-inner > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards; }
body.ready .hero-inner > :nth-child(2) { animation-delay: .1s; }
body.ready .hero-inner > :nth-child(3) { animation-delay: .22s; }
body.ready .hero-inner > :nth-child(4) { animation-delay: .34s; }
body.ready .hero-inner > :nth-child(5) { animation-delay: .46s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Kategorien ---------- */
.catnav { position: sticky; top: 64px; z-index: 15; display: flex; gap: 8px; overflow-x: auto; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); background: rgba(237,227,204,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.catnav a { flex: none; text-decoration: none; color: var(--green); background: var(--paper); padding: 7px 15px; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; font-weight: 700; white-space: nowrap; transition: background .25s, color .25s, border-color .25s; }
.catnav a:hover { border-color: var(--gold); }
.catnav a.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- Layout ---------- */
.layout { max-width: 1240px; margin: 0 auto; padding: 26px max(16px, env(safe-area-inset-right, 0px)) 26px max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: start; }
.menu section { margin-bottom: 52px; }
.sec-head { margin-bottom: 18px; }
.menu h2 { font: 400 clamp(34px, 4.5vw, 46px)/1.05 var(--serif); color: var(--green); margin: 0; text-wrap: balance; }
.rule { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--gold); }
.rule::before { content: ''; width: 34px; height: 1px; background: var(--gold); }
.rule::after { content: ''; flex: 1; max-width: 420px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.rule span { width: 9px; height: 9px; border: 1.5px solid var(--gold); border-radius: 50%; }

.lunch-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; background: var(--charcoal) var(--pattern-dark); color: #eee6d4; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 20px; }
.lunch-banner .kicker { color: var(--gold-light); }
.lunch-banner strong { font: 400 34px/1 var(--serif); color: var(--gold-light); white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }

/* Karte mit Foto im Torbogen */
.card { background: var(--paper); border-radius: var(--radius); padding: 12px 12px 0; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 4px 12px rgba(70,50,20,.10), 0 22px 44px rgba(70,50,20,.16); }
.card .pic { position: relative; aspect-ratio: 4/3.2; border-radius: 50% 50% 12px 12px / 30% 30% 12px 12px; overflow: hidden; background: #e2d5ba; box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--gold-light); transition: box-shadow .35s; }
.card:hover .pic { box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--gold), 0 0 28px 4px rgba(201,162,94,.55); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card:hover .pic img { transform: scale(1.07); }
.card.drink .pic { background: #fff; }
.card.drink .pic img { object-fit: contain; padding: 18px 14px 10px; }
.card .body { padding: 14px 6px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tip-pill { align-self: flex-start; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--green); padding: 3px 11px; border-radius: 99px; }
.card h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--green); line-height: 1.3; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.card h3 .no { font-size: 13px; font-weight: 700; color: var(--gold); }
.b { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; font-size: 11px; font-weight: 800; color: #fff; }
.b.v { background: var(--green-v); }
.b.m { background: var(--charcoal-2); color: var(--gold-light); }
.card p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-weight: 800; color: var(--gold); font-size: 19px; font-variant-numeric: tabular-nums; }
.add { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--green); color: #fff; font-size: 24px; font-weight: 600; line-height: 1; transition: background .2s, transform .2s; }
.add:hover { background: var(--green-v); transform: scale(1.08) rotate(90deg); }
.add:active { transform: scale(.92); }

/* Einblenden beim Scrollen (nur mit JS aktiv) */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }

/* Foto fliegt in den Warenkorb */
.fly { position: fixed; z-index: 90; border-radius: 50%; object-fit: cover; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.3); }

/* ---------- Warenkorb ---------- */
.cart { position: sticky; top: 134px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: calc(100vh - 154px); overflow: hidden; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--charcoal) var(--pattern-dark); color: #fff; }
.cart-head h2 { margin: 0; font: 400 24px/1.1 var(--serif); }
.dlg-head h2 { margin: 0; font: 400 26px/1.1 var(--serif); color: var(--green); }
.close { background: none; border: 0; color: inherit; opacity: .7; font-size: 28px; line-height: 1; display: none; }
dialog .close { display: block; color: var(--muted); }
.cart-items { overflow-y: auto; padding: 8px 18px; flex: 1; }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); animation: lineIn .35s ease; }
@keyframes lineIn { from { opacity: 0; transform: translateX(12px); } }
.line .nm { font-weight: 700; }
.line .sub { color: var(--muted); font-size: 12.5px; grid-column: 1; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--cream-2); color: var(--text); }
.qty button:hover { border-color: var(--gold); }
.cart-foot { padding: 14px 18px; border-top: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; color: var(--muted); font-variant-numeric: tabular-nums; }
.row.total { color: var(--green); font-weight: 800; font-size: 18px; margin-top: 4px; }
.hint { color: var(--red); font-size: 13px; min-height: 1em; margin: 8px 0; }
.primary { width: 100%; border: 0; border-radius: 12px; padding: 14px; background: var(--green); color: #fff; font-weight: 800; font-size: 15px; transition: background .2s, transform .15s; }
.primary:hover:not(:disabled) { background: var(--green-v); }
.primary:active:not(:disabled) { transform: scale(.98); }
.primary:disabled { opacity: .4; cursor: not-allowed; }
.mobile-bar { display: none; }

/* ---------- Dialoge ---------- */
dialog { background: var(--paper); color: var(--text); border: 0; border-radius: 20px; padding: 22px; width: min(520px, calc(100vw - 32px)); max-height: 90vh; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
dialog[open] { animation: pop .3s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
dialog::backdrop { background: rgba(40,38,34,.55); backdrop-filter: blur(3px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
form label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
form input:not([type=radio]), form select, form textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); color: var(--text); border-radius: 10px; font: inherit; font-weight: 500; }
form input:focus, form select:focus, form textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
fieldset { border: 0; padding: 0; margin: 0; }
.two { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.opt { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 15px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pay { color: var(--muted); }
.error { color: var(--red); min-height: 1em; }
.done { text-align: center; }
.done h2 { font: 400 32px/1.1 var(--serif); color: var(--green); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--green); color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.footer { text-align: center; color: #d9d2c2; background: var(--charcoal) var(--pattern-dark); font-size: 13px; padding: 34px 16px 100px; }
.footer a { color: var(--gold-light); }

/* ---------- Impressum / Datenschutz ---------- */
.legal-page .back { margin-inline-start: auto; color: #f0e6d0; font-weight: 700; text-decoration: none; }
.legal-page .back:hover { color: var(--gold-light); }
.legal { max-width: 760px; margin: 32px auto 60px; padding: 32px max(20px, env(safe-area-inset-right, 0px)) 40px max(20px, env(safe-area-inset-left, 0px)); background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.legal h1 { font: 400 clamp(36px, 6vw, 52px)/1.05 var(--serif); color: var(--green); margin: 0; text-wrap: balance; }
.legal h2 { font: 400 23px/1.25 var(--serif); color: var(--green); margin: 30px 0 8px; }
.legal p, .legal li, .legal dd { max-width: 65ch; }
.legal ul { padding-inline-start: 20px; }
.legal li { margin-bottom: 4px; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 0; }
.legal dt { color: var(--muted); font-weight: 600; }
.legal dd { margin: 0; font-variant-numeric: tabular-nums; }
.legal .stand { color: var(--muted); font-size: 13px; }
.legal .todo { background: #fbe3c5; color: var(--red); font-weight: 700; padding: 0 4px; border-radius: 4px; }
.legal-foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 700; }
@media (max-width: 480px) { .legal dl { grid-template-columns: 1fr; } .legal dd { margin-bottom: 8px; } }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .intro-img::after { background-image: url(assets/intro/blaue-moschee-mobil.jpg); }
  .hero-bg { background-image: linear-gradient(180deg, rgba(20,20,18,.1) 0%, rgba(20,20,18,.3) 45%, rgba(25,20,12,.82) 100%), url(assets/intro/blaue-moschee-mobil.jpg), url(assets/intro/blaue-moschee-klein.jpg); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .cart { position: fixed; inset: auto 0 0 0; top: auto; max-height: 85vh; border-radius: 20px 20px 0 0; z-index: 50; transform: translateY(105%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
  .cart.open { transform: none; }
  .cart .close { display: block; }
  .mobile-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(251,247,238,.96); border-top: 1px solid var(--line); z-index: 40; }
  .mobile-bar.hidden { display: none; }
  .status { display: none; }
  .hero { min-height: 72vh; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .card .pic { aspect-ratio: 16/11; }
}
@media (min-width: 560px) and (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-inner > * { opacity: 1; transform: none; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-bg { transform: none; }
}
