/* ==========================================================================
   2. BASE — Reset, Typografie, Fokus, Hilfsklassen
   Läuft als drittes Stylesheet (nach tokens.css). Keine Farbliterale,
   keine !important (Ausnahme: @media print am Dateiende).
   ========================================================================== */

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

html {
  /* Small = Basis. Ab 560px wird die Basis auf 17px angehoben, damit der
     Fließtext (--fs-body: 1.0625rem) 17px auf dem Handy und ca. 18px auf
     dem Desktop ergibt. Siehe Kommentar in responsive.css. */
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-total-h);
  -webkit-tap-highlight-color: var(--c-green-a08);
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
ol, ul,
pre {
  margin: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-green-ink);
  background-color: var(--c-cream);
  background-image: var(--wash-soft);
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-synthesis-weight: none;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Grundregel Alignment (FEINSCHLIFF 10): alles linksbündig. Zentriert wird
   ausschließlich in .section__head--center und .cta-band__inner. */
body,
p,
h1, h2, h3, h4, h5, h6,
li,
dd,
figcaption,
summary,
blockquote,
label,
fieldset,
table,
th, td,
.check-list,
.form-status {
  text-align: left;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

svg {
  flex: none;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

hr {
  border: 0;
  border-top: var(--border-w) solid var(--c-line);
  margin: var(--s-7) 0;
}

/* Überschriften: gleiche Type-Scale wie die Klassen, damit rohes HTML
   (`<h1>`) identisch aussieht wie `<h1 class="h1">`. */
h1,
.h1,
.display {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--c-green);
  text-wrap: balance;
}

h2,
.h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--c-green);
  text-wrap: balance;
}

h3,
.h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  font-weight: 600;
  letter-spacing: var(--tracking-head);
  color: var(--c-green);
  text-wrap: balance;
}

h4,
.h4,
h5,
h6 {
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
  font-weight: 600;
  letter-spacing: var(--tracking-head);
  color: var(--c-green);
  text-wrap: balance;
}

h5,
h6 {
  color: var(--c-slate);
}

/* Fließtext — 68-Zeichen-Regel, deutsche Silbentrennung, linksbündig.
   Die ch-Grenze ist ein Maximum: Karten dürfen ihre volle Spaltenbreite
   nutzen, ohne dass der Zeilenumruch auseinanderfällt. */
p,
.prose,
.text-body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  max-width: var(--measure);
  hyphens: auto;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.prose > * + * {
  margin-top: var(--s-4);
}

.prose h2,
.prose h3,
.prose h4 {
  margin-top: var(--s-8);
  max-width: 24ch;
}

.prose ul,
.prose ol {
  max-width: var(--measure);
}

.prose ol {
  list-style: decimal;
  padding-left: var(--s-5);
}

.prose ol li + li {
  margin-top: var(--s-2);
}

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--c-slate);
  max-width: 60ch;
  hyphens: auto;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.eyebrow {
  display: block;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  /* Versal-Zeilen werden nicht getrennt und nicht umbrochen — Labels bleiben
     ein Wort. Die Laufweite ist optisch auf 0.12em korrigiert. */
  hyphens: none;
  overflow-wrap: normal;
  text-align: left;
  /* Auf allen hellen CI-Flächen (Creme, Mint, Mint-light, Sand) liegt das
     Akzentrot bei nur 3,8–4,5:1. Für die 13-px-Eyebrows gilt daher das
     dunklere CI-Rot; auf dunkelgrünen Flächen überschreibt layout.css die
     Regel mit --c-white-a72. */
  color: var(--c-red-deep);
  line-height: var(--lh-snug);
}

/* Eyebrow mit animiertem rotem Herz (FEINSCHLIFF 3) — Pflicht site-wide.
   Das Herz erbt currentColor und ist dadurch automatisch CI-Rot. */
.eyebrow--heart {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--c-red-deep);
  width: auto;
  max-width: 100%;
  vertical-align: top;
}

.eyebrow--heart .heart-mark {
  color: var(--c-red);
}

.text-center {
  text-align: center;
}

.text-center .lead,
.text-center .prose,
.text-center p {
  margin-inline: auto;
}

.text-muted {
  color: var(--c-slate);
}

/* Zitate bleiben linksbündig und behalten die 68-Zeichen-Regel
   (FEINSCHLIFF 10: blockquote wird nie zentriert). */
blockquote {
  max-width: var(--measure);
  font-style: normal;
  hyphens: auto;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

blockquote > * + * {
  margin-top: var(--s-4);
}

/* Ziffern in Stats, Countern und Telefonnummern stehen optisch untereinander */
[data-count],
.trust__value,
a[href^="tel:"],
.footer__address,
.job__meta,
time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

small,
.small {
  font-size: var(--fs-sm);
}

.fine-print {
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
  color: var(--c-slate);
}

strong,
b {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   2.2 CI-MOTIV — das rote Herz (wiederkehrender Akzent)
   Zwei Verwendungen, eine Klasse:
   1) <span class="heart-mark">Herz</span>  → reines Textwort im Satz:
      rot + halbfett (FEINSCHLIFF 3, zweite Hälfte).
   2) <svg class="heart-mark heart-mark--beat" …>  → Icon. Die Schlag-
      animation sitzt ausschließlich auf .heart-mark--beat.
   -------------------------------------------------------------------------- */
.heart-mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  color: var(--c-red);
  font-weight: 600;
  line-height: 1;
  vertical-align: -0.05em;
  text-align: center;
  flex: none;
}

/* Bestehende Strich-Icons behalten ihre Kontur — nur das schlagende Herz
   ist gefüllt. Sonst würde `fill: none` das inline gesetzte
   fill="currentColor" überstimmen und das Herz verschwinden lassen. */
svg.heart-mark:not(.heart-mark--beat) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Animiertes Herz im Eyebrow — 18px, zwei Schläge, ruhig (1,9 s) */
.heart-mark--beat {
  display: block;
  width: var(--heart);
  height: var(--heart);
  flex-shrink: 0;
  color: var(--c-red);
  fill: currentColor;
  stroke: none;
  transform-origin: center;
  vertical-align: -0.12em;
  animation: tap-heartbeat var(--dur-heart) var(--ease-in-out) infinite;
  will-change: transform;
}

/* Ein nacktes Textwort „Herz" hebt sich nur über Farbe und Gewicht ab. */
span.heart-mark {
  width: auto;
  height: auto;
  vertical-align: baseline;
}

/* --------------------------------------------------------------------------
   2.3 LINKS
   Grundregel: Fließtext-Links sind unterstrichen, Navigation/Buttons nicht
   (diese heben die Unterstreichung in components.css auf).
   -------------------------------------------------------------------------- */
a {
  color: var(--c-green);
  text-decoration: underline;
  text-decoration-thickness: var(--border-w);
  text-underline-offset: 0.22em;
  text-decoration-color: var(--c-green-a16);
  transition: color var(--dur-1) var(--ease-out),
              text-decoration-color var(--dur-1) var(--ease-out);
}

a:hover {
  color: var(--c-green-deep);
  text-decoration-color: var(--c-red);
}

:where(.nav, .breadcrumbs, .footer, .topbar, .social, .card, .btn, .tag,
       .icon-chip, .link-arrow, .callbar, .job, .help__item, .faq__item) a {
  text-decoration: none;
}

.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Inline eingebettetes Icon-Sprite (FEINSCHLIFF 6): die 37 <symbol> liegen
   unsichtbar am Anfang von <body>, alle Icons referenzieren #id. */
.icon-sprite {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   2.4 AUSWÄHLUNG & FOKUS
   -------------------------------------------------------------------------- */
::selection {
  background-color: var(--c-mint);
  color: var(--c-green-ink);
}

:focus-visible {
  outline: var(--focus-w) solid var(--c-red);
  outline-offset: var(--focus-offset);
  border-radius: var(--r-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* --------------------------------------------------------------------------
   2.5 SKIP-LINK
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: var(--z-skip);
  padding: var(--s-3) var(--s-5);
  background-color: var(--c-green);
  color: var(--c-white);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  transform: translateY(calc(-100% - var(--s-6)));
  transition: transform var(--dur-2) var(--ease-out);
}

.skip-link:focus-visible,
.skip-link:focus {
  transform: translateY(0);
  color: var(--c-white);
  outline-color: var(--c-red);
}

[id] {
  scroll-margin-top: var(--header-total-h);
}

/* --------------------------------------------------------------------------
   2.6 FORMULAR-ELEMENTE (Grundform, Komponenten in components.css)
   -------------------------------------------------------------------------- */
input::placeholder,
textarea::placeholder {
  color: var(--c-slate);
  opacity: 0.75;
}

/* Muss stärker sein als jede display-Regel einer Komponente: components.css
   wird später geladen, und ohne `!important` gewinnt dort z. B. ein
   `display: flex` aus `.field__error` oder `.area-filter` — das Element
   bliebe dann sichtbar, obwohl es als ausgeblendet markiert ist.
   Betroffen waren die Fehlertexte der Formulare und der Regionsfilter. */
[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   2.7 BEWEGUNGSGRUNDREGELN
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   2.8 DRUCK (minimal)
   -------------------------------------------------------------------------- */
@media print {
  html {
    font-size: 12pt;
  }

  body {
    background: var(--c-white);
    color: var(--c-green-ink);
  }

  .topbar,
  .header,
  .nav,
  .nav__panel,
  .callbar,
  .footer,
  .cta-band,
  .skip-link,
  .breadcrumbs,
  .reveal {
    display: none !important;
  }

  a {
    color: var(--c-green-ink);
    text-decoration: underline;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .section {
    padding-block: var(--s-5);
  }
}
