/* Oeffentliche Website: Grundlagen, Rahmen, Buehne und Startseite.
   Der Praxisbereich nutzt weiter site.css und ist hiervon unabhaengig.

   Die Welt: Quadrate als gefuellte Flaechen in Stein, Rosa, Blau und Gruen,
   darauf botanische Tafeln aus dem Hebammenwissen und die echten Praxisfotos.
   Darum gibt es keine Rundungen, keine Linien und keine Schatten. */
@font-face {
  font-family: "Clash Grotesk";
  src: url("../lib/clash-grotesk/clash-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Clash Grotesk";
  src: url("../lib/clash-grotesk/clash-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #eeecea;
  --paper: #f6f6f4;
  --surface: #e4e1dd;
  --ink: #24322b;
  --ink-soft: #4b5650;
  --accent: #8e3f52;
  --accent-deep: #6f2f40;
  --on-accent: #ffffff;
  --blau: #c5d5d8;
  --gruen: #cfcf9e;
  --rosa: #e7cdd0;
  --error: #8a2f35;

  --font: "Clash Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.3125rem, 1.15rem + 0.6vw, 1.625rem);
  --step-head: clamp(1.875rem, 1.4rem + 1.5vw, 2.75rem);
  --step-display: clamp(2.5rem, 0.95rem + 4.55vw, 5.25rem);

  --gap: 12px;
  --pad: clamp(24px, 4vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --kopf: 74px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-display);
  line-height: 0.95;
}

h2 {
  font-size: var(--step-head);
}

h3 {
  font-size: var(--step-lead);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

p,
ul,
ol,
dl,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

p + p {
  margin-top: 1em;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

a:hover {
  color: var(--accent);
}

::selection {
  background: var(--rosa);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

main:focus {
  outline: 0;
}

.skip-link {
  position: absolute;
  z-index: 60;
  top: 8px;
  left: 12px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
}

.skip-link:focus {
  color: var(--paper);
  transform: none;
}

/* Aktionen: flach, eckig, eine Farbe. */
.btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  padding: 0.7rem 1.5rem;
  font: inherit;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 120ms var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary,
.btn-secondary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover,
.btn-secondary:hover {
  background: var(--accent-deep);
  color: var(--on-accent);
}

.btn-light {
  background: var(--paper);
  color: var(--ink);
}

.btn-light:hover {
  background: var(--rosa);
  color: var(--ink);
}

.btn-outline,
.btn-quiet {
  background: var(--surface);
  color: var(--ink);
}

.btn-outline:hover,
.btn-quiet:hover {
  background: var(--rosa);
  color: var(--ink);
}

.btn:disabled {
  background: var(--surface);
  color: var(--ink-soft);
  cursor: not-allowed;
}

.text-link,
.text-link--arrow {
  display: inline-block;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

/* Kopf: Wortmarke, wenige Links, eine Aktion. */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(12px, 2vw, 24px);
}

.bar__mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.05;
  text-decoration: none;
}

.bar__nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
}

.bar__nav > a:not(.btn) {
  text-decoration: none;
}

.bar__nav > a:not(.btn):hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.bar__nav .btn {
  min-height: 44px;
}

.bar__toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

/* Der Rahmen: links lesen, rechts steht das Bild still. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--gap);
  padding: 0 var(--gap);
  align-items: start;
}

.split__stage {
  position: sticky;
  top: var(--gap);
  order: 2;
  height: calc(100svh - var(--gap) * 2);
  overflow: hidden;
  background: var(--surface);
}

.reading {
  min-width: 0;
}

.reading--solo {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}

.frame.is-active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  transition: opacity 1.2s ease;
}

/* Das alte Bild bleibt deckend darunter, sonst scheint beim Ueberblenden die
   Flaeche hinter den Bildern durch. */
.frame.is-vorher {
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.frame__bild {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.frame__bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 10px 14px;
  background: var(--paper);
  font-size: var(--step-small);
}

.frame:not(.is-active) figcaption {
  display: none;
}

/* Auf dem Handy stehen diese Bilder im Textfluss. */
.phone-bild {
  display: none;
}

/* Startseite */
.hero {
  display: flex;
  min-height: calc(100svh - 96px);
  flex-direction: column;
  background: var(--paper);
}

/* Ein Band aus Quadraten in den Farben der vier Leistungen. */
.hero__band {
  height: 56px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='224' height='56'%3E%3Crect width='56' height='56' fill='%23e7cdd0'/%3E%3Crect x='56' width='56' height='56' fill='%23c5d5d8'/%3E%3Crect x='112' width='56' height='56' fill='%23cfcf9e'/%3E%3Crect x='168' width='56' height='56' fill='%238e3f52'/%3E%3C/svg%3E");
  background-size: 224px 56px;
  background-repeat: round no-repeat;
}

.hero__inhalt {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: var(--pad);
}

.hero .lead {
  max-width: 34ch;
}

.lead {
  font-size: var(--step-lead);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.hero__aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.hero__adresse {
  font-size: var(--step-body);
  font-style: normal;
}

.block {
  padding: clamp(72px, 9vw, 136px) var(--pad);
}

.block > h2 {
  margin-bottom: 28px;
}

.block__text {
  max-width: 46ch;
}

.block--feld {
  margin-top: var(--gap);
  background: var(--blau);
}

/* Die vier Quadrate der Leistungen, gewaehlt nach Lebensphase. */
.phasen {
  margin: 0 0 24px;
  border: 0;
  padding: 0;
}

.phasen legend {
  margin-bottom: 12px;
  padding: 0;
  font-weight: 500;
}

.phasen__wahl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.phasen__wahl button {
  min-height: 44px;
  border: 0;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 120ms var(--ease);
}

.phasen__wahl button:hover {
  background: var(--rosa);
}

.phasen__wahl button:active {
  transform: scale(0.97);
}

.phasen__wahl button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.quadrate {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.quadrat {
  display: flex;
  aspect-ratio: 1;
  min-height: 100%;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.2vw, 28px);
  background: var(--feld, var(--surface));
  transition: background-color 360ms ease, color 360ms ease, opacity 360ms ease;
}

.quadrat:nth-child(1) {
  --feld: var(--rosa);
}

.quadrat:nth-child(2) {
  --feld: var(--blau);
}

.quadrat:nth-child(3) {
  --feld: var(--gruen);
}

.quadrat:nth-child(4) {
  --feld: var(--surface);
}

.quadrat h3 {
  font-size: clamp(1.125rem, 1.7vw, 1.625rem);
  hyphens: auto;
}

.quadrat a {
  margin-top: auto;
  font-weight: 500;
}

.quadrate.is-gewaehlt .quadrat {
  --feld: var(--surface);
  color: var(--ink-soft);
}

.quadrate.is-gewaehlt .quadrat.is-passend {
  --feld: var(--accent);
  color: var(--on-accent);
}

.quadrate.is-gewaehlt .quadrat.is-passend a {
  color: var(--on-accent);
  text-decoration-color: var(--on-accent);
}

/* Kurstermine als gedrucktes Blatt auf der blauen Flaeche. */
.blatt {
  margin-top: 32px;
  padding: clamp(20px, 3vw, 36px);
  background: var(--paper);
}

.blatt h3 {
  margin-bottom: 20px;
}

.blatt ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.blatt li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 4px 16px;
  padding: 12px 0;
}

.blatt time {
  font-weight: 500;
}

.blatt li span {
  display: block;
  color: var(--ink-soft);
  font-size: var(--step-small);
}

.blatt + .btn {
  margin-top: 24px;
}

.kurs-text {
  margin-bottom: 0;
}

/* Abschluss ueber die volle Breite, in den Spalten der Seite. */
.abschluss {
  margin: var(--gap);
  padding: clamp(48px, 7vw, 104px) var(--pad);
  background: var(--rosa);
}

.abschluss__inhalt {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px var(--gap);
  align-items: start;
}

.abschluss__inhalt h2 {
  grid-row: span 2;
}

.abschluss__inhalt .btn {
  justify-self: start;
}

.site-footer {
  margin-top: var(--gap);
  padding: clamp(48px, 6vw, 88px) clamp(16px, 2vw, 24px) 24px;
  background: var(--ink);
  color: var(--paper);
}

.site-footer a {
  color: var(--paper);
  text-decoration-color: var(--rosa);
}

.site-footer a:hover {
  color: var(--rosa);
}

.site-footer :focus-visible {
  outline-color: var(--paper);
}

.site-footer__name {
  margin-bottom: clamp(40px, 5vw, 72px);
  font-size: clamp(2.125rem, 7.6vw, 9rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-wrap: balance;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.site-footer__grid > p {
  max-width: 28ch;
}

.site-footer h2 {
  margin-bottom: 12px;
  font-size: var(--step-body);
  font-weight: 500;
  letter-spacing: 0;
}

.site-footer__fine {
  max-width: 56ch;
  margin-top: 56px;
  font-size: var(--step-small);
}

/* Eintritt der Abschnitte: nur unter .motion-ready, ohne Skript bleibt alles
   sichtbar. */
.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 640ms var(--ease), transform 640ms var(--ease);
  transition-delay: calc(var(--reveal-stufe, 0) * 70ms);
}

.motion-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  .bar__phone {
    display: none;
  }
}

@media (max-width: 991px) {
  .bar {
    flex-wrap: wrap;
  }

  .bar__toggle {
    display: block;
  }

  .bar__nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 8px;
  }

  .bar__nav.is-offen {
    display: flex;
  }

  .bar__nav > a:not(.btn) {
    display: flex;
    min-height: 48px;
    align-items: center;
  }

  .bar__nav .bar__phone {
    display: flex;
  }

  .bar__nav .btn {
    min-height: 52px;
    margin-top: 8px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__grid > p {
    grid-column: 1 / -1;
  }
}

/* Desktop: Der Kopf ist oben angedockt und bleibt immer sichtbar. Bild und
   Text beginnen darunter, der Text laeuft beim Scrollen hinter ihm durch. */
@media (min-width: 992px) {
  html {
    scroll-padding-top: calc(var(--kopf) + var(--gap) * 2);
  }

  .bar {
    position: fixed;
    z-index: 40;
    top: 0;
    right: 0;
    left: 0;
    height: var(--kopf);
    background: var(--paper);
  }

  main {
    padding-top: calc(var(--kopf) + var(--gap));
  }

  .split__stage {
    top: calc(var(--kopf) + var(--gap));
    height: calc(100svh - var(--kopf) - var(--gap) * 2);
  }

  .reading--solo {
    padding-top: calc(var(--gap) * 3);
  }

  .hero {
    min-height: calc(100svh - var(--kopf) - var(--gap) * 2);
  }
}

/* Handy: eine eigene Komposition. Das Bild kommt zuerst, die Karte legt sich
   darueber, weitere Bilder stehen im Textfluss. */
@media (max-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split__stage {
    position: relative;
    top: auto;
    order: 0;
    height: 32svh;
  }

  .frame:first-child {
    opacity: 1;
    visibility: visible;
  }

  .frame:not(:first-child) {
    display: none;
  }

  .frame[data-frame="raum"] img {
    object-position: 50% 62%;
  }

  .frame figcaption {
    display: none;
  }

  .split--aufgabe .split__stage {
    display: none;
  }

  .reading {
    position: relative;
    z-index: 1;
    margin-top: calc(var(--gap) * -3);
  }

  .split--aufgabe .reading,
  .reading--solo {
    margin-top: 0;
  }

  .hero {
    min-height: 0;
  }

  .hero__inhalt {
    gap: 20px;
  }

  .phone-bild {
    display: block;
    margin-top: var(--gap);
  }

  .phone-bild img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-position: 50% 80%;
    object-fit: cover;
  }

  .quadrat {
    aspect-ratio: auto;
    min-height: 240px;
  }

  .quadrat h3 {
    font-size: var(--step-lead);
  }

  .abschluss__inhalt {
    grid-template-columns: minmax(0, 1fr);
  }

  .abschluss__inhalt h2 {
    grid-row: auto;
  }

  .abschluss__inhalt .btn {
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  .quadrate {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__aktionen .btn {
    width: 100%;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .motion-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
