/* ==========================================================================
   Lebe Gesund – Lieferservice
   Gemeinsames Stylesheet für alle Seiten
   ========================================================================== */

/* ---------- Schriften (lokal gehostet, keine Verbindung zu Google) ------- */
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tangerine";
  src: url("../fonts/tangerine-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Farb- und Maß-Token ------------------------------------------ */
:root {
  --gruen: #31773b;          /* Feldgrün – Buttons, Schreibschrift-Überschriften */
  --gruen-dunkel: #24592c;   /* Kopfleiste, Hover */
  --weinrot: #841e44;        /* Links */
  --oliv: #535923;           /* Zwischenüberschriften */
  --maigruen: #83a628;       /* Icon-Kreise */
  --leinen: #f3ede5;         /* Flächen, Tabellenstreifen */
  --leinen-dunkel: #e6dccd;  /* Linien auf Leinen */
  --text: #3d4142;
  --text-leise: #5e6364;
  --weiss: #ffffff;

  --schrift: "Source Sans 3", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  --schreibschrift: "Tangerine", "Brush Script MT", cursive;

  --breite: 1120px;
  --rand: clamp(1rem, 4vw, 2rem);
  --abstand: clamp(2.75rem, 7vw, 5rem);
  --radius: 4px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--weiss);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 1.125rem;            /* 18 px – gut lesbar, auch für ältere Kundschaft */
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--weinrot); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--weinrot);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p, ul, ol, table, figure, blockquote { margin: 0; }
address { font-style: normal; }
.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--weiss); color: var(--gruen-dunkel);
  padding: 0.6rem 1rem; border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout-Helfer ------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: var(--rand);
}
.measure { max-width: 42rem; margin-inline: auto; }
.center { text-align: center; }

.flow > * + * { margin-top: 1em; }
.flow-lg > * + * { margin-top: 1.75rem; }

.block { padding-block: var(--abstand); }
.block-tight { padding-block: calc(var(--abstand) * 0.6); }
.block + .block { padding-top: 0; }

/* ---------- Typografie ---------------------------------------------------- */
.display {
  font-family: var(--schreibschrift);
  font-weight: 700;
  color: var(--gruen);
  font-size: clamp(2.6rem, 6.2vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-align: center;
  text-wrap: balance;
}
.display-sm { font-size: clamp(2.3rem, 5vw, 3.2rem); }

.h2 {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 650;
  color: var(--gruen-dunkel);
  text-wrap: balance;
}
.h3 {
  font-size: 1.3rem;
  font-weight: 650;
  color: var(--oliv);
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.2rem, 2.2vw, 1.375rem);
  line-height: 1.5;
}
.lead strong { font-weight: 650; }

.small { font-size: 0.95rem; color: var(--text-leise); }
.note { font-size: 1rem; color: var(--text-leise); }

/* ---------- Kopfleiste & Navigation -------------------------------------- */
.topbar {
  background: var(--gruen-dunkel);
  color: var(--weiss);
  font-size: 1rem;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
}
.topbar a { color: var(--weiss); text-decoration: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--weiss);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: var(--radius);
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle svg { width: 1.1rem; height: 1.1rem; }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: inline-block;
  padding-block: 0.85rem;
  border-bottom: 2px solid transparent;
  line-height: 1.2;
}
.nav a:hover { border-bottom-color: rgba(255,255,255,0.5); }
.nav a[aria-current="page"] { border-bottom-color: var(--weiss); font-weight: 650; }

.topbar-call {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.topbar-call svg { width: 1rem; height: 1rem; fill: currentColor; }
.topbar-call .gratis { font-weight: 400; opacity: 0.85; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .topbar .wrap { flex-wrap: wrap; padding-block: 0.4rem; }
  .nav { order: 3; flex-basis: 100%; display: none; padding-bottom: 0.75rem; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; padding-block: 0.7rem; border-bottom: 1px solid rgba(255,255,255,0.18); }
  .nav a[aria-current="page"] { border-bottom-color: rgba(255,255,255,0.18); text-decoration: underline; text-underline-offset: 0.3em; }
  .topbar-call .gratis { display: none; }
}
/* ohne JavaScript: Navigation immer sichtbar */
.no-js .nav { display: block; }
.no-js .nav-toggle { display: none; }

/* ---------- Logo-Bereich -------------------------------------------------- */
.masthead {
  display: flex;
  justify-content: center;
  padding-top: clamp(1.5rem, 4vw, 2.75rem);
}
.masthead a { display: block; width: min(100%, 560px); }
.masthead a:has(.logo-wide) { width: min(100%, 660px); }
.masthead img { width: 100%; }

/* ---------- Hero / Einstieg ---------------------------------------------- */
.hero { padding-top: clamp(1.25rem, 3vw, 2rem); }
.hero .lead + .lead { margin-top: 0.75em; }

/* ---------- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--gruen);
  color: var(--weiss);
  font-weight: 650;
  font-size: 1.075rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--gruen-dunkel); }
.btn span { text-wrap: balance; }
.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; flex: none; }
.btn-ghost {
  background: transparent;
  color: var(--gruen-dunkel);
  box-shadow: inset 0 0 0 2px var(--gruen);
}
.btn-ghost:hover { background: var(--gruen); color: var(--weiss); }

.btn-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  max-width: 46rem;
  margin-inline: auto;
}
.btn-row-single { max-width: 24rem; grid-template-columns: 1fr; }
.btn-row .btn { width: 100%; }

/* ---------- PLZ-Hinweis --------------------------------------------------- */
.plz-check {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 650;
}

/* ---------- Bilder -------------------------------------------------------- */
.figure-wide img {
  width: 100%;
  border-radius: var(--radius);
}
.figure-wide figcaption { margin-top: 0.6rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1rem);
}
.gallery a, .gallery figure { display: block; overflow: hidden; border-radius: var(--radius); }
.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery a:hover img { transform: scale(1.03); }
@media (max-width: 560px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

.map-link { display: block; position: relative; border-radius: var(--radius); overflow: hidden; }
.map-link img { width: 100%; }
.map-link .map-hint {
  position: absolute; right: 0.75rem; bottom: 0.75rem;
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--weiss); color: var(--gruen-dunkel);
  padding: 0.45rem 0.8rem; border-radius: var(--radius);
  font-weight: 650; font-size: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.map-link .map-hint svg { width: 1rem; height: 1rem; fill: currentColor; }

/* ---------- Leinen-Fläche (Inhaltsblock der Standortseiten) -------------- */
.panel {
  background: var(--leinen);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3.5rem);
}
.panel .h2 { text-align: center; }
.panel-section + .panel-section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--leinen-dunkel);
}
.panel figure img { border-radius: var(--radius); margin-inline: auto; }

.callout {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.callout .h3 { color: var(--gruen-dunkel); }

/* ---------- Tabellen: Bestellzeiten -------------------------------------- */
.orders {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  border-collapse: collapse;
  background: var(--weiss);
  border-radius: var(--radius);
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.orders caption {
  caption-side: top;
  text-align: left;
  font-weight: 650;
  padding-bottom: 0.5rem;
  color: var(--oliv);
}
.orders th, .orders td { padding: 0.6rem 1rem; text-align: left; }
.orders thead th {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text-leise);
  border-bottom: 2px solid var(--leinen-dunkel);
}
.orders tbody tr:nth-child(odd) { background: #faf7f2; }
.orders tbody th { font-weight: 400; }
.orders .time { color: var(--text-leise); white-space: nowrap; }
.orders .arrow { width: 2.5rem; color: var(--gruen); padding-inline: 0.25rem; }
.orders .arrow svg { width: 1.1rem; height: 1.1rem; display: block; margin-inline: auto; }
.orders .day { font-weight: 650; color: var(--gruen-dunkel); }
@media (max-width: 480px) {
  .orders { font-size: 1rem; }
  .orders th, .orders td { padding: 0.55rem 0.45rem; }
  .orders .arrow { width: 1.6rem; padding-inline: 0; }
  .panel { padding-inline: 1rem; }
}

/* ---------- Kundenservice (Fußbereich jeder Seite) ----------------------- */
.service {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}
.service > div > * + * { margin-top: 1rem; }
.service .h3 { color: var(--gruen-dunkel); }
.service p { font-size: 1.05rem; }
.service .btn { min-width: 14rem; }

.hours {
  width: 100%;
  max-width: 17rem;
  margin-inline: auto;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.hours th, .hours td { padding: 0.5rem 0.9rem; }
.hours th { font-weight: 650; text-align: left; width: 3.5rem; }
.hours td { text-align: right; }
.hours tr:nth-child(odd) { background: var(--leinen); }

@media (max-width: 820px) {
  .service { grid-template-columns: 1fr; }
}

/* ---------- Footer -------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--leinen-dunkel);
  padding-block: 1.75rem 2.25rem;
  font-size: 1rem;
  color: var(--text-leise);
  text-align: center;
}
.site-footer p + p { margin-top: 0.5rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

/* ---------- Impressum ----------------------------------------------------- */
.legal { max-width: 44rem; margin-inline: auto; }
.legal h1 { text-align: left; }
.legal .h2 { margin-top: 2.75rem; }
.legal address { font-style: normal; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; }
.legal dt { font-weight: 650; }
.legal dd { margin: 0; }
@media (max-width: 600px) {
  .legal dl { grid-template-columns: 1fr; }
  .legal dd { margin-bottom: 0.6rem; }
}

.credits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 1.25rem 1rem;
  list-style: none;
  padding: 0;
}
.credits img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.credits span { display: block; margin-top: 0.4rem; font-size: 0.85rem; line-height: 1.35; color: var(--text-leise); }

/* Platzhalter, die vor Veröffentlichung ersetzt werden müssen */
.todo {
  background: #fff3b0;
  color: #5a4a00;
  padding: 0.05em 0.35em;
  border-radius: 3px;
  outline: 1px dashed #b89a00;
}

/* ---------- Lightbox ------------------------------------------------------ */
.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(92vw, 1000px);
  max-height: 92vh;
}
.lightbox::backdrop { background: rgba(20, 24, 20, 0.86); }
.lightbox img { max-height: 84vh; width: auto; margin-inline: auto; border-radius: var(--radius); }
.lightbox p { color: var(--weiss); text-align: center; margin-top: 0.6rem; font-size: 1rem; }
.lightbox-close {
  position: fixed;
  top: 1rem; right: 1rem;
  display: grid; place-items: center;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  border: 0;
  background: var(--weiss);
  color: var(--text);
  cursor: pointer;
}
.lightbox-close svg { width: 1.2rem; height: 1.2rem; }
