/* Persephone & Brinley — playful kids'-book theme.
   Brand DNA (cream / charcoal / teal) kept from character-blocks.md, warmed up
   with a storybook palette, a rounded display font, and gentle bounce so the
   site reads as a children's picture-book series, not an editorial landing page.
   Inspiration: Dribbble "Children Book Website Design" (shot 23430521). */
:root {
  --cream: #FFF7E9;        /* warmer paper */
  --cream-deep: #FBEFD6;
  --charcoal: #38343B;     /* softer than pure black */
  --teal: #4A9EA1;
  --teal-dark: #357f82;

  /* Storybook accents */
  --sun: #FFC85C;
  --coral: #FF8A6B;
  --berry: #F06595;
  --sky: #6FB7E9;
  --grape: #9B7EDE;
  --leaf: #7DC68B;

  --ink-soft: rgba(56,52,59,0.62);
  --max: 1080px;
  --radius: 22px;
  --shadow: 0 14px 30px rgba(56,52,59,0.10);
  --shadow-sm: 0 4px 14px rgba(56,52,59,0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Lexend', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 19px;
  line-height: 1.55;
  color: var(--charcoal);
  background-color: var(--cream);
  /* soft floating colour blobs — the "storybook sky" */
  background-image:
    radial-gradient(620px 620px at 88% -8%, rgba(255,200,92,0.28), transparent 60%),
    radial-gradient(520px 520px at -6% 8%, rgba(111,183,233,0.22), transparent 60%),
    radial-gradient(680px 680px at 50% 118%, rgba(155,126,222,0.16), transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, .brand {
  font-family: 'Fredoka', 'Lexend', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
a { color: var(--teal-dark); }

/* ---------- Header ---------- */
header.site {
  background: rgba(255,247,233,0.85);
  backdrop-filter: saturate(1.2) blur(8px);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 2px solid rgba(56,52,59,0.06);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { font-size: 23px; color: var(--charcoal); text-decoration: none; }
.brand span { color: var(--coral); }
nav.site { display: flex; flex-wrap: wrap; align-items: center; }
nav.site a {
  margin-left: 8px; padding: 8px 14px; border-radius: 999px;
  text-decoration: none; color: var(--charcoal); font-weight: 600; font-size: 17px;
  transition: background .15s ease, color .15s ease;
}
nav.site a:hover { background: var(--sun); color: var(--charcoal); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--coral); color: #fff;
  padding: 14px 26px; border-radius: 999px; text-decoration: none;
  font-weight: 600; border: none; cursor: pointer; font-size: 18px;
  font-family: 'Fredoka', 'Lexend', sans-serif;
  box-shadow: 0 6px 0 rgba(0,0,0,0.10);
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 9px 0 rgba(0,0,0,0.10); background: #ff7a57; }
.btn:active { transform: translateY(2px); box-shadow: 0 3px 0 rgba(0,0,0,0.10); }
.btn.secondary {
  background: #fff; color: var(--teal-dark); border: 2.5px solid var(--teal);
  box-shadow: 0 6px 0 rgba(74,158,161,0.25);
}
.btn.secondary:hover { background: #f0fbfb; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 64px; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; }
.hero h1 {
  font-size: 52px; line-height: 1.08; margin: 0 0 20px; max-width: 800px;
  color: var(--charcoal);
}
.hero h1::after {
  content: ""; display: block; width: 130px; height: 12px; margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--sun) 50%, var(--teal));
}
.hero p.lead { font-size: 23px; max-width: 660px; margin: 0 0 30px; color: #5a545d; }
.hero .actions a { margin-right: 14px; margin-bottom: 12px; }
/* floating storybook shapes */
.hero::before {
  content: ""; position: absolute; top: 38px; right: 7%;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFE08A, var(--sun));
  box-shadow: 0 0 0 14px rgba(255,200,92,0.25);
  animation: bob 6s ease-in-out infinite;
}
.hero::after {
  content: ""; position: absolute; bottom: 18px; right: 22%;
  width: 64px; height: 64px; border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  background: var(--sky); opacity: .55;
  animation: bob 5s ease-in-out infinite reverse;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---------- Sections ---------- */
main { position: relative; z-index: 1; }
section { padding: 52px 0; }
.panel {
  background: #fff; border-radius: var(--radius); padding: 40px;
  box-shadow: var(--shadow); border: 2px solid rgba(56,52,59,0.05);
}
h2 { font-size: 34px; margin-top: 0; color: var(--charcoal); }

/* feature trio */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cols .card {
  background: #fff; border-radius: var(--radius); padding: 30px 28px;
  box-shadow: var(--shadow-sm); border: 2px solid rgba(56,52,59,0.05);
  position: relative; transition: transform .14s ease, box-shadow .14s ease;
}
.cols .card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cols .card::before {
  content: ""; display: block; width: 46px; height: 46px; border-radius: 16px;
  margin-bottom: 16px; transform: rotate(-6deg);
}
.cols .card:nth-child(1)::before { background: var(--sun); }
.cols .card:nth-child(2)::before { background: var(--berry); }
.cols .card:nth-child(3)::before { background: var(--leaf); }
.cols .card h3 { margin: 0 0 10px; color: var(--charcoal); font-size: 21px; }

.prose { max-width: 740px; }
.prose p { margin: 0 0 18px; }
.tagline {
  display: inline-block; color: var(--teal-dark); font-weight: 700;
  background: rgba(74,158,161,0.14); padding: 5px 14px; border-radius: 999px;
  font-size: 15px; letter-spacing: .02em;
}

/* ---------- Signup form ---------- */
form.signup { max-width: 460px; }
form.signup label { display: block; font-weight: 700; margin: 16px 0 6px; }
form.signup input {
  width: 100%; padding: 14px 16px; font-size: 18px; border-radius: 14px;
  border: 2.5px solid rgba(56,52,59,0.15); font-family: inherit; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
form.signup input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(74,158,161,0.18); }
form.signup .btn { margin-top: 22px; width: 100%; }
.form-msg { margin-top: 16px; font-weight: 700; }
.form-msg.ok { color: var(--teal-dark); }
.form-msg.err { color: #c0392b; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 2px solid rgba(56,52,59,0.06); padding: 40px 0; margin-top: 56px;
  font-size: 16px; background: rgba(251,239,214,0.55);
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
footer.site a { margin-right: 16px; color: var(--teal-dark); font-weight: 600; }
footer.site .social a { color: var(--teal-dark); font-weight: 600; }
.muted { color: var(--ink-soft); }
.small { font-size: 15px; }

/* ---------- Catalog grid ---------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px;
}
.book-card {
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
  border: 2px solid rgba(56,52,59,0.05);
  transition: transform .14s ease, box-shadow .14s ease;
}
.book-card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: var(--shadow); }
.book-card-body { padding: 18px 20px 24px; }
.book-card-body h3 { margin: 6px 0 14px; font-size: 21px; line-height: 1.2; color: var(--charcoal); }
.book-card-meta { margin: 0; font-size: 13px; color: var(--teal-dark); font-weight: 700; text-transform: capitalize; letter-spacing: .02em; }

/* Cover image + cycling "coming soon" placeholders so the grid stays colourful
   even before any art lands. */
.cover { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--cream-deep); }
.cover.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #fff; text-align: center; padding: 16px;
  background: linear-gradient(140deg, var(--teal) 0%, var(--teal-dark) 100%);
}
.cover.placeholder::before {
  content: "📖"; font-size: 40px; line-height: 1;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.18));
}
.cover.placeholder .ph-num { font-family: 'Fredoka','Lexend',sans-serif; font-size: 24px; font-weight: 700; letter-spacing: .4px; }
.cover.placeholder .ph-label { font-size: 12px; font-weight: 600; opacity: .92; text-transform: uppercase; letter-spacing: 1.4px; }
/* rotate the accent so 14 placeholder covers feel like a colourful shelf */
.book-grid .book-card:nth-child(6n+1) .cover.placeholder { background: linear-gradient(140deg, var(--coral), #e85d3d); }
.book-grid .book-card:nth-child(6n+2) .cover.placeholder { background: linear-gradient(140deg, var(--sky), #4f97c9); }
.book-grid .book-card:nth-child(6n+3) .cover.placeholder { background: linear-gradient(140deg, var(--grape), #7a5fc0); }
.book-grid .book-card:nth-child(6n+4) .cover.placeholder { background: linear-gradient(140deg, var(--leaf), #5aa86c); }
.book-grid .book-card:nth-child(6n+5) .cover.placeholder { background: linear-gradient(140deg, var(--berry), #d44d7d); }
.book-grid .book-card:nth-child(6n+6) .cover.placeholder { background: linear-gradient(140deg, var(--sun), #e0a52f); color: var(--charcoal); }

/* ---------- Status badges ---------- */
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 999px; }
.badge.soon { background: rgba(56,52,59,0.07); color: var(--ink-soft); }
.badge.live { background: rgba(125,198,139,0.22); color: #3f8a53; }

/* ---------- Single book page ---------- */
.book-layout { display: grid; grid-template-columns: 340px 1fr; gap: 44px; align-items: start; }
.book-cover-col .cover { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 1 / 1; }
.book-info-col h1 { font-size: 42px; line-height: 1.1; margin: 10px 0 12px; color: var(--charcoal); }
.book-moment {
  display: inline-block; color: var(--teal-dark); font-weight: 700; margin: 0 0 18px;
  text-transform: capitalize; background: rgba(74,158,161,0.12); padding: 6px 14px; border-radius: 999px;
}
.book-actions { margin-top: 26px; }

/* prev / next series nav */
.series-nav { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; font-weight: 700; }
.series-nav a { color: var(--teal-dark); text-decoration: none; padding: 8px 14px; border-radius: 999px; background: rgba(74,158,161,0.10); }
.series-nav a:hover { background: var(--sun); color: var(--charcoal); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 18px; }
  .cols { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 44px; }
  .hero h1 { font-size: 38px; }
  .hero p.lead { font-size: 20px; }
  .hero::before { width: 80px; height: 80px; top: 16px; right: 6%; }
  .hero::after { display: none; }
  .book-layout { grid-template-columns: 1fr; gap: 26px; }
  .book-cover-col { max-width: 340px; }
  .book-info-col h1 { font-size: 32px; }
  .panel { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after { animation: none; }
  .btn:hover, .book-card:hover, .cols .card:hover { transform: none; }
}
