/* Tensio — Website
 *
 * Ein einziges Stylesheet für alle Seiten, deutsch wie englisch.
 *
 * Die Farben stammen aus `app/lib/theme/app_colors.dart`. Ändert sich dort
 * etwas an der Marke, gehört es hier nachgezogen — die App ist die Quelle,
 * nicht diese Datei.
 *
 * Bewusst dunkel und ohne Hell-Variante: Die öffentlichen Seiten des Servers
 * (`server/src/views/page.js`, `routes/impact.js`, `routes/legal.js`) sind es
 * ebenfalls. Ein Nutzer, der aus dem Footer heraus zur Datenschutzerklärung
 * springt, soll nicht den Eindruck haben, die Seite gewechselt zu haben.
 *
 * Keine externen Ressourcen — keine Web-Fonts, kein CDN, kein Tracker. Eine
 * Seite, die für eine App mit „deine Daten bleiben bei dir" wirbt und dabei
 * Schriften von einem fremden Server nachlädt, widerspricht sich selbst.
 */

:root {
  color-scheme: dark;

  /* Marke */
  --brand: #0e9f6e;
  --brand-dark: #0b7355;
  --brand-soft: rgba(14, 159, 110, 0.12);
  --brand-line: rgba(14, 159, 110, 0.32);

  /* Zustände — dieselbe Bedeutung wie in der App */
  --success: #16a34a;
  --at-risk: #d97706;
  --danger: #e23d3d;

  /* Flächen */
  --obsidian: #121212;
  --surface: #191b1a;
  --surface-high: #202322;
  --border: #2b2f2d;
  --border-soft: #232725;

  /* Schrift */
  --text: #ededed;
  --muted: #a9afb6;
  --faint: #6b7278;

  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1080px;
  --maxw-narrow: 760px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
}

/* ── Grundgerüst ───────────────────────────────────────────────────────── */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--obsidian);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 750;
}

h3 {
  font-size: 1.12rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

/* Für Bildschirmleser sichtbar, optisch nicht. */
.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;
}

/* „Zum Inhalt springen" — erscheint nur bei Tastaturbedienung. */
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  font-weight: 700;
  transition: top 0.15s;
}

.skip:focus {
  top: 12px;
  text-decoration: none;
}

/* ── Layout ────────────────────────────────────────────────────────────── */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: var(--maxw-narrow);
}

section {
  padding: 68px 0;
  border-top: 1px solid var(--border-soft);
}

section:first-of-type {
  border-top: 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.section-head p {
  color: var(--muted);
  margin: 12px 0 0;
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}

/* ── Kopfzeile ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 18, 18, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 66px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Sprachumschalter */
.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 700;
}

.lang a,
.lang span {
  padding: 5px 12px;
  color: var(--faint);
  letter-spacing: 0.04em;
}

.lang a:hover {
  color: var(--text);
  text-decoration: none;
  background: var(--surface-high);
}

.lang [aria-current="true"] {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ── Knöpfe ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: #12b47d;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-note {
  color: var(--faint);
  font-size: 0.88rem;
  margin: 14px 0 0;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  padding: 84px 0 72px;
  border-top: 0;
  position: relative;
  overflow: hidden;
}

/* Ein einzelner grüner Schimmer hinter der Überschrift. Dezent — die Seite
   verkauft Verbindlichkeit, keine Rave-Ästhetik. */
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  width: 780px;
  height: 480px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(14, 159, 110, 0.16),
    transparent 68%
  );
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero-inner {
  max-width: 720px;
}

/* Hero mit Gerät daneben. Das Bild steht im Markup **nach** dem Text, damit
   Bildschirmleser und die Reihenfolge beim schmalen Layout stimmen — auf
   breiten Schirmen holt `order` es nach rechts, ohne die Lesereihenfolge zu
   ändern. */
.hero-split {
  display: grid;
  gap: 40px;
  align-items: center;
  grid-template-columns: 1fr;
}

.hero-split .hero-inner {
  max-width: 640px;
}

.hero-shot {
  justify-self: center;
}

.hero-shot img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
}

@media (min-width: 900px) {
  .hero-split {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .hero-shot img {
    max-width: 340px;
  }
}

/* ── Bildstrecken ──────────────────────────────────────────────────────── */

.shots {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.shot {
  text-align: center;
}

.shot img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto 16px;
}

.shot b {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.shot span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Bild neben Text. `.flip` stellt das Bild auf breiten Schirmen nach links,
   ohne es im Markup zu verschieben. */
.showcase {
  display: grid;
  gap: 34px;
  align-items: center;
  grid-template-columns: 1fr;
}

.showcase-media img {
  display: block;
  width: 100%;
  max-width: 290px;
  height: auto;
  margin: 0 auto;
}

.showcase-body > :first-child {
  margin-top: 0;
}

@media (min-width: 860px) {
  .showcase {
    grid-template-columns: 320px 1fr;
    gap: 52px;
  }

  .showcase.flip .showcase-media {
    order: 2;
  }
}

/* Breites Stimmungsbild über die volle Spaltenbreite. */
.figure-wide {
  margin: 0;
}

.figure-wide img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.figure-wide figcaption {
  color: var(--faint);
  font-size: 0.88rem;
  margin-top: 12px;
  text-align: center;
}

.hero p.lead {
  font-size: clamp(1.08rem, 2.2vw, 1.28rem);
  color: var(--muted);
  margin: 20px 0 30px;
  max-width: 60ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--brand);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 22px;
}

/* ── Kennzahlen-Band ───────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat {
  background: var(--surface);
  padding: 26px 22px;
}

.stat b {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1.1;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

/* ── Karten ────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 18px;
}

/* Bewusst breite Mindestspalte: Die Abschnitte hier haben meist vier Karten,
   und bei 300px kämen auf einem 1080er-Raster drei Spalten heraus — die vierte
   Karte stünde allein in einer zweiten Zeile. 420px erzwingt echte Paare. */
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card p {
  color: var(--muted);
  font-size: 0.98rem;
}

/* Kleines Symbol über der Kartenüberschrift, rein dekorativ. */
.card .icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.card.accent-danger .icon {
  background: rgba(226, 61, 61, 0.13);
  color: var(--danger);
}

.card.accent-danger {
  border-color: rgba(226, 61, 61, 0.28);
}

.card.accent-warn .icon {
  background: rgba(217, 119, 6, 0.14);
  color: var(--at-risk);
}

/* ── Schritte (So funktioniert es) ─────────────────────────────────────── */

.steps {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px 24px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 22px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.step h3 {
  margin: 6px 0 8px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ── Listen ────────────────────────────────────────────────────────────── */

.check {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 11px;
  color: var(--muted);
}

.check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand);
  font-weight: 800;
}

.check li:last-child {
  margin-bottom: 0;
}

.check li b,
.check li strong {
  color: var(--text);
  font-weight: 650;
}

.check.cross li::before {
  content: "✕";
  color: var(--faint);
}

/* ── Tabelle (Prüfquellen, Preisvergleich) ─────────────────────────────── */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  min-width: 480px;
}

th,
td {
  text-align: left;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

thead th {
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface-high);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.muted,
th.muted {
  color: var(--muted);
}

td .yes {
  color: var(--brand);
  font-weight: 700;
}

td .no {
  color: var(--faint);
}

/* ── Kategorie-Kacheln ─────────────────────────────────────────────────── */

.tiles {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.tile b {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
}

.tile b span {
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.tile p {
  margin: 6px 0 0;
  color: var(--faint);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ── Zwei-Modi-Block ───────────────────────────────────────────────────── */

.split {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* ── Aufteilung des Einsatzes ──────────────────────────────────────────── */

.split-bar {
  display: flex;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 22px 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.split-bar span {
  display: grid;
  place-items: center;
  color: #fff;
}

.split-bar .charity {
  flex: 80;
  background: var(--brand);
}

.split-bar .fee {
  flex: 20;
  background: var(--surface-high);
  color: var(--muted);
}

/* ── Preis-Karten ──────────────────────────────────────────────────────── */

.plans {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}

.plan.featured {
  border-color: var(--brand-line);
  background: linear-gradient(180deg, var(--brand-soft), transparent 220px),
    var(--surface);
}

.plan .price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 12px 0 20px;
}

.plan .price b {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.plan .price span {
  color: var(--muted);
  font-size: 0.95rem;
}

.plan h3 {
  font-size: 1.3rem;
}

.plan > p {
  color: var(--muted);
  font-size: 0.96rem;
}

/* ── FAQ ───────────────────────────────────────────────────────────────── */

.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.faq details {
  border-bottom: 1px solid var(--border-soft);
}

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--brand);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
}

.faq details[open] summary::after {
  content: "–";
}

.faq summary:hover {
  background: var(--surface-high);
}

.faq .answer {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 0.98rem;
}

.faq .answer p:last-child {
  margin-bottom: 0;
}

/* ── Empfänger-Verzeichnis ─────────────────────────────────────────────────
   Aufklappbare Kategorien mit den einzelnen Organisationen darin. Dieselbe
   Bauart wie die FAQ — <details>/<summary>, also **ohne JavaScript**: Die Seite
   hat keines, und für „Liste auf- und zuklappen" gäbe es auch keinen Grund,
   damit anzufangen. Ein Vorteil nebenbei: Der Inhalt steht auch dann im
   Dokument, wenn nie jemand klickt, und ist damit durchsuch- und auffindbar.

   Der Block zwischen den Marken `charities:start/end` in funktionen.html und
   en/features.html wird von `web/tools/render_charities.py` aus
   `app/lib/data/charities.dart` erzeugt — nicht von Hand ändern. */

.orgs {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.orgs details {
  border-bottom: 1px solid var(--border-soft);
}

.orgs details:last-child {
  border-bottom: 0;
}

.orgs summary {
  cursor: pointer;
  padding: 18px 22px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
}

.orgs summary::-webkit-details-marker {
  display: none;
}

.orgs summary:hover {
  background: var(--surface-high);
}

.orgs .org-cat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
}

.orgs .org-cat .count {
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Der Aufhänger nimmt den Rest der Zeile und weicht auf schmalen Geräten in
   die zweite. Das Pluszeichen bleibt rechts, damit die Spalte ruhig bleibt. */
.orgs summary .hint {
  color: var(--muted);
  font-size: 0.94rem;
  flex: 1 1 240px;
}

.orgs summary::after {
  content: "+";
  color: var(--brand);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}

.orgs details[open] summary::after {
  content: "–";
}

.orgs .org-list {
  display: grid;
  gap: 18px 24px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  padding: 4px 22px 22px;
}

.orgs .org b {
  display: block;
  font-size: 0.98rem;
  font-weight: 650;
}

.orgs .org p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 4px 0 6px;
}

.orgs .org a {
  color: var(--faint);
  font-size: 0.84rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.orgs .org a:hover,
.orgs .org a:focus-visible {
  color: var(--brand);
  border-bottom-color: var(--brand-line);
}

/* ── Hinweiskasten ─────────────────────────────────────────────────────── */

.note {
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  color: var(--muted);
  font-size: 0.96rem;
}

.note b {
  color: var(--text);
}

.note p:last-child {
  margin-bottom: 0;
}

/* ── Abschluss-Aufruf ──────────────────────────────────────────────────── */

.cta {
  text-align: center;
  background: linear-gradient(180deg, var(--surface), var(--obsidian));
}

.cta .wrap {
  max-width: 620px;
}

.cta p {
  color: var(--muted);
  margin: 14px auto 26px;
}

.cta .btn-row {
  justify-content: center;
}

/* ── Fußzeile ──────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 46px 0 60px;
  color: var(--faint);
  font-size: 0.92rem;
}

.footer-cols {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 34px;
}

.footer-cols h4 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-cols li {
  margin-bottom: 8px;
}

.footer-cols a {
  color: var(--faint);
}

.footer-cols a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  section {
    padding: 52px 0;
  }

  .hero {
    padding: 56px 0 52px;
  }

  .site-nav {
    gap: 16px;
    width: 100%;
    margin-left: 0;
    order: 3;
  }

  .lang {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
