/* ============================================================
   Labbi-Welpen – öffentliche Website · Design „Warmes Zuhause“
   Warme Creme-/Honigtöne, weiche organische Formen, Pfoten-
   Akzente. Mobile-first, drei Breakpoints: 640 · 960 · 1200px.
   Fonts selbst gehostet (DSGVO): Fraunces (Titel), Nunito (Text).

   Aufbau:
   1. Fonts          6. Header/Nav    11. Bausteine
   2. Tokens         7. Footer        12. Hero (Start)
   3. Reset/Base     8. Buttons       13. Galerie/Lightbox
   4. Typografie     9. Formulare     14. Animationen
   5. Page-System   10. Cards         15. Breakpoints
   ============================================================ */

/* 1. Fonts (variable, latin) --------------------------------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/static/fonts/fraunces-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/nunito-latin-var.woff2") format("woff2");
}

/* 2. Tokens --------------------------------------------------- */
:root {
  /* Farbwelt: Labradorfell & Landleben – Creme, Honig, Wiese, Kakao */
  --bg: #faf5ec;
  --bg-warm: #f5ecdc;
  --surface: #fffdf8;
  --surface-soft: #f7f0e2;
  --text: #43503f;
  --muted: #5d6656;
  --heading: #2b3d2b;
  --primary: #3e7c54;
  --primary-dark: #2d6141;
  --primary-soft: rgba(62, 124, 84, 0.1);
  --accent: #c07f35;
  --accent-dark: #8a5720;
  --accent-soft: #f3e3c6;
  /* Warmes Holz: ruhiger Braunton fuer Abgeschlossenes und Bildrahmen. */
  --wood: #7a5c3e;
  --footer-bg: #273829;
  --footer-text: #e9e2cf;
  --border: rgba(67, 80, 63, 0.14);
  --border-strong: rgba(67, 80, 63, 0.22);
  --shadow:
    0 1px 2px rgba(60, 50, 30, 0.05),
    0 6px 18px rgba(60, 50, 30, 0.07);
  --shadow-lift:
    0 2px 4px rgba(60, 50, 30, 0.06),
    0 14px 34px rgba(60, 50, 30, 0.12);
  --radius-lg: 26px;
  --radius: 18px;
  --radius-sm: 12px;

  /* Typografie-Skala: kompakt und responsive (clamp), keine riesigen
     Ueberschriften. */
  --text-xs: 0.72rem;
  --text-sm: 0.92rem;
  --text-base: 1rem;
  --text-lead: clamp(1.02rem, 0.97rem + 0.25vw, 1.16rem);
  --text-h4: 0.95rem;
  --text-h3: 1.18rem;
  --text-h2: clamp(1.35rem, 1.18rem + 0.8vw, 1.75rem);
  --text-h1: clamp(1.8rem, 1.4rem + 1.9vw, 2.6rem);

  /* Abstands-Skala (vertikal kompakt). */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-section: clamp(1.9rem, 1.4rem + 2.2vw, 3.4rem);

  /* Container: Lesetext / normale Seiten / breite Galerien.
     Breakpoints (mobile-first): 30rem · 40rem · 60rem · 75rem. */
  --container-text: 68ch;
  --container-narrow: 60rem;
  --container: 1160px;
  --container-wide: 1280px;

  /* Mindestgroesse fuer Touch-Ziele (Nav, Buttons, Formularfelder). */
  --tap-target: 44px;

  --danger: #a9362a;
  --success: #21784c;
  --font: "Nunito", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  /* Pfoten-Silhouette als Maske – Farbe kommt vom Element. */
  --paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 11.6c2.6 0 5.4 2 6.3 4.6.6 1.8-.1 3.6-1.9 4.1-1.5.4-2.9-.5-4.4-.5s-2.9.9-4.4.5c-1.8-.5-2.5-2.3-1.9-4.1.9-2.6 3.7-4.6 6.3-4.6zM5.7 7.1c1.1-.2 2.2.7 2.5 2.1.3 1.4-.4 2.7-1.5 2.9-1.1.2-2.2-.7-2.5-2.1-.3-1.4.4-2.7 1.5-2.9zm12.6 0c1.1.2 1.8 1.5 1.5 2.9-.3 1.4-1.4 2.3-2.5 2.1-1.1-.2-1.8-1.5-1.5-2.9.3-1.4 1.4-2.3 2.5-2.1zM9.1 2.6c1.2 0 2.1 1.2 2.1 2.7S10.3 8 9.1 8 7 6.8 7 5.3s.9-2.7 2.1-2.7zm5.8 0c1.2 0 2.1 1.2 2.1 2.7S16.1 8 14.9 8s-2.1-1.2-2.1-2.7.9-2.7 2.1-2.7z'/%3E%3C/svg%3E");
}

/* 3. Reset / Base --------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { overflow-x: hidden; min-height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Body als 3-Zeilen-Grid (Header/Main/Footer): der Footer bildet
   immer den Seitenabschluss, auch bei kurzem Content. */
body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(60rem 32rem at 110% -6rem, rgba(192, 127, 53, 0.09), transparent 65%),
    radial-gradient(52rem 30rem at -14% 16rem, rgba(62, 124, 84, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}
main { min-width: 0; }

img,
svg { max-width: 100%; height: auto; }

a { color: var(--primary-dark); }
a:hover { color: var(--primary); }

::selection { background: var(--accent-soft); color: var(--heading); }

:focus-visible {
  outline: 3px solid rgba(62, 124, 84, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  padding: 0.6rem 1.1rem;
  background: var(--heading);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: top 160ms ease;
}
.skip-link:focus-visible { top: 1rem; color: #fff; }

/* 4. Typografie ------------------------------------------------ */
h1, h2, h3, h4 {
  margin: 0 0 0.55rem;
  color: var(--heading);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--text-h1); line-height: 1.1; }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); font-family: var(--font); font-weight: 800; }

p, ul, ol, dl, address { margin: 0 0 1rem; }
p { max-width: var(--container-text); }
ul, ol { padding-left: 1.25rem; }
address { font-style: normal; }

button, input, textarea, select { font: inherit; }

/* Eyebrow mit kleiner Pfote davor. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  color: var(--accent-dark);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 1em;
  height: 1em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--paw) center / contain no-repeat;
  mask: var(--paw) center / contain no-repeat;
  transform: rotate(-14deg);
}
.page-header--center .eyebrow,
.notice .eyebrow,
.page-cta .eyebrow { justify-content: center; }

.lead {
  color: var(--muted);
  font-size: var(--text-lead);
  line-height: 1.55;
}
.muted { color: var(--muted); }
/* Lange, nicht umbrechbare Zeichenketten (z. B. URLs als Linktext auf den
   Rechtsseiten) dürfen auf schmalen Viewports überall umbrechen — sonst
   entsteht horizontaler Overflow (E2E-Gate misst ab 320px). */
.wrap-anywhere { overflow-wrap: anywhere; }
/* Rechtsseiten: sehr lange deutsche Komposita (Streitbeilegung,
   Schlichtungsstelle …) dürfen auf schmalen Viewports mit Trennstrich
   umbrechen; overflow-wrap bleibt Fallback ohne Silbentrennung. */
.content-card--legal { hyphens: auto; overflow-wrap: anywhere; }

/* Betontes Wort in Überschriften (Startseite). */
.accent-word {
  font-style: italic;
  font-weight: 500;
  color: var(--accent-dark);
}

/* 5. Page-System ----------------------------------------------
   Jede Seite: .page > .page__inner. Darin .page-header,
   .content-card, .page-grid, .card-grid – ein gemeinsames Muster,
   Abschluss immer .page-cta. */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.page { padding-block: var(--space-section); }
.page--compact { padding-block: clamp(1.5rem, 1.2rem + 1.4vw, 2.4rem); }

.page__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  display: grid;
  gap: clamp(1.4rem, 1.1rem + 1.6vw, 2.4rem);
}
.page__inner--narrow { max-width: var(--container-narrow); }
/* Breite Galerien duerfen etwas mehr Raum nutzen. */
.page__inner--wide { max-width: var(--container-wide); }

.page-header { margin-bottom: 0.25rem; max-width: 46rem; }
.page-header--center { text-align: center; margin-inline: auto; }
.page-header--center :is(p, .lead) { margin-inline: auto; }
.page-header > :last-child { margin-bottom: 0; }

.section--compact { display: grid; gap: 1rem; }
.stack { display: grid; gap: clamp(1rem, 0.8rem + 1vw, 1.5rem); }

.page-grid { display: grid; gap: clamp(1.25rem, 1rem + 1.4vw, 1.9rem); }
/* Beide Spalten gleich hoch; kürzere Cards zentrieren ihren Inhalt. */
.page-grid > .content-card { display: flex; flex-direction: column; justify-content: center; }
.page-aside { display: grid; gap: clamp(1rem, 0.85rem + 0.8vw, 1.4rem); align-content: start; }

.card-grid { display: grid; gap: clamp(1rem, 0.8rem + 1vw, 1.5rem); grid-template-columns: 1fr; }

/* 6. Header / Navigation --------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 236, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 200ms ease, background-color 200ms ease;
}
.site-header.is-scrolled {
  background: rgba(250, 245, 236, 0.94);
  box-shadow: 0 6px 24px rgba(60, 50, 30, 0.1);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  /* Das Logo ist 38px hoch; der Link ist der schnellste Weg zurueck zur
     Startseite und bekommt deshalb das volle Tippziel. Der Kopf ist mit
     min-height 62px hoch genug - am Layout aendert das nichts. */
  min-height: var(--tap-target);
  min-width: 0;
  text-decoration: none;
}
.brand__logo {
  height: 38px;
  width: auto;
  max-width: 62vw;
  display: block;
}

/* Burger: zwei Linien, animiert zum X. */
.nav-toggle {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--heading);
  cursor: pointer;
  transition: background-color 160ms ease;
}
.nav-toggle:hover { background: var(--surface-soft); }
.nav-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 220ms ease, opacity 160ms ease;
}
.nav-toggle span:nth-child(1) { transform: translate(-50%, calc(-50% - 4px)); }
.nav-toggle span:nth-child(2) { transform: translate(-50%, calc(-50% + 4px)); }
.nav-toggle span:nth-child(3) { display: none; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

.nav { display: none; }
/* Mobil: Navigation klappt als weiche Karte unter dem Header auf. */
.nav.is-open {
  display: block;
  position: absolute;
  left: clamp(0.6rem, 3vw, 1.5rem);
  right: clamp(0.6rem, 3vw, 1.5rem);
  top: calc(100% + 0.5rem);
  z-index: 60;
  padding: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  animation: nav-drop 200ms ease both;
}
@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.nav ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.15rem; }
.nav__link {
  display: flex;
  align-items: center;
  min-height: var(--tap-target);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--heading);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}
.nav__link:hover { background: var(--primary-soft); color: var(--primary-dark); }
.nav__link.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgba(62, 124, 84, 0.25);
}

/* 7. Footer ---------------------------------------------------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-block: clamp(1.9rem, 1.5rem + 1.6vw, 2.8rem) 1.2rem;
  font-size: 0.92rem;
}
.site-footer__grid { display: grid; gap: 1.6rem; }
.site-footer h2 {
  margin-bottom: 0.55rem;
  color: #fff;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.85;
}
.site-footer a {
  /* Flex mit Mindesthoehe statt block: die Schriftgroesse bleibt gleich,
     nur die Trefferflaeche waechst auf --tap-target. Im gestapelten
     Fussmenue landete der Daumen sonst leicht zwischen zwei Zeilen. */
  display: flex;
  align-items: center;
  min-height: var(--tap-target);
  width: fit-content;
  padding: 0.18rem 0;
  color: var(--footer-text);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 140ms ease, transform 140ms ease;
}
.site-footer a:hover { opacity: 1; color: #fff; transform: translateX(2px); }
.site-footer .brand__logo {
  height: 34px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.site-footer p { margin: 0.65rem 0 0; max-width: 34rem; opacity: 0.85; }

.site-footer__social { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin-top: 0.7rem; }
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(233, 226, 207, 0.4);
  text-underline-offset: 3px;
}

.site-footer__bottom {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(233, 226, 207, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.83rem;
  opacity: 0.8;
}
.site-footer__bottom p { margin: 0; }
.footer-heart { color: #e4a4a4; }

/* 8. Buttons --------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: var(--tap-target);
  padding: 0.55rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease,
              transform 160ms ease, box-shadow 160ms ease;
}
.button:active { transform: translateY(1px); }
.button--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(45, 97, 65, 0.28);
}
.button--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(45, 97, 65, 0.32);
}
.button--ghost {
  background: transparent;
  color: var(--primary-dark);
  border-color: rgba(62, 124, 84, 0.45);
}
.button--ghost:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.5rem;
}

/* 9. Formulare ------------------------------------------------- */
.form { display: grid; gap: 1rem; }
.form-field { display: grid; gap: 0.3rem; }
.form-field label { color: var(--heading); font-weight: 800; font-size: 0.92rem; }
.form-control {
  width: 100%;
  min-height: var(--tap-target);
  padding: 0.6rem 0.9rem;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.form-control::placeholder { color: #a8ad9f; }
.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(62, 124, 84, 0.16);
}
textarea.form-control { min-height: 7.5rem; resize: vertical; }
.required { color: var(--danger); }

.alert {
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.alert--danger { background: #fdf0ec; border-color: #e0b0a8; color: var(--danger); }
.alert--success { background: #e9f5ec; border-color: #a9d8b4; color: var(--success); }
.alert ul { margin-bottom: 0; }

.contact-list { display: grid; margin: 0.9rem 0; }
.contact-list div { padding-block: 0.6rem; border-top: 1px dashed var(--border-strong); }
.contact-list dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.contact-list dd { margin: 0.12rem 0 0; font-weight: 700; overflow-wrap: anywhere; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.honeypot,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Status-Badges (Welpen: verfuegbar/reserviert/vergeben, Wurfstatus) */
.status-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.35rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  font-family: var(--font);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--border);
}
.status-badge--available { background: #e9f5ec; color: var(--success); border-color: #a9d8b4; }
.status-badge--reserved { background: var(--accent-soft); color: var(--accent-dark); border-color: #dbbf8c; }
.status-badge--placed { background: var(--surface-soft); color: var(--muted); }
.status-badge--litter { background: var(--primary-soft); color: var(--primary-dark); border-color: rgba(62, 124, 84, 0.3); }

/* Eltern-Streifen auf der Startseite */
.parents-strip { display: grid; gap: 0.75rem; grid-template-columns: 1fr; margin-bottom: 0.75rem; }
.parents-strip__item {
  display: grid;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--heading);
  font-weight: 700;
}
.parents-strip__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.parents-strip__item:hover img { box-shadow: var(--shadow-lift); }
@media (min-width: 40rem) {
  .parents-strip { grid-template-columns: repeat(3, 1fr); }
}

/* Datenschutz-Hinweis direkt am Formular */
.form-privacy { font-size: var(--text-sm); margin-bottom: 0; }

/* 10. Cards ---------------------------------------------------- */
.content-card,
.page-card {
  padding: clamp(1.25rem, 1rem + 1.4vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.content-card > :last-child,
.page-card > :last-child { margin-bottom: 0; }

/* Bild-Card (Hunde, Figuren) – einheitlich 4/3, sanfter Hover. */
.media-card {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.media-card:has(.image-button:hover) {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}
.media-card > img,
.media-card .image-button img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 400ms ease;
}
.media-card .image-button:hover img { transform: scale(1.04); }
.media-card--tall > img { aspect-ratio: auto; max-height: none; }
.media-card--banner > img { aspect-ratio: 16 / 6; max-height: 190px; }
.media-card__body { padding: clamp(0.95rem, 0.8rem + 0.6vw, 1.3rem); }
.media-card__body > :last-child { margin-bottom: 0; }
.media-card figcaption {
  padding: 0.65rem 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Bild als Auslöser der Großansicht. Als <a href> mit dem großen Bild:
   ohne JavaScript öffnet der Link die Datei direkt, mit JavaScript wird
   er abgefangen und die Lightbox geöffnet. */
.image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: zoom-in;
}
.image-button img { display: block; }

/* Hinweisbox mit Honig-Akzent. */
.callout {
  margin: 1.1rem 0;
  padding: 0.95rem 1.15rem;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
}
.callout > :last-child { margin-bottom: 0; }

/* Abschluss-Block jeder Seite: warmer Honig-Verlauf mit
   Pfoten-Wasserzeichen – der freundliche Ausklang. */
.page-cta {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
  padding: clamp(1.6rem, 1.3rem + 1.6vw, 2.6rem);
  background: linear-gradient(130deg, #f7ecd6, #f3e0bd 55%, #f0d9ae);
  border: 1px solid rgba(192, 127, 53, 0.28);
  border-radius: var(--radius-lg);
}
.page-cta::after {
  content: "";
  position: absolute;
  right: -2.2rem;
  bottom: -2.6rem;
  width: 11rem;
  height: 11rem;
  background: var(--accent);
  opacity: 0.14;
  -webkit-mask: var(--paw) center / contain no-repeat;
  mask: var(--paw) center / contain no-repeat;
  transform: rotate(-18deg);
  pointer-events: none;
}
.page-cta > :is(h2, p) { margin: 0; position: relative; z-index: 1; }
.page-cta h2 { font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.7rem); }
.page-cta p { max-width: 48ch; color: #6d5b3c; font-size: 0.98rem; }
.page-cta .button-row { justify-content: center; margin-top: 0.6rem; position: relative; z-index: 1; }

/* Werte-/Info-Liste mit Icon-Chips. */
.trust-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.trust-item {
  margin: 0;
  padding: 1.1rem 1.15rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.trust-item h3 { margin-bottom: 0.25rem; font-size: 1.08rem; }
.trust-item p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.trust-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  border: 1px solid rgba(192, 127, 53, 0.3);
  box-shadow: 0 3px 8px rgba(60, 50, 30, 0.08);
}
.trust-item__icon svg { width: 1.3rem; height: 1.3rem; }

/* Hundekarten-Inhalt. */
.kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.4rem;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dog-facts { margin: 0.35rem 0 0; display: grid; gap: 0.6rem; }
.dog-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.dog-facts dd { margin: 0.08rem 0 0; line-height: 1.5; font-size: 0.92rem; }

/* ------------------------------------------------------------------
   Wuerfe & Welpen – das fotozentrierte Herzstueck der Website.

   Grundsatz: das Foto traegt, die Typografie bleibt ruhig. Jede
   Bildflaeche steht in einem .media-frame mit festem Seitenverhaeltnis –
   dadurch springt beim Nachladen nichts (kein Layout Shift), auch wenn
   ein Bild noch keine Masse mitbringt.
   ------------------------------------------------------------------ */

/* Bildrahmen mit stabiler Flaeche. */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}
.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--portrait { aspect-ratio: 4 / 5; }
.media-frame--wide { aspect-ratio: 4 / 3; }
.media-frame--hero { aspect-ratio: 4 / 3; border-radius: var(--radius); }
/* Wurf ohne Foto: eine ruhige, warme Flaeche mit Pfoten-Wasserzeichen –
   es wird bewusst kein fremdes Bild untergeschoben. */
.media-frame__placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, var(--bg-warm), var(--surface-soft));
}
.media-frame__placeholder::after {
  content: "";
  position: absolute;
  inset: 22%;
  background: var(--wood);
  opacity: 0.16;
  -webkit-mask: var(--paw) center / contain no-repeat;
  mask: var(--paw) center / contain no-repeat;
}

/* Wurfstatus als ruhiger Marker – Moosgruen fuer Laufendes, Honig fuer
   Erwartetes, gedecktes Holz fuer Abgeschlossenes. */
.litter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.litter-badge::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
}
.litter-badge--planned { background: var(--surface-soft); color: var(--muted); }
.litter-badge--expected { background: var(--accent-soft); color: var(--accent-dark); border-color: #dbbf8c; }
.litter-badge--born { background: var(--primary-soft); color: var(--primary-dark); border-color: rgba(62, 124, 84, 0.32); }
.litter-badge--completed { background: rgba(122, 92, 62, 0.09); color: var(--wood); border-color: rgba(122, 92, 62, 0.22); }

/* Eckdaten eines Wurfs: schmale Zeilen mit feiner Trennlinie statt
   Kaestchen – ruhiger als eine weitere Karte. */
.litter-facts {
  display: grid;
  gap: 0;
  margin: 1rem 0 1.25rem;
}
.litter-facts > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--border);
}
.litter-facts > div:last-child { border-bottom: 1px solid var(--border); }
.litter-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.litter-facts dd { margin: 0; color: var(--heading); font-weight: 800; }

/* Hervorgehobener Wurf (Uebersicht + Startseite): grosses Foto oben,
   Text darunter; ab Tablet nebeneinander. */
.litter-feature {
  display: grid;
  gap: clamp(1rem, 0.85rem + 1vw, 1.75rem);
  padding: clamp(1rem, 0.85rem + 0.9vw, 1.6rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.litter-feature__media { margin: 0; border-radius: var(--radius); }
.litter-feature__body { min-width: 0; }
.litter-feature__body > :last-child { margin-bottom: 0; }
.litter-feature__status { margin: 0 0 0.6rem; }
.litter-feature h2 { margin-bottom: 0.35rem; }

/* Einzelne Wurfseite: derselbe Aufbau, nur mit H1 und groesserem Foto. */
.litter-hero {
  display: grid;
  gap: clamp(1rem, 0.85rem + 1vw, 1.75rem);
}
.litter-hero__media { margin: 0; }
.litter-hero__media figcaption {
  padding: 0.55rem 0.1rem 0;
  color: var(--muted);
  font-size: var(--text-sm);
}
.litter-hero__body { min-width: 0; }
.litter-hero__body > :last-child { margin-bottom: 0; }
.litter-hero__status { margin: 0 0 0.7rem; }

/* Wurfgeschichte: reiner Lesetext auf warmem Papier. */
.litter-story {
  max-width: var(--container-text);
  padding-left: clamp(0.9rem, 0.6rem + 1vw, 1.4rem);
  border-left: 3px solid var(--accent);
}
.litter-story h2 { margin-bottom: 0.6rem; }
.litter-story > :last-child { margin-bottom: 0; }

/* Wurfliste (geplant, Archiv): Zeilen mit kleinem Foto, keine Karten. */
.litter-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.litter-row__link {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  min-height: var(--tap-target);
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.litter-row__link:hover {
  border-color: rgba(62, 124, 84, 0.35);
  box-shadow: var(--shadow);
  color: inherit;
}
.litter-row__media { width: 4.75rem; }
.litter-row__text { display: grid; gap: 0.15rem; min-width: 0; }
.litter-row__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.6rem;
}
.litter-row__head strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--heading);
}
.litter-row__meta { color: var(--muted); font-size: var(--text-sm); }
.litter-row__teaser {
  color: var(--muted);
  font-size: var(--text-sm);
  /* Zweizeilig gekappt: die Liste bleibt ein ruhiges Register. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Archiv tritt bewusst zurueck. */
.litter-list--archive .litter-row__link { background: transparent; box-shadow: none; }
.litter-list--archive .litter-row__link:hover { background: var(--surface); }

/* Welpen-Vorschau auf der Uebersicht: kleine Portraits zum Antippen. */
.puppy-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.puppy-chip {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  width: 6.5rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  color: var(--heading);
  text-decoration: none;
  font-weight: 800;
  font-size: var(--text-sm);
  transition: background 200ms ease;
}
.puppy-chip:hover { background: var(--surface-soft); color: var(--heading); }
.puppy-chip__media { width: 4.5rem; border-radius: 50%; }
.puppy-chip .status-badge { margin-left: 0; }

/* Welpen eines Wurfs: Foto oben, wenige Fakten darunter. */
.puppy-grid {
  display: grid;
  gap: clamp(0.85rem, 0.7rem + 0.8vw, 1.4rem);
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}
.puppy-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.puppy-card__media { border-radius: var(--radius-sm); }
.puppy-card__media .image-button { display: block; height: 100%; }
.puppy-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.puppy-card__media .image-button:hover img { transform: scale(1.03); }
.puppy-card__body { min-width: 0; }
.puppy-card__body h3 { margin-bottom: 0.3rem; font-size: 1.2rem; }
.puppy-card__meta { margin: 0 0 0.4rem; color: var(--muted); font-size: var(--text-sm); }
.puppy-card__text { margin: 0; font-size: 0.95rem; }
.puppy-card__thumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.puppy-card__thumbs .image-button { width: 3.4rem; }

/* Wurfgalerie: quadratische Kacheln mit Bildunterschrift. */
.litter-gallery {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.litter-gallery--strip { grid-template-columns: 1fr; }
.litter-gallery__item { margin: 0; min-width: 0; }
.litter-gallery__item img { transition: transform 400ms ease; }
.litter-gallery__item .image-button:hover img { transform: scale(1.04); }
.litter-gallery__item figcaption {
  padding: 0.4rem 0.15rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Brotkrume der Wurfseite. */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: var(--text-sm);
}
.breadcrumb a {
  min-height: var(--tap-target);
  display: inline-flex;
  align-items: center;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 700;
}
.breadcrumb a:hover { text-decoration: underline; }

/* Empty-/Fehlerzustand. */
.notice { text-align: center; }
.notice :is(p, .lead) { margin-inline: auto; }
.notice .button-row { justify-content: center; }

/* 11. Hero (Startseite) ----------------------------------------
   Warmer Bühnenauftritt: Text links, Foto in organischer Form
   rechts, Badge „Mit Herz aufgezogen“, Feature-Chips. */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 1.2rem + 1.8vw, 3rem);
  background:
    radial-gradient(30rem 20rem at 88% 0%, rgba(192, 127, 53, 0.13), transparent 62%),
    linear-gradient(150deg, #fffdf8, #f9f1e0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  left: -3rem;
  bottom: -3.4rem;
  width: 13rem;
  height: 13rem;
  background: var(--primary);
  opacity: 0.07;
  -webkit-mask: var(--paw) center / contain no-repeat;
  mask: var(--paw) center / contain no-repeat;
  transform: rotate(16deg);
  pointer-events: none;
}
.home { display: grid; gap: clamp(1.5rem, 1.2rem + 1.6vw, 2.5rem); align-items: center; }
.home__text { min-width: 0; position: relative; z-index: 1; }
.home__text > :last-child { margin-bottom: 0; }

.home__media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3.2;
}
.home__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 58% 42% 55% 45% / 50% 55% 45% 50%;
  border: 6px solid #fff;
  box-shadow: var(--shadow-lift);
}
/* Honigring hinter dem Foto. */
.home__media::before {
  content: "";
  position: absolute;
  inset: -0.9rem -1.1rem 0.6rem 0.8rem;
  border: 2px dashed rgba(192, 127, 53, 0.45);
  border-radius: 55% 45% 58% 42% / 47% 53% 47% 53%;
  pointer-events: none;
}

.hero__badge {
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-lift);
  color: var(--heading);
  font-size: 0.86rem;
  font-weight: 800;
}
.hero__badge::before {
  content: "";
  width: 1.15em;
  height: 1.15em;
  flex: none;
  background: var(--accent);
  -webkit-mask: var(--paw) center / contain no-repeat;
  mask: var(--paw) center / contain no-repeat;
  transform: rotate(-12deg);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.hero-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.85rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
}
.hero-chips li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.7;
}

/* 12. Galerie / Lightbox ---------------------------------------- */

/* Lightbox-Dialog: Figure mit optionaler Unterschrift + Bildzaehler */
.lightbox .lb-figure {
  margin: 0;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  max-width: min(92vw, 1100px);
}
.lightbox .lb-caption {
  color: #f3efe4;
  font-size: var(--text-sm);
  text-align: center;
}
.lightbox .lb-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
}
.lightbox [hidden] { display: none !important; }

/* Feldbezogene Formularfehler */
.field-error {
  margin: 0.25rem 0 0;
  color: var(--danger);
  font-size: var(--text-sm);
  font-weight: 700;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(24, 22, 16, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox .modal-image {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox button {
  position: absolute;
  min-width: 46px;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 140ms ease;
}
.lightbox button:hover { background: rgba(0, 0, 0, 0.7); }
/* Sanftes Aufblenden beim Blättern (JS setzt .is-swapping);
   bei Bewegungsreduktion wird die Klasse gar nicht erst gesetzt. */
@media (prefers-reduced-motion: no-preference) {
  .lightbox .modal-image.is-swapping { animation: lb-fade 220ms ease; }
  @keyframes lb-fade {
    from { opacity: 0.35; }
    to { opacity: 1; }
  }
}
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* 13. Animationen ----------------------------------------------
   .reveal wird per JS nur gesetzt, wenn IntersectionObserver
   verfügbar ist – ohne JS bleibt alles sichtbar. */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 500ms ease, transform 500ms ease;
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}
/* Beim Drucken ist immer alles sichtbar. */
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* 14. Breakpoints ----------------------------------------------- */

/* Sehr schmal: Buttons full-width. */
@media (max-width: 29.99rem) {
  .button-row { width: 100%; }
  .button-row .button { width: 100%; }
}

/* Tablet ab 640px: zwei Spalten für Karten, Galerie 3-spaltig. */
@media (min-width: 40rem) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-list { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .home { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 1.5rem; align-items: start; }

  .litter-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .litter-gallery--strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .puppy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .litter-row__link { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .litter-row__media { width: 5.5rem; }
}

/* Desktop ab 960px: horizontale Navigation, 3-spaltige Raster. */
@media (min-width: 60rem) {
  .site-header__inner { min-height: 70px; gap: 0.75rem; }
  .brand__logo { height: 42px; }
  .nav-toggle { display: none; }
  .nav { display: block; }
  .nav ul { display: flex; gap: 0.2rem; }
  .nav__link { padding: 0.35rem 0.85rem; font-size: 0.94rem; white-space: nowrap; }

  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .page-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .media-card--banner > img { max-height: 230px; }
  /* Seitenstreifen wandert beim Scrollen mit (nur zweispaltig sinnvoll). */
  .page-aside--sticky { align-self: start; position: sticky; top: 5.75rem; }

  /* Wurf: Foto und Text nebeneinander – das Bild bleibt der Hauptdarsteller. */
  .litter-feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
  .litter-hero { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; }
  .litter-hero__media { position: sticky; top: 5.75rem; }
  .media-frame--hero { aspect-ratio: 3 / 2; }
  .litter-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .puppy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Ab 1200px etwas mehr Luft. */
@media (min-width: 75rem) {
  .nav__link { padding: 0.35rem 1rem; }
}

/* ------------------------------------------------------------------
   Vorschauleiste der Verwaltung

   Erscheint ausschliesslich auf /admin/litters/preview: dort wird die
   ECHTE oeffentliche Wurfseite gezeigt (gleiches Template, gleiches
   Stylesheet), damit die Vorschau nicht luegen kann. Genau deshalb
   wohnt die Leiste hier und nicht in admin.css - sie ist Teil dieser
   Seite, und es bleibt bei einem Stylesheet pro Seite.

   Auf oeffentlichen Routen ist .Preview immer nil, die Leiste kann dort
   also gar nicht gerendert werden.
   ------------------------------------------------------------------ */
.preview-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--primary-dark);
  color: #f6f2e8;
  border-bottom: 3px solid rgba(0, 0, 0, 0.25);
}
.preview-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  max-width: 72rem;
  margin-inline: auto;
  padding: 0.6rem clamp(0.75rem, 3vw, 1.5rem);
}
.preview-bar__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}
.preview-bar__back {
  display: inline-flex;
  align-items: center;
  /* Gleiches Tippziel wie in der Verwaltung. */
  min-height: var(--tap-target);
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.preview-bar__back:hover { background: rgba(255, 255, 255, 0.14); }
.preview-bar__back:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

@media print {
  /* Ausdruck zeigt die Seite, nicht den Hinweis. */
  .preview-bar { display: none; }
}
