/* Schwimmschule Ermes – Stylesheet
   Keine Abhängigkeiten, kein Build-Prozess. */

@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/albert-sans-latin-wght-normal.woff2") format("woff2");
}

/* Überschriften: Fraunces – weiche, leicht unregelmäßige Serifenschrift (SIL OFL).
   Auf den einen verwendeten Schnitt festgelegt (wght 560, opsz 96, SOFT 100, WONK 1)
   und auf lateinische Zeichen reduziert: ca. 17 KB statt 121 KB. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 560;
  font-display: swap;
  src: url("../fonts/fraunces-display-560-latin.woff2") format("woff2");
}

:root {
  /* Farben */
  --tile: #f5f9fa;          /* Seitenhintergrund: helles Kachelweiß */
  --white: #ffffff;
  --ink: #0f3346;           /* Text: tiefes Beckenblau */
  --muted: #476273;         /* Sekundärtext */
  --blue: #006fa3;          /* Aktionen, Links (AA-Kontrast) */
  --blue-hover: #005a86;
  --logo: #01a4e7;          /* Logo-Blau, nur für Grafik */
  --logo-light: #80cef2;    /* Logo-Hellblau, nur für Grafik */
  --water: rgba(1, 164, 231, 0.13);
  --water-solid: #d5edf7;     /* gleiche Farbe wie --water auf dem Seitenhintergrund, aber deckend */
  --line: #d6e5eb;
  --band: #e9f1f4;           /* Hintergrund Erfahrungen, Flächen der Karte */
  --line-strong: #b9cfd8;
  --deep: #0b3a56;

  /* Typografie: eine Schriftfamilie, zwei Schnitte (400/600), eine Skala */
  --font: "Albert Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --fs-caption: 0.8125rem;
  --fs-small: 0.9375rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.1875rem, 1.1rem + 0.35vw, 1.3125rem);
  --fs-h2: clamp(1.9rem, 1.3rem + 2.4vw, 2.75rem);
  --fs-h1: clamp(2.4rem, 1.2rem + 4.6vw, 4.35rem);

  /* Layout */
  --max: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --space: clamp(5rem, 3rem + 7.5vw, 10rem);

  /* Glas: gleiche Form, Kante und Schatten für alle Glaselemente */
  --glass-radius: 1.5rem;
  --glass-edge:
    inset 0 0 0 1px rgba(255, 255, 255, 0.8),
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -1px 2px rgba(15, 51, 70, 0.05);
  --header-h: 3.75rem;

  /* Wasseroberfläche und Ball im Hero */
  --surface-h: 72px;
}

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

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

body {
  margin: 0;
  background: var(--tile);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1, h2, .phone-big {
  font-family: var(--font-display);
  font-weight: 560;
  letter-spacing: -0.015em;
}
h1 { font-size: var(--fs-h1); line-height: 1.02; }
h2 { font-size: var(--fs-h2); margin-bottom: 1.25rem; }
h3 { font-size: var(--fs-body); line-height: 1.4; letter-spacing: 0; margin-bottom: 0.25rem; }

p { text-wrap: pretty; }
p + p { margin-top: 1rem; }

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

strong { font-weight: 600; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 40rem;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 0.5rem;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; color: var(--white); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.1rem;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-hover); color: var(--white); }

/* Hero-Button: größer, direkt am Text */
.btn--hero {
  min-height: 3.6rem;
  padding: 0.85rem 1.9rem 0.85rem 1.6rem;
  font-size: var(--fs-lead);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.btn--hero .icon { width: 1.25em; height: 1.25em; }
/* schmale Bildschirme: bewusst zweizeilig statt zufälligem Umbruch */
@media (max-width: 29.99em) {
  .btn--hero { padding-block: 0.7rem; }
  .btn__text { display: flex; flex-direction: column; line-height: 1.15; }
  .btn__label { font-size: var(--fs-small); font-weight: 600; opacity: 0.9; }
  .btn__dash { display: none; }
}

.btn--small { min-height: 2.6rem; padding: 0.5rem 1.1rem; font-size: var(--fs-small); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}

/* Glas: nur die Kopfleiste (mattes Glas, feine Kante statt Schatten) */
.glass {
  --glass-tint: rgba(255, 255, 255, 0.5);
  position: relative;
  isolation: isolate;
  border-radius: var(--glass-radius);
  border: 1px solid var(--line);
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(252, 253, 254, 0.9);
  pointer-events: none;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  /* Feste Werte statt CSS-Variablen: Safari ignoriert var() in backdrop-filter */
  .glass::before {
    background: var(--glass-tint);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
  }
  .site-header__inner.glass::before {
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass::before {
    background: var(--white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Header: schwebende Glasleiste */
.site-header {
  position: sticky;
  top: 0.625rem;
  z-index: 50;
  margin-top: 0.625rem;
}

.site-header__inner {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding: 0 0.4rem 0 1.1rem;
  /* etwas dichteres Glas, damit die Navigation über Text lesbar bleibt */
  --glass-tint: rgba(250, 252, 253, 0.62);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }

.brand__mark {
  width: 2.7rem;
  height: 1.52rem;
  flex: none;
}

.brand__name {
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 22.5em) {
  .brand__name { white-space: normal; }
}

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

.site-nav ul a {
  color: var(--ink);
  text-decoration: none;
}
.site-nav ul a:hover { color: var(--blue); }

.header-call,
.nav-toggle { display: none; }

/* Ohne JavaScript: Navigation einfach umbrechen */
html:not(.js) .site-header { position: static; }
html:not(.js) .site-header__inner { padding: 0.5rem 1.25rem; }
html:not(.js) .site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-basis: 100%;
  padding-bottom: 1rem;
}

@media (max-width: 59.99em) {
  .js .header-call {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: auto;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
  }
  .js .header-call:hover { background: var(--blue-hover); color: var(--white); }

  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.75rem;
    padding: 0 1rem;
    border: 1.5px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    font-size: var(--fs-small);
    cursor: pointer;
  }

  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    display: block;
    width: 1rem;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
  }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before,
  .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -5px; }
  .nav-toggle__bars::after { top: 5px; }

  .nav-open .nav-toggle__bars { background: transparent; }
  .nav-open .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
  .nav-open .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

  .js .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    background: #fafcfd;
    border: 1px solid var(--line);
    border-radius: 1.5rem;
  }
  .js.nav-open .site-nav { display: block; }

  .js .site-nav ul { display: block; margin-bottom: 1.25rem; }
  .js .site-nav ul a {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-lead);
  }
  .js .site-nav .btn { width: 100%; justify-content: center; min-height: 3.1rem; font-size: var(--fs-body); }
}

@media (min-width: 60em) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
  }
  html:not(.js) .site-nav { flex-basis: auto; padding-bottom: 0; }
}

@media (max-width: 59.99em) {
  .js .site-header__inner { flex-wrap: nowrap; gap: 0.6rem; }
}

@media (max-width: 30em) {
  .brand { gap: 0.55rem; }
  .brand__mark { width: 2.4rem; height: 1.35rem; }
  .js .nav-toggle { width: 2.75rem; padding: 0; justify-content: center; }
  .nav-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Hero */
.hero {
  position: relative;
  z-index: 0; /* eigener Stapelkontext: Ball liegt hinter dem Wasser */
  overflow: hidden; /* Wellenringe dürfen nicht seitlich überstehen */
}

.hero__air {
  padding-top: clamp(3.5rem, 2rem + 6vw, 7rem);
  padding-bottom: clamp(3rem, 2rem + 3vw, 4.5rem);
}

.hero__air h1 { max-width: 16ch; }
@media (min-width: 60em) {
  /* breit genug für zwei Zeilen: "Seepferdchen-Schwimmkurse / für Kinder im Münsterland" */
  .hero__air h1 { max-width: 15em; }
}

.hero__lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 34rem;
  margin-top: 1.5rem;
  color: var(--ink);
}

/* Wasser: eine Fläche mit gewellter Oberkante (clip-path), darüber die Oberflächenlinie.
   Der Ball liegt dahinter und wirkt dadurch unterhalb der Linie leicht eingetaucht. */
.water { position: relative; }

/* Kontakt: deckendes Wasser. Oben liegt es teils über dem graublauen Abschnitt davor –
   halbtransparent entstünde dort eine harte Kante. Die Welle ist der einzige Übergang. */
.contact.water::before { background: var(--water-solid); }
/* oberhalb der Welle: dasselbe Graublau wie die Erfahrungen, damit nichts durchscheint */
.contact.water { background: var(--band); }

/* Die Wasserfläche ist eine eigene Ebene hinter dem Inhalt. So liegt der Inhalt
   (z. B. die Glaskarte) nicht in einem Element mit clip-path – Safari zeichnet
   Glas dort sonst nicht weich. */
.water::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--water);
  clip-path: polygon(0% 34.0px, 2.85% 30.8px, 5.67% 28.0px, 8.46% 25.6px, 11.22% 23.5px, 13.96% 21.9px, 16.67% 20.6px, 19.37% 19.7px, 22.05% 19.2px, 24.71% 19.2px, 27.36% 19.5px, 29.99% 20.2px, 32.62% 21.3px, 35.23% 22.9px, 37.84% 24.8px, 40.45% 27.2px, 43.06% 30.0px, 45.11% 32.3px, 47.10% 34.4px, 49.05% 36.3px, 50.95% 37.9px, 52.83% 39.2px, 54.68% 40.4px, 56.51% 41.2px, 58.33% 41.9px, 60.16% 42.3px, 61.99% 42.4px, 63.84% 42.3px, 65.71% 42.0px, 67.62% 41.3px, 69.56% 40.5px, 71.56% 39.4px, 73.61% 38.0px, 75.42% 36.8px, 77.19% 35.8px, 78.94% 35.0px, 80.66% 34.3px, 82.36% 33.8px, 84.04% 33.5px, 85.69% 33.3px, 87.33% 33.2px, 88.95% 33.3px, 90.55% 33.5px, 92.15% 33.7px, 93.73% 34.1px, 95.30% 34.5px, 96.87% 34.9px, 98.44% 35.5px, 100% 36.0px, 100% 100%, 0% 100%);
  pointer-events: none;
}

.surface {
  display: block;
  width: 100%;
  height: var(--surface-h);
}

.ball-anchor {
  position: relative;
  height: 0;
}

/* Elefanten waten rechts ins Wasser: Füße an der Wasserlinie,
   Beine unter der Wassertönung */
.hero-elephants {
  --ele-w: clamp(185px, 22vw, 320px);
  position: absolute;
  z-index: -1;
  width: var(--ele-w);
  height: auto;
  top: calc(var(--surface-h) / 2 - var(--ele-w) * 0.3);
  right: max(var(--gutter), calc((100% - var(--max)) / 2 + 1rem));
}
.hero__water .water__body {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem; /* entspricht dem Abstand zwischen Trennlinie und Text */
}

/* Sektionen */
.section { padding-block: var(--space); }

/* Kurskonzept (unter der Wasserlinie im Hero): ein durchgehend gleich großer Text */
.concept__text {
  max-width: 40rem;
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.concept__text p + p { margin-top: 1.25rem; }

/* Foto: klein, rechts neben dem Text */
.concept__photo { margin: 2rem 0 0; }
.concept__photo img {
  display: block;
  width: min(100%, 21rem);
  height: auto;
  border-radius: 1.25rem;
}
@media (min-width: 60em) {
  .concept { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 4rem; align-items: start; }
  .concept > h2, .concept__text { grid-column: 1; }
  .concept__photo { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin-top: 0; }
  .hero__water .water__body { padding-bottom: 3rem; }
}

/* Erfahrungen */
/* Boxen: ein Stil für Eckdaten und Rezensionen (flach, ohne Schatten) */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
}
@media (min-width: 60em) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: clamp(1.15rem, 0.9rem + 1vw, 1.75rem);
}
.card__num {
  display: block;
  margin-bottom: clamp(1rem, 0.75rem + 1.2vw, 2rem);
  font-size: var(--fs-small);
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.card__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.card__text { margin: 0; color: var(--muted); }
.cards--facts { margin-top: clamp(2rem, 1.5rem + 2vw, 3.25rem); }

.reviews__stage {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

@media (min-width: 64em) {
  .reviews__stage { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

/* Standorte und Erfahrungen: eigener Hintergrund, als ein gemeinsamer Block */
/* Standorte weiß, Erfahrungen graublau: zwei klar getrennte Abschnitte */
.locations { background: var(--white); }
.reviews { background: var(--band); }

.review {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: clamp(1.5rem, 1rem + 1.2vw, 2rem);
}

.review blockquote { margin: 0; }

.review p { text-indent: -0.42em; /* öffnendes Anführungszeichen hängt in den Rand */ }

.review figcaption {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: var(--fs-small);
  color: var(--muted);
}
.review figcaption strong { color: var(--ink); }

/* Standorte */

.locations__grid {
  display: grid;
  gap: 2.5rem;
}

.locations__text .lead { max-width: 26rem; }

@media (min-width: 60em) {
  .locations__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0; }
  .locations__text { grid-area: 1 / 1 / 2 / 6; position: relative; z-index: 1; padding-top: 1rem; }
  .map { grid-area: 1 / 4 / 2 / 13; }
}

.map__canvas {
  position: relative;
  aspect-ratio: 820 / 570;
}

.map__shape {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--band);
  stroke: #c3d7df;
  stroke-width: 1;
  stroke-linejoin: round;
}
.map__shape path { vector-effect: non-scaling-stroke; }

.map__area {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  font-size: var(--fs-caption);
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}

.map__pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--logo);
  box-shadow: 0 0 0 3px var(--white), 0 0 0 4px rgba(1, 164, 231, 0.35);
}

/* Puls der Kartenpunkte: langsam und klein */
.map__pin::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1.5px solid var(--logo);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .map__pin::after { animation: pin-pulse 5s ease-out calc(var(--d, 0s) * 1.6) infinite; }
}

@keyframes pin-pulse {
  0%        { opacity: 0.45; transform: scale(1); }
  55%, 100% { opacity: 0;    transform: scale(1.45); }
}

.map__label {
  position: absolute;
  top: 50%;
  left: calc(100% + 7px);
  transform: translateY(-50%);
  font-weight: 600;
  font-size: clamp(var(--fs-caption), 0.7rem + 0.4vw, var(--fs-small));
  line-height: 1.2;
  white-space: nowrap;
}

.map__pin--left .map__label { left: auto; right: calc(100% + 7px); }

@media (max-width: 27em) {
  .map__pin { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
  .map__pin--below .map__label { top: calc(100% + 4px); right: 0; transform: none; }
}

@media (max-width: 30em) {
  .map__area { display: none; }
}

.map figcaption {
  margin-top: 0.75rem;
  font-size: var(--fs-caption);
  color: var(--muted);
}
.map figcaption a { color: inherit; }

/* Anmeldung */
.contact { margin-top: calc(-1 * var(--surface-h) / 2); overflow: hidden; isolation: isolate; }
.contact .water__body { padding-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); padding-bottom: var(--space); }

/* Überschrift direkt über der Karte: ohne Einleitungstext trägt eine zweite Spalte nicht mehr */
.contact__grid {
  display: grid;
  justify-items: center;
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.5rem);
  text-align: center;
}
/* Größenbezug für die Telefonnummer */
.contact__call { width: 100%; max-width: 38rem; container-type: inline-size; }
.contact__meta { font-style: normal; color: var(--muted); }
.contact__meta strong { color: var(--ink); }

.phone-big {
  display: inline-block;
  margin: 0.35rem 0 1.25rem;
  font-size: clamp(2.2rem, 1rem + 5vw, 4.35rem);
  font-size: clamp(2rem, 14cqi, 4.35rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
}
.phone-big:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.12em; }

/* Footer */
.site-footer {
  background: var(--deep);
  color: #e3f0f6;
  padding: clamp(3.5rem, 2.5rem + 3vw, 5rem) 0 2rem;
  font-size: var(--fs-small);
}

.site-footer a { color: #e3f0f6; }
.site-footer a:hover { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--logo-light); }

.site-footer__top {
  display: grid;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

@media (min-width: 52em) {
  .site-footer__top { grid-template-columns: 1fr auto; align-items: start; }
}

.site-footer__brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.site-footer__brand .brand__mark { margin-top: 0.2rem; }
.site-footer__brand strong { font-size: var(--fs-body); }

.site-footer__social { margin-top: 0.75rem; font-size: var(--fs-small); }

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; }

.legal { border-top: 1px solid rgba(227, 240, 246, 0.18); }

.legal details { border-bottom: 1px solid rgba(227, 240, 246, 0.18); }

.legal summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.legal summary::-webkit-details-marker { display: none; }

.legal summary::after {
  content: "+";
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1;
}
.legal details[open] summary::after { content: "–"; }

.legal__body {
  max-width: 44rem;
  padding-bottom: 2rem;
  color: #cfe2ec;
  font-size: var(--fs-small);
}

.legal__body h3 {
  font-size: var(--fs-small);
  margin: 1.5rem 0 0.35rem;
  color: #e3f0f6;
}
.legal__body h3:first-child { margin-top: 0.25rem; }

.legal__meta { margin-top: 1.5rem; font-size: var(--fs-caption); }

/* unterste Zeile: Copyright links, Webdesign-Hinweis rechts (mobil untereinander) */
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 2rem;
  margin-top: 2rem;
  font-size: var(--fs-caption);
  color: #a9c6d6;
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { color: inherit; }

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

/* Fehlerseite 404: "Verschwommen." – die 404 steht halb im Wasser,
   unter der Oberfläche wird sie unscharf (SVG-Filter), Elefanten waten vorbei. */
.nf {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-x: clip; /* Welle und Wasser reichen bis an den Rand, ohne seitliches Scrollen */
}
.nf-top { padding-top: clamp(1.25rem, 3vw, 2rem); }
.nf-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
/* Becken: Szene + Text. Das Wasser der Szene läuft hinter dem Text weiter
   und wird hier abgeschnitten – so entsteht keine Kante zwischen beiden. */
.nf-pool {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;
}
.nf-stage { margin-top: clamp(1rem, 4vh, 3rem); }
/* auf schmalen Bildschirmen etwas hineinzoomen, damit die 404 groß bleibt */
.nf-scene {
  display: block;
  width: max(100%, 600px);
  max-width: 1680px;
  height: auto;
  margin-inline: auto;
  overflow: visible;
  position: relative;
  left: 50%;
  translate: -50% 0;
}
.nf-digit {
  font-family: var(--font-display);
  font-size: 400px;
  font-weight: 560;
  fill: var(--ink);
}
.nf-ball { fill: var(--logo-light); }
.nf-digit.is-wet { fill: #1d5a78; }
.nf-ball.is-wet { fill: #74c6ec; }
.nf-wet { filter: url(#nf-wobble); }
.nf-water { fill: var(--water); }
.nf-surface {
  fill: none;
  stroke: var(--logo);
  stroke-opacity: 0.6;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.nf-bubble {
  fill: rgba(255, 255, 255, 0.45);
  stroke: rgba(1, 164, 231, 0.55);
  stroke-width: 2;
  opacity: 0;
}
.nf-main {
  flex: 1;
  position: relative; /* über dem weiterlaufenden Wasser der Szene */
  text-align: center;
  padding: clamp(0.5rem, 2vh, 1.5rem) 0 clamp(3rem, 8vh, 5rem);
}
.nf-main h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.35rem); }
.nf-lead { max-width: 30rem; margin: 1rem auto 0; font-size: var(--fs-lead); }
.nf-actions { justify-content: center; }
.nf-call { margin-top: 1rem; font-size: var(--fs-small); color: var(--muted); }
.nf-call a { color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .nf-elephants { animation: nf-wade 60s linear -10s infinite; } /* -10s: gleich beim Laden im Bild */
  .nf-ball-bob { animation: nf-bob 5s ease-in-out infinite alternate; }
  .nf-bubble { animation: nf-rise 7s ease-in infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .nf-wet { filter: url(#nf-wobble-still); }
  .nf-elephants { transform: translateX(1100px); }
}
@keyframes nf-wade {
  from { transform: translateX(1500px); }
  to   { transform: translateX(-420px); }
}
@keyframes nf-bob {
  from { transform: translateY(-5px); }
  to   { transform: translateY(7px); }
}
@keyframes nf-rise {
  0%   { transform: translateY(0); opacity: 0; }
  15%  { opacity: 1; }
  80%  { opacity: 0.9; }
  100% { transform: translateY(-235px); opacity: 0; }
}

@media print {
  .site-header, .surface, .actions, .btn { display: none !important; }
  .water::before { display: none; }
  .site-footer { background: none; color: #000; }
  .legal details > * { display: block; }
}
