/* ════════════════════════════════════════════════════════════════
   BAUSTEINE
   Ein Kapitel pro Baustein, in derselben Reihenfolge wie in
   bausteine.html. Dort siehst du jeden Baustein live und kannst
   seinen HTML-Code kopieren.

   1  Kopfzeile & Navigation
   2  Startbild mit Logo-Animation
   3  Textblock
   4  Bildreihe
   5  Text & Bild
   6  Menü-Karussell
   7  Raumbuchung (Formular)
   8  Kacheln
   9  Fußzeile

   Umbrüche wie bei Restaurant Elm:
   bis 1100px = Tablet (alles untereinander), bis 575px = Handy.
   ════════════════════════════════════════════════════════════════ */


/* Jeder Abschnitt der Seite ist ein <section class="abschnitt …">. */
.abschnitt {
  position: relative;
  z-index: 1;
  padding: var(--abstand) var(--rand);
  background: var(--farbe-hintergrund);
}

/* Unterseiten ohne Startbild: erster Abschnitt rutscht unter der Kopfzeile hervor */
main > .abschnitt:first-child { padding-top: 180px; }
@media (max-width: 575px) {
  main > .abschnitt:first-child { padding-top: 120px; }
}

/* Sprungziele nicht unter der Kopfzeile verstecken */
[id] { scroll-margin-top: 40px; }


/* ════ 1  KOPFZEILE & NAVIGATION ════════════════════════════════ */

.kopf {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  height: 108px;
  padding: 14px var(--rand);
  pointer-events: none;   /* Klicks gehen durch die leere Fläche hindurch */
}
/* Unscharfer Hintergrund, sobald gescrollt wurde */
.kopf::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity .4s;
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
  -webkit-mask: linear-gradient(#000 45%, transparent);
  mask: linear-gradient(#000 45%, transparent);
}
.kopf.gescrollt::before { opacity: 1; }

.kopf-logo {
  width: var(--logo-breite);
  pointer-events: auto;
}
.kopf-rechts {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-top: 8px;
  pointer-events: auto;
}
.kopf-link,
.sprachen {
  font-size: 16px;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1;
}
.sprachen { display: flex; }
.sprachen a { padding: 0 14px; border-right: 1px solid; }
.sprachen a:last-child { padding-right: 0; border-right: 0; }
.kopf-link:hover,
.sprachen a:hover,
.sprachen a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* Burger-Knopf: drei Striche, geöffnet ein X */
.navi-knopf {
  position: relative;
  width: 30px;
  height: 15px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.navi-knopf span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: .4s;
}
.navi-knopf span:nth-child(1) { top: 0; }
.navi-knopf span:nth-child(2) { top: 7px; }
.navi-knopf span:nth-child(3) { top: 14px; }
.navi-offen .navi-knopf span:nth-child(1) { top: 7px; rotate: 24deg; }
.navi-offen .navi-knopf span:nth-child(2) { opacity: 0; }
.navi-offen .navi-knopf span:nth-child(3) { top: 7px; rotate: -24deg; }

/* Das Menü fährt von rechts herein */
.navi-hintergrund {
  position: fixed;
  inset: 0;
  z-index: 98;
  background: var(--farbe-schrift);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s;
}
.navigation {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  width: 50vw;
  height: 100dvh;
  overflow: auto;
  padding: 108px var(--rand) var(--rand);
  background: var(--farbe-hintergrund);
  box-shadow: -1px 0 0 color-mix(in srgb, var(--farbe-schrift) 15%, transparent);
  translate: 100% 0;
  visibility: hidden;
  transition: translate .5s, visibility .5s;
}
.navi-offen .navi-hintergrund { opacity: .06; pointer-events: auto; }
.navi-offen .navigation { translate: 0 0; visibility: visible; }

.navi-links > li { margin-bottom: 22px; }
.navi-links > li > a {
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.navi-links ul { padding: 6px 0 0 24px; }
.navi-links ul a {
  font-size: var(--groesse-klein);
  letter-spacing: .1em;
  text-transform: uppercase;
}
/* Unterstrich wächst beim Drüberfahren von links nach rechts */
.navigation a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s;
}
.navigation a:hover { background-size: 100% 1px; }

.navi-fuss { font-size: var(--groesse-klein); line-height: 1.4; }
.navi-fuss p { margin-bottom: 10px; }

@media (max-width: 1100px) {
  .navigation { width: 100vw; box-shadow: none; }
}
@media (max-width: 575px) {
  .kopf-rechts { gap: 20px; }
  .kopf-link { font-size: 14px; letter-spacing: .12em; }
}


/* ════ 2  STARTBILD MIT LOGO-ANIMATION ══════════════════════════
   Bleibt beim Scrollen stehen, die Abschnitte schieben sich darüber.
   Beim Laden schreibt sich "Studio", die Buchstaben von ALFIE tauchen
   nacheinander auf, der Kringel zeichnet sich und der Stempel landet. */

.hero {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  /* Foto im Hintergrund, darüber ein Schleier in der Hintergrundfarbe,
     damit das Logo und die Kopfzeile lesbar bleiben.
     Foto und Schleierstärke stehen in einstellungen.css. */
  --flor: color-mix(in srgb, var(--farbe-hintergrund) var(--hero-schleier), transparent);
  background:
    linear-gradient(var(--flor), var(--flor)),
    var(--hero-bild) center / cover no-repeat,
    var(--farbe-hintergrund);
}
/* Wird beim Wegscrollen minimal kleiner und blasser (--hero-weg setzt main.js) */
.hero-inhalt {
  position: absolute;
  inset: 0;
  padding: 96px var(--rand) var(--rand);
  transform-origin: 50% 0;
  scale: calc(1 - var(--hero-weg, 0) * .06);
  opacity: calc(1 - var(--hero-weg, 0) * .6);
}

/* Das große Logo besteht aus sechs Teilen: "Studio" und die Buchstaben A L F I E.
   Jedes Teil zeigt denselben Logo-Ausschnitt, nur anders zugeschnitten. */
.hero-logo {
  position: relative;
  z-index: 1;
  width: min(72vw, calc((100dvh - 190px) * 1.9));
  aspect-ratio: var(--logo-format);
  margin-top: 12px;
}
.hero-logo > span {
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}
.logo-studio {
  clip-path: inset(0 0 45% 0);
  animation: logo-schreiben 1.6s cubic-bezier(.55, 0, .25, 1) .2s both;
}
.logo-a, .logo-l, .logo-f, .logo-i, .logo-e {
  animation: logo-auftauchen .9s cubic-bezier(.2, .7, .2, 1) both;
}
/* Zuschnitt (oben rechts unten links) und Startzeit pro Buchstabe */
.logo-a { clip-path: inset(55% 74.9% 0 0);     animation-delay: 1.05s; }
.logo-l { clip-path: inset(55% 55.6% 0 25.1%); animation-delay: 1.15s; }
.logo-f { clip-path: inset(55% 35.3% 0 44.4%); animation-delay: 1.25s; }
.logo-i { clip-path: inset(55% 22.5% 0 64.7%); animation-delay: 1.35s; }
.logo-e { clip-path: inset(55% 0 0 77.5%);     animation-delay: 1.45s; }

@keyframes logo-schreiben {
  from { clip-path: inset(0 100% 45% 0); }
}
@keyframes logo-auftauchen {
  from { opacity: 0; translate: 0 22%; }
}

/* Das kleine Logo in der Kopfzeile erscheint erst nach der Animation */
body:has(.hero) .kopf-logo {
  animation: einblenden .6s ease 2.4s both;
}
@keyframes einblenden {
  from { opacity: 0; }
}

/* Der rosa Kringel zeichnet sich selbst */
.hero-kringel {
  position: absolute;
  top: 18dvh;
  right: 4vw;
  width: min(46vw, 640px);
  overflow: visible;
}
.hero-kringel path {
  fill: none;
  stroke: var(--farbe-akzent);
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  animation: kringel-zeichnen 2.2s ease-in-out 1.1s both;
}
@keyframes kringel-zeichnen {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

/* Der schiefe Stempel mit der Adresse */
.stempel {
  position: absolute;
  right: 18px;
  bottom: 26px;
  z-index: 2;
  width: 336px;
  height: 244px;
  rotate: -5deg;
  color: var(--farbe-schrift);
  animation: stempeln .45s cubic-bezier(.3, 1.5, .5, 1) 2.2s both;
}
@keyframes stempeln {
  from { opacity: 0; scale: 1.35; }
}
.stempel svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.stempel-mitte,
.stempel-links,
.stempel-rechts {
  position: absolute;
  margin: 0;
  color: var(--farbe-hintergrund);
  text-transform: uppercase;
  white-space: nowrap;
}
.stempel-mitte {
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: .06em;
}
.stempel-links,
.stempel-rechts {
  top: 50%;
  font-size: 15px;
  letter-spacing: .08em;
}
.stempel-links  { left: 34px;  transform: translate(-50%, -50%) rotate(-90deg); }
.stempel-rechts { right: 34px; transform: translate(50%, -50%) rotate(90deg); }

@media (max-width: 1100px) {
  .hero-logo { width: 88vw; margin-top: 24px; }
  .hero-kringel { top: auto; right: -6vw; bottom: 22dvh; width: 70vw; }
  .stempel { transform-origin: right bottom; scale: .72; }
  @keyframes stempeln {
    from { opacity: 0; scale: 1; }
  }
}
@media (max-width: 575px) {
  .hero-inhalt { padding: 60px var(--rand) var(--rand); }
  .stempel { right: 10px; bottom: 16px; scale: .6; }
}


/* ════ 3  TEXTBLOCK ═════════════════════════════════════════════
   Überschrift links, Text in der Mitte.
   Varianten:
   mittig        – Überschrift zentriert über dem Text
   linksbuendig  – Text links statt zentriert (gut für lange Texte) */

.textblock {
  display: grid;
  grid-template-columns: 1fr 1.8fr 1fr;
  align-items: start;
}
.textblock > h2 { grid-column: 1; }
.textblock-inhalt {
  grid-column: 2;
  text-align: center;
}
.textblock .knoepfe {
  grid-column: 1 / -1;
  margin-top: 74px;
}
/* Kacheln (Baustein 8) im Textblock, z. B. die Events unter der Raumbeschreibung */
.textblock .raster {
  grid-column: 1 / -1;
  margin-top: var(--abstand);
}
.textblock.mittig > h2 {
  grid-column: 1 / -1;
  text-align: center;
}
.textblock.linksbuendig .textblock-inhalt { text-align: left; }
/* Lange Texte wie Impressum und Datenschutz: Aufzählungen mit Strich, Links unterstrichen */
.textblock.linksbuendig ul { margin: 0 0 24px; }
.textblock.linksbuendig li { padding-left: 1.2em; text-indent: -1.2em; }
.textblock.linksbuendig li::before { content: "–"; display: inline-block; width: 1.2em; text-indent: 0; }
.textblock.linksbuendig .textblock-inhalt a { text-decoration: underline; text-underline-offset: 3px; }
/* Links im Fließtext, z. B. aus dem Sanity Studio (Knöpfe stehen nicht in <p> und bleiben, wie sie sind) */
.textblock-inhalt p a,
.text-bild-text p a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1100px) {
  .textblock { grid-template-columns: 1fr; }
  .textblock > h2,
  .textblock-inhalt { grid-column: 1; }
  .textblock .knoepfe { margin-top: 56px; }
}


/* ════ 4  BILDREIHE ═════════════════════════════════════════════
   Varianten (als zusätzliche Klasse):
   einzeln   – ein großes Bild
   paar      – ein großes und ein kleines Bild
   versetzt  – großes Bild, kleines Bild mittig daneben
   mitte     – ein Bild in der Mitte
   rechts    – spiegelt einzeln, paar und versetzt */

.bildreihe {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.bildreihe.rechts { flex-direction: row-reverse; }

.bildreihe.einzeln > figure { width: 83%; }

.bildreihe.paar > figure:nth-child(1) { width: 47.5%; }
.bildreihe.paar > figure:nth-child(2) { width: 22.9%; }

.bildreihe.versetzt { align-items: center; }
.bildreihe.versetzt > figure:nth-child(1) { width: 49.1%; }
.bildreihe.versetzt > figure:nth-child(2) { width: 31.1%; margin-inline: 0 9%; }
.bildreihe.versetzt.rechts > figure:nth-child(2) { margin-inline: 9% 0; }

.bildreihe.mitte { justify-content: center; }
.bildreihe.mitte > figure { width: 47.5%; }

/* Tablet & Handy: untereinander und versetzt wie bei Elm.
   "!important" überstimmt die Breiten der Varianten oben. */
@media (max-width: 1100px) {
  .bildreihe,
  .bildreihe.rechts { flex-direction: column; gap: 48px; }
  .bildreihe > figure { margin: 0 !important; }
  .bildreihe > figure:nth-child(1) { width: 73.6% !important; align-self: flex-start; }
  .bildreihe > figure:nth-child(2) { width: 49.1% !important; align-self: flex-end; }
  .bildreihe.rechts > figure:nth-child(1) { align-self: flex-end; }
  .bildreihe.rechts > figure:nth-child(2) { align-self: flex-start; }
  .bildreihe.einzeln > figure { width: 100% !important; }
  .bildreihe.mitte > figure { align-self: center; }
}


/* ════ 5  TEXT & BILD ═══════════════════════════════════════════
   Text links, Bild rechts. Mit "gespiegelt" andersherum. */

.text-bild {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4%;
  align-items: start;
}
.text-bild-text { text-align: center; }
.text-bild.gespiegelt > figure { order: -1; }
.text-bild .bild { aspect-ratio: 1 / 1.17; }

@media (max-width: 1100px) {
  .text-bild { grid-template-columns: 1fr; gap: 48px; }
  .text-bild-text { text-align: left; }
  .text-bild > figure { width: 73.6%; justify-self: end; }
  .text-bild.gespiegelt > figure { order: 0; justify-self: start; }
}


/* ════ 6  MENÜ-KARUSSELL ════════════════════════════════════════
   Eine Karte sichtbar. Linkes Viertel = zurück, rechtes Viertel = weiter,
   Mitte = vergrößern. Auf dem Handy auch wischen.
   Punkte und Kartentitel erzeugt main.js automatisch. */

.karten {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}
.karten > h2 { width: 34.95%; }
.karussell { width: 30.1%; }

.karussell-fenster {
  position: relative;
  overflow: hidden;
  container-type: inline-size;   /* die Karte richtet ihre Schriftgröße danach */
  touch-action: pan-y;
  user-select: none;
}
.karussell-spur {
  display: flex;
  transition: translate .6s cubic-bezier(.6, 0, .2, 1);
}

/* Unsichtbare Klickflächen über der Karte */
.karussell-zurueck,
.karussell-lupe,
.karussell-weiter {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  padding: 0;
  border: 0;
  background: none;
}
.karussell-zurueck {
  left: 0;
  width: 25%;
  /* Pfeil-Mauszeiger – die Farbe steht im SVG: %23923031 = #923031 */
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M20 6 10 16l10 10' fill='none' stroke='%23923031' stroke-width='1.5'/%3E%3C/svg%3E") 16 16, w-resize;
}
.karussell-weiter {
  right: 0;
  width: 25%;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='m12 6 10 10-10 10' fill='none' stroke='%23923031' stroke-width='1.5'/%3E%3C/svg%3E") 16 16, e-resize;
}
.karussell-lupe {
  left: 25%;
  width: 50%;
  cursor: zoom-in;
}
.karussell-fenster button:focus-visible { outline-offset: -6px; }

.karussell-titel {
  min-height: 22px;
  margin: 10px 0 0;
  font-size: var(--groesse-klein);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.karussell-punkte {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}
.karussell-punkte button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid var(--farbe-schrift);
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.karussell-punkte button[aria-current="true"] { background: var(--farbe-schrift); }

/* Eine Menükarte. Alle Größen in "em" – so wächst beim Vergrößern alles mit.
   Die Schrift passt sich der Kartenbreite an (cqi = 1 % davon):
   13px bei einer 440px breiten Karte, auf schmalen Karten bis runter auf 11px. */
.karte {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 1 / 1.355;
  padding: 3.4em 2.4em 2em;
  background: var(--farbe-papier);
  text-align: center;
  font-size: clamp(11px, 2.95cqi, 13px);
  line-height: 1.55;
}
.karte-titel {
  margin: 0 0 .6em;
  font-size: 2.2em;
  line-height: 1.1;
}
.karte h3 {
  margin: 1.3em 0 .5em;
  font-size: .92em;
  letter-spacing: .16em;
}
.karte p { margin: 0; }
.karte .karte-notiz { margin: 1.4em 0; font-size: .88em; }

/* Gerichte mit Preis: Name links, Preis rechts, <small> klein darunter */
.karte-liste {
  width: 100%;
  text-align: left;
}
.karte-liste li {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1.5em;
}
.karte-liste small {
  grid-column: 1 / -1;
  margin-top: -.15em;
  font-size: .85em;
  line-height: 1.4;
}
.karte-zeichen {
  flex-shrink: 0;
  width: 4.2em;
  margin-top: auto;   /* schiebt das Logo ganz nach unten */
}

/* Vergrößerte Karte (öffnet sich über der Seite) */
.karten-lupe {
  width: min(92vw, calc(92dvh / 1.355));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
  container-type: inline-size;
}
.karten-lupe::backdrop {
  background: color-mix(in srgb, var(--farbe-hintergrund) 70%, transparent);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
}
.karten-lupe .karte {
  width: 100%;
  font-size: max(11px, 2.95cqi);   /* wie im Karussell, nur ohne Obergrenze */
  color: var(--farbe-schrift);
  cursor: zoom-out;
}

@media (max-width: 1100px) {
  .karten > h2 { width: 100%; }
  .karussell { width: 100%; max-width: 440px; margin-inline: auto; }
}


/* ════ 7  RAUMBUCHUNG ═══════════════════════════════════════════
   Überschrift links, Formular in der Mitte.
   Die Anfrage öffnet das E-Mail-Programm (siehe main.js und README). */

.buchung {
  display: grid;
  grid-template-columns: 1fr 1.8fr 1fr;
  align-items: start;
}
.buchung > h2 { grid-column: 1; }
.formular { grid-column: 2; }
.formular-intro { text-align: center; margin-bottom: 40px; }
.formular-felder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 24px;
}
.formular-felder .breit { grid-column: 1 / -1; }
.feld-paar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.formular .knoepfe { margin-top: 48px; }
.formular-status {
  margin: 32px 0 0;
  text-align: center;
}

@media (max-width: 1100px) {
  .buchung { grid-template-columns: 1fr; }
  .buchung > h2,
  .formular { grid-column: 1; }
}
@media (max-width: 575px) {
  .formular-felder { grid-template-columns: 1fr; }
}


/* ════ 8  KACHELN ═══════════════════════════════════════════════
   Raster mit drei Spalten, die Kacheln sind leicht versetzt.
   Trägt die Events unter der Raumbeschreibung in "Booking & Events".
   Zusätzliche Klassen pro Kachel:
   schmal  – kleinere Kachel
   rechts  – Kachel rechtsbündig in ihrer Spalte */

.raster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 1.8%;
  row-gap: var(--abstand);
}
.kachel { width: 78%; }
.kachel.schmal { width: 53%; }
.kachel.rechts { justify-self: end; }

.kachel .bild { aspect-ratio: 1 / 1.28; margin-bottom: 14px; }
.kachel:hover .bild img { scale: 1.08; }
.kachel:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.kachel p { margin: 0; }

@media (max-width: 1100px) {
  .raster { grid-template-columns: 1fr 1fr; column-gap: 20px; row-gap: 56px; }
  .kachel,
  .kachel.schmal { width: 100%; }
}
@media (max-width: 575px) {
  .raster { grid-template-columns: 1fr; }
}


/* ════ 9  FUSSZEILE ═════════════════════════════════════════════ */

.fuss {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.05fr;
  gap: 48px var(--rand);
  padding: var(--abstand) var(--rand) 28px;
  background: var(--farbe-hintergrund);
  font-size: 16px;
  line-height: 1.45;
}
.fuss h3 {
  font-size: 16px;
  letter-spacing: .2em;
  margin-bottom: 24px;
}
.fuss p { margin-bottom: 20px; }
.fuss-spalte.rechtsbuendig { text-align: right; }
.fuss a:not(.knopf):hover { text-decoration: underline; text-underline-offset: 4px; }
.fuss .fuss-unten {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 0;
}

@media (max-width: 1100px) {
  .fuss { grid-template-columns: 1fr 1fr; }
  .fuss-spalte.rechtsbuendig { text-align: left; }
}
@media (max-width: 575px) {
  .fuss { grid-template-columns: 1fr; }
  .fuss h3 { font-size: 14px; letter-spacing: .1em; }
}
