/* ==========================================================
   Einführungsseite „So lernst du mit Do-matik“ (ueber/index.html, 2026-10-22)
   Nach Apple-Vorbild: ein Gedanke pro Abschnitt, große Überschrift mit Textmarker/Unterstrich (style.css), kurzer Satz,
   Bildschirmfoto im Geräterahmen; Abschnitte über die ganze Breite abwechselnd auf Seitengrau, Weiß und Hellblau.
   Nur Tokens aus css/style.css; große Flächen mit --radius-flaeche, keine Schatten.
   ========================================================== */

.ein { overflow-x: clip; }
.ein-eyebrow { margin: 0 0 0.75rem; font-family: var(--font-label); font-size: var(--fs-ui); font-weight: var(--fw-mittel); color: var(--text-secondary); }

/* ---------- Hero ---------- */
.ein-hero { padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5.5rem); text-align: center; }
.ein-hero h1 {
  max-width: 16ch; margin: 0 auto 1.25rem;
  font-size: clamp(2.25rem, 1.2rem + 5vw, 5.25rem); font-weight: var(--fw-titel); line-height: 1.04; letter-spacing: -0.04em;
}
.ein-nowrap { white-space: nowrap; }
.ein-lead { max-width: 40ch; margin: 0 auto; font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem); line-height: 1.45; color: var(--text-secondary); }

/* ---------- Abschnitte ---------- */
.ein-abschnitt { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.ein-abschnitt--weiss { background: var(--color-surface); }
.ein-abschnitt--blau { background: var(--color-primary-soft); }
.ein-text h2 {
  margin: 0 0 1.1rem; font-size: clamp(2.25rem, 1.3rem + 2.8vw, 3.6rem); font-weight: var(--fw-titel);
  line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance;
}
.ein-text > p:not(.ein-eyebrow) { max-width: 36ch; margin: 0; font-size: clamp(1.1rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; color: var(--text-secondary); }
.ein-text--mitte { max-width: 46rem; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.ein-text--mitte > p:not(.ein-eyebrow) { max-width: 44ch; margin-inline: auto; }

/* Text und Bild nebeneinander; jeder zweite Abschnitt mit Bild links */
.ein-reihe { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.ein-reihe--bild-links { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ein-reihe--bild-links .ein-geraet { order: -1; }
.ein-mitte .ein-geraet { max-width: 1100px; margin-inline: auto; }

/* Geräterahmen: dunkler Rand wie ein Tablet, in beiden Modi gleich (--code-bg ist immer dunkel) */
.ein-geraet {
  margin: 0; padding: clamp(6px, 0.8vw, 11px); border-radius: calc(var(--radius-flaeche) + 8px);
  background: var(--code-bg); border: 1px solid color-mix(in srgb, var(--code-bg) 70%, var(--border));
}
.ein-geraet img { display: block; width: 100%; height: auto; border-radius: var(--radius-flaeche); background: var(--color-surface); }

/* ---------- Begleiter: fünf Stufen, die von links nach rechts größer werden ---------- */
.ein-tiere { list-style: none; margin: 0 auto; padding: 0; max-width: 1000px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(0.5rem, 2vw, 2rem); align-items: end; text-align: center; }
.ein-tiere li { display: grid; justify-items: center; gap: 0.2rem; }
.ein-tiere img { display: block; width: auto; max-width: 100%; height: auto; object-fit: contain; margin-bottom: 0.6rem; }
/* Größe über die Breite der Spalte, damit das Wachsen auch auf dem Handy sichtbar bleibt */
.ein-tiere li:nth-child(1) img { width: 48%; }
.ein-tiere li:nth-child(2) img { width: 60%; }
.ein-tiere li:nth-child(3) img { width: 72%; }
.ein-tiere li:nth-child(4) img { width: 86%; }
.ein-tiere li:nth-child(5) img { width: 100%; }
.ein-tiere img { max-height: 245px; }
.ein-tiere__kurz { display: none; margin: 1rem 0 0; text-align: center; font-size: var(--fs-hilfe); color: var(--text-secondary); }
.ein-tiere strong { font-size: var(--fs-ui); font-weight: var(--fw-halbfett); }
.ein-tiere span { font-size: var(--fs-meta); color: var(--text-muted); }

/* ---------- Weg durch die Reihe ---------- */
.ein-schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.ein-schritte li { padding-top: 1.1rem; border-top: 2px solid var(--border); }
.ein-schritte__nr { display: block; margin-bottom: 0.6rem; font-size: 2.25rem; font-weight: var(--fw-titel); line-height: 1; letter-spacing: -0.03em; color: var(--interactive-primary); }
.ein-schritte h3 { margin: 0 0 0.4rem; font-size: var(--fs-h3); }
.ein-schritte p { margin: 0; color: var(--text-secondary); line-height: 1.55; }

/* ---------- Eltern und Lehrkräfte ---------- */
.ein-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.ein-info article { padding: 1.5rem; border-radius: var(--radius-flaeche); background: var(--color-bg-soft); }
.ein-info h3 { margin: 0 0 0.5rem; font-size: var(--fs-h4); }
.ein-info p { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.ein-hinweis { max-width: 60ch; margin: 2rem auto 0; text-align: center; font-size: var(--fs-hilfe); color: var(--text-muted); }

/* ---------- Schluss ---------- */
.ein-schluss { padding: clamp(4rem, 9vw, 7rem) 0; text-align: center; }
.ein-schluss h2 { margin: 0 0 1.5rem; font-size: clamp(2rem, 1.3rem + 2vw, 3rem); }

/* ---------- Schmal: alles untereinander, Bild unter dem Text ---------- */
@media (max-width: 900px) {
  .ein-reihe, .ein-reihe--bild-links { grid-template-columns: minmax(0, 1fr); }
  .ein-reihe--bild-links .ein-geraet { order: 0; }
  .ein-text > p:not(.ein-eyebrow) { max-width: none; }
  .ein-schritte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ein-info { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .ein-schritte { grid-template-columns: minmax(0, 1fr); }
  /* Handy: Namen unter den Bildern hätten keinen Platz – stattdessen eine Zeile darunter */
  .ein-tiere { gap: 0.25rem; }
  .ein-tiere strong, .ein-tiere span { display: none; }
  .ein-tiere__kurz { display: block; }
}
