/* ============================================================
   MÜLLER HOFSTEDE · Rechtsanwalt Steuerberater
   Zentrales Stylesheet — Entwurf 2026
   Aufbau: Grundlagen · Kopf · Held · Abschnitte · Bausteine ·
           Fuß · Anpassungen für große Bildschirme
   (Mobile first: Grundregeln gelten fürs Handy, @media erweitert.)
   ============================================================ */

/* ---------- Schriften (lokal, kein externer Abruf) ---------- */
@font-face {
  font-family: "Open Sans";
  src: url("../schriften/opensans-300.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../schriften/opensans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../schriften/opensans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../schriften/opensans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Gestaltungswerte ---------- */
:root {
  --akzent: #1e3a5f;         /* Akzentfarbe: seriöses Dunkelblau (zuvor Kanzleirot #d02239) */
  --akzent-dunkel: #16304d;
  --tinte: #26282d;          /* Überschriften, dunkle Flächen */
  --text: #33363c;
  --gedeckt: #63676f;        /* Nebentexte */
  --papier: #ffffff;
  --sand: #f4f2ee;           /* helle Wechselflächen */
  --linie: #e4e1da;
  --dunkelrot: #8b1a22;      /* Rubriktitel der Kompetenzen-Kacheln */
  --schrift: "Open Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --breite: 68rem;           /* max. Inhaltsbreite */
  --radius: 4px;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--papier);
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;   /* lange Komposita nie über den Rand laufen lassen */
}
/* Schmale Handys: lange deutsche Wörter (z. B. „Berufshaftpflichtversicherer")
   regelgerecht trennen statt umzubrechen */
@media (max-width: 699px) {
  p, li, h1, h2, h3, address { -webkit-hyphens: auto; hyphens: auto; }
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--akzent-dunkel); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--akzent); }
h1, h2, h3, h4 { color: var(--tinte); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 300; letter-spacing: -0.01em; }
h1 strong, .stark { font-weight: 700; }
h2 { font-size: clamp(1.45rem, 3.5vw, 2rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
li { margin-bottom: 0.35em; }
.container { max-width: var(--breite); margin: 0 auto; padding: 0 1.25rem; }
.eng { max-width: 46rem; }

/* Vorspann-Zeile über Überschriften */
.vorzeile {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--akzent); margin-bottom: 0.9rem;
}

/* Sprung-Link für Tastatur/Vorlesesoftware */
.sprunglink {
  position: absolute; left: -999px; top: 0;
  background: var(--tinte); color: #fff; padding: 0.5rem 1rem; z-index: 99;
}
.sprunglink:focus { left: 0; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* ---------- Kopfbereich ---------- */
.kopf {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--linie);
}
.kopf-innen {
  max-width: var(--breite); margin: 0 auto; padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4.25rem; gap: 1rem;
}
.marke { display: flex; align-items: center; }
.marke img { height: 2rem; width: auto; }

/* Ausklapp-Menü (ohne JavaScript, über verstecktes Kontrollkästchen) */
.menue-schalter { position: absolute; opacity: 0; pointer-events: none; }
.menue-knopf {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 2.6rem; height: 2.6rem; padding: 0.55rem;
  cursor: pointer; border: 1px solid var(--linie); border-radius: var(--radius);
}
.menue-knopf span { display: block; height: 2px; background: var(--tinte); transition: transform 0.2s, opacity 0.2s; }
.menue-schalter:checked ~ .menue-knopf span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menue-schalter:checked ~ .menue-knopf span:nth-child(2) { opacity: 0; }
.menue-schalter:checked ~ .menue-knopf span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menue-schalter:focus-visible ~ .menue-knopf { outline: 2px solid var(--akzent); outline-offset: 2px; }
.hauptmenue {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--linie);
  box-shadow: 0 12px 24px rgba(38, 40, 45, 0.08);
}
.menue-schalter:checked ~ .hauptmenue { display: block; }
.hauptmenue ul { list-style: none; margin: 0; padding: 0.5rem 0; }
.hauptmenue li { margin: 0; }
.hauptmenue a {
  display: block; padding: 0.8rem 1.5rem;
  color: var(--tinte); text-decoration: none; font-weight: 600; font-size: 0.98rem;
}
.hauptmenue a:hover { background: var(--sand); color: var(--akzent-dunkel); }
.hauptmenue a[aria-current="page"] { color: var(--akzent); }

/* ---------- Held (Startbereich mit Foto) ---------- */
.held { position: relative; background: var(--sand); overflow: hidden; }
/* Die Bildhöhe wächst mit der Breite, sodass stets mindestens 3/4 der
   Bildhöhe sichtbar bleiben: --sichtformat = Bildbreite / (0,75 × Bildhöhe),
   Standard für die Porträts 1751×853; die Startseite setzt ihren Wert am Bild.
   Höchstens bildschirmhoch (abzüglich Kopfzeile). */
.held-bild img {
  width: 100%; height: auto; aspect-ratio: var(--sichtformat, 2.74);
  min-height: max(15rem, 38vh); max-height: calc(100vh - 4.5rem);
  object-fit: cover; object-position: 70% 25%;
}
/* Unter 1150 px steht der Text unter dem Bild — mit demselben Seitenrand wie der übrige Inhalt */
.held-text { padding: 2.25rem 1.25rem 2.75rem; }
.held-text-innen { max-width: calc(var(--breite) - 2.5rem); margin: 0 auto; }
/* Name auf der Rechtsanwalt-Seite: stets einzeilig */
.name-zeile { font-size: clamp(1.5rem, 7.5vw, 2.75rem); }
.held-text p.gross { font-size: 1.15rem; color: var(--gedeckt); max-width: 34em; }
.knopfzeile { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.knopf {
  display: inline-block; padding: 0.7rem 1.4rem;
  border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent;
}
.knopf-voll { background: var(--akzent); color: #fff; }
.knopf-voll:hover { background: var(--akzent-dunkel); color: #fff; }
.knopf-rahmen { border-color: var(--tinte); color: var(--tinte); }
.knopf-rahmen:hover { border-color: var(--akzent); color: var(--akzent-dunkel); }
.knopf-hell { border-color: rgba(255,255,255,0.7); color: #fff; }
.knopf-hell:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.12); }
/* ---------- Abschnitte ---------- */
.abschnitt { padding: 3.25rem 0; }
.abschnitt-sand { background: var(--sand); }
.abschnitt-kopf { max-width: 46rem; margin-bottom: 2rem; }

/* Dunkles Bildband (BGB-Kommentare) */
.band { position: relative; color: #fff; }
.band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; background: rgba(24, 26, 32, 0.72); }
.band-innen { position: relative; z-index: 1; padding: 3.5rem 0; }
.band h1, .band h2, .band p { color: #fff; }
.band .vorzeile { color: #a9c3e2; }
.band p { max-width: 38em; }
/* Heller Abschlussbalken der Startseite; schließt direkt an die Fußzeile an */
.abschluss { border-top: 1px solid var(--linie); }
.abschluss p { max-width: 38em; }
.fuss.fuss-anschluss { margin-top: 0; }

/* ---------- Bausteine ---------- */
.kartenraster { display: grid; gap: 1.25rem; }
.karte {
  background: #fff; border: 1px solid var(--linie); border-top: 3px solid var(--akzent);
  border-radius: var(--radius); padding: 1.5rem 1.5rem 1.25rem;
  display: flex; flex-direction: column;
}
.karte h3 { margin-bottom: 0.5rem; }
.karten-rot .karte h3 { color: var(--dunkelrot); }
.karte ul { margin: 0 0 1rem; color: var(--gedeckt); font-size: 0.97rem; }
.karte .weiter { margin-top: auto; font-weight: 600; text-decoration: none; }
.karte .weiter::after { content: " →"; }

/* Bild-Text-Reihen (Arbeitsweise-Seite) */
.reihe { display: grid; gap: 1.5rem; align-items: center; margin-bottom: 3rem; }
.reihe img { border-radius: var(--radius); width: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
/* Rechtsanwalt-Seite: rechter Block beginnt auf Höhe des Werdegangs */
.reihe-oben { align-items: start; }
.reihe-oben h2:first-child { margin-top: 0; }

/* Lebenslauf-Zeitleiste */
.zeitleiste { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--linie); }
.zeitleiste li { position: relative; padding: 0 0 1.4rem 1.5rem; }
.zeitleiste li::before {
  content: ""; position: absolute; left: -6px; top: 0.5rem;
  width: 10px; height: 10px; border-radius: 50%; background: var(--akzent);
}
.zeitleiste .jahr { display: block; font-weight: 700; color: var(--tinte); font-size: 0.95rem; letter-spacing: 0.04em; }

/* Arbeitsweise: Punkt fliegt vom rechten Rand auf die Linie, danach blendet der
   Text ein. js/einflug.js setzt .einflug-aktiv und je Eintrag .gelandet; ohne das
   Skript bleibt alles sichtbar. Nur für den Bildschirm, damit der Druck vollständig ist. */
@media screen {
  .einflug-aktiv { --flugzeit: 0.35s; }
  .einflug-aktiv li:not(.gelandet), .einflug-aktiv li:not(.gelandet) .jahr { color: transparent; }
  .einflug-aktiv li:not(.gelandet)::before { opacity: 0; transform: translateX(var(--flug, 100vw)); }
  .einflug-aktiv li.gelandet::before {
    transition: transform var(--flugzeit) cubic-bezier(0.5, 0, 1, 0.6) var(--verzug, 0s), opacity 0.08s linear var(--verzug, 0s);
    animation: einflug-treffer 0.55s ease-out calc(var(--verzug, 0s) + var(--flugzeit));
  }
  .einflug-aktiv li.gelandet, .einflug-aktiv li.gelandet .jahr {
    transition: color 0.7s ease calc(var(--verzug, 0s) + var(--flugzeit));
  }
  /* Die Zwischenüberschrift leuchtet beim Auftreffen kurz auf */
  .einflug-aktiv li.gelandet .jahr {
    animation: einflug-leuchten 0.6s ease-out calc(var(--verzug, 0s) + var(--flugzeit));
  }
  /* Werdegang (Rechtsanwalt): gleicher Ablauf, die Punkte blenden aber nur ein */
  .zeitleiste-einblenden.einflug-aktiv { --flugzeit: 0.2s; }
  .zeitleiste-einblenden.einflug-aktiv li:not(.gelandet)::before { transform: none; }
  .zeitleiste-einblenden.einflug-aktiv li.gelandet::before {
    transition: opacity 0.25s ease var(--verzug, 0s);
  }
}
@keyframes einflug-leuchten {
  0%, 100% { text-shadow: 0 0 0 rgba(77, 163, 255, 0); }
  50% { text-shadow: 0 0 10px rgba(77, 163, 255, 0.7); }
}
@keyframes einflug-treffer {
  from { box-shadow: 0 0 0 0 rgba(30, 58, 95, 0.5); }
  to { box-shadow: 0 0 0 11px rgba(30, 58, 95, 0); }
}

/* Porträt auf der Personen-Seite */
.portraet { border-radius: var(--radius); object-fit: cover; }

/* Hinweiskasten (z. B. Entwurfsvermerke, leere Rubrik) */
.hinweis {
  background: var(--sand); border-left: 3px solid var(--akzent);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--gedeckt); font-size: 0.98rem;
}

/* Kontaktkarten */
.kontaktzeile { display: grid; gap: 1.25rem; }
.kontaktblock { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.5rem; }
.kontaktblock h3 { margin-bottom: 0.75rem; }
.telefon-gross {
  display: inline-block; font-size: 1.35rem; font-weight: 700;
  color: var(--tinte); text-decoration: none; margin: 0.25rem 0;
}
.telefon-gross:hover { color: var(--akzent-dunkel); }

/* ---------- Kleingedrucktes ---------- */
.feld-hinweis { font-size: 0.9rem; color: var(--gedeckt); margin-top: 0.3rem; }

/* ---------- Fußbereich ---------- */
.fuss { background: var(--tinte); color: #b9bcc2; margin-top: 3.5rem; font-size: 0.97rem; }
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 2.75rem 1.25rem 1rem; display: grid; gap: 2rem; }
.fuss h3 {
  color: #fff; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.9rem;
}
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: 0.1rem; }
.fuss li a { display: inline-block; padding: 0.3rem 0; }   /* größere Tippfläche am Handy */
.fuss a { color: #dcdee2; text-decoration: none; }
.fuss a:hover { color: #fff; text-decoration: underline; }
.fuss address { font-style: normal; line-height: 1.8; }
.fuss-zeile {
  display: block;            /* volle Breite statt nur der ersten Rasterspalte */
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 1rem; padding: 1.1rem 1.25rem 1.4rem;
  font-size: 0.88rem; color: #8f939b;
}

/* ---------- Große Bildschirme ---------- */
@media (min-width: 700px) {
  .kartenraster { grid-template-columns: repeat(3, 1fr); }
  .kontaktzeile { grid-template-columns: 1fr 1fr; }
  .reihe { grid-template-columns: 5fr 7fr; }
  .reihe:nth-child(even) .reihe-bild { order: 2; }
  .fuss-innen { grid-template-columns: 1.2fr 0.8fr 1fr; }
}
/* Breite Bildschirme: Textfeld liegt links am Rand über dem Titelbild,
   damit das Gesicht frei bleibt; auf mittleren Breiten (900–1149 px)
   bleibt das gestapelte Layout — dort würde sich der Störer mit dem
   Gesicht überschneiden. */
@media (min-width: 1150px) {
  .held-bild img { min-height: 34rem; object-position: 72% 20%; }
  .held-text {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
    padding: 0 2rem;
  }
  .held-text-innen {
    max-width: 26em; margin: 0;
    background: linear-gradient(to right, rgba(244, 242, 238, 0.97) 70%, rgba(244, 242, 238, 0.88));
    padding: 2rem 2.25rem; border-radius: var(--radius);
  }
  .held-text-innen .name-zeile { font-size: 2rem; }
  /* Startseite: Kasten in voller Bildhöhe, der Knopf steht mittig zwischen
     Textende und Unterkante */
  .held-knopf .held-text { justify-content: stretch; }
  .held-knopf .held-text-innen {
    flex: 1; display: flex; flex-direction: column;
    padding: 2.25rem 2.25rem 0; border-radius: 0;
  }
  .held-knopf h1 { font-size: 2.15rem; }
  .held-knopf p.gross { margin-bottom: 0; }
  .held-knopf .knopfzeile { margin: auto 0; }
}

@media (min-width: 900px) {
  /* Menü dauerhaft sichtbar, Knopf verschwindet */
  .menue-knopf { display: none; }
  .hauptmenue {
    display: block; position: static; background: none; border: 0; box-shadow: none;
  }
  .hauptmenue ul { display: flex; gap: 0.25rem; padding: 0; }
  .hauptmenue a { padding: 0.5rem 0.8rem; font-size: 0.95rem; border-radius: var(--radius); }
  .hauptmenue a:hover { background: var(--sand); }
  .hauptmenue a[aria-current="page"] { color: var(--akzent); }

  .abschnitt { padding: 4.5rem 0; }
  .band-innen { padding: 5rem 0; }
}

/* ---------- Druck ---------- */
@media print {
  .kopf, .fuss, .knopfzeile, .menue-knopf { display: none; }
  body { color: #000; }
  a { color: #000; text-decoration: none; }
}
