/* =========================================================
   Physiotherapie Tritthart – Praxisseite
   Schriften lokal gehostet (DSGVO: keine Google-Fonts-CDN)
   ========================================================= */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin-ext-var.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
                 U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/atkinson-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/atkinson-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/atkinson-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
                 U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/atkinson-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
                 U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------
   Tokens
   --------------------------------------------------------- */
:root {
  /* aus dem Logo entnommen */
  --tinte:    #06384a;
  --petrol:   #02556e;
  --tuerkis:  #028a9a;
  /* Abgedunkelte Variante für kleinen Text: #028a9a erreicht auf hellem
     Grund nur 3,9:1 und verfehlt damit WCAG AA. #01727f kommt auf 5,4:1. */
  --tuerkis-text: #01727f;
  --leucht:   #00a6b6;
  /* aus den Praxisräumen entnommen */
  --salbei:   #aec3b0;
  --eiche:    #c08f5e;
  /* Flächen */
  --papier:   #f5fafa;
  --weiss:    #ffffff;
  --nebel:    rgba(6, 56, 74, 0.72);
  --hauch:    rgba(6, 56, 74, 0.12);

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --text: 'Atkinson', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --breite: 74rem;
  --rand: clamp(1.25rem, 5vw, 3.5rem);

  --kurve: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dauer: 0.9s;
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  /* kein overflow-x:hidden hier – das macht den Body zum Scroll-Container
     und legt das Scrollen lahm. Überbreiten wird lokal geklippt
     (.buehne, .fenster haben overflow:hidden). */
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.04;
  letter-spacing: -0.021em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--tuerkis-text); }

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

.huelle {
  width: 100%;
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: var(--rand);
}

.verborgen {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sprungmarke {
  position: absolute;
  left: 0.5rem; top: -4rem;
  z-index: 200;
  background: var(--petrol);
  color: var(--weiss);
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.2s var(--kurve);
}
.sprungmarke:focus { top: 0; }

/* Oberzeile / Eyebrow */
.oberzeile {
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--tuerkis-text);
  margin: 0 0 1.1rem;
}

/* Balken – Trennlinie in Eichenton, greift die Dachbalken auf */
.balken {
  border: 0;
  height: 1px;
  margin: clamp(3rem, 8vw, 6rem) 0 0;
  background: linear-gradient(90deg,
              transparent, var(--eiche) 12%, var(--eiche) 88%, transparent);
  transform-origin: left center;
  transition: transform 1.4s var(--kurve);
}
.js .balken { transform: scaleX(0); }
.js .balken.sichtbar { transform: scaleX(1); }

/* ---------------------------------------------------------
   Kopf
   --------------------------------------------------------- */
.kopf {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 250, 250, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--kurve), background 0.4s var(--kurve);
}
.kopf--fest {
  border-bottom-color: var(--hauch);
  background: rgba(245, 250, 250, 0.94);
}

.kopf__innen {
  max-width: var(--breite);
  margin-inline: auto;
  padding: 0.7rem var(--rand);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.marke {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--petrol);
  margin-right: auto;
}
.marke__zeichen { width: 44px; height: 44px; }
.marke__text { display: flex; flex-direction: column; line-height: 1.18; }
.marke__text strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: -0.015em;
}
.marke__text span {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nebel);
}

.navi ul {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0; padding: 0;
}
.navi a {
  text-decoration: none;
  color: var(--tinte);
  font-size: 0.95rem;
  padding: 0.3rem 0;
  position: relative;
}
.navi a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--leucht);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s var(--kurve);
}
.navi a:hover::after,
.navi a[aria-current='page']::after { transform: scaleX(1); transform-origin: left center; }
.navi a[aria-current='page'] { color: var(--petrol); font-weight: 700; }

.kopf__tel {
  text-decoration: none;
  color: var(--petrol);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .navi { display: none; }
}
@media (max-width: 460px) {
  .kopf__tel span { display: none; }
  .marke__text strong { font-size: 0.95rem; }
}

/* ---------------------------------------------------------
   Bühne / Hero
   --------------------------------------------------------- */
.buehne {
  position: relative;
  min-height: clamp(30rem, 82vh, 48rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.buehne__bild {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.buehne__bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
@keyframes heranfahren {
  from { transform: scale(1.07); }
  to   { transform: scale(1); }
}
.js .buehne__bild img { animation: heranfahren 1.9s var(--kurve) both; }

.buehne::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top,
      rgba(2, 51, 68, 0.92) 0%,
      rgba(2, 51, 68, 0.64) 32%,
      rgba(2, 51, 68, 0.18) 62%,
      rgba(2, 51, 68, 0.30) 100%);
}

.buehne__text {
  position: relative;
  width: 100%;
  max-width: var(--breite);
  margin-inline: auto;
  padding: 0 var(--rand) clamp(4rem, 10vw, 7rem);
  color: var(--weiss);
}
.buehne__text .oberzeile { color: var(--salbei); }

.buehne__titel {
  font-size: clamp(2.7rem, 7.6vw, 5.7rem);
  color: var(--weiss);
  margin: 0 0 1.4rem;
  max-width: 15ch;
}
.buehne__titel .zeile { display: block; }

.buehne__unter {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.86);
  margin: 0;
}

/* Scroll-Hinweis */
.buehne__pfeil {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  translate: -50% 0;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
}
.buehne__pfeil span {
  width: 11px; height: 11px;
  border-right: 2px solid rgba(255, 255, 255, 0.8);
  border-bottom: 2px solid rgba(255, 255, 255, 0.8);
  rotate: 45deg;
  animation: sinken 2.4s var(--kurve) infinite;
}
@keyframes sinken {
  0%, 100% { transform: translateY(-3px); opacity: 0.45; }
  50%      { transform: translateY(3px);  opacity: 1; }
}

/* Einblenden beim Laden – bewusst als reine CSS-Animation.
   So hängt die Lesbarkeit an keiner Stelle von JavaScript ab:
   „both“ sorgt dafür, dass der Endzustand in jedem Fall erreicht wird. */
@keyframes auftauchen {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.js .js-auf { animation: auftauchen 1s var(--kurve) both; }
.js .buehne__titel .zeile:nth-child(1) { animation-delay: 0.13s; }
.js .buehne__titel .zeile:nth-child(2) { animation-delay: 0.24s; }
.js .buehne__unter { animation-delay: 0.37s; }
.js .buehne__pfeil { animation-delay: 0.7s; }

/* ---------------------------------------------------------
   Auftakt
   --------------------------------------------------------- */
.auftakt {
  padding-block: clamp(4.5rem, 11vw, 8.5rem) 0;
}
.auftakt__lead {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2.15rem);
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--petrol);
  max-width: 22ch;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}
.auftakt__spalten {
  display: grid;
  gap: clamp(1.2rem, 3vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  max-width: 52rem;
  color: var(--nebel);
}

/* ---------------------------------------------------------
   Rundgang
   --------------------------------------------------------- */
.rundgang { padding-block: clamp(1rem, 3vw, 2rem); }

.etappe { margin-block: clamp(4.5rem, 11vw, 8rem); }
.etappe:last-child { margin-bottom: clamp(3rem, 7vw, 5rem); }

.etappe__kopf { max-width: 33rem; }
.etappe__titel {
  font-size: clamp(1.85rem, 3.6vw, 2.9rem);
  color: var(--petrol);
  margin: 0 0 1rem;
}
.etappe__text { color: var(--nebel); margin: 0; }

/* Etappe „Ankommen“: Text und Bild nebeneinander */
.etappe--empfang {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
}
@media (max-width: 860px) {
  .etappe--empfang { grid-template-columns: 1fr; }
}

/* Reihen mit stehenden „Fenstern“ */
.reihe {
  display: grid;
  gap: clamp(1.1rem, 2.6vw, 2.2rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  /* Ohne 'start' dehnt Grid alle Kacheln auf gleiche Hoehe. Das margin-top
     der Staffelung wuerde die Kachel dann oben zusammendruecken statt sie
     nach unten zu schieben – es entstuende leere Flaeche unter dem Bild. */
  align-items: start;
}
.reihe--zwei { grid-template-columns: repeat(2, 1fr); }
.reihe--drei { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 760px) {
  .reihe--zwei, .reihe--drei { grid-template-columns: 1fr; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .reihe--drei { grid-template-columns: repeat(2, 1fr); }
}

/* Das „Fenster“ – stehendes Bild mit Lichtschleier */
.fenster {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 3px;
  background: var(--salbei);
  box-shadow: 0 1px 2px rgba(6, 56, 74, 0.07),
              0 18px 40px -22px rgba(6, 56, 74, 0.5);
}
.fenster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 1.6s var(--kurve);
}
.js .fenster img { transform: scale(1.06); }
.js .fenster.sichtbar img { transform: scale(1); }

/* Lichtschleier, der beim Sichtbarwerden abfällt */
.fenster::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(178deg,
              rgba(255, 255, 255, 0.92) 0%,
              rgba(255, 255, 255, 0.55) 45%,
              rgba(255, 255, 255, 0.12) 78%,
              rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 1.5s var(--kurve);
}
.js .fenster::after { opacity: 1; }
.js .fenster.sichtbar::after { opacity: 0; }

.fenster figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 3.2rem 1.15rem 1rem;
  color: var(--weiss);
  font-size: 0.9rem;
  line-height: 1.45;
  background: linear-gradient(to top,
              rgba(2, 51, 68, 0.85), rgba(2, 51, 68, 0));
}

@media (hover: hover) {
  .fenster.sichtbar:hover img { transform: scale(1.045); }
}

/* Die Bilder stehen bündig nebeneinander – gleiche Ober- und Unterkante.
   (Die Klassen .versatz / .versatz--doppelt im HTML sind bewusst stehen
   geblieben: sie haben keine Wirkung mehr, erlauben aber, eine Staffelung
   bei Bedarf mit wenigen Zeilen wieder einzuschalten.) */

/* ---------------------------------------------------------
   Fakten
   --------------------------------------------------------- */
.fakten { padding-block: clamp(3.5rem, 9vw, 6.5rem); }

.fakten__titel {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  color: var(--petrol);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.karten {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.8rem);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.karte {
  background: var(--weiss);
  border: 1px solid var(--hauch);
  border-top: 3px solid var(--salbei);
  border-radius: 4px;
  padding: clamp(1.4rem, 3vw, 2rem);
}
.karte h3 {
  font-family: var(--text);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--tuerkis-text);
  margin: 0 0 0.9rem;
}
.karte a { color: var(--tinte); text-decoration-color: var(--salbei); text-underline-offset: 3px; }
.karte a:hover { color: var(--tuerkis-text); }
.karte .gross {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.015em;
}

.zeiten { margin: 0; }
.zeiten div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--hauch);
}
.zeiten div:last-child { border-bottom: 0; }
.zeiten dt { color: var(--nebel); }
.zeiten dd { margin: 0; font-weight: 700; text-align: right; }

.fakten__hinweis {
  margin-top: clamp(2rem, 4vw, 3rem);
  color: var(--nebel);
}
.fakten__hinweis a { color: var(--tuerkis-text); text-underline-offset: 3px; }

/* ---------------------------------------------------------
   Fuß
   --------------------------------------------------------- */
.fuss {
  background: var(--petrol);
  color: rgba(255, 255, 255, 0.82);
  padding-block: 2.2rem;
}
.fuss__innen {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.fuss__marke { margin: 0; font-size: 0.92rem; }
.fuss__navi { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.fuss__navi a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  padding-bottom: 2px;
}
.fuss__navi a:hover { color: var(--weiss); border-bottom-color: var(--weiss); }

/* ---------------------------------------------------------
   Scroll-Einblendungen
   --------------------------------------------------------- */
.js .beobachten:not(.balken) {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dauer) var(--kurve),
              transform var(--dauer) var(--kurve);
}
.js .beobachten.sichtbar:not(.balken) {
  opacity: 1;
  transform: none;
}

/* Gestaffelte Verzögerung innerhalb einer Reihe */
.reihe > *:nth-child(2) { transition-delay: 0.12s; }
.reihe > *:nth-child(3) { transition-delay: 0.24s; }
.karten > *:nth-child(2) { transition-delay: 0.1s; }
.karten > *:nth-child(3) { transition-delay: 0.2s; }

/* ---------------------------------------------------------
   Bewegung reduzieren
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  .js .js-auf,
  .js .beobachten:not(.balken) { opacity: 1 !important; transform: none !important; }
  .js .balken { transform: scaleX(1) !important; }
  .js .fenster img { transform: none !important; }
  .js .fenster::after { opacity: 0 !important; }
  .js .buehne__bild img { transform: scale(1) !important; }
  .buehne__pfeil span { animation: none !important; }
}
