/* ═══════════════════════════════════════════════════════════════════
   menino · Landing — Designsystem „Das Heft"
   Tokens: docs/11 · Botschaften: docs/10 · Figur-Kanon: docs/09
   Keine externen Fonts/CDNs (DSGVO, docs/10 §5 Nr. 5).
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Farbe — normiert aus design/figur/, docs/11 §2 */
  --papier:     #FDFBF7;
  --creme:      #E4D2B4;
  --creme-hell: #F2E7D5;
  --terrakotta: #E86A39;
  --apricot:    #F79A45;
  --braun:      #4A2413;
  --braun-weich:#6B4230;
  --teal:       #108EA0;
  --amber:      #E9B455;
  --nacht:      #2A1409;

  /* Schrift — editorial Serif, System-Stack ohne Drittanbieter */
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans:  ui-sans-serif, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:  ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  /* Raster — an der Zeilenhöhe eines Hefts ausgerichtet */
  --zeile: 28px;
  --rand: clamp(1.25rem, 5vw, 5rem);
  --spalte: min(68ch, 100%);

  --schatten-blatt: 0 1px 2px rgba(74,36,19,.06), 0 8px 24px -12px rgba(74,36,19,.18);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--braun);
  font: 400 clamp(1.0625rem, .4vw + 1rem, 1.1875rem)/1.65 var(--serif);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Papier: Lineatur + Körnung ────────────────────────────────────
   Die Lineatur liegt unter allem und richtet die Seite optisch aus.
   Sie ist bewusst an der Grenze der Wahrnehmbarkeit. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent calc(var(--zeile) - 1px),
    rgba(16, 142, 160, .07) calc(var(--zeile) - 1px), rgba(16, 142, 160, .07) var(--zeile)
  );
  mask-image: linear-gradient(to bottom, transparent, #000 8rem, #000 calc(100% - 6rem), transparent);
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .29 0 0 0 0 .14 0 0 0 0 .07 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: 2; }

/* Der Heftrand — eine senkrechte Linie wie im Schulheft. Der gesamte Satz
   richtet sich daran aus; sie ist der Grund, warum die Seite ruhig wirkt. */
@media (min-width: 68rem) {
  body { --heftrand: max(var(--rand), calc((100vw - 74rem) / 2 + var(--rand))); }
  main::before {
    content: ''; position: absolute; top: 0; bottom: 0;
    left: calc(var(--heftrand) - 1.75rem); width: 1px; z-index: 0;
    background: linear-gradient(to bottom, transparent, rgba(232,106,57,.28) 6rem, rgba(232,106,57,.28) calc(100% - 6rem), transparent);
  }
}

/* ── Typografie ────────────────────────────────────────────────── */
h1, h2, h3 { font-weight: 400; line-height: 1.08; letter-spacing: -.021em; margin: 0; text-wrap: balance; }
/* Gesetzte Umbrüche gelten nur, solange die Zeile sie trägt — auf schmalen
   Schirmen bricht der Satz sonst zweimal und zerfällt. */
@media (max-width: 48rem) { .satzbruch { display: none; } }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.875rem); letter-spacing: -.018em; }
h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); }
p  { margin: 0 0 1.15em; max-width: 62ch; text-wrap: pretty; }
strong { font-weight: 600; }
a { color: inherit; }

.vorspann {
  font: 500 .8125rem/1 var(--sans);
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--braun-weich); margin-bottom: 1.75rem;
  display: flex; align-items: center; gap: .7rem;
}
.vorspann::before { content: ''; width: 2rem; height: 1px; background: var(--terrakotta); }

.gross { font-size: clamp(1.1875rem, 1.5vw, 1.4375rem); line-height: 1.55; }
.leise { color: var(--braun-weich); }

/* ── Layout ────────────────────────────────────────────────────── */
.bahn { padding-inline: var(--rand); }
.mitte { max-width: 74rem; margin-inline: auto; }
section { padding-block: clamp(4.5rem, 11vh, 9rem); }

/* ── Randnotiz: die Stimme der Figur am Heftrand ───────────────────
   Handschrift-Anmutung ohne Webfont: kursive Serif, leicht gedreht,
   in Amber — liest sich als Bleistiftnotiz, nicht als UI-Text. */
.randnotiz {
  font: italic 400 1.0625rem/1.35 var(--serif);
  color: #A9762C;
  position: relative; padding-left: 1.9rem;
  transform: rotate(-1.4deg);
  max-width: 22ch;
}
.randnotiz::before {
  content: '';
  position: absolute; left: 0; top: .45em;
  width: 1.25rem; height: .75rem;
  border-left: 1.5px solid var(--amber);
  border-bottom: 1.5px solid var(--amber);
  border-bottom-left-radius: .6rem;
  opacity: .8;
}

/* ── Kopfzeile ─────────────────────────────────────────────────── */
.kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 1.75rem;
}
.wortmarke { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.wortmarke img { display: block; height: 2.125rem; width: auto; }
.wortmarke span { font: 400 .8125rem/1 var(--sans); color: var(--braun-weich); letter-spacing: .02em; padding-top: .35rem; }
@media (max-width: 34rem) { .wortmarke span { display: none; } }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero { padding-block: clamp(2rem, 5vh, 4rem) clamp(4rem, 9vh, 7rem); }
.hero-raster {
  display: grid; gap: clamp(2.5rem, 5vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 62rem) { .hero-raster { grid-template-columns: 1.08fr .92fr; } }

.hero h1 .wir-schon {
  display: block; margin-top: .28em; color: var(--terrakotta);
  position: relative; width: max-content; max-width: 100%;
}
/* Der Unterstrich zeichnet sich selbst — wie mit dem Stift gezogen. */
.hero h1 .wir-schon::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -.13em; height: 3px;
  background: var(--terrakotta); border-radius: 2px;
  transform-origin: left; transform: scaleX(0);
  animation: strich 1.1s cubic-bezier(.22,.68,.36,1) 1.05s forwards;
}
@keyframes strich { to { transform: scaleX(1); } }

.hero-bild {
  position: relative; border-radius: 3px;
  box-shadow: var(--schatten-blatt);
  transform: rotate(-1.35deg);
  background: var(--creme-hell);
}
.hero-bild img { display: block; width: 100%; height: auto; border-radius: 3px; }
.hero-bild { overflow: visible; }
.hero-bild::after {            /* Klebestreifen — das Bild liegt IM Heft, nicht daneben */
  content: ''; position: absolute; z-index: 3;
  top: -.85rem; left: 50%; translate: -50% 0;
  width: 6.5rem; height: 1.75rem; rotate: -2.4deg;
  background: linear-gradient(105deg, rgba(233,180,85,.55), rgba(233,180,85,.34) 45%, rgba(233,180,85,.5));
  box-shadow: 0 1px 4px rgba(74,36,19,.16), inset 0 0 0 1px rgba(255,255,255,.28);
}

/* ── Einstieg gestaffelt ───────────────────────────────────────── */
.auftritt { opacity: 0; animation: auftritt .85s cubic-bezier(.22,.68,.36,1) forwards; }
.auftritt:nth-child(1) { animation-delay: .05s; }
.auftritt:nth-child(2) { animation-delay: .18s; }
.auftritt:nth-child(3) { animation-delay: .31s; }
.auftritt:nth-child(4) { animation-delay: .44s; }
@keyframes auftritt { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Buttons ───────────────────────────────────────────────────── */
.knopf {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .95rem 1.6rem; border: none; border-radius: 2px; cursor: pointer;
  background: var(--terrakotta); color: #fff;
  font: 500 1.0625rem/1 var(--sans); letter-spacing: .005em;
  box-shadow: 0 1px 0 rgba(74,36,19,.2), 0 10px 22px -12px rgba(232,106,57,.7);
  transition: transform .18s cubic-bezier(.22,.68,.36,1), box-shadow .18s;
}
.knopf:hover { transform: translateY(-2px); box-shadow: 0 2px 0 rgba(74,36,19,.2), 0 16px 30px -14px rgba(232,106,57,.8); }
.knopf:active { transform: translateY(0); }
.knopf:focus-visible { outline: 2.5px solid var(--braun); outline-offset: 3px; }
.knopf .pfeil { transition: transform .18s; }
.knopf:hover .pfeil { transform: translateX(3px); }

/* ── Papier wird lebendig (docs/08 §4.1, Bild 2) ───────────────────
   Der visuelle Wow-Moment: aus Handschrift wächst der Lernweg. Der
   Abschnitt ist dunkel, damit das Bild ohne Rahmen in die Fläche
   übergeht — das Papier scheint auf der Seite zu liegen, nicht in
   einem Kasten. */
.lernweg {
  background: var(--nacht); color: var(--creme-hell);
  text-align: center; position: relative; overflow: hidden;
  padding-block: clamp(4rem, 10vh, 8rem);
}
.lernweg::before {          /* das Licht, das vom Blatt ausgeht */
  content: ''; position: absolute; left: 50%; top: 42%; translate: -50% -50%;
  width: min(60rem, 130%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,142,160,.16), transparent 62%);
  pointer-events: none;
}
.lernweg .mitte { position: relative; }
.lernweg h2 { color: var(--papier); }
.lernweg .vorspann { color: var(--amber); justify-content: center; }
.lernweg .vorspann::before { background: var(--amber); }

.lernweg-bild {
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  max-width: 62rem; position: relative;
  transform: rotate(-.7deg);
}
.lernweg-bild img {
  display: block; width: 100%; height: auto; border-radius: 3px;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.85);
}

.lernweg-fuss {
  display: grid; gap: 1.25rem; justify-items: center;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.lernweg-fuss p { color: rgba(242,231,213,.82); max-width: 46ch; margin: 0; }
.lernweg-fuss .randnotiz { color: var(--amber); max-width: none; }

/* ── Lückenkarte: der Beweis-Moment (docs/08 §4.1) ─────────────────
   Der Wow-Moment der Seite. Papier, das etwas kann, was Papier nicht
   kann: Es zeigt, wo es klemmt. */
.beweis { background: var(--creme-hell); border-block: 1px solid rgba(74,36,19,.1); }
.karte-raster { display: grid; gap: clamp(2.5rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 58rem) { .karte-raster { grid-template-columns: .85fr 1.15fr; } }

.karte {
  background: var(--papier); border-radius: 4px; padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--schatten-blatt); border: 1px solid rgba(74,36,19,.09);
}
.karte-kopf {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-bottom: .9rem; margin-bottom: 1.35rem; border-bottom: 1px solid rgba(74,36,19,.12);
}
.karte-kopf h3 { font-size: 1.1875rem; }
.karte-kopf .datum { font: 400 .8125rem/1 var(--mono); color: var(--braun-weich); }

.reihe { display: flex; align-items: center; gap: .9rem; padding-block: .62rem; }
.reihe + .reihe { border-top: 1px dotted rgba(74,36,19,.16); }
.reihe .name { flex: 1; font-size: 1rem; }
.reihe .balken { width: clamp(5rem, 22%, 8rem); height: 7px; border-radius: 4px; background: rgba(74,36,19,.1); overflow: hidden; }
.reihe .balken i { display: block; height: 100%; border-radius: 4px; transform-origin: left; transform: scaleX(0); animation: fuellen 1s cubic-bezier(.22,.68,.36,1) forwards; }
@keyframes fuellen { to { transform: scaleX(1); } }

.reihe.sitzt .balken i { background: var(--teal); }
.reihe.wackelt .balken i { background: var(--amber); }
.reihe.fehlt .balken i { background: var(--terrakotta); }
.reihe .marke { font: 500 .75rem/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--braun-weich); min-width: 5.5rem; text-align: right; }
.reihe.fehlt .name { font-weight: 600; }
.reihe.fehlt .marke { color: var(--terrakotta); }

/* Die Lücke pulsiert einmal — sie meldet sich, sie schreit nicht. */
.reihe.fehlt { position: relative; }
.reihe.fehlt::before {
  content: ''; position: absolute; inset: -.35rem -.6rem; border-radius: 3px;
  background: var(--terrakotta); opacity: 0;
  animation: melden 2.6s ease-out 1.9s 2;
}
@keyframes melden { 0%,100% { opacity: 0; } 22% { opacity: .07; } }

/* ── Ablauf: drei Schritte ─────────────────────────────────────── */
.schritte { display: grid; gap: 2.5rem; grid-template-columns: 1fr; counter-reset: schritt; }
@media (min-width: 52rem) { .schritte { grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 3.5rem); } }
.schritt { counter-increment: schritt; position: relative; padding-top: 3.4rem; }
.schritt::before {
  content: counter(schritt, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font: 400 2.75rem/1 var(--serif); color: var(--creme);
  letter-spacing: -.03em;
}
.schritt h3 { margin-bottom: .55rem; }
.schritt p { font-size: 1.0625rem; color: var(--braun-weich); margin-bottom: 0; }

/* ── Kind-Block: andere Stimme, andere Fläche ────────────────────── */
.fuer-dich {
  background: var(--nacht); color: var(--creme-hell);
  position: relative; overflow: hidden;
}
.fuer-dich::before {   /* warmes Licht von oben — die Locke glüht hier wirklich */
  content: ''; position: absolute; top: -30%; left: 50%; translate: -50% 0;
  width: min(52rem, 120%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,180,85,.17), transparent 62%);
  pointer-events: none;
}
.fuer-dich .mitte { position: relative; }
.fuer-dich .vorspann { color: var(--amber); }
.fuer-dich .vorspann::before { background: var(--amber); }
.fuer-dich h2 { color: var(--papier); }
.fuer-dich p { color: rgba(242,231,213,.82); }
.fuer-dich .zwei { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 56rem) { .fuer-dich .zwei { grid-template-columns: 1.25fr .75fr; } }
.fuer-dich figure { margin: 0; }
/* Das Nachtfoto liegt wie ein Abzug im Heft — leicht gedreht, mit
   Klebeecke. menino sitzt in der unteren Ecke, als wäre es dabei. */
.nacht-bild { position: relative; max-width: 24rem; margin-inline: auto; }
.nacht-bild img { display: block; width: 100%; height: auto; border-radius: 3px; }
.nacht-bild picture img {
  transform: rotate(1.2deg);
  box-shadow: 0 20px 44px -22px rgba(0,0,0,.8), 0 0 0 1px rgba(242,231,213,.09);
}
.nacht-bild .figur-ecke {
  position: absolute; left: -1.5rem; bottom: -1.75rem;
  width: clamp(6rem, 14vw, 8.5rem); height: auto;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.55));
}
@media (max-width: 56rem) {
  .nacht-bild { max-width: 20rem; }
  .nacht-bild .figur-ecke { left: -1rem; bottom: -1.25rem; }
}

/* ── Vertrauen: die Bausteine aus docs/10 §5 ───────────────────── */
.gruende { display: grid; gap: 1px; background: rgba(74,36,19,.13); border: 1px solid rgba(74,36,19,.13); border-radius: 4px; overflow: hidden; }
@media (min-width: 46rem) { .gruende { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .gruende { grid-template-columns: repeat(3, 1fr); } }
.grund { background: var(--papier); padding: clamp(1.5rem, 2.6vw, 2rem); }
.grund h3 { font-size: 1.125rem; margin-bottom: .5rem; }
.grund p { font-size: 1rem; color: var(--braun-weich); margin: 0; }
.grund .zeichen { display: block; width: 1.75rem; height: 1.75rem; margin-bottom: 1rem; color: var(--terrakotta); }

/* ── Warteliste ────────────────────────────────────────────────── */
.warteliste { background: var(--creme-hell); border-top: 1px solid rgba(74,36,19,.1); }
.warteliste .kasten { max-width: 40rem; }
.feldzeile { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.feldzeile label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.feldzeile input {
  flex: 1 1 16rem; min-width: 0;
  padding: .95rem 1.1rem; border: 1.5px solid rgba(74,36,19,.24); border-radius: 2px;
  background: var(--papier); color: var(--braun);
  font: 400 1.0625rem/1.2 var(--serif);
}
.feldzeile input::placeholder { color: rgba(74,36,19,.42); }
.feldzeile input:focus-visible { outline: none; border-color: var(--terrakotta); box-shadow: 0 0 0 3px rgba(232,106,57,.16); }
/* Rückmeldung der Warteliste — ruhig, nie in Rot schreiend. */
.rueckmeldung {
  margin: 1.25rem 0 0; padding-left: 1.1rem;
  border-left: 2.5px solid var(--teal);
  font-size: 1.0625rem; max-width: 46ch;
}
.rueckmeldung.fehler { border-left-color: var(--terrakotta); }

.plaetze { display: flex; align-items: center; gap: .6rem; margin-top: 1.4rem; font: 400 .9375rem/1.4 var(--sans); color: var(--braun-weich); }
.plaetze .punkt { width: .5rem; height: .5rem; border-radius: 50%; background: var(--teal); flex: none; box-shadow: 0 0 0 3px rgba(16,142,160,.16); }
.kleingedruckt { margin-top: 1.1rem; font: 400 .875rem/1.5 var(--sans); color: var(--braun-weich); max-width: 46ch; }

/* ── Textseiten: Impressum, Datenschutz ────────────────────────── */
.textseite { max-width: 44rem; padding-block: clamp(2.5rem, 6vh, 4.5rem) clamp(4rem, 9vh, 7rem); }
.textseite h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); margin-bottom: 2rem; }
.textseite h2 { font-size: clamp(1.3125rem, 2vw, 1.5rem); margin: 2.75rem 0 .85rem; }
.textseite ul { margin: 0 0 1.15em; padding-left: 1.3rem; max-width: 62ch; }
.textseite li { margin-bottom: .5rem; }
.textseite a { text-decoration-color: rgba(74,36,19,.35); text-underline-offset: 3px; }
.textseite a:hover { text-decoration-color: var(--terrakotta); }
.textseite code { font: 400 .9em/1 var(--mono); color: var(--braun-weich); }
.zurueck { margin-top: 3.5rem; font: 400 1rem/1.5 var(--sans); }

/* Platzhalter-Warnung — muss auffallen, solange die Seite Entwurf ist. */
.pruefen {
  border: 1.5px solid var(--terrakotta); border-radius: 3px;
  background: rgba(232,106,57,.06);
  padding: 1.15rem 1.35rem; margin-bottom: 3rem;
  font-size: 1rem; max-width: none;
}

/* ── Fuß ───────────────────────────────────────────────────────── */
.fuss { border-top: 1px solid rgba(74,36,19,.13); padding-block: 2.5rem 3.5rem; font: 400 .9375rem/1.6 var(--sans); color: var(--braun-weich); }
.fuss-zeile { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.fuss a { text-decoration-color: rgba(74,36,19,.3); text-underline-offset: 3px; }
.fuss a:hover { text-decoration-color: var(--terrakotta); }
