/* ============================================================
   Privatpraxis fuer Psychotherapie LG
   Stilvorlage, abgeleitet aus
   template/Herzlich willkommen in der Psychotherapiepraxis.png

   Alle Laengen der Startseite sind in Vorlagen-Pixeln notiert und
   werden ueber die Einheit --u proportional skaliert.
   Vorlage: 1671 x 941 px.  1u = 1 Vorlagenpixel.
   ============================================================ */

:root{
  /* --- Farben, am Strichinneren der Glyphen gemessen --- */
  --grund:            #fcede6;   /* Seitengrund, in der Vorlage uniform */
  --headline:         #762235;   /* Serif-Ueberschrift                  */
  --headline-initial: #8a4552;   /* erstes Zeichen je Zeile, heller     */
  --text:             #6e162e;   /* Flieesstext                         */
  --navigation:       #661428;
  --wortmarke:        #631226;
  --akzent:           #e2886f;   /* die kurzen Striche                  */
  --karte:            #fbe4db;   /* Flaechen auf den Unterseiten        */
  --linie:            #efd3c8;
  --fuss:             #f6d8ce;

  /* --- Schriften ---
     Die Vorlage ist ein Rasterbild, Schriftnamen stehen nicht darin.
     Gewaehlt sind die Google-Fonts, deren Verhaeltnis x-Hoehe zu
     Versalhoehe und deren Zeilenbreiten der Vorlage am naechsten
     kommen (Messung siehe README):
       Noto Serif   x/Versal 0.755 gegen gemessene 0.738, Breite +2 px
       Nunito Sans  Zeilenbreiten -3 px und -0 px
     Zum Tauschen genuegt es, hier einen anderen Namen einzusetzen. */
  --schrift-serif: "Noto Serif", "Source Serif 4", Georgia, serif;
  --schrift-sans:  "Nunito Sans", "Open Sans", "Segoe UI", system-ui, sans-serif;

  /* --- Geometrie der Vorlage --- */
  --vorlage-breite: 1671;
  --hero-hoehe:     941;   /* Gesamthoehe der Vorlage       */
  --kopf-hoehe:     290;   /* Kopf endet unter dem Strich   */
  --wellen-top:     755;   /* Oberkante des Wellenbands     */

  /* --- Feinjustierung der Grundlinien, gegen die Vorlage gemessen --- */
  --nav-top:          72;
  --wortmarke-abstand: 10;
  --wortmarke-strich: 21;
  --hl-top:           16;
  --body-top:        215;
}

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

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

body{
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift-sans);
  overflow-x: hidden;
}

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

/* Sprungmarke fuer Tastatur und Screenreader */
.sprung{
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--headline); color: #fff;
  padding: .7em 1.2em; text-decoration: none;
}
.sprung:focus{ left: 0; }

:where(a, button, input, textarea, select, summary):focus-visible{
  outline: 3px solid var(--akzent);
  outline-offset: 3px;
}

/* ============================================================
   Buehne: der 1:1-Nachbau.
   .rahmen ist der Messbezug, .buehne leitet daraus --u ab.
   ============================================================ */
.rahmen{
  container-type: inline-size;
  width: 100%;
  max-width: calc(var(--vorlage-breite) * 1px);
  margin-inline: auto;
}
.buehne{
  --u: calc(100cqw / var(--vorlage-breite));
  position: relative;
}

/* ============================================================
   Kopf: Markenblock links, Navigation rechts
   ============================================================ */
.kopf{ position: relative; height: calc(var(--kopf-hoehe) * var(--u)); }

.marke{
  position: absolute;
  left: calc(78.5 * var(--u));
  top:  calc(26 * var(--u));
  width: calc(300 * var(--u));
  text-align: center;
  text-decoration: none;
}
.marke__bild{
  width: calc(230 * var(--u));
  margin-left: calc(29.5 * var(--u));
}
.marke__wort{
  display: block;
  margin: 0;
  padding-top: calc(var(--wortmarke-abstand) * var(--u));
  color: var(--wortmarke);
  text-transform: uppercase;
  white-space: nowrap;
  font-weight: 400;
}
/* Beide Zeilen stehen auf Grundlinien 216 u und 242 u der Vorlage,
   Abstand also 26 u. Die Sperrung ist so gerechnet, dass die
   Zeilenbreiten der Vorlage genau getroffen werden (247 u und 274 u);
   text-indent gleicht den Nachlauf am Zeilenende fuer die Zentrierung aus. */
.marke__wort > span{ display: block; line-height: calc(26 * var(--u)); }
.marke__wort-oben{
  font-size: calc(21.3 * var(--u));
  letter-spacing: calc(3.526 * var(--u));
  text-indent: calc(1.763 * var(--u));
}
.marke__wort-unten{
  font-size: calc(24.1 * var(--u));
  letter-spacing: calc(4.946 * var(--u));
  text-indent: calc(2.473 * var(--u));
}
.marke__strich{
  display: block;
  width:  calc(134 * var(--u));
  height: calc(4 * var(--u));
  margin: calc(var(--wortmarke-strich) * var(--u)) auto 0;
  background: var(--akzent);
}

/* --- Navigation --- */
.nav__liste{
  margin: 0; padding: 0; list-style: none;
  position: absolute; inset: 0;
}
.nav__punkt{ position: absolute; top: calc(var(--nav-top) * var(--u)); }
.nav__punkt:nth-child(1){ left: calc(823  * var(--u)); }
.nav__punkt:nth-child(2){ left: calc(994  * var(--u)); }
.nav__punkt:nth-child(3){ left: calc(1179 * var(--u)); }
.nav__punkt:nth-child(4){ left: calc(1356 * var(--u)); }
.nav__punkt:nth-child(5){ left: calc(1533 * var(--u)); }
.nav__punkt > a{
  display: block;
  transform: translateX(-50%);
  font-size: calc(27 * var(--u));
  line-height: calc(34 * var(--u));
  font-weight: 400;
  color: var(--navigation);
  text-decoration: none;
  white-space: nowrap;
  padding: 0 calc(5 * var(--u)) calc(6 * var(--u));
  border-bottom: calc(4 * var(--u)) solid transparent;
}
.nav__punkt > a:hover,
.nav__punkt > a:focus-visible{ border-bottom-color: #efb9a4; }
.nav__punkt > a[aria-current="page"]{ border-bottom-color: var(--akzent); }

/* ============================================================
   Hero der Startseite, 1:1 nach Vorlage
   ============================================================ */
.hero{
  position: relative;
  height: calc((var(--wellen-top) - var(--kopf-hoehe)) * var(--u));
}

.hero__text{ position: absolute; left: calc(93 * var(--u)); top: 0; }

.hero__titel{
  margin: 0;
  position: absolute;
  top: calc(var(--hl-top) * var(--u));
  left: 0;
  font-family: var(--schrift-serif);
  font-size: calc(59 * var(--u));
  line-height: calc(68 * var(--u));
  font-weight: 400;
  color: var(--headline);
  white-space: nowrap;
}
/* In der Vorlage ist das erste Zeichen jeder Zeile heller gesetzt. */
.hero__titel .initial{ color: var(--headline-initial); }
.hero__titel .zeile{ display: block; }
.hero__titel .zeile--eins{ letter-spacing: calc(-0.198 * var(--u)); }
/* Zeile 2 ist in der Vorlage 770 u breit, Noto Serif liefert bei gleicher
   Versalhoehe nur 736 u. Die Sperrung von 1.353 u (0.023 em) schliesst die
   Luecke; siehe README, Abschnitt Abweichungen. */
.hero__titel .zeile--zwei{
  letter-spacing: calc(1.353 * var(--u));
  text-indent: calc(-1.353 * var(--u));
}

.hero__strich{
  position: absolute;
  left: calc(1 * var(--u));
  top:  calc(184 * var(--u));
  width:  calc(155 * var(--u));
  height: calc(4 * var(--u));
  background: var(--akzent);
}

.hero__fliess{
  position: absolute;
  left: calc(2 * var(--u));
  top: calc(var(--body-top) * var(--u));
  width: calc(815 * var(--u));
}
.hero__fliess p{
  margin: 0 0 calc(16 * var(--u));
  font-size: calc(29.8 * var(--u));
  line-height: calc(36 * var(--u));
  font-weight: 400;
}
.hero__fliess p:last-child{ margin-bottom: 0; }

.hero__portrait{
  position: absolute;
  left: calc(995 * var(--u));
  top:  calc((198 - 290) * var(--u));
  width: calc(557 * var(--u));
}

/* ============================================================
   Wellenband, laeuft ueber die ganze Fensterbreite
   ============================================================ */
/* Das Band ist 1671 u breit wie die Vorlage. Fuer breitere Fenster
   setzt wellen-breit.png die Randspalten nach aussen fort, damit
   keine Kante entsteht und die Mitte trotzdem 1:1 bleibt. */
.wellen{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: calc(186 * var(--u));
  background: url("../img/wellen-breit.png") center top / calc(3341 * var(--u)) calc(186 * var(--u)) no-repeat;
  pointer-events: none;
  user-select: none;
}
/* Portrait reicht 23 u in das Band hinein und muss davor liegen. */
.kopf, .hero{ position: relative; z-index: 2; }
.wellen{ position: relative; z-index: 1; }

/* ============================================================
   Unterseiten
   ============================================================ */
.kopfband{
  padding: 1rem 0 0;
}
.kopfband__bild{
  width: 100%;
  height: clamp(120px, 15vw, 210px);
  object-fit: cover;
  object-position: center 60%;
}

.inhalt{
  max-width: 1671px;
  margin-inline: auto;
  padding: 3rem clamp(1.25rem, 5.5vw, 5.75rem) 0;
}
.inhalt > * + *{ margin-top: 3rem; }

.seitentitel{
  margin: 0 0 1rem;
  font-family: var(--schrift-serif);
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  line-height: 1.16;
  font-weight: 400;
  color: var(--headline);
}
.seitentitel .initial{ color: var(--headline-initial); }

.vorspann{
  max-width: 46rem;
  font-size: clamp(1.06rem, 1.5vw, 1.3rem);
  line-height: 1.62;
}

.strich{
  width: 155px; height: 4px; border: 0; margin: 1.75rem 0;
  background: var(--akzent);
}

h2{
  margin: 0 0 .9rem;
  font-family: var(--schrift-serif);
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  line-height: 1.26;
  font-weight: 400;
  color: var(--headline);
}
h3{
  margin: 0 0 .5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--headline);
}
p, li{ font-size: 1.06rem; line-height: 1.68; }
.abschnitt{ max-width: 46rem; }
.abschnitt p + p,
.abschnitt ul + p,
.abschnitt p + ul{ margin-top: 1rem; }
.abschnitt ul{ padding-left: 1.3rem; }
.abschnitt li + li{ margin-top: .4rem; }

/* Platzhalter: deutlich erkennbar, damit nichts versehentlich
   als fertiger Text online geht. */
.platzhalter{
  border-left: 4px solid var(--akzent);
  background: #fdf3ee;
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  font-size: 1rem;
  line-height: 1.6;
}
.platzhalter::before{
  content: "Noch zu schreiben";
  display: block;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #a85a3c;
  margin-bottom: .45rem;
}
.platzhalter > :last-child{ margin-bottom: 0; }

.karten{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.karte{
  background: var(--karte);
  border-radius: 18px;
  padding: 1.6rem 1.5rem;
}
.karte > :last-child{ margin-bottom: 0; }

.zweispalt{
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: start;
}

/* Zierkreis aus lokal erzeugtem Aquarell, greift das Logomotiv auf. */
.zierkreis{
  width: min(100%, 300px);
  border-radius: 50%;
  margin-top: 2.75rem;
}

/* --- Notfaelle --- */
.notruf{
  max-width: 46rem;
  background: #fff6f1;
  border: 2px solid var(--akzent);
  border-radius: 18px;
  padding: 1.5rem 1.6rem;
}
.notruf > :last-child{ margin-bottom: 0; }
.nummern{ list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.nummern li{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .4rem 1.5rem;
  align-items: baseline;
  padding: .9rem 0;
  border-bottom: 1px solid var(--linie);
}
.nummern li:last-child{ border-bottom: 0; }
.nummern li > :last-child{ justify-self: end; text-align: right; }
.nummern b{ font-weight: 600; color: var(--headline); }
.nummern small{ display: block; font-size: .92rem; opacity: .82; line-height: 1.5; }
.nummer{
  font-family: var(--schrift-serif);
  font-size: 1.4rem;
  color: var(--headline);
  white-space: nowrap;
  text-decoration: none;
  justify-self: end;
}
.nummer:hover{ text-decoration: underline; }

/* --- Kontaktformular --- */
.formular{ max-width: 34rem; }
.feld{ margin-bottom: 1.15rem; }
.feld label{
  display: block; font-size: .95rem; font-weight: 600;
  margin-bottom: .35rem; color: var(--headline);
}
.feld input, .feld textarea{
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #fff8f4;
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: .7rem .85rem;
}
.feld textarea{ min-height: 9rem; resize: vertical; }
.feld--wahl{ display: flex; gap: .7rem; align-items: flex-start; }
.feld--wahl input{ width: auto; margin-top: .35rem; }
.feld--wahl label{ font-weight: 400; font-size: .95rem; margin: 0; }
.knopf{
  font: inherit; font-weight: 600;
  background: var(--headline); color: #fff;
  border: 0; border-radius: 999px;
  padding: .8rem 1.9rem;
  cursor: pointer;
}
.knopf:hover{ background: #8a2a40; }

.hinweis{
  font-size: .95rem;
  background: var(--karte);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  max-width: 46rem;
}
.hinweis > :last-child{ margin-bottom: 0; }

/* ============================================================
   Fuss
   ============================================================ */
.fuss{
  background: var(--fuss);
  color: var(--headline);
  padding: 2.5rem 0 2rem;
  margin-top: 4rem;
}
.fuss__innen{
  max-width: 1671px; margin-inline: auto;
  padding: 0 clamp(1.25rem, 5.5vw, 5.75rem);
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem;
  align-items: baseline; justify-content: space-between;
  font-size: .95rem;
}
.fuss p{ font-size: .95rem; margin: 0; }
.fuss a{ text-decoration: none; }
.fuss a:hover{ text-decoration: underline; }
.fuss__wege{
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem;
  margin: 0; padding: 0; list-style: none;
}
.fuss__wege li{ font-size: .95rem; }

/* ============================================================
   Schmalformat. Unter 980 px wird aus der 1:1-Buehne ein
   gestapelter Fluss, sonst waere die Schrift unlesbar klein.
   Alle Elemente, die oben absolut sitzen, werden hier
   ausdruecklich in den Fluss zurueckgeholt: position, width und
   max-width zusammen, damit keine Restbreite stehenbleibt.
   ============================================================ */
@media (max-width: 980px){
  .rahmen{ container-type: normal; max-width: none; }
  .buehne{ --u: 1px; }

  /* --- Kopf --- */
  .kopf{
    height: auto;
    padding: 1.5rem clamp(1.25rem, 5vw, 2.5rem) 0;
  }
  .marke{
    position: static;
    width: auto; max-width: 100%;
    display: block;
    text-align: left;
  }
  .marke__bild{ width: 142px; margin-left: 0; }
  .marke__wort{ padding-top: .6rem; }
  .marke__wort > span{ line-height: 1.5; letter-spacing: .16em; text-indent: 0; }
  .marke__wort-oben{ font-size: 13px; }
  .marke__wort-unten{ font-size: 15px; }
  .marke__strich{ display: block; margin: .9rem 0 0; width: 84px; height: 3px; }

  /* --- Navigation --- */
  .nav__liste{
    position: static; inset: auto;
    display: block;
    margin-top: 1.4rem;
  }
  .nav__punkt,
  .nav__punkt:nth-child(1),
  .nav__punkt:nth-child(2),
  .nav__punkt:nth-child(3),
  .nav__punkt:nth-child(4),
  .nav__punkt:nth-child(5){
    position: static; left: auto; top: auto;
  }
  .nav__punkt > a{
    transform: none;
    display: inline-block;
    font-size: 1.06rem; line-height: 1.5;
    padding: .4rem 0; border-bottom-width: 2px;
  }

  /* --- Hero --- */
  .hero{
    display: block;
    position: static;
    height: auto;
    padding: 1.75rem 0 0;
  }
  .hero__text{
    position: static;
    left: auto; top: auto;
    padding-inline: clamp(1.25rem, 5vw, 2.5rem);
  }
  .hero__titel,
  .hero__fliess,
  .hero__strich{
    position: static;
    left: auto; top: auto;
    width: auto; max-width: 100%;
  }
  .hero__titel{
    font-size: clamp(1.8rem, 6.6vw, 3rem);
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: break-word;
  }
  .hero__titel .zeile{ display: inline; }
  /* Die Vorlagenumbrueche gelten nur im Breitformat. */
  .umbruch{ display: none; }
  .hero__strich{
    display: block;
    width: 120px; height: 4px;
    margin: 1.4rem 0;
  }
  .hero__fliess p{
    font-size: 1.06rem; line-height: 1.6;
    margin-bottom: 1.05rem;
  }
  .hero__portrait{
    position: static;
    left: auto; top: auto;
    width: min(78%, 340px);
    margin: 2rem auto 0;
  }

  /* --- Wellenband --- */
  .wellen{
    width: 100vw; margin-left: calc(50% - 50vw);
    height: clamp(64px, 11.5vw, 120px);
    background-size: auto 100%;
  }

  /* --- Unterseiten --- */
  .inhalt{ padding-top: 2rem; }
  .inhalt > * + *{ margin-top: 2.25rem; }
  .zweispalt{ grid-template-columns: 1fr; }
  .zweispalt img{ width: min(78%, 320px); margin-inline: auto; }
  .nummern li{ grid-template-columns: 1fr; }
  .nummer{ justify-self: start; }
  .kopfband__bild{ height: clamp(90px, 26vw, 150px); }
  .fuss{ margin-top: 2.5rem; }
  .fuss__innen{ display: block; }
  .fuss__wege{ margin-top: 1rem; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
