:root {
  --blue: #2D6CDF;
  --blue-dark: #1f4fb0;
  --yellow: #FFC93C;
  --red: #E8402A;
  --cream: #FCF3DF;
  --cream-2: #FFFCF3;
  --ink: #202020;
  --body-text: #4a4a42;
  --muted: #8a8272;
  --border: #ecdfc0;
  --radius: 18px;
  --font-head: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--body-text);
  line-height: 1.6;
}

#main {
  flex: 1;
  display: flex;
  align-items: center;
}

h1 { font-family: var(--font-head); color: #fff; margin: 0; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: var(--blue);
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.series-back-link {
  display: block;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.2px;
  color: #fff;
  text-decoration: none;
  background: var(--blue);
  border-bottom: 4px solid var(--yellow);
  padding: 20px 24px;
  transition: background 0.15s ease;
}
.series-back-link:hover { background: var(--blue-dark); }

/* ---------- Hero ---------- */
.hero {
  background: var(--blue);
  color: #fff;
  text-align: center;
  padding: 64px 24px 56px;
}
.hero-inner { max-width: 640px; margin: 0 auto; }
.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--yellow);
  margin: 0 0 14px;
}
.wordmark {
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.3;
}
.wordmark-highlight {
  display: inline-block;
  color: var(--blue-dark);
  background: var(--yellow);
  padding: 0 14px;
  border-radius: 10px;
  transform: rotate(-2deg);
  animation: drop-in-badge 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes drop-in-badge {
  0% { transform: translateY(-70vh) rotate(-2deg); opacity: 0; }
  65% { transform: translateY(10px) rotate(-2deg); opacity: 1; }
  82% { transform: translateY(-6px) rotate(-2deg); }
  100% { transform: translateY(0) rotate(-2deg); }
}
.hero-sub {
  font-size: 17px;
  max-width: 460px;
  margin: 20px auto 0;
  color: rgba(255,255,255,0.9);
}

/* ---------- Book detail ---------- */
.section {
  padding: 48px 24px;
  max-width: 780px;
  margin-inline: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.book-detail {
  display: flex;
  gap: 36px;
  align-items: center;
  background: #fff;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.cover-image {
  flex-shrink: 0;
  width: 220px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.book-copy { flex: 1; min-width: 0; }

.status-badge {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e4f3ea;
  color: #1d7a4c;
  margin-bottom: 14px;
}

.book-copy p { font-size: 15.5px; margin: 0 0 18px; }

.feature-list {
  margin: 0 0 22px;
  padding: 0 0 0 20px;
  font-size: 15px;
}
.feature-list li { margin-bottom: 6px; }

.cta-group { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cta-btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 999px;
}
.cta-btn-primary { background: var(--blue); color: #fff; }
.cta-btn-primary:hover { background: var(--blue-dark); }

@media (max-width: 560px) {
  .book-detail { flex-direction: column; text-align: center; padding: 24px; }
  .cover-image { margin: 0 auto; }
  .cta-group { justify-content: center; }
}

/* ---------- Flashcards-only editions ---------- */
.flashcards-heading {
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--blue-dark);
  margin: 0 0 6px;
}
.flashcards-sub {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0 0 20px;
}

.flashcard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.flashcard-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.flashcard-cover {
  flex-shrink: 0;
  width: 100px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.flashcard-info { min-width: 0; }
.flashcard-info h3 {
  font-family: var(--font-head);
  color: var(--blue-dark);
  font-size: 16px;
  margin: 0 0 6px;
}
.level-tag {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
}
.flashcard-info p { font-size: 13.5px; margin: 0 0 10px; }
.flashcard-info .cta-btn { font-size: 13px; padding: 8px 18px; }

@media (max-width: 640px) {
  .flashcard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .flashcard-card { flex-direction: column; text-align: center; }
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 40px 24px 50px;
  color: var(--muted);
  font-size: 14px;
}
.footer-brand {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 1.5px;
  font-size: 13px;
  margin-bottom: 10px;
}
