/* ==========================================================================
   PizzaLab · Design-System
   --------------------------------------------------------------------------
   Ein Stylesheet, keine Preprocessor-Kette. Custom Properties reichen für
   alles, was wir brauchen -- und bleiben zur Laufzeit veränderbar, was das
   CMS für Hero-Einstellungen ausnutzt.

   Reihenfolge:
     1. Fonts (self-hosted)
     2. Tokens
     3. Reset
     4. Typografie
     5. Layout
     6. Motion-System
     7. Komponenten
     8. Utilities
   ========================================================================== */

/* ==========================================================================
   1 · FONTS — self-hosted
   Kein Google-Fonts-Request: DSGVO (keine IP-Übermittlung an Dritte) und
   ein Roundtrip weniger auf dem kritischen Pfad.

   font-display:swap — Text ist sofort in der Fallback-Schrift lesbar und
   wird nachträglich ersetzt. Bei einer Seite, die Öffnungszeiten trägt,
   ist Lesbarkeit wichtiger als typografische Reinheit in den ersten 100 ms.
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;           /* variabel — eine Datei für alle Schnitte */
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
                 U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
                 U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
                 U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   2 · TOKENS
   ========================================================================== */

:root {
  /* --- Farben ---------------------------------------------------------
     Namen aus der Sache, nicht aus dem Farbwert: 'basil' bleibt richtig,
     auch wenn sich der Grünton ändert. */
  --c-void:        #080B09;   /* tiefster Grund */
  --c-ink:         #0E1512;   /* Flächen */
  --c-ink-2:       #161F1A;   /* erhöhte Flächen */
  --c-paper:       #FBFAF6;   /* Text */
  --c-basil:       #3E9B54;   /* Primärfarbe */
  --c-basil-lite:  #7FD494;   /* Text auf dunkel */
  --c-basil-deep:  #1F4E2C;
  --c-tomato:      #E8452F;   /* live, dringend */
  --c-tomato-lite: #FF9B8A;   /* Fehlertext auf dunkel */
  --c-amber:       #F2A93B;   /* Wärme, Ofen */
  --c-muted:       #8C9A90;   /* Sekundärtext */
  --c-slate:       #8CB8DE;   /* Info */

  /* Transparenzen — als Variablen, damit Glas-Effekte konsistent bleiben */
  --a-line:        rgba(255, 255, 255, .09);
  --a-line-strong: rgba(255, 255, 255, .15);
  --a-fill:        rgba(255, 255, 255, .045);
  --a-fill-2:      rgba(255, 255, 255, .07);
  --a-glass:       rgba(14, 21, 18, .78);

  /* --- Typografie ----------------------------------------------------- */
  --f-sans:  'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI',
             system-ui, sans-serif;
  --f-serif: 'Instrument Serif', 'New York', Georgia, serif;
  --f-mono:  ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  /* Fließende Größen: clamp() statt Breakpoints. Ein Wert, der von 320 px
     bis 1400 px stimmt, spart drei Media Queries pro Element. */
  --t-hero:  clamp(2.9rem, 13vw, 4.6rem);
  --t-h1:    clamp(1.7rem, 6vw, 2.4rem);
  --t-h2:    clamp(1.25rem, 4.4vw, 1.6rem);
  --t-h3:    1.06rem;
  --t-body:  0.95rem;
  --t-small: 0.84rem;
  --t-micro: 0.72rem;
  --t-nano:  0.63rem;

  /* --- Abstände -------------------------------------------------------
     Vierer-Raster. Nicht dogmatisch, aber konsistent genug, dass
     Abstände nicht "fast gleich" aussehen. */
  --s-1: .25rem;  --s-2: .5rem;   --s-3: .75rem;  --s-4: 1rem;
  --s-5: 1.25rem; --s-6: 1.5rem;  --s-8: 2rem;    --s-10: 2.5rem;
  --s-12: 3rem;   --s-16: 4rem;

  /* Seitenrand: wächst mit dem Viewport, respektiert die Notch */
  --pad-x: max(1.1rem, env(safe-area-inset-left));

  /* --- Radien --------------------------------------------------------- */
  --r-sm: 7px;  --r-md: 11px;  --r-lg: 15px;  --r-xl: 20px;  --r-pill: 999px;

  /* --- Schatten ------------------------------------------------------- */
  --sh-sm: 0 2px 8px -2px rgba(0, 0, 0, .4);
  --sh-md: 0 8px 24px -8px rgba(0, 0, 0, .6);
  --sh-lg: 0 20px 50px -16px rgba(0, 0, 0, .75);
  --sh-glow: 0 8px 26px -8px rgba(62, 155, 84, .85);

  /* --- Motion ---------------------------------------------------------
     Eine Kurve für fast alles: cubic-bezier(.16,1,.3,1) startet schnell
     und läuft weich aus -- fühlt sich reaktiv an, ohne zu hetzen. */
  --ease:      cubic-bezier(.16, 1, .3, 1);
  --ease-out:  cubic-bezier(.33, 1, .68, 1);
  --d-fast:    .18s;
  --d-base:    .32s;
  --d-slow:    .7s;

  /* --- Ebenen --------------------------------------------------------- */
  --z-hero: 1;  --z-content: 20;  --z-dock: 30;  --z-bar: 40;  --z-modal: 60;

  /* --- Laufzeitwerte (von JS gesetzt) --------------------------------
     Hier deklariert, damit sie auch ohne JS definiert sind -- sonst
     würden calc()-Ausdrücke ungültig und Layer springen. */
  --scroll-y:    0px;   /* Scrollposition in px */
  --hero-out:    0;     /* 0..1 — Fortschritt beim Verlassen des Hero */
  --scroll-p:    0;     /* 0..1 — Gesamtfortschritt */
  --bar-on:      0;     /* 0|1 — Kopf- und Fußleiste sichtbar */
  --parallax:    1;     /* Stärkefaktor: 0 = aus, 1 = sanft, 1.6 = deutlich */
}

/* ==========================================================================
   3 · RESET
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Kein scroll-behavior:smooth global — das würde jeden Ankersprung
     verlangsamen. Wird punktuell gesetzt, wo es hilft. */
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--c-void);
  color: var(--c-paper);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Kein Überziehen am Rand — verhindert das "Gummiband" über dem Hero */
  overscroll-behavior-y: none;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, picture, video, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

/* Sichtbarer Fokus — nur bei Tastaturnavigation.
   :focus-visible statt :focus: Ein Mausklick soll keinen Ring zeigen,
   ein Tab-Sprung muss. */
:focus-visible {
  outline: 2px solid var(--c-basil-lite);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: rgba(62, 155, 84, .4); color: var(--c-paper); }

/* ==========================================================================
   4 · TYPOGRAFIE
   ========================================================================== */

.t-hero {
  font-family: var(--f-serif);
  font-size: var(--t-hero);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.015em;
}
.t-hero em { font-style: italic; color: #B6E8C4; }

.t-display {
  font-family: var(--f-serif);
  font-size: var(--t-h1);
  font-weight: 400;
  line-height: 1.1;
}

.t-h2 { font-size: var(--t-h2); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.t-h3 { font-size: var(--t-h3); font-weight: 600; letter-spacing: -.01em; }

.t-label {
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.t-muted { color: var(--c-muted); }
.t-small { font-size: var(--t-small); }
.t-micro { font-size: var(--t-micro); }

/* Tabellenziffern für Uhrzeiten: verhindert Springen, wenn sich der
   Countdown von 1:09 auf 1:10 ändert. */
.t-num { font-variant-numeric: tabular-nums; }

.t-quote {
  font-family: var(--f-serif);
  font-size: clamp(1.2rem, 4.6vw, 1.5rem);
  font-style: italic;
  line-height: 1.38;
}

/* ==========================================================================
   5 · LAYOUT
   ========================================================================== */

.wrap { padding-inline: var(--pad-x); }
.wrap--narrow { max-width: 34rem; margin-inline: auto; }
.wrap--wide   { max-width: 52rem; margin-inline: auto; }

.section {
  position: relative;
  z-index: var(--z-content);
  padding: var(--s-6) var(--pad-x);
  background: var(--c-ink);
}
.section + .section { border-top: 1px solid var(--a-line); }
.section--flush { padding-top: 0; }

/* content-visibility spart Rendering für alles unter dem Fold.
   contain-intrinsic-size verhindert dabei, dass die Scrollbar springt. */
.section--defer {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

.stack   { display: flex; flex-direction: column; gap: var(--s-2); }
.stack-3 { display: flex; flex-direction: column; gap: var(--s-3); }
.row     { display: flex; align-items: center; gap: var(--s-3); }
.row--between { justify-content: space-between; }

.head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-1);
}
.head .more { margin-left: auto; font-size: var(--t-small); color: var(--c-muted); text-decoration: none; }
.head .more:hover { color: var(--c-basil-lite); }

.tile-mini {
  width: 1.85rem; height: 1.85rem;
  border-radius: var(--r-sm);
  background: rgba(62, 155, 84, .18);
  color: var(--c-basil-lite);
  display: grid; place-content: center;
  font-size: var(--t-nano); font-weight: 700;
  border: 1px solid rgba(62, 155, 84, .3);
  flex: none;
}

/* ==========================================================================
   6 · MOTION-SYSTEM
   --------------------------------------------------------------------------
   Grundsatz: Nur transform und opacity werden animiert. Beide laufen im
   Compositor -- ohne Layout und ohne Paint. Deshalb 60 fps auch auf
   älteren Androids.

   Kein background-attachment:fixed (auf iOS Safari defekt), kein
   Scroll-Hijacking, keine Bibliothek.
   ========================================================================== */

/* --- Parallax-Layer ---------------------------------------------------
   Die Faktoren stehen im Markup als --speed. Ein Layer mit --speed:.34
   bewegt sich um 34 % der Scrollstrecke -- er wirkt dadurch fern. */
.plx {
  will-change: transform;
  transform: translate3d(0, calc(var(--scroll-y) * var(--speed, .5) * var(--parallax)), 0);
}

/* Layer, der zusätzlich skaliert: verstärkt den Tiefeneindruck */
.plx-zoom {
  will-change: transform;
  transform:
    translate3d(0, calc(var(--scroll-y) * var(--speed, .5) * var(--parallax)), 0)
    scale(calc(1 + var(--scroll-y) * .0004));
}

/* Layer, der rotiert — für die Teig-Ringe im Hero */
.plx-spin {
  will-change: transform;
  transform:
    translate3d(0, calc(var(--scroll-y) * var(--speed, .5) * var(--parallax)), 0)
    rotate(calc(var(--scroll-y) * .014deg));
}

/* --- Hero-Inhalt: fadet und sinkt beim Verlassen -------------------- */
.hero-out {
  will-change: transform, opacity;
  opacity: calc(1 - var(--hero-out) * 1.25);
  transform: translate3d(0, calc(var(--hero-out) * 46px), 0);
}

/* --- Reveal beim Eintritt ------------------------------------------- */
.rv {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--d-slow) var(--ease),
    transform var(--d-slow) var(--ease);
}
.rv.in { opacity: 1; transform: none; }

/* Gestaffelt — für Listen und Kachelgruppen */
.rv-1 { transition-delay: .06s; }
.rv-2 { transition-delay: .12s; }
.rv-3 { transition-delay: .18s; }
.rv-4 { transition-delay: .24s; }
.rv-5 { transition-delay: .30s; }

/* --- Zeilenweises Einfliegen für Überschriften ---------------------- */
.ln { display: block; overflow: hidden; }
.ln > span {
  display: block;
  animation: rise .95s var(--ease) backwards;
}
.ln:nth-child(1) > span { animation-delay: .06s; }
.ln:nth-child(2) > span { animation-delay: .16s; }
.ln:nth-child(3) > span { animation-delay: .26s; }

@keyframes rise {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}

.fade-up { animation: fadeUp .8s var(--ease) backwards; }
.fade-up-1 { animation-delay: .3s; }
.fade-up-2 { animation-delay: .4s; }
.fade-up-3 { animation-delay: .5s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* --- Wortweises Erscheinen für Zitate ------------------------------- */
.words w {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity .55s var(--ease),
    transform .55s var(--ease);
}
.words.in w { opacity: 1; transform: none; }

/* --- Puls für Live-Anzeigen ----------------------------------------- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}
.pulse { animation: pulse 1.9s infinite; }

/* --- Scroll-Fortschritt --------------------------------------------- */
.progress {
  position: fixed; inset-inline: 0; top: 0;
  height: 2.5px; z-index: var(--z-bar);
  pointer-events: none;
}
.progress i {
  display: block; height: 100%;
  width: calc(var(--scroll-p) * 100%);
  background: linear-gradient(90deg, var(--c-basil), var(--c-amber), var(--c-tomato));
}

/* --- REDUCED MOTION -------------------------------------------------
   WCAG 2.3.3. Nicht optional, nicht abschaltbar durch das CMS.
   Alles wird statisch -- aber nichts verschwindet. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .plx, .plx-zoom, .plx-spin, .hero-out { transform: none !important; opacity: 1 !important; }
  .rv    { opacity: 1 !important; transform: none !important; }
  .words w { opacity: 1 !important; transform: none !important; }
  .pulse { animation: none !important; }
}

/* ==========================================================================
   7 · KOMPONENTEN
   ========================================================================== */

/* --- Buttons -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: .85rem 1.15rem;
  border: 0; border-radius: 14px;
  font-weight: 600; font-size: var(--t-body);
  text-decoration: none;
  transition: transform var(--d-fast) var(--ease), background var(--d-fast);
  /* Mindestgröße für Touch: 44 px nach Apple HIG */
  min-height: 2.75rem;
}
.btn:active { transform: scale(.98); }

.btn--primary {
  background: var(--c-basil); color: #fff;
  box-shadow: var(--sh-glow);
}
.btn--primary:hover { background: #47AC5E; }

.btn--ghost {
  background: var(--a-fill-2); color: var(--c-paper);
  border: 1px solid var(--a-line-strong);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }

.btn--block { width: 100%; }
.btn--grow  { flex: 1; }

/* --- Pills ---------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .65rem;
  border-radius: var(--r-pill);
  font-size: var(--t-micro); font-weight: 600;
  white-space: nowrap;
}
.pill--live {
  background: rgba(232, 69, 47, .14);
  color: var(--c-tomato);
  border: 1px solid rgba(232, 69, 47, .32);
}
.pill--live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok {
  background: rgba(62, 155, 84, .16);
  color: var(--c-basil-lite);
  border: 1px solid rgba(62, 155, 84, .34);
}
.pill--glass {
  background: rgba(8, 11, 9, .4);
  border: 1px solid var(--a-line-strong);
  backdrop-filter: blur(8px);
  color: #D9EFDF;
  font-size: var(--t-nano);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: .38rem .7rem;
}

/* --- Karten --------------------------------------------------------- */
.card {
  padding: var(--s-4);
  border-radius: var(--r-xl);
  background: var(--a-fill);
  border: 1px solid var(--a-line);
}
.card--glass {
  background: var(--a-glass);
  backdrop-filter: blur(18px) saturate(150%);
  border-color: var(--a-line-strong);
  box-shadow: var(--sh-md);
}
.card--accent {
  background: linear-gradient(150deg, rgba(62, 155, 84, .18), rgba(242, 169, 59, .06));
  border-color: rgba(62, 155, 84, .32);
}

/* --- Kacheln -------------------------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--s-2);
}
.tile {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: var(--s-3);
  min-height: 6.5rem;
  padding: var(--s-3);
  border-radius: 16px;
  text-decoration: none; color: var(--c-paper);
  background: linear-gradient(150deg, var(--a-fill-2), rgba(255, 255, 255, .02));
  border: 1px solid var(--a-line);
  position: relative; overflow: hidden;
  transition: transform var(--d-base) var(--ease), border-color var(--d-base);
}
.tile:active { transform: scale(.97); }
.tile::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  transition: opacity var(--d-base);
  background: radial-gradient(circle at 78% 12%, rgba(255, 255, 255, .14), transparent 58%);
}
.tile:hover::after { opacity: 1; }
.tile--accent {
  background: linear-gradient(150deg, rgba(62, 155, 84, .24), rgba(62, 155, 84, .04));
  border-color: rgba(62, 155, 84, .4);
}
.tile--wide {
  grid-column: 1 / -1;
  min-height: auto;
  flex-direction: row; align-items: center;
}
.tile .ic { font-size: 1.35rem; line-height: 1; }
.tile b { display: block; font-size: var(--t-body); font-weight: 600; letter-spacing: -.01em; }
.tile span { display: block; font-size: var(--t-micro); color: var(--c-muted); line-height: 1.35; }
.tile .badge {
  position: absolute; top: .55rem; right: .55rem;
  padding: .16rem .38rem; border-radius: 5px;
  background: var(--c-tomato); color: #fff;
  font-size: var(--t-nano); font-weight: 700; letter-spacing: .05em;
}

/* --- Line-up -------------------------------------------------------- */
.act {
  display: flex; gap: var(--s-3);
  padding: .75rem .85rem;
  border-radius: var(--r-lg);
  background: linear-gradient(155deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid var(--a-line);
}
.act__time {
  flex: none; width: 3.1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: var(--t-body);
  color: var(--c-basil-lite);
  padding-top: .05rem;
}
.act__body { flex: 1; min-width: 0; }
.act__body b { display: block; font-size: var(--t-body); font-weight: 600; letter-spacing: -.01em; }
.act__body span { font-size: var(--t-small); color: var(--c-muted); }

.act--now {
  border-color: rgba(232, 69, 47, .5);
  background: linear-gradient(155deg, rgba(232, 69, 47, .16), rgba(232, 69, 47, .04));
}
.act--now .act__time { color: var(--c-tomato); }

/* Anonymer Slot: gedämpft, aber nicht versteckt. Die Uhrzeit bleibt
   wichtig -- ein leerer Platz wäre irreführend. */
.act--anon .act__body b { color: rgba(251, 250, 246, .62); font-weight: 500; }
.act--anon .act__time   { color: rgba(127, 212, 148, .6); }

.act--free {
  border-style: dashed;
  background: transparent;
  align-items: center;
}
.act--free .act__body b { color: var(--c-muted); font-weight: 500; }

.act__lock { align-self: center; flex: none; font-size: var(--t-small); opacity: .7; }
.act__tag {
  align-self: flex-start;
  padding: .2rem .45rem; border-radius: 5px;
  background: rgba(242, 169, 59, .18);
  color: var(--c-amber);
  border: 1px solid rgba(242, 169, 59, .3);
  font-size: var(--t-nano); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.act__cta {
  align-self: center;
  padding: .32rem .6rem; border-radius: 8px;
  background: rgba(62, 155, 84, .14);
  color: var(--c-basil);
  border: 1px solid rgba(62, 155, 84, .3);
  font-size: var(--t-small); font-weight: 700;
  text-decoration: none;
}

/* --- Chips ---------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .45rem .7rem; border-radius: var(--r-md);
  background: var(--a-fill-2);
  border: 1px solid var(--a-line-strong);
  font-size: var(--t-small); font-weight: 600;
  text-decoration: none; color: var(--c-paper);
  transition: transform var(--d-fast) var(--ease);
}
.chip:active { transform: scale(.96); }
.chip--on { background: var(--c-basil); border-color: var(--c-basil); color: #fff; }

/* --- Kennzahlen ----------------------------------------------------- */
.gauge {
  height: 5px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
}
.gauge i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--c-basil), var(--c-amber));
  border-radius: var(--r-pill);
  transition: width var(--d-slow) var(--ease);
}

/* --- Meldungen ------------------------------------------------------ */
.alert {
  display: flex; gap: var(--s-2);
  padding: .75rem .85rem; border-radius: var(--r-md);
  font-size: var(--t-small); line-height: 1.45;
}
.alert i { flex: none; font-style: normal; }
.alert--error   { background: rgba(232, 69, 47, .14); border: 1px solid rgba(232, 69, 47, .35); color: #FFB4A6; }
.alert--warn    { background: rgba(242, 169, 59, .13); border: 1px solid rgba(242, 169, 59, .34); color: #F7CE8C; }
.alert--success { background: rgba(62, 155, 84, .15); border: 1px solid rgba(62, 155, 84, .35); color: #9FD9B0; }
.alert--info    { background: rgba(140, 184, 222, .1); border: 1px solid rgba(140, 184, 222, .3); color: #A8C8E4; }

/* --- Kopfleiste ----------------------------------------------------- */
.appbar {
  position: fixed; inset-inline: 0; top: 0; z-index: var(--z-bar);
  display: flex; align-items: center; gap: var(--s-2);
  padding: calc(.65rem + env(safe-area-inset-top)) var(--pad-x) .65rem;
  background: var(--a-glass);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--a-line);
  /* Erscheint erst, wenn --bar-on auf 1 springt */
  opacity: var(--bar-on);
  transform: translateY(calc((1 - var(--bar-on)) * -100%));
  transition: opacity var(--d-base), transform var(--d-base) var(--ease);
}
.appbar--static { position: sticky; opacity: 1; transform: none; }
.appbar__mark {
  width: 1.9rem; height: 1.9rem; flex: none;
  border-radius: 9px; background: var(--c-basil); color: #fff;
  display: grid; place-content: center;
  font-size: .78rem; font-weight: 700;
}
.appbar__name { font-weight: 600; font-size: var(--t-body); letter-spacing: -.01em; }

/* --- Fußleiste ------------------------------------------------------ */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-bar);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: .4rem .3rem calc(.4rem + env(safe-area-inset-bottom));
  background: rgba(14, 21, 18, .9);
  backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--a-line);
  transform: translateY(calc((1 - var(--bar-on)) * 100%));
  transition: transform var(--d-base) var(--ease);
}
.tabbar--static { transform: none; }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: .12rem;
  padding: .32rem 0; border-radius: 9px;
  text-decoration: none; color: var(--c-muted);
  font-size: var(--t-nano); font-weight: 600;
  min-height: 2.75rem;
  justify-content: center;
}
.tabbar a.on { color: var(--c-basil-lite); }
.tabbar svg {
  width: 21px; height: 21px;
  stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

/* Platz für die Leisten, damit nichts verdeckt wird */
.has-tabbar { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom)); }

/* --- Bilder --------------------------------------------------------- */
.ph {
  position: relative; overflow: hidden;
  border-radius: var(--r-md);
  background: var(--c-ink-2);
}
.ph img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Fokuspunkt aus dem CMS -- kein starrer Mittenbeschnitt */
  object-position: var(--focal-x, 50%) var(--focal-y, 50%);
}
/* LQIP: Winzbild als Base64, unscharf skaliert. Verhindert Layout-Sprung
   ohne zusätzlichen Request. */
.ph--lqip::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--lqip);
  background-size: cover; background-position: center;
  filter: blur(12px); transform: scale(1.1);
}
.ph img { position: relative; z-index: 1; }

/* ==========================================================================
   8 · UTILITIES
   ========================================================================== */

.grain {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .5; mix-blend-mode: overlay;
  /* SVG-Turbulence inline: ~400 Byte statt einer Bilddatei */
  background-image: 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='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

.scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(8, 11, 9, .55) 0%,
    transparent 26%,
    rgba(8, 11, 9, .35) 62%,
    rgba(8, 11, 9, .94) 100%
  );
}

.mesh-grid {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(rgba(251, 250, 246, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 250, 246, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 35%, #000, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000, transparent 76%);
}

/* Nur für Screenreader — z. B. Sprungmarken */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Sprungmarke, die bei Tastaturfokus erscheint */
.skip {
  position: absolute; top: -3rem; left: var(--pad-x); z-index: var(--z-modal);
  padding: .6rem 1rem; border-radius: var(--r-md);
  background: var(--c-basil); color: #fff;
  font-size: var(--t-small); font-weight: 600; text-decoration: none;
  transition: top var(--d-fast);
}
.skip:focus { top: calc(.6rem + env(safe-area-inset-top)); }

.text-center { text-align: center; }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }

/* ====================================================================
   HERO — Struktur
   --------------------------------------------------------------------
   Bis hierher fehlte die Basis komplett: .hero war nirgends definiert,
   nur .hero-out (der Scroll-Effekt). templates/blocks/hero.php bringt
   eigene Regeln mit, rendert aber ausschliesslich die Landing-Page.
   /heute, /karte und /mithelfen schrieben deshalb ein <section
   class="hero"> ohne position, ohne padding und mit einem
   .hero__backdrop ohne position:absolute -- der Gradient lag im Fluss
   statt hinter dem Text.

   Die Hoehe kommt aus --hero-h. Vorher definierten drei Seiten
   .hero--compact mit drei verschiedenen Werten (44/42/38svh); sobald
   app.css denselben Selektor kennt, haengt das Ergebnis an der
   Ladereihenfolge. Als Custom Property setzt jede Seite ihre Hoehe,
   ohne den Selektor zu ueberschreiben.

   blocks/hero.php ueberschreibt weiterhin alles, was es braucht: Sein
   <style> steht im Body und gewinnt bei gleicher Spezifitaet.
   ==================================================================== */

.hero {
  position: relative;
  min-height: var(--hero-h, 44svh);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--pad-x) var(--s-8);
  overflow: hidden;
  isolation: isolate;
}

.hero__backdrop {
  position: absolute;
  inset: -8% -6% -14% -6%;
  z-index: -2;
  /* Fallback-Mesh ohne Bilddaten -- dieselbe Palette wie die Landing-Page. */
  background:
    radial-gradient(ellipse 60% 45% at 28% 18%, rgba(143, 184, 78, .5), transparent 62%),
    radial-gradient(ellipse 55% 40% at 82% 38%, rgba(232, 69, 47, .45), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 88%, rgba(242, 169, 59, .38), transparent 64%),
    linear-gradient(165deg, #1B3324, #0C1410 62%);
  /* Skaliert, damit die Parallax-Bewegung keine Kante freilegt. */
  scale: 1.12;
}

.hero .scrim     { z-index: -1; }
.hero .grain     { z-index: -1; }
.hero .mesh-grid { z-index: -1; }

.hero__content { position: relative; z-index: 1; }

.hero h1 { text-shadow: 0 4px 40px rgba(0, 0, 0, .5); margin-bottom: var(--s-1); }

.hero__claim {
  font-size: clamp(1rem, 4.2vw, 1.15rem);
  font-weight: 500;
  line-height: 1.38;
  max-width: 25ch;
  margin: var(--s-3) 0 .3rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .5);
}

.hero__sub {
  font-size: var(--t-small);
  color: rgba(251, 250, 246, .72);
  max-width: 34ch;
  line-height: 1.5;
}

.hero__cta {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-4);
}

/* ====================================================================
   FORMULARE
   --------------------------------------------------------------------
   app.css setzte auf input/button nur font/color: inherit. Das
   minimal-Layout bringt eigene Feld-Styles mit, das public-Layout nicht
   -- vor der Open Stage gab es dort kein Formular.
   ==================================================================== */

/* Nur fuer Screenreader. Fokussierbar bleibt das Element trotzdem,
   deshalb kein display:none. */
.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

fieldset.bare { border: 0; padding: 0; margin: 0; }

.field { margin-bottom: var(--s-3); }
.field > label {
  display: block;
  font-size: var(--t-small);
  font-weight: 600;
  margin-bottom: .35rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  display: block;
  width: 100%;
  padding: .6rem .75rem;
  border-radius: 11px;
  border: 1px solid var(--a-line);
  background: var(--a-fill);
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--c-muted); opacity: .7; }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--c-basil-lite);
  outline-offset: 1px;
  border-color: transparent;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--c-tomato-lite); }

.field__hint { font-size: var(--t-micro); color: var(--c-muted); margin-top: .3rem; }
.field__err {
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--c-tomato-lite);
  margin-top: .3rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  padding: .5rem 0;
  font-size: var(--t-small);
  cursor: pointer;
}
.check input { margin-top: .15rem; flex: none; }
.check i { display: block; font-style: normal; margin-top: .15rem; }

/* Auswahl-Karte mit Beschreibung -- Sichtbarkeit bei der Buchung und in
   der Slot-Verwaltung. */
.pick {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: .75rem .85rem;
  border-radius: 13px;
  border: 1px solid var(--a-line);
  background: var(--a-fill);
  cursor: pointer;
}
.pick:has(input:checked) {
  border-color: var(--c-basil-lite);
  background: rgba(62, 155, 84, .13);
}
.pick:has(input:focus-visible) {
  outline: 2px solid var(--c-basil-lite);
  outline-offset: 2px;
}
.pick input { margin-top: .2rem; flex: none; }
.pick__body { flex: 1; min-width: 0; }
.pick__body b { display: block; font-size: var(--t-body); font-weight: 600; }
.pick__body span { font-size: var(--t-micro); color: var(--c-muted); }
.pick__lock { flex: none; opacity: .7; }

/* Was feststeht und nicht editierbar ist. */
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .35rem var(--s-3);
  margin: var(--s-3) 0 0;
  font-size: var(--t-small);
}
.facts dt { color: var(--c-muted); }
.facts dd { margin: 0; font-weight: 600; }

.btn--wide { width: 100%; }
.btn--small {
  padding: .4rem .7rem;
  font-size: var(--t-micro);
}
.btn--small[disabled] { opacity: .4; cursor: not-allowed; }
