/* ---------- Tokens ---------- */
/* Palette pulled from the book cover: mint wall, teal title lettering,
   chocolate "Poo" lettering, chalkboard green, potty-yellow accents. */
:root {
  --mint: #bfe5dc;
  --mint-soft: #e6f5f1;
  --cream: #fffaf2;
  --teal: #1aa9ae;
  --teal-deep: #0b6d72;
  --brown: #5a2d12;
  --brown-mid: #7a3f1c;
  --chalk: #1f6b4e;
  --yellow: #ffd34d;
  --sky: #8fd0f2;
  --red: #e2483d;

  --ink-900: #2a1a10;
  --ink-700: #4a3a30;
  --ink-500: #6e6058;
  --line: #e4ddd2;
  --bg: var(--cream);

  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --wrap: 1120px;
  --shadow-pop: 0 6px 0 rgba(90, 45, 18, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--brown);
}
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; color: var(--ink-700); }
a { color: var(--teal-deep); }
a:hover { color: var(--brown-mid); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--brown); color: #fff; padding: 12px 20px; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 3px; border-radius: 4px; }

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

.section-sub { font-size: 1.1rem; max-width: 60ch; margin-bottom: 32px; }
.opt { font-weight: 400; color: var(--ink-500); font-size: 0.9em; }
.fine { font-size: 0.9rem; color: var(--ink-500); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; }
.wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  color: var(--teal-deep); text-decoration: none; white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 22px; font-weight: 700; font-size: 0.98rem; }
.site-nav a { text-decoration: none; color: var(--ink-700); }
.site-nav a:hover { color: var(--brown); }
.site-nav .nav-cta {
  background: var(--brown); color: #fff; padding: 8px 16px; border-radius: 999px;
}
.site-nav .nav-cta:hover { background: var(--brown-mid); color: #fff; }

@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .wordmark { font-size: 1.15rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  text-decoration: none; text-align: center;
  padding: 14px 28px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(2px); }
.btn-primary { background: var(--brown); color: #fff; box-shadow: var(--shadow-pop); }
.btn-primary:hover { background: var(--brown-mid); color: #fff; }
.btn-primary[disabled] { opacity: 0.6; cursor: wait; }
.btn-ghost { background: #fff; color: var(--brown); border-color: var(--brown); }
.btn-ghost:hover { background: var(--mint-soft); color: var(--brown); }
.btn-secondary { background: var(--teal-deep); color: #fff; box-shadow: 0 5px 0 rgba(11, 109, 114, 0.25); }
.btn-secondary:hover { background: #095a5e; color: #fff; }
.btn-big { width: 100%; padding: 18px 28px; font-size: 1.2rem; }

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

/* ---------- Hero ---------- */
.hero {
  background: var(--mint);
  padding: 56px 0 72px;
  overflow: hidden;
}
.hero-inner { display: flex; align-items: center; gap: 56px; flex-wrap: wrap; }
.hero-copy { flex: 1 1 440px; }
.hero-media { flex: 1 1 380px; max-width: 500px; margin: 0 auto; }
.hero-media img {
  border-radius: 10px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.05), 18px 22px 0 rgba(11, 109, 114, 0.22);
  transform: rotate(2deg);
}
.eyebrow {
  display: inline-block; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--chalk); background: rgba(255,255,255,0.65); padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); color: var(--brown); }
.h1-name { display: block; color: var(--teal-deep); font-weight: 700; }
.hero-sub { font-size: 1.2rem; color: var(--ink-900); max-width: 44ch; }
.byline { font-weight: 700; color: var(--ink-700); }
.hero-actions { display: flex; gap: 14px; margin: 26px 0 14px; flex-wrap: wrap; }
.hero-note { font-size: 0.95rem; color: var(--ink-700); margin: 0; }

/* ---------- The book ---------- */
.book { background: var(--cream); }
.lede p { font-size: 1.2rem; max-width: 62ch; color: var(--ink-900); }
.audience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin: 36px 0; }
.audience-card { border-radius: var(--radius); padding: 28px 30px; border: 2px solid var(--brown); box-shadow: var(--shadow-pop); }
.card-child { background: #fff4c7; }
.card-grownup { background: var(--mint-soft); }
.audience-card ul { margin: 0; padding: 0; list-style: none; }
.audience-card li { position: relative; padding-left: 34px; margin-bottom: 12px; font-weight: 600; color: var(--ink-900); }
.audience-card li::before {
  content: ""; position: absolute; left: 0; top: 0.2em; width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.card-child li::before { background-color: var(--brown-mid); }
.promise {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; color: var(--brown);
  text-align: center; max-width: 40ch; margin: 0 auto;
}

/* ---------- Peek inside ---------- */
.inside { background: var(--sky); background: linear-gradient(180deg, #d9f0fb 0%, #c4e6f7 100%); }
.spreads { display: grid; gap: 36px; }
.spread { margin: 0; }
.spread img { border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(20, 60, 90, 0.18); background: #fff; }
.spread figcaption { margin-top: 12px; font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; color: var(--brown); text-align: center; }
@media (min-width: 900px) {
  .spreads { grid-template-columns: 1fr 1fr; }
}

/* ---------- Buy ---------- */
.buy { background: var(--mint-soft); }
.order-form { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 960px) { .order-form { grid-template-columns: 1fr 340px; align-items: start; } }
.product-grid { display: grid; gap: 22px; }
.product { background: #fff; border-radius: var(--radius); padding: 26px 28px; border: 2px solid var(--line); }
.product-signed { border-color: var(--teal); }
.product-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.product-head h3 { margin: 0; }
.price { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--teal-deep); margin: 0; }
.product-sub { margin: 4px 0 16px; }

.qty { display: flex; align-items: center; gap: 16px; }
.qty > label { font-weight: 700; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--brown); border-radius: 999px; overflow: hidden; }
.stepper input {
  width: 3.2em; text-align: center; border: 0; font: inherit; font-weight: 800; font-size: 1.15rem;
  color: var(--ink-900); background: #fff; padding: 8px 0; -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step {
  width: 44px; height: 44px; border: 0; background: var(--mint); color: var(--brown);
  font-size: 1.4rem; font-weight: 800; cursor: pointer; line-height: 1;
}
.step:hover { background: var(--teal); color: #fff; }

.signings { margin-top: 18px; display: grid; gap: 14px; }
.signings.is-empty { display: none; }
.signing { border: 2px dashed var(--teal); border-radius: var(--radius-sm); padding: 14px 18px 4px; margin: 0; background: var(--mint-soft); }
.signing legend { font-family: var(--font-display); font-weight: 600; color: var(--teal-deep); padding: 0 6px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 5px; color: var(--ink-900); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink-900);
  padding: 11px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(26, 169, 174, 0.25); }
.js .field-custom.is-hidden { display: none; }

.summary { background: #fff; border-radius: var(--radius); padding: 26px 28px; border: 2px solid var(--brown); box-shadow: var(--shadow-pop); position: sticky; top: 88px; }
.summary dl { margin: 0 0 20px; }
.summary dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary dt { font-weight: 600; }
.summary dd { margin: 0; font-weight: 700; }
.summary .sum-total { border-bottom: 0; font-size: 1.3rem; }
.summary .sum-total dt, .summary .sum-total dd { font-family: var(--font-display); color: var(--brown); }
.form-msg { color: var(--red); font-weight: 700; margin: 12px 0 0; min-height: 0; }
.form-msg:empty { display: none; }
.summary .fine { margin: 14px 0 0; }

/* ---------- Wholesale ---------- */
.wholesale { background: var(--cream); }
.wholesale-inner { display: grid; gap: 40px; }
@media (min-width: 900px) { .wholesale-inner { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.price-line { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; color: var(--teal-deep); margin-bottom: 10px; }
.wholesale-form { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.hidden-field { position: absolute; left: -9999px; }

/* ---------- Contact ---------- */
.contact { background: #fff; border-top: 2px solid var(--line); }
.contact .wholesale-form { background: var(--cream); }

/* ---------- Author ---------- */
.author { background: var(--mint); }
.author-inner { max-width: 760px; }
.contact-line { font-weight: 700; margin-top: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brown); color: #f3e6da; padding: 32px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; font-size: 0.95rem; }
.wordmark-footer { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: #fff; }
.site-footer a { color: #fff; }

/* ---------- Simple pages (thanks / order complete) ---------- */
.simple-page { min-height: 70vh; display: flex; align-items: center; background: var(--mint); }
.simple-page .wrap { max-width: 640px; text-align: center; }
.simple-page img { width: 140px; margin: 0 auto 20px; border-radius: 50%; border: 4px solid #fff; }

@media (max-width: 860px) {
  .hero { padding-top: 36px; }
  .hero-inner { gap: 32px; }
  .hero-media { order: -1; max-width: 340px; }
}

@media (max-width: 560px) {
  section { padding: 56px 0; }
  .wrap { padding: 0 16px; }
  .header-inner { padding: 10px 16px; }
  .product, .summary, .wholesale-form { padding: 22px 18px; }
  .hero-media img { transform: none; box-shadow: 10px 12px 0 rgba(11, 109, 114, 0.22); }
}
