/* sections.css — Layout je Sektion */

/* 1 · Localnav */
#localnav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  /* Kein backdrop-filter: der Milchglas-Blur muss bei jedem Scroll-Frame alles
     dahinter (Canvas/Videos) neu verwischen — auf Windows/Edge mit iGPU der
     Hauptgrund für seitenweites Ruckeln. Fast deckendes Schwarz sieht auf dem
     dunklen Theme praktisch gleich aus und kostet nichts. */
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease;
}
#localnav.scrolled { border-bottom-color: rgba(255, 255, 255, 0.12); }

.localnav-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.localnav-brand img { height: 30px; width: auto; }
.localnav-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.localnav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.localnav-links a:not(.btn):hover { color: var(--text); }
.localnav-links a[aria-current='page'] { color: var(--text); }
.localnav-cta { margin-left: 20px; white-space: nowrap; }

/* „Mehr"-Aufklapper — natives <details>, damit es ohne JavaScript funktioniert */
.navmore { position: relative; }
.navmore > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.navmore > summary::-webkit-details-marker { display: none; }
.navmore > summary::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}
.navmore[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.navmore > summary:hover,
.navmore[open] > summary,
.navmore-active > summary { color: var(--text); }
.navmore-panel {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 14px;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.navmore-panel a { padding: 10px 12px; border-radius: 9px; }
.navmore-panel a:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

/* Burger-Menü — auf dem Desktop ausgeblendet, siehe responsive.css */
.navmenu { display: none; }
.navmenu > summary {
  list-style: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.navmenu > summary::-webkit-details-marker { display: none; }
.navmenu-bars,
.navmenu-bars::before,
.navmenu-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, background 0.15s ease;
}
.navmenu-bars { position: relative; }
.navmenu-bars::before,
.navmenu-bars::after { content: ''; position: absolute; left: 0; }
.navmenu-bars::before { top: -7px; }
.navmenu-bars::after { top: 7px; }
.navmenu[open] .navmenu-bars { background: transparent; }
.navmenu[open] .navmenu-bars::before { transform: translateY(7px) rotate(45deg); }
.navmenu[open] .navmenu-bars::after { transform: translateY(-7px) rotate(-45deg); }

.navmenu-panel {
  position: fixed;
  /* inset statt 100vw: body hat overflow-x: hidden */
  inset: var(--nav-h) 0 0 0;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.navmenu-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 24px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.navmenu-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 14px 0 4px;
}
.navmenu-pages, .navmenu-jump { display: flex; flex-direction: column; }
.navmenu-pages a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1.1;
  text-transform: uppercase;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.navmenu-jump a {
  font-weight: 600;
  color: var(--muted);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.navmenu-pages a[aria-current='page'] { color: var(--orange); }
.navmenu-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.navmenu-actions .btn { text-align: center; }
/* Scrollen hinter dem offenen Menü sperren (setzt js/nav.js) */
html.nav-open, html.nav-open body { overflow: hidden; }

/* 2 · Hero (Scrub) — die Scrub-Höhen gelten nur, wenn JS läuft und
   Bewegung erwünscht ist; sonst bleibt die Sektion ein Viewport mit Poster. */
#hero { margin-top: calc(-1 * var(--nav-h)); }
@media (prefers-reduced-motion: no-preference) {
  html.js #hero { height: 450vh; }
  html.js #zutaten { height: 400vh; }
  html.js #fladenbrot { height: 350vh; }
  html.js #statement { height: 300vh; }
  html.js .hero-fallback,
  html.js .zutaten-fallback,
  html.js .fladenbrot-fallback { display: none; }
}
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
#hero-canvas,
.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  pointer-events: none;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}
.hero-copy-2 { opacity: 0; }
.hero-hint {
  position: absolute;
  bottom: 6svh;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  animation: hint-bob 2.2s ease-in-out infinite;
}
@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* 3 · Claim */
#claim { padding: 22vh 0; }
.claim-text {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* 4 · Highlights (Rail) — ohne JS/mit Reduced Motion nativ scrollbar,
   nur die gepinnte GSAP-Rail braucht overflow:hidden */
#highlights { padding: 8vh 0; }
.rail-viewport { overflow-x: auto; }
@media (min-width: 735px) and (prefers-reduced-motion: no-preference) {
  html.js .rail-viewport { overflow: hidden; }
}
.rail-track {
  display: flex;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - 1200px) / 2));
  width: max-content;
}
.rail-card {
  width: min(72vw, 900px);
  flex-shrink: 0;
}
.rail-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 16 / 10;
}
.rail-media video,
.rail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rail-card h3 {
  margin-top: 1.2rem;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 700;
  color: var(--muted);
  max-width: 85%;
}

/* 5 · Brot */
#brot { padding: 14vh 0; }
.fullbleed-media {
  max-width: 1400px;
  margin: 0 auto 6vh;
  padding: 0 24px;
}
.fullbleed-media video {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
#brot .content-narrow { text-align: center; }
#brot .display-m { margin-bottom: 1.4rem; }
.stats {
  display: flex;
  justify-content: center;
  /* wrap + row-gap: ab drei Kennzahlen (Brot) passen sie auf schmalen
     Phones nicht mehr nebeneinander und dürfen umbrechen statt überzulaufen */
  flex-wrap: wrap;
  gap: 1.6rem clamp(2rem, 8vw, 6rem);
  margin-top: 3rem;
}
.stat { display: flex; flex-direction: column; gap: 0.3rem; }
.stat-big {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: var(--orange);
  line-height: 1;
}
.stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

/* 5b · Fladenbrot (Scrub) — Höhe siehe Hero-Block oben */
.fladenbrot-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
#fladenbrot-canvas,
.fladenbrot-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fladen-copy-2,
.fladen-copy-3 { opacity: 0; }
#fladenbrot-copy { padding: 10vh 0 14vh; }

/* 6 · Zutaten (Scrub + Parallax) — Höhe siehe Hero-Block oben */
.zutaten-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
#zutaten-canvas,
.zutaten-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.zutaten-copy {
  position: absolute;
  top: 12svh;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

/* 7 · Fleisch & Saucen */
#fleisch {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10vh 24px;
  display: flex;
  flex-direction: column;
  gap: 12vh;
}
.feature-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.feature-row-reverse .feature-media { order: 2; }
.feature-row-reverse .feature-copy { order: 1; }
.feature-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 4 / 3;
}
.feature-media video { width: 100%; height: 100%; object-fit: cover; }
.feature-copy .display-s { margin-bottom: 1.2rem; }

/* 8 · Statement — Höhe siehe Hero-Block oben */
.statement-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.statement-text {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 10.5vw, 11rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-align: center;
  display: flex;
  flex-direction: column;
  /* Als einziger Vollbreiten-Textblock hatte dieser keinen Seitenabstand */
  padding: 0 24px;
}
.statement-text .line {
  display: block;
  color: var(--text); /* GSAP dimmt beim Scrub; ohne JS bleibt der Text lesbar */
  will-change: transform, color;
}

/* 9 · Specs */
#specs { padding: 16vh 0; }
#specs .display-m { margin-bottom: 3.5rem; }
.specs-table { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.specs-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.specs-row dt {
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  padding-top: 0.15rem;
}
.specs-row dd { font-weight: 600; font-size: 1.15rem; }

/* 9b · Instagram — neueste Beiträge als nativer Snap-Strip.
   Die Karten setzt js/instagram.js nachträglich ein. Die Folgen-Karte steht
   von Anfang an im HTML und hält die Höhe, damit die Seite nicht springt. */
#instagram { padding: 8vh 0 4vh; }
#instagram .section-head p { margin-top: 0.6rem; }
.ig-strip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 max(24px, calc((100vw - 1200px) / 2)) 1rem;
}
.ig-strip::-webkit-scrollbar { display: none; }
.ig-card {
  --ig-breite: min(72vw, 300px);
  position: relative;
  flex-shrink: 0;
  width: var(--ig-breite);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, background 0.3s ease;
}
.ig-card:hover { transform: translateY(-6px); background: #1d1d1f; }
.ig-bild {
  display: block;
  aspect-ratio: 4 / 5;
  background: #1d1d1f;
}
.ig-bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ig-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ig-meta {
  padding: 1rem 1.2rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.ig-text {
  padding: 0 1.2rem 1.3rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Folgen-Karte: so hoch wie die höchste Beitragskarte (Bild 4:5 + Datum +
   zweizeilige Unterschrift ≈ 105 px). Die Karten eines Streifens werden auf
   die höchste gestreckt — ist diese hier schon so hoch, springt die Seite
   beim Nachladen nicht. */
.ig-card-folgen {
  min-height: calc(var(--ig-breite) * 1.25 + 6.8rem);
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  padding: 1.6rem;
  text-align: center;
  background: linear-gradient(160deg, #1d1d1f 0%, #111 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ig-folgen-handle {
  font-family: var(--font-display);
  font-size: 1.7rem;
  text-transform: uppercase;
}
.ig-folgen-text { color: var(--orange); font-weight: 700; }
.ig-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 1.6rem max(24px, calc((100vw - 1200px) / 2)) 0;
}
/* Nachgeladene Karten sanft einblenden (die Reveal-Animation der Seite
   erfasst nur Elemente, die beim Laden schon da sind) */
.ig-neu { animation: ig-rein 0.6s ease both; }
@keyframes ig-rein {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* 10 · Standorte */
#standorte { padding: 8vh 0 16vh; }
.locations {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  /* auto-fit statt fester 3 Spalten: bricht auf Tablets sauber um,
     vorher ragte „Rapperswil" zwischen 735 und 940px aus der Karte */
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}
.location-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  transition: transform 0.3s ease, background 0.3s ease;
}
.location-card:hover { transform: translateY(-6px); background: #1d1d1f; }
.location-card h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.location-card p { color: var(--muted); font-weight: 500; margin-bottom: 1.6rem; }
.link-arrow { color: var(--orange); font-weight: 700; font-size: 0.95rem; }

/* 11 · CTA */
#cta {
  position: relative;
  min-height: 88vh;
  min-height: 88svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cta-media, .cta-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cta-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,10,10,0.25) 0%, rgba(10,10,10,0.82) 100%);
  pointer-events: none; /* rein dekorativ — darf Video-Controls nicht blockieren */
}
.cta-copy {
  position: relative;
  text-align: center;
  padding: 24px;
}
.cta-copy .display-xl { margin-bottom: 2.2rem; }
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4rem 0 3rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  align-items: flex-start;
}
.footer-links, .footer-social {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer-links a:hover, .footer-social a:hover { color: var(--text); }
.footer-links a[aria-current='page'] { color: var(--text); }
.footer-note { font-size: 0.8rem; color: var(--faint); }
/* Öffnungszeiten — die Zeiten stehen fest im HTML, den Zustand
   („Jetzt geöffnet") ergänzt js/oeffnungszeiten.js */
.loc-kurz { font-size: 0.88rem; font-weight: 500; color: var(--muted); }
.loc-hours { margin-top: 0.9rem; font-size: 0.9rem; color: var(--muted); }
.loc-hours > div { display: flex; gap: 0.6rem; }
.loc-hours dt { min-width: 76px; font-weight: 700; color: var(--faint); }
.loc-hours dd { font-weight: 600; }
.loc-status {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.loc-status:empty { display: none; }
.loc-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.loc-status.ist-offen { color: #4ade80; }
.loc-status.ist-zu { color: var(--faint); }

.footer-contact { font-size: 0.85rem; color: var(--muted); line-height: 1.7; }
.footer-contact p { margin: 0; }
.footer-contact span { color: var(--faint); font-weight: 700; display: inline-block; min-width: 100px; }
.footer-contact .footer-reach { margin-top: 0.6rem; }
.footer-reach a { color: var(--orange); font-weight: 700; margin-right: 20px; }

/* Reveal-Gruppen: Startzustand nur wenn JS aktiv (html.js) */
html.js .reveal-group > * { opacity: 0; transform: translateY(40px); }
