/* Gemeinsame Grundlage aller Seiten von kalkulo.net: Farben, Schrift,
   Kopfzeile mit Navigation (inkl. Handy-Menü), Buttons, Abschnitte,
   Einblende-Animation und Fußzeile. Seitenspezifisches steht im <style>
   der jeweiligen Seite.
   Farbwerte aus src/theme.js der App übernommen. Buttons und grüner Text nutzen
   bewusst ein dunkleres Grün (#4A7424) statt des Logo-Grüns, damit der Kontrast
   nach WCAG AA reicht: weiß auf Grün und Grün auf dem hellgrünen Hintergrund
   (--accent-soft) jeweils über 4,5:1. */
/* Schriften liegen selbst gehostet in assets/fonts (siehe LIZENZ.md),
   kein Aufruf von Google Fonts. */
@font-face {
  font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans"; src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
:root {
  --bg: #F6F6F5;
  --card-bg: #FFFFFF;
  --card-border: #E3E3E1;
  --text: #1A1A1A;
  --text-secondary: #3D3D3B;
  --muted: #5F5F5B;
  --faint: #8A8A85;
  --accent: #4A7424;
  --accent-500: #669F32;
  --accent-soft: #EAF3E0;
  --danger: #B42318;
  --accent-dunkel: #3B5D1C;
  /* Grün für Text und Symbole auf dunklem Grund (Hero, Datenkasten) */
  --accent-auf-dunkel: #9BCB66;
  --accent-auf-dunkel-hell: #B9DB8F;
  /* Linien: --card-border für Karten, --trennlinie innen, --rand-stark für Eingaben und ruhige Buttons */
  --trennlinie: #EFEFEC;
  --rand-stark: #C9C9C5;
  --rand-stark-hover: #A9A9A3;
  /* Warme Flächen: Tabellenkopf "vorher" und Platzhalter hinter Fotos */
  --flaeche-warm: #F3F1EC;
  --flaeche-foto: #E9E3D8;
  --flaeche-kopf: #FAFAF8;
  /* Schatten mit leicht warm-olivem Ton statt reinem Schwarz, Licht von oben */
  --shadow: 0 1px 2px rgba(38,40,24,0.05), 0 4px 14px -4px rgba(38,40,24,0.08);
  --shadow-hover: 0 2px 4px rgba(38,40,24,0.05), 0 18px 40px -12px rgba(38,40,24,0.20);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --font: "Instrument Sans", -apple-system, "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Bricolage Grotesque", var(--font);
  /* Dunkel mit einem Hauch Grün, passend zum Akzent, statt neutralem Schwarz */
  --dunkel: #141712;
  --kopf-hoehe: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--kopf-hoehe) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* clip statt hidden: hidden auf html und body macht body zum Scroll-Container,
   dann bleibt die Kopfzeile (position: sticky) nicht oben stehen. */
html, body { margin: 0; overflow-x: clip; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; }
h1, h2 { font-weight: 700; letter-spacing: -0.025em; }
h3 { font-weight: 650; letter-spacing: -0.01em; }
p, li, dd, figcaption { text-wrap: pretty; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Tastatur: deutlich sichtbarer Fokus, nur bei Tastaturbedienung */
:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 3px; border-radius: 4px; }
.sprung-link {
  position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--dunkel); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-md); font-weight: 700; text-decoration: none; transition: top 150ms ease;
}
.sprung-link:focus { top: 12px; }

/* Buttons und Textlinks */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 600; line-height: 1.2;
  padding: 14px 26px; border-radius: var(--radius-pill); border: none; cursor: pointer;
  text-decoration: none;
  transition: transform 220ms cubic-bezier(0.2,0.8,0.2,1), background-color 180ms ease, box-shadow 220ms ease, border-color 180ms ease;
}
.btn:active { transform: scale(0.97); transition-duration: 80ms; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 1px 2px rgba(38,58,18,0.25); }
.btn-ruhig { background: transparent; color: var(--text); border: 1px solid var(--rand-stark); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--accent-dunkel); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 8px 18px -8px rgba(20,20,20,0.35); }
  .btn-ruhig:hover { background: #fff; border-color: var(--rand-stark-hover); }
  .btn:active { transform: scale(0.97); }
}
.textlink { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.textlink:hover { text-decoration-thickness: 2px; }

/* Kopfzeile */
header.kopf {
  position: sticky; top: 0; z-index: 30;
  background: rgba(246,246,245,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--kopf-hoehe); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; color: var(--text); }
.brand img { width: 30px; height: 30px; }
.nav-liste { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.nav-liste a { text-decoration: none; padding: 6px 0; display: inline-block; transition: color 160ms ease; }
.nav-liste a:hover, .nav-liste a[aria-current="page"] { color: var(--accent); }
.nav-liste a.nav-download { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px solid currentColor; padding: 2px 0; }
.nav-liste a.nav-download svg { width: 15px; height: 15px; }
.nav-schalter {
  display: none; align-items: center; gap: 8px; background: none; border: 1px solid var(--rand-stark); border-radius: var(--radius-pill);
  padding: 8px 14px; font: 600 14px var(--font); color: var(--text); cursor: pointer;
}
.nav-schalter svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  .js .nav-schalter { display: inline-flex; }
  .js .nav-liste {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--card-border); box-shadow: 0 12px 24px rgba(20,20,20,0.08); padding: 8px 20px 16px;
  }
  .js .nav-liste.offen { display: flex; }
  .js .nav-liste a { padding: 13px 4px; border-bottom: 1px solid var(--trennlinie); width: 100%; font-size: 15.5px; }
  .js .nav-liste li:last-child a { border-bottom: none; }
  .js .nav-liste a.nav-download { border-bottom: none; margin-top: 6px; }
  /* Ohne JavaScript: Links einfach umbrechen statt verstecken */
  .no-js .nav { flex-wrap: wrap; padding: 10px 0; }
  .no-js .nav-liste { flex-wrap: wrap; gap: 10px 18px; }
}

/* Abschnitte */
section { padding: 88px 0; }
section.hell { background: #fff; }
@media (max-width: 640px) { section { padding: 64px 0; } }
/* Dachzeile: Satzschreibung mit kurzem Strich davor statt Versalien */
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--accent); text-align: center; margin: 0 0 12px; }
.eyebrow::before { content: ""; display: inline-block; width: 18px; height: 2px; background: currentColor; vertical-align: middle; margin: -2px 10px 0 0; border-radius: 2px; }
h2.abschnitt-titel { font-size: clamp(27px, 3.4vw, 40px); line-height: 1.1; text-align: center; margin: 0 0 16px; }
p.abschnitt-unter { font-size: 17px; line-height: 1.6; color: var(--muted); text-align: center; max-width: 600px; margin: 0 auto 48px; }

/* Abschnittskopf, linksbündig: Titel links, Unterzeile rechts unten.
   <div class="abschnitt-kopf"> um Dachzeile, Titel und Unterzeile legen. */
.abschnitt-kopf { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); grid-template-rows: 1fr auto; column-gap: 64px; align-items: end; margin-bottom: 56px; }
.abschnitt-kopf .eyebrow, .abschnitt-kopf h2.abschnitt-titel, .abschnitt-kopf p.abschnitt-unter { text-align: left; grid-column: 1; margin-left: 0; margin-right: 0; }
.abschnitt-kopf h2.abschnitt-titel { margin-bottom: 0; }
.abschnitt-kopf p.abschnitt-unter { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding-bottom: 4px; max-width: 46ch; }
@media (max-width: 860px) {
  .abschnitt-kopf { grid-template-columns: 1fr; margin-bottom: 40px; }
  .abschnitt-kopf p.abschnitt-unter { grid-column: 1; grid-row: auto; margin-top: 14px; }
}

/* Sanftes Einblenden beim Scrollen. Ohne JavaScript oder bei
   "Bewegung reduzieren" ist alles sofort sichtbar. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms cubic-bezier(0.2,0.6,0.2,1), transform 700ms cubic-bezier(0.2,0.6,0.2,1); }
.js .reveal.reveal-bild { transform: translateY(18px) scale(0.985); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-1.is-visible { transition-delay: 80ms; }
.js .reveal-2.is-visible { transition-delay: 160ms; }
.js .reveal-3.is-visible { transition-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal.reveal-bild { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Gewerk-Kacheln (Startseite und Branchen-Übersicht) */
.gewerk-raster { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gewerk-raster.startseite { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .gewerk-raster, .gewerk-raster.startseite { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) {
  .gewerk-raster.startseite { gap: 10px; }
  .gewerk-raster.startseite .gewerk-kachel { gap: 10px; padding: 12px; }
  .gewerk-raster.startseite .gewerk-kachel strong { font-size: 14px; hyphens: auto; }
  .gewerk-raster.startseite .gewerk-symbol { width: 34px; height: 34px; border-radius: 9px; }
  .gewerk-raster.startseite .gewerk-symbol svg { width: 18px; height: 18px; }
}
@media (max-width: 560px) { .gewerk-raster { grid-template-columns: 1fr; } }
.gewerk-kachel {
  display: flex; align-items: center; gap: 14px; height: 100%; padding: 16px 18px; background: #fff; border: 1px solid var(--card-border);
  border-radius: var(--radius-md); text-decoration: none; color: var(--text);
  transition: border-color 180ms ease, box-shadow 220ms ease, transform 220ms cubic-bezier(0.2,0.8,0.2,1);
}
.gewerk-kachel:active { transform: scale(0.98); }
@media (hover: hover) { .gewerk-kachel:hover { border-color: var(--accent-500); box-shadow: var(--shadow-hover); transform: translateY(-2px); } }
.gewerk-kachel strong { font-size: 15px; display: block; }
.gewerk-kachel .kachel-text { display: block; font-size: 13.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.gewerk-kachel.klein { padding: 13px 15px; }
.gewerk-kachel.klein strong { font-size: 14.5px; }
.gewerk-symbol { flex-shrink: 0; width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.gewerk-symbol svg { width: 22px; height: 22px; }
.gewerk-kachel.klein .gewerk-symbol { width: 36px; height: 36px; border-radius: 9px; }
.gewerk-kachel.klein .gewerk-symbol svg { width: 19px; height: 19px; }

/* Fußzeile */
footer.fuss { background: var(--dunkel); color: rgba(255,255,255,0.72); padding: 44px 0 36px; font-size: 13.5px; }
.fuss-zeile { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 18px; }
.fuss-links { display: flex; gap: 0 14px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
footer.fuss a { color: inherit; }
/* Links mit eigener Fläche, damit sie auf dem Handy gut zu treffen sind (mind. 40px hoch) */
.fuss-links a { text-decoration: none; display: inline-block; padding: 11px 4px; }
.fuss-zeile > div a { display: inline-block; padding: 8px 0; }
.fuss-links a:hover { color: #fff; text-decoration: underline; }

/* "Bewegung reduzieren": Verschieben und Skalieren entfallen, Farb- und
   Schattenwechsel bleiben als Rückmeldung erhalten. Steht am Ende, damit es die
   Hover-Regeln oben überschreibt. */
@media (prefers-reduced-motion: reduce) {
  .btn, .gewerk-kachel { transition-property: background-color, border-color, box-shadow, color; }
  .btn:active, .btn-primary:hover, .gewerk-kachel:hover, .gewerk-kachel:active { transform: none; }
  .sprung-link { transition: none; }
}
