/* Startseite und Rechtstext-Seiten (#47, gestaltet #49, volle Breite #53) — baut auf base.css auf.
   Kein festes width über 320 px: ab 320 px Breite darf nichts quer scrollen.
   Verweise in url(…) absolut wie in HTML (test/route-auth.test.mjs). */

/* Inhaltsbreite: bis --wrap-max, seitlich --gutter Abstand. Der Kopfbereich (.hero) läuft randlos. */
:root { --wrap-max: 1440px; --gutter: clamp(16px, 4vw, 48px);
  /* Statusleiste und Home-Balken der Handy-Rahmen: Gerät, nicht Palette (Nutzerwunsch #53) */
  --phone-bar: #000000; }
.wrap { width: min(var(--wrap-max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Kopf und Fuß: Links mit mindestens 44 px Tippfläche. */
.site-head { border-bottom: 1px solid var(--line); }
.site-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 16px; padding: 6px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--fg); font-weight: 600; text-decoration: none;
}
.brand img { border-radius: 6px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--dim); text-decoration: none; border-radius: var(--radius);
}
.site-nav a:hover { color: var(--fg); }

/* Anmelde-Streifen (#54, start.js): Aktionen und Formular in derselben Rasterzelle, das
   jeweils verdeckte Teil liegt absolut darüber – sonst nähme die Zelle geschlossen die Höhe
   des Formulars an (Handy: leerer Raum im Kopf). Waagerecht beschnitten, damit die Teile
   seitlich hinausgleiten; padding-inline hält den Fokusrahmen sichtbar. */
.strip {
  /* Knopfbreite im Streifen, ein „Platz“ = Knopf + Abstand (Nutzerwunsch #54, siehe unten) */
  --strip-btn: 132px; --strip-slot: calc(var(--strip-btn) + 8px);
  /* Grundbreite fest statt auto: sonst rutscht der Streifen offen (Formular breiter als die
     Knöpfe) unter die Marke. Unter ~20em neben der Marke (Handy) bricht er in eine eigene Zeile. */
  flex: 1 1 20em; position: relative; display: grid; justify-items: end;
  overflow-x: clip; padding-inline: 4px;
}
.strip > * {
  grid-area: 1 / 1; transition: transform .25s ease-out, opacity .25s, visibility .25s;
}
/* Das hereinkommende Teil sofort sichtbar – sonst nimmt es zu Beginn des Übergangs noch keinen
   Fokus an (start.js fokussiert sofort) –, das hinausgehende erst am Ende verborgen. */
.site-head[data-auth="closed"] .strip-actions, .site-head[data-auth="login"] .strip-form {
  transition-duration: .25s, .25s, 0s;
}
.strip-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; }
.strip-form {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 8px;
  width: 100%; padding-right: var(--strip-slot);
  position: absolute; top: 0; right: 0; transform: translateX(100%); opacity: 0; visibility: hidden;
}
/* Beim Öffnen gleiten die Aktionen ganz nach links hinaus, das Formular ganz von rechts herein
   (volle Breite: Nutzerwunsch #54, ein Versatz um nur einen Knopf wirkte wie Rutschen). Am Ende
   steht das Absenden „Anmelden“ einen Platz weiter links, „Zurück“ genau dort, wo „Anmelden“
   stand; der Platz von „Registrieren“ bleibt frei (padding-right). */
.site-head[data-auth="login"] .strip-form { position: static; transform: none; opacity: 1; visibility: visible; }
.site-head[data-auth="login"] .strip-actions {
  position: absolute; top: 0; right: 0; transform: translateX(-100%); opacity: 0; visibility: hidden;
}
/* Offen so hoch wie geschlossen (Nutzerwunsch #54): Feldnamen stehen im Feld, die
   Fehlermeldung hängt unter dem Kopf über dem Inhalt – auf deckendem Grund, die Tönung
   von .auth-error allein ließe das Moodbild durchscheinen. */
.strip-form .auth-error {
  /* rechtsbündig unter „Zurück“: der Platz von „Registrieren“ (padding-right) bleibt frei */
  position: absolute; top: calc(100% + 6px); right: calc(4px + var(--strip-slot)); z-index: 1;
  max-width: calc(100% - 8px - var(--strip-slot));
  background-color: var(--panel);
  background-image: linear-gradient(color-mix(in srgb, var(--error) 13%, transparent), color-mix(in srgb, var(--error) 13%, transparent));
}
.strip-form .auth-field { flex: 1 1 8em; min-width: 0; max-width: 16em; }
/* Gleich breite Knöpfe und gleicher Abstand in beiden Teilen: dann liegt offen „Zurück“ genau
   dort, wo geschlossen „Anmelden“ stand. */
.strip .btn { width: var(--strip-btn); padding-inline: 8px; justify-content: center; }
.strip-form .auth-field input { min-height: 44px; }
/* Am Handy stehen die Felder untereinander, der freie Platz rechts entfällt. */
@media (max-width: 720px) {
  .strip-form { padding-right: 0; }
  .strip-form .auth-error { right: 4px; max-width: calc(100% - 8px); }
  .strip-form .auth-field { flex-basis: 100%; max-width: none; }
}
/* Unter 480 px passen Marke und beide Knöpfe nur ohne Nav; „Funktionen“ und „Preise“ sind
   Abschnitte darunter, „Preise“ steht zudem im Fuß. */
@media (max-width: 480px) {
  .strip-actions .site-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .strip > * { transition: none; }
}

/* Fließtext der Startseite behält seine Zeilenlänge, auch wenn die Spalte breit ist. Rechtstexte
   laufen über die volle Inhaltsbreite (Nutzerwunsch #54: in der schmalen Spalte ragten die
   Überschriften weit über den Text hinaus). */
main.wrap { padding: 8px 0 48px; }
/* :where hält die Spezifität niedrig, sonst überstimmt die Id .hero-text .claim/.lead */
:where(#startseite main) :is(p, li) { max-width: 40em; }
#startseite main { padding-bottom: 48px; }
section { margin-top: 40px; }
/* Display-Schrift nur in Überschriften; sie hat nur einen Schnitt, darum 400.
   overflow-wrap: Notbremse gegen Querscrollen. Mindestgrößen so, dass bei 320 px kein Wort
   im Wort bricht (E2E e2e/startseite.spec.mjs); „Datenschutz&shy;erklärung“ trennt weich. */
h1, h2, h3, .claim { font-family: var(--font-display); font-weight: 400; overflow-wrap: anywhere; }
h1, h2, h3 { color: var(--accent); line-height: 1.05; }
h1 { margin: 0 0 12px; font-size: clamp(32px, 4.5vw, 56px); }
h2 { margin: 0 0 14px; font-size: clamp(26px, 3vw, 40px); display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
h3 { margin: 0 0 6px; font-size: clamp(21px, 2.2vw, 30px); letter-spacing: .01em; }
p { margin: 0 0 10px; }
.note { color: var(--dim); font-size: 14px; }

/* Bandeirinhas (São-João-Fähnchen) als Schmuck über dem Hero und vor „Für wen“. */
#startseite .hero::before, #fuer-wen::before {
  content: ""; display: block; height: 36px; margin-bottom: 20px;
  background: url("/start/bandeirinhas.svg") repeat-x left center / auto 36px;
}

/* Rechtstexte nutzen .hero schlicht; Moodbild, Verlauf und Schmuck nur auf der Startseite. */
.hero { margin-top: 32px; }
/* Kopfbereich (#53): randlos, Moodbild dahinter, Bandeirinhas oben, Text mittig im Rest.
   Verlauf --deep von --shade-alpha am linken Rand bis durchsichtig nach --shade-width,
   multipliziert aufs Bild – dunkelt hinter der Schrift ab. Lesbarkeit prüft die
   Pixelprobe in e2e/startseite.spec.mjs, auch nach einem Bildtausch.
   isolation: sonst fällt .hero-mood (z-index: -1) hinter den Grund des body. */
#startseite .hero {
  --shade-alpha: 50%; --shade-width: calc(100% / 3);
  position: relative; isolation: isolate; overflow: hidden; margin: 0;
  min-height: clamp(420px, 56vw, 720px); display: flex; flex-direction: column;
  padding-bottom: 48px;
}
#startseite .hero::before { margin-bottom: 0; }
.hero-text { margin-block: auto; padding-top: 24px; }
/* Zeilenlänge in em: am Desktop (≥ 1024 px) endet die Spalte so vor 65 % der Breite, wo das
   Platzhalter-Moodbild hell wird; schmaler läuft sie über die volle Breite. Verlass ist nur auf
   die Pixelprobe (e2e/startseite.spec.mjs, 390–2560 px), nicht auf diese Rechnung. */
.hero-text > * { max-width: 40em; }
.hero-text .claim { max-width: 8.5em; }
.hero-text .lead { max-width: 34em; }
.hero-mood { position: absolute; inset: 0; z-index: -1; margin: 0; background: var(--bg); }
.hero-mood img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-mood::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: multiply;
  background: linear-gradient(to right,
    color-mix(in srgb, var(--deep) var(--shade-alpha), transparent) 0, transparent var(--shade-width));
}
#startseite .hero h1 { display: flex; align-items: center; gap: 10px; font-size: clamp(28px, 3.2vw, 44px); letter-spacing: .02em; }
.claim { margin: 0 0 14px; font-size: clamp(36px, 7vw, 104px); line-height: 1.05; color: var(--fg); }
.lead { font-size: clamp(18px, 1.6vw, 22px); }
.shot img { display: block; width: 100%; }

/* Schaufenster: Text und Screenshot, ab 860 px nebeneinander, jede zweite Zeile gespiegelt. */
.show { display: grid; gap: 16px 40px; align-items: center; margin-top: 32px; }
@media (min-width: 860px) {
  .show { grid-template-columns: 1fr 1fr; }
  .show.show-wide { grid-template-columns: 1.6fr 1fr; }
  .show:nth-of-type(even) .shot { order: -1; }
}
/* Nutzerwunsch (#53): Schaufenster-Überschriften größer als der Abschnittstitel darüber. */
.show-text h3 { font-size: clamp(28px, 3.6vw, 52px); }
.show-text p { color: var(--dim); max-width: 32em; }
.shot {
  margin: 0; min-height: 0; overflow: hidden; width: 100%; justify-self: center;
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px -18px #000c, 0 0 0 6px color-mix(in srgb, var(--accent2) 10%, transparent);
}
/* Handy-Rahmen (#53): Gerätekranz, oben Statusleiste, unten Home-Balken; der Screenshot
   bleibt ein reines App-Bild. Das img hält mit width/height-Attributen seinen Platz. */
.shot.phone {
  max-width: 260px; border: 6px solid var(--deep); border-radius: 32px; background: var(--bg);
  display: flex; flex-direction: column;
}
.shot.phone::before {
  content: ""; aspect-ratio: 390 / 44;
  background: var(--phone-bar) url("/start/statusleiste.svg") center / 100% 100% no-repeat;
}
.shot.phone::after {
  content: ""; height: 22px;
  background: linear-gradient(var(--fg), var(--fg)) center / 36% 5px no-repeat var(--phone-bar);
}
.shot.phone img { height: auto; }
.shot.wide { aspect-ratio: 3 / 2; }
.shot.wide img { height: 100%; object-fit: cover; }

/* Für wen: zwei Spalten ab ~560 px, Akzentkante links. */
.audience {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px;
}
.audience .surface { padding: 16px 18px; border-left: 4px solid var(--accent2); }
.audience p { margin: 0; color: var(--dim); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 10px; }

/* Farben und Form aus .btn-accent (base.css). */
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); }

/* Funktionen: ab ~560 px zweispaltig, darunter einspaltig. */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px;
}
/* Fläche aus .surface (base.css), Icon links über beide Zeilen. */
.card {
  padding: 16px 18px; display: grid; grid-template-columns: 48px 1fr; gap: 2px 14px; align-items: start;
}
.card img { grid-row: span 2; }
/* Karten sind bis zu fünfspaltig schmal: Überschrift fest klein, sonst bricht „Facettiert“ im Wort. */
.card h3 { font-size: 21px; }
.card p { margin: 0; color: var(--dim); }

.rules { margin: 0 0 12px; padding-left: 1.2em; }
.rules li { margin-bottom: 6px; }

.badge {
  /* nicht die Display-Schrift der Überschrift: sie hat keinen fetten Schnitt */
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px; font-weight: 600; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 1px 8px;
}

/* Einladungsblock: zurückhaltend, kein Akzent-Hintergrund. */
.einladung {
  margin-top: 40px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; color: var(--dim); font-size: 14px;
}
.einladung p { margin: 0; }

.site-foot { border-top: 1px solid var(--line); padding: 6px 0; }
