/* ==========================================================================
   VISIONS – Stylesheet
   Mobile first: Basis-Styles gelten für kleine Bildschirme,
   Erweiterungen folgen per min-width Media Queries.
   ========================================================================== */

/* ---------- Schriften (selbst gehostet, kein externer Dienst) ----------
   Hinweis: Chrome und Firefox laden Schriften nicht, wenn die Seite per
   Doppelklick (file://) geöffnet wird. Lokal deshalb über „Live Server“ ansehen. */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* TODO: Atkinson Hyperlegible Bold & Italic ergänzen (OFL, kostenlos),
   bis dahin erzeugt der Browser Fett/Kursiv synthetisch. */
@font-face {
  font-family: "Bellota Text";
  src: url("../fonts/bellota-text-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bellota Text";
  src: url("../fonts/bellota-text-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Designtokens ---------- */
:root {
  /* Markenfarben laut Brandbook */
  --lila: #554596;
  --rosa: #f1d8e3;
  --gruen: #337f5f;
  --orange: #ec6726;

  /* Abstufungen (erlaubt laut Brandbook) */
  --lila-70: #8879b6;
  --lila-30: #ccc7e0;
  --rosa-50: #f8ecf1;
  --rosa-30: #fbf4f7;
  --gruen-dunkel: #2a664b;
  --orange-text: #c94f12; /* dunklere Stufe des Markenorange für Text */

  /* Text */
  --text: #1f1a33;
  --text-hell: #ffffff;

  /* Typografie */
  --font-text: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Bellota Text", Georgia, serif;

  /* Fluide Schriftgrößen: min, bevorzugt, max */
  --fs-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-small: 0.9375rem;
  --fs-h1: clamp(2.25rem, 1.4rem + 4vw, 4.25rem);
  --fs-h2: clamp(1.875rem, 1.4rem + 2vw, 2.875rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-stat: clamp(3rem, 2rem + 5vw, 5.5rem);

  /* Abstände */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: clamp(2rem, 1.5rem + 2vw, 3rem);
  --space-xl: clamp(3.5rem, 2.5rem + 5vw, 7rem);

  --container: 72rem;
  --container-text: 42rem;
  --radius: 1rem;
  --header-h: 4.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text);
  background: #fff;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  color: var(--lila);
  margin: 0 0 var(--space-s);
  text-wrap: balance;
  hyphens: manual;
}

h1 { font-size: var(--fs-h1); line-height: 1.05; }
h2 { font-size: var(--fs-h2); line-height: 1.1; }
h3 { font-size: var(--fs-h3); }

p {
  margin: 0 0 var(--space-s);
  max-width: var(--container-text);
  hyphens: auto;
  text-wrap: pretty;
}

ul { padding-left: 1.25rem; }

strong { font-weight: 700; }

a {
  color: var(--lila);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

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

address { font-style: normal; }

/* Nur für Screenreader sichtbar */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Sprunglink zum Inhalt */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--lila);
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Layout-Helfer ---------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-xl);
  position: relative;
}

.section--rosa { background: var(--rosa-30); }
.section--rosa-kraeftig { background: var(--rosa); }
.section--lila { background: var(--lila); color: var(--text-hell); }
.section--lila h2,
.section--lila h3 { color: var(--text-hell); }
.section--lila a { color: var(--text-hell); }

.kicker {
  display: block;
  font-family: var(--font-text);
  /* Fett und 19 px gilt als „großer Text“: dafür reicht Kontrast 3 : 1.
     Das Original-Orange erreicht auf den hellen Rosa-Flächen nur knapp 3 : 1 bzw. darunter,
     deshalb eine minimal dunklere Stufe des Markenorange. */
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--orange-text);
  margin-bottom: var(--space-xs);
}

.section--lila .kicker { color: var(--rosa); }

.lead {
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.4375rem);
  line-height: 1.45;
}

/* Wellen-Übergänge (organische Gestaltungselemente laut Brandbook) */
.wave {
  display: block;
  width: 100%;
  height: clamp(2.5rem, 6vw, 5.5rem);
  margin-bottom: -1px;
}

.wave--flip {
  transform: scaleY(-1);
  margin-top: -1px;
  margin-bottom: 0;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  padding: 0.65rem 1.4rem;
  border: 2px solid var(--lila);
  border-radius: 999px;
  background: var(--lila);
  color: #fff;
  font: 700 1rem/1.2 var(--font-text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.button:hover {
  background: #44377a;
  border-color: #44377a;
}

.button--outline {
  background: transparent;
  color: var(--lila);
}

.button--outline:hover {
  background: var(--lila);
  color: #fff;
}

.section--lila .button {
  background: #fff;
  border-color: #fff;
  color: var(--lila);
}

.section--lila .button:hover {
  background: var(--rosa);
  border-color: var(--rosa);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin-top: var(--space-m);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rosa);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  min-height: var(--header-h);
  flex-wrap: wrap;
}

.logo {
  display: block;
  flex-shrink: 0;
}

.logo img {
  width: clamp(8.5rem, 7rem + 5vw, 11rem);
}

.nav-toggle {
  display: none; /* nur mit JS sichtbar, siehe unten */
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--lila);
  border-radius: 999px;
  background: transparent;
  color: var(--lila);
  font: 400 1rem/1 var(--font-text);
  cursor: pointer;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s;
}

.nav-toggle__icon { position: relative; }
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  width: 100%;
  padding-bottom: var(--space-s);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.6rem 0.25rem;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 400;
  text-decoration: none;
  border-radius: 0.5rem;
}

.site-nav a:hover {
  color: var(--lila);
  text-decoration: underline;
}

/* Sprachumschalter: zwei Buttons, aktuelle Sprache ist gefüllt */
.site-nav .lang-switch {
  display: flex;
  gap: 0;
  margin-top: 0.5rem;
}

.site-nav .lang-switch a {
  display: inline-grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.25rem;
  padding: 0.25rem 0.6rem;
  border: 1.5px solid var(--lila);
  color: var(--lila);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.site-nav .lang-switch a:first-of-type { border-radius: 999px 0 0 999px; }
.site-nav .lang-switch a:last-of-type { border-radius: 0 999px 999px 0; margin-left: -1.5px; }

.site-nav .lang-switch a:hover {
  background: var(--rosa-50);
  text-decoration: none;
}

.site-nav .lang-switch a[aria-current="page"] {
  background: var(--lila);
  color: #fff;
  font-weight: 700;
}

.site-nav .nav-cta a {
  display: inline-flex;
  margin-top: 0.5rem;
  padding: 0.4rem 1.1rem;
  border: 1.5px solid var(--lila);
  color: var(--lila);
  border-radius: 999px;
}

.site-nav .nav-cta a:hover {
  background: var(--lila);
  color: #fff;
  text-decoration: none;
}

/* Mit JavaScript: mobiles Menü ein-/ausklappbar */
.js .nav-toggle { display: inline-flex; }
.js .site-nav[data-open="false"] { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: var(--rosa-30);
  padding-top: var(--space-l);
  overflow: hidden;
  position: relative;
}

.hero__inner {
  display: grid;
  gap: var(--space-l);
  align-items: center;
}

.hero h1 {
  margin-bottom: var(--space-m);
}

.hero__image {
  width: min(80%, 30rem);
  justify-self: center;
}

/* ---------- Ausgangslage / Zahlen ---------- */
.stats {
  display: grid;
  gap: var(--space-l);
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  margin: 0;
}

/* Organische orange Flecken, angelehnt an die Gestaltungselemente im Brandbook */
.stat {
  display: grid;
  place-content: center;
  gap: 0.35rem;
  width: min(85%, 19rem);
  aspect-ratio: 1 / 0.95;
  margin: 0;
  padding: 2rem 2.25rem;
  text-align: center;
  color: #fff;
  background: var(--orange);
  border-radius: 58% 42% 55% 45% / 47% 58% 42% 53%;
}

/* zweiter Fleck: breiter und deutlich unregelmäßiger */
.stat--nebel {
  align-self: flex-end;
  aspect-ratio: 1.25 / 1;
  border-radius: 30% 70% 62% 38% / 38% 30% 70% 62%;
}

.stat dt {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.8rem + 3vw, 3.75rem);
  line-height: 1;
}

.stat__zahl {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Fett und mind. 19 px: gilt als großer Text, Weiß auf Orange (3,2 : 1) erfüllt damit WCAG AA */
.stat dd {
  margin: 0;
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.35;
}

@media (prefers-reduced-motion: no-preference) {
  /* Flecken verändern ihre Form ganz langsam */
  .stat { animation: fleck-a 14s ease-in-out infinite alternate; }
  .stat--nebel { animation-name: fleck-b; animation-duration: 17s; }

  /* 7,7 Mio.: Fleck und Zahl wachsen beim Scrollen ein wenig mit.
     --p kommt aus main.js (0 = Fleck kommt unten ins Bild, ca. 0,5 = Bildmitte) */
  .stat--zaehlen {
    transform: scale(calc(0.82 + clamp(0, (var(--p) - 0.1) * 0.65, 0.26)));
    transition: transform 0.35s ease-out;
    will-change: transform;
  }

  /* < 10 %: erscheint langsam aus dem Nebel */
  .js .stat--nebel dt,
  .js .stat--nebel dd {
    opacity: 0;
    filter: blur(14px);
    transform: scale(1.06);
    transition: opacity 1.2s ease-out, filter 1.5s ease-out, transform 1.5s ease-out;
  }

  .js .stat--nebel dd { transition-delay: 0.35s; }

  .js .stat--nebel.is-visible dt,
  .js .stat--nebel.is-visible dd {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

@keyframes fleck-a {
  from { border-radius: 58% 42% 55% 45% / 47% 58% 42% 53%; }
  to { border-radius: 46% 54% 44% 56% / 56% 46% 54% 44%; }
}

@keyframes fleck-b {
  from { border-radius: 30% 70% 62% 38% / 38% 30% 70% 62%; }
  to { border-radius: 42% 58% 70% 30% / 30% 44% 56% 70%; }
}

/* ---------- Lösung ---------- */
.solution {
  display: grid;
  gap: var(--space-l);
  align-items: center;
}

.solution__image {
  width: min(85%, 28rem);
  justify-self: center;
}

/* App-Einblicke */
.screens {
  margin-top: var(--space-xl);
}

.screens__intro {
  margin-bottom: var(--space-l);
}

/* Karussell: ohne JavaScript ein wischbarer, horizontal scrollender Streifen */
.carousel {
  position: relative;
}

.carousel__track {
  list-style: none;
  /* Innenabstand, damit der Schlagschatten nicht abgeschnitten wird;
     die negativen Außenabstände halten die Bilder bündig mit dem Text */
  --track-pad: 1.25rem; /* = Seitenrand auf dem Handy */
  margin: -1rem calc(var(--track-pad) * -1) 0;
  padding: 1.25rem var(--track-pad) 2.5rem;
  scroll-padding-inline: var(--track-pad);
  /* weiche Ränder links und rechts statt harter Kante */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--track-pad), #000 calc(100% - var(--track-pad)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--track-pad), #000 calc(100% - var(--track-pad)), transparent);
  display: flex;
  gap: var(--space-m);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--lila-30) transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .carousel__track { scroll-behavior: smooth; }
}

.carousel__track:focus-visible {
  outline-offset: 6px;
}

.carousel__slide {
  flex: 0 0 88%;
  scroll-snap-align: start;
  transition: opacity 0.4s;
}

.js .carousel__track { scrollbar-width: none; }
.js .carousel__track::-webkit-scrollbar { display: none; }

/* nicht aktive Ansichten leicht zurücknehmen */
.js .carousel__slide:not(.is-active) { opacity: 0.45; }

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  margin-top: var(--space-xs);
}

.carousel__controls[hidden] { display: none; }

.carousel__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid var(--lila);
  border-radius: 50%;
  background: #fff;
  color: var(--lila);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.carousel__btn:hover:not(:disabled) {
  background: var(--lila);
  color: #fff;
}

.carousel__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel__dots {
  display: flex;
  gap: 0.5rem;
}

.carousel__dot {
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border: 1.5px solid var(--lila);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: width 0.3s, background-color 0.3s;
  /* größere Klickfläche ohne größeren Punkt */
  position: relative;
}

.carousel__dot::after {
  content: "";
  position: absolute;
  inset: -0.6rem -0.3rem;
}

.carousel__dot[aria-current="true"] {
  width: 1.75rem;
  background: var(--lila);
}

.carousel__count {
  margin: 0;
  min-width: 3.5rem;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--lila);
  font-variant-numeric: tabular-nums;
}

.screen {
  margin: 0;
}

.screen__frame {
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 1px var(--lila-30),
    0 0.75rem 2rem -0.75rem rgb(85 69 150 / 0.35);
}

.screen figcaption {
  margin-top: var(--space-s);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.screen figcaption strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.1875rem;
  color: var(--lila);
  margin-bottom: 0.15rem;
}

/* Haltung / Zitat */
.statement {
  margin: 0;
  max-width: 64rem;
  margin-inline: auto;
  display: grid;
  gap: var(--space-l);
  align-items: center;
}

.statement__image {
  width: min(85%, 22rem);
  overflow: visible;
  justify-self: center;
}

.statement blockquote {
  margin: 0;
}

.statement blockquote p {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem);
  line-height: 1.35;
  max-width: none;
  hyphens: manual;
}

.statement blockquote p + p {
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.55;
}

/* ---------- Unterstützen ---------- */
.support {
  display: grid;
  gap: var(--space-l);
  align-items: center;
}

.support__image {
  width: min(60%, 20rem);
  justify-self: center;
}

.support-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: var(--space-m) 0 0;
}

.support-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.support-list li::before {
  content: "";
  flex: 0 0 0.75rem;
  height: 0.75rem;
  margin-top: 0.5em;
  border-radius: 50%;
  background: var(--gruen);
}

/* ---------- Über uns ---------- */
.about {
  display: grid;
  gap: var(--space-l);
  align-items: center;
}

.about__photo {
  margin: 0;
}

.about__photo img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- Kontakt ---------- */
.contact {
  display: grid;
  gap: var(--space-l);
  align-items: center;
}

.contact__image {
  width: min(52%, 12.75rem);
  overflow: visible;
  justify-self: center;
}

.contact address {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  margin-bottom: var(--space-m);
}

/* E-Mail mit Brief-Icon davor; der ganze Block ist der Link */
.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem);
  font-family: var(--font-head);
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
}

.contact__mail span {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.contact__mail:hover span {
  text-decoration-thickness: 0.14em;
}

.contact__mail-icon {
  flex: 0 0 auto;
  width: 3.2em;
  height: auto;
  margin-left: -0.45em; /* die Bewegungslinien stehen links etwas über */
}

@media (prefers-reduced-motion: no-preference) {
  .contact__mail-icon { transition: transform 0.3s ease-out; }
  .contact__mail:hover .contact__mail-icon,
  .contact__mail:focus-visible .contact__mail-icon { transform: translateX(0.25em) rotate(-4deg); }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--lila);
  color: #fff;
}


.site-footer__inner {
  padding-block: var(--space-l) var(--space-l);
}

.site-footer h2 {
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-text);
  margin-bottom: var(--space-m);
}

.partner-list {
  list-style: none;
  margin: 0 0 var(--space-l);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-l) clamp(2rem, 5vw, 4.5rem);
}

.partner-list img {
  height: clamp(2.5rem, 2rem + 1.5vw, 3.25rem);
  width: auto;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s) var(--space-l);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-m);
  border-top: 1px solid rgb(255 255 255 / 0.3);
  font-size: var(--fs-small);
}

.footer-bottom ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  margin: 0;
  padding: 0;
}

.footer-bottom a { color: #fff; }

.footer-bottom p { margin: 0; }

/* ---------- Rechtstexte (Impressum, Datenschutz) ---------- */
.legal {
  padding-block: var(--space-l) var(--space-xl);
}

.legal h1 { font-size: var(--fs-h2); }
.legal h2 { font-size: var(--fs-h3); margin-top: var(--space-l); }

.placeholder {
  padding: var(--space-m);
  border: 2px dashed var(--orange);
  border-radius: var(--radius);
  background: var(--rosa-30);
  max-width: var(--container-text);
}

/* ==========================================================================
   Ab Tablet (ca. 600px)
   ========================================================================== */
@media (min-width: 37.5em) {
  .carousel__slide { flex-basis: 80%; }

  .statement {
    grid-template-columns: minmax(14rem, 2fr) 3fr;
  }

  .statement__image { width: 100%; max-width: 26rem; }

  .contact {
    grid-template-columns: 12.75rem 1fr;
  }

  .contact__image { width: 100%; }
}

/* ==========================================================================
   Ab Desktop (ca. 960px)
   ========================================================================== */
@media (min-width: 60em) {
  /* Navigation horizontal, Menü-Button ausblenden */
  .js .nav-toggle { display: none; }
  .js .site-nav[data-open="false"],
  .site-nav {
    display: block;
    width: auto;
    padding-bottom: 0;
  }

  .site-header__inner { flex-wrap: nowrap; }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
  }

  .site-nav a { font-size: 0.9375rem; }
  .site-nav .lang-switch a { font-size: 0.8125rem; min-height: 2rem; min-width: 2.5rem; }

  .site-nav .nav-cta a { margin-top: 0; }

  .site-nav .lang-switch { margin-top: 0; }

  .hero__inner {
    grid-template-columns: 1.05fr 1fr;
  }

  .hero__image { width: 100%; max-width: 34rem; }

  .stats {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }

  .stat-list { padding-top: var(--space-m); }
  .stat { width: 18rem; }
  .stat--nebel { width: 21rem; }
  .stat--nebel { margin-top: -3rem; margin-right: 1rem; }

  .solution {
    grid-template-columns: 1.2fr 1fr;
  }

  .support {
    grid-template-columns: 1fr 1.4fr;
  }

  .support__image { width: 100%; max-width: 22rem; }

  .about {
    grid-template-columns: 1fr 1fr;
  }

  .contact {
    grid-template-columns: 16rem 1fr;
    max-width: 52rem;
    margin-inline: auto;
  }
}

/* Ab hier ist neben dem Inhalt genug Platz für einen breiteren Schatten-Rand */
@media (min-width: 76em) {
  .carousel__track { --track-pad: 2rem; }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Druck ---------- */
@media print {
  .site-header,
  .wave,
  .nav-toggle { display: none !important; }

  .section { padding-block: 1.5rem; }
  .section--lila { background: none; color: #000; }
  .section--lila h2 { color: #000; }
  a[href^="mailto"]::after { content: " (" attr(href) ")"; }
}

/* ---------- Kleine Helfer ---------- */
.mt-m { margin-top: var(--space-m); }

/* ==========================================================================
   Titel-Illustration: Scroll-Animationen
   Die Gegenstände bewegen sich abhängig von der Scrollposition.
   JavaScript setzt dafür --p (0 bis 1) und --w (Pendelwert -1 bis 1).
   Drehpunkte sind in Koordinaten der Illustration angegeben.
   ========================================================================== */
.hero-illu {
  --p: 0;
  --w: 0;
  overflow: visible;
}

.hero-illu .anim {
  transform-box: view-box;
  transition: transform 0.35s ease-out;
}

/* Lupe hebt sich */
.hero-illu .anim-lupe {
  transform-origin: 125px 1165px;
  transform: rotate(calc(var(--p) * -16deg));
}

/* Herz wächst */
.hero-illu .anim-herz {
  transform-origin: 493px 1299px;
  transform: scale(calc(1 + var(--p) * 0.3)) rotate(calc(var(--w) * 6deg));
}

/* Laptop wird angehoben und kippt leicht */
.hero-illu .anim-laptop {
  transform-origin: 380px 1450px;
  transform: translateY(calc(var(--p) * -14px)) rotate(calc(var(--p) * -5deg));
}

/* Waage pendelt */
.hero-illu .anim-waage {
  transform-origin: 235px 1625px;
  transform: rotate(calc(var(--w) * 8deg));
}

/* Paragraph dreht sich */
.hero-illu .anim-para {
  transform-origin: 650px 1655px;
  transform: rotate(calc(var(--p) * 28deg)) scale(calc(1 + var(--p) * 0.2));
}

/* Klemmbrett kippt */
.hero-illu .anim-klemmbrett {
  transform-origin: 655px 1593px;
  transform: rotate(calc(var(--p) * -8deg));
}

/* Zelt hüpft */
.hero-illu .anim-zelt {
  transform-origin: 809px 1326px;
  transform: translateY(calc(var(--w) * -10px)) scale(calc(1 + var(--p) * 0.25));
}

/* Kleiner Auftritt beim Laden der Seite */
@media (prefers-reduced-motion: no-preference) {
  .hero-illu .anim {
    animation: illu-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
  .hero-illu .anim-lupe { animation-delay: 0.15s; }
  .hero-illu .anim-herz { animation-delay: 0.3s; }
  .hero-illu .anim-laptop { animation-delay: 0.45s; }
  .hero-illu .anim-waage { animation-delay: 0.6s; }
  .hero-illu .anim-klemmbrett { animation-delay: 0.75s; }
  .hero-illu .anim-para { animation-delay: 0.9s; }
  .hero-illu .anim-zelt { animation-delay: 1.05s; }
}

@keyframes illu-pop {
  from { scale: 0.6; opacity: 0; }
  to { scale: 1; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-illu .anim { transform: none !important; }
}

/* ==========================================================================
   Weitere Illustrationen: Scroll- und Einblend-Animationen
   JavaScript setzt auf jedem [data-scroll-anim]-Element:
     --p  Fortschritt, während die Illustration durchs Bild läuft (0–1)
     --w  Pendelwert (-1 bis 1)
     --l  „Puls“ (0–1–0)
   und vergibt .is-visible, sobald eine [data-reveal]-Illustration sichtbar wird.
   ========================================================================== */
[data-scroll-anim] {
  --p: 0;
  --w: 0;
  --l: 0;
}

[data-scroll-anim] .anim {
  transform-box: view-box;
  transition: transform 0.35s ease-out;
}

/* --- Beratung: Sprechblase wächst; beim Scrollen schwingt ihre Kontur wie eine Tonwelle (siehe JS) --- */
.illu-beratung { overflow: visible; }

.illu-beratung .anim-blase {
  transform-origin: 7880px 318px;
  transform: scale(min(1, calc(0.55 + var(--p) * 1.5)));
}

/* --- Fernrohr: Figur schwenkt suchend, Linse wird oval und wieder rund --- */
.illu-fernrohr { overflow: visible; }

.illu-fernrohr .anim-fernrohr {
  transform-origin: 250px 600px;
  transform: rotate(calc(var(--w) * 4deg));
}

.illu-fernrohr .anim-linse {
  transform-box: fill-box;
  transform-origin: center;
  transform: scaleX(calc(1 - var(--l) * 0.45));
  transition: transform 0.35s ease-out;
}

/* --- Ärztin: senkt den Arm beim Runterscrollen und hebt ihn beim Hochscrollen wieder ---
   Ab --p 0,15 beginnt die Bewegung, bei --p 0,5 (Illustration in Bildmitte) zeigt der Arm
   ganz nach unten auf die Kontaktdaten (14°). */
.illu-aerztin .anim-arm {
  transform-box: view-box;
  transform-origin: 9394px 294px;
  transform: rotate(calc(clamp(0, (var(--p) - 0.15) * 2.86, 1) * 14deg));
}

/* --- Hand: Figur plumpst in die Hand --- */
.illu-hand .anim-figur,
.illu-hand .anim-hand {
  transform-origin: 11880px 489px;
}

@media (prefers-reduced-motion: no-preference) {
  /* Vor dem Erscheinen ist die Figur unsichtbar (nur mit JavaScript) */
  .js .illu-hand:not(.is-visible) .anim-figur { opacity: 0; }

  /* erst plumpsen, danach ab und zu gemütlich zurechtruckeln */
  .illu-hand.is-visible .anim-figur {
    animation:
      plumpsen 1.4s 0.2s both,
      gemuetlich 6.5s ease-in-out 2.4s infinite;
  }

  .illu-hand.is-visible .anim-hand {
    animation: hand-federn 1.4s 0.2s both;
  }
}

@keyframes plumpsen {
  0% { transform: translateY(-380px); opacity: 0; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  12% { opacity: 1; }
  50% { transform: translateY(0) scale(1.12, 0.82); animation-timing-function: ease-out; }
  66% { transform: translateY(-55px) scale(0.96, 1.06); animation-timing-function: ease-in; }
  80% { transform: translateY(0) scale(1.05, 0.93); animation-timing-function: ease-out; }
  90% { transform: translateY(-10px) scale(1, 1); animation-timing-function: ease-in; }
  100% { transform: translateY(0) scale(1, 1); opacity: 1; }
}

/* nutzt "rotate" statt "transform", damit es sich nicht mit dem Plumpsen überschneidet */
@keyframes gemuetlich {
  0%, 72%, 100% { rotate: 0deg; }
  77% { rotate: -3deg; }
  82% { rotate: 2.5deg; }
  87% { rotate: -1.5deg; }
  92% { rotate: 0.8deg; }
}

@keyframes hand-federn {
  0%, 48% { transform: translateY(0); }
  55% { transform: translateY(16px) rotate(1deg); }
  70% { transform: translateY(-4px); }
  82% { transform: translateY(5px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  [data-scroll-anim] .anim,
  [data-scroll-anim] .anim-linse { transform: none !important; filter: none !important; }
}
