/* ==========================================================================
   Vorlage 03 Arztpraxis · Ordination Dr. Lena Sommerauer (Demo)
   --------------------------------------------------------------------------
   Ruhig, freundlich, gut lesbar. Große Schrift (18 px), weiche Ecken,
   Petrol für alles, was man anklicken kann. Umfärben: nur „Farben" ändern.
   Bewegung: im <html>-Tag data-bewegung="starr | mittel | dynamisch".
   ========================================================================== */

/* ---------- Schriften (lokal, SIL Open Font License, Lizenz in fonts/) ---------- */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-var.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  /* ---------- Farben ---------- */
  --kalk: #f5f6f3;            /* Seitenhintergrund, Kalkweiß */
  --karte: #fdfdfb;           /* Infokarte, Preisliste */
  --sand: #e8dcc4;            /* Abschnitt Preise, Barrierefrei */
  --sand-hell: #f2eadb;       /* „heute" in den Öffnungszeiten */
  --petrol: #0f4c5c;          /* Leiste, Knöpfe, Links, Fuß */
  --petrol-tief: #0a3743;     /* Knopf beim Überfahren */
  --text: #1c2a2e;
  --text-leise: #485659;      /* Nebentext, 6,9:1 auf Kalk, 5,5:1 auf Sand */
  --text-hell: #eef3f2;       /* Text auf Petrol, 8,6:1 */
  --linie: #cad3d0;
  --fokus: var(--petrol);

  /* ---------- Schrift ---------- */
  --schrift-titel: "Literata", Georgia, "Times New Roman", serif;
  --schrift-text: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;

  /* ---------- Maße ---------- */
  --breite: 74rem;                          /* 1184 px Inhaltsbreite */
  --rand: clamp(1.25rem, 4vw, 3rem);
  --abschnitt: clamp(4rem, 8vw, 6.5rem);
  --ecke: 14px;                             /* Karten und Bildrahmen */
  --ecke-knopf: 999px;                      /* Knöpfe ganz rund, sonst nichts */
  --ease: cubic-bezier(.25, .8, .25, 1);

  color-scheme: light;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--kalk);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--petrol); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; border-radius: 4px; }

.behaelter { width: min(100% - 2 * var(--rand), var(--breite)); margin-inline: auto; }
.nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprunglink { position: absolute; left: var(--rand); top: -4rem; z-index: 20; background: var(--petrol); color: var(--text-hell); padding: .75rem 1rem; border-radius: 8px; }
.sprunglink:focus { top: .75rem; }

.abschnitt-titel {
  font-family: var(--schrift-titel);
  font-weight: 500;
  font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -.01em;
}

/* ---------- Knopf ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .8rem 1.6rem;
  background: var(--petrol); color: var(--text-hell);
  border-radius: var(--ecke-knopf);
  font-weight: 700; font-size: 1.0625rem; line-height: 1.1;
  text-decoration: none; white-space: nowrap;
}
.knopf:hover { background: var(--petrol-tief); }

/* ---------- Bildrahmen (Platzhalter für Fotos) ---------- */
.bild-platzhalter {
  position: relative;
  display: flex; align-items: flex-end;
  aspect-ratio: var(--format, 4 / 3);
  background:
    repeating-linear-gradient(45deg, transparent 0 10px, rgb(15 76 92 / .07) 10px 11px),
    #e3e8e5;
  border: 1px solid var(--linie);
  border-radius: var(--ecke);
  overflow: hidden;
}
.bild-platzhalter figcaption {
  margin: .9rem; padding: .5rem .75rem;
  max-width: calc(100% - 1.8rem);
  background: var(--karte); border-radius: 8px;
  font-size: .8125rem; line-height: 1.4; color: var(--text);
}

/* ---------- 1 · Leiste oben ---------- */
.leiste { background: var(--petrol); color: var(--text-hell); font-size: 1rem; --fokus: #f2eadb; }
.leiste a { color: var(--text-hell); font-weight: 700; }
.leiste-innen { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .35rem 1.5rem; padding-block: .6rem; }
.leiste-telefon { text-decoration: none; font-size: 1.0625rem; margin-right: .6rem; }
.leiste-telefon:hover { text-decoration: underline; }
.leiste-rechts { display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; }
@media (max-width: 47.99rem) {
  .leiste-zeiten, .leiste-barrierefrei { display: none; }
}

/* ---------- Kopf ---------- */
.kopf { background: var(--kalk); border-bottom: 1px solid var(--linie); }
.kopf-innen { display: flex; align-items: center; gap: 2rem; min-height: 4.75rem; }
.marke { display: flex; flex-direction: column; text-decoration: none; color: var(--text); line-height: 1.2; margin-right: auto; }
.marke-name { font-family: var(--schrift-titel); font-weight: 600; font-size: clamp(1.125rem, 1rem + .6vw, 1.375rem); }
.marke-zusatz { font-size: .9375rem; color: var(--text-leise); }
.kopf-nav ul { display: flex; gap: 1.75rem; }
.kopf-nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 1rem; }
.kopf-nav a:hover { color: var(--petrol); text-decoration: underline; }

.menue { position: relative; }
.menue summary { list-style: none; cursor: pointer; min-height: 2.75rem; padding: .55rem 1.1rem; border: 1.5px solid var(--petrol); border-radius: var(--ecke-knopf); color: var(--petrol); font-weight: 700; }
.menue summary::-webkit-details-marker { display: none; }
.menue[open] summary { background: var(--petrol); color: var(--text-hell); }
.menue nav { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 10; min-width: 14rem; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--ecke); box-shadow: 0 18px 40px -18px rgb(15 76 92 / .35); overflow: hidden; }
.menue nav a { display: block; padding: .9rem 1.2rem; text-decoration: none; color: var(--text); font-weight: 700; }
.menue nav li + li { border-top: 1px solid var(--linie); }
@media (max-width: 47.99rem) { .kopf-nav { display: none; } }
@media (min-width: 48rem) { .menue { display: none; } }

/* ---------- 2 · Erster Bildschirm ---------- */
.held { padding-block: clamp(2rem, 4.5vw, 3.5rem) var(--abschnitt); }
.held-raster { display: grid; gap: 1.75rem; }
/* Handy: Öffnungszeiten und Termin vor dem Foto, damit sie ohne langes Scrollen zu sehen sind */
.infokarte { order: 2; }
.held-bild { order: 3; }
.held h1 {
  font-family: var(--schrift-titel);
  font-weight: 500;
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -.015em;
  max-width: 20ch;
}
.held-absatz { margin-top: 1rem; color: var(--text-leise); max-width: 40ch; }

.infokarte {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--ecke);
  box-shadow: 0 24px 48px -28px rgb(15 76 92 / .45);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: grid; gap: 1rem; align-content: start;
}
.infokarte-titel { font-family: var(--schrift-titel); font-weight: 600; font-size: 1.375rem; line-height: 1.2; }
.zeiten { width: 100%; border-collapse: collapse; }
.zeiten th, .zeiten td { padding: .55rem .6rem; border-top: 1px solid var(--linie); text-align: left; vertical-align: top; }
.zeiten tr:first-child th, .zeiten tr:first-child td { border-top: 0; }
.zeiten th { font-weight: 700; }
.zeiten td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.zeiten tr.heute th, .zeiten tr.heute td { background: var(--sand-hell); }
.zeiten tr.heute th::after { content: " (heute)"; font-weight: 400; color: var(--text-leise); }
.zeiten-hinweis { font-size: 1rem; color: var(--text-leise); }
.infokarte .knopf { justify-self: start; }
.infokarte-telefon { font-size: 1rem; }
.infokarte-telefon a { font-weight: 700; white-space: nowrap; }
.demo-meldung:empty { display: none; }
.demo-meldung { font-size: .9375rem; background: var(--sand-hell); padding: .6rem .8rem; border-radius: 8px; }

/* Großer Bildschirm: Text links oben, Karte links unten, Foto rechts über beide Zeilen.
   Der eine Regelbruch: die Karte ragt nach rechts in das Foto hinein. */
@media (min-width: 60rem) {
  .held-raster {
    grid-template-columns: 5fr 7fr;
    grid-template-areas: "text bild" "karte bild";
    column-gap: 3rem; row-gap: 2rem;
    align-items: start;
  }
  .held-text { grid-area: text; }
  .held-bild { grid-area: bild; align-self: start; align-items: flex-start; justify-content: flex-end; } /* Beschriftung oben rechts, die Karte verdeckt links unten */
  .infokarte { grid-area: karte; position: relative; z-index: 1; margin-right: -6rem; }
}

/* ---------- 3 · Ärztin ---------- */
.aerztin { padding-block: 0 var(--abschnitt); }
.aerztin-raster { display: grid; gap: 2rem; }
.aerztin-rolle { margin-top: .5rem; color: var(--text-leise); }
.aerztin-satz { margin-top: 1.5rem; max-width: 46ch; font-size: 1.25rem; line-height: 1.55; }
.aerztin-sprachen { margin-top: 1.25rem; font-size: 1rem; color: var(--text-leise); }
.werdegang { display: grid; gap: 1.25rem; border-top: 1px solid var(--linie); padding-top: 1.5rem; }
.werdegang li { display: grid; gap: .2rem; }
.jahr { font-family: var(--schrift-titel); font-weight: 600; font-size: 1.5rem; line-height: 1.1; color: var(--petrol); font-variant-numeric: lining-nums tabular-nums; }
@media (min-width: 48rem) {
  .aerztin-raster { grid-template-columns: 4fr 7fr; column-gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
  .werdegang { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); column-gap: 2rem; }
}

/* ---------- 4 · Leistungen zum Aufklappen ---------- */
.leistungen { padding-block: var(--abschnitt); border-top: 1px solid var(--linie); }
.leistungen-kopf p { margin-top: .75rem; color: var(--text-leise); }
.leistungen-liste { margin-top: 2rem; display: grid; gap: .75rem; align-items: start; }
.leistung { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--ecke); }
.leistung summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 3.75rem; padding: .9rem 1.25rem;
  font-weight: 700; font-size: 1.1875rem;
  border-radius: var(--ecke);
}
.leistung summary::-webkit-details-marker { display: none; }
/* Plus und Minus aus zwei Strichen, damit man sieht: hier klappt etwas auf */
.leistung summary::after {
  content: ""; flex: none; width: 1.25rem; height: 1.25rem;
  background:
    linear-gradient(var(--petrol), var(--petrol)) center / 100% 2px no-repeat,
    linear-gradient(var(--petrol), var(--petrol)) center / 2px 100% no-repeat;
}
.leistung[open] summary::after { background: linear-gradient(var(--petrol), var(--petrol)) center / 100% 2px no-repeat; }
.leistung summary:hover { color: var(--petrol); }
.leistung-inhalt { padding: 0 1.25rem 1.25rem; }
.leistung-inhalt p { max-width: 52ch; }
@media (min-width: 48rem) {
  .leistungen-liste { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
}

/* ---------- 5 · Preise ---------- */
.preise { background: var(--sand); padding-block: var(--abschnitt); }
.preise-raster { display: grid; gap: 2.25rem; }
.preise-text p { margin-top: 1rem; max-width: 44ch; }
.preise-hinweis { padding-top: 1rem; border-top: 1px solid rgb(28 42 46 / .25); }
.preisliste { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--karte); border-radius: var(--ecke); overflow: hidden; }
.preisliste th, .preisliste td { padding: .9rem 1.1rem; text-align: left; border-top: 1px solid var(--linie); vertical-align: top; }
.preisliste thead th { border-top: 0; font-size: .9375rem; font-weight: 400; color: var(--text-leise); }
.preisliste tbody th { font-weight: 700; }
.preisliste td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.preisliste td:last-child, .preisliste thead th:last-child { text-align: right; }
.preisliste td:last-child { font-family: var(--schrift-titel); font-weight: 600; font-size: 1.25rem; color: var(--petrol); }
@media (max-width: 29.99rem) {
  .preisliste th, .preisliste td { padding: .8rem .75rem; }
  .preisliste thead th:nth-child(2), .preisliste td:nth-child(2) { display: none; }
}
@media (min-width: 60rem) {
  .preise-raster { grid-template-columns: 5fr 6fr; gap: 4rem; align-items: start; }
}

/* ---------- 6 · Anfahrt und Barrierefreiheit ---------- */
.anfahrt { padding-block: var(--abschnitt); }
.anfahrt-adresse { margin-top: .75rem; font-weight: 700; }
.anfahrt-raster { margin-top: 2.25rem; display: grid; gap: 1.5rem; }
.weg { border-top: 1px solid var(--linie); padding-top: 1rem; }
.weg h3, .barrierefrei h3 { font-size: 1.1875rem; font-weight: 700; margin-bottom: .35rem; }
.barrierefrei { background: var(--sand); border-radius: var(--ecke); padding: clamp(1.25rem, 3vw, 1.75rem); }
.barrierefrei ul { display: grid; gap: .45rem; }
.barrierefrei li { padding-left: 1.4rem; position: relative; }
.barrierefrei li::before { content: ""; position: absolute; left: 0; top: .6em; width: .6rem; height: .35rem; border-left: 2px solid var(--petrol); border-bottom: 2px solid var(--petrol); transform: rotate(-45deg); }
@media (min-width: 60rem) {
  .anfahrt-raster { grid-template-columns: 4fr 4fr 4fr; grid-template-areas: "oeffi bf bild" "auto bf bild" "rad bf bild"; column-gap: 2.5rem; row-gap: 1.25rem; }
  .weg:nth-child(1) { grid-area: oeffi; }
  .weg:nth-child(2) { grid-area: auto; }
  .weg:nth-child(3) { grid-area: rad; }
  .barrierefrei { grid-area: bf; align-self: start; }
  .anfahrt-bild { grid-area: bild; align-self: start; }
}

/* ---------- Fuß ---------- */
.fuss { background: var(--petrol); color: var(--text-hell); padding-top: clamp(3rem, 6vw, 4.5rem); font-size: 1rem; --fokus: #f2eadb; }
.fuss a { color: var(--text-hell); }
.fuss-raster { display: grid; gap: 1.75rem; }
.fuss-marke { font-family: var(--schrift-titel); font-weight: 600; font-size: 1.25rem; margin-bottom: .6rem; }
.fuss address { font-style: normal; line-height: 1.7; }
.fuss-links { margin-top: .6rem; display: flex; gap: 1.25rem; }
.fuss-demo { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid rgb(238 243 242 / .25); font-size: .9375rem; }
/* D29: letzte Zeile, ganz unten mittig */
.fuss-zeile { width: 100%; max-width: none; text-align: center; padding: 1.5rem 1rem 1.25rem; font-size: .875rem; }
@media (min-width: 48rem) { .fuss-raster { grid-template-columns: 5fr 4fr 3fr; } }

/* ==========================================================================
   Bewegung (Grundstufe dieser Vorlage: starr)
   starr      – nichts bewegt sich, Knöpfe und Links wechseln nur die Farbe
   mittel     – Einblenden beim Scrollen, aufgeklappte Leistungen blenden weich ein
   dynamisch  – dazu: Empfangsfoto und Werdegang hängen am Scrollen
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  :root.js:not([data-bewegung="starr"]) [data-auftritt] { transition: opacity .7s var(--ease), transform .7s var(--ease); }
  :root.js:not([data-bewegung="starr"]) [data-auftritt]:not(.ist-sichtbar) { opacity: 0; transform: translateY(1rem); }
  :root:not([data-bewegung="starr"]) .held-text,
  :root:not([data-bewegung="starr"]) .infokarte { animation: rein .8s var(--ease) both; }
  :root:not([data-bewegung="starr"]) .infokarte { animation-delay: .15s; }
  :root:not([data-bewegung="starr"]) .leistung[open] .leistung-inhalt { animation: rein .45s var(--ease) both; }
  :root:not([data-bewegung="starr"]) .knopf { transition: background-color .2s, transform .2s var(--ease); }
  :root:not([data-bewegung="starr"]) .knopf:active { transform: scale(.98); }
}
@keyframes rein { from { opacity: 0; transform: translateY(.75rem); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    :root[data-bewegung="dynamisch"] .held-bild { animation: sanft-zurueck linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    :root[data-bewegung="dynamisch"] .werdegang li { animation: hoch linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
  }
}
@keyframes sanft-zurueck { to { transform: scale(.97); opacity: .7; } }
@keyframes hoch { from { opacity: 0; transform: translateY(2rem); } to { opacity: 1; transform: none; } }

/* Drucken: keine Bewegung, alles sichtbar */
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-auftritt] { opacity: 1 !important; transform: none !important; }
}
