/* (c) 2026 by Ing. F. Weijers, weijers@cyberprofis.de
 * Lizenz: MIT
 * bytemaschine.de – Sachverständigenbüro Ing. Florian Weijers
 * Gestaltung 10/2026: mobile first, Schrift Inter (selbst ausgeliefert, SIL OFL 1.1),
 * keine externen Ressourcen, kein JavaScript. */

@font-face {
  font-family: "Inter";
  src: url("/schrift/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("/schrift/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --schrift: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #ffffff;
  --flaeche: #f4f7fb;
  --karte: #ffffff;
  --text: #1c2533;
  --gedimmt: #46536a;
  --kopf: #0b1f3a;
  --akzent: #0b5cad;
  --akzent-hell: #e8f1fb;
  --bayern: #1a78bf;
  --rand: #dde4ee;
  --notfall: #8a2c0d;
  --notfall-hell: #fdf1ec;
  --schatten: 0 1px 2px rgba(11, 31, 58, .06), 0 8px 24px rgba(11, 31, 58, .06);
  --radius: 14px;
  --breite: 72rem;
  --lesebreite: 42rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1420; --flaeche: #111c2b; --karte: #15212f; --text: #e6ebf2; --gedimmt: #aeb9c8;
    --kopf: #f2f6fb; --akzent: #7db8f2; --akzent-hell: #142a42; --bayern: #4aa8ea; --rand: #263446;
    --notfall: #ffb08f; --notfall-hell: #2a1a14; --schatten: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--schrift); font-size: 1.0625rem; line-height: 1.75;
  font-feature-settings: "cv11", "ss01"; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--akzent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--bayern); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { color: var(--kopf); line-height: 1.2; letter-spacing: -.015em; margin: 0; }
h1 { font-size: clamp(2rem, 6.5vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul { padding-left: 1.2em; margin: 0; }
li + li { margin-top: .5em; }

.wrap { width: 100%; max-width: var(--breite); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 50; background: var(--karte); padding: .6rem 1rem; border-radius: 8px; }
.skip:focus { left: .5rem; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rand); }
.kopf .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; padding-top: .75rem; padding-bottom: .5rem; }
.marke { display: flex; flex-direction: column; text-decoration: none; color: var(--kopf); line-height: 1.15; }
.marke-name { font-weight: 800; font-size: 1.2rem; letter-spacing: .01em; }
.marke-name span { color: var(--akzent); }
.marke-zusatz { font-size: .8rem; color: var(--gedimmt); font-weight: 500; letter-spacing: .02em; }
.kopf nav { width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.kopf nav::-webkit-scrollbar { display: none; }
.kopf ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: .25rem 0 .35rem; white-space: nowrap; }
.kopf li + li { margin-top: 0; }
.kopf nav a { display: block; padding: .45rem .7rem; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .95rem; font-weight: 550; }
.kopf nav a:hover { background: var(--akzent-hell); color: var(--akzent); }
.kopf nav a.nav-kontakt { background: var(--akzent); color: #fff; }
@media (prefers-color-scheme: dark) { .kopf nav a.nav-kontakt { color: #0c1420; } }
@media (min-width: 62rem) {
  .kopf nav { width: auto; -webkit-mask-image: none; mask-image: none; }
  .kopf .wrap { flex-wrap: nowrap; padding-bottom: .75rem; }
}

/* Abschnitte */
section { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.flaeche { background: var(--flaeche); border-block: 1px solid var(--rand); }
.abschnitt-kopf { max-width: var(--lesebreite); margin-bottom: clamp(2rem, 5vw, 3rem); }
.abschnitt-kopf p { color: var(--gedimmt); margin-top: .9rem; font-size: 1.05em; }
.kennzeile { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--akzent); margin-bottom: .75rem; }

/* Einstieg */
.held { padding-top: clamp(3rem, 10vw, 6rem); background:
  radial-gradient(60rem 30rem at 85% -10%, var(--akzent-hell), transparent 60%), var(--bg); }
.bayern { display: inline-flex; align-items: center; gap: .85rem; margin: 0 0 1.5rem; }
.rauten { width: 3.25rem; height: 1.6rem; border-radius: 4px; flex: none; box-shadow: inset 0 0 0 1px rgba(11,31,58,.12);
  background:
    linear-gradient(135deg, var(--bayern) 25%, transparent 25%) 0 0 / .8rem .8rem,
    linear-gradient(225deg, var(--bayern) 25%, transparent 25%) 0 0 / .8rem .8rem,
    linear-gradient(315deg, var(--bayern) 25%, transparent 25%) 0 0 / .8rem .8rem,
    linear-gradient(45deg, var(--bayern) 25%, #ffffff 25%) 0 0 / .8rem .8rem; }
.bayern-text { font-size: clamp(1.35rem, 4.6vw, 1.9rem); font-weight: 750; color: var(--bayern); letter-spacing: -.01em; line-height: 1.1; }
.held h1 { max-width: 20ch; }
.held .lead { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--gedimmt); max-width: var(--lesebreite); margin: 1.4rem 0 2rem; line-height: 1.65; }
.aktionen { display: flex; flex-wrap: wrap; gap: .75rem; }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .75rem 1.4rem;
  border-radius: 10px; font-weight: 650; text-decoration: none; background: var(--akzent); color: #fff; border: 2px solid var(--akzent); }
.knopf:hover { filter: brightness(1.08); text-decoration: none; }
.knopf-zweit { background: transparent; color: var(--akzent); }
@media (prefers-color-scheme: dark) { .knopf { color: #0c1420; } .knopf-zweit { color: var(--akzent); } }
.fakten { list-style: none; padding: 0; margin: clamp(2.5rem, 6vw, 3.5rem) 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.fakten li { margin: 0; background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--schatten); }
.fakten strong { display: block; font-size: clamp(1.35rem, 4vw, 1.75rem); color: var(--kopf); font-weight: 750; line-height: 1.2; letter-spacing: -.01em; }
.fakten span { display: block; color: var(--gedimmt); font-size: .9rem; line-height: 1.4; margin-top: .25rem;  hyphens: auto; }
@media (min-width: 48rem) { .fakten { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

/* Karten und Raster */
.raster { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .raster { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }
@media (min-width: 64rem) { .raster-3 { grid-template-columns: repeat(3, 1fr); } .raster-4 { grid-template-columns: repeat(4, 1fr); } }
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: var(--schatten); }
.karte h3 { margin-bottom: .6rem; }
.karte p { color: var(--gedimmt); }
.symbol { width: 2.75rem; height: 2.75rem; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent);
  display: grid; place-items: center; margin-bottom: 1rem; }
.symbol svg { width: 1.5rem; height: 1.5rem; }
.karte-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.karte-link:hover { border-color: var(--akzent); transform: translateY(-2px); text-decoration: none; }
.karte-link h3 { color: var(--akzent); }
@media (prefers-reduced-motion: reduce) { .karte-link { transition: none; } .karte-link:hover { transform: none; } }
.schlagworte { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin-top: 1rem; }
.schlagworte li { margin: 0; background: var(--karte); border: 1px solid var(--rand); border-radius: 999px; padding: .35rem .9rem; font-size: .95rem; }
.unterkopf { margin-top: clamp(2.5rem, 6vw, 3.5rem); }

/* Notfall */
.notfall { margin-top: clamp(2.5rem, 6vw, 3.5rem); background: var(--notfall-hell); border: 1px solid color-mix(in srgb, var(--notfall) 25%, transparent);
  border-left: 5px solid var(--notfall); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 1.75rem); }
.notfall h3 { color: var(--notfall); }
.notfall p { margin-top: .5rem; max-width: var(--lesebreite); }
.notfall a { color: var(--notfall); font-weight: 700; white-space: nowrap; }

/* Listen in Karten */
.liste { padding-left: 0; list-style: none; }
.liste li { position: relative; padding-left: 1.6rem; }
.liste li::before { content: ""; position: absolute; left: 0; top: .62em; width: .55rem; height: .55rem; border-radius: 2px; background: var(--bayern); transform: rotate(45deg); }

/* Logos */
.logos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 48rem) { .logos { grid-template-columns: repeat(4, 1fr); } }
.logos a { background: #fff; border: 1px solid var(--rand); border-radius: var(--radius); padding: 1.25rem; display: flex; align-items: center; justify-content: center; min-height: 8rem; }
.logos img { max-height: 5.5rem; width: auto; }

/* Kontakt */
.kontakt-raster { display: grid; gap: 1.25rem; }
@media (min-width: 56rem) { .kontakt-raster { grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; } }
.kontakt-wege { display: grid; gap: .75rem; margin: 1.5rem 0; }
@media (min-width: 30rem) { .kontakt-wege { grid-template-columns: repeat(3, 1fr); } }
.kontakt-wege .knopf { width: 100%; }
.kontakt-liste { display: grid; grid-template-columns: 1fr; gap: .2rem 1.5rem; margin: 0; }
.kontakt-liste dt { color: var(--gedimmt); font-size: .9rem; margin-top: .8rem; }
.kontakt-liste dd { margin: 0; font-weight: 550; }
@media (min-width: 30rem) { .kontakt-liste { grid-template-columns: 9.5rem 1fr; } .kontakt-liste dt { margin-top: 0; } }

/* Rechtstexte */
.recht { max-width: 50rem; padding-top: clamp(2.5rem, 7vw, 4rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.recht h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin-bottom: .75rem; }
.recht h2 { font-size: 1.3rem; margin: 2.25rem 0 .75rem; }
.recht h3 { margin: 1.5rem 0 .5rem; }
.angaben .zeile { display: grid; grid-template-columns: 1fr; gap: .1rem 1.5rem; padding: .65rem 0; border-bottom: 1px solid var(--rand); }
.angaben .feld { color: var(--gedimmt); font-size: .9rem; }
@media (min-width: 36rem) { .angaben .zeile { grid-template-columns: 11rem 1fr; } .angaben .feld { font-size: inherit; } }

/* Fuß */
.fuss { background: var(--kopf); color: #d5deea; padding: clamp(2.5rem, 6vw, 3.5rem) 0 1.5rem; font-size: .95rem; }
@media (prefers-color-scheme: dark) { .fuss { background: #08101a; } }
.fuss a { color: #ffffff; }
.fuss-raster { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .fuss-raster { grid-template-columns: 1.4fr 1fr; } }
.fuss-marke { font-weight: 800; font-size: 1.15rem; color: #fff; margin-bottom: .35rem; }
.fuss-marke span { color: var(--bayern); }
.fuss .klein { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: #a9b6c8; }

/* Einstieg zweispaltig ab Desktop, Siegel rechts */
.held-raster { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
.bayern-text { min-width: 0; }
.siegel { display: none; margin: 0; }
@media (min-width: 62rem) {
  .held-raster { grid-template-columns: minmax(0, 1fr) 15rem; align-items: center; gap: 4rem; }
  .siegel { display: flex; flex-direction: column; align-items: center; gap: 1rem; background: var(--karte);
    border: 1px solid var(--rand); border-radius: var(--radius); padding: 2rem 1.5rem; box-shadow: var(--schatten); }
  .siegel img { width: 9rem; height: auto; }
  .siegel figcaption { text-align: center; font-size: .9rem; color: var(--gedimmt); line-height: 1.5; }
  .held .fakten { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 75rem) { .held .fakten { grid-template-columns: repeat(4, 1fr); } }
/* Schaltflächen auf schmalen Bildschirmen einheitlich breit */
@media (max-width: 30rem) { .aktionen .knopf { flex: 1 1 100%; } }
/* Kennzahlen über die volle Breite (07.10.2026) */
.held .fakten { grid-column: 1 / -1; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 48rem) { .held .fakten { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 62rem) { .held-raster { row-gap: 0; } .held .fakten { margin-top: 3rem; } }
@media (min-width: 64rem) { .raster-3 .karte p { font-size: 1rem; line-height: 1.7; } }

/* Hintergrund-Animation (07.10.2026): Leinwand hinter allen Inhalten, Texte bleiben auf deckenden Karten */
#hintergrund { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
.held { background: radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--akzent-hell) 70%, transparent), transparent 60%); }
.flaeche { background: color-mix(in srgb, var(--flaeche) 78%, transparent); }
.held .lead, .abschnitt-kopf p { text-shadow: 0 0 12px var(--bg), 0 0 2px var(--bg); }
.abschnitt-kopf, .held-text { position: relative; }

/* Milchglas-Schleier über der Animation (07.10.2026): Abschnitte halbdeckend, Einstieg offener */
section:not(.held) { background: color-mix(in srgb, var(--bg) 84%, transparent); }
section.flaeche { background: color-mix(in srgb, var(--flaeche) 88%, transparent); }
.held { background: radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--akzent-hell) 70%, transparent), transparent 60%),
                    color-mix(in srgb, var(--bg) 35%, transparent); }

/* Sehr schmale Bildschirme (≤ 379 px): lange Komposita in der Hauptüberschrift trennen statt überlaufen (10.10.2026) */
@media (max-width: 379px) { h1 { font-size: 1.7rem; hyphens: auto; overflow-wrap: break-word; } }
