/*
  Leseschlüssel – Website. Die Seite ist gesetzt wie die Leseseite der App:
  warmes Papier, Lexend mit viel Wort- und Zeilenabstand, Satzmarkierung in
  Lavendel, das aktuelle Wort in Gelb. Farben wie src/config/theme.ts,
  im Dunkelmodus die Farbwelt «Nacht».
*/

@font-face { font-family: "Lexend"; src: url("fonts/lexend-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("fonts/lexend-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("fonts/fredoka-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* Layout: eine Lesespalte, im Kopf Text links und die Leseseite der App rechts. */
:root {
  --paper: #FFF8EC;
  --surface: #FFFFFF;
  --warm: #FDF1DC;
  --line: #EFE3CF;
  --ink: #2B2A40;
  --ink-soft: #56546E;
  --done: #6E6B86;
  --brand: #5B4BDB;
  --brand-strong: #3F32A8;
  --brand-soft: #ECE9FF;
  --sentence: #F1ECFF;
  --word: #FFD866;
  --word-ink: #2B2A40;
  --sun: #FFC94A;
  --mint: #14806C;
  --mint-soft: #DCF6EF;
  --on-ink: #FFF8EC;
  --device: #2B2A40;
  --shadow: rgba(43, 42, 64, 0.10);

  --display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.4rem + 2vw, 2.625rem);
  --step-4: clamp(2.375rem, 1.6rem + 3.6vw, 4rem);

  --radius: 22px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14122E; --surface: #1D1A40; --warm: #221E4A; --line: #322D63;
    --ink: #F4F1FF; --ink-soft: #C9C4EA; --done: #9E99C6;
    --brand: #ABA0FF; --brand-strong: #CFC8FF; --brand-soft: #2A2560;
    --sentence: #2E2968; --word: #FFD866; --word-ink: #2B2A40; --sun: #FFC94A;
    --mint: #5DD6BD; --mint-soft: #17403B; --on-ink: #14122E; --device: #3A3672; --shadow: rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14122E; --surface: #1D1A40; --warm: #221E4A; --line: #322D63;
  --ink: #F4F1FF; --ink-soft: #C9C4EA; --done: #9E99C6;
  --brand: #ABA0FF; --brand-strong: #CFC8FF; --brand-soft: #2A2560;
  --sentence: #2E2968; --word: #FFD866; --word-ink: #2B2A40; --sun: #FFC94A;
  --mint: #5DD6BD; --mint-soft: #17403B; --on-ink: #14122E; --device: #3A3672; --shadow: rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.7;
  word-spacing: 0.12em;
  letter-spacing: 0.01em;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: 0; word-spacing: 0.04em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; }
a { color: var(--brand-strong); text-underline-offset: 0.2em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
img, svg { max-width: 100%; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.label {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.lead { font-size: var(--step-1); color: var(--ink-soft); max-width: 36em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 5; background: var(--surface); padding: 8px 14px; border-radius: 10px; }

/* ---------- Kopf ---------- */

.site-head .wrap { display: flex; align-items: center; gap: 24px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.375rem; font-weight: 600; letter-spacing: 0; word-spacing: 0; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: var(--step--1); }
.site-nav a:hover { color: var(--ink); }
.site-head .button { padding: 10px 18px; font-size: var(--step--1); }
@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-head .button { margin-left: auto; }
}

/* ---------- Knöpfe ---------- */

.button {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 999px; padding: 14px 24px;
  background: var(--brand); color: var(--on-ink);
  font-weight: 600; text-decoration: none; word-spacing: 0.04em;
  box-shadow: 0 5px 0 var(--brand-strong);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.button:hover { transform: translateY(1px); box-shadow: 0 4px 0 var(--brand-strong); }
.button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--brand-strong); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-width: 196px; padding: 10px 20px 10px 16px;
  border-radius: 16px; background: var(--ink); color: var(--paper);
  text-decoration: none; line-height: 1.2; word-spacing: 0.02em;
  box-shadow: 0 5px 0 var(--shadow);
}
.store:hover { transform: translateY(1px); }
.store svg { width: 28px; height: 28px; flex: none; }
.store small { display: block; font-size: 0.75rem; opacity: 0.8; }
.store strong { display: block; font-size: 1.125rem; font-weight: 600; }

/* ---------- Kopfbereich mit Leseseite ---------- */

.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; padding-block: 40px 72px; }
.hero-text { display: grid; gap: 26px; min-width: 0; }
.hero h1 .sentence { background: var(--sentence); border-radius: 0.2em; padding: 0 0.12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero h1 .word { background: var(--word); color: var(--word-ink); border-radius: 0.18em; padding: 0 0.08em; }
.price-hint { color: var(--ink-soft); font-size: var(--step--1); }
.price-hint strong { color: var(--ink); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 16px 56px; }
}

/* Die Leseseite der App als Gerät, Wort für Wort markiert wie beim Vorlesen. */
.device {
  justify-self: center; width: min(100%, 390px);
  background: var(--device); padding: 12px; border-radius: 44px;
  box-shadow: 0 24px 60px var(--shadow);
}
.screen { background: #FFF8EC; color: #2B2A40; border-radius: 34px; padding: 22px 22px 18px; display: grid; gap: 18px; }
.screen-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.8125rem; color: #56546E; word-spacing: 0.04em; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; background: #DCF6EF; color: #14806C; font-weight: 600; }
.chapter { font-family: var(--display); font-size: 1.125rem; color: #3F32A8; }
.page { font-size: 1.3125rem; line-height: 1.9; word-spacing: 0.22em; margin: 0; }
.page .done { color: #6E6B86; }
.page .now { background: #F1ECFF; border-radius: 8px; padding: 2px 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.page .now span { border-radius: 6px; padding: 1px 2px; animation: follow 6s steps(1, end) infinite; }
.page .now span:nth-child(1) { animation-delay: 0s; }
.page .now span:nth-child(2) { animation-delay: 1s; }
.page .now span:nth-child(3) { animation-delay: 2s; }
.page .now span:nth-child(4) { animation-delay: 3s; }
.page .now span:nth-child(5) { animation-delay: 4s; }
@keyframes follow {
  0% { background: #FFD866; }
  16.66% { background: transparent; }
  100% { background: transparent; }
}
.screen-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.875rem; color: #56546E; }
.listening { display: inline-flex; align-items: center; gap: 8px; }
.listening i { width: 10px; height: 10px; border-radius: 50%; background: #21B59A; box-shadow: 0 0 0 4px #DCF6EF; }
.pause { border-radius: 999px; padding: 8px 16px; background: #ECE9FF; color: #3F32A8; font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .page .now span { animation: none; }
  .page .now span:nth-child(4) { background: #FFD866; }
}

/* ---------- Abschnitte ---------- */

.section .wrap { padding-block: 80px; display: grid; gap: 40px; }
.section-head { display: grid; gap: 14px; max-width: 44em; }
.band { background: var(--warm); }
@media (max-width: 600px) { .section .wrap { padding-block: 56px; gap: 32px; } }

/* So geht's: drei Schritte, wirklich in dieser Reihenfolge. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--surface); border-radius: var(--radius); padding: 28px; display: grid; gap: 10px; align-content: start; box-shadow: 0 6px 18px var(--shadow); }
.steps li::before { content: counter(step); font-family: var(--display); font-size: 1.25rem; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--word); color: var(--word-ink); }
.steps p { color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.exchange { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; font-family: var(--display); font-size: var(--step-2); }
.exchange span { background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 6px 20px; }
.exchange .arrow { border: 0; background: none; padding: 0; color: var(--brand); }
.exchange-note { color: var(--ink-soft); font-size: var(--step--1); }

/* Für Kinder mit LRS */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; }
.feature { display: grid; gap: 8px; align-content: start; min-width: 0; }
.feature h3 { display: flex; align-items: center; gap: 10px; }
.feature h3::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--word); flex: none; }
.feature p { color: var(--ink-soft); }
@media (max-width: 860px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }

.themes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.theme { border-radius: 12px; padding: 6px 12px; font-size: 0.875rem; border: 1px solid var(--line); }
.theme mark { border-radius: 4px; padding: 0 3px; background: #FFD866; color: inherit; }
.theme-creme { background: #FFF8EC; color: #2B2A40; }
.theme-himmel { background: #EEF5FF; color: #24304A; }
.theme-minze { background: #EDF8F2; color: #233A33; }

/* Bibliothek */
.levels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.levels li { border-top: 3px solid var(--brand); padding-top: 12px; display: grid; gap: 2px; }
.levels strong { font-family: var(--display); font-weight: 600; font-size: var(--step-1); }
.levels span { color: var(--ink-soft); font-size: var(--step--1); }
@media (max-width: 760px) { .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.book { display: grid; gap: 10px; align-content: start; min-width: 0; }
.cover {
  position: relative; overflow: hidden; aspect-ratio: 3 / 4; max-width: 100%; border-radius: 14px 18px 18px 14px;
  background: linear-gradient(var(--top), var(--bottom));
  display: grid; place-items: center; font-size: clamp(3.5rem, 9vw, 5.25rem);
  box-shadow: inset 7px 0 0 rgba(0, 0, 0, 0.12), 0 8px 20px var(--shadow);
}
.cover::after { content: ""; position: absolute; left: -20%; right: -20%; bottom: -30%; height: 55%; border-radius: 50%; background: var(--land); }
.cover b { position: relative; z-index: 1; font-weight: 400; transform: translateY(-6%); }
.cover .star { position: absolute; z-index: 0; width: 5px; height: 5px; border-radius: 50%; background: #FFFFFF; opacity: 0.8; }
.book h3 { font-size: 1.0625rem; }
.book p { font-size: var(--step--1); color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 760px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.note { color: var(--ink-soft); max-width: 44em; }

/* Für Eltern */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.checks li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.checks li::before { content: "✓"; width: 28px; height: 28px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: var(--mint-soft); color: var(--mint); font-weight: 600; font-size: 0.875rem; }
.checks strong { font-weight: 600; }

.panel { background: var(--surface); border-radius: var(--radius); padding: 28px; display: grid; gap: 22px; box-shadow: 0 10px 28px var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.panel-head h3 { font-size: var(--step-1); }
.panel-head span { font-size: 0.8125rem; color: var(--ink-soft); }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); }
.setting span { font-size: var(--step--1); color: var(--ink-soft); }
.setting strong { font-weight: 600; text-align: right; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 150px; }
.week div { display: grid; gap: 6px; justify-items: center; align-content: end; height: 100%; font-size: 0.75rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.week i { display: block; width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: var(--brand); height: calc(var(--min) * 5px); min-height: 4px; }
.week .zero i { background: var(--line); }
.week-caption { font-size: 0.8125rem; color: var(--ink-soft); }

/* Datenschutz */
.privacy { background: var(--brand-soft); border-radius: 32px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.privacy .section-head { align-content: start; }
@media (max-width: 860px) { .privacy { grid-template-columns: minmax(0, 1fr); } }

/* Preis */
.price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (max-width: 860px) { .price { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.ticket { background: var(--surface); border-radius: 28px; padding: 32px; display: grid; gap: 20px; box-shadow: 0 10px 28px var(--shadow); border: 2px solid var(--line); }
.amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; font-family: var(--display); }
.amount strong { font-size: clamp(3.5rem, 2.5rem + 4vw, 5rem); font-weight: 600; line-height: 1; color: var(--brand-strong); font-variant-numeric: tabular-nums; }
.amount span { font-size: var(--step-1); color: var(--ink-soft); }
.per-month { font-size: var(--step--1); color: var(--ink-soft); }
.terms { font-size: var(--step--1); color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 16px; }

/* Fragen */
.faq { display: grid; gap: 12px; max-width: 52em; }
.faq details { background: var(--surface); border-radius: 18px; padding: 4px 22px; border: 1px solid var(--line); }
.faq summary { cursor: pointer; padding-block: 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 1.5rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 18px; color: var(--ink-soft); max-width: 65ch; }

/* Schluss und Fuss */
.closing .wrap { padding-block: 72px 88px; display: grid; justify-items: start; gap: 24px; }
.closing h2 { max-width: 16em; }

.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap { padding-block: 32px 40px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; font-size: var(--step--1); color: var(--ink-soft); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-foot a { color: var(--ink-soft); }

/* ---------- Textseiten (Impressum, Datenschutz) ---------- */

.doc .wrap { padding-block: 32px 80px; }
.doc article { max-width: 44em; display: grid; gap: 18px; }
.doc h1 { font-size: var(--step-3); margin-bottom: 8px; }
.doc h2 { font-size: var(--step-1); margin-top: 22px; }
.doc ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.doc address { font-style: normal; }
.doc .stand { color: var(--ink-soft); font-size: var(--step--1); }
.todo { background: var(--word); color: var(--word-ink); border-radius: 6px; padding: 0 6px; }
