/* kin-a.ch – Gestaltung. Rot nur aus dem Logo (#BD1E2D), Grund Sand, Flächen Rosé und Salbei, Text warmes Dunkelgrau.
   Kein JavaScript, keine fremden Quellen. Schriften lokal in /assets/fonts (OFL): Fraunces für Titel, Nunito für Text. */

@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/nunito-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/fraunces-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/fraunces-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/nunito-latin-700-normal.woff2") format("woff2"); }

:root {
  --rot: #BD1E2D;          /* Logo */
  --rot-dunkel: #9a1824;   /* Hover, Fehlertext */
  --text: #2e2a28;         /* warmes Dunkelgrau */
  --text-leise: #5c544f;
  --grund: #f5efe6;        /* Sand (auch in tools/bilder.py → blass) */
  --flaeche: #fffcf8;      /* Karten, Felder */
  --rosa: #f5e4df;         /* heller Ton aus dem Rot, nur Flächen */
  --salbei: #e3e8dc;       /* ruhiger Gegenton, nur Flächen */
  --fuss: #ebe1d4;         /* Fussbereich, dunkler Sand */
  --linie: #e3d8ca;
  --titel: "Fraunces", Georgia, "Times New Roman", serif;
  /* Weiche Bildränder: Bilder laufen am Rand in den Grund aus statt «aufgeklebt» zu wirken (mask-image). */
  --weich: 14%;
  --feldrand: #8a817b;     /* Formularfelder, ≥ 3:1 */
  --breit: 70rem;
  --text-breite: 38rem;    /* ≈ 68 Zeichen */
  --rand: clamp(1rem, 4vw, 2.5rem);
  --radius: 1rem;
}

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

html { overflow-x: clip; font-size: 112.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
}

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

h1, h2, h3 { font-family: var(--titel); font-weight: 600; line-height: 1.2; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; margin-top: 2.2em; }
h3 { font-size: 1.15rem; margin-top: 1.8em; }
p, ul, ol, dl, address { margin: 0 0 1.1em; }
strong { font-weight: 700; }

a { color: var(--rot); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--rot-dunkel); text-decoration-thickness: 2px; }

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

/* Barrierefreiheit */
.skip { position: absolute; left: -10000px; top: 0.75rem; z-index: 20; background: var(--flaeche); color: var(--text);
  padding: 0.6rem 1rem; border-radius: 0.5rem; font-weight: 700; }
.skip:focus { left: 0.75rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Kopf ---------- */
.kopf { border-bottom: 1px solid var(--linie); background: var(--grund); }
.kopf-innen {
  max-width: var(--breit); margin: 0 auto; padding: 0.9rem var(--rand) 0.6rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem;
}
.marke { display: flex; align-items: center; gap: 0.75rem; color: var(--text); text-decoration: none; }
.marke:hover { color: var(--text); }
.marke-logo { width: 3rem; height: auto; flex: none; }
.marke-text { font-family: var(--titel); font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.marke-text small { display: block; font-family: "Nunito", system-ui, sans-serif; font-weight: 400; font-size: 0.875rem; color: var(--text-leise); }

.hauptnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
.hauptnav a {
  display: inline-block; padding: 0.45rem 0; color: var(--text); text-decoration: none; font-weight: 600;
  border-bottom: 2px solid transparent;
}
.hauptnav a:hover { color: var(--rot); }
.hauptnav a[aria-current="page"] { color: var(--rot); border-bottom-color: var(--rot); }

/* ---------- Seiten ---------- */
main { display: block; }
.seite { max-width: var(--breit); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) var(--rand) clamp(3rem, 7vw, 5.5rem); }
.seite > h1, .seite > .inhalt, .seite > .hinweis, .seite > p { max-width: var(--text-breite); }
.inhalt > :first-child { margin-top: 0; }
.inhalt ul { padding-left: 1.25em; }
.inhalt li { margin-bottom: 0.35em; padding-left: 0.2em; }
.inhalt li::marker { color: var(--rot); }

/* Unternavigation «Kinesiologie»: ruhige Pillen unter dem Titel, brechen auf schmalen Bildschirmen um (kein Querscrollen). */
.unternav { margin: -0.2rem 0 2.25rem; }
.unternav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.unternav a {
  display: inline-block; padding: 0.4rem 0.95rem; border: 1px solid var(--linie); border-radius: 999px;
  background: var(--flaeche); color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 600; line-height: 1.35;
}
.unternav a:hover { border-color: var(--rot); color: var(--rot); }
.unternav a[aria-current="page"] { background: var(--rosa); border-color: var(--rosa); color: var(--rot-dunkel); }
.unternav a:focus-visible { border-radius: 999px; }

.hinweis {
  margin-top: 2.5rem; padding: 1rem 1.25rem; background: var(--salbei); border-radius: var(--radius);
  font-size: 0.9rem; color: var(--text);
}

/* ---------- Startseite: Kopfbereich ---------- */
/* Blasse Nebelwiese über die ganze Fensterbreite hinter dem Kopfbereich, unten weich in den Sand auslaufend.
   Bild: View::HINTERGRUND (tools/bilder.py → blass), ?v= wie View::ASSET_VERSION. */
.seite-start { padding-top: 0; }
.held {
  position: relative; isolation: isolate;
  display: grid; gap: 2.25rem; align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
}
.held::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: linear-gradient(to bottom, rgba(245, 239, 230, 0) 60%, var(--grund)),
    url("/assets/bilder/start-hintergrund-800.jpg?v=19") center 70% / cover no-repeat;
}
@media (min-width: 50rem) {
  .held::before {
    background-image: linear-gradient(to bottom, rgba(245, 239, 230, 0) 60%, var(--grund)),
      url("/assets/bilder/start-hintergrund-1190.jpg?v=19");
  }
}
.held h1 { margin-bottom: 0.35em; }
.held-name { font-size: 1.15rem; color: var(--text-leise); margin-bottom: 1.6rem; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

/* Porträt im Bogen, unten weich in den Grund auslaufend (kein Rahmen, kein versetzter Hintergrund). */
.held-bild {
  position: relative; margin: 0; width: min(78%, 20rem); justify-self: start;
}
.held-bild .foto {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  border-radius: 999px 999px 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
/* Solange kein Foto hochgeladen ist: Logo im hellen Bogen, ohne versetzten Hintergrund. */
.held-bild-logo {
  aspect-ratio: 4 / 5; display: grid; place-items: center;
  background: var(--rosa); border-radius: 999px 999px var(--radius) var(--radius);
}
.held-bild-logo::before { content: none; }
.held-bild-logo .foto-ersatz { width: 56%; margin-top: -8%; }

@media (min-width: 52rem) {
  .held { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 4rem; }
  .held-bild { justify-self: end; }
  .seite-start > .inhalt { margin-top: 0; }
}

/* Begrüssung: helles Rosé-Band über die ganze Breite, Text mittig, Unterschrift. */
.willkommen {
  position: relative; isolation: isolate; max-width: var(--text-breite); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.willkommen::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: var(--rosa);
}
.willkommen-gruss {
  font-family: var(--titel); font-style: italic; font-weight: 400; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  color: var(--rot-dunkel); margin-bottom: 0.8em; line-height: 1.2;
}
.willkommen .inhalt { font-size: 1.05rem; }
.unterschrift { font-family: var(--titel); font-style: italic; font-size: 1.3rem; color: var(--rot-dunkel); margin: 1.5rem 0 0; }
.unterschrift::before { content: "– "; }

/* Kacheln zu den Kinesiologie-Seiten (View::KACHELN). */
.kacheln { padding-top: clamp(2.5rem, 6vw, 4rem); }
.kacheln h2 { margin-top: 0; text-align: center; }
.kacheln ul { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 46rem) { .kacheln ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
/* Ohne Kartenrahmen: Bild läuft an allen Rändern weich aus, Text steht darunter auf dem Grund. */
.kachel { display: flex; flex-direction: column; height: 100%; color: var(--text); text-decoration: none; }
.kachel img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.kachel-titel { font-family: var(--titel); font-weight: 600; font-size: 1.2rem; line-height: 1.25; padding: 0.6rem 0.25rem 0.35rem; color: var(--text); }
.kachel-titel::after { content: "\00a0→"; color: var(--rot); }
.kachel-satz { padding: 0 0.25rem; color: var(--text-leise); font-size: 0.95rem; }
.kachel:hover { color: var(--text); }
.kachel:hover .kachel-titel { color: var(--rot-dunkel); }
.kachel:focus-visible { border-radius: var(--radius); }

/* ---------- Feste Bilder (View::BILDER) ---------- */

/* Kinesiologie-Seiten: breit rechts neben dem Text, schmal darunter (Text zuerst). */
.mit-bild > .inhalt, .seitenbild { max-width: var(--text-breite); }
.seitenbild { margin: 2rem 0 0; }
.seitenbild img { width: 100%; }
/* «ganz» (View::BILDER): Illustration auf Sand-Grund, teils mit Text – nur 3 % weicher Rand (Bänder beginnen bei ca. 4,5 %), damit nichts verblasst. */
.seitenbild.ganz img, .kachel img.ganz { --weich: 3%; }
/* «rand6»: Papiergrund mit unruhigem Rand, Motiv beginnt erst bei ca. 7,7 % (Stühle). */
.seitenbild.rand6 img, .kachel img.rand6 { --weich: 6%; }
/* Weiche Ränder für Unterseitenbilder und Kacheln: zwei Verläufe (waagrecht × senkrecht) als Maske. */
.seitenbild img, .kachel img {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--weich), #000 calc(100% - var(--weich)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--weich), #000 calc(100% - var(--weich)), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 var(--weich), #000 calc(100% - var(--weich)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--weich), #000 calc(100% - var(--weich)), transparent);
  mask-composite: intersect;
}

/* «Über mich»: Porträt im Bogenrahmen wie auf der Startseite (.held-bild), schmal über dem Text. */
.mit-portraet > .inhalt { max-width: var(--text-breite); }
.portraet { margin-bottom: 2.75rem; width: min(70%, 17rem, calc(45vh * 0.8)); }

/* Handy/Tablet: ganzes Bild, nie beschnitten, höchstens 60 % der Bildschirmhöhe (sonst im Querformat höher als der
   Bildschirm). Breite folgt dann aus dem Seitenverhältnis (width/height-Attribute). */
@media (max-width: 59.99rem) {
  .seitenbild img { width: auto; max-width: 100%; max-height: 60vh; }
}
@media (min-width: 60rem) {
  .mit-bild {
    display: grid; grid-template-columns: minmax(0, var(--text-breite)) minmax(16rem, 1fr);
    gap: clamp(2.5rem, 4vw, 4rem); align-items: start;
  }
  .mit-bild > .inhalt { grid-column: 1; grid-row: 1; }
  .mit-bild > .seitenbild { grid-column: 2; grid-row: 1; margin: 0.4rem 0 0; }
  .mit-portraet {
    display: grid; grid-template-columns: minmax(0, var(--text-breite)) minmax(14rem, 1fr);
    gap: clamp(2.5rem, 4vw, 4rem); align-items: start;
  }
  .mit-portraet > .inhalt { grid-column: 1; grid-row: 1; }
  .mit-portraet > .portraet { grid-column: 2; grid-row: 1; justify-self: center; width: min(100%, 19rem); margin: 0.4rem 0.9rem 0 0; }
}

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 3rem; padding: 0.7rem 1.5rem;
  background: var(--rot); color: #fff; border: 2px solid var(--rot); border-radius: 999px;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.knopf:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); color: #fff; }
.knopf-zwei { background: var(--flaeche); color: var(--rot); }
.knopf-zwei:hover { background: var(--rosa); color: var(--rot-dunkel); }
.knopf-nr { font-weight: 600; }
.knopf:focus-visible { outline-color: var(--text); border-radius: 999px; }

/* ---------- Kontakt ---------- */
.kontakt-raster { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
@media (min-width: 52rem) {
  .kontakt-raster { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4rem; align-items: start; }
}
.angaben {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.angaben address { font-style: normal; }
.angaben dl { margin: 1.25rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--linie);
  display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1.25rem; }
.angaben dt { color: var(--text-leise); }
.angaben dd { margin: 0; font-weight: 600; }

.anfrage h2 { margin-top: 0; }
.anfrage form p { margin-bottom: 1.25rem; }
label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.leise { font-weight: 400; color: var(--text-leise); }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  display: block; width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--flaeche); border: 1px solid var(--feldrand); border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
}
textarea { resize: vertical; min-height: 9rem; }
input:focus-visible, textarea:focus-visible { outline-offset: 1px; border-color: var(--rot); border-radius: 0.75rem; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--rot); border-width: 2px; padding: calc(0.7rem - 1px) calc(0.9rem - 1px); }
.fehler { display: block; margin-top: 0.35rem; color: var(--rot-dunkel); font-weight: 600; font-size: 0.9rem; }
.meldung { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.meldung-fehler { background: var(--rosa); color: var(--rot-dunkel); font-weight: 600; }
.meldung-ok { background: var(--flaeche); border: 1px solid var(--linie); }

/* ---------- Fuss ---------- */
.fuss { border-top: 1px solid var(--linie); background: var(--fuss); color: var(--text-leise); font-size: 0.9rem; }
.fuss-innen {
  max-width: var(--breit); margin: 0 auto; padding: 2.25rem var(--rand);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem;
}
.fuss address { font-style: normal; margin: 0; }
.fuss strong { color: var(--text); font-family: var(--titel); font-weight: 600; font-size: 1.05rem; }
.fuss-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.fuss a { color: var(--text-leise); }
.fuss a:hover { color: var(--rot); }
.fuss a[aria-current="page"] { color: var(--rot); }
.fuss-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 1rem; }
.fuss .wannja { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text-leise); }
.fuss .wannja img { display: block; height: 32px; width: auto; }
.fuss .wannja:hover span { text-decoration: underline; }
@media (max-width: 720px) { .fuss-rechts { align-items: flex-start; } }

/* ---------- Handy-Leiste (nur schmal) ---------- */
.handy-leiste { display: none; }
@media (max-width: 720px) {
  body { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
  .handy-leiste {
    display: flex; gap: 0.6rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
    background: var(--flaeche); border-top: 1px solid var(--linie);
    box-shadow: 0 -0.25rem 1rem rgba(46, 42, 40, 0.06);
  }
  .handy-leiste .knopf { flex: 1 1 0; padding-inline: 0.5rem; font-size: 0.95rem; white-space: nowrap; }
  .handy-leiste .knopf-zwei { flex-grow: 0.8; }
  /* Die Leiste unten übernimmt Anrufen/Termin – im Kopfbereich nicht doppelt zeigen. */
  .held .knoepfe { display: none; }
  .held-name { margin-bottom: 0; }
  .kopf-innen { padding-top: 0.75rem; }
  .marke-logo { width: 2.6rem; }
  .hauptnav { width: 100%; }
  .hauptnav ul { gap: 0 0.9rem; }
  .hauptnav a { font-size: 0.95rem; padding: 0.4rem 0 0.3rem; }
  .unternav { margin-bottom: 1.75rem; }
  /* Auf dem Handy erledigt die Leiste unten das Anrufen; Nummer bleibt im Knopf oben sichtbar. */
  .fuss-innen { padding-bottom: 1.75rem; }
}

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: no-preference) {
  .knopf, .hauptnav a, .unternav a, a { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
  .kachel { transition: transform 0.2s ease; }
  .kachel:hover { transform: translateY(-3px); }
}

/* ---------- Druck ---------- */
@media print {
  body { background: #fff; color: #000; padding: 0; font-size: 11pt; }
  .skip, .hauptnav, .unternav, .handy-leiste, .knoepfe, .anfrage, .held-bild-logo, .held::before, .willkommen::before, .kacheln, .seitenbild { display: none !important; }
  .portraet { width: 5cm; }
  .kopf, .fuss { border: 0; background: #fff; }
  .seite { padding: 1rem 0; }
  .held { display: block; }
  .held-bild { width: 6cm; margin-bottom: 1rem; }
  a { color: #000; text-decoration: none; }
  .angaben { border: 0; padding: 0; }
}

/* nur für Screenreader sichtbar */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
