/* Plappi reist – Stylesheet
   Schriften werden lokal geladen (keine Verbindung zu Google). */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.woff") format("woff");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff") format("woff");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --cream: #fbf6ec;
  --paper: #ffffff;
  --ink: #2b2d42;
  --ink-soft: #5b5e73;
  --line: #ece3d2;
  --orange: #f39c33;
  --blue: #2f8fd8;
  --cyan: #1fb5c9;
  --yellow: #f2be2e;
  --red: #e5533d;
  --green: #5daf4a;
  --teal: #4db6ac;
  --purple: #8e6cc9;
  --it-green: #009246;
  --it-red: #ce2b37;
  --radius: 22px;
  --shadow: 0 6px 20px rgba(43, 45, 66, 0.08);
  --max: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); }
a:hover { color: #1f6fae; }

h1, h2, h3, .brand {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Kopfzeile ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
}
.brand img { width: 44px; height: 44px; }
.brand span { color: var(--orange); }
.site-nav a {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--cream); }

.flag-stripe {
  height: 6px;
  background: linear-gradient(90deg, var(--it-green) 0 33.3%, #fff 33.3% 66.6%, var(--it-red) 66.6% 100%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 0 #c97a1f;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #c97a1f; }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Startseite ---------- */
.hero {
  padding: 56px 0 40px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}
.hero .kicker {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: var(--orange);
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.hero .lead { font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.hero p { color: var(--ink-soft); max-width: 36em; }
.hero-img { justify-self: center; max-width: 380px; width: 100%; }

.book {
  padding: 24px 0 56px;
}
.book-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  padding: 32px;
  align-items: center;
  border-top: 8px solid var(--orange);
}
.book-card img { border-radius: 10px; box-shadow: 0 10px 24px rgba(43,45,66,.18); }
.book-card .band {
  display: inline-block;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  background: var(--cream);
  color: var(--orange);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 10px;
}
.book-card .sub { color: var(--ink-soft); font-weight: 700; }

.next {
  padding: 8px 0 72px;
}
.next-box {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px 32px;
  box-shadow: var(--shadow);
}
.next img { width: 120px; flex: 0 0 auto; }
.next p { margin: 0; font-size: 1.15rem; }

/* ---------- Audio-Seite ---------- */
.page-head {
  padding: 44px 0 20px;
}
.page-head .wrap {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 24px;
  align-items: center;
}
.page-head p { color: var(--ink-soft); font-size: 1.15rem; max-width: 34em; }
.tip {
  background: var(--paper);
  border-left: 6px solid var(--yellow);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  max-width: 40em;
}
.tip strong { font-family: "Fredoka", sans-serif; font-weight: 600; }

.topic-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(251, 246, 236, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topic-nav ul {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.topic-nav a {
  display: block;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: var(--c, var(--orange));
  padding: 6px 14px;
  border-radius: 999px;
}

.topic {
  padding: 36px 0 8px;
  scroll-margin-top: 64px;
}
.topic-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  border-bottom: 4px solid var(--c, var(--orange));
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.topic-title h2 { margin: 0; }
.topic-title .it { font-family: "Fredoka", sans-serif; font-weight: 500; color: var(--c, var(--orange)); font-size: 1.4rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.1s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--c, var(--orange)); }
.card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.card.is-sentence { grid-column: span 2; }
.card .play {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--c, var(--orange));
  display: grid;
  place-items: center;
}
.card .play svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }
.card.is-playing .play { animation: pulse 0.9s ease-in-out infinite; }
.card.is-playing .play svg { margin-left: 0; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.card .de { display: block; font-size: 0.95rem; color: var(--ink-soft); font-weight: 700; }
.card .itw { display: block; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.35rem; line-height: 1.2; }
.card .lt { display: block; font-size: 0.85rem; color: var(--ink-soft); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(120px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  opacity: 0;
  visibility: hidden;
  z-index: 20;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }

/* ---------- Bonus-Kasten ---------- */
.bonus {
  padding: 48px 0 72px;
}
.bonus-box {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 8px solid var(--green);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  padding: 32px;
  align-items: center;
}
.bonus-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 10px;
}
.bonus-form input {
  flex: 1 1 200px;
  font: inherit;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
}
.bonus-form input:focus { outline: none; border-color: var(--green); background: #fff; }
.bonus-form .btn { background: var(--green); box-shadow: 0 4px 0 #3f8a30; }
.bonus-form .btn:active { box-shadow: 0 1px 0 #3f8a30; }
.small { font-size: 0.85rem; color: var(--ink-soft); }
.form-msg { font-weight: 700; color: var(--green); min-height: 1.4em; }

/* ---------- Rechtliche Seiten ---------- */
.legal { padding: 44px 0 72px; }
.legal .wrap { max-width: 760px; }
.legal h2 { font-size: 1.4rem; margin-top: 1.6em; }
.legal h3 { font-size: 1.15rem; margin: 1.4em 0 0.4em; }
.legal h4 { font-size: 1rem; margin: 1.1em 0 0.3em; }
.legal p, .legal li { overflow-wrap: anywhere; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: 0.5em; }
.legal .small { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2.5em; }
.todo {
  background: #fff4d6;
  border: 2px dashed var(--yellow);
  border-radius: 12px;
  padding: 14px 18px;
}

/* ---------- Fußzeile ---------- */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 24px 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}
.site-footer a { color: var(--ink-soft); }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .hero { padding-top: 32px; }
  .hero .wrap, .page-head .wrap { grid-template-columns: 1fr; }
  .hero-img { max-width: 240px; order: -1; }
  .page-head img { max-width: 120px; order: -1; margin: 0 auto -8px; }
  .book-card, .bonus-box { grid-template-columns: 1fr; padding: 24px; }
  .book-card img { max-width: 260px; margin: 0 auto; }
  .bonus-box img { max-width: 130px; margin: 0 auto; }
  .next-box { flex-direction: column; text-align: center; padding: 24px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .card.is-sentence { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; }
  .card .play { width: 38px; height: 38px; }
  .card .play svg { width: 16px; height: 16px; }
  .card .itw { font-size: 1.2rem; overflow-wrap: anywhere; }
  .card .de { font-size: 0.85rem; }
  .site-nav a { padding: 6px 10px; }
  .brand { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
