/* ==========================================================================
   chalvi2 – Stylesheet für www.chalvi.de
   --------------------------------------------------------------------------
   Reines CSS, kein Framework, kein Build-Schritt: Datei bearbeiten,
   hochladen, fertig (ggf. Grav-Cache leeren).

   Inhalt
    1.  Schrift (Miriam Libre, lokal)
    2.  Variablen (Farben, Abstände, Breakpoints)
    3.  Grundlagen (Reset, Body)
    4.  Layout-Helfer (.wrap, .page, .main)
    5.  Kopfzeile, Logo, Hauptmenü
    6.  Mobilmenü
    7.  Hero (großes Kopfbild)
    8.  Abschnitte & Abschnitts-Überschriften
    9.  Fließtext (.prose)
    10. Module: Features, Bild+Text, Textspalten, Galerie, Kontakt
    11. Formulare (Form-Plugin)
    12. Footer & Hell/Dunkel-Umschalter
    13. Inhaltsseiten & Fehlerseite
    14. Plugins (Lightbox, Formular-Meldungen)
    15. Barrierefreiheit
    16. Kompatibilität (Klassen aus Seiteninhalten)

   Breakpoints (Mindestbreite):
     sm 40rem = 640 px · md 48rem = 768 px · lg 64rem = 1024 px
     xl 80rem = 1280 px · 2xl 96rem = 1536 px

   Nachtmodus: Das <html>-Element hat die Klasse "dark" (sonst "light").
   Dunkle Varianten stehen jeweils direkt beim Bauteil als ".dark …".
   ========================================================================== */


/* ==========================================================================
   1. Schrift: Miriam Libre (lokal gehostet, keine Google Fonts)
      Je Schnitt zwei Dateien: "latin" (Deutsch, Englisch …) und
      "latin-ext" (weitere europäische Sonderzeichen). Der Browser lädt
      nur, was er für die Zeichen der Seite braucht.
   ========================================================================== */

/* 400 – normal */
@font-face {
  font-family: 'Miriam Libre';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/miriam-libre-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Miriam Libre';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/miriam-libre-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 600 – halbfett */
@font-face {
  font-family: 'Miriam Libre';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('../fonts/miriam-libre-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Miriam Libre';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('../fonts/miriam-libre-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* 700 – fett (wird auch für 800 "extrafett" verwendet) */
@font-face {
  font-family: 'Miriam Libre';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('../fonts/miriam-libre-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Miriam Libre';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('../fonts/miriam-libre-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}


/* ==========================================================================
   2. Variablen
      Markenfarben (--color-primary, --color-anthrazit …) werden zusätzlich
      aus dem Admin in den <head> geschrieben (partials/theme.css.twig) und
      überschreiben die Werte hier.
   ========================================================================== */

:root {
  /* Markenfarben (Vorgaben) */
  --color-primary: #FFD000;          /* Gelb */
  --color-primary-lighter: #ffe366;  /* Hover im Nachtmodus */
  --color-primary-darker: #997d00;   /* Hover von Links */
  --color-anthrazit: #474444;        /* Kontaktbereich, Schrift auf Gelb */
  --color-anthrazit-dark: #3a3737;   /* Footer */
  --color-hellgrau: #C5C5C5;         /* Footer-Schrift */
  --color-on-dark: #e8e6e6;          /* helle Schrift auf Anthrazit */

  /* Grautöne (kühles Zink-Grau, wie bisher) */
  --color-gray-100: oklch(96.7% .001 286.375);
  --color-gray-200: oklch(92% .004 286.32);
  --color-gray-300: oklch(87.1% .006 286.286);
  --color-gray-400: oklch(70.5% .015 286.067);
  --color-gray-500: oklch(55.2% .016 285.938);
  --color-gray-600: oklch(44.2% .017 285.786);
  --color-gray-700: oklch(37% .013 285.805);
  --color-gray-800: oklch(27.4% .006 286.033);
  --color-gray-900: oklch(21% .006 285.885);
  --color-white: #fff;

  /* Farben für Formular-Meldungen */
  --color-green-100: oklch(96.2% .044 156.743);
  --color-green-800: oklch(44.8% .119 151.328);
  --color-red-100: oklch(93.6% .032 17.717);
  --color-red-800: oklch(44.4% .177 26.899);
  --color-orange-100: oklch(95.4% .038 75.164);
  --color-orange-800: oklch(47% .157 37.304);
  --color-blue-100: oklch(93.2% .032 255.585);
  --color-blue-800: oklch(42.4% .199 265.638);

  /* Schrift */
  --font-sans: 'Miriam Libre', ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  /* Sonstiges */
  --radius: .375rem;                           /* Rundung von Buttons, Bildern, Feldern */
  --ease: cubic-bezier(.4, 0, .2, 1);          /* Standard-Animationskurve */
  --shadow-header: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
  --shadow-button: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
}


/* ==========================================================================
   3. Grundlagen
   ========================================================================== */

/* Einheitlicher Startpunkt für alle Browser */
*, ::before, ::after, ::backdrop, ::file-selector-button {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Ganze Seite: Spalte über volle Höhe, damit der Footer unten bleibt */
body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  background-color: var(--color-white);
  color: var(--color-gray-600);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.dark body {
  background-color: var(--color-gray-900);
  color: var(--color-gray-400);
}

h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
ol, ul, menu { list-style: none; }
hr { height: 0; color: inherit; border-top-width: 1px; }
code, kbd, samp, pre { font-family: var(--font-mono); font-size: 1em; }
small { font-size: 80%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -.25em; }
sup { top: -.5em; }
table { text-indent: 0; border-color: inherit; border-collapse: collapse; }

/* Bilder & Grafiken als Block, nie breiter als ihr Platz */
img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }

/* Formularelemente erben die Schrift */
button, input, select, optgroup, textarea, ::file-selector-button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  border-radius: 0;
  background-color: transparent;
  opacity: 1;
}
textarea { resize: vertical; }
::placeholder { opacity: 1; color: color-mix(in oklab, currentcolor 50%, transparent); }
button, input:where([type='button'], [type='reset'], [type='submit']) { appearance: button; }
[hidden]:where(:not([hidden='until-found'])) { display: none !important; }

/* Icons aus dem Plugin "SVG Icons" (Größe über icon--16/24/32/64) */
.inline-block { display: inline-block; }
.icon { stroke: currentcolor; }
.icon--16 { width: 1rem; height: 1rem; }
.icon--24 { width: 1.5rem; height: 1.5rem; }
.icon--32 { width: 2rem; height: 2rem; }
.icon--64 { width: 4rem; height: 4rem; }


/* ==========================================================================
   4. Layout-Helfer
   ========================================================================== */

/* .page – Hülle um Kopfzeile, Inhalt und Footer */
.page {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
}

/* .wrap – Innenabstand links/rechts und maximale Breite
   bis 767 px: 16 px Rand · ab 768 px: 24 px · ab 1280 px: zentriert, max. 1280 px
   ab 1536 px: max. 1536 px */
.wrap { padding-inline: 1rem; }
@media (min-width: 48rem) { .wrap { padding-inline: 1.5rem; } }
@media (min-width: 80rem) { .wrap { width: 100%; max-width: 80rem; margin-inline: auto; } }
@media (min-width: 96rem) { .wrap { max-width: 96rem; } }

/* <main> füllt den Platz zwischen Kopf und Footer */
.main { flex: 1; }
.main:focus { outline: none; }
/* Seiten ohne Hero: Platz für die fixierte Kopfzeile */
.main__inner--no-hero { padding-top: 4rem; }


/* ==========================================================================
   5. Kopfzeile, Logo, Hauptmenü
      Desktop: Logo zentriert oben, Menü zentriert darunter.
      Mobil:   Logo zentriert, Menü-Button rechts.
      Beim Scrollen setzt js/site.js die Klasse "is-scrolled".
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: stretch;
  width: 100vw;
  transition-property: color, background-color, border-color, box-shadow;
  transition-timing-function: var(--ease);
  transition-duration: .075s;
}

/* Schriftfarbe, solange oben (über dem Hero) */
.site-header--text-light { color: var(--color-gray-200); }
.site-header--text-dark  { color: var(--color-gray-700); }

/* Variante "solid": immer weißer Hintergrund */
.site-header--solid { background-color: var(--color-white); color: var(--color-gray-800); }
.dark .site-header--solid { background-color: var(--color-gray-900); color: var(--color-gray-300); }

/* Eingescrollt: weißer Hintergrund, dunkle Schrift, Schatten */
.site-header.is-scrolled {
  background-color: var(--color-white);
  color: var(--color-gray-800);
  box-shadow: var(--shadow-header);
}
.dark .site-header.is-scrolled {
  background-color: var(--color-gray-900);
  color: var(--color-gray-300);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: .75rem 0;
}
.site-header.is-scrolled .site-header__inner { padding: .35rem 0; }

.site-header__wrap { flex: auto; }

.site-header__nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header__logo {
  display: flex;
  align-items: center;
}

/* Menü-Button (nur mobil) */
.site-header__toggle {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: .5rem;
  padding: .5rem;
  border-radius: var(--radius);
  transition: color .15s var(--ease), background-color .15s var(--ease);
}

/* --- Logo ---------------------------------------------------------------- */
.site-logo {
  display: block;
  height: 3.5rem;                  /* mobil oben */
  transition: height .25s ease;
}
.site-header.is-scrolled .site-logo { height: 2.5rem; }  /* mobil eingescrollt */

.site-logo__default,
.site-logo__white {
  display: block;
  height: 100%;
}
.site-logo svg,
.site-logo img {
  height: 100%;
  width: auto;
}
.site-logo__svg { fill: currentcolor; }

/* Weiße Variante: oben über dem Hero und im Nachtmodus; sonst normales Logo */
.site-logo--has-white .site-logo__white { display: none; }
.site-header:not(.is-scrolled) .site-logo--has-white .site-logo__default,
.dark .site-header .site-logo--has-white .site-logo__default { display: none; }
.site-header:not(.is-scrolled) .site-logo--has-white .site-logo__white,
.dark .site-header .site-logo--has-white .site-logo__white { display: block; }

/* --- Hauptmenü (ab 768 px sichtbar) ------------------------------------- */
.main-menu {
  display: none;
  height: 4rem;
}
.main-menu__item {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 1rem;
  padding-top: .25rem;
  border-bottom: 2px solid transparent;
  font-size: .875rem;
  line-height: 1.25rem;
  font-weight: 500;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.main-menu__link {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding-inline: .75rem;
}
@media (hover: hover) {
  .main-menu__item:hover { color: var(--color-primary); border-color: var(--color-primary); }
}

/* --- ab 768 px ----------------------------------------------------------- */
@media (min-width: 48rem) {
  .site-header__inner {
    padding: 1.5rem 0 .75rem;
    transition: padding .25s ease;
  }
  .site-header.is-scrolled .site-header__inner { padding: .5rem 0; }

  .site-header__nav {
    flex-direction: column;
    gap: .75rem;
  }
  .site-header.is-scrolled .site-header__nav { gap: .25rem; }

  .site-logo { height: 5rem; }
  .site-header.is-scrolled .site-logo { height: 3.75rem; }

  .main-menu { display: flex; }
  .site-header__toggle { display: none; }
}


/* ==========================================================================
   6. Mobilmenü (Vollbild, dunkel)
      Offen = Klasse "is-open" (js/site.js). Einblenden mit Überblendung,
      Ausblenden sofort.
   ========================================================================== */

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--color-gray-800);
  visibility: hidden;
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.mobile-nav.is-open {
  visibility: visible;
  opacity: 1;
}
/* Seite dahinter nicht scrollen, solange das Menü offen ist */
html.nav-open { overflow: hidden; }

.mobile-nav__nav {
  width: 100%;
  overflow-y: auto;
  padding: 3rem 3rem 3rem .5rem;
}
@media (min-width: 40rem) { .mobile-nav__nav { padding: 3rem; } }

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  color: var(--color-gray-300);
}
.mobile-nav__item {
  padding: .5rem 0 .5rem .5rem;
  border-top: 1px solid var(--color-gray-700);
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.mobile-nav__link { transition: color .3s var(--ease); }
@media (hover: hover) { .mobile-nav__link:hover { color: var(--color-primary); } }

/* Schließen-Button oben rechts */
.mobile-nav__close-wrap {
  position: absolute;
  top: .5rem;
  right: .5rem;
}
.mobile-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem;
  border-radius: var(--radius);
  color: var(--color-white);
  transition: color .15s var(--ease);
}
.mobile-nav__close .icon { color: var(--color-gray-300); }
@media (hover: hover) { .mobile-nav__close .icon:hover { color: var(--color-white); } }


/* ==========================================================================
   7. Hero (großes Kopfbild mit Titel)
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
}

/* Bild füllt den ganzen Bereich, Ausschnitt mittig */
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Farbverlauf über dem Bild (Farbe/Deckkraft im Template berechnet) */
.hero__overlay {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Innenabstand oben/unten (oben inkl. Platz für die Kopfzeile) */
.hero__content {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 4rem;
}
@media (min-width: 48rem) { .hero__content { padding-top: 10rem; padding-bottom: 5rem; } }
@media (min-width: 64rem) { .hero__content { padding-top: 12rem; padding-bottom: 6rem; } }
@media (min-width: 80rem) { .hero__content { padding-top: 14rem; padding-bottom: 8rem; } }

/* Textspalte: 5/6 → 3/4 → 2/3 → 1/2 der Breite */
.hero__text { width: 83.333333%; }
@media (min-width: 48rem) { .hero__text { width: 75%; } }
@media (min-width: 64rem) { .hero__text { width: 66.666667%; } }
@media (min-width: 80rem) { .hero__text { width: 50%; } }

/* Ausrichtung */
.hero--center .hero__text { margin-inline: auto; text-align: center; }
.hero--right .hero__text  { margin-left: auto; text-align: right; }
.hero--center .hero__buttons { justify-content: center; }
.hero--right .hero__buttons  { justify-content: flex-end; }

/* Kleine Zeile über dem Titel */
.hero__subtitle {
  font-size: .75rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: .025em;
  text-transform: uppercase;
  opacity: .75;
  color: var(--color-gray-300);
}
@media (min-width: 48rem) { .hero__subtitle { font-size: .875rem; line-height: 1.25rem; } }

/* Titel (h1): 24 → 30 → 36 → 48 px */
.hero__title {
  margin-top: .25rem;
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--color-gray-100);
}
@media (min-width: 40rem) { .hero__title { font-size: 1.875rem; } }
@media (min-width: 48rem) { .hero__title { font-size: 2.25rem; } }
@media (min-width: 64rem) { .hero__title { font-size: 3rem; } }

/* Zweite Titelzeile: kleiner (60 %) */
.hero__title2 {
  display: inline-block;
  margin-top: .35em;
  font-size: .6em;
  line-height: 1.25;
}

/* Text unter dem Titel */
.hero__lead {
  margin-top: .75rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--color-gray-200);
}
@media (min-width: 48rem) { .hero__lead { font-size: 1.25rem; } }

/* Dunkle Schrift (bei hellem Verlauf) */
.hero--text-dark .hero__subtitle { color: var(--color-gray-700); }
.hero--text-dark .hero__title    { color: var(--color-gray-900); }
.hero--text-dark .hero__lead     { color: var(--color-gray-800); }

/* Buttons */
.hero__buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}
.hero__button-wrap {
  border-radius: var(--radius);
  box-shadow: var(--shadow-button);
}
.hero__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: .75rem 2rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
  transition: color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.hero__button:focus { box-shadow: 0 0 0 3px currentcolor; }
@media (min-width: 48rem) {
  .hero__button { padding: 1rem 2.5rem; font-size: 1.125rem; }
}


/* ==========================================================================
   8. Abschnitte (Module der Startseite) & Abschnitts-Überschriften
   ========================================================================== */

/* Standard: weiß, 32 px bzw. ab 768 px 96 px Abstand oben/unten */
.section {
  padding-block: 2rem;
  background-color: var(--color-white);
}
.dark .section { background-color: var(--color-gray-900); }
@media (min-width: 48rem) { .section { padding-block: 6rem; } }

/* Hintergrund-Varianten (im Seitenkopf: section_classes: section--grau) */
.section--grau { background-color: var(--color-gray-100); }
.dark .section--grau { background-color: var(--color-gray-800); }

.section--anthrazit {
  background-color: var(--color-anthrazit);
  color: var(--color-on-dark);
}
.dark .section--anthrazit { background-color: var(--color-anthrazit); }
.section--anthrazit .prose,
.section--anthrazit .prose p,
.section--anthrazit .prose strong { color: var(--color-on-dark); }
.section--anthrazit a { color: var(--color-primary); }

/* Abschnitts-Überschrift: zentriert, schmaler als der Inhalt */
.section-title {
  width: 83.333333%;
  margin-inline: auto;
  margin-bottom: 4rem;
  text-align: center;
}
@media (min-width: 48rem) { .section-title { width: 75%; } }
@media (min-width: 64rem) { .section-title { width: 66.666667%; } }
@media (min-width: 80rem) { .section-title { width: 50%; } }

.section-title__subtitle {
  font-size: .75rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: .025em;
  text-transform: uppercase;
  opacity: .75;
  color: var(--color-gray-700);
}
.dark .section-title__subtitle { color: var(--color-gray-300); }
@media (min-width: 48rem) { .section-title__subtitle { font-size: .875rem; line-height: 1.25rem; } }

/* h2: 24 → 30 → 36 → 48 px */
.section-title__heading {
  margin-top: .25rem;
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--color-gray-900);
}
.dark .section-title__heading { color: var(--color-gray-100); }
@media (min-width: 40rem) { .section-title__heading { font-size: 1.875rem; } }
@media (min-width: 48rem) { .section-title__heading { font-size: 2.25rem; } }
@media (min-width: 64rem) { .section-title__heading { font-size: 3rem; } }

/* title_text: light (für dunkle Hintergründe) */
.section-title--light .section-title__subtitle,
.dark .section-title--light .section-title__subtitle { color: var(--color-gray-300); }
.section-title--light .section-title__heading,
.dark .section-title--light .section-title__heading { color: var(--color-gray-100); }
/* title_text: dark (für helle Hintergründe, auch im Nachtmodus) */
.section-title--dark .section-title__subtitle,
.dark .section-title--dark .section-title__subtitle { color: var(--color-primary); }
.section-title--dark .section-title__heading,
.dark .section-title--dark .section-title__heading { color: var(--color-gray-900); }


/* ==========================================================================
   9. Fließtext (.prose)
      Für Inhalte aus Markdown: Absätze, Listen, Zwischenüberschriften.
      Schrift- und Überschriftenfarbe werden vom Bereich geerbt.
      .prose--invert: im Nachtmodus helle Aufzählungszeichen/Fettschrift.
      (:where() hält die Spezifität niedrig, damit Bauteile sie leicht
      überschreiben können.)
   ========================================================================== */

.prose {
  --prose-bold: inherit;
  --prose-bullets: var(--color-gray-300);
  --prose-counters: var(--color-gray-500);
  --prose-hr: var(--color-gray-200);
  --prose-quotes: var(--color-gray-900);
  --prose-quote-borders: var(--color-gray-200);
  --prose-th-borders: var(--color-gray-300);
  --prose-td-borders: var(--color-gray-200);
  --prose-captions: var(--color-gray-500);
  max-width: none;
  font-size: 1rem;
  line-height: 1.75;
}
.dark .prose--invert {
  --prose-bold: #fff;
  --prose-bullets: var(--color-gray-600);
  --prose-counters: var(--color-gray-400);
  --prose-hr: var(--color-gray-700);
  --prose-quotes: var(--color-gray-100);
  --prose-quote-borders: var(--color-gray-700);
  --prose-th-borders: var(--color-gray-600);
  --prose-td-borders: var(--color-gray-700);
  --prose-captions: var(--color-gray-400);
}

.prose :where(p) { margin-top: 1.25em; margin-bottom: 1.25em; }
.prose :where(strong) { color: var(--prose-bold); font-weight: 600; }
.prose :where(a strong, blockquote strong, thead th strong) { color: inherit; }

/* Links: gelb, ohne Unterstreichung */
.prose a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color .3s var(--ease);
}
.prose a:hover { color: var(--color-primary-darker); }
.dark .prose a:hover { color: var(--color-primary-lighter); }

/* Überschriften (Farbe wird geerbt) */
.prose :where(h1) { font-weight: 800; font-size: 2.25em; margin-top: 0; margin-bottom: .8888889em; line-height: 1.1111111; }
.prose :where(h2) { font-weight: 700; font-size: 1.5em; margin-top: 2em; margin-bottom: 1em; line-height: 1.3333333; }
.prose :where(h3) { font-weight: 600; font-size: 1.25em; margin-top: 1.6em; margin-bottom: .6em; line-height: 1.6; }
.prose :where(h4) { font-weight: 600; margin-top: 1.5em; margin-bottom: .5em; line-height: 1.5; }
.prose :where(h1 strong) { font-weight: 900; color: inherit; }
.prose :where(h2 strong) { font-weight: 800; color: inherit; }
.prose :where(h3 strong, h4 strong) { font-weight: 700; color: inherit; }

/* Listen */
.prose :where(ul) { list-style-type: disc; margin-top: 1.25em; margin-bottom: 1.25em; padding-inline-start: 1.625em; }
.prose :where(ol) { list-style-type: decimal; margin-top: 1.25em; margin-bottom: 1.25em; padding-inline-start: 1.625em; }
.prose :where(ul > li)::marker { color: var(--prose-bullets); }
.prose :where(ol > li)::marker { font-weight: 400; color: var(--prose-counters); }
.prose :where(ul ul, ul ol, ol ul, ol ol) { margin-top: .75em; margin-bottom: .75em; }
.prose :where(.prose > ul > li p) { margin-top: .75em; margin-bottom: .75em; }

/* Zitat, Linie, Bilder, Code, Tabellen */
.prose :where(blockquote) {
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  padding-inline-start: 1em;
  border-inline-start: .25rem solid var(--prose-quote-borders);
  font-weight: 500;
  font-style: italic;
  color: var(--prose-quotes);
}
.dark .prose :where(blockquote) { border-color: var(--color-gray-700); color: var(--color-gray-300); }
.prose :where(hr) { border-color: var(--prose-hr); border-top-width: 1px; margin-top: 3em; margin-bottom: 3em; }
.prose :where(img, video) { margin-top: 2em; margin-bottom: 2em; }
.prose :where(figcaption) { color: var(--prose-captions); font-size: .875em; line-height: 1.4285714; margin-top: .8571429em; }
.prose :where(code) { color: var(--color-primary); font-weight: 600; font-size: .875em; }
.prose :where(code)::before,
.prose :where(code)::after { content: "`"; }
.prose :where(pre) {
  overflow-x: auto;
  margin-top: 1.7142857em;
  margin-bottom: 1.7142857em;
  padding: .8571429em 1.1428571em;
  border-radius: .375rem;
  background-color: var(--color-blue-100);
  color: oklch(54.6% .245 262.881);
  font-size: .875em;
  line-height: 1.7142857;
  font-weight: 400;
}
.prose :where(pre code) { background: transparent; padding: 0; font: inherit; color: inherit; }
.prose :where(pre code)::before,
.prose :where(pre code)::after { content: none; }
.prose :where(table) { width: 100%; table-layout: auto; margin-top: 2em; margin-bottom: 2em; font-size: .875em; line-height: 1.7142857; }
.prose :where(thead) { border-bottom: 1px solid var(--prose-th-borders); }
.prose :where(thead th) { font-weight: 600; vertical-align: bottom; padding: 0 .5714286em .5714286em; }
.prose :where(tbody tr) { border-bottom: 1px solid var(--prose-td-borders); }
.prose :where(tbody tr:last-child) { border-bottom-width: 0; }
.prose :where(tbody td) { vertical-align: baseline; padding: .5714286em; }
.prose :where(thead th:first-child, tbody td:first-child) { padding-inline-start: 0; }
.prose :where(thead th:last-child, tbody td:last-child) { padding-inline-end: 0; }

/* Kein Abstand nach Überschriften sowie am Anfang/Ende des Textblocks */
.prose :where(hr + *, h2 + *, h3 + *, h4 + *) { margin-top: 0; }
.prose :where(.prose > :first-child) { margin-top: 0; }
.prose :where(.prose > :last-child) { margin-bottom: 0; }


/* ==========================================================================
   10. Module der Startseite
   ========================================================================== */

/* Text unter einer Abschnitts-Überschrift (steht nach .prose → gewinnt) */
.section-title__lead {
  margin-top: .75rem;
  font-size: 1rem;
  line-height: 1.5rem;
}
@media (min-width: 48rem) { .section-title__lead { font-size: 1.125rem; line-height: 1.75rem; } }
@media (min-width: 64rem) { .section-title__lead { font-size: 1.25rem; } }

/* --- 10.1 Features (modular/features.html.twig) ---------------------------
   horizontal: 1 Spalte → ab 768 px 2 → ab 1280 px 3
   vertical:   2 Spalten → ab 640 px 3 → ab 1024 px 4                       */
.features {
  display: grid;
  gap: 2rem;
}
@media (min-width: 48rem) { .features--horizontal { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 80rem) { .features--horizontal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.features--vertical { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 40rem) { .features--vertical { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .features--vertical { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Jede Kachel wird beim Darüberfahren leicht größer */
.feature {
  display: flex;
  transition-duration: .3s;
}
@media (hover: hover) { .feature:hover { scale: 1.05; } }

.feature__title { font-weight: 700; }
.feature__link { color: inherit; }

/* horizontal: Icon in gelber Kachel, Titel in Großbuchstaben */
.feature__icon-wrap { flex-shrink: 0; }
.features--horizontal .feature__icon {
  padding: .75rem;
  border-radius: var(--radius);
  background-color: var(--color-primary);
  color: var(--color-anthrazit);
}
.feature__body { margin-left: 1rem; }
.features--horizontal .feature__title {
  margin-bottom: .5rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
  text-transform: uppercase;   /* nur optisch – Screenreader lesen normal */
}
.features--horizontal .feature__link { color: var(--color-primary); }
@media (hover: hover) {
  .features--horizontal .feature__link:hover { color: var(--color-primary-darker); }
  .dark .features--horizontal .feature__link:hover { color: var(--color-primary-lighter); }
}

/* vertical: großes graues Icon oben, alles zentriert, Hover-Fläche */
.feature__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: var(--radius);
}
.features--vertical .feature__icon {
  padding: .75rem;
  border-radius: var(--radius);
  color: var(--color-gray-500);
  text-align: center;
}
.features--vertical .feature__title {
  margin-bottom: .5rem;
  font-size: 1rem;
  line-height: 1.5rem;
  text-align: center;
}
@media (min-width: 48rem) { .features--vertical .feature__title { font-size: 1.125rem; line-height: 1.75rem; } }
.features--vertical .feature__text { text-align: center; }
@media (hover: hover) {
  .feature__card:hover { background-color: var(--color-gray-100); }
  .dark .feature__card:hover { background-color: var(--color-gray-800); }
  .feature__card:hover .feature__icon,
  .feature__card:hover .feature__title,
  .feature__card:hover .feature__link { color: var(--color-primary); }
}

/* --- 10.2 Bild + Text (modular/image-block.html.twig) -------------------- */
.image-block {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.image-block__media { width: 100%; }
.image-block__image {
  margin-bottom: 2rem;
  border-radius: var(--radius);
}
.image-block__text {
  width: 100%;
  margin-bottom: 1rem;
}
@media (min-width: 48rem) {
  .image-block { justify-content: flex-start; }
  .image-block--right { flex-direction: row-reverse; }   /* Bild rechts */
  .image-block__media,
  .image-block__text { width: 50%; }
  .image-block__image { margin-bottom: 0; }
  .image-block__text { margin-bottom: 0; padding-right: 2rem; }
  .image-block--right .image-block__media { padding-left: 2rem; }
  .image-block--left .image-block__media { padding-right: 2rem; }
  .image-block--left .image-block__text { padding-left: 2rem; }
  .image-block__text .prose { font-size: 1.125rem; line-height: 1.75rem; }
}

/* --- 10.3 Textspalten (modular/text-columns.html.twig) -------------------
   Mindestbreite je Spalte; der Browser verteilt den Text automatisch.   */
.text-columns--2 { columns: 32rem; }
.text-columns--3 { columns: 24rem; }
.text-columns--4 { columns: 18rem; }
@media (min-width: 40rem) { .text-columns { gap: 1.5rem; } }
@media (min-width: 64rem) { .text-columns { gap: 2.5rem; } }

/* --- 10.4 Galerie (modular/gallery.html.twig) ----------------------------
   2 Spalten → ab 768 px 3 → ab 1024 px 4; Bild zoomt beim Darüberfahren.  */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.gallery__item {
  display: inline-flex;
  overflow: hidden;
  border-radius: var(--radius);
}
.gallery__link { display: inline-block; }
.gallery__image { transition-duration: .2s; }
@media (hover: hover) {
  .gallery__item:hover .gallery__image { scale: 1.1; filter: brightness(110%); }
}

/* --- 10.5 Kontakt (modular/contact.html.twig) ----------------------------- */
.contact-form {
  max-width: 36rem;
  margin-inline: auto;
  color: var(--color-gray-700);
}


/* ==========================================================================
   11. Formulare
       Klassen setzt das Form-Plugin (Namen in chalvi2.php festgelegt).
   ========================================================================== */

.form-field { margin-bottom: 1rem; }

.form-field label { color: var(--color-gray-700); }
.dark .form-field label { color: var(--color-gray-400); }

/* Eingabefelder */
form .form-input,
form .form-textarea,
form .form-select {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius);
  background-color: var(--color-white);
  color: var(--color-gray-700);
  font-size: 1rem;
  line-height: 1.5rem;
  appearance: none;
}
.dark form .form-input,
.dark form .form-textarea,
.dark form .form-select {
  border-color: var(--color-gray-600);
  background-color: var(--color-gray-800);
  color: var(--color-gray-100);
}
/* Fokus: gelber Rahmen statt Leuchtring */
form .form-input:focus,
form .form-textarea:focus,
form .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: none;
  outline: none;
}

/* Absende-Button (Grundform; Farbe über .chalvi-btn) */
.form-button {
  display: inline-block;
  padding: .75rem 2rem;
  border-radius: var(--radius);
  line-height: 1.5rem;
  font-weight: 500;
  transition: color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.form-button:focus { outline: none; box-shadow: 0 0 0 3px currentcolor; }
.form-button:not(.no-default-style) { background-color: var(--color-primary); color: var(--color-white); }
@media (hover: hover) { .form-button:not(.no-default-style):hover { background-color: var(--color-primary-darker); } }

/* Gelber Button mit Anthrazit-Schrift (Formular, Fehlerseite) */
.chalvi-btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: var(--color-anthrazit);
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease;
}
.chalvi-btn:hover { background: var(--color-white); }

/* Kontaktbereich: Beschriftungen hell auf Anthrazit, Pflicht-Sternchen gelb */
.section--anthrazit .form-label label { color: var(--color-on-dark); font-weight: 600; }
.section--anthrazit .form-label .required { color: var(--color-primary); }

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


/* ==========================================================================
   12. Footer & Hell/Dunkel-Umschalter
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-anthrazit);
  background-color: var(--color-anthrazit-dark);
  font-size: .875rem;
  line-height: 1.25rem;
}
.site-footer__wrap { padding-block: 2rem; }

.site-footer__row {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 4rem;
  color: var(--color-hellgrau);
}
.site-footer__row--bottom { min-height: 0; }
.site-footer a:hover { color: var(--color-primary); }

/* Zeile 1: Footer-Menü */
.site-footer__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.site-footer__menu a { transition: color .3s var(--ease); }

/* Zeile 2: Copyright */
.site-footer__copyright {
  margin-bottom: 1.5rem;
  text-align: center;
}

@media (min-width: 48rem) {
  .site-footer__row { flex-direction: row; }
  .site-footer__row--bottom { margin-top: 1.5rem; align-items: center; }
  .site-footer__menu { gap: 2rem; margin-bottom: 0; justify-content: flex-start; }
  .site-footer__copyright { margin-bottom: 0; text-align: left; }
}

/* Umschalter System / Hell / Dunkel */
.appearance-switch {
  max-width: 16rem;
  margin-inline: auto;
}
@media (min-width: 48rem) { .appearance-switch { margin-inline: 0; } }

.appearance-switch__box {
  display: flex;
  align-items: center;
  padding-left: .5rem;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius);
}
.dark .appearance-switch__box { border-color: var(--color-gray-600); }
.appearance-switch__icons > span { display: inline-block; }

.appearance-switch__select {
  appearance: none;
  padding: .5rem 2rem .5rem .75rem;
  border: 0;
  background-color: transparent;
  /* kleiner Pfeil rechts */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right .5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  print-color-adjust: exact;
  font-size: 1rem;
  line-height: 1.5rem;
}


/* ==========================================================================
   13. Inhaltsseiten (Impressum, Datenschutz) & Fehlerseite
   ========================================================================== */

.content-page {
  padding-block: 3rem;
  background-color: var(--color-white);
}
.dark .content-page { background-color: var(--color-gray-900); }
@media (min-width: 48rem) { .content-page { padding-block: 6rem; } }

.error-page { text-align: center; }
.error-page__title {
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 800;
}
@media (min-width: 48rem) { .error-page__title { font-size: 3rem; line-height: 1; } }
.prose a.chalvi-btn,
.prose a.chalvi-btn:hover { color: var(--color-anthrazit); }


/* ==========================================================================
   14. Plugins
   ========================================================================== */

/* Lightbox Gallery: Beschreibung unter dem großen Bild */
.glightbox-container .gslide-description .gslide-title { font-size: 1.125rem; font-weight: 700; }
.dark .glightbox-container .gslide-description { background-color: var(--color-gray-800) !important; }
.dark .glightbox-container .gslide-description .gslide-title { color: var(--color-gray-100) !important; }

/* Form-Plugin: Meldung nach dem Absenden ("Vielen Dank! …") */
.notices.green  { background-color: var(--color-green-100);  color: var(--color-green-800); }
.notices.red    { background-color: var(--color-red-100);    color: var(--color-red-800); }
.notices.yellow { background-color: var(--color-orange-100); color: var(--color-orange-800); }
.notices.blue   { background-color: var(--color-blue-100);   color: var(--color-blue-800); }


/* ==========================================================================
   15. Barrierefreiheit
   ========================================================================== */

/* Sprunglink: unsichtbar, erscheint bei Tastaturbedienung oben links */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: var(--color-anthrazit);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Sichtbarer Fokusrahmen für Tastatur-Nutzer */
a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}
.form-button:focus-visible { outline: none; }

/* Sprungziele (Menü-Anker, Formular nach dem Absenden) nicht unter der
   fixierten Kopfzeile verstecken */
[id] { scroll-margin-top: 6rem; }
@media (min-width: 48rem) { [id] { scroll-margin-top: 9rem; } }


/* ==========================================================================
   16. Kompatibilität
       Einige Seitenköpfe und Einstellungen enthalten noch Klassennamen aus
       dem alten Typhoon/Tailwind-Theme. Damit sie ohne Änderung weiter
       funktionieren, sind genau diese Klassen hier nachgebaut.
       Werden die Seiten auf die neuen Namen umgestellt (z. B.
       section_classes: section--grau), kann dieser Abschnitt entfallen.

       Fundstellen:
         Modul _columns   section_classes: bg-gray-100 dark:bg-gray-800 py-8 md:py-24
         Modul _contact   section_classes: chalvi-anthrazit py-8 md:py-24
         Modul _hero      title2.color: text-primary
                          buttons.classes: bg-primary hover:bg-gray-800 text-white
         Footer           copyright: Icon "text-gray-700 dark:text-gray-400 w-4 h-4",
                          Link "hover:text-primary font-bold"
       (py-8 md:py-24 entspricht dem Standardabstand und braucht keine Regel.)
   ========================================================================== */

/* Hintergründe von Abschnitten */
.section.bg-gray-100 { background-color: var(--color-gray-100); }
.dark .section.dark\:bg-gray-800 { background-color: var(--color-gray-800); }
.section.chalvi-anthrazit,
.dark .section.chalvi-anthrazit {
  background-color: var(--color-anthrazit);
  color: var(--color-on-dark);
}
.chalvi-anthrazit .prose,
.chalvi-anthrazit .prose p,
.chalvi-anthrazit .prose strong { color: var(--color-on-dark); }
.chalvi-anthrazit a { color: var(--color-primary); }
.chalvi-anthrazit .form-label label { color: var(--color-on-dark); font-weight: 600; }
.chalvi-anthrazit .form-label .required { color: var(--color-primary); }

/* Farben, Schrift, Größen */
.text-primary { color: var(--color-primary); }
.text-white { color: var(--color-white); }
.bg-primary { background-color: var(--color-primary); }
.font-bold { font-weight: 700; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
@media (hover: hover) {
  .hover\:bg-gray-800:hover { background-color: var(--color-gray-800); }
  .hover\:text-primary:hover { color: var(--color-primary); }
}
/* Im Footer bleiben Icons hellgrau (wie die Schrift) */
.site-footer .text-gray-700,
.site-footer .dark\:text-gray-400 { color: var(--color-hellgrau); }
