/* ============================================================
   Design tokens
   ============================================================ */
:root {
  /* Colors */
  --paper:          #ffffff;
  --panel-cream:    #faf8e7;
  --panel-mist:     #e2eeea;
  --peach:          #fad7bd;
  --ink:            #36332f;
  --ink-byline:     #404040;
  --line-sepia:     #82533d;
  --plum:           #b05083;
  --teal:           #3da8b0;
  --teal-text:      #1f7d85;
  --terracotta:     #c45849;
  --balloon-red:    #f23039;
  --sunshine:       #facf0f;
  --tiger:          #f88e24;
  --tutu:           #ca84ca;
  --hair-gold:      #fbbc49;
  --sky:            #9fd8f4;
  --jungle:         #7a9060;
  --jungle-deep:    #2a5a45;
  --sunset-mauve:   #ca9cbc;
  --sunset-coral:   #f69d7c;

  /* Spacing */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;

  /* Radii */
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-panel: 32px;
  --radius-pill:  9999px;

  /* Shadows */
  --panel-feather:      0 0 28px 20px rgba(250, 248, 231, 0.92);
  --panel-feather-mist: 0 0 28px 20px rgba(226, 238, 234, 0.92);

  /* Typography */
  --font-display: "Grandstander", "Baloo 2", "Comic Sans MS", system-ui, sans-serif;
  --font-hand:    "Patrick Hand", "Comic Neue", "Comic Sans MS", system-ui, sans-serif;
}

/* ============================================================
   Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--teal-text); }
a:hover { color: var(--line-sepia); }

input:focus,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
}

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

/* ============================================================
   Navigation
   ============================================================ */
.site-header {
  background: var(--paper);
  border-bottom: 2px solid var(--line-sepia);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--plum);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.1;
  min-height: 48px;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  font-size: 1.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  padding: 10px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

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

/* Phase-sensitive nav CTA */
.nav-cta {
  background: var(--plum);
  color: var(--paper) !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 1.25rem;
  min-height: 44px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: var(--paper);
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 88px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px 64px;
}

.hero-text {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.title-lockup {
  margin: 0;
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.title-big {
  font-weight: 800;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.95;
  color: var(--plum);
}

.title-connector {
  font-weight: 700;
  font-size: clamp(2.25rem, 4.8vw, 3.75rem);
  line-height: 1;
  color: var(--teal);
}

.title-connector-1 { margin-left: 0.9em; }
.title-connector-2 { margin-left: 1.5em; }
.title-elephant    { margin-left: 0.1em; }

.hero-byline {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-left: 4px;
}

.hero-byline .author {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--ink-byline);
}

.hero-byline .illustrator {
  margin: 0;
  font-size: 1.375rem;
  line-height: 1.2;
  color: var(--teal-text);
}

.hero-tagline {
  margin: 0;
  font-size: 1.5rem;
  max-width: 32rem;
}

/* Hero CTA forms / buttons — phase-driven visibility */
.hero-cta { margin: 8px 0 0; }

.signup-form {
  background: var(--panel-cream);
  border-radius: var(--radius-panel);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 32rem;
}

.signup-form label {
  font-size: 1.375rem;
  color: var(--ink);
}

.signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.email-input {
  flex: 1 1 200px;
  min-width: 0;
  font: inherit;
  font-size: 1.25rem;
  padding: 10px 16px;
  border: 2px solid var(--line-sepia);
  border-radius: var(--radius-sm);
  min-height: 52px;
  background: var(--paper);
  color: var(--ink);
}

.btn-primary {
  font: inherit;
  font-size: 1.3rem;
  background: var(--plum);
  color: var(--paper);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  min-height: 52px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-primary:hover { background: #98386e; color: var(--paper); }

.btn-hero {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 56px;
  font-size: 1.5rem;
  text-decoration: none;
  background: var(--plum);
  color: var(--paper);
  border-radius: var(--radius-sm);
  padding: 8px 28px;
}

.btn-hero:hover { background: #98386e; color: var(--paper); }

.cta-subtext {
  margin: 0;
  font-size: 1.25rem;
  color: var(--line-sepia);
}

.signup-hint {
  margin: 0;
  font-size: 1.125rem;
  color: var(--line-sepia);
}

.thanks-msg {
  display: none;
  font-size: 1.25rem;
  color: var(--jungle-deep);
  padding: 10px 0;
}

.hero-image {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-image img {
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: var(--radius-md);
  transform: rotate(-1.5deg);
}

.balloon-svg {
  position: absolute;
  top: -28px;
  right: 8%;
}

/* ============================================================
   Story section
   ============================================================ */
.story {
  background: var(--panel-mist);
}

.story-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.story h2 {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  color: var(--jungle-deep);
}

.story-spread {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.text-panel-cream {
  position: relative;
  margin: -72px 0 0 clamp(16px, 6vw, 72px);
  max-width: 600px;
  background: var(--panel-cream);
  border-radius: var(--radius-panel);
  padding: var(--space-3);
  box-shadow: var(--panel-feather);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 1.5rem;
}

.text-panel-cream p { margin: 0; }

.peek-heading {
  margin: 64px 0 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--plum);
}

.spread-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.spread-grid figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.spread-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.spread-grid figcaption {
  font-size: 1.15rem;
  color: var(--line-sepia);
}

.book-specs {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 1.3rem;
  color: var(--line-sepia);
}

.spec-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--plum);
  display: inline-block;
}

/* ============================================================
   Treasures band
   ============================================================ */
.treasures {
  background: var(--jungle-deep);
  color: var(--paper);
}

.treasures-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.treasures-text {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.treasures-text h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  color: var(--sunshine);
}

.treasures-text p {
  margin: 0;
  font-size: 1.5rem;
}

.treasure-circles {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.treasure-circle {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
}

/* ============================================================
   Behind the book
   ============================================================ */
.behind {
  background: var(--paper);
}

.behind-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px 64px;
  align-items: center;
}

.photo-stack {
  flex: 1 1 360px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.photo-card {
  background: var(--paper);
  border: 2px solid var(--line-sepia);
  border-radius: var(--radius-md);
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.photo-card figcaption {
  font-size: 1.1rem;
  color: var(--line-sepia);
  text-align: center;
}

.photo-card-offset { margin-top: 32px; }

.photo-card-1 { transform: rotate(-3deg); }
.photo-card-2 { transform: rotate(2deg); }

.behind-text {
  flex: 1.3 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.behind-text h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  color: var(--plum);
}

.behind-text p { margin: 0; }

/* ============================================================
   Creators
   ============================================================ */
.creators {
  background: var(--panel-mist);
}

.creators-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 24px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.creators-inner h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  color: var(--jungle-deep);
}

.creator-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.creator-card {
  flex: 1 1 400px;
  min-width: 0;
  background: var(--paper);
  border-radius: var(--radius-md);
  border: 2px solid var(--line-sepia);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.creator-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.creator-avatar {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  object-fit: cover;
  border: 2px solid var(--line-sepia);
}

.creator-avatar-placeholder {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--peach);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  color: var(--line-sepia);
}

.creator-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.2;
}

.creator-card h3.author-name  { color: var(--plum); }
.creator-card h3.artist-name  { color: var(--teal-text); }

.creator-role {
  margin: 0;
  color: var(--line-sepia);
}

.creator-card p { margin: 0; }

.art-process-note { font-size: 1.2rem; }
.art-process-label { color: var(--plum); }

/* ============================================================
   Join / bottom band
   ============================================================ */
.join-section {
  background: var(--paper);
}

.join-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.join-spread {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.band-panel {
  position: relative;
  margin-top: -80px;
  width: calc(100% - 32px);
  max-width: 640px;
  background: var(--panel-cream);
  border-radius: var(--radius-panel);
  padding: 32px 24px;
  box-shadow: var(--panel-feather);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.band-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.05;
  color: var(--plum);
}

.band-sub {
  margin: 0;
  font-size: 1.4rem;
}

.band-form {
  margin: 8px 0 0;
  width: 100%;
  max-width: 30rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  position: relative;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  background: var(--paper);
  border-top: 2px solid var(--line-sepia);
}

.faq-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px 64px;
  align-items: flex-start;
}

.faq-qs {
  flex: 2 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-qs h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  color: var(--jungle-deep);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-list details {
  background: var(--panel-cream);
  border-radius: var(--radius-md);
  padding: 16px 24px;
}

.faq-list summary {
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  min-height: 32px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--plum);
  flex-shrink: 0;
}

.faq-list details[open] summary::after { content: "−"; }

.faq-list details p {
  margin: 12px 0 0;
}

.faq-aside {
  flex: 1 1 300px;
  min-width: 0;
  background: var(--peach);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.faq-aside img {
  width: 100%;
  max-width: 360px;
  height: auto;
}

.faq-aside p {
  margin: 0;
  font-size: 1rem;
  color: var(--line-sepia);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--paper);
  border-top: 2px solid var(--line-sepia);
}

.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
}

.footer-mark {
  height: 64px;
  width: auto;
}

.footer-dedication {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--plum);
  max-width: 36rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  font-size: 1.2rem;
  margin-top: 8px;
}

.footer-links a {
  padding: 8px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.footer-copy {
  margin: 0;
  font-size: 1rem;
  color: var(--line-sepia);
}

/* ============================================================
   Phase visibility
   ============================================================ */
/* Hide everything first */
.show-prelaunch,
.show-live,
.show-shop { display: none !important; }

/* Pre-launch */
[data-phase="prelaunch"]  .show-prelaunch  { display: block !important; }

/* Kickstarter live */
[data-phase="live"]  .show-live  { display: block !important; }

/* Selling direct */
[data-phase="shop"]  .show-shop  { display: block !important; }

/* Flex-display variants (applied by JS or specific elements that need flex) */
[data-phase="prelaunch"]  .show-prelaunch.is-flex  { display: flex !important; }
[data-phase="live"]       .show-live.is-flex        { display: flex !important; }
[data-phase="shop"]       .show-shop.is-flex         { display: flex !important; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
  .nav-logo span { font-size: 1rem; }

  .title-connector-1 { margin-left: 0.5em; }
  .title-connector-2 { margin-left: 0.9em; }

  .hero-inner { padding: 40px 16px 64px; gap: 32px; }

  .story-inner { padding: 56px 16px; }

  .text-panel-cream { margin: -48px 0 0 12px; }

  .behind-inner,
  .creators-inner,
  .faq-inner { padding: 64px 16px; }

  .join-inner { padding: 64px 16px; }

  .footer-inner { padding: 48px 16px 36px; }

  .band-panel { width: calc(100% - 16px); }
}
