/* pegel.css · Effekt 620 „Pegel“ (aus lp-227 KESSEL): die Seite ist das Glas.
 * Bewegung nur mit transform und opacity, kein backdrop-filter, kein Mischmodus. */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-variable.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* ===== ANPASSEN: Farben ===== */
:root {
  --grund: #F3EADB;           /* Schaum */
  --text: #1E1712;
  --text-2: #4B3B2F;
  --kupfer: #8E3B12;          /* Knöpfe */
  --bern: #C8741C;
  --linie: #D9C8AD;
  --creme: #FFF7EA;
  --wort: rgba(196, 108, 22, 0.9);          /* Riesenwort über der Wasserlinie */
  --wort-kuehl: rgba(26, 84, 96, 0.4);      /* unter der Linie im Wasser */
  --wort-hell: rgba(255, 238, 200, 0.82);   /* unter der Linie im Bier */
}
/* ===== Ende Farben ===== */

:root {
  color-scheme: light;
  --schrift-d: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --schrift-t: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --g-wort: clamp(3.5rem, 34svh, 20rem);
  --g-zeile: clamp(2.25rem, min(5.8vw, 10svh), 6.25rem);
  --g-ueber: clamp(1.625rem, 2.6vw, 2.75rem);
  --g-lead: clamp(1.1875rem, 1.45vw, 1.5rem);
  --g-text: clamp(1.0625rem, 1.05vw, 1.1875rem);
  --a1: 8px; --a2: 16px; --a3: 24px; --a4: 40px; --a5: 64px; --a6: 104px;
  --rand: clamp(20px, 5vw, 72px);
  --kopf-h: 72px;
  --aus: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--grund); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; min-height: 100svh; background: var(--grund); color: var(--text); font-family: var(--schrift-t); font-size: var(--g-text); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
h1, h2 { font-family: var(--schrift-d); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 4px; box-shadow: 0 0 0 3px var(--grund); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Kopfzeile: zwei deckende Pillen */
.kopfzeile { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--kopf-h); padding: 0 var(--rand); display: flex; align-items: center; justify-content: space-between; gap: var(--a2); pointer-events: none; }
.kopfzeile > * { pointer-events: auto; }
.marke { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 var(--a3) 0 18px; border-radius: 999px; background: var(--grund); box-shadow: 0 0 0 1px var(--linie); font-family: var(--schrift-d); font-weight: 800; font-size: 1.125rem; letter-spacing: 0.06em; text-decoration: none; color: var(--text); }
.marke-zeichen { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--kupfer); box-shadow: inset 0 -5px 0 var(--bern); }

.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; max-width: 100%; padding: 10px 30px; border: 0; border-radius: 999px; background: var(--kupfer); color: var(--creme); font-family: var(--schrift-t); font-weight: 600; font-size: 1.0625rem; line-height: 1.15; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform 0.18s var(--aus), box-shadow 0.3s var(--aus); }
.knopf--klein { min-height: 44px; padding: 0 20px; font-size: 1rem; }
.knopf--gross { min-height: 60px; padding: 12px 38px; font-size: 1.1875rem; }
@media (hover: hover) and (pointer: fine) { .knopf:hover { box-shadow: 0 12px 28px -12px var(--kupfer); } }
.knopf:active { transform: scale(0.97); }
.knopf:focus-visible { transition: none; }

/* ---------- Die Bühne: Flüssigkeit, Wörter darüber und darunter */
.pegelbuehne { display: none; position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.js .pegelbuehne { display: block; }
.klipp { position: absolute; top: 0; left: -8vw; width: 116vw; height: 112svh; overflow: hidden; will-change: transform; transform: translate3d(0, 100svh, 0); }
.klipp--oben { transform-origin: 50% 100%; z-index: 1; }
.klipp--unten { transform-origin: 50% 0; z-index: 3; }
.gegen { position: absolute; inset: 0; will-change: transform; }
.gegen--oben { transform-origin: 50% 100%; }
.gegen--unten { transform-origin: 50% 0; }
.woerter { position: absolute; left: 8vw; top: 0; width: 100vw; height: 100%; }
.wort { position: absolute; top: 0; display: block; margin: 0; font-family: var(--schrift-d); font-weight: 800; font-size: var(--g-wort); line-height: 0.95; letter-spacing: -0.03em; white-space: nowrap; color: var(--wort); will-change: transform; transform: translate3d(0, 120svh, 0); }
.wort--wasser { font-size: min(calc((100vw - 2 * var(--rand)) / 4.3), var(--g-wort)); left: var(--rand); }
.wort--malz { font-size: min(calc((100vw - 2 * var(--rand)) / 2.85), var(--g-wort)); right: var(--rand); }
.wort--hopfen { font-size: min(calc((100vw - 2 * var(--rand)) / 4.15), var(--g-wort)); left: var(--rand); }
.wort--zeit { font-size: min(calc((100vw - 2 * var(--rand)) / 2.15), var(--g-wort)); right: var(--rand); }
/* Unter der Wasserlinie: etwas versetzt und breiter, wie gebrochen im Glas. Kühl im Wasser, hell im Bier. */
.woerter--unter .wort { letter-spacing: -0.012em; margin-top: 0.04em; }
.woerter--unter .wort--wasser, .woerter--unter .wort--hopfen { left: calc(var(--rand) + 0.045em); }
.woerter--unter .wort--malz, .woerter--unter .wort--zeit { right: calc(var(--rand) - 0.045em); }
.woerter:not(.woerter--unter) .wort--zeit { color: rgba(252, 206, 132, 0.94); }
.woerter--kuehl .wort { color: var(--wort-kuehl); }
.woerter--hell .wort { color: var(--wort-hell); }
.woerter--hell { opacity: 0; }

.fluessig { position: absolute; top: 0; left: -8vw; width: 116vw; height: 112svh; z-index: 2; transform-origin: 50% 0; will-change: transform; transform: translate3d(0, 100svh, 0); }
.fl { position: absolute; inset: 0; }
.fl--klar { --c-oben: #E3E9DC; --c-hinten: rgba(205, 220, 212, 0.7); }
.fl--gold { --c-oben: #EDB354; --c-hinten: rgba(240, 188, 96, 0.7); opacity: 0; will-change: opacity; }
.fl--bern { --c-oben: #D9902C; --c-hinten: rgba(222, 150, 56, 0.72); opacity: 0; will-change: opacity; }
.fl--tief { --c-oben: #B05A18; --c-hinten: rgba(160, 92, 34, 0.72); opacity: 0; will-change: opacity; }
.fl-koerper { position: absolute; inset: 0; }
.fl--klar .fl-koerper { background: url("korn.png") 0 0 / 96px 96px repeat, linear-gradient(180deg, #E3E9DC 0, #CFDCD2 26svh, #AFC4BF 100svh); }
.fl--gold .fl-koerper { background: url("korn.png") 0 0 / 96px 96px repeat, linear-gradient(180deg, #EDB354 0, #DF9A33 14svh, #C8741C 52svh, #A85A18 130svh); }
.fl--bern .fl-koerper { background: url("korn.png") 0 0 / 96px 96px repeat, linear-gradient(180deg, #D9902C 0, #C8741C 22svh, #9A4A16 80svh, #7C3A12 130svh); }
.fl--tief .fl-koerper { background: url("korn.png") 0 0 / 96px 96px repeat, linear-gradient(180deg, #B05A18 0, #9A4A14 9svh, #7C3611 38svh, #52230A 130svh); }
.wlle { position: absolute; left: 0; width: 200%; height: 60px; overflow: visible; will-change: transform; animation: wogen 11s linear infinite; }
.wlle--vorn { bottom: 100%; }
.wlle--hinten { bottom: calc(100% + 5px); animation-duration: 15s; animation-direction: reverse; }
.wlle--vorn .w-fuell { fill: var(--c-oben); }
.wlle--hinten .w-fuell { fill: var(--c-hinten); }
.wlle .w-linie { fill: none; stroke: rgba(255, 252, 240, 0.8); stroke-width: 2; vector-effect: non-scaling-stroke; }
.wlle .w-saum { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 12px; vector-effect: non-scaling-stroke; transform: translate(0, 8px); }
@keyframes wogen { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

.lichtlinien { position: absolute; left: 0; top: 0; width: 200%; height: 60px; overflow: visible; will-change: transform; animation: wogen 29s linear infinite; }
.lichtlinien .ll { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.lichtlinien .ll1 { transform: translate(0, 14svh); }
.lichtlinien .ll2 { transform: translate(0, 27svh); opacity: 0.7; }
.lichtlinien .ll3 { transform: translate(0, 43svh); opacity: 0.5; }

.tiefe { position: absolute; left: 0; top: 26px; width: 100%; height: 92svh; overflow: hidden; }
.ka { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 232, 160, 0.5), rgba(255, 232, 160, 0)); opacity: 0.58; will-change: transform; animation: treiben 26s ease-in-out infinite alternate; }
.ka1 { left: 12%; top: 4svh; width: 34vw; height: 17svh; }
.ka2 { left: 44%; top: 10svh; width: 28vw; height: 13svh; animation-duration: 33s; animation-delay: -9s; }
.ka3 { left: 70%; top: 3svh; width: 30vw; height: 15svh; animation-duration: 29s; animation-delay: -14s; }
.ka4 { left: 26%; top: 32svh; width: 36vw; height: 19svh; animation-duration: 37s; animation-delay: -5s; }
@keyframes treiben { from { transform: translate3d(-5vw, -1.5svh, 0) scale(0.92); } to { transform: translate3d(6vw, 2.5svh, 0) scale(1.12); } }
.blasen { position: absolute; inset: 0; }
.blasen i { display: none; position: absolute; bottom: 0; left: var(--x); width: var(--d); height: var(--d); border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.3) 55%, rgba(255, 255, 255, 0.08)); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.5); opacity: 0; animation: steigen var(--t) linear var(--v) infinite; will-change: transform, opacity; }
.bl1 .blasen i.b-a, .bl2 .blasen i { display: block; }
@keyframes steigen { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 6% { opacity: 0.9; } 88% { opacity: 0.8; } 100% { transform: translate3d(var(--dx), -96svh, 0); opacity: 0; } }

/* Schonung: ohne Fenster-Fokus oder im verdeckten Reiter laufen Wellen, Lichtflecken und Bläschen nicht */
.pause .wlle, .pause .lichtlinien, .pause .ka, .pause .blasen i { animation-play-state: paused; }

/* ---------- Inhalt über der Bühne */
main { position: relative; }
.auf-bier { transition: color 0.25s linear; }
.auf-bier.hell { color: var(--creme); }
.lead { font-size: var(--g-lead); line-height: 1.45; max-width: 30rem; }
.ueber { font-weight: 700; font-size: var(--g-ueber); line-height: 1.08; letter-spacing: -0.02em; }
.zeile-gross { font-weight: 700; font-size: var(--g-zeile); line-height: 0.98; letter-spacing: -0.03em; }
.nr { font-family: var(--schrift-d); font-weight: 800; font-size: 1rem; letter-spacing: 0.12em; }

.kopf { position: relative; z-index: 2; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; gap: var(--a4); padding: calc(var(--kopf-h) + var(--a5)) var(--rand) 14svh; }
.titel { font-weight: 700; font-size: clamp(3rem, min(9vw, 17svh), 10rem); line-height: 0.92; letter-spacing: -0.035em; }
.zl { display: block; }
.kopf-text { display: grid; justify-items: start; gap: var(--a3); }

/* Stationen: 130 svh hoch; steht ihre Mitte in der Fenstermitte, liegt 15 svh von ihr über dem Fenster */
.st { position: relative; z-index: 2; height: 130svh; }
.st-text { position: absolute; left: var(--rand); width: min(30rem, calc(100% - 2 * var(--rand))); display: grid; gap: var(--a2); }
.st1 .st-text { top: 35svh; }
.st2 .st-text { top: 29svh; }
.st3 .st-text { top: 75svh; }
.st4 .st-text { top: 70svh; width: min(52rem, calc(100% - 2 * var(--rand))); }
@media (min-width: 900px) {
  .st3 .st-text { left: auto; right: var(--rand); }
}

/* Ende: echter Schaum steigt aus dem Bier, darunter Creme */
.ende { position: relative; z-index: 3; }
.schaumrand { aspect-ratio: 1920 / 398; min-height: 96px; margin-bottom: -2px; background: url("schaumband-960.webp") center bottom / cover no-repeat; }
@media (min-width: 961px) { .schaumrand { background-image: url("schaumband-1920.webp"); } }
.ende-innen { background: var(--grund); padding: var(--a5) var(--rand) var(--a6); display: grid; justify-items: start; align-content: start; gap: var(--a3); min-height: 70svh; }

.demo-tag { position: fixed; left: var(--rand); bottom: 14px; z-index: 40; max-width: min(760px, calc(100vw - 32px)); margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(243, 234, 219, 0.92); font: 400 14px/1.5 var(--schrift-t); color: var(--text-2); pointer-events: none; }
.demo-tag b { color: var(--text); font-weight: 600; margin-right: 8px; }
@media (max-width: 700px), (max-height: 560px) { .demo-tag { display: none; } }

/* Ruhige Fassung: der Pegel springt je Station, nichts wogt, keine Bläschen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .blasen { display: none !important; }
}
