/* =====================================================================
   HERNDLER Advisory – Design-System der statischen Seite
   Werte aus Abschnitt 3 des Requirements-Dokuments. Farben stehen nur hier
   als Variablen; die Kontrastpaare sind in Abschnitt 3 dokumentiert.
   ===================================================================== */

:root {
  --ha-orange: #DB6F2C;          /* Primär-CTA, Links, Nordspitze */
  --ha-orange-hover: #C4621F;    /* 4,6:1 mit dunkler Schrift */
  --ha-hellblau-text: #6FA0CF;   /* Hellblau für kleine Schrift */
  --ha-hellblau-auf-dunkel: #9BBBD8;   /* Hellblau auf dunkel (Designvorgabe Kap. 8), 9,4:1 auf #0A121D */
  --ha-text: #F4F6F9;
  --ha-text-gedaempft: #9FB0C4;
  --ha-karte: #16233A;
  --ha-grund: #101B2A;
  --ha-tief: #0A121D;
  --ha-linie: rgba(65, 122, 177, .22);
  --ha-linie-stark: rgba(65, 122, 177, .45);
  --ha-schein: rgba(65, 122, 177, .28);
  --ha-breite: 1290px;
  --ha-rand: .75rem;
  --ha-schrift: Inter, Aptos, Calibri, sans-serif;
}
@media (min-width: 768px) {
  :root { --ha-rand: 1.5rem; }
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ha-grund);
  color: var(--ha-text);
  font: 400 17px/1.6 var(--ha-schrift);
  text-wrap: pretty;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 2rem 0 .6rem; font-weight: 700; line-height: 1.3; text-wrap: balance; }
h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1.2em; }
a { color: var(--ha-orange); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ha-orange); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.sprunglink {
  position: absolute; left: 1rem; top: -10rem; z-index: 100;
  padding: .6rem 1rem; background: var(--ha-orange); color: var(--ha-tief); font-weight: 600;
}
.sprunglink:focus { top: 1rem; }

.container { max-width: var(--ha-breite); margin-inline: auto; padding-inline: var(--ha-rand); }

/* ---------- Wortbildmarke (Logo-Bibliothek, Designvorgabe v1.0) ----------
   Die SVG-Dateien enthalten die Schutzzone von 1 E als transparenten Rand. Grundeinheit E = Versalhöhe von
   „HERNDLER" = 72,75 % der Schriftgröße; Variante A ist 4,2 E hoch (Stern 2,2 E), Variante B 5,5 E.
   Der negative Rand legt den Stern bündig auf die Inhaltskante; die Schutzzone bleibt frei. */
.ha-logo { display: inline-block; --e: 14.6px; }                       /* Schriftgröße 20 px, sichtbar 234 px */
.ha-logo img { max-width: none; width: auto; margin-inline: calc(var(--e) * -1); }   /* nie stauchen; display steuern die Varianten */
.ha-logo__a { height: calc(var(--e) * 4.2); }
.ha-logo__b { display: none; height: calc(var(--e) * 6.24); }                /* Variante B neu: 4,2 E + 2 E Schutzzone */
@media (max-width: 380px) {
  .ha-logo--kopf { --e: 11.7px; }                                       /* Schriftgröße 16 px, sichtbar 186 px */
}
@media (min-width: 1025px) {
  .ha-logo--kopf { --e: 21.8px; }                                       /* Schriftgröße 30 px → Stern 48 px, sichtbar 349 px */
}
.ha-logo--fuss { --e: 15px; }
@media (min-width: 480px) {
  .ha-logo--fuss { --e: 20.5px; }                                       /* Variante B: sichtbar 328 px ≥ 320 px */
  .ha-logo--fuss .ha-logo__a { display: none; }
  .ha-logo--fuss .ha-logo__b { display: block; }
}

/* ---------- Kopfzeile und Navigation ---------- */
/* bleibt beim Scrollen sichtbar; Schatten, sobald Inhalt darunter liegt */
.kopf { position: sticky; top: 0; z-index: 50; background: var(--ha-grund); border-bottom: 1px solid var(--ha-linie); transition: box-shadow .2s ease; }
.ist-gescrollt .kopf { box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.kopf__innen {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0 1.5rem; min-height: 88px;
}

.menue-schalter { display: none; }
.js .menue-schalter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  background: transparent; color: var(--ha-text-gedaempft); border: 1px solid var(--ha-linie-stark);
}
.menue-schalter__icon,
.menue-schalter__icon::before,
.menue-schalter__icon::after {
  display: block; width: 20px; height: 2px; background: currentColor; transition: transform .2s;
}
.menue-schalter__icon { position: relative; }
.menue-schalter__icon::before,
.menue-schalter__icon::after { content: ""; position: absolute; left: 0; }
.menue-schalter__icon::before { top: -6px; }
.menue-schalter__icon::after { top: 6px; }
.menue-schalter[aria-expanded="true"] .menue-schalter__icon { background: transparent; }
.menue-schalter[aria-expanded="true"] .menue-schalter__icon::before { top: 0; transform: rotate(45deg); }
.menue-schalter[aria-expanded="true"] .menue-schalter__icon::after { top: 0; transform: rotate(-45deg); }

.hauptnav { flex-basis: 100%; }
.js .hauptnav { display: none; }
.js .hauptnav.ist-offen { display: block; max-height: calc(100vh - 88px); max-height: calc(100dvh - 88px); overflow-y: auto; }
.hauptnav ul { list-style: none; margin: 0; padding: 0; }
.hauptnav > ul { padding: .5rem 0 1.25rem; border-top: 1px solid var(--ha-linie); }
.hauptnav a { display: block; padding: .7rem 0; color: var(--ha-text-gedaempft); text-decoration: none; font-size: 1.05rem; }
.hauptnav a:hover,
.hauptnav a:focus-visible { color: var(--ha-orange); }
.hauptnav a[aria-current="page"],
.hauptnav .ist-elternteil > a { color: var(--ha-text); }
.untermenue { padding-left: 1rem !important; }
.untermenue a { font-size: .98rem; }
.unter-schalter { display: none; }

@media (min-width: 1025px) {
  .kopf__innen { flex-wrap: nowrap; min-height: 116px; }
  .js .menue-schalter { display: none; }
  .hauptnav, .js .hauptnav { display: block; flex-basis: auto; }
  .hauptnav > ul { display: flex; align-items: center; padding: 0; border: 0; }
  .hauptnav > ul > li { position: relative; display: flex; align-items: center; }
  .hauptnav > ul > li > a { padding: .6em; font-size: 1rem; }
  .unter-schalter {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.6rem; height: 1.6rem; margin-left: -.35rem; padding: 0; cursor: pointer;
    background: transparent; color: var(--ha-text-gedaempft); border: 0;
  }
  .unter-schalter::before {
    content: ""; width: .42rem; height: .42rem;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
  }
  .unter-schalter[aria-expanded="true"]::before { transform: translateY(2px) rotate(-135deg); }
  .untermenue {
    display: none; position: absolute; top: 100%; left: 0; min-width: 15rem;
    padding: .4rem 0 !important; background: var(--ha-karte); border: 1px solid var(--ha-linie);
  }
  .untermenue a { padding: .6rem 1rem; }
  .hat-unter.ist-offen > .untermenue,
  html:not(.js) .hat-unter:focus-within > .untermenue { display: block; }
}
@media (min-width: 1025px) and (hover: hover) {
  .hat-unter:hover > .untermenue { display: block; }
}

/* ---------- Seitenrahmen ---------- */
.inhaltsbox { margin: 2.5rem 0; padding: 1.5rem; background: var(--ha-tief); }
@media (min-width: 768px) {
  .inhaltsbox { padding: 2rem; }
}
.inhaltsbox > :first-child { margin-top: 0; }
.inhaltsbox p,
.inhaltsbox li { max-width: 68ch; }

/* Abstand nach Label und Trennlinie nicht doppelt */
.ha-label + h2,
.trenner + h2,
.trenner + h3,
.trenner + section > h2:first-child { margin-top: 0; }

/* ---------- Bausteine ---------- */
.ha-label {
  margin: 0 0 1rem; color: var(--ha-hellblau-text);
  font-size: .74rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
}
.ha-einleitung { font-size: 1.2rem; }
.klein { font-size: .95rem; }
.trenner { margin: 2.5rem 0; border: 0; border-top: 1px solid var(--ha-linie); }

/* Designelement „Kompassnetz" (Designvorgabe Kap. 10): rechts angeschnitten, nie hinter Fließtext –
   deshalb erst ab 1000 px, wo neben der Headline Platz ist; Deckkraft steckt in der SVG-Datei. */
.seitenkopf::after {
  content: ""; position: absolute; z-index: 0; display: none; pointer-events: none;
  background: url(../img/HA_Kompassnetz_Element_auf-dunkel.svg) center / contain no-repeat;
}
@media (min-width: 1000px) {
  .seitenkopf::after { display: block; width: 600px; height: 600px; right: -200px; top: -110px; }
}
/* Abschluss der Startseite: Überschrift und Knopf in einer Zeile, ohne Schein */
.ha-hero--abschluss { position: relative; padding: .5rem 0 0; }
.abschluss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.abschluss h2 { margin: 0; }

/* Einleitung der Startseite mit Porträt und Link */
.kurz { display: grid; gap: 2rem 4rem; align-items: start; }
@media (min-width: 900px) {
  .kurz { grid-template-columns: minmax(0, 1fr) 220px; }
}
.kurz__text > :first-child { margin-top: 0; }
.person { margin: 0; }
.person img { width: 220px; }
.person figcaption { display: flex; flex-direction: column; gap: .2rem; margin-top: .9rem; font-size: .95rem; }
.person a { color: var(--ha-orange); font-weight: 600; text-decoration: none; }
.person a:hover,
.person a:focus-visible { text-decoration: underline; }

.knoepfe { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }
.knopf {
  display: inline-flex; align-items: center; min-height: 44px; padding: .65em 1.25em;
  border: 1px solid transparent; border-radius: 0;
  font-size: 1rem; font-weight: 600; line-height: 1.2; text-decoration: none;
}
.knopf--primaer { background: var(--ha-orange); color: var(--ha-tief); }           /* 5,7:1 */
.knopf--primaer:hover,
.knopf--primaer:focus-visible { background: var(--ha-orange-hover); color: var(--ha-tief); }
.knopf--umriss { background: transparent; color: var(--ha-text); border-color: var(--ha-linie-stark); }
.knopf--umriss:hover,
.knopf--umriss:focus-visible { color: var(--ha-text); border-color: var(--ha-orange); }

.ha-cta-zeile { font-weight: 600; }
.ha-cta-zeile a { color: var(--ha-orange); text-decoration: none; }
.ha-cta-zeile a:hover,
.ha-cta-zeile a:focus-visible { text-decoration: underline; }

.raster { display: grid; gap: 2rem; margin: 1.5rem 0; }
@media (min-width: 782px) {
  .raster--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stapel { display: grid; gap: 1.5rem; margin: 1.5rem 0; }

.ha-karte {
  display: flex; flex-direction: column;
  padding: 1.75rem 1.6rem; background: var(--ha-karte); border: 1px solid var(--ha-linie);
}
.ha-karte h3 { margin: 0 0 .6rem; font-size: 1.3rem; }
.ha-karte > .ha-cta-zeile { margin-top: auto; margin-bottom: 0; }
.raster .ha-cta-zeile { font-size: .9rem; }
.ha-karte h3 a { color: var(--ha-text); text-decoration: none; }
.ha-karte h3 a:hover,
.ha-karte h3 a:focus-visible { color: var(--ha-orange); }

.liste { padding-left: 1.25rem; }
.liste li { margin: .45rem 0; }
.liste li::marker { color: var(--ha-hellblau-text); }
/* Stern-Aufzählungszeichen (Designvorgabe Kap. 9): flach, Hellblau auf dunkel, ≈ 1,2 × Versalhöhe,
   auf die Versalmitte gesetzt; höchstens eine Sternliste je Seite – der Generator prüft das. */
.liste--stern { padding-left: 1.7rem; }
.liste--stern li { position: relative; list-style: none; }
.liste--stern li::before {
  content: ""; position: absolute; left: -1.7rem; top: .36em; width: .77em; height: .88em;
  background: url(../img/HA_Bullet_hellblau_auf-dunkel.svg) center / contain no-repeat;
}
.leitsatz { font-weight: 500; }
.ha-karte .liste { margin: 0 0 1.2em; }

/* ---------- Symbole der Beratungsschwerpunkte (Icons_Beratungsschwerpunkte, auf-dunkel) ---------- */
/* Mobil: Symbol über dem Titel und kleinerer Kartenrand, damit der Text die Breite bekommt */
.feld { flex-direction: column; gap: .9rem; align-items: flex-start; }
.feld__symbol { flex: 0 0 auto; width: 48px; height: 48px; margin-top: .2rem; }
@media (max-width: 599px) {
  .ha-karte { padding: 1.35rem 1.1rem; }
}
@media (min-width: 600px) {
  .feld { flex-direction: row; gap: 1.5rem; }
  .feld__symbol { width: 56px; height: 56px; }
}
.feld__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.feld__text > .ha-cta-zeile:last-child { margin-top: auto; margin-bottom: 0; }
@media (min-width: 768px) {
  .feld { gap: 2rem; }
  .feld__symbol { width: 72px; height: 72px; }
}
.seitenkopf__symbol { width: 64px; height: 64px; margin-bottom: 1rem; }
.uebergaenge { display: grid; gap: .75rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.uebergaenge li { display: flex; align-items: center; gap: .75rem; }
.uebergang__symbol { width: 32px; height: 32px; flex: 0 0 auto; }
.uebergaenge a { color: var(--ha-text); text-decoration: none; }
.uebergaenge a:hover,
.uebergaenge a:focus-visible { color: var(--ha-orange); }

/* ---------- Kontakt (Übergangsfassung bis Release 2): alles im Seitenkopf, keine Inhaltsbox ---------- */
.seitenkopf--kontakt .seitenkopf__titel { max-width: 30ch; font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.25; }
.kontakt-block { margin-top: 2rem; }
.kontakt-block p { margin: 0 0 1.25rem; }
.kontakt-block a:not(.knopf) { font-weight: 600; text-decoration: none; }
.kontakt-block a:not(.knopf):hover,
.kontakt-block a:not(.knopf):focus-visible { text-decoration: underline; }
.kontakt-adresse { line-height: 1.6; }
.kontakt-block .knoepfe { margin-top: .5rem; }

/* ---------- Über mich: Profilblock und zwei Spalten mit Linienlisten ---------- */
.profil { display: grid; gap: 2rem 3.5rem; align-items: start; }
@media (min-width: 782px) {
  .profil { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
}
@media (min-width: 1000px) {
  .profil { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }   /* Ganzkörperbild etwas größer (Thomas, 24.09.) */
}
.profil__bild { max-width: 360px; }   /* mobil: Bild vor dem Text, linksbündig, höchstens 360 px */
@media (min-width: 782px) {
  .profil__bild { max-width: 340px; }
.profil__bild img { width: 100%; }
.profil__text > :first-child { margin-top: 0; }
.profil__text p { max-width: 62ch; }
.zweispalter { display: grid; gap: 3rem 4rem; }
@media (min-width: 1000px) {
  .zweispalter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.zweispalter h2 { margin: 0 0 1.25rem; font-size: 1.4rem; color: var(--ha-hellblau-auf-dunkel); }
.zweispalter section + section h2 { margin-top: 2.5rem; }
.zweispalter ul { margin: 0; }
.liste--linien { margin: 0; padding: 0; list-style: none; }
.liste--linien li { max-width: none; margin: 0; padding: .8rem 0; border-top: 1px solid var(--ha-linie); font-size: .98rem; line-height: 1.55; }
.liste--linien li:last-child { border-bottom: 1px solid var(--ha-linie); }

.rechtstext h2 { margin-top: 2rem; font-size: 1.4rem; }
.rechtstext > :first-child { margin-top: 0; }

/* ---------- Fußzeile ---------- */
.fuss { background: var(--ha-grund); border-top: 1px solid var(--ha-linie); }
.fuss__innen { display: flex; flex-direction: column; align-items: center; gap: 1.15rem; padding-block: 2.5rem; text-align: center; }
.fuss__recht { margin: 0; color: var(--ha-text-gedaempft); font-size: .92rem; line-height: 1.9; }
.fuss__recht a { color: var(--ha-text); }
.fuss__recht a:hover,
.fuss__recht a:focus-visible { color: var(--ha-orange); }


/* ---------- Sprungziele unter der fixierten Kopfzeile ---------- */
[id] { scroll-margin-top: 6.5rem; }
@media (min-width: 1025px) {
  [id] { scroll-margin-top: 9rem; }
}
/* Angesprungener Schwerpunkt auf „Leistungen" wird hervorgehoben */
.ha-karte:target {
  border-color: var(--ha-linie-stark);
  box-shadow: 0 0 0 1px var(--ha-linie-stark), 0 0 48px rgba(65, 122, 177, .22);
}

/* ---------- Vier Beratungsschwerpunkte auf der Startseite (ruhig wie in der Präsentation) ----------
   Symbol links, Titel in Hellblau, Satz darunter; der ganze Block ist der Link. Kein Rahmen, kein Anheben. */
.schwerpunkte { display: grid; gap: 2.75rem 4rem; margin: 2.25rem 0 2.5rem; }
@media (min-width: 782px) {
  .schwerpunkte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.schwerpunkt { display: flex; gap: 1.4rem; align-items: flex-start; color: inherit; text-decoration: none; }
.schwerpunkt__symbol { flex: 0 0 auto; width: 52px; height: 52px; margin-top: -.2rem; }
.schwerpunkt h3 { margin: 0 0 .55rem; font-size: 1.3rem; line-height: 1.3; color: var(--ha-hellblau-auf-dunkel); transition: color .2s ease; }
.schwerpunkt p { margin: 0; max-width: 46ch; color: var(--ha-text); }
.schwerpunkt:hover h3,
.schwerpunkt:focus-visible h3 {
  color: var(--ha-text); text-decoration: underline; text-decoration-color: var(--ha-orange);
  text-decoration-thickness: 2px; text-underline-offset: .25em;
}

/* ---------- Seitenkopf der Unterseiten ----------
   Entscheidung vom 10. September 2026: ruhiger Seitenkopf (Variante A) mit Kapitelnavigation – kein farbiges Band,
   linksbündig, Hellblau-Schein wie auf der Startseite, Verlaufslinie als Abschluss. */
.seitenkopf { position: relative; overflow: hidden; padding-top: 2.25rem; }
@media (min-width: 768px) {
  .seitenkopf { padding-top: 4.5rem; }
}
.seitenkopf::before {
  content: ""; position: absolute; top: -340px; left: -180px; width: 950px; height: 720px; pointer-events: none;
  background: radial-gradient(closest-side, var(--ha-schein), rgba(65, 122, 177, 0) 72%);
}
.seitenkopf > .container { position: relative; z-index: 1; }
.seitenkopf > .container::after {
  content: ""; display: block; height: 1px; margin-top: 2.5rem;
  background: linear-gradient(90deg, var(--ha-linie-stark), rgba(65, 122, 177, 0) 70%);
}
.seitenkopf:last-child { padding-bottom: 3rem; }   /* Seiten ohne Inhaltsbox, z. B. die Fehlerseite */
.seitenkopf__titel { max-width: 22ch; margin: 0; font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.12; overflow-wrap: break-word; }
.seitenkopf__einleitung { max-width: 62ch; margin: 1rem 0 0; font-size: 1.05rem; }
@media (max-width: 767px) {
  /* lange Wörter wie „Beratungsschwerpunkte" mit Trennstrich statt mitten im Wort umbrechen */
  .seitenkopf__titel { -webkit-hyphens: auto; hyphens: auto; }
}
@media (min-width: 768px) {
  .seitenkopf__einleitung { font-size: 1.2rem; }
}
.seitenkopf .knoepfe { margin-top: 1.75rem; }
/* Startseite: Headline als Band in voller Breite (Auftrag 22. September 2026, Abschnitt 5.1) */
.seitenkopf--start { padding-top: 3rem; }
@media (min-width: 768px) {
  .seitenkopf--start { padding-top: 6rem; }
}
.seitenkopf--start .seitenkopf__titel { max-width: 34ch; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.16; }
@media (min-width: 768px) {
  .seitenkopf--start > .container::after { margin-top: 5rem; }   /* mobil bleibt der Grundabstand von 2,5 rem */
}

/* Kapitelnavigation: mobil eine wischbare Zeile, ab Tablet umbrechend */
.kapitel { margin-top: 1.75rem; }
.kapitel ul {
  display: flex; gap: .5rem; margin: 0; padding: 0 2rem 0 0; list-style: none; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.kapitel ul::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .kapitel ul { flex-wrap: wrap; padding-right: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
}
.kapitel a {
  display: inline-flex; align-items: center; min-height: 40px; padding: .45rem .9rem; white-space: nowrap;
  color: var(--ha-text); font-size: .92rem; text-decoration: none; border: 1px solid var(--ha-linie-stark);
}
.kapitel a:hover,
.kapitel a:focus-visible { border-color: var(--ha-hellblau-text); background: rgba(65, 122, 177, .12); }

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