/* ============================================================
   Coloring book store — stylesheet
   ------------------------------------------------------------
   Audience is a parent, not a child. The books are for kids; the
   purchase decision is an adult's, usually on a phone, usually in
   under two minutes. So the palette is warm and calm rather than
   primary-colour loud, the type is large, and there is exactly one
   action on the page.

   Hand-written rather than generated — this is six pages, and a
   build pipeline for six pages is the kind of thing that outlives
   its usefulness immediately.
   ============================================================ */

:root {
  /* Warm, parent-facing. Terracotta carries the actions, sage the
     supporting marks, sand the surfaces. */
  --cream: #fdf8f3;
  --sand: #f6ece1;
  --ink: #2f2a26;
  --ink-soft: #6b625a;
  --terracotta: #d4674a;
  --terracotta-dark: #b9553a;
  --sage: #7fa891;
  --sun: #f0c070;
  --line: #e8dbcc;
  --white: #ffffff;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --max: 1120px;
  --narrow: 680px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 2px 4px rgba(47, 42, 38, 0.04), 0 12px 32px rgba(47, 42, 38, 0.07);
  --shadow-lift: 0 4px 8px rgba(47, 42, 38, 0.06), 0 20px 48px rgba(47, 42, 38, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracotta-dark); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--narrow); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--cream); padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

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

/* ── Header ───────────────────────────────────────────────── */
.site-header { padding: 20px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 1.25rem; font-weight: 600;
  color: var(--ink); text-decoration: none;
}
.wordmark svg { flex: none; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 32px; border: none; border-radius: 999px;
  background: var(--terracotta); color: var(--white);
  font-family: var(--body); font-size: 1.05rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.btn:hover { background: var(--terracotta-dark); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.65; cursor: progress; transform: none; }
.btn--ghost {
  background: transparent; color: var(--ink);
  border: 2px solid var(--line); box-shadow: none; font-weight: 600;
}
.btn--ghost:hover { background: var(--sand); border-color: var(--sage); transform: none; box-shadow: none; }
.btn-note { margin: 12px 0 0; font-size: 0.9rem; color: var(--ink-soft); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero { padding: 32px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; } }

.eyebrow {
  display: inline-block; margin-bottom: 18px; padding: 7px 16px;
  background: var(--sand); border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--terracotta-dark);
}
.hero-deck { font-size: 1.2rem; color: var(--ink-soft); max-width: 36ch; }
.hero-price { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 20px; }
.hero-price-amount { font-family: var(--display); font-size: 2.4rem; font-weight: 600; }
.hero-price-note { color: var(--ink-soft); font-size: 0.95rem; }

/* The cover sits on a tinted card so a white page scan still reads
   as an object rather than bleeding into the background. */
.cover-frame {
  position: relative; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(150deg, var(--sand), #fbe6d4);
}
.cover-frame img, .cover-frame svg {
  width: 100%; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift);
  transform: rotate(-1.5deg);
}
.cover-badge {
  position: absolute; right: 6px; bottom: 10px;
  background: var(--sun); color: var(--ink);
  padding: 10px 18px; border-radius: 999px;
  font-weight: 800; font-size: 0.85rem; letter-spacing: 0.03em;
  box-shadow: var(--shadow); transform: rotate(4deg);
}

/* ── Trust strip ──────────────────────────────────────────── */
.trust { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; }
/* Column counts are set at explicit breakpoints rather than left to
   auto-fit.

   auto-fit packs in however many columns of the minimum width will fit,
   which for the four-item rows here resolves to three somewhere around
   tablet width and leaves the fourth item sitting alone on a line below
   the other three. The counts below only ever divide their rows evenly:
   four-item grids go 2 then 4 and never pass through 3, the three-step
   row goes 1 then 3 and never through 2. */
.trust-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 28px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 1000px) { .trust-list { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 0.97rem; }
.trust-item svg { flex: none; color: var(--sage); }

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section--sand { background: var(--sand); }
.section-head { max-width: 46ch; margin-bottom: 44px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.card-icon {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 18px;
  display: grid; place-items: center; background: var(--sand); color: var(--terracotta-dark);
}

/* ── Sample pages ─────────────────────────────────────────── */
.samples { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (min-width: 1000px) { .samples { grid-template-columns: repeat(4, 1fr); } }
.sample {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.sample:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.sample-caption { padding: 12px 16px; font-size: 0.9rem; color: var(--ink-soft); border-top: 1px solid var(--line); }

/* ── Steps ────────────────────────────────────────────────── */
.steps { counter-reset: step; display: grid; grid-template-columns: 1fr; gap: 28px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: 58px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--terracotta); color: var(--white);
  display: grid; place-items: center;
  font-family: var(--display); font-size: 1.3rem; font-weight: 600;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: 1.08rem;
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-family: var(--display); font-size: 1.6rem; line-height: 1;
  color: var(--terracotta); flex: none; transition: transform 200ms var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 14px 0 0; color: var(--ink-soft); }

/* ── Final call to action ─────────────────────────────────── */
.cta { background: var(--ink); color: var(--cream); padding: 76px 0; text-align: center; }
.cta h2 { color: var(--white); }
.cta p { color: #cfc5ba; max-width: 46ch; margin-left: auto; margin-right: auto; }
.cta .btn { margin-top: 10px; }
.cta .btn-note { color: #a89c90; }

/* ── Prose pages (policies, thank-you) ────────────────────── */
.prose { padding: 56px 0 80px; }
.prose h2 { margin-top: 2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.callout {
  background: var(--sand); border-left: 4px solid var(--terracotta);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px; margin: 28px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { background: var(--sand); border-top: 1px solid var(--line); padding: 48px 0 36px; font-size: 0.95rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--terracotta-dark); text-decoration: underline; }
.footer-legal { margin: 28px 0 0; color: var(--ink-soft); font-size: 0.86rem; }

/* ── Checkout feedback ────────────────────────────────────── */
.notice {
  margin: 0 0 24px; padding: 14px 20px; border-radius: var(--radius-sm);
  background: #fdecea; border: 1px solid #f3c6c0; color: #8c2f20; font-size: 0.95rem;
}
.notice[hidden] { display: none; }

/* The hidden attribute loses to any author display rule of equal
   specificity — .btn{display:inline-flex} silently beat [hidden] and
   left a dead download button on screen during an error state. */
[hidden] { display: none !important; }

/* Pine carries the brand mark and the dark sections; terracotta stays
   on the buttons, where a warm high-contrast CTA converts best. */
:root { --pine: #1f4d43; }
.wordmark { letter-spacing: -0.01em; }
.cta { background: var(--pine); }
.step::before { background: var(--pine); }

/* The refund disclosure sits on the dark CTA. At #a89c90 it measured
   ~3.5:1 against pine — under the 4.5:1 minimum, and an unreadable
   "all sales are final" is worse than useless since the whole point
   is that the buyer saw it. Lifted to ~5.5:1. */
.cta .btn-note { color: #d8d0c6; }

/* Primary CTA contrast. The original terracotta gave white text only
   3.60:1 — fine for large text, but the button sits at 16.8px bold,
   just under the 18.66px threshold where 3:1 would apply. Deepened
   to 4.75:1 so the most important element on a paid landing page is
   legible on a phone in daylight. Hover goes darker still. */
:root { --terracotta: #b9553a; --terracotta-dark: #9e4228; }

/* ── Benefits + lifestyle ─────────────────────────────────────── */
.benefits { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 680px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
.benefit { padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.benefit-kicker {
  display: inline-block; margin-bottom: 10px; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--terracotta-dark);
}
.benefit h3 { font-size: 1.12rem; margin-bottom: 8px; }
.benefit p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* align-items:start stops a short card being stretched to the height
   of a tall neighbour, which left a band of white below the image
   inside the card border. Cropping to a fixed ratio would even the
   rows up too, but these are photographs of faces and a centre crop
   takes the top off a head. */
.life-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 640px) { .life-grid { grid-template-columns: 1fr; } }
.life-shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.life-shot img, .life-shot svg { width: 100%; display: block; }

/* The four photographs arrive at whatever shape the camera gave them —
   one is 2:1, one is portrait — and dropped into a two-up grid at their
   natural heights the result is ragged, with white bands inside the
   short cards where the row stretched them. A single ratio fixes that.
   Anchored to the top rather than the centre because the subject of
   every one of these is a child's face in the upper half; a centre crop
   on the portrait takes the head off. */
.life-shot img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center top; }
.life-shot--placeholder { border-style: dashed; }

/* The cover is full-colour artwork, not a white page, so it does not
   need the tinted card and tilt that stopped a white scan bleeding
   into the background. */
.cover-frame:has(img[alt^="The cover"]) { background: none; padding: 0; }
.cover-frame img[alt^="The cover"] { transform: none; }

/* ── Reviews ──────────────────────────────────────────────────
   Two columns above phone width and never three, for the same
   reason as the grids above: six cards in a three-up row is fine,
   five is not, and the list length is whatever real customers
   happen to have written. */
.reviews { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 680px) { .reviews { grid-template-columns: repeat(2, 1fr); } }

.review {
  margin: 0; padding: 26px 28px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.review blockquote {
  margin: 0; font-size: 1.05rem; line-height: 1.6; color: var(--ink);
}
.review blockquote::before { content: '\201C'; }
.review blockquote::after  { content: '\201D'; }
.review-stars { margin: 0 0 12px; color: var(--sun); line-height: 1; display: flex; gap: 2px; }
.review figcaption {
  margin-top: 16px; font-size: 0.92rem; font-weight: 700; color: var(--ink);
}
.review figcaption span { font-weight: 400; color: var(--ink-soft); }
