/* Plancare – Webseite. Eigenständig gestaltet, keine fremden Server, Schrift lokal (Outfit, SIL OFL 1.1). */

@font-face {
  font-family: "Outfit";
  src: url("schrift/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Dunkel: tiefes Navy/Petrol */
  --nacht: #061a24; --nacht-2: #0a2a36; --nacht-rand: rgba(160, 230, 240, 0.16);
  --auf-nacht: #e9f6f8; --auf-nacht-leise: #a7c2c9;
  /* Hell: Weiss bis kühles Blaugrau */
  --weiss: #ffffff; --kuehl: #eef3f7; --kuehl-2: #e3ebf1;
  --text: #0b1f2a; --text-leise: #4a5d69; --linie: #d6e1e8;
  /* Farben */
  --petrol: #0f7f8a; --petrol-hell: #2bb3b1; --blau: #2f6fe4; --cyan: #4fe3f0; --mint: #5ef2c2;
  --rot: #d43a3a; --rot-grund: #fde6e6; --gruen: #13895f;
  /* Dienste im Stil des Logos */
  --d-f: #7fe0d0; --d-s: #4d8ff0; --d-n: #0f3d55; --d-frei: #e6edf2;
  --radius: 22px;
  --schatten: 0 18px 50px rgba(11, 31, 42, 0.12);
  --weich: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
/* Dunkel bis zum Rand: auch beim Überscrollen oben/unten, hinter der Uhr und hinter der Safari-Leiste */
html { scroll-behavior: smooth; scroll-padding-top: calc(84px + env(safe-area-inset-top)); -webkit-text-size-adjust: 100%;
  color-scheme: dark; background-color: #061a24; }
body {
  margin: 0; background: var(--nacht); color: var(--text);
  font: 400 17px/1.6 "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 650; }
p { margin: 0; }
.unsichtbar { position: absolute; width: 0; height: 0; overflow: hidden; }
.springen { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--weiss); padding: 8px 14px; border-radius: 999px; }
.springen:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.breite { width: min(1160px, 100% - 40px - env(safe-area-inset-left) - env(safe-area-inset-right)); margin: 0 auto; }
section { position: relative; padding: clamp(72px, 10vw, 128px) 0; }
.dunkel { background: var(--nacht); color: var(--auf-nacht); }
.hell { background: var(--weiss); }
.kuehl { background: linear-gradient(180deg, var(--kuehl) 0%, var(--kuehl-2) 100%); }
.vorzeile { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--petrol); margin-bottom: 14px; }
.vorzeile.rot { color: var(--rot); }
.vorzeile.gruen { color: var(--gruen); }
.einleitung { font-size: 19px; color: var(--text-leise); max-width: 640px; margin-top: 18px; }
.hinweis { font-size: 14px; color: var(--text-leise); margin-top: 14px; }

/* ---------- Kopfzeile: fixiert, durchsichtig, Inhalt darunter unscharf ---------- */
.kopf {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: calc(68px + env(safe-area-inset-top));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
  padding-top: env(safe-area-inset-top);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.kopf[data-ton="dunkel"] { background: rgba(6, 26, 36, 0.45); color: var(--auf-nacht); border-color: rgba(160, 230, 240, 0.10); }
.kopf[data-ton="hell"] { background: rgba(255, 255, 255, 0.68); color: var(--text); border-color: rgba(11, 31, 42, 0.08); }
/* Logo: nur die Höhe ist fest, die Breite folgt dem Bild (766 × 120). Nie schrumpfen lassen – lieber kleiner setzen. */
.kopf-logo { display: block; flex: none; line-height: 0; }
.kopf-logo img { height: 26px; width: auto; max-width: none; aspect-ratio: 766 / 120; }
.kopf[data-ton="dunkel"] .logo-auf-hell, .kopf[data-ton="hell"] .logo-auf-dunkel { display: none; }
.kopf-links { display: flex; align-items: center; gap: 26px; font-size: 16px; font-weight: 500; }
.kopf-links > a:not(.pille) { text-decoration: none; opacity: 0.85; }
.kopf-links > a:not(.pille):hover { opacity: 1; }
.kopf[data-ton="hell"] .pille { color: var(--text); border-color: rgba(11, 31, 42, 0.25); }
.kopf[data-ton="hell"] .pille:hover { color: var(--nacht); }

/* ---------- Knopf als Pille: Akzentfarbe füllt sich von unten ---------- */
.pille {
  position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 28px; border-radius: 999px; border: 1.5px solid rgba(79, 227, 240, 0.7);
  background: transparent; color: var(--auf-nacht); font: inherit; font-weight: 600; font-size: 17px;
  text-decoration: none; cursor: pointer; transition: color 0.35s var(--weich), border-color 0.35s var(--weich);
}
.pille::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--mint);
  transform: translateY(101%); transition: transform 0.4s var(--weich); border-radius: inherit;
}
.pille:hover, .pille:focus-visible { color: var(--nacht); border-color: var(--mint); }
.pille:hover::before, .pille:focus-visible::before { transform: translateY(0); }
.pille.klein { min-height: 40px; padding: 0 18px; font-size: 15px; }
.pille.gross { min-height: 58px; padding: 0 36px; font-size: 19px; }
.hell .pille, .kuehl .pille { color: var(--text); border-color: var(--petrol); }
.hell .pille:hover, .kuehl .pille:hover { color: var(--nacht); }
.pille.rot { border-color: var(--rot); color: var(--rot); }
.pille.rot::before { background: var(--rot); }
.pille.rot:hover { color: var(--weiss); border-color: var(--rot); }
.textlink { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: inherit; cursor: pointer; text-decoration: none; border-bottom: 1px solid currentColor; opacity: 0.85; }
.textlink:hover { opacity: 1; }

/* ---------- Hero: alles zentriert, grosses Glas-Symbol als Blickfang ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: calc(76px + env(safe-area-inset-top)) 0 36px; }
.hero-inhalt { position: relative; width: min(1160px, 100% - 40px); margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.licht { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.licht span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; animation: treiben 18s ease-in-out infinite alternate; }
.licht span:nth-child(1) { width: 56vmax; height: 56vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle, #0f7f8a 0%, transparent 65%); }
.licht span:nth-child(2) { width: 46vmax; height: 46vmax; right: -16vmax; top: 4vmax; background: radial-gradient(circle, #2f6fe4 0%, transparent 65%); opacity: 0.4; animation-duration: 22s; }
.licht span:nth-child(3) { width: 34vmax; height: 34vmax; left: 30%; bottom: -20vmax; background: radial-gradient(circle, #4fe3f0 0%, transparent 65%); opacity: 0.28; animation-duration: 26s; }
.licht.leise span { opacity: 0.32; }
@keyframes treiben { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); } }

/* Symbol: Blöcke ca. 44 % der Breite (Desktop), ca. 70 % (Handy); nie so hoch, dass der Text aus dem ersten Bildschirm fällt.
   Das Leuchten ragt über den Rand hinaus (overflow: visible). --raus (0 bis 1) setzt seite.js beim Scrollen. */
.symbol-buehne {
  position: relative; width: min(44vw, (100svh - 410px) * 1.29, 660px); margin: 8px auto 34px;
  transform: translateY(calc(var(--raus, 0) * -38vh)) scale(calc(1 - var(--raus, 0) * 0.12));
  opacity: calc(1 - var(--raus, 0) * 0.85); filter: brightness(calc(1 - var(--raus, 0) * 0.55)) saturate(calc(1 - var(--raus, 0) * 0.4));
  will-change: transform, opacity;
}
.symbol-licht {
  position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(79, 227, 240, 0.36), rgba(47, 111, 228, 0.20) 45%, rgba(15, 127, 138, 0.08) 70%, transparent);
  filter: blur(10px); animation: licht-an 1.6s ease-out both, atmen 9s ease-in-out 1.6s infinite alternate;
}
@keyframes licht-an { from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); } }
@keyframes atmen { from { opacity: 1; } to { opacity: 0.72; } }
.symbol { position: relative; display: block; width: 100%; height: auto; overflow: visible; }
.symbol .glas { fill: url(#glas-verlauf); }
.symbol .reflex { fill: url(#reflex-verlauf); }
.symbol .saum { fill: none; stroke: url(#kante-verlauf); stroke-width: 9; stroke-linecap: round; filter: url(#saum-weich); opacity: 0.85;
  stroke-dasharray: 1 1.1; stroke-dashoffset: 1.05; animation: zeichnen 0.6s ease-out both; }
.symbol .kante { fill: none; stroke: url(#kante-verlauf); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1 1.1; stroke-dashoffset: 1.05;
  animation: zeichnen 0.6s ease-out both; }
.symbol .funke { fill: none; stroke: #f2feff; stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 0.08 0.92; stroke-dashoffset: 1.08; opacity: 0;
  filter: url(#funke-weich); animation: funke 0.6s ease-out both; }
/* Das Glas füllt sich, sobald die Lichtkante den Block gezeichnet hat */
.symbol .glas, .symbol .reflex { opacity: 0; animation: fuellen 0.6s ease-out both; animation-delay: calc(var(--t) + 0.32s); }
.symbol .glanz { opacity: 0; animation: glanz 11s ease-in-out 1.9s infinite; }
.symbol .glanz.zwei { animation-delay: 4.6s; animation-duration: 13s; }
.b0 > * { --t: 0.10s; } .b1 > * { --t: 0.32s; } .b2 > * { --t: 0.54s; } .b3 > * { --t: 0.76s; } .b4 > * { --t: 0.98s; }
.symbol .saum, .symbol .kante, .symbol .funke { animation-delay: var(--t); }
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
@keyframes funke { 0% { opacity: 0; stroke-dashoffset: 1.08; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; stroke-dashoffset: 0.08; } }
@keyframes fuellen { to { opacity: 1; } }
@keyframes glanz { 0% { opacity: 0; transform: translateX(0); } 10% { opacity: 1; } 70% { opacity: 1; transform: translateX(820px); } 71%, 100% { opacity: 0; transform: translateX(820px); } }

.titel {
  font-size: clamp(38px, 4.6vw, 62px); font-weight: 800; line-height: 1.06; letter-spacing: -0.03em; max-width: 20em;
  background: linear-gradient(90deg, var(--petrol-hell) 0%, #f2fbff 50%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.06em;
}
.titel .umbruch { white-space: nowrap; }
.unterzeile { text-wrap: pretty; font-size: clamp(17px, 1.6vw, 21px); font-weight: 300; color: var(--auf-nacht-leise); max-width: 42em; margin-top: 14px; }
.knoepfe { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 28px; margin-top: 30px; }

/* Text steigt beim Laden leicht auf (nach dem Symbol) */
.auftauchen { animation: auf 0.9s var(--weich) both; }
.v1 { animation-delay: 0.9s; } .v2 { animation-delay: 1.08s; } .v3 { animation-delay: 1.26s; }
@keyframes auf { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Einblenden beim Scrollen (gestaffelt) ---------- */
.js .einblenden { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--weich), transform 0.8s var(--weich); transition-delay: calc(var(--i, 0) * 90ms); }
.js .einblenden.sichtbar { opacity: 1; transform: none; }

/* ---------- Kennzahlen ---------- */
.zahlen { padding: clamp(56px, 8vw, 96px) 0; border-bottom: 1px solid var(--linie); }
.zahlen-raster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.zahl { font-size: clamp(44px, 5.6vw, 60px); font-weight: 750; line-height: 1; letter-spacing: -0.03em; color: var(--text);
  font-variant-numeric: tabular-nums; }
.zahl-titel { font-size: 18px; font-weight: 600; margin-top: 8px; color: var(--petrol); }
.zahl-text { font-size: 15px; color: var(--text-leise); margin-top: 8px; max-width: 18em; }

/* ---------- Dienst-Blöcke (Legende, Live-Plan, Demo) ---------- */
.d { display: inline-block; width: 18px; height: 12px; border-radius: 4px; background: var(--d-frei); flex: none; }
.d.f { background: var(--d-f); } .d.s { background: var(--d-s); } .d.n { background: var(--d-n); }
.d.frei { background: var(--d-frei); box-shadow: inset 0 0 0 1px var(--linie); }

/* ---------- Live-Plan ---------- */
.monat {
  margin: 44px 0 0; padding: clamp(14px, 2.4vw, 28px); border-radius: var(--radius); background: var(--weiss);
  box-shadow: var(--schatten); border: 1px solid var(--linie);
  display: grid; grid-template-columns: minmax(44px, 72px) 1fr; gap: 6px 10px; align-items: center;
}
.monat .name { font-size: 14px; color: var(--text-leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monat .reihe { display: grid; grid-template-columns: repeat(var(--tage, 30), 1fr); gap: 3px; }
.monat .tage { font-size: 11px; color: var(--text-leise); }
.monat .tage span { text-align: center; }
.monat .tage span.we, .monat .zelle.we { position: relative; }
.monat .tage span.we { color: var(--petrol); font-weight: 600; }
.zelle { height: 16px; border-radius: 4px; background: var(--d-frei); transition: transform 0.45s var(--weich), background-color 0.45s ease, opacity 0.45s ease; }
.zelle.we { background: #dfe8ef; }
.js .zelle[data-dienst]:not(.da) { transform: scale(0.4); opacity: 0.35; }
.zelle.da.f { background: var(--d-f); } .zelle.da.s { background: var(--d-s); } .zelle.da.n { background: var(--d-n); }
.legende { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; font-size: 15px; color: var(--text-leise); }
.legende span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Geschichte: Chaos → Ordnung → Ruhe ---------- */
.geschichte-raster { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.buehne { position: sticky; top: 110px; }
.szene { position: relative; margin: 0; padding: 26px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.8); border: 1px solid var(--linie);
  box-shadow: var(--schatten); min-height: 392px; }
.szene-plan { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.szene-plan .zelle { height: 34px; border-radius: 9px; position: relative; transition: background-color 0.6s ease, box-shadow 0.6s ease, transform 0.6s var(--weich); }
.szene-plan .zelle.f { background: var(--d-f); } .szene-plan .zelle.s { background: var(--d-s); } .szene-plan .zelle.n { background: var(--d-n); }
.szene-plan .zelle.luecke { background: var(--rot-grund); box-shadow: inset 0 0 0 2px var(--rot); }
.szene-plan .zelle.luecke::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--rot); font-weight: 800; transition: opacity 0.4s; }
.szene[data-phase="ordnung"] .zelle.luecke { background: rgba(79, 227, 240, 0.18); box-shadow: inset 0 0 0 2px var(--petrol-hell); }
.szene[data-phase="ordnung"] .zelle.luecke::after { content: "?"; color: var(--petrol); }
.szene[data-phase="ruhe"] .zelle.luecke { background: var(--d-f); box-shadow: none; }
.szene[data-phase="ruhe"] .zelle.luecke::after { opacity: 0; }
.blase, .vorschlag-karte, .freigabe { position: absolute; transition: opacity 0.5s ease, transform 0.5s var(--weich); }
.blase { padding: 10px 16px; border-radius: 18px 18px 18px 4px; background: var(--weiss); color: var(--text); font-size: 15px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(212, 58, 58, 0.18); border: 1px solid #f3c4c4; max-width: 15em; }
.b-1 { left: 22px; bottom: 82px; transform: rotate(-2deg); }
.b-2 { right: 22px; bottom: 26px; transform: rotate(2deg); }
.vorschlag-karte { left: 26px; right: 26px; bottom: 24px; display: grid; gap: 2px; padding: 14px 18px; border-radius: 16px;
  background: var(--nacht); color: var(--auf-nacht); box-shadow: 0 16px 40px rgba(6, 26, 36, 0.3); }
.vorschlag-karte strong { color: var(--mint); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.vorschlag-karte small { color: var(--auf-nacht-leise); font-size: 14px; }
.freigabe { left: 50%; bottom: 40px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 12px 22px; border-radius: 999px; background: var(--gruen); color: var(--weiss); font-weight: 600; box-shadow: 0 14px 34px rgba(19, 137, 95, 0.35); }
.haken { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); font-size: 14px; }
.szene:not([data-phase="chaos"]) .blase { opacity: 0; transform: translateY(12px) scale(0.96); }
.szene:not([data-phase="ordnung"]) .vorschlag-karte { opacity: 0; transform: translateY(14px); pointer-events: none; }
.szene:not([data-phase="ruhe"]) .freigabe { opacity: 0; transform: translate(-50%, 14px) scale(0.95); }
.schritte { display: grid; gap: 0; }
.schritt { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.35; transition: opacity 0.5s ease; }
.schritt.aktiv { opacity: 1; }
.schritt h2 { margin-bottom: 14px; }
.schritt p:not(.vorzeile) { font-size: 19px; color: var(--text-leise); max-width: 28em; }

/* ---------- Mini-Demo ---------- */
.demo-raster { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.glas {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62); border: 1px solid rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, var(--schatten);
}
/* Lichtfleck folgt der Maus */
.glas::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(79, 227, 240, 0.22), transparent 70%);
}
.glas:hover::after { opacity: 1; }
.demo-karte { padding: 26px; background: rgba(240, 246, 250, 0.75); border-color: var(--linie); }
.demo-kopf { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.demo-kopf span { color: var(--text-leise); font-size: 15px; }
.demo-liste { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.demo-liste li { display: grid; grid-template-columns: 22px 64px 1fr; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--weiss); border: 1px solid var(--linie); transition: border-color 0.4s, background-color 0.4s; }
.demo-liste li > span:first-of-type { color: var(--text-leise); font-size: 15px; }
.krank-name { transition: color 0.3s; }
.ersatz-name { display: none; color: var(--gruen); font-weight: 600; }
.demo-karte[data-zustand="fertig"] .krank-name { display: none; }
.demo-karte[data-zustand="fertig"] .ersatz-name { display: inline; }
.demo-karte:not([data-zustand="start"]) .krank-name { text-decoration: line-through; color: var(--rot); }
.demo-karte[data-zustand="sucht"] .betroffen, .demo-karte[data-zustand="vorschlag"] .betroffen { border-color: var(--rot); background: var(--rot-grund); }
.demo-karte[data-zustand="fertig"] .betroffen { border-color: var(--gruen); }
.demo-zeile { display: none; }
.demo-karte[data-zustand="start"] [data-fuer="start"], .demo-karte[data-zustand="sucht"] [data-fuer="sucht"],
.demo-karte[data-zustand="vorschlag"] [data-fuer="vorschlag"], .demo-karte[data-zustand="fertig"] [data-fuer="fertig"] {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; animation: auf 0.5s var(--weich) both;
}
.demo-zeile.vorschlag { flex-direction: column; align-items: flex-start !important; }
.luecke { color: var(--rot); font-weight: 600; }
.gruende { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--text-leise); }
.gruende li::before { content: "✓"; color: var(--gruen); font-weight: 700; margin-right: 8px; }
.erledigt { display: inline-flex; align-items: center; gap: 10px; color: var(--gruen); font-weight: 600; }
.erledigt .haken { background: var(--gruen); color: var(--weiss); }
.lader { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--linie); border-top-color: var(--petrol); animation: drehen 0.8s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

/* ---------- Funktionen ---------- */
.funktionen { overflow: hidden; }
.farbflecken span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.45; pointer-events: none; }
.farbflecken span:nth-child(1) { width: 520px; height: 520px; left: -160px; top: 120px; background: radial-gradient(circle, #9fe9e4, transparent 70%); }
.farbflecken span:nth-child(2) { width: 600px; height: 600px; right: -200px; bottom: -120px; background: radial-gradient(circle, #a9c6fb, transparent 70%); }
.karten { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.karte { padding: 26px 24px 28px; }
.karte .icon { width: 30px; height: 30px; fill: none; stroke: var(--petrol); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.karte h3 { margin-bottom: 10px; }
.karte p { color: var(--text-leise); font-size: 16px; }

/* ---------- Für wen ---------- */
.zwei-spalten { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.spalte { padding: 32px; border-radius: var(--radius); background: var(--kuehl); border: 1px solid var(--linie); }
.spalte h3 { font-size: 24px; margin-bottom: 18px; }
.haken-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.haken-liste li { position: relative; padding-left: 34px; }
.haken-liste li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(94, 242, 194, 0.35); color: var(--petrol); font-weight: 700; font-size: 13px; }

/* ---------- Schluss und Footer ---------- */
.schluss { overflow: hidden; text-align: center; padding: clamp(96px, 14vw, 170px) 0; }
.schluss-inhalt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.schluss h2 { max-width: 16em; background: linear-gradient(90deg, var(--petrol-hell), #f2fbff 50%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.06em; }
.schluss p { color: var(--auf-nacht-leise); font-size: 19px; max-width: 32em; }
.schluss .pille { margin-top: 12px; }
.fuss { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--nacht-rand); }
.fuss-inhalt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; font-size: 15px; color: var(--auf-nacht-leise); }
.fuss-logo { height: 22px; width: auto; max-width: none; aspect-ratio: 766 / 120; }
.fuss nav { display: flex; gap: 22px; }
.fuss nav a { text-decoration: none; color: var(--auf-nacht); opacity: 0.85; }
.fuss nav a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */
.unterseite { padding: calc(140px + env(safe-area-inset-top)) 0 96px; min-height: 70vh; }
.unterseite h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 18px; }
.unterseite h2 { font-size: 24px; margin: 34px 0 10px; }
.unterseite p { color: var(--text-leise); max-width: 42em; margin-top: 10px; }
.entwurf { display: inline-block; padding: 4px 14px; border-radius: 999px; background: #fff4d6; color: #7a4b00; font-weight: 600; font-size: 14px; margin-bottom: 18px; }

/* ---------- Dunkler Grund überall, Boxen bleiben weiss ----------
   Text direkt auf dem dunklen Grund: Überschriften weiss (wichtigste mit Farbverlauf), Labels Mint, Fliesstext hellgrau.
   Text in den weissen Boxen bleibt dunkel. Kontrast nach WCAG AA prüft api/tests/test_website.py. */
:root { --auf-nacht-label: #5ef2c2; --auf-nacht-rot: #ff9b9b; --auf-nacht-gruen: #6ee7a8; }
.dunkel { background-color: var(--nacht); color: var(--auf-nacht); }
section.dunkel { border: 0; }
/* Diffuse Lichtflecken, abwechselnd links und rechts (weich auslaufend, ohne Kante zum nächsten Abschnitt) */
.flecken-links { background-image:
  radial-gradient(ellipse 46% 40% at 4% 46%, rgba(15, 127, 138, 0.34), transparent 72%),
  radial-gradient(ellipse 34% 28% at 92% 66%, rgba(47, 111, 228, 0.16), transparent 72%); }
.flecken-rechts { background-image:
  radial-gradient(ellipse 44% 40% at 96% 46%, rgba(47, 111, 228, 0.26), transparent 72%),
  radial-gradient(ellipse 32% 28% at 10% 66%, rgba(79, 227, 240, 0.12), transparent 72%); }
.dunkel h2 { color: #ffffff; }
.dunkel h2.verlauf {
  background: linear-gradient(90deg, var(--petrol-hell) 0%, #f2fbff 50%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.06em;
}
.dunkel .vorzeile { color: var(--auf-nacht-label); }
.dunkel .vorzeile.rot { color: var(--auf-nacht-rot); }
.dunkel .vorzeile.gruen { color: var(--auf-nacht-gruen); }
.dunkel .einleitung, .dunkel .hinweis, .dunkel .legende, .dunkel .schritt p:not(.vorzeile) { color: var(--auf-nacht-leise); }
.zahlen.dunkel { border-bottom: 0; }
/* Lichtflecken von Hero und Schluss laufen zum nächsten Abschnitt weich aus (keine harte Kante) */
.hero .licht { -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent); mask-image: linear-gradient(to bottom, #000 72%, transparent); }
.schluss .licht { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 80%, transparent); }
/* Legende: Kästchen mit hellem Rand, damit «Nacht» (dunkelblau) auf dem dunklen Grund sichtbar ist */
.dunkel .legende .d { box-shadow: 0 0 0 1.5px rgba(233, 246, 248, 0.55); }
.dunkel .zahl { color: #ffffff; }
.dunkel .zahl-titel { color: var(--auf-nacht-label); }
.dunkel .zahl-text { color: var(--auf-nacht-leise); }
.dunkel .schritt { opacity: 0.4; }
.dunkel .schritt.aktiv { opacity: 1; }
.funktionen .farbflecken span:nth-child(1) { background: radial-gradient(circle, rgba(15, 127, 138, 0.9), transparent 70%); opacity: 0.4; }
.funktionen .farbflecken span:nth-child(2) { background: radial-gradient(circle, rgba(47, 111, 228, 0.9), transparent 70%); opacity: 0.32; }

/* Weisse Boxen: Inhalt und Farben wie bisher, schweben mit weichem Schatten und leichtem Glow */
.dunkel .monat, .dunkel .szene, .dunkel .demo-karte, .dunkel .karte, .dunkel .spalte { color: var(--text); }
.dunkel .monat, .dunkel .szene, .dunkel .karte, .dunkel .spalte, .dunkel .demo-karte {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(160, 230, 240, 0.10), 0 0 48px rgba(79, 227, 240, 0.10);
}
.dunkel .szene { background: #ffffff; }
.dunkel .karte.glas { background: rgba(255, 255, 255, 0.97); }
.dunkel .demo-karte { background: #f4f8fb; }
.dunkel .spalte { background: #ffffff; }
.dunkel .demo-karte .pille:not(.rot) { color: var(--text); border-color: var(--petrol); }
.dunkel .demo-karte .pille:not(.rot):hover { color: var(--nacht); border-color: var(--mint); }

/* ---------- Mission: zwei Spalten, rechts «1 Ziel» mit leuchtendem Bogen ---------- */
.mission { overflow: hidden; padding: clamp(96px, 12vw, 160px) 0; }
/* Grosser weicher Lichtfleck unten links; läuft zum nächsten Abschnitt hin weich aus */
.mission::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 4% 92%, rgba(15, 127, 138, 0.42), rgba(47, 111, 228, 0.16) 45%, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.mission-raster { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.mission-label { font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--auf-nacht-label); margin-bottom: 22px; }
.dunkel .mission-aussage { font-size: clamp(34px, 4.4vw, 58px); font-weight: 250; line-height: 1.12; letter-spacing: -0.02em; color: #ffffff; max-width: 13em; }
.mission-fliesstext { margin-top: 26px; font-size: clamp(17px, 1.5vw, 20px); font-weight: 300; color: var(--auf-nacht-leise); max-width: 32em; }
.mission-ziel { position: relative; text-align: left; container-type: inline-size; }
/* Grösse nach der Breite der Spalte (cqi): «1 objectif» / «1 obiettivo» sind länger als «1 Ziel» */
.ziel-zahl { font-size: min(196px, 30cqi); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em; color: #ffffff;
  text-shadow: 0 0 28px rgba(79, 227, 240, 0.35), 0 0 80px rgba(47, 111, 228, 0.30); white-space: nowrap; }
.ziel-zahl:lang(fr), .ziel-zahl:lang(it) { font-size: min(196px, 17.5cqi); }
.ziel-text { margin-top: 18px; font-size: clamp(18px, 1.7vw, 22px); font-weight: 400; color: var(--auf-nacht); max-width: 19em; }
/* Feine leuchtende Bogenlinie quer durch den Abschnitt, hinter der Zahl */
.bogen { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bogen path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.bogen-schmal { display: none; }
.ziel-zahl, .ziel-text { position: relative; }
.bogen-linie { stroke-width: 1.6; }
.bogen-glow { stroke-width: 10; opacity: 0.35; filter: blur(6px); }
.js .bogen.einblenden { transform: none; }
.js .bogen path { stroke-dasharray: 1 1.1; stroke-dashoffset: 1.05; transition: stroke-dashoffset 2.2s var(--weich) 0.2s; }
.js .bogen.sichtbar path, .js .sichtbar .bogen path { stroke-dashoffset: 0; }

/* ---------- Impressum und Datenschutz: Titel auf dunklem Grund, Inhalt in weissen Karten ---------- */
.unterseite.dunkel { padding: 132px 0 96px; min-height: 0; }
.rechtliches { max-width: 860px; }
.rechtliches h1 { overflow-wrap: anywhere; hyphens: manual; font-size: clamp(30px, 8vw, 56px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.rechtliches h1.verlauf { background: linear-gradient(90deg, var(--petrol-hell) 0%, #f2fbff 50%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.06em; }
.dunkel .rechts-einleitung { color: var(--auf-nacht-leise); font-size: 18px; max-width: 40em; margin: 0 0 36px; }
.rechts-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rechts-karte { background: #ffffff; color: var(--text); border-radius: var(--radius); padding: 28px 30px; margin-bottom: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(160, 230, 240, 0.10), 0 0 48px rgba(79, 227, 240, 0.08); }
.rechts-raster .rechts-karte { margin-bottom: 0; }
.rechts-raster + .rechts-karte { margin-top: 20px; }
.dunkel .rechts-karte h2 { color: var(--text); font-size: 21px; font-weight: 650; margin: 0 0 12px; }
.rechts-karte p, .rechts-karte li { color: var(--text-leise); max-width: none; margin: 0; }
.rechts-karte p + p { margin-top: 10px; }
.rechts-karte address { font-style: normal; color: var(--text); font-size: 18px; line-height: 1.55; margin-bottom: 14px; }
.rechts-karte a { color: var(--petrol); font-weight: 500; }
.rechts-zeile span { display: inline-block; min-width: 4.5em; color: var(--text-leise); }
.rechts-zeile { color: var(--text) !important; }
.rechts-karte .haken-liste li { color: var(--text-leise); }
.stand { font-size: 15px; margin-top: 14px !important; }

/* ---------- Sprachumschalter DE / FR / IT im Kopf ---------- */
.sprachwahl { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; margin-right: 22px; padding: 3px;
  border: 1px solid rgba(160, 230, 240, 0.18); border-radius: 999px; background: rgba(6, 26, 36, 0.35); }
.sprachwahl a { min-width: 34px; min-height: 30px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: var(--auf-nacht-leise); text-decoration: none;
  transition: color 0.25s ease, background-color 0.25s ease; }
.sprachwahl a:hover { color: #ffffff; }
.sprachwahl a[aria-current="page"] { color: var(--nacht); background: var(--mint); }

/* ---------- Handy ---------- */
@media (max-width: 960px) {
  .karten { grid-template-columns: repeat(2, 1fr); }
  .zahlen-raster { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: calc(72px + env(safe-area-inset-top)) 0 36px; }
  .symbol-buehne { width: min(70vw, (100svh - 400px) * 1.29); margin: 14px auto 30px; }
  .titel .umbruch { display: block; white-space: normal; }
  .unterzeile { margin-top: 12px; }
  .knoepfe { margin-top: 24px; gap: 14px 18px; }
  .hero .pille { min-height: 46px; padding: 0 20px; font-size: 16px; white-space: nowrap; }
  .hero .textlink { white-space: nowrap; }
  .kopf { height: calc(60px + env(safe-area-inset-top)); gap: 10px;
    padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  /* Fast deckend: Hinter der Uhr soll keine weisse Karte durchschimmern (Safari färbt die Statusleiste danach) */
  .kopf[data-ton] { background: rgba(6, 26, 36, 0.94); border-color: rgba(160, 230, 240, 0.10); color: var(--auf-nacht); }
  .kopf[data-ton] .logo-auf-hell { display: none; }
  .kopf[data-ton] .logo-auf-dunkel { display: block; }
  .kopf-logo img { height: 20px; }
  .kopf-links > a:not(.pille) { display: none; }
  .kopf .pille.klein { min-height: 36px; padding: 0 14px; font-size: 14px; }
  .sprachwahl { margin-right: 0; padding: 2px; }
  .sprachwahl a { min-width: 28px; min-height: 28px; padding: 0 4px; font-size: 12px; }
  .geschichte-raster, .demo-raster, .zwei-spalten, .mission-raster, .rechts-raster { grid-template-columns: 1fr; }
  .unterseite.dunkel { padding: calc(104px + env(safe-area-inset-top)) 0 72px; }
  .rechts-karte { padding: 22px 20px; }
  .rechts-zeile span { display: block; min-width: 0; font-size: 14px; }
  .bogen-breit { display: none; }
  .bogen-schmal { display: block; position: absolute; inset: auto; left: -20px; top: -24px; width: calc(100% + 40px); height: 150px; }
  .buehne { top: 76px; z-index: 2; }
  .szene { padding: 14px; min-height: 0; height: 262px; }
  .szene-plan { gap: 5px; }
  .szene-plan .zelle { height: 22px; border-radius: 6px; }
  .blase { font-size: 13px; padding: 7px 12px; }
  .b-1 { left: 10px; bottom: 56px; } .b-2 { right: 10px; bottom: 12px; }
  .vorschlag-karte { left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; }
  .freigabe { bottom: 22px; }
  .schritt { min-height: 70svh; padding-top: 40px; }
  .schritt:first-child { margin-top: 24px; }
  .monat { grid-template-columns: 1fr; gap: 4px; }
  .monat .name { font-size: 12px; margin-top: 4px; }
  .monat .reihe { gap: 2px; }
  .zelle { height: 12px; border-radius: 3px; }
  .monat .tage { display: none; }
  .monat .leer { display: none; }
  .demo-karte { padding: 18px; }
  .spalte { padding: 24px; }
  .fuss-inhalt { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .karten { grid-template-columns: 1fr; }
}
/* Schmale Handys: Logo etwas kleiner, Knopf kompakter – nichts wird gequetscht */
@media (max-width: 400px) {
  .kopf-logo img { height: 18px; }
  .kopf .pille.klein { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
  .sprachwahl a { min-width: 26px; padding: 0 3px; font-size: 11.5px; }
}
@media (max-width: 359px) {
  /* 320 px: Für Logo, Sprachwahl und Knopf reicht es nicht. Der Knopf «Vorführung» steht gleich darunter im Hero. */
  .kopf .pille.klein { display: none; }
}
@media (max-width: 520px) {
  .zahlen-raster { gap: 30px 18px; }
  .zahl-text { font-size: 14px; }
}

/* ---------- Weniger Bewegung: alles sofort an seinem Platz ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .symbol .glas, .symbol .reflex { opacity: 1; }
  .symbol .kante, .symbol .saum { stroke-dashoffset: 0; }
  .symbol .funke, .symbol .glanz { opacity: 0; }
  .symbol-buehne { transform: none; opacity: 1; filter: none; }
  .js .einblenden { opacity: 1; transform: none; }
  .js .bogen path { stroke-dashoffset: 0; }
  .js .zelle[data-dienst]:not(.da) { transform: none; opacity: 1; }
  .licht span { animation: none; }
}
