/* bauffy Mainz – Basis: Design-Tokens (--bf-*) und Grundklassen (bfz-*).
   Nur auf Zielseiten geladen, von LiteSpeed nicht kombiniert/entfernt (data-no-optimize, siehe Kern/Assets.php).
   Tokens: analyse/04-komponenten-design.md, Abschnitt 4. Breakpoints wie Divi: Tablet <= 980px, Phone <= 767px.
   Eigene Dateien je Bereich daneben (marktdaten.css, bausteine.css, layout.css) – diese Datei nicht ändern. */

:root {
  /* Farben */
  --bf-color-accent: #cf214c;
  --bf-color-accent-svg: #cf214d;
  --bf-color-burgundy: #430122;
  --bf-color-text: #404041;
  --bf-color-surface: #ffffff;
  --bf-color-surface-alt: #fbf9fa;
  --bf-color-line: #d8d8d8;
  --bf-color-on-dark: #ffffff;
  --bf-color-on-dark-muted: rgba(255, 255, 255, .64);
  --bf-color-on-dark-faint: rgba(255, 255, 255, .52);
  --bf-color-divider-dark: rgba(255, 255, 255, .19);
  --bf-overlay-hero: rgba(0, 0, 0, .5);
  --bf-gradient-photo: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, .6) 100%);

  /* Schrift (Use Any Font: drei Familien, je Gewicht 400) */
  --bf-font-light: "outfit-light", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bf-font-semibold: "outfit-semibold", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bf-font-bold: "outfit-bold", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bf-fs-body: 18px;
  --bf-fs-body-sm: 17px;
  --bf-lh-body: 1.6;
  --bf-lh-heading: 1.2;
  --bf-ls-heading: 1px;
  --bf-fs-hero-h1: 60px;
  --bf-fs-hero-lead: 22px;
  --bf-fs-h2: 35px;
  --bf-fs-h3-card: 22px;
  --bf-fs-h3-value: 23px;
  --bf-fs-eyebrow: 18px;
  --bf-fs-btn: 17px;
  --bf-fs-menu: 20px;

  /* Layout */
  --bf-container-w: 80%;
  --bf-container-max: 1400px;
  --bf-section-y: 80px;
  --bf-section-y-first: 47px;
  --bf-gutter: 3%;
  --bf-card-pad: 40px;
  --bf-card-pad-value: 30px 30px 0 30px;
  --bf-h2-mb: 20px;
  --bf-eyebrow-pb: 14px;
  --bf-header-h: 110px;

  /* Ecken: Markenzeichen = oben links eckig */
  --bf-radius-btn: 0 15px 15px 15px;
  --bf-radius-card: 0 20px 20px 20px;
  --bf-radius-lg: 0 30px 30px 30px;
  --bf-radius-box: 30px;
  --bf-radius-player: 20px;
  --bf-radius-round: 50%;

  /* Sonstiges */
  --bf-shadow: none;
  --bf-transition: 300ms ease;
  --bf-dot-size: 6px;
  --bf-focus: 0 0 0 3px rgba(207, 33, 76, .35);
}

@media (max-width: 980px) {
  :root {
    --bf-container-w: 85%;
    --bf-fs-hero-h1: 50px;
    --bf-header-h: 82px;
  }
}

@media (max-width: 767px) {
  :root {
    --bf-container-w: 90%;
    --bf-section-y: 60px;
    --bf-fs-hero-h1: 30px;
    --bf-fs-hero-lead: 18px;
    --bf-fs-h2: 30px;
  }
}

/* ---- Grundklassen ------------------------------------------------------------------------- */

/* Nur für Screenreader */
.bfz-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;
}

/* Sichtbarer Fokus für alle Bausteine */
[class^="bfz-"] a:focus-visible,
[class^="bfz-"] button:focus-visible,
[class^="bfz-"] summary:focus-visible,
[class^="bfz-"] input:focus-visible {
  /* Vollfarbiger Rahmen statt halbtransparentem Schatten: der erreicht auf keinem Grund 3:1 (WCAG 1.4.11) */
  outline: 3px solid var(--bf-color-burgundy, #430122);
  outline-offset: 2px;
  box-shadow: none;
  border-radius: 4px;
}

/* [bauffy_wert] – inline im Fließtext */
.bfz-wert {
  font-family: var(--bf-font-semibold);
  color: var(--bf-color-burgundy);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bfz-wert--leer {
  font-family: inherit;
  color: inherit;
  font-style: italic;
  white-space: normal;
}

.bfz-wert--24m,
.bfz-wert--gering {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: help;
}

/* [bauffy_datenstand] – Quellzeile */
.bfz-datenstand {
  font-size: 14px;
  line-height: 1.5;
  color: var(--bf-color-text);
  margin: 12px 0 0;
}

.bfz-datenstand__hinweis {
  font-family: var(--bf-font-semibold);
}

@media (prefers-reduced-motion: reduce) {
  [class^="bfz-"],
  [class^="bfz-"] * {
    transition: none !important;
    animation: none !important;
  }
}
