/* ==========================================================================
   Gabi Hesse – Hebamme
   Schriften: Figtree, Sacramento (SIL Open Font License, lokal gehostet)
   ========================================================================== */

/* ---------- Schriften ---------- */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/figtree-latin-wght.woff2") format("woff2");
}

@font-face {
  font-family: "Sacramento";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/sacramento-latin-400.woff2") format("woff2");
}

/* ---------- Design-Token ---------- */
:root {
  /* Farben (Kontrast nach WCAG 2.2 AA geprüft) */
  --color-gold: #d5aa70;          /* Fläche/Deko – nicht für Text auf Weiß */
  --color-gold-light: #e0c094;    /* Fläche/Deko */
  --color-gold-dark: #7a5a1c;     /* Text, Links, Buttons: 6,35:1 auf Weiß */
  --color-gold-darker: #5e4513;   /* Hover */
  --color-ink: #2b2116;           /* Text auf Gold: 7,37:1 */
  --color-text: #4d4d4d;          /* Fließtext: 8,4:1 auf Weiß */
  --color-bg: #fff;
  --color-bg-tint: #faf6f0;
  --color-border: #8c7a5e;        /* Formularrahmen: ≥ 3:1 */
  --color-error: #a4221b;         /* 7,0:1 auf Weiß */
  --color-success: #2f6b2f;       /* 6,3:1 auf Weiß */
  --color-focus: #1a140c;
  --color-gold-form: #cd9f51;     /* Formularrahmen wie bisher (Deko) */
  --color-gold-button: #b68634;   /* nächster Goldton zu #cd9f51: 3,3:1 mit weißer, großer (fett ≥ 18,7 px) Schrift */
  --color-text-form: #666;        /* 5,7:1 */
  --color-line: #8c8c8c;          /* gestrichelte Unterlinie: 3,4:1 (WCAG 1.4.11) */

  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-script: "Sacramento", "Segoe Script", cursive;

  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-space: clamp(3rem, 8vw, 6.5rem);
  --radius: 0.375rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.75em;
  line-height: 1.2;
  color: var(--color-gold-dark);
  overflow-wrap: break-word;
}

h1,
h2 {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.75rem, 5vw + 1rem, 4.25rem);
  line-height: 1.1;
}

/* H1 einzeilig: Größe an die Breite der Textspalte gekoppelt
   (Text ist ca. 8,8 × Schriftgröße breit → 11 % der Spaltenbreite passt immer) */
.split__content {
  container-type: inline-size;
}

h1 {
  font-size: min(4.25rem, 11cqi);
}

h3 {
  font-size: 1.25rem;
  font-weight: 650;
}

p,
ul,
ol,
dl {
  margin: 0 0 1.25em;
}

strong {
  font-weight: 650;
}

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

a:hover {
  color: var(--color-gold-darker);
  text-decoration-thickness: 0.14em;
}

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

::selection {
  background: var(--color-gold-dark);
  color: #fff;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--color-ink);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: #fff;
}

/* ---------- Header ---------- */
/* Der Header blendet sich beim Runterscrollen aus; Ankerziele brauchen daher nur wenig Abstand.
   Fokus unter dem Header (WCAG 2.4.11) wird per JS behandelt: Header blendet sich dann aus. */
html {
  scroll-padding-top: 1rem;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

/* Sticky: bleibt oben; beim Runterscrollen per JS ausgeblendet (.is-hidden),
   beim Hochscrollen wieder eingeblendet */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  /* kein Hintergrund: unter der Welle scheint der Inhalt durch (wie im Original) */
  /* Original-Gold, leicht abgedunkelt (Wunsch der Kundin). Hinweis: weiße Schrift
     erreicht hier nur ca. 2,1:1 und damit nicht WCAG 1.4.3 (4,5:1). */
  background-image: url("../img/header-bg-dunkel.svg?v=6");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  padding-block: 1rem clamp(4.5rem, 9vw, 9rem);
  color: #fff;
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-logo {
  display: block;
  width: clamp(11rem, 40vw, 22rem);
  flex-shrink: 0;
}

@media (min-width: 64em) {
  .site-header__inner {
    flex-direction: column;
    gap: 1.25rem;
  }

  .site-nav__list {
    justify-content: center;
    gap: 0.25rem 2.25rem;
  }

  .site-nav__link {
    font-size: 1.1rem;
  }
}

.site-logo img {
  width: 100%;
}

/* Fokusrahmen auf dunklem Gold: weiß */
.site-logo:focus-visible,
.site-nav__link:focus-visible,
.nav-toggle:focus-visible {
  outline-color: #fff;
}

.nav-toggle {
  display: none;
}

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

.site-nav__link {
  display: inline-block;
  padding-block: 0.375rem;
  color: #fff;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav__link:hover,
.site-nav__link[aria-current] {
  color: #fff;
  border-bottom-color: currentColor;
}

/* Mobile Navigation (nur mit JavaScript eingeklappt; ohne JS bleibt die Liste sichtbar) */
@media (max-width: 63.99em) {
  .has-js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    font: inherit;
    font-weight: 650;
    color: #fff;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 999px;
    cursor: pointer;
  }

  .has-js .nav-toggle:hover {
    background: rgb(255 255 255 / 0.15);
  }

  .nav-toggle__icon,
  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }

  .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 {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .site-nav {
    flex-basis: 100%;
  }

  .has-js .site-nav {
    display: none;
  }

  .has-js .site-nav.is-open {
    display: block;
  }

  .has-js .site-nav__list {
    flex-direction: column;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 0.5rem 1.5rem rgb(43 33 22 / 0.18);
  }

  /* Aufgeklapptes Menü: weiße Fläche, dunkle Schrift */
  .has-js .site-nav__link {
    display: block;
    padding-block: 0.625rem;
    font-size: 1.125rem;
    color: var(--color-ink);
    border-bottom: 1px solid #eadfcd;
  }

  .has-js .site-nav__link:hover {
    color: var(--color-ink);
    border-bottom-color: var(--color-ink);
  }

  .has-js .site-nav__link[aria-current] {
    color: var(--color-gold-dark);
    font-weight: 700;
  }

  .has-js .site-nav__link:focus-visible {
    outline-color: var(--color-focus);
  }
}

/* ---------- Abschnitte ---------- */
.section {
  position: relative;
  padding-block: var(--section-space);
  scroll-margin-top: 1rem;
}

.section--tinted {
  background-color: var(--color-bg-tint);
}

/* Geschwungene Hintergrundfläche (wie im bisherigen Design) */
/* SVGs mit preserveAspectRatio="none": füllen jede Breite (auch > 1920 px), Wellenkante bleibt sichtbar */
.section--wave {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

@media (min-width: 120em) {
  .section--wave {
    padding-block: 200px 340px;
  }
}

.section--wave-a {
  background-image: url("../img/bg-schwangerschaft.svg?v=2");
}

.section--wave-b {
  background-image: url("../img/bg-wochenbett.svg?v=2");
}

.section--first {
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

.split {
  display: grid;
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.split__media {
  justify-self: center;
  width: min(100%, 22rem);
}

.split__media img {
  width: 100%;
  border-radius: 50%;
}

@media (min-width: 52em) {
  .split {
    grid-template-columns: 7fr 5fr;
  }

  .split__media {
    width: 100%;
    max-width: 28rem;
  }

  /* Bild links, Text rechts (DOM-Reihenfolge bleibt: Text zuerst) */
  .split--media-left {
    grid-template-columns: 5fr 7fr;
  }

  .split--media-left .split__media {
    grid-column: 1;
    grid-row: 1;
  }

  .split--media-left .split__content {
    grid-column: 2;
  }
}

.split__content > :last-child,
.split__body > :last-child {
  margin-bottom: 0;
}

/* Text unter der Überschrift eingerückt wie bisher (ab 940 px) */
@media (min-width: 58.75em) {
  .split__body {
    padding-left: 4rem;
  }
}

/* Werdegang */
.cv {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--color-gold-light);
}

.cv__item {
  position: relative;
  padding: 0 0 0.875rem 1.25rem;
}

.cv__item::before {
  content: "";
  position: absolute;
  left: -0.4375rem;
  top: 0.55em;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--color-gold);
  border: 2px solid #fff;
  border-radius: 50%;
}

.cv__year {
  display: block;
  font-weight: 650;
  color: var(--color-gold-dark);
  font-variant-numeric: tabular-nums;
}

.check-list {
  padding-left: 1.25rem;
}

.check-list li {
  margin-bottom: 0.375rem;
}

.check-list li::marker {
  color: var(--color-gold-dark);
}

/* ---------- Kontakt ---------- */
.contact-intro {
  max-width: 44rem;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  text-align: center;
}

.contact-details {
  font-style: normal;
}

.contact-form {
  max-width: 1000px;
  margin: 3rem auto 0;
  padding: 25px;
  background: #fff;
  border: 1px solid var(--color-gold-form);
}

.form-note {
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.form-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 40em) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 3.125rem;
  }

  .form-field--full {
    grid-column: 1 / -1;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
}

/* Beschriftung klein und grau wie die bisherigen Platzhalter – bleibt aber sichtbar */
.form-field label {
  padding-left: 5px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--color-text-form);
}

.required-mark {
  color: var(--color-error);
}

/* Eingabefelder wie bisher: nur gestrichelte Unterlinie */
.form-control {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem 0.5rem 5px;
  font: inherit;
  font-size: 1.0625rem;
  color: #000;
  background: #fff;
  border: 0;
  border-bottom: 1px dashed var(--color-line);
  border-radius: 0;
}

.form-control:hover {
  border-bottom-color: var(--color-gold-dark);
}

.form-control:focus {
  border-bottom: 1px solid var(--color-gold-dark);
}

.form-control:focus-visible {
  outline-offset: 2px;
}

textarea.form-control {
  min-height: 8rem;
  resize: vertical;
}

.form-field--message {
  margin-top: 1rem;
}

.form-control[aria-invalid="true"] {
  border-bottom: 2px solid var(--color-error);
}

.form-error {
  margin: 0.25rem 0 0;
  padding-left: 5px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-error);
}

.form-error:empty {
  display: none;
}

.form-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.5rem;
  align-items: start;
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.form-check input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.15rem 0 0;
  accent-color: var(--color-gold-dark);
}

.form-check label {
  font-weight: 400;
  color: var(--color-text);
}

.form-check .form-error {
  grid-column: 2;
}

/* Honeypot: für Menschen unsichtbar, auch für Screenreader ausgeblendet */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font: inherit;
  font-size: max(1.2rem, 19px);   /* zusammen mit fett = "große Schrift" nach WCAG */
  font-weight: 600;
  color: #fff;
  background: var(--color-gold-button);
  border: 1px solid var(--color-gold-button);
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

.button:hover {
  color: #fff;
  background: var(--color-gold-darker);
  border-color: var(--color-gold-darker);
}

.button[aria-disabled="true"] {
  cursor: progress;
  opacity: 0.75;
}

.form-status {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid currentColor;
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-status--success {
  color: var(--color-success);
  background: #eef6ee;
}

.form-status--error {
  color: var(--color-error);
  background: #fbeeed;
}

.form-status ul {
  margin: 0.5rem 0 0;
  font-weight: 400;
}

/* ---------- Unterseiten (Impressum, Datenschutz, 404) ---------- */
.page-content {
  max-width: 48rem;
  padding-block: clamp(1.5rem, 4vw, 3rem) var(--section-space);
}

.page-content h2 {
  margin-top: 2em;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.page-content h3 {
  margin-top: 1.75em;
  margin-bottom: 0.5em;
}

.page-content h4 {
  margin: 1.5em 0 0.4em;
  font-size: 1.0625rem;
  color: var(--color-ink);
}

.page-content address {
  margin-bottom: 1.25em;
  font-style: normal;
}

.notice-uppercase {
  font-size: 0.9375rem;
}

/* ---------- Footer ---------- */
/* Welle wie bisher: immer über die volle Breite, Proportion bleibt erhalten
   (mind. 70rem breit, links oben ausgerichtet). Obere Welle Gold, untere Welle und
   Fläche darunter Gold #cb9d60 (Original leicht abgedunkelt), weiße Schrift wie bisher.
   Hinweis: Kontrast ca. 2,5:1 – erfüllt WCAG 1.4.3 (4,5:1) nicht, bewusste Entscheidung.
   Der Text beginnt unterhalb der dunklen Wellenkante (max. 76 % der Wellenhöhe). */
.site-footer {
  --color-footer-dark: #cb9d60;
  --wave-h: calc(max(100vw, 70rem) * 0.2 - 8px); /* SVG 1920 × 388 → Höhe ≈ 20 % der Breite */
  padding: calc(max(15.4%, 10.75rem) + 1rem) 0 2rem;
  color: #fff;
  background-color: #fff;
  background-image:
    url("../img/welle-footer.svg?v=6"),
    linear-gradient(var(--color-footer-dark), var(--color-footer-dark));
  background-repeat: no-repeat;
  background-position: left top, left bottom;
  background-size: max(100%, 70rem) auto, 100% calc(100% - var(--wave-h));
  text-align: center;
}

.site-footer address {
  margin-bottom: 0.5rem;
  font-style: normal;
}



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

.site-footer a:hover {
  color: #fff;
  text-decoration-thickness: 0.14em;
}

.site-footer a:focus-visible {
  outline-color: #fff;
}

.footer-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
}

.footer-nav__item + .footer-nav__item::before {
  content: "·";
  margin-right: 0.5rem;
}

.footer-nav__link {
  display: inline-block;
  padding-block: 0.25rem;
}

/* ---------- Hoher Kontrast / Druck ---------- */
@media (forced-colors: active) {
  .split__media img {
    border: 1px solid CanvasText;
  }

  .button,
  .has-js .nav-toggle {
    border: 2px solid ButtonText;
  }
}

@media print {
  .site-header,
  .site-footer,
  .section--tinted,
  .section--wave {
    background: none !important;
  }

  .nav-toggle,
  .site-nav,
  .skip-link,
  .contact-form {
    display: none !important;
  }

  body {
    color: #000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}
