/* Self-hosted fonts (SIL Open Font License 1.1; see /fonts/OFL-*.txt).
   Variable files, same as Google Fonts served: one file covers all weights. */
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/baloo-2-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/baloo-2-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

: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); }

.btn-big { font-size: 1.35rem; }

/* "Coming soon" statement: plain text, deliberately not button-like. */
.soon-label {
  flex-basis: 100%;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink-soft);
}

/* 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;
}

/* Labels are long, so each one may wrap onto two lines instead of
   pushing the nav wider than the screen. */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  max-width: 9.5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  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;
}

/* Weeper's character art in a round, gently bobbing frame. The art has a
   white background, so it blends into the white circle. */
.hero-portrait {
  aspect-ratio: 1;
  max-width: 380px;
  margin: 0 auto;
  padding: 4%;
  border-radius: 50%;
  background: var(--white);
  border: 4px dashed var(--grape);
  overflow: hidden;
  animation: bob 3.5s ease-in-out infinite;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.art-emoji { font-size: 6rem; line-height: 1; }

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

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

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

/* Book art shown as a tilted "cover" in the About section. */
.cover-art {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
  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;
}

.characters h2 { margin-bottom: 36px; }

.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; }

/* Plain text, deliberately not button-like: there's nothing to click yet. */
.signup-soon {
  margin: 20px 0 0;
  color: var(--sun);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

/* Status and small-print text (used on the vote page). */
.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;
}

/* Vote page */
.vote-hero {
  padding: 48px 0 56px;
  text-align: center;
}

.vote-hero .lead { margin: 0 auto; }

.vote-section { text-align: center; }

.vote-message {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* 12 characters: 4 per row on desktop, 3 on tablets, 2 on phones (below),
   so every row is full. */
.vote-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.vote-card {
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 12px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.vote-card:hover { transform: rotate(-1.5deg) scale(1.03); }
.vote-card:active { transform: scale(0.97); }
.vote-card:focus-visible { outline: 4px solid var(--grape); outline-offset: 4px; }

.vote-card-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.15;
}

.vote-art {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.vote-placeholder {
  border-radius: 50%;
  border: 4px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: var(--white);
}

.tone-1 { background: var(--sky); }
.tone-2 { background: var(--berry); }
.tone-3 { background: var(--grape); }
.tone-4 { background: var(--grass); }
.tone-5 { background: var(--sun); }

.vote-panel {
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
}

.vote-panel h2:focus { outline: none; }
.vote-panel .art-emoji { font-size: 4.5rem; margin: 0 0 12px; }

.vote-confirm-art {
  width: min(260px, 70%);
  margin: 0 auto 16px;
}

.vote-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.vote-actions .btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.vote-turnstile {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.vote-turnstile:empty { display: none; }

.vote-note { color: var(--ink); }

.vote-fine-print {
  max-width: 560px;
  margin: 24px auto 0;
  color: var(--ink-soft);
}

/* 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; }
  .hero-portrait { max-width: 240px; }
  .art-emoji { font-size: 4.5rem; }
  .section { padding: 56px 0; }
}

/* Tablets: three vote cards per row. */
@media (max-width: 900px) {
  .vote-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* Phones: logo on its own row, then the three nav links side by side,
   each column only as wide as its (wrapped) label. */
@media (max-width: 600px) {
  .nav { justify-content: center; }
  .nav-links {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    font-size: 0.95rem;
  }
  .nav-links a { max-width: none; }
}

@media (max-width: 360px) {
  .nav-links { font-size: 0.875rem; }
}

/* Phones: two vote cards per row so kids can see several at once. */
@media (max-width: 600px) {
  .vote-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .vote-card { padding: 12px 8px 14px; }
  .vote-card-name { font-size: 1.1rem; }
  .vote-placeholder { font-size: 3rem; }
}

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