@import url("assets/fonts/fonts.css");

/* =========================================================================
   Kai Kitchen — Designsystem
   Farben, Typo-Rollen und Layoutmuster stammen 1:1 aus der gedruckten Karte
   (Adobe Illustrator, Juli 2026). Die Farbsemantik ist dort bedeutungstragend:
   Grün = Gerichtname, Kupfer = deutsche Beschreibung, Espresso = englische.
   ========================================================================= */

:root {
  /* Marke */
  --emerald: #135c48;
  --emerald-deep: #0d4436;
  --emerald-logo: #004a3e;
  --cream: #f9f7e8;
  --cream-warm: #f1e8d4;
  --copper: #c2773c;
  --amber: #e39c62;
  --sand: #e8c5a6;
  --espresso: #543f2c;
  --bronze: #a97c50;

  /* Rollen auf hellem Grund */
  --bg: var(--cream);
  --ink: var(--emerald);
  --ink-soft: var(--copper);
  --ink-faint: var(--espresso);
  --rule: color-mix(in srgb, var(--bronze) 35%, transparent);

  /* Typo */
  --display: "Prata", "Times New Roman", serif;
  --script: "Pinyon Script", cursive;
  --condensed: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Red Rose", Georgia, serif;

  /* Fluid-Skala: 390px iPhone → 1280px Desktop */
  --step--1: clamp(0.75rem, 0.72rem + 0.15vw, 0.82rem);
  --step-0: clamp(0.94rem, 0.9rem + 0.2vw, 1.05rem);
  --step-1: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --step-2: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem);
  --step-3: clamp(2.2rem, 1.5rem + 3.5vw, 4rem);
  --step-4: clamp(2.8rem, 1.6rem + 6vw, 6rem);

  --gutter: clamp(1.1rem, 5vw, 2.5rem);
  --measure: 34rem;

  /* iPhone: Dynamic Island oben, Home-Indicator unten */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --bar-h: 3.75rem;
}

/* Dunkle Sektionen kehren die Rollen um, statt eigene Klassen zu brauchen */
.invert {
  --bg: var(--emerald);
  --ink: var(--cream);
  --ink-soft: var(--amber);
  --ink-faint: var(--sand);
  --rule: color-mix(in srgb, var(--sand) 28%, transparent);
  background: var(--bg);
  color: var(--ink);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sticky-Kategorieleiste darf Anker nicht verdecken */
  scroll-padding-top: calc(var(--safe-t) + 6.5rem);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--emerald);
  font-family: var(--body);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Bausteine ---------- */
.wrap {
  width: min(100% - var(--gutter) * 2, 68rem);
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--condensed);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.7rem;
}

.display {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-3);
  /* 0.95 waere fuer reine Versalien schoen, aber deutsche Umlaute stossen
     dann an die Zeile darueber ("KUeSST" unter "DEN RHEIN"). */
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 2.5rem 0;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: calc(var(--safe-t) + 0.55rem) var(--gutter) 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--rule); }

.site-header .logo { flex: 0 0 auto; }
.site-header .logo svg,
.site-header .logo img { height: 1.7rem; width: auto; }

.spacer { flex: 1 1 auto; }

.lang {
  display: flex;
  align-items: center;
  font-family: var(--condensed);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
}
.lang a {
  padding: 0.42rem 0.7rem;
  text-decoration: none;
  min-height: 2.2rem;
  display: grid;
  place-items: center;
}
.lang a[aria-current="true"] {
  background: var(--emerald);
  color: var(--cream);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 78svh;
  display: grid;
  /* minmax(0,1fr) statt der impliziten auto-Spalte: sonst waechst die Spalte
     auf max-content der Riesen-Headline und schiebt Titel und Fliesstext
     seitlich aus dem Viewport. */
  grid-template-columns: minmax(0, 1fr);
  align-content: end;
  padding: 6rem var(--gutter) 3rem;
  background: var(--emerald-deep);
  color: var(--cream);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
/* Verlauf statt flacher Abdunklung: der Teller bleibt oben sichtbar,
   der Text unten bekommt trotzdem sicheren Kontrast.
   Oben neutrales Schwarz, damit das Essen seine Farbe behaelt — ein
   durchgehender Gruenverlauf macht Bruehe und Fleisch fahl. Erst unten,
   wo der Text sitzt, kippt es ins Markengruen. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgb(0 0 0 / 0.12) 0%,
    rgb(0 0 0 / 0.34) 30%,
    color-mix(in srgb, var(--emerald-deep) 62%, transparent) 52%,
    color-mix(in srgb, var(--emerald-deep) 90%, transparent) 74%,
    var(--emerald-deep) 100%
  );
}
.hero__chef {
  position: absolute;
  right: -12%;
  bottom: 22%;
  width: min(58%, 20rem);
  opacity: 0.16;
  z-index: -1;
  pointer-events: none;
}
.hero__chef svg,
.hero__chef img { width: 100%; filter: brightness(0) invert(1); }

.hero .eyebrow { color: var(--sand); }
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-4);
  line-height: 1.02;
  text-transform: uppercase;
  margin: 0 0 1rem;
  white-space: pre-line;
  text-wrap: balance;
}
.hero__sub {
  max-width: 26rem;
  color: var(--sand);
  margin: 0 0 2rem;
}

.btn {
  display: inline-grid;
  place-items: center;
  min-height: 3rem;
  padding: 0 1.6rem;
  font-family: var(--condensed);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.btn--solid {
  background: var(--copper);
  border-color: var(--copper);
  color: var(--cream);
}
@media (hover: hover) {
  .btn:hover { background: currentColor; }
  .btn:hover > span { color: var(--emerald-deep); }
  .btn--solid:hover { background: var(--amber); border-color: var(--amber); }
}

/* ---------- Kategorie-Navigation ---------- */
.catnav {
  position: sticky;
  top: calc(var(--safe-t) + 2.8rem);
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block: 1px solid var(--rule);
}
.catnav ul {
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0.55rem var(--gutter);
  list-style: none;
  overflow-x: auto;
  /* Kein Scroll-Snap: die Leiste wird zusaetzlich per JS mitgefuehrt, und
     beides zusammen zerrt am selben Scrollwert. */
  scroll-snap-type: none;
  /* Ohne `contain` loest ein Wisch nach rechts am linken Rand auf dem iPhone
     die Zurueck-Geste des Browsers aus statt die Leiste zu scrollen. */
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.catnav ul::-webkit-scrollbar { display: none; }
.catnav li { flex: 0 0 auto; }
.catnav a {
  display: grid;
  place-items: center;
  min-height: 2.4rem;
  padding: 0 0.85rem;
  font-family: var(--condensed);
  font-weight: 500;
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
}
.catnav a[aria-current="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* ---------- Sektion ---------- */
.section {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  padding: clamp(3rem, 9vw, 6rem) 0;
  overflow: hidden;
}

/* Das übergroße Script-Wasserzeichen am Fuß jeder Kategorie —
   das auffälligste Signaturelement der gedruckten Karte. */
.watermark {
  position: absolute;
  left: 50%;
  bottom: -0.18em;
  transform: translateX(-50%);
  font-family: var(--script);
  font-size: clamp(5rem, 26vw, 16rem);
  line-height: 0.8;
  white-space: nowrap;
  color: var(--ink);
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.cat { position: relative; z-index: 1; margin-bottom: clamp(3rem, 8vw, 5rem); }
.cat__head { margin-bottom: 1.75rem; }
.cat__note {
  font-family: var(--condensed);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin: 0.5rem 0 0;
}
.cat__hero {
  margin: 0 calc(var(--gutter) * -1) 2rem;
  aspect-ratio: 4 / 3;
}
.cat__hero img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Gericht ---------- */
.dish {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1.25rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.dish:last-child { border-bottom: 0; }
.dish--out { opacity: 0.45; }

.dish__name {
  grid-column: 1;
  margin: 0;
  font-family: var(--condensed);
  font-weight: 600;
  font-size: var(--step-1);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--ink);
}
.dish__no {
  display: inline-grid;
  place-items: center;
  width: 1.45em;
  height: 1.45em;
  margin-right: 0.5em;
  font-size: 0.62em;
  letter-spacing: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  vertical-align: 0.18em;
}
.dish__de {
  grid-column: 1;
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: var(--step-0);
  line-height: 1.45;
  max-width: var(--measure);
}
.dish__en {
  grid-column: 1;
  margin: 0.15rem 0 0;
  color: var(--ink-faint);
  font-size: var(--step--1);
  line-height: 1.4;
  max-width: var(--measure);
}
.invert .dish__en { color: color-mix(in srgb, var(--sand) 75%, transparent); }

/* Der Preis der Karte: große dünne Serife, winziges € — das
   Detail, an dem man die Marke sofort wiedererkennt. */
.price {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  font-family: var(--display);
  font-size: var(--step-2);
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.price .cur {
  font-size: 0.42em;
  vertical-align: 0.15em;
  margin-left: 0.1em;
}

.variants {
  grid-column: 1 / -1;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
}
.variants li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  font-family: var(--condensed);
  font-size: var(--step-0);
  letter-spacing: 0.04em;
}
.variants .price { font-size: var(--step-1); grid-row: auto; }

.sizes {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: 0.6rem;
  font-family: var(--condensed);
  font-size: var(--step-0);
  letter-spacing: 0.05em;
}
.sizes b {
  font-weight: 500;
  color: var(--ink-soft);
  margin-right: 0.35em;
}

.dish__media {
  grid-column: 1 / -1;
  margin: 1rem calc(var(--gutter) * -1) 0;
}
.dish__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- Marker ---------- */
.tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
}
.badge {
  font-family: var(--condensed);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--copper);
  border-radius: 999px;
  color: var(--copper);
}
.invert .badge { border-color: var(--amber); color: var(--amber); }

.veg {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--condensed);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3f8f43;
}
.veg svg { width: 0.95rem; height: 0.95rem; }

.allergen-list {
  font-family: var(--condensed);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.invert .allergen-list { color: color-mix(in srgb, var(--sand) 70%, transparent); }

/* ---------- Reservierung ---------- */
.reserve { text-align: center; }
.reserve__box {
  margin-top: 2rem;
  padding: clamp(1.5rem, 6vw, 3rem);
  border: 1px solid var(--rule);
  border-radius: 4px;
  /* Nur leicht aufgehellt. Ein kraeftiges Creme-Overlay auf Emerald ergibt
     ein schlammiges Salbeigruen, auf dem weder Sand- noch Kupfertext
     ausreichend Kontrast hat. */
  background: color-mix(in srgb, var(--cream) 7%, transparent);
}
.reserve__placeholder {
  font-family: var(--condensed);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: var(--step-0);
  color: var(--ink-faint);
}
.reserve__placeholder a { color: var(--amber); }
#resmio-widget:empty::before {
  content: attr(data-placeholder);
  display: grid;
  place-items: center;
  min-height: 12rem;
  border: 1px dashed color-mix(in srgb, var(--sand) 45%, transparent);
  border-radius: 4px;
  padding: 1.5rem;
  font-family: var(--condensed);
  font-size: var(--step-0);
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--ink-faint);
}

/* ---------- Kontakt ---------- */
.hours { width: 100%; border-collapse: collapse; max-width: 24rem; }
.hours th,
.hours td {
  text-align: left;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--condensed);
  font-size: var(--step-0);
  letter-spacing: 0.08em;
  font-weight: 400;
}
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr[data-today] th,
.hours tr[data-today] td { color: var(--copper); font-weight: 600; }

/* ---------- Fußleiste am Daumen ---------- */
.bottombar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  padding-bottom: var(--safe-b);
  border-top: 1px solid var(--rule);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.bottombar.show { transform: none; }
.bottombar a {
  display: grid;
  place-items: center;
  min-height: var(--bar-h);
  background: var(--cream);
  color: var(--emerald);
  font-family: var(--condensed);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}
.bottombar a.primary { background: var(--emerald); color: var(--cream); }

/* Platz, damit die Leiste nichts verdeckt */
body { padding-bottom: calc(var(--bar-h) + var(--safe-b)); }
@media (min-width: 48rem) {
  .bottombar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Fuß ---------- */
.site-footer {
  background: var(--emerald-deep);
  color: var(--sand);
  padding: clamp(2.5rem, 8vw, 4rem) 0 3rem;
  font-size: var(--step--1);
}
.site-footer a { text-decoration: none; }
.site-footer .display { color: var(--cream); }

.legend {
  /* Grid statt columns: `display:grid` setzt Mehrspalten-Layout ausser Kraft,
     beides zusammen ergibt immer eine Spalte. */
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem 1.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  line-height: 1.55;
}
@media (min-width: 30rem) { .legend { grid-template-columns: 1fr 1fr; } }

/* ---------- Auftritt beim Laden ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(1.2rem);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Ab Tablet ---------- */
@media (min-width: 48rem) {
  .dish { grid-template-columns: 1fr auto; column-gap: 3rem; }
  .cat__hero { margin-inline: 0; border-radius: 2px; }
  .dish__media { margin-inline: 0; }
  .dish__media img { aspect-ratio: 16 / 9; }
  .catnav { top: calc(var(--safe-t) + 3.2rem); }
}

/* ---------- Rechtsseiten ---------- */
.legal { max-width: var(--measure); }
.legal h1 { margin-bottom: 2rem; font-size: var(--step-2); }
.legal h2 {
  font-family: var(--condensed);
  font-weight: 600;
  font-size: var(--step-1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 2.25rem 0 0.5rem;
  color: var(--ink);
}
.legal h3 {
  font-family: var(--condensed);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 1.5rem 0 0.35rem;
  color: var(--ink-soft);
}
.legal p { margin: 0 0 1rem; }
.legal a { color: var(--copper); }

/* ---------- Einblicke ---------- */
.gallery {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 0 var(--gutter);
  overflow-x: auto;
  /* `proximity` statt `mandatory`: bei mandatory zieht der Browser das letzte
     Bild zurueck, weil dessen Schnapp-Position hinter dem Inhaltsende laege
     und damit unerreichbar ist. */
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure {
  flex: 0 0 78%;
  margin: 0;
  /* `start` statt `center` — zentrierte Schnapp-Punkte sind fuer das erste
     und letzte Element eines Sliders grundsaetzlich nicht erreichbar. */
  scroll-snap-align: start;
}
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
}
@media (min-width: 48rem) {
  .gallery { padding-inline: max(var(--gutter), (100vw - 68rem) / 2); }
  .gallery figure { flex-basis: 22rem; }
}
