/* =====================================
   Components.css
   - Komponenten-Styling (keine globalen Resets!)
===================================== */

/* -------------------------------------
   Tokens / shared helpers
------------------------------------- */
:root {
  --z-base: 0;

  /* Hero */
  --z-hero-logo: 10;
  --z-hero-trees: 20;
  --z-hero-glade: 30;
  --z-hero-tagline: 40;

  /* Global */
  --z-header: 100;
  --z-overlay: 1000;
  --z-overlay-trigger: 1001;
  --z-toast: 2000;

  /* Abstand der fixed Trigger zum Viewport-Rand */
  --header-edge: 0.6rem;
}

/* =====================================
   Header Layout (3-Zonen Grid)
===================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-surface);
  border-bottom: var(--border-1);
}

/* Header-Container: oben/unten ok */
.site-header .container {
  padding-block: var(--space-2);
  padding-top: 0;
}

body.has-sticky-header main {
  padding-top: calc(var(--header-height) + var(--space-2));
}

/* OPTIONAL:
   Wenn du im Header wirklich "flush" bis an den Rand willst,
   aber .container in utilities immer padding-inline hat,
   dann aktivier diese 2 Zeilen:

.site-header .container { padding-inline: var(--header-edge); }
*/

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  position: relative;
}

.site-header__inner > :first-child { justify-self: start; }
.utility-nav { justify-self: end; }

/* Logo Mitte */
.logo {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
}

.logo img {
  display: block;
  height: 40px;
  max-height: 40px;
  width: auto;
}

/* Nav list (utility) */
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.nav-list a[aria-current="page"] {
  font-weight: 800;
  text-decoration-thickness: 3px;
}

/* =====================================
   Menu (Hauptmenü Drawer)
===================================== */

.menu { position: relative; }

/* Trigger fixed top-left */
.menu__trigger {
  position: fixed;
  top: var(--header-edge);
  left: var(--header-edge);
  z-index: var(--z-overlay-trigger);

  width: 44px;
  height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  list-style: none;

  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 10px;

  background: #fff;
  color: #000;
}
.menu__trigger::-webkit-details-marker { display: none; }

/* 2-line icon */
.menu__icon {
  position: relative;
  width: 26px;
  height: 16px;
}
.menu__icon::before,
.menu__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform .25s ease, top .25s ease, bottom .25s ease;
}
.menu__icon::before { top: 3px; }
.menu__icon::after  { bottom: 3px; }

/* Open -> X */
.menu[open] .menu__icon::before { top: 7px; transform: rotate(45deg); }
.menu[open] .menu__icon::after  { bottom: 7px; transform: rotate(-45deg); }

.menu[open] .menu__trigger {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

/* Panel */
.menu__panel {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  z-index: var(--z-overlay);

  transform: translateY(-100%);
  transition: transform .35s ease;
  overflow-y: auto;

  padding: 0 1.25rem 2rem;
}
.menu[open] .menu__panel { transform: translateY(0); }

/* Header exakt auf Buttonhöhe */
.menu__header {
  height: calc(44px + (var(--header-edge) * 2));
  display: flex;
  align-items: center;

  padding-top: var(--header-edge);
  padding-left: calc(44px + 1rem);
  margin-bottom: 2rem;
}
.menu__title { margin: 0; }

.menu__content {
  width: 100%;
  max-width: none;
}

/* ================================
   Settings Header – wie Menü, aber Button RECHTS
================================ */

.settings__panel .menu__header {
  height: calc(44px + (var(--header-edge) * 2));
  display: flex;
  align-items: center;
  padding-top: var(--header-edge);
  padding-left: 1.25rem;
  padding-right: calc(44px + 1rem);
  margin-bottom: 2rem;
}

.settings__panel .menu__title {
  margin: 0;
  line-height: 1;
}

/* Top-level links */
.menu__toplink {
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  padding: 0.8rem 0;
}
.menu__toplink:hover {
  text-decoration: underline;
}

/* Top-level sections */
.menu__section {
  border-top: 1px solid rgba(255,255,255,0.22);
}

.menu__section:first-child {
  border-top: 0;
}

.menu__toplink--summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;

  cursor: pointer;
  list-style: none;
  padding: 0.8rem 0;
}
.menu__toplink--summary::-webkit-details-marker {
  display: none;
}

.menu__section-panel {
  padding: 0 0 0.9rem 0;
}

.menu__section-link {
  display: inline-block;
  margin: 0 0 0.85rem 0;
  color: #FCE522;
  text-decoration: none;
  font-weight: 700;
}
.menu__section-link:hover {
  text-decoration: underline;
}

/* Divider */
.menu__divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.35);
  margin: 1.25rem 0;
}

/* Dropdowns */
.menu__dropdown {
  border-top: 1px solid rgba(255,255,255,0.16);
  padding: 0.35rem 0;
}

.menu__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;

  cursor: pointer;
  list-style: none;
  font-weight: 800;
  padding: 0.6rem 0;
}
.menu__summary::-webkit-details-marker { display: none; }

.menu__arrow {
  width: 0;
  height: 0;
  border-left: .35em solid transparent;
  border-right: .35em solid transparent;
  border-top: .4em solid currentColor;
  transition: transform .2s ease-in-out;
}

.menu__dropdown[open] .menu__arrow,
.menu__section[open] > .menu__toplink--summary .menu__arrow {
  transform: rotate(180deg);
}

.menu__items {
  list-style: none;
  margin: 0.35rem 0 0.9rem 0;
  padding: 0;
}
.menu__items li + li {
  margin-top: 0.15rem;
}

.menu__items a {
  display: block;
  padding: 0.55rem 0.4rem;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
}
.menu__items a:hover {
  background: #FCE522;
  color: #000;
}

/* Focus on dark */
.menu__panel a:focus-visible,
.menu__summary:focus-visible,
.menu__toplink--summary:focus-visible,
.menu__trigger:focus-visible {
  outline: 3px solid #FCE522;
  outline-offset: 3px;
}

/* Desktop: panel left, slide in */
@media (min-width: 1024px) {
  .menu__panel {
    left: 0;
    right: auto;
    width: min(50vw, 720px);
    height: 100vh;
    transform: translateX(-105%);
  }

  .menu[open] .menu__panel {
    transform: translateX(0);
  }

  .menu[open]::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
  }
}

/* =====================================
   Settings Drawer – wie Hauptmenü (SVG Gear -> X)
   Mobile: von oben nach unten
   Desktop: (optional) von rechts nach links
===================================== */

.settings { position: relative; }

.settings__trigger {
  position: fixed;
  top: var(--header-edge);
  right: var(--header-edge);
  z-index: 1001;

  width: 44px;
  height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  list-style: none;

  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 10px;

  background: #fff;
  color: #000;
}
.settings__trigger::-webkit-details-marker { display: none; }

.settings__icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.settings__gear { display: block; }
.settings__closeIcon { display: none; }
.settings[open] .settings__gear { display: none; }
.settings[open] .settings__closeIcon { display: block; }

.settings[open] .settings__trigger {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

/* Gear: weiß gefüllt + schwarze Kontur */
.settings__gear .gear-path {
  fill: #fff;
  stroke: #000;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings[open] .settings__gear .gear-path { stroke: #fff; }

/* Panel: Mobile/Small = slide down */
.settings__panel {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  z-index: 1000;

  transform: translateY(-100%);
  transition: transform .35s ease;
  overflow-y: auto;

  /* WICHTIG: Platz für Trigger/Überschrift oben */
  padding: calc(44px + (var(--header-edge) * 2) + 1rem) 1.25rem 2rem;
}

.settings[open] .settings__panel {
  transform: translateY(0);
}

.settings__content { width: 100%; max-width: none; }

/* Form spacing */
.settings__content h2 { margin: 0 0 1rem 0; }

.settings__group {
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  padding: 1rem;
}
.settings__group + .settings__group { margin-top: 1.25rem; }

.settings__group legend { font-weight: 800; padding: 0 0.25rem; }

.settings__group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.settings__group label:first-of-type { margin-top: 0.6rem; }

.settings__group input[type="radio"],
.settings__group input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

/* Focus */
.settings__panel a:focus-visible,
.settings__panel button:focus-visible,
.settings__panel input:focus-visible,
.settings__trigger:focus-visible,
.settings__panel summary:focus-visible {
  outline: 3px solid #FCE522;
  outline-offset: 3px;
}

/* Desktop: Panel rechts (NUR wenn du das wirklich willst)
   -> Breakpoint höher setzen, damit iPad (1024px) NICHT als Desktop zählt */
@media (min-width: 1024px) {
  .settings__panel {
    left: auto;
    right: 0;
    width: min(50vw, 720px);
    height: 100vh;

    padding: calc(44px + (var(--header-edge) * 2) + 1rem) 1.25rem 2rem;

    transform: translateX(105%);
  }

  .settings[open] .settings__panel { transform: translateX(0); }

  .settings[open]::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
  }
}

/* Reduced motion (drawers) */
@media (prefers-reduced-motion: reduce) {
  .settings__panel {
    transition: none !important;
  }
}

/* =====================================
   Buttons
===================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-1);
  border: 1px solid transparent;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  text-decoration: none;
  font-weight: 700;
}
.btn:hover { filter: brightness(0.95); }

.btn--ghost {
  background: transparent;
  border-color: rgba(0,0,0,0.18);
  color: var(--color-text);
}

/* =====================================
   Sections
===================================== */

.section { padding-block: var(--space-7); }
.section:nth-of-type(even) { background: var(--color-surface-muted); }
.section h2 { margin-bottom: var(--space-2); }

/* =====================================
   Hero – Base + Split
===================================== */

.hero { padding-block: var(--space-7); }

.hero__lead {
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

.hero--split {
  padding-block: 0;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 85vh;
}

.hero--split .hero__content {
  position: relative;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 4rem 1.5rem;
  z-index: 1;
}

.hero--split .hero__content-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Mobile gradient down */
.hero--split .hero__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -120px;
  height: 120px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,1) 0%,
    rgba(255,255,255,0.9) 40%,
    rgba(255,255,255,0.5) 70%,
    rgba(255,255,255,0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.hero--split .hero__media {
  min-height: 40vh;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 900px) {
  .hero--split { grid-template-columns: 2fr 2.5fr; }
  .hero--split .hero__content { padding: 4.5rem 3rem; }

  .hero--split .hero__content::after {
    top: 0;
    bottom: 0;
    left: auto;
    right: -100px;
    width: 100px;
    height: auto;
    background: linear-gradient(
      to right,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,0.9) 25%,
      rgba(255,255,255,0.5) 50%,
      rgba(255,255,255,0) 75%,
      rgba(255,255,255,0) 100%
    );
  }

  .hero--split .hero__content-inner { max-width: 62ch; }
}

/* Stacked hero (optional) */
.hero--stack .hero__inner {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 900px) {
  .hero--stack .hero__inner { grid-template-columns: 1.2fr 0.8fr; }
}
.hero--stack .hero__media img {
  border-radius: var(--radius-2);
  border: var(--border-1);
}

/* =====================================
   Hero Teaser – Centered Text
===================================== */

.hero-teaser {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}
.hero-teaser__inner { max-width: 70ch; }

.hero-teaser__text {
  margin: 0;
  font-family: "OpenDyslexic", system-ui, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.3;
  color: #000;
}

.hero-teaser--yellow { background: #F3EC01; }
.hero-teaser--orange { background: #FDAA02; }
.hero-teaser--coral  { background: #FD6350; }
.hero-teaser--pink   { background: #EE729E; }
.hero-teaser--blue   { background: #74A6FF; }

/* =====================================
   Full-Bleed Teaser
===================================== */

.teaser {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.teaser--pad-s { padding: 2rem 1.25rem; }
.teaser--pad-m { padding: 3rem 1.5rem; }
.teaser--pad-l { padding: 4rem 1.5rem; }

.teaser__inner { max-width: 70ch; }

.teaser__text {
  margin: 0;
  font-family: "OpenDyslexic", system-ui, sans-serif;
  color: #000;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  line-height: 1.3;
}

.teaser--yellow { background: #F3EC01; }
.teaser--orange { background: #FDAA02; }
.teaser--coral  { background: #FD6350; }
.teaser--pink   { background: #EE729E; }
.teaser--blue   { background: #74A6FF; }

/* =====================================
   Split Slider – Panel + Image (Full-bleed, iPad-stabil)
===================================== */

.slider-split {
  position: relative;
  width: 100%;
  overflow: visible;
  isolation: isolate; /* fixes stacking edge cases on Safari */

  /* Default Panel */
  --panel-bg: #fff;
  --panel-bg-rgb: 255,255,255;

  /* Höhe (API kann --slider-height setzen) */
  height: var(--slider-height, 60vh);
  min-height: var(--slider-height, 60vh);
}

/* viewport units stabilisieren */
@supports (height: 100svh) {
  .slider-split {
    height: var(--slider-height, 100svh);
    min-height: var(--slider-height, 100svh);
  }
}
@supports (height: 100dvh) {
  .slider-split {
    height: var(--slider-height, 100dvh);
    min-height: var(--slider-height, 100dvh);
  }
}

/* Full-bleed */
.slider-split.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: none;
}

/* Fallback Panel Klassen (wenn nicht per Slide gesetzt) */
.slider-split--panel-white  { --panel-bg: #fff;    --panel-bg-rgb: 255,255,255; }
.slider-split--panel-yellow { --panel-bg: #F3EC01; --panel-bg-rgb: 243,236,1; }
.slider-split--panel-orange { --panel-bg: #FDAA02; --panel-bg-rgb: 253,170,2; }
.slider-split--panel-coral  { --panel-bg: #FD6350; --panel-bg-rgb: 253,99,80; }
.slider-split--panel-pink   { --panel-bg: #EE729E; --panel-bg-rgb: 238,114,158; }
.slider-split--panel-blue   { --panel-bg: #74A6FF; --panel-bg-rgb: 116,166,255; }

/* Height chain */
.slider-split__viewport {
  position: relative;
  width: 100%;
  height: 100%;

  overflow-x: auto; /* no-JS fallback */
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.slider-split__track {
  width: 100%;
  height: 100%;
  will-change: transform;

  display: flex; /* default slide-effect */
}

.slider-split__slide {
  width: 100%;
  min-width: 100%;
  height: 100%;
  scroll-snap-align: start;

  /* Panel-Farbe pro Slide kann hier überschrieben werden:
     <article class="slider-split__slide" style="--panel-bg:...;--panel-bg-rgb:...;"> */
  background: var(--panel-bg);
}

/* Grid */
.slider-split__grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr;
}

/* Left panel */
.slider-split__content {
  position: relative;
  background: var(--panel-bg);
  display: flex;
  align-items: center;
  padding: 4rem 1.5rem;
  z-index: 1;

  min-height: 50%;
}

.slider-split__content-inner {
  max-width: 60ch;
  position: relative;
  z-index: 2;
}

.slider-split__text {
  margin: 0;
  font-family: "OpenDyslexic", system-ui, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 1.3;
  color: #000;
}

/* Optional hero-like text */
.slider-split__title {
  margin: 0;
  font-family: var(--font-headings);
  line-height: var(--line-1);
  font-size: clamp(1.8rem, 3vw, 3rem);
  color: #000;
}
.slider-split__lead {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
  color: rgba(0,0,0,0.85);
  max-width: 60ch;
}
.slider-split__actions { margin-top: 0.75rem; }
.slider-split__content .btn--ghost { border-color: rgba(0,0,0,0.35); color: #000; }

/* Mobile gradient: panel -> image */
.slider-split__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -120px;
  height: 120px;

  background: linear-gradient(
    to bottom,
    rgba(var(--panel-bg-rgb), 1) 0%,
    rgba(var(--panel-bg-rgb), 0.85) 45%,
    rgba(var(--panel-bg-rgb), 0.35) 75%,
    rgba(var(--panel-bg-rgb), 0) 100%
  );

  pointer-events: none;
  z-index: 1;
}

/* Right image */
.slider-split__media {
  background-image: var(--slide-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 50%;
}

/* Desktop split */
@media (min-width: 900px) {
  .slider-split__grid { grid-template-columns: 2fr 3fr; }

  .slider-split__content,
  .slider-split__media { min-height: 100%; }

  .slider-split__content { padding: 4.5rem 3rem; }

  .slider-split__content::after {
    top: 0;
    bottom: 0;
    left: auto;
    right: -160px;
    width: 160px;
    height: auto;

    background: linear-gradient(
      to right,
      rgba(var(--panel-bg-rgb), 1) 0%,
      rgba(var(--panel-bg-rgb), 0.85) 45%,
      rgba(var(--panel-bg-rgb), 0.35) 75%,
      rgba(var(--panel-bg-rgb), 0) 100%
    );
  }
}

/* Controls */
.slider-split__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1rem;

  z-index: 10; /* keep above everything */
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 0.75rem;

  padding: 0 1rem;
  pointer-events: none;
}

.slider-split__btn,
.slider-split__dot { pointer-events: auto; }

.slider-split__btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.25);
  background: rgba(255,255,255,0.9);
  color: #000;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.slider-split__btn span[aria-hidden="true"] {
  font-size: 28px;
  line-height: 1;
}

.slider-split__dots {
  display: inline-flex;
  justify-content: center;
  gap: 0.5rem;
}
.slider-split__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.35);
  background: rgba(255,255,255,0.65);
  cursor: pointer;
}
.slider-split__dot[aria-selected="true"] {
  background: #000;
  border-color: #000;
}

.slider-split__btn:focus-visible,
.slider-split__dot:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .slider-split__track { transition: none !important; }
}

/* -------------------------------------
   Fade effect (default)
------------------------------------- */
.slider-split__viewport[data-effect="fade"] {
  overflow: hidden;
}

.slider-split__viewport[data-effect="fade"] .slider-split__track {
  position: relative;
  display: block; /* no flex */
  height: 100%;
}

.slider-split__viewport[data-effect="fade"] .slider-split__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;

  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease;
}

.slider-split__viewport[data-effect="fade"] .slider-split__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .slider-split__viewport[data-effect="fade"] .slider-split__slide {
    transition: none !important;
  }
}

/* =====================================
   Cards
===================================== */

.card-grid {
  display: grid;
  gap: var(--space-4);
}
.card-grid[data-cols="2"] { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.card-grid[data-cols="3"] { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 700px) {
  .card-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  display: block;
  background: var(--color-surface);
  border: var(--border-1);
  border-radius: var(--radius-2);
  padding: var(--space-5);
  text-decoration: none;
  color: inherit;
}
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.card__title { margin-top: var(--space-2); }
.card p { color: var(--color-text-muted); }

/* =====================================
   Error summary
===================================== */

.error-summary {
  background: var(--color-danger-bg);
  border: 2px solid var(--color-danger);
  border-radius: var(--radius-1);
  padding: var(--space-4);
}
.error-summary h3 { margin-bottom: var(--space-2); }
.error-summary a { color: var(--color-danger); }

/* =====================================
   Form fields
===================================== */

.form-field .hint { color: var(--color-text-muted); font-size: var(--font-size-1); }
.form-field .error { color: var(--color-danger); font-weight: 700; }

/* =====================================
   Slider baseline (card slider)
===================================== */

.slider__viewport { overflow-x: auto; scroll-snap-type: x mandatory; }
.slider__track { display: flex; gap: var(--space-4); padding-bottom: var(--space-2); }
.slider__slide { min-width: min(320px, 80vw); scroll-snap-align: start; }
.slider__controls { margin-top: var(--space-3); display: flex; gap: var(--space-3); }

/* =====================================
   Tabs baseline
===================================== */

.tab-links {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.tab-panel {
  padding: var(--space-4);
  border: var(--border-1);
  border-radius: var(--radius-2);
  background: var(--color-surface);
}

/* =====================================
   Teaser Cards
===================================== */

.teaser-grid__grid {
  display: grid;
  gap: var(--space-5);
}
.teaser-grid__grid[data-cols="1"] { grid-template-columns: 1fr; }
.teaser-grid__grid[data-cols="2"] { grid-template-columns: 1fr; }
.teaser-grid__grid[data-cols="3"] { grid-template-columns: 1fr; }

@media (min-width: 700px) {
  .teaser-grid__grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teaser-grid__grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.teaser-card {
  background: var(--color-surface);
  border: var(--border-1);
  border-radius: var(--radius-2);
  overflow: hidden;
  display: grid;
}

.teaser-card__media img {
  width: 100%;
  height: auto;
  display: block;
}
@media (min-width: 700px) {
  .teaser-card__media img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}

.teaser-card__body { padding: var(--space-5); }

.teaser-card__meta {
  margin: 0;
  font-size: var(--font-size-1);
  color: var(--color-text-muted);
}
.teaser-card__title { margin: 0; }
.teaser-card__text  { margin: 0; color: var(--color-text); }
.teaser-card__actions { margin-top: var(--space-3); }


.page-shell {
  position: relative;
  z-index: var(--z-header);
}

/* =====================================
   Intro Hero
   - tagline top
   - glade above trees
   - trees above logo
   - fixed logo, no JS
===================================== */

.intro-hero.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: none;
}

.intro-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: #000;
  overflow: hidden;

  /* Glade */
  --glade-height: clamp(220px, 34vh, 430px);
  --glade-ellipse-width: 165%;
  --glade-ellipse-height: 78%;
  --glade-ellipse-bottom: 22%;
  --glade-rect-top: calc(var(--glade-ellipse-bottom) + (var(--glade-ellipse-height) * 0.5));

  /* Logo */
  --logo-top: 56px;
}

@media (max-width: 699px) {
  .intro-hero {
    --glade-height: 32vh;
    --glade-ellipse-width: 192%;
    --glade-ellipse-height: 82%;
    --glade-ellipse-bottom: 10%;
    --glade-rect-top: calc(var(--glade-ellipse-bottom) + (var(--glade-ellipse-height) * 0.5));

    --logo-top: 40px;
  }
}

@media (min-width: 700px) and (max-width: 1099px) {
  .intro-hero {
    --glade-height: clamp(250px, 32vh, 460px);
    --glade-ellipse-width: 150%;
    --glade-ellipse-height: 80%;
    --glade-ellipse-bottom: 15%;
    --glade-rect-top: calc(var(--glade-ellipse-bottom) + (var(--glade-ellipse-height) * 0.5));

    --plant-size: clamp(80px, 11vw, 140px);
    --plant-offset-y: 58%;
  }
}

@media (min-width: 1100px) {
  .intro-hero {
    --glade-height: clamp(280px, 34vh, 500px);
    --glade-ellipse-width: 132%;
    --glade-ellipse-height: 74%;
    --glade-ellipse-bottom: 24%;
    --glade-rect-top: calc(var(--glade-ellipse-bottom) + (var(--glade-ellipse-height) * 0.5));

    --plant-size: clamp(100px, 10vw, 180px);
    --plant-offset-y: 55%;
  }
}

@media (orientation: landscape) {
  .intro-hero {
    min-height: 115svh;
  }
}

@media (orientation: landscape) and (min-width: 900px) {
  .intro-hero {
    min-height: 125svh;
  }
}

/* =====================================
   Scene
===================================== */

.intro-hero__scene {
  position: relative;
  min-height: inherit;
}

.intro-hero__base {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
  background: #000;
  animation: introHeroBaseReveal 1.8s ease both;
}

.intro-hero__content {
  position: relative;
  min-height: inherit;
}

.intro-hero__layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.intro-hero__layer--trees {
  z-index: var(--z-hero-trees);
}

/* =====================================
   Trees SVG
===================================== */

.intro-hero__layer > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* =====================================
   Glade
   - above trees
===================================== */

.intro-hero__glade {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--z-hero-glade);
  overflow: hidden;
}

.intro-hero__glade-shape {
  position: relative;
  width: 100%;
  height: var(--glade-height);
}

.intro-hero__glade-shape::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: var(--glade-ellipse-bottom);
  transform: translateX(-50%);

  width: var(--glade-ellipse-width);
  height: var(--glade-ellipse-height);
  border-radius: 50%;
  background: #000;

  animation: introHeroGladeSurfaceReveal 1.8s ease both;
  animation-delay: .65s;
}

.intro-hero__glade-shape::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  top: var(--glade-rect-top);
  background: #000;

  animation: introHeroGladeSurfaceReveal 1.8s ease both;
  animation-delay: .65s;
}


/* =====================================
   Logo
   - fixed like menu button
   - under trees and glade
===================================== */

.intro-hero__logo-slot {
  min-height: 0;
}


.intro-hero__logo {
  position: absolute;
  top: var(--logo-top);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-hero-logo);

  display: flex;
  justify-content: center;
  pointer-events: none;

  opacity: 0;
  animation: introHeroLogoReveal .9s ease both;
  animation-delay: 1.1s;
}

.intro-hero__logo svg {
  width: clamp(220px, 34vw, 520px);
  height: auto;
  display: block;
}

.intro-hero__logo .path-rh,
.intro-hero__logo .path-lh,
.intro-hero__logo .branding-title {
  fill: #fff;
}

.intro-hero__logo .path-rh {
  animation: introHeroLogoRightHandReveal 1.2s ease both;
  animation-delay: 1.05s;
}

.intro-hero__logo .path-lh {
  animation: introHeroLogoLeftHandReveal 1.2s ease both;
  animation-delay: 1.15s;
}

.intro-hero__logo .branding-title {
  animation: introHeroLogoTitleReveal 1.2s ease both;
  animation-delay: 1.35s;
}

/* =====================================
   Tagline
   - top layer
   - vertically centered in glade
===================================== */

.intro-hero__tagline {
  position: absolute;
  left: 50%;
  bottom: calc(var(--glade-height) * 0.5);
  transform: translate(-50%, 50%);

  z-index: var(--z-hero-tagline);

  width: min(720px, 70vw);
  padding: 0 16px;

  line-height: 1.75;
  letter-spacing: 0.01em;
  text-align: center;
  color: #000;

  pointer-events: none;
  opacity: 0;
  animation: introHeroTaglineReveal .9s ease both;
  animation-delay: 1.35s;
}

@media (max-width: 699px) {
  .intro-hero__tagline {
    width: calc(100vw - 32px);
  }
}

@media (min-width: 900px) {
  .intro-hero__tagline {
    width: min(760px, 60vw);
  }
}

/* =====================================
   Trees start state
===================================== */

.intro-hero__layer--trees .trees_green_bright,
.intro-hero__layer--trees .trees_green,
.intro-hero__layer--trees .trees_green_dark {
  fill: #000;
}

/* =====================================
   Trees reveal
===================================== */

.intro-hero__layer--trees .trees_green_bright {
  animation: introHeroTreeBrightReveal 1.8s ease both;
  animation-delay: .35s;
}

.intro-hero__layer--trees .trees_green {
  animation: introHeroTreeMidReveal 1.8s ease both;
  animation-delay: .60s;
}

.intro-hero__layer--trees .trees_green_dark {
  animation: introHeroTreeDarkReveal 1.8s ease both;
  animation-delay: .85s;
}

/* =====================================
   Keyframes
===================================== */

@keyframes introHeroBaseReveal {
  from { background: #000; }
  to   { background: #fff; }
}

@keyframes introHeroGladeSurfaceReveal {
  from { background: #000; }
  to   { background: #fff; }
}

@keyframes introHeroTreeBrightReveal {
  from { fill: #000; }
  to   { fill: #758c07; }
}

@keyframes introHeroTreeMidReveal {
  from { fill: #000; }
  to   { fill: #3b5226; }
}

@keyframes introHeroTreeDarkReveal {
  from { fill: #000; }
  to   { fill: #2a412d; }
}

@keyframes introHeroLogoReveal {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes introHeroTaglineReveal {
  from {
    opacity: 0;
    transform: translate(-50%, calc(50% + 8px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, 50%);
  }
}

@keyframes introHeroPlantReveal {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes introHeroLogoRightHandReveal {
  from { fill: #fff; }
  to   { fill: #90BA4D; }
}

@keyframes introHeroLogoLeftHandReveal {
  from { fill: #fff; }
  to   { fill: #006633; }
}

@keyframes introHeroLogoTitleReveal {
  from { fill: #fff; }
  to   { fill: #000; }
}

/* =====================================
   Reduced motion
===================================== */

@media (prefers-reduced-motion: reduce) {
  .intro-hero__base,
  .intro-hero__glade-shape::before,
  .intro-hero__glade-shape::after,
  .intro-hero__plants,
  .intro-hero__logo,
  .intro-hero__tagline,
  .intro-hero__layer--trees .trees_green_bright,
  .intro-hero__layer--trees .trees_green,
  .intro-hero__layer--trees .trees_green_dark,
  .intro-hero__logo .path-rh,
  .intro-hero__logo .path-lh,
  .intro-hero__logo .branding-title {
    animation: none !important;
  }

  .intro-hero__base {
    background: #fff;
  }

  .intro-hero__glade-shape::before,
  .intro-hero__glade-shape::after {
    background: #fff;
  }

  .intro-hero__plants {
    opacity: 1;
  }

  .intro-hero__plants--left {
    transform: translateY(var(--plant-offset-y)) rotate(-2deg);
  }

  .intro-hero__plants--right {
    transform: translateY(var(--plant-offset-y)) rotate(2deg);
  }

  .intro-hero__plants .plant1,
  .intro-hero__plants .plant2,
  .intro-hero__plants .plant3 {
    fill: #fff;
  }

  .intro-hero__logo {
    opacity: 1;
    transform: translateX(-50%);
  }

  .intro-hero__tagline {
    opacity: 1;
    transform: translate(-50%, 50%);
  }

  .intro-hero__layer--trees .trees_green_bright {
    fill: #758c07;
  }

  .intro-hero__layer--trees .trees_green {
    fill: #3b5226;
  }

  .intro-hero__layer--trees .trees_green_dark {
    fill: #2a412d;
  }

  .intro-hero__logo .path-rh {
    fill: #90BA4D;
  }

  .intro-hero__logo .path-lh {
    fill: #006633;
  }

  .intro-hero__logo .branding-title {
    fill: #000;
  }
}


/* =====================================
   Prose + Aside (Marginalspalte)
===================================== */

.prose-aside__grid {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}
.prose-aside__main { max-width: 75ch; }

.prose-aside__aside {
  border: var(--border-1);
  border-radius: var(--radius-2);
  background: var(--color-surface);
  padding: var(--space-5);
}

.prose-aside__aside-title { margin: 0; }

.prose-aside__block-title {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--font-size-2);
}

.prose-aside__links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.prose-aside__links li + li { margin-top: var(--space-2); }
.prose-aside__text { margin: 0; }

@media (min-width: 900px) {
  .prose-aside__grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .prose-aside__aside { position: sticky; top: 88px; }
}

/* =====================================
   Forms (Components)
===================================== */

.form {
  width: 100%;
}

/* Form field wrapper */
.form-field {
  width: 100%;
}

/* Label + Controls */
.form-field > label {
  display: block;
  font-weight: 700;
  line-height: 1.2;
}

/* Hint + Error */
.form-field .hint {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-1);
}

.form-field .error {
  margin: 0;
  color: var(--color-danger);
  font-weight: 700;
  font-size: var(--font-size-1);
}

/* Inputs: du hast in base.css schon width:100% + padding.
   Hier ergänzen wir nur „polish“ + focus + states */
.form-field input,
.form-field textarea,
.form-field select {
  border: var(--border-1);
  border-radius: var(--radius-1);
}

.form-field input:focus-visible,
.form-field textarea:focus-visible,
.form-field select:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* Error state (wenn aria-invalid) */
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"],
.form-field select[aria-invalid="true"] {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.15);
}

/* Fieldsets */
fieldset {
  border: var(--border-1);
  border-radius: var(--radius-2);
  padding: var(--space-4);
  margin: 0;
}

legend {
  font-weight: 800;
  padding: 0 var(--space-2);
}

/* Choice rows (radio/checkbox sauber nebeneinander)
   -> verhindert „Riesen-Abstand“ und width:100% Problem */
.form-choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

.form-choice input[type="radio"],
.form-choice input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}

/* Labeltext nicht brechen lassen, aber darf umbrechen wenn nötig */
.form-choice span {
  display: inline;
}

/* Wenn du in Settings Drawer die Labels bereits als flex setzt:
   sicherstellen, dass Inputs NICHT width:100% erben */
.settings__group input[type="radio"],
.settings__group input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
}

.settings__header{
  height: calc(44px + (var(--header-edge) * 2));
  display: flex;
  align-items: center;
  padding-top: var(--header-edge);
  padding-left: 1.25rem; /* normaler Panel-Rand */
  padding-right: 1.25rem;
  margin-bottom: 1.5rem;
}

.settings__title{
  margin: 0;
}

/* Error summary */
.error-summary {
  border: 2px solid var(--color-danger);
  background: var(--color-danger-bg);
  border-radius: var(--radius-2);
  padding: var(--space-4);
}

.error-summary h3 {
  margin: 0 0 var(--space-2) 0;
}

.error-summary ul {
  margin: 0;
  padding-left: 1.25rem;
}

.error-summary a {
  color: var(--color-danger);
  font-weight: 700;
  text-decoration-thickness: 2px;
}

/* =====================================
   sucess notice
===================================== */

.notice--toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;

  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 10px;

  background: #F3EC01;
  color: #000;
  border: 1px solid rgba(0,0,0,0.2);

  /* Startzustand */
  opacity: 0;
  transform: translateX(120%);
  pointer-events: none;

  /* Animation: rein -> kurz bleiben -> raus */
  animation: toast-in-out 3.2s ease forwards;
}

@keyframes toast-in-out {
  0%   { opacity: 0; transform: translateX(120%); }
  12%  { opacity: 1; transform: translateX(0); }
  80%  { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  .notice--toast {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* =====================================
   Footer
===================================== */

.site-footer {
  border-top: var(--border-1);
  padding-block: var(--space-6);
}
.site-footer .meta { max-width: 70ch; }