:root {
  --sky: #8fd3ff;
  --sky-light: #e6f6ff;
  --sun: #ffd23f;
  --berry: #ff5d8f;
  --grass: #5ccf8a;
  --grape: #8e6cff;
  --ink: #2b2d42;
  --ink-soft: #5c5f7a;
  --paper: #fffdf7;
  --white: #ffffff;
  --radius: 22px;
  --shadow: 0 8px 0 rgba(43, 45, 66, 0.12);
  --font-display: "Baloo 2", "Comic Sans MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.5rem; }

a { color: var(--grape); }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  border: 3px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn:focus-visible { outline: 4px solid var(--grape); outline-offset: 3px; }

.btn-primary { background: var(--berry); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--ink); }

/* Header */
.site-header {
  background: var(--sun);
  border-bottom: 4px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover { color: var(--berry); }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-light) 100%);
  padding: 64px 0 80px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 40px;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--grape);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.5em;
}

.highlight {
  color: var(--berry);
  -webkit-text-stroke: 1px var(--ink);
}

.lead {
  font-size: 1.25rem;
  color: var(--ink-soft);
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.art-placeholder {
  aspect-ratio: 1;
  max-width: 380px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--white);
  border: 4px dashed var(--grape);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: bob 3.5s ease-in-out infinite;
}

.art-emoji { font-size: 6rem; line-height: 1; }
.art-label { font-weight: 700; color: var(--ink-soft); margin-top: 8px; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Sections */
.section { padding: 80px 0; }

.section-intro {
  color: var(--ink-soft);
  margin-top: -0.25em;
  margin-bottom: 40px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: center;
}

.cover-placeholder {
  aspect-ratio: 3 / 4;
  max-width: 320px;
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--grass);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  transform: rotate(-3deg);
}

.book-facts {
  list-style: none;
  padding: 0;
  margin: 24px 0 28px;
}

.book-facts li {
  padding: 6px 0;
  border-bottom: 2px dotted #d8d4e8;
}

/* Characters */
.characters {
  background: var(--sky-light);
  text-align: center;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.character-card {
  background: var(--white);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 20px;
  transition: transform 0.15s ease;
}

.character-card:hover { transform: rotate(-1.5deg) scale(1.03); }
.character-card p { color: var(--ink-soft); margin: 0; }

.character-avatar {
  width: 110px;
  height: 110px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 800;
  color: var(--white);
}

.color-1 .character-avatar { background: var(--sky); }
.color-2 .character-avatar { background: var(--berry); }
.color-3 .character-avatar { background: var(--grape); }

.is-mystery .character-avatar { filter: saturate(0.85); }

/* Signup */
.signup {
  background: var(--grape);
  color: var(--white);
  text-align: center;
}

.signup-inner { max-width: 680px; }

.signup-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.signup-form input {
  flex: 1 1 260px;
  font: inherit;
  padding: 0.75em 1.1em;
  border-radius: 999px;
  border: 3px solid var(--ink);
  min-width: 0;
}

.signup-form input:focus-visible {
  outline: 4px solid var(--sun);
  outline-offset: 2px;
}

.form-note {
  min-height: 1.6em;
  font-weight: 700;
  color: var(--sun);
  margin: 16px 0 0;
}

.fine-print {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 4px 0 0;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #d9dbe8;
  text-align: center;
  padding: 28px 0;
  font-size: 0.95rem;
}

.site-footer p { margin: 0; }

/* Responsive */
@media (max-width: 800px) {
  .hero-inner,
  .two-col {
    grid-template-columns: 1fr;
  }

  .hero-art { order: -1; }
  .art-placeholder { max-width: 240px; }
  .art-emoji { font-size: 4.5rem; }
  .section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .art-placeholder { animation: none; }
  .btn,
  .character-card { transition: none; }
}
