/* The Bubblegum Tree — site styles
   Palette sampled from the book cover. Fonts: Fredoka (headings) + Lora (body). */

:root {
  --paper: #fbf6ea;
  --paper-deep: #f3ead6;
  --ink: #3b2a1e;
  --ink-soft: #6b5a4a;
  --line: #e4d8c2;

  --sky: #9ec6db;
  --sky-light: #e0f3f9;
  --grass: #8dbe8a;
  --grass-deep: #6fa56e;
  --leaf: #8bab77;
  --trunk: #cd936b;
  --trunk-deep: #a86f48;

  --coral: #d9634e;
  --coral-light: #e29182;
  --coral-deep: #b94a37;
  --navy: #384c63;
  --navy-deep: #2a3a4d;

  --gum-pink: #f4a7c0;
  --gum-yellow: #f6d36b;
  --gum-lilac: #c3a6e6;
  --gum-mint: #a9dcc4;

  --font-display: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Lora", Georgia, serif;

  --radius: 18px;
  --shadow-soft: 0 10px 30px rgba(59, 42, 30, 0.12);
  --shadow-book: 0 24px 50px rgba(59, 42, 30, 0.28), 0 4px 10px rgba(59, 42, 30, 0.15);
  --wrap: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain over everything, very light. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.18 0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

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

a { color: var(--coral-deep); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--coral); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.25rem; }

/* A short hand-drawn squiggle under section headings. */
h2.squiggle::after {
  content: "";
  display: block;
  width: 112px;
  height: 12px;
  margin-top: 0.35em;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 112 12'><path d='M2 8 C 14 2, 22 12, 34 7 S 54 2, 66 7 S 88 12, 110 4' fill='none' stroke='%23d9634e' stroke-width='3.2' stroke-linecap='round'/></svg>") no-repeat left center;
}
h2.squiggle.center::after { margin-left: auto; margin-right: auto; }

p { margin: 0 0 1em; }
.lead { font-size: 1.18rem; line-height: 1.6; color: var(--ink); }
.muted { color: var(--ink-soft); }
.small { font-size: 0.92rem; }
.caption {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 0.6em;
}
.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.6em;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Grid children must be allowed to shrink below their image's natural width,
   or a 1000px cover pushes the whole page wider than a phone screen. */
.hero .wrap > *, .two-col > *, .author-teaser > *, .video-grid > *, .gallery > li { min-width: 0; }
.book, figure.print, .video { max-width: 100%; }
.section { padding: 56px 0; position: relative; }
.section--sky { background: var(--sky-light); }
.section--deep { background: var(--paper-deep); }
.section--grass { background: var(--grass); color: #1f3520; }
.section--navy { background: var(--navy); color: #f5efe2; }

/* ---------- header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 2px solid var(--line);
  position: relative;
  z-index: 5;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand svg { width: 42px; height: 42px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.1;
}
.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  background: var(--paper-deep);
  color: var(--coral-deep);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
  padding: 15px 24px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 4px 0 var(--coral-deep);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  border: 0;
}
.btn:hover { color: #fff; transform: translateY(1px); box-shadow: 0 3px 0 var(--coral-deep); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--coral-deep); }
.btn--navy { background: var(--navy); box-shadow: 0 4px 0 var(--navy-deep); }
.btn--navy:hover { box-shadow: 0 3px 0 var(--navy-deep); }
.btn--paper {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 0 var(--line);
}
.btn--paper:hover { color: var(--coral-deep); box-shadow: 0 3px 0 var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--sky-light) 0%, var(--sky) 100%);
  position: relative;
  overflow: hidden;
  padding: 44px 0 20px;
}
.hero .wrap {
  display: grid;
  gap: 32px;
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; }
.hero h1 {
  color: var(--coral);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.85), 0 5px 14px rgba(59, 42, 30, 0.12);
}
.hero .lead { max-width: 34rem; }

.book {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: min(100%, 520px);
  transform: rotate(-2.5deg);
}
.book img { width: 100%; }
/* On phones the cover comes first; it's the hook. */
@media (max-width: 719px) {
  .hero .book { order: -1; transform: rotate(-1.5deg); width: min(100%, 420px); }
}
.book img {
  border-radius: 6px;
  border: 6px solid #fff;
  box-shadow: var(--shadow-book);
}
.book--flat { transform: none; }

/* Soft clouds behind the hero. */
.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  filter: blur(2px);
  z-index: 1;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 999px;
}
.cloud-1 { width: 220px; height: 60px; left: -40px; top: 38px; }
.cloud-1::before { width: 90px; height: 90px; left: 40px; top: -40px; }
.cloud-1::after { width: 120px; height: 100px; left: 100px; top: -46px; }
.cloud-2 { width: 260px; height: 64px; right: -60px; top: 120px; opacity: 0.9; }
.cloud-2::before { width: 110px; height: 110px; left: 50px; top: -50px; }
.cloud-2::after { width: 90px; height: 80px; left: 150px; top: -30px; }

/* Gumball decorations. */
.gum {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: inset -3px -3px 5px rgba(0, 0, 0, 0.10), inset 3px 3px 5px rgba(255, 255, 255, 0.6), 0 3px 6px rgba(59, 42, 30, 0.15);
}
.gum--pink { background: var(--gum-pink); }
.gum--yellow { background: var(--gum-yellow); }
.gum--lilac { background: var(--gum-lilac); }
.gum--mint { background: var(--gum-mint); }

/* ---------- wavy edges ---------- */
.wave { line-height: 0; display: block; }
.wave svg { display: block; width: 100%; height: 44px; }
.wave--grass path { fill: var(--grass); }
.wave--paper path { fill: var(--paper); }
.wave--sky path { fill: var(--sky-light); }
.wave--deep path { fill: var(--paper-deep); }
.band-grass { background: var(--grass); height: 26px; }
.on-sky { background: var(--sky); }
.on-sky-light { background: var(--sky-light); }
.on-grass { background: var(--grass); }
.on-paper { background: var(--paper); }
.on-deep { background: var(--paper-deep); }

/* ---------- layouts ---------- */
.two-col {
  display: grid;
  gap: 32px;
  align-items: center;
}
.two-col > figure { margin: 0; }
.two-col.flip > :first-child { order: 1; }

figure.print {
  margin: 0;
  background: #fff;
  padding: 10px 10px 14px;
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
  transform: rotate(1.2deg);
}
figure.print.left { transform: rotate(-1.4deg); }
figure.print img { border-radius: 2px; width: 100%; }
figure.print figcaption {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-align: center;
  padding-top: 10px;
}

/* Video embeds. */
.video {
  position: relative;
  background: var(--navy-deep);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-soft);
  border: 6px solid #fff;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-grid { display: grid; gap: 28px; }

/* Quote strip. */
.quote {
  text-align: center;
  padding: 48px 0;
}
.quote blockquote {
  margin: 0 auto;
  max-width: 44rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  line-height: 1.3;
  color: #1f3520;
}
.quote blockquote p { margin: 0; }
.quote blockquote p::before { content: "\201C"; color: rgba(255,255,255,0.8); }
.quote blockquote p::after { content: "\201D"; color: rgba(255,255,255,0.8); }
.quote cite {
  display: block;
  margin-top: 0.8em;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.05rem;
  color: #2e4a2f;
}

/* Lesson list with gumball markers. */
.lessons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.lessons li {
  position: relative;
  padding-left: 44px;
}
.lessons li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gum-pink);
  box-shadow: inset -3px -3px 5px rgba(0, 0, 0, 0.10), inset 3px 3px 5px rgba(255, 255, 255, 0.6), 0 3px 6px rgba(59, 42, 30, 0.15);
}
.lessons li:nth-child(2)::before { background: var(--gum-yellow); }
.lessons li:nth-child(3)::before { background: var(--gum-lilac); }
.lessons li:nth-child(4)::before { background: var(--gum-mint); }
.lessons li:nth-child(5)::before { background: var(--coral-light); }
.lessons strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  display: block;
}

/* Gallery: photo prints, slightly askew. */
.gallery {
  display: grid;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gallery figure.print { margin: 0; }
.gallery li:nth-child(odd) figure.print { transform: rotate(-1.2deg); }
.gallery li:nth-child(even) figure.print { transform: rotate(1.1deg); }

/* Placeholder for photos not supplied yet. Styled, not gray. */
.placeholder {
  background: repeating-linear-gradient(135deg, #fff 0 12px, var(--paper-deep) 12px 24px);
  border: 2px dashed var(--trunk);
  border-radius: 10px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--trunk-deep);
  font-family: var(--font-display);
  font-weight: 500;
  min-height: 220px;
}
.placeholder--portrait { aspect-ratio: 4 / 5; min-height: 0; }
.placeholder--square { aspect-ratio: 1; min-height: 0; }
.placeholder svg { width: 54px; height: 54px; margin-bottom: 8px; }

/* Details list. */
.details {
  display: grid;
  gap: 8px 20px;
  margin: 0;
  grid-template-columns: max-content 1fr;
}
.details dt {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
}
.details dd { margin: 0; }

/* Buy strip. */
.buy {
  background: var(--paper-deep);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  text-align: center;
}
.buy-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 1.2em 0 0.8em;
}
.buy-links a { min-width: 150px; text-align: center; }

/* Footer. */
.site-footer {
  background: var(--navy);
  color: #e8e0d0;
  padding: 40px 0 32px;
  font-size: 0.95rem;
}
.site-footer a { color: #fff; }
.site-footer .wrap {
  display: grid;
  gap: 18px;
}
.site-footer .foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; font-family: var(--font-display); }
.site-footer .foot-nav a { text-decoration: none; }
.site-footer .foot-nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0; }
.site-footer .heart { color: var(--gum-pink); }

/* Book text (back cover, dedication), set like a printed card. */
.book-card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 22px 26px 8px;
  margin: 0 0 1.4em;
  box-shadow: var(--shadow-soft);
  transform: rotate(-0.6deg);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.75;
}
.book-card em { font-style: normal; }
.book-card .book-card__label {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin-bottom: 0.5em;
}

/* A scripture line under a heading. */
.verse {
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 0 1.4em;
}
.verse cite {
  display: block;
  margin-top: 0.3em;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral-deep);
}

/* Little author card on the home page. */
.author-teaser {
  display: grid;
  gap: 24px;
  align-items: center;
}
.author-teaser .placeholder--portrait { width: min(100%, 300px); margin: 0 auto; }
/* No photo yet: one column. Drop this class when her photo goes in. */
.author-teaser.author-teaser--solo { grid-template-columns: 1fr; max-width: 760px; }

/* ---------- responsive ---------- */
@media (min-width: 720px) {
  .hero { padding: 64px 0 36px; }
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; gap: 40px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 48px; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .author-teaser { grid-template-columns: 300px 1fr; gap: 40px; }
  .section { padding: 72px 0; }
  .wave svg { height: 64px; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; }
}
@media (min-width: 1000px) {
  .gallery { grid-template-columns: 1fr 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
