/* Aviva bewegt: mobile first. Greens and orange from the old site (#3c7a2a, #d9e8c4, #f0a020), darkened where the
   contrast needs it; system fonts only. Motion moves things (transform), never fades text, so the contrast holds in
   every frame; prefers-reduced-motion switches all of it off. */
:root {
  color-scheme: light dark;
  --gruen: #2f6b1f;
  --gruen-tief: #24561a;
  --gruen-hell: #e6f0d8;
  --orange: #f0a020;
  --tinte: #1f2a1b;
  --tinte-leise: #4a5644;
  --papier: #f6f9f1;
  --flaeche: #ffffff;
  --rand: #d3e0c3;
  --link: #2a6219;
  --auf-gruen: #ffffff;
  --auf-orange: #1d1a10;
  --schatten: 0 1px 2px rgb(31 42 27 / 0.06), 0 6px 18px rgb(31 42 27 / 0.08);
  --schatten-hoch: 0 2px 4px rgb(31 42 27 / 0.08), 0 16px 36px rgb(31 42 27 / 0.16);
  --radius: 1rem;
  --radius-klein: 0.75rem;
  --breite: 68rem;
  --sanft: cubic-bezier(0.22, 1, 0.36, 1);
  --fruehling: #7cb342;
  --sommer: #f0a020;
  --herbst: #c8602a;
  --winter: #4a8cc9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --gruen: #1f3d17;
    --gruen-tief: #172e11;
    --gruen-hell: #22331d;
    --tinte: #e9f1e1;
    --tinte-leise: #c3d0b9;
    --papier: #11190e;
    --flaeche: #1a2616;
    --rand: #3f5436;
    --link: #a9dc8f;
    --schatten: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 18px rgb(0 0 0 / 0.3);
    --schatten-hoch: 0 2px 4px rgb(0 0 0 / 0.35), 0 16px 36px rgb(0 0 0 / 0.45);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--tinte);
  background: var(--papier);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
p, dd, li { hyphens: auto; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
a:focus-visible, button:focus-visible, summary:focus-visible, .filter input:focus-visible + label {
  outline: 3px solid var(--tinte);
  outline-offset: 2px;
}
.kopf :focus-visible, .fuss :focus-visible { outline-color: var(--orange); }
h1, h2, h3 { line-height: 1.2; color: var(--tinte); letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 6.5vw, 3rem); margin: 0 0 1rem; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 10;
  padding: 0.75rem 1rem; background: var(--flaeche); color: var(--link); border-radius: var(--radius-klein);
}
.skip:focus { top: 0.5rem; }

/* Header and navigation */
.kopf {
  background-color: var(--gruen);
  background-image: linear-gradient(120deg, var(--gruen) 0%, var(--gruen-tief) 100%);
  color: var(--auf-gruen);
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.12);
}
.kopf-innen {
  max-width: var(--breite); margin: 0 auto; padding: 0.75rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
}
.marke { color: var(--auf-gruen); text-decoration: none; display: flex; flex-direction: column; min-width: 0; padding: 0.25rem 0; }
.marke-name { font-size: 1.5rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.marke-zeile { font-size: 0.9rem; }
.menu-toggle:not([hidden]) {
  font: inherit; font-weight: 600; color: var(--auf-gruen); background: transparent;
  border: 2px solid var(--auf-gruen); border-radius: 999px;
  min-height: 2.75rem; padding: 0.4rem 1.1rem; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.menu-toggle[aria-expanded="true"] { background: var(--auf-gruen); color: var(--gruen); }
.nav { flex-basis: 100%; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.nav a {
  display: flex; align-items: center; min-height: 2.75rem; padding: 0.4rem 0.95rem;
  color: var(--auf-gruen); text-decoration: none; font-weight: 600; border-radius: 999px;
  transition: background-color 0.2s, transform 0.2s var(--sanft);
}
.nav a:hover { background: rgb(255 255 255 / 0.14); }
.nav a[aria-current="page"] { background: var(--orange); color: var(--auf-orange); }
/* With JavaScript the menu folds away on small screens; without it the navigation stays open. */
@media (max-width: 47.99rem) {
  .menu-toggle:not([hidden])[aria-expanded="false"] + .nav { display: none; }
  .menu-toggle:not([hidden]) + .nav ul { flex-direction: column; padding-bottom: 0.5rem; }
  .menu-toggle[aria-expanded="true"] + .nav { animation: aufklappen 0.3s var(--sanft); }
}
@media (min-width: 48rem) {
  .menu-toggle:not([hidden]) { display: none; }
  .nav { flex-basis: auto; }
  .nav a:hover { transform: translateY(-2px); }
}

/* Content */
main { max-width: var(--breite); margin: 0 auto; padding: 2rem 1rem 4rem; }
main > p, main > section > p, main > h2, main > ul, .faq, .jahreszeit { max-width: 44rem; }
/* The page title gets an orange stroke that draws itself in. */
main > h1::after {
  content: ""; display: block; width: 4rem; height: 0.3rem; margin-top: 0.6rem;
  border-radius: 999px; background: var(--orange);
  transform-origin: left; animation: strich 0.8s 0.2s var(--sanft) both;
}
.einleitung { font-size: 1.2rem; color: var(--tinte); }
.aktionen { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0.65rem 1.4rem;
  border-radius: 999px; background: var(--gruen); color: var(--auf-gruen); border: 2px solid var(--gruen);
  font-weight: 700; text-decoration: none; max-width: 100%;
  box-shadow: var(--schatten);
  transition: transform 0.25s var(--sanft), box-shadow 0.25s var(--sanft), background-color 0.2s;
}
.knopf:hover { background: var(--gruen-tief); transform: translateY(-2px); box-shadow: var(--schatten-hoch); }
.knopf:active { transform: translateY(0); }
.knopf.zweit { background: var(--flaeche); color: var(--link); border-color: currentColor; }
@media (prefers-color-scheme: dark) {
  .knopf { border-color: var(--link); }
}
.hinweis {
  background: var(--gruen-hell); border-left: 4px solid var(--orange); padding: 0.85rem 1.1rem;
  border-radius: 0 var(--radius-klein) var(--radius-klein) 0;
}

/* Start page: the opening panel with text and picture */
.einstieg {
  display: grid; gap: 1.5rem; align-items: center;
  margin: -0.5rem 0 1rem; padding: 1.5rem 1.25rem;
  border-radius: calc(var(--radius) * 1.5);
  background: linear-gradient(150deg, var(--gruen-hell) 0%, var(--flaeche) 70%);
  border: 1px solid var(--rand);
  box-shadow: var(--schatten);
}
.einstieg-text > * { animation: auftauchen 0.7s var(--sanft) both; }
.einstieg-text > :nth-child(2) { animation-delay: 0.08s; }
.einstieg-text > :nth-child(3) { animation-delay: 0.16s; }
.einstieg-text > :nth-child(4) { animation-delay: 0.24s; }
.einstieg-text > :nth-child(5) { animation-delay: 0.32s; }
.einstieg-text p { max-width: 38rem; }
.einstieg .aktionen { margin-bottom: 0; }
.einstieg-ort {
  display: inline-block; margin: 0 0 0.75rem; padding: 0.25rem 0.8rem;
  border-radius: 999px; background: var(--flaeche); border: 1px solid var(--rand);
  font-size: 0.9rem; font-weight: 600; color: var(--tinte-leise);
}
.einstieg-bild {
  width: 100%; border-radius: var(--radius); box-shadow: var(--schatten-hoch);
  animation: auftauchen 0.9s 0.2s var(--sanft) both, schweben 7s 1.1s ease-in-out infinite;
}
@media (min-width: 56rem) {
  .einstieg { grid-template-columns: 1.2fr 1fr; gap: 2.5rem; padding: 2.75rem 2.5rem; }
  .einstieg-bild { rotate: 2deg; }
}

/* Cards: the signposts, the gallery, the activities, the seasons and the questions lift on hover. */
.kaesten { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); max-width: none; }
.kaesten li, .karte article, .jahreszeit, .faq details {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
  box-shadow: var(--schatten);
  transition: translate 0.3s var(--sanft), box-shadow 0.3s var(--sanft), border-color 0.3s;
}
.kaesten li { padding: 1.25rem; border-top: 4px solid var(--orange); }
/* translate, not transform: the scroll animation below owns transform. */
.kaesten li:hover, .karte article:hover, .jahreszeit:hover {
  translate: 0 -4px; box-shadow: var(--schatten-hoch);
}
.kaesten p { margin: 0.5rem 0 0; }
.galerie { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.galerie figure { margin: 0; }
.galerie img, .inhalt-bild { border-radius: var(--radius); box-shadow: var(--schatten); }
.galerie img { transition: transform 0.4s var(--sanft), box-shadow 0.4s var(--sanft); }
.galerie figure:hover img { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--schatten-hoch); }
.galerie figcaption { margin-top: 0.6rem; color: var(--tinte-leise); font-weight: 600; }
.inhalt-bild { margin: 1.5rem 0; max-width: 40rem; width: 100%; }
.mail-gross { font-size: 1.15rem; }

/* Activities: cards and the season filter. The filter works with CSS alone; «Alle» is checked by default, so
   every card stays visible until a season is chosen. */
.filter {
  border: 1px solid var(--rand); border-radius: var(--radius); padding: 0.9rem 1.1rem 0.6rem; margin: 1.5rem 0 0.5rem;
  background: var(--flaeche); max-width: 44rem; box-shadow: var(--schatten);
}
.filter legend { font-weight: 700; padding: 0 0.25rem; }
.filter-wahl { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filter label {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.4rem 1.1rem; cursor: pointer;
  border: 2px solid var(--gruen); border-radius: 999px; font-weight: 600; color: var(--tinte);
  transition: background-color 0.2s, border-color 0.2s, transform 0.25s var(--sanft);
}
.filter label:hover { transform: translateY(-2px); }
@media (prefers-color-scheme: dark) { .filter label { border-color: var(--link); } }
.filter input:checked + label { background: var(--orange); border-color: var(--orange); color: var(--auf-orange); }
.filter-hinweis { font-size: 0.9rem; color: var(--tinte-leise); margin: 0.5rem 0 0; }
.filter-status { min-height: 1.6em; margin: 0.5rem 0 1rem; font-weight: 600; }
.karten { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); max-width: none; }
.karte article { height: 100%; padding: 0 0 1rem; display: flex; flex-direction: column; overflow: hidden; }
.karte article > :not(.karte-bild) { margin-inline: 1.1rem; }
/* The picture fills the top of the card up to its edges and zooms in a little on hover. */
.karte-bild { width: 100%; margin-bottom: 1rem; transition: transform 0.5s var(--sanft); }
.karte article:hover .karte-bild { transform: scale(1.04); }
.karte article > h2:first-child { margin-top: 1rem; }
.karte h2 { margin: 0 0 0.75rem; font-size: 1.2rem; }
.karte p { margin: 0 0 0.75rem; }
.karte .mehr { margin: auto 0 0; padding-top: 0.25rem; }
.mehr a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }
.angaben { margin: 0 0 0.75rem; display: grid; gap: 0.35rem; }
.angaben div { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.5rem; }
.angaben dt { font-weight: 700; color: var(--tinte); }
.angaben dt::after { content: ":"; }
.angaben dd { margin: 0; }
.karte:target article { border: 3px solid var(--orange); }
/* A card that comes back after a filter change grows in. */
.karte { transition: transform 0.4s var(--sanft); }
@starting-style { .karte { transform: scale(0.94); } }
.aktivitaeten:has(#jz-fruehling:checked) .karte:not([data-jahreszeiten~="fruehling"]),
.aktivitaeten:has(#jz-sommer:checked) .karte:not([data-jahreszeiten~="sommer"]),
.aktivitaeten:has(#jz-herbst:checked) .karte:not([data-jahreszeiten~="herbst"]),
.aktivitaeten:has(#jz-winter:checked) .karte:not([data-jahreszeiten~="winter"]) { display: none; }

/* Seasons: one card each, marked with the season's colour. */
.jahreszeit { margin: 1.25rem 0; padding: 0.25rem 1.25rem 0.5rem; border-top: 5px solid var(--gruen); }
.jahreszeit h2 { margin-top: 1rem; }
.jahreszeit:has(#fruehling) { border-top-color: var(--fruehling); }
.jahreszeit:has(#sommer) { border-top-color: var(--sommer); }
.jahreszeit:has(#herbst) { border-top-color: var(--herbst); }
.jahreszeit:has(#winter) { border-top-color: var(--winter); }

/* About: questions and answers */
.faq details { margin: 0.6rem 0; box-shadow: none; }
.faq details[open] { box-shadow: var(--schatten); border-color: var(--gruen); }
.faq summary { cursor: pointer; font-weight: 700; padding: 0.75rem 1rem; min-height: 2.75rem; }
.faq details p { margin: 0; padding: 0 1rem 0.85rem; }
.faq details[open] p { animation: aufklappen 0.3s var(--sanft); }

/* Footer */
.fuss {
  background-color: var(--gruen);
  background-image: linear-gradient(120deg, var(--gruen-tief) 0%, var(--gruen) 100%);
  color: var(--auf-gruen);
}
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 2rem 1rem; }
.fuss p { margin: 0 0 0.5rem; }
.fuss a { color: var(--auf-gruen); display: inline-flex; align-items: center; min-height: 2.75rem; }
.fuss ul { list-style: none; margin: 0 0 0.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.fuss a[aria-current="page"] { font-weight: 700; }

/* Motion */
@keyframes auftauchen { from { transform: translateY(1.25rem); } }
@keyframes aufklappen { from { transform: translateY(-0.5rem); } }
@keyframes strich { from { transform: scaleX(0); } }
@keyframes schweben {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -0.5rem; }
}
@keyframes einschweben { from { transform: translateY(2.5rem) scale(0.96); } }
/* Cards rise into place as they scroll into view, where the browser ties animations to scrolling. */
@supports (animation-timeline: view()) {
  .kaesten li, .galerie figure, .karte article, .jahreszeit, .inhalt-bild {
    animation: einschweben linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 90%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
