/* Whimblewood waitlist site, Phase 1 (local preview) */
:root {
  --cream: #f6efe0;
  --paper: #fbf7ee;
  --ink: #2b2a26;
  --ink-soft: #5a564c;
  --teal: #1f5f5b;
  --teal-deep: #164643;
  --russet: #9c4a2c;
  --moss: #6b7a3a;
  --ochre: #c9963a;
  --coral: #d9694f;
  --plum: #6e3b52;
  --line: #e2d8c3;
  --radius: 18px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); }
h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--teal-deep);
}
h1 { font-size: clamp(2.6rem, 8vw, 4.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }

/* Preview banner: delete before publishing */
.preview-banner {
  background: var(--plum);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  padding: 8px 16px;
}

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--teal-deep);
  text-decoration: none;
}
.nav-cta {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--teal-deep);
  text-decoration: none;
  border-bottom: 2px solid var(--ochre);
}

/* Buttons */
.button {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}
.button:hover, .button:focus-visible { background: var(--teal-deep); }
.button:focus-visible, input:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }

/* Hero */
.hero { padding-top: 24px; }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
.tagline { font-size: clamp(1.15rem, 3vw, 1.4rem); color: var(--ink-soft); max-width: 30ch; }
.attribution { font-size: 0.9rem; color: var(--russet); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.6em; }

/* Art placeholders: swap for approved images */
.art {
  position: relative;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 25%, rgba(201,150,58,0.35) 0 14%, transparent 15%),
    radial-gradient(circle at 78% 70%, rgba(217,105,79,0.30) 0 12%, transparent 13%),
    radial-gradient(circle at 60% 20%, rgba(107,122,58,0.30) 0 18%, transparent 19%),
    linear-gradient(160deg, #2a6a63, #1c4d49);
  color: #f6efe0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
}
.art span {
  background: rgba(22,70,67,0.85);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.8rem;
  line-height: 1.4;
}
.art-hero { aspect-ratio: 2 / 1; }
.art-cover { aspect-ratio: 1 / 1; }
.art-card { aspect-ratio: 4 / 3; border-radius: 14px; }
.art-portrait { aspect-ratio: 1 / 1; border-radius: 50%; max-width: 220px; }

/* Cast line-up (hero) */
.lineup { margin: 36px 0 0; padding: 0 16px; max-width: 1400px; margin-left: auto; margin-right: auto; }
.lineup img { width: 100%; height: auto; border-radius: var(--radius); }

/* Character portraits: one pose cropped from each approved sheet.
   background-size = sheet width / crop size; position = crop offset / (sheet size - crop size). */
.portrait {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background-color: #f7efdc;
  background-repeat: no-repeat;
}
.portrait-nimbin { background-size: 326.8% auto; background-position: 10.8% 2.7%; }
.portrait-tibbet { background-size: 320% auto; background-position: 10.9% 1.8%; }
.portrait-winkle { background-size: 394.2% auto; background-position: 3.8% 2.3%; }
.portrait-pumble { background-size: 526.3% auto; background-position: 4.9% 0%; }
.portrait-wisp   { background-size: 422.4% auto; background-position: 63.5% 92.1%; }

/* Book */
.book { display: grid; gap: 32px; align-items: start; }
.facts { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.98rem; }
.facts th, .facts td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 32%; color: var(--ink-soft); font-weight: 700; }
.status-pill {
  display: inline-block;
  background: #efe3c7;
  color: var(--russet);
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 4px 12px;
}
.readaloud {
  margin: 1.4em 0 0;
  padding: 18px 20px;
  background: var(--paper);
  border-left: 4px solid var(--coral);
  border-radius: 0 12px 12px 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
}
.readaloud p { margin: 0 0 0.4em; }
.readaloud p:last-child { margin: 0; }

/* Friends */
.friends { display: grid; gap: 20px; margin-top: 28px; }
.friend {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.friend h3 { margin-top: 14px; }
.friend p { margin: 0; font-size: 1rem; }
.note { font-size: 0.95rem; color: var(--ink-soft); }

/* Themes */
.themes { display: grid; gap: 14px; padding: 0; margin: 24px 0; list-style: none; }
.themes li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 14px 48px;
  position: relative;
}
.themes li::before {
  content: "";
  position: absolute;
  left: 18px; top: 22px;
  width: 14px; height: 14px;
  border-radius: 50% 50% 50% 0;
  background: var(--moss);
  transform: rotate(-45deg);
}

/* Ladder */
.ladder { display: grid; gap: 14px; margin: 24px 0 12px; }
.rung {
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.rung strong { display: block; font-family: "Fraunces", Georgia, serif; font-size: 1.15rem; color: var(--teal-deep); }
.rung .ages { color: var(--russet); font-weight: 800; }
.rung.now { border: 2px solid var(--teal); }

/* Creator */
.creator .wrap { display: grid; gap: 28px; align-items: center; }

/* Sign-up */
.signup { background: var(--teal-deep); color: var(--cream); }
.signup h2 { color: #fff; }
.signup-card { max-width: 620px; }
.field { margin: 0 0 18px; }
.field label, .field legend { display: block; font-weight: 800; margin-bottom: 6px; }
.field input[type="email"] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--paper);
  color: var(--ink);
}
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  cursor: pointer;
}
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; cursor: pointer; }
.consent input { margin-top: 6px; width: 18px; height: 18px; flex: none; }
.signup .button { background: var(--ochre); color: var(--ink); }
.signup .button:hover, .signup .button:focus-visible { background: #dcae55; }
.small { font-size: 0.9rem; opacity: 0.9; }
.message { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-weight: 700; }
.message.error { background: #f7d6cc; color: #6d2414; }
.message.success { background: #e3ecc9; color: #2f3a10; }
[hidden] { display: none !important; }
.field input.invalid { border-color: var(--coral); }

/* Footer */
.site-footer { padding: 32px 0 48px; font-size: 0.9rem; color: var(--ink-soft); }
.site-footer p { margin: 0 0 0.5em; }

/* Plain pages */
.page { padding: 32px 0 64px; max-width: 760px; }

@media (min-width: 760px) {
  .hero h1 { margin-bottom: 0.3em; }
  .book { grid-template-columns: 0.9fr 1.1fr; }
  .friends { grid-template-columns: repeat(2, 1fr); }
  .ladder { grid-template-columns: repeat(3, 1fr); }
  .creator .wrap { grid-template-columns: 220px 1fr; }
}
@media (min-width: 1000px) {
  .friends { grid-template-columns: repeat(3, 1fr); }
}
