/* Quattro Stazioni – Motion
   Ankunft (Hero), Vier Stationen (horizontal), Glow-CTA, Flug in den Warenkorb.
   Grundsatz: nur transform/opacity (und filter beim Einblenden) animieren,
   alles Bewegte nur mit JS (.js) und ohne prefers-reduced-motion. */

:root{
  --ease-out:cubic-bezier(.23,1,.32,1);
  --ease-in-out:cubic-bezier(.77,0,.175,1);
  --ease-glas:cubic-bezier(.32,.72,0,1);
}

/* ---------- Kopf: Warenkorb oben rechts, immer sichtbar ---------- */
.kopf .kopf-korb{display:inline-flex;min-height:44px;padding:0 16px 0 14px;gap:8px}
.korb-ico{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.kopf-anz{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#fff;color:var(--rosso);font-size:13px;font-weight:800;line-height:1}
@media (max-width:420px){.kopf-korb-text{display:none}}
@media (min-width:901px) and (max-width:1100px){.nav{gap:16px}.nav a{font-size:14px}}

/* Andrücken fühlt sich an */
.btn{transition:background-color .15s ease,color .15s ease,transform .16s var(--ease-out)}
.btn:active{transform:scale(.97)}

/* ---------- Glow: pulsierendes Licht hinter dem Vorbestell-Knopf ---------- */
.glow{position:relative;isolation:isolate}
.glow::before{
  content:"";position:absolute;inset:-6px;z-index:-1;border-radius:inherit;pointer-events:none;
  background:radial-gradient(closest-side,rgba(206,43,55,.55),rgba(206,43,55,0));
  filter:blur(10px);opacity:.35;transform:scale(.92);
}
.btn--hell.glow::before{background:radial-gradient(closest-side,rgba(255,217,220,.85),rgba(255,217,220,0))}
@media (prefers-reduced-motion:no-preference){
  .glow::before{will-change:transform,opacity;animation:qs-glow 2.6s var(--ease-in-out) infinite alternate}
}
@keyframes qs-glow{from{opacity:.25;transform:scale(.9)}to{opacity:.85;transform:scale(1.18)}}

/* ---------- HERO: die Ankunft ---------- */
.hero{overflow:clip}
.hero::after{content:none}
.hero-buehne{position:relative;min-height:min(92svh,820px);display:flex;align-items:center;overflow:clip}
.hero .hero-medium{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hero-video{opacity:0;transition:opacity .9s var(--ease-out)}
.hero-video.ist-bereit{opacity:1}
/* Kontrast-Garantie: liegt immer über Foto/Video, unter dem Text */
.hero-kontrast{position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(20,14,10,.66) 0%,rgba(20,14,10,.38) 50%,rgba(20,14,10,.08) 100%);will-change:opacity}
/* Glas: Milchglas über dem Bild, löst sich beim Scrollen auf */
.hero-glas{position:absolute;inset:0;pointer-events:none;opacity:0;
  background:linear-gradient(180deg,rgba(255,253,248,.10),rgba(255,253,248,.04));
  -webkit-backdrop-filter:blur(16px) saturate(1.15);backdrop-filter:blur(16px) saturate(1.15)}
.hero-inhalt{position:relative;z-index:1;width:100%}
.hero-scroll{display:none}

/* Mit JS und Bewegung erlaubt: Bühne bleibt stehen, während das Glas sich löst */
@media (prefers-reduced-motion:no-preference){
  .js .hero{height:165svh}
  .js .hero-buehne{position:sticky;top:0;height:100svh;min-height:0}
  .js .hero-glas{opacity:1;will-change:opacity}
  .js .hero-inhalt{will-change:transform,opacity}
  .js .hero .hero-medium{will-change:transform}

  /* Scroll-Hinweis */
  .js .hero-scroll{display:block;position:absolute;left:50%;bottom:26px;z-index:1;width:26px;height:42px;margin-left:-13px;
    border:2px solid rgba(255,255,255,.75);border-radius:14px}
  .js .hero-scroll i{position:absolute;left:50%;top:8px;width:4px;height:8px;margin-left:-2px;border-radius:2px;background:#fff;
    animation:qs-scroll 1.6s var(--ease-out) infinite}
  @keyframes qs-scroll{0%{opacity:0;transform:translate3d(0,0,0)}30%{opacity:1}100%{opacity:0;transform:translate3d(0,14px,0)}}

  /* Überschrift fliesst hinein: Buchstaben von weit zu kompakt, aus der Unschärfe */
  .js .hero h1 .bs{display:inline-block;white-space:pre;will-change:transform,opacity,filter;
    opacity:0;filter:blur(14px);transform:translate3d(calc(var(--o) * .22em),0,0);
    animation:qs-buchstabe 1.5s var(--ease-out) forwards;animation-delay:calc(.15s + var(--a) * 28ms)}
  .js .hero h1 em .bs{animation-duration:1.7s}
  @keyframes qs-buchstabe{
    60%{filter:blur(2px)}
    to{opacity:1;filter:blur(0);transform:translate3d(0,0,0)}
  }
  /* Rest des Hero folgt gestaffelt */
  .js .hero .ort,.js .hero p.unter,.js .hero .btns{opacity:0;transform:translate3d(0,14px,0);
    animation:qs-auf .8s var(--ease-out) forwards}
  .js .hero .ort{animation-delay:.05s}
  .js .hero p.unter{animation-delay:.95s}
  .js .hero .btns{animation-delay:1.1s}
  @keyframes qs-auf{to{opacity:1;transform:translate3d(0,0,0)}}
}
.sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- Vier Stationen ---------- */
.stationen{background:var(--ink);color:#fff;overflow:clip;position:relative}
.stationen .kicker{color:#FFD9DC}
.stationen h2 span{color:#7FD3A5}
.stationen-buehne{padding:clamp(56px,8vw,90px) 0}
.stationen-kopf{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}
.stationen-kopf h2{margin:0}
.stationen-fortschritt{display:none}
.stationen-spur{list-style:none;margin:28px 0 0;padding:0 20px 8px;display:flex;gap:clamp(18px,3vw,44px);align-items:flex-start;
  overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.station{flex:0 0 auto;width:min(78vw,380px);scroll-snap-align:start}

/* Asymmetrie: verschiedene Breiten, Höhen und Versatz */
@media (min-width:761px){
  .stationen-spur{padding:0 max(20px,calc((100vw - var(--max)) / 2 + 20px)) 8px}
  .station--kiosk{width:clamp(300px,30vw,420px);margin-top:40px}
  .station--bistro{width:clamp(340px,38vw,540px);margin-top:0}
  .station--gelato{width:clamp(280px,27vw,380px);margin-top:110px}
  .station--feinkost{width:clamp(320px,34vw,480px);margin-top:20px}
  .station--bistro .station-bild{aspect-ratio:5/4}
  .station--gelato .station-bild{aspect-ratio:3/4.2}
}

.station-karte{display:block;color:inherit;text-decoration:none;position:relative;
  transform-style:preserve-3d;transform:perspective(900px) rotateX(0) rotateY(0);
  transition:transform .5s var(--ease-out)}
.station-bild{display:block;position:relative;aspect-ratio:3/4;border-radius:18px;overflow:hidden;background:#3a312a;
  box-shadow:0 30px 60px -30px rgba(0,0,0,.7)}
.station-bild img{width:100%;height:100%;object-fit:cover;transform:scale(1.02);transition:transform .6s var(--ease-out)}
.station-bild::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(20,14,10,0) 45%,rgba(20,14,10,.55))}
.station-text{display:block;position:relative;padding:18px 4px 0;transform:translate3d(0,0,0);transition:transform .5s var(--ease-out)}
.station-nr{display:block;font-family:var(--serif);font-size:15px;letter-spacing:.2em;color:rgba(255,255,255,.6)}
.station-titel{display:block;font-family:var(--serif);font-weight:700;font-size:clamp(34px,4.2vw,56px);line-height:1;margin:6px 0 10px;letter-spacing:-.01em}
.station-satz{display:block;max-width:34ch;color:rgba(255,255,255,.82);font-size:16px}
.station--kiosk .station-titel{color:#fff}
.station--bistro .station-titel{color:#7FD3A5}
.station--gelato .station-titel{color:#FFB3B9}
.station--feinkost .station-titel{color:var(--crema)}
.station-karte:focus-visible{outline:3px solid #FFD9DC;outline-offset:6px;border-radius:18px}

/* Hover: Bild kippt in 3D, Text skaliert leicht mit (JS setzt die Neigung) */
@media (hover:hover) and (pointer:fine){
  .station-karte:hover .station-bild img{transform:scale(1.08)}
  .station-karte:hover .station-text{transform:translate3d(0,0,40px) scale(1.04)}
}

/* Mit JS und Bewegung erlaubt: vertikal scrollen, horizontal fahren */
@media (prefers-reduced-motion:no-preference){
  .js .stationen.ist-gepinnt .stationen-buehne{position:sticky;top:0;height:100svh;display:flex;flex-direction:column;justify-content:center;padding:76px 0 24px}
  .js .stationen.ist-gepinnt .stationen-spur{overflow:visible;scroll-snap-type:none;will-change:transform;width:max-content}
  .js .stationen.ist-gepinnt .stationen-fortschritt{display:block;position:relative;width:min(220px,40vw);height:4px;border-radius:2px;background:rgba(255,255,255,.18);overflow:hidden;flex:0 0 auto}
  .js .stationen.ist-gepinnt .stationen-fortschritt i{position:absolute;inset:0;transform-origin:0 50%;transform:scaleX(0);will-change:transform;
    background:linear-gradient(90deg,var(--verde) 0 33.33%,#fff 33.33% 66.66%,var(--rosso) 66.66%)}
  .js .stationen.ist-gepinnt .station-karte{will-change:transform}
  /* Grösse folgt der Bildschirmhöhe, damit Bild + Text immer ganz sichtbar sind */
  .js .stationen.ist-gepinnt{--bh:min(40svh,410px)}
  .js .stationen.ist-gepinnt .stationen-buehne{padding:124px 0 20px}
  .js .stationen.ist-gepinnt .stationen-spur{margin-top:clamp(16px,3svh,32px)}
  .js .stationen.ist-gepinnt .station-bild{aspect-ratio:auto;height:var(--bh)}
  .js .stationen.ist-gepinnt .station-titel{font-size:clamp(30px,5.2svh,52px);margin:4px 0 6px}
  .js .stationen.ist-gepinnt .station-text{padding-top:12px}
  .js .stationen.ist-gepinnt .station-satz{font-size:15px}
  @media (min-width:761px){
    .js .stationen.ist-gepinnt .station--kiosk{width:calc(var(--bh) * .8);margin-top:calc(var(--bh) * .1)}
    .js .stationen.ist-gepinnt .station--bistro{width:calc(var(--bh) * 1.25);margin-top:0}
    .js .stationen.ist-gepinnt .station--bistro .station-bild{height:calc(var(--bh) * .88)}
    .js .stationen.ist-gepinnt .station--gelato{width:calc(var(--bh) * .72);margin-top:calc(var(--bh) * .2)}
    .js .stationen.ist-gepinnt .station--gelato .station-bild{height:calc(var(--bh) * .94)}
    .js .stationen.ist-gepinnt .station--feinkost{width:calc(var(--bh) * 1);margin-top:calc(var(--bh) * .04)}
  }
  @media (max-width:760px){
    .js .stationen.ist-gepinnt{--bh:min(42svh,380px)}
    .js .stationen.ist-gepinnt .stationen-buehne{padding-top:96px}
    .js .stationen.ist-gepinnt .station{width:74vw}
    .js .stationen.ist-gepinnt .station--bistro,.js .stationen.ist-gepinnt .station--feinkost{margin-top:calc(var(--bh) * .08)}
  }
}

/* ---------- Flug in den Warenkorb ---------- */
.flug{position:fixed;left:0;top:0;z-index:90;width:34px;height:34px;margin:-17px 0 0 -17px;pointer-events:none;will-change:transform,opacity}
.flug svg{width:100%;height:100%;display:block;filter:drop-shadow(0 6px 10px rgba(0,0,0,.25))}

/* ---------- Bewegung reduziert: ruhig, aber vollständig ---------- */
@media (prefers-reduced-motion:reduce){
  .station-karte,.station-text,.station-bild img{transition:none}
  .glow::before{opacity:.45;transform:none}
}

/* Kopf der Stationen: volle Breite, auf dem Handy untereinander */
.stationen-kopf{width:100%}
@media (max-width:760px){.stationen-kopf{flex-direction:column;align-items:flex-start;gap:14px}}
