/* Entwurf 1 «Briefkopf». Siehe DESIGN.md.
   Eine Schrift (Source Serif 4), Kanzleiblau auf Papier, Messing nur für eine Linie und die Marke am Fachanwaltstitel. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
/* Ersatzschrift mit angeglichenen Maßen, damit der Text beim Nachladen nicht springt. */
@font-face {
  font-family: "Briefkopf Ersatz";
  src: local("Georgia");
  size-adjust: 96%;
  ascent-override: 104%;
  descent-override: 34%;
  line-gap-override: 0%;
}

:root {
  --papier: #ffffff;
  --tinte: #101c2e;
  --blau: #1e3f74;
  --durchschlag: #edf1f6;
  --bleistift: #566273;
  --messing: #8a6a1f;
  --rand: 1.25rem;
}

body {
  font-family: "Source Serif 4", "Briefkopf Ersatz", Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis: none;
  overflow-wrap: break-word;
  color: var(--tinte);
  background: var(--papier);
}
a { color: var(--blau); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }
h1, h2, p, dl, dd, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

.bogen { display: grid; grid-template-columns: minmax(0, 1fr); }

/* Kopf: der Name der Kanzlei, darunter die Messinglinie. */
.kopf { padding: 4.75rem var(--rand) 0; }
.kopf-name {
  font-size: 2.44rem;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--blau);
  text-wrap: balance;
  hyphens: auto;
}
.kopf-voll { margin-top: 0.45rem; color: var(--bleistift); max-width: 30em; }
.kopf::after { content: ""; display: block; width: 4.5rem; height: 3px; margin-top: 1.1rem; background: var(--messing); }
.kopf-beispiel { margin-top: 0.6rem; font-size: 0.875rem; color: var(--bleistift); }

/* Randspalte des Briefbogens: Kontakt und Personen. Auf dem Telefon zuerst der Kontakt. */
.rand { padding: 1.4rem var(--rand) 0; }
.kontakt { display: grid; gap: 0.55rem; font-variant-numeric: tabular-nums lining-nums; }
.kontakt-zeile { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); column-gap: 0.75rem; align-items: first baseline; }
.kontakt dt { font-size: 0.875rem; color: var(--bleistift); }
.kontakt a { display: block; width: fit-content; max-width: 100%; padding-block: 0.45rem; }
.kontakt-telefon a { font-size: 1.5625rem; line-height: 1.2; font-weight: 600; text-decoration-thickness: 2px; }
.kontakt-mail a { font-size: 1rem; font-weight: 600; padding-block: 0.6rem; }
.route { font-size: 0.9375rem; }

.personen { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--blau); }
.personen-liste { display: grid; gap: 1.05rem; }
.person { display: grid; }
.person-beruf, .person-seit { font-size: 0.875rem; color: var(--bleistift); line-height: 1.35; }
.person-name { font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
/* Fachanwaltstitel: eigene Zeile mit Messingmarke – ein anderes Gewicht als ein bloß genanntes Rechtsgebiet. */
.person-titel { position: relative; padding-left: 0.95rem; font-size: 0.9375rem; line-height: 1.4; }
.person-titel::before { content: ""; position: absolute; left: 0; top: 0.52em; width: 0.42rem; height: 0.42rem; background: var(--messing); }
.personen-weitere { margin-top: 1.05rem; }
.personen-weitere summary { cursor: pointer; padding-block: 0.55rem; color: var(--blau); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.personen-weitere[open] summary { margin-bottom: 0.5rem; }

/* Das Schreiben: Fließtext, linksbündig, Zeile höchstens etwa 68 Zeichen. */
.schreiben { padding: 0 var(--rand) 3rem; }
.schreiben > section, .bild { margin-top: 2.75rem; max-width: 40rem; }
.schreiben h2 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; margin-bottom: 0.7rem; }
.schreiben p + p { margin-top: 0.7rem; }
.wer { font-weight: 600; }
.beispiel { font-size: 0.875rem; color: var(--bleistift); }

.fach { display: grid; gap: 0.85rem; margin-bottom: 1rem; }
.fach dt { position: relative; padding-left: 0.95rem; font-weight: 600; }
.fach dt::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.42rem; height: 0.42rem; background: var(--messing); }
.fach dd { padding-left: 0.95rem; font-size: 0.9375rem; color: var(--bleistift); }

.melden { display: grid; gap: 0.35rem; justify-items: start; }
.melden a { padding-block: 0.4rem; font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums lining-nums; }

/* Rückruf-Zettel: der linierte Block, der beim Telefon liegt. */
.zettel { padding: 1.3rem 1.2rem 1.5rem; background: var(--durchschlag); }
.zettel .anfrage { gap: 1.05rem; }
.zettel label { font-size: 0.9375rem; color: var(--bleistift); }
.zettel input {
  border: 0;
  border-bottom: 1px solid var(--tinte);
  border-radius: 0;
  background: transparent;
  color: var(--tinte);
  padding-inline: 0.1rem;
}
.anfrage button { border: 1px solid var(--blau); border-radius: 2px; background: var(--blau); color: var(--papier); font-weight: 600; }
.anfrage button.leise { background: transparent; color: var(--blau); }
.anfrage-klein { color: var(--bleistift); }

.bild img { width: 100%; }
.bild figcaption { margin-top: 0.35rem; font-size: 0.875rem; color: var(--bleistift); }

.weg { display: grid; gap: 0.6rem; margin-top: 1rem; }
.weg dt { font-size: 0.875rem; color: var(--bleistift); }

.fuss { margin-top: 3.25rem; padding-top: 1.2rem; border-top: 1px solid var(--blau); max-width: 40rem; font-size: 0.9375rem; display: grid; gap: 0.6rem; }
.fuss a { margin-right: 0.9rem; display: inline-block; padding-block: 0.25rem; }
.fuss-muster, .fuss-autor { color: var(--bleistift); }

/* Sehr schmal (Telefon mit 200 % Zoom): Kontakt einspaltig, lange Wörter dürfen trennen. */
@media (max-width: 22rem) {
  body { hyphens: auto; }
  .kopf-name { font-size: 1.95rem; }
  .kontakt-zeile { grid-template-columns: minmax(0, 1fr); }
  .kontakt-telefon a { font-size: 1.35rem; }
  .kontakt-mail a, .melden a { overflow-wrap: anywhere; }
  .zettel { padding-inline: 0.8rem; }
}

/* Breiter Bildschirm: links das Schreiben mit breitem Briefrand, rechts die Randspalte des Bogens. */
@media (min-width: 60rem) {
  :root { --rand: clamp(2.5rem, 9vw, 9rem); }
  .bogen {
    grid-template-columns: minmax(0, 1fr) 20.5rem;
    grid-template-areas: "kopf rand" "text rand";
    min-height: 100vh;
  }
  .kopf { grid-area: kopf; padding: 4.5rem 3rem 0 var(--rand); }
  .kopf-name { font-size: 3.4rem; }
  .schreiben { grid-area: text; padding: 0.5rem 3rem 4rem var(--rand); }
  body { font-size: 1.125rem; }
  .rand { grid-area: rand; padding: 0; background: var(--durchschlag); }
  /* Personen oben, Kontakt darunter – wie auf dem gedruckten Bogen. */
  .rand-innen { display: flex; flex-direction: column; font-size: 1.0625rem; }
  .rand-innen > .personen { order: 1; margin: 0; padding: 5.5rem 1.6rem 0; border-top: 0; }
  .rand-innen > .kontakt { order: 2; margin: 1.5rem 1.6rem 2rem; padding-top: 1.3rem; border-top: 1px solid var(--blau); }
  .kontakt-zeile { grid-template-columns: minmax(0, 1fr); }
  .kontakt-telefon a { font-size: 1.4rem; }
  .kontakt-mail a { font-size: 1rem; }
  .person-name { font-size: 1.125rem; }
  .personen-weitere summary { display: none; }
}
/* Die Randspalte bleibt stehen, wenn sie in die Höhe des Fensters passt (bei kleinen Kanzleien). */
@media (min-width: 60rem) and (min-height: 46rem) {
  .rand.kurz .rand-innen { position: sticky; top: 0; }
}
