/* Startseite (Paket 15): Entwurf B „Wohnlich und warm“, ruhiger gemacht (wenig Schatten und Rahmen, mehr Weißraum),
   mit der Klarheit aus Entwurf C. Baut auf website.css auf (Farbnamen, Knöpfe, Kopf- und Fußzeile) und gilt nur unter
   `body.startseite`. Zwei Akzentfarben: das Grün des Planers und sparsam Terrakotta (Vorzeilen, Marken im Bild).
   Hell auf warmem Weiß, dunkel mit den Farben der übrigen Website (prefers-color-scheme); Bilder bleiben, wie der
   Planer sie zeigt. Alle Paare aus Schrift- und Grundfarbe erfüllen Kontrast AA (4,5 : 1); test_startseite.py rechnet
   sie nach. Keine Adressen und keine Bilder aus CSS, kein JavaScript nötig. */
.startseite {
  --grund: #faf7f2;           /* warmes Weiß statt Grau */
  --sand: #f2ede4;            /* Wechselgrund für Abschnitte */
  --leise: #655f58;           /* 5,9 : 1 auf --grund, 5,4 : 1 auf --sand */
  --terra: #b4553a;
  --terra-tief: #9c452d;      /* als Schrift 5,5 : 1 auf --sand */
  --terra-hell: #f8e5dc;
  --tafel: #245f51;           /* Grund der Abschluss-Tafel */
  --auf-tafel: #ffffff;       /* 7,4 : 1 */
  --auf-tafel-leise: #d4e9e2; /* 5,9 : 1 */
  --rahmen: 1200px;
  --rand-seite: 16px;
  --abstand: clamp(72px, 9vw, 120px);
  font-size: 17px;
}
@media (prefers-color-scheme: dark) {
  .startseite {
    --grund: #1b1a18;
    --sand: #23211e;
    --leise: #aaa69e;
    --terra: #e8a58d;
    --terra-tief: #e8a58d;
    --terra-hell: #3a2620;
    --tafel: #24372f;
    --auf-tafel: #efece6;
    --auf-tafel-leise: #c9d8d2;
  }
}
@media (min-width: 640px) { .startseite { --rand-seite: clamp(24px, 4vw, 40px); } }

/* ---------- Gerüst: volle Breite, Inhalt im Rahmen; Kopf- und Fußzeile ruhig auf dem Grund */
.startseite .inhalt { max-width: none; padding: 0; }
.startseite .rahmen { width: 100%; max-width: calc(var(--rahmen) + 2 * var(--rand-seite)); margin: 0 auto; padding-inline: var(--rand-seite); }
.startseite .kopf { background: var(--grund); border-bottom: 0; padding: 14px max(var(--rand-seite), calc((100% - var(--rahmen)) / 2)); }
.startseite .kopf-wege a { color: var(--tinte); text-decoration: none; font-weight: 500; }
.startseite .kopf-wege a:hover { text-decoration: underline; }
.startseite .kopf-wege a[href="/anmelden"] { border: 1px solid var(--rand); border-radius: 999px; padding: 8px 18px; min-height: 44px; display: inline-flex; align-items: center; }
.startseite .fuss { padding-inline: max(var(--rand-seite), calc((100% - var(--rahmen)) / 2)); }
.startseite .fuss nav { max-width: none; }
.nobr { white-space: nowrap; }
@media (max-width: 760px) { .startseite .kopf-wege .nur-breit { display: none; } }

/* ---------- Schrift */
.startseite h1, .startseite h2, .startseite h3 { color: var(--tinte); text-wrap: balance; overflow-wrap: normal; }
.startseite h1 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.5rem); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 16px; max-width: none; }
.startseite h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; margin: 0; }
.startseite h3 { font-size: 1.1rem; line-height: 1.3; font-weight: 650; margin: 0 0 6px; }
.startseite p { text-wrap: pretty; }
.startseite .einleitung { font-size: 1.12rem; line-height: 1.6; color: var(--leise); max-width: 34em; }
.vorzeile { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--terra-tief); margin: 0 0 12px; }
.startseite .textlink { color: var(--akzent-tief); font-weight: 600; }
.bildnachweis { font-size: .85rem; color: var(--leise); margin: 0; }
.mittig { text-align: center; }

/* ---------- Knöpfe der Startseite: rund, groß genug für Finger */
.startseite .knopf { border-radius: 999px; min-height: 48px; padding: 11px 24px; font-weight: 600; white-space: nowrap; }
.startseite .knopfreihe { gap: 12px; margin-top: 28px; }

/* ---------- Band der Testphase */
.testband { background: var(--terra-hell); }
.testband-innen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 12px; }
.testband p { margin: 0; max-width: 52em; }
.testband-wege { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.testband .knopf { min-height: 44px; padding: 8px 18px; background: var(--flaeche); }
.testband a:not(.knopf) { color: var(--tinte); font-weight: 600; }

/* ---------- Einstieg */
.auftakt { padding-block: clamp(32px, 5vw, 64px) clamp(48px, 6vw, 80px); }
.auftakt-raster { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 72px); align-items: center; }
.unterzeile { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); font-weight: 600; letter-spacing: -0.015em; color: var(--akzent-tief); margin: 0 0 16px; }
.haekchen { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .93rem; color: var(--leise); }
.haekchen li { display: inline-flex; align-items: center; gap: 8px; }
.haekchen li::before { content: ""; flex: none; width: 10px; height: 5px; border-left: 2px solid var(--akzent); border-bottom: 2px solid var(--akzent); transform: translateY(-2px) rotate(-45deg); }
.auftakt-bild { position: relative; padding-bottom: 48px; }
.bild { margin: 0; }
.bild img { display: block; width: 100%; height: auto; border-radius: 16px; }
.bild figcaption { font-size: .85rem; color: var(--leise); margin-top: 10px; }
.bild.gross { position: relative; }
.bild.gross img { border-radius: 24px; }
.schild { position: absolute; top: 14px; right: 14px; margin: 0; background: #ffffff; color: #1f1e1c; font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.bild.gross .schild { margin-top: 0; color: #1f1e1c; }
.papier { position: absolute; left: -24px; bottom: 0; width: 38%; max-width: 230px; margin: 0; background: #ffffff; padding: 8px 8px 4px; border-radius: 12px; box-shadow: 0 12px 32px -12px rgba(40, 32, 24, .35); transform: rotate(-3deg); }
.papier img { display: block; width: 100%; height: auto; border-radius: 6px; }
.papier figcaption { font-size: .78rem; font-weight: 600; color: #4d4943; text-align: center; padding: 4px 0 2px; }
.auftakt > .bildnachweis { margin-top: 20px; }

/* ---------- Abschnitte */
.abschnitt { padding-block: var(--abstand); }
.auftakt + .abschnitt { padding-top: clamp(32px, 4vw, 56px); }
.abschnitt.sand { background: var(--sand); }
.abschnitt.eng { padding-block: clamp(32px, 4vw, 56px) var(--abstand); }
.abschnitt-kopf { max-width: 40em; margin-bottom: clamp(32px, 4vw, 52px); }
.abschnitt-kopf.mittig { margin-inline: auto; }
.abschnitt-kopf h2 + p { margin-top: 16px; }
.abschnitt-kopf .einleitung { margin-inline: auto; }
.abschnitt-kopf p:last-child { margin-bottom: 0; }

/* ---------- So geht's: drei Schritte ohne Kartenrahmen */
.startseite .schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.startseite .schritte li { padding: 0; }
/* nebeneinander teilen die drei Schritte die Zeilen (Bild, Überschrift, Text): die Überschriften stehen auf einer
   Höhe, auch wenn der Kasten bei Schritt 1 durch seinen Inhalt höher wird als die Bilder (Prüfer, 761–1024 px) */
@media (min-width: 761px) { .startseite .schritte li { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; } }
.startseite .schritte p { color: var(--leise); margin: 0; }
.schritt-bild { margin: 0 0 20px; }
.schritt-bild img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--linie); aspect-ratio: 4 / 3; }
.schritt-bild figcaption { font-size: .8rem; color: var(--leise); margin-top: 8px; }
.nummer { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--akzent-hell); color: var(--akzent-tief); font-size: .9rem; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.ablage { aspect-ratio: 4 / 3; border-radius: 16px; background: var(--akzent-hell); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; margin-bottom: 20px; }
.ablage-feld { width: 100%; max-width: 280px; margin: 0; padding: 36px 16px; border: 2px dashed var(--akzent); border-radius: 14px; text-align: center; color: var(--akzent-tief); font-weight: 600; }
.formate { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; max-width: 300px; }
.formate span { background: var(--flaeche); color: var(--tinte); border-radius: 999px; padding: 3px 11px; font-size: .82rem; font-weight: 500; }

/* ---------- Vorher und nachher */
.vergleich { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.papiergrund img { background: #ffffff; padding: 6% 8%; aspect-ratio: 4 / 3; object-fit: contain; }
.bild figcaption strong { color: var(--terra-tief); margin-right: 6px; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
.zwischentitel { text-align: center; margin: clamp(56px, 7vw, 88px) 0 28px !important; font-size: 1.35rem !important; }
.galerie { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }

/* ---------- Funktionen: eine große Karte mit Bild, dann eine ruhige Liste */
.karte-gross { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; margin-bottom: clamp(48px, 6vw, 72px); }
.karte-gross-text h3 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); letter-spacing: -0.02em; margin-bottom: 12px; }
.karte-gross-text p { color: var(--leise); }
.karte-gross-text .haekchen { flex-direction: column; gap: 10px; font-size: 1rem; color: var(--tinte); }
.funktionen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px clamp(20px, 3vw, 40px); }
.funktionen li { border-top: 1px solid var(--linie); padding-top: 18px; }
.funktionen p { color: var(--leise); margin: 0; font-size: .95rem; }

/* ---------- Datenschutz */
.daten-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.daten-raster .abschnitt-kopf p:not(.vorzeile) { color: var(--leise); }
.daten-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px clamp(20px, 3vw, 40px); }
.daten-liste li { border-top: 1px solid var(--linie); padding-top: 16px; }
.daten-liste li:first-child h3 { color: var(--terra-tief); }
.daten-liste p { color: var(--leise); margin: 0; font-size: .95rem; }

/* ---------- Häufige Fragen: details und summary, ohne JavaScript */
.fragen-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.fragen-raster .abschnitt-kopf p:not(.vorzeile) { color: var(--leise); }
.fragen details { border-top: 1px solid var(--linie); }
.fragen details:last-child { border-bottom: 1px solid var(--linie); }
.fragen summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 12px 4px; font-weight: 600; }
.fragen summary::-webkit-details-marker { display: none; }
.fragen summary::after { content: "+"; flex: none; font-size: 1.4rem; font-weight: 400; line-height: 1; color: var(--akzent-tief); }
.fragen details[open] summary::after { content: "–"; }
.fragen details p { margin: 0 4px 20px; color: var(--leise); max-width: 40em; }

/* ---------- Abschluss */
.abschluss { background: var(--tafel); color: var(--auf-tafel); border-radius: 24px; padding: clamp(36px, 6vw, 72px) clamp(24px, 6vw, 72px); text-align: center; }
.abschluss h2 { color: var(--auf-tafel); }
.abschluss p { color: var(--auf-tafel-leise); margin: 16px auto 0; max-width: 34em; }
.abschluss .knopfreihe { justify-content: center; }
.abschluss .klein-hinweis { font-size: .9rem; margin-top: 24px; }
.knopf.hell { background: var(--auf-tafel); color: var(--tafel); border-color: var(--auf-tafel); }
.knopf.rand-hell { background: transparent; color: var(--auf-tafel); border-color: var(--auf-tafel); }
.knopf.hell:hover, .knopf.rand-hell:hover { filter: brightness(1.06); }
.abschluss .knopf:focus-visible { outline-color: var(--auf-tafel); }

/* ---------- schmalere Bildschirme */
@media (max-width: 1000px) {
  .funktionen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .auftakt-raster, .karte-gross, .daten-raster, .fragen-raster { grid-template-columns: minmax(0, 1fr); }
  .auftakt-bild { padding-bottom: 40px; margin-left: 12px; }
  .papier { left: -12px; width: 34%; }
}
@media (max-width: 760px) {
  .startseite .schritte, .vergleich, .galerie { grid-template-columns: minmax(0, 1fr); }
  .daten-liste { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .funktionen { grid-template-columns: minmax(0, 1fr); }
  .startseite .knopfreihe .knopf { flex: 1 1 100%; }
  .startseite .kopf { padding-block: 10px; }
}
