/* Page sections, phone layout first, then tablet and desktop. */

/* Hero. Phones read eyebrow, title, lede, actions, then the picture, so the one
   action is on the first screen. `main > .hero` beats `main > .wrap`'s margin. */
.hero { display: grid; }
main > .hero { margin-top: 8px; }
.hero h1 { margin-bottom: .45em; }
.lede { font-size: 1.15rem; max-width: 34em; margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 6px 0 10px; }
/* RENDER SLOT R1-hero-book: the painted book still life replaces hero.svg here, edge
   to edge on --art-ground (no white padding); the point cut-out stays as it is. */
.hero-pic { position: relative; margin-top: 18px; }
.hero-art { padding: 8px; }
.hero-cub {
  position: absolute; z-index: 1; left: -10px; bottom: -24px;
  width: clamp(84px, 26%, 140px); height: auto;
}
.hero-pic .cub-shade { left: -4px; bottom: -30px; width: clamp(76px, 23%, 124px); }
.hero .fine { margin-top: 44px; }

/* How it works */
.step-list { display: grid; gap: 22px; margin-top: 20px; counter-reset: step; }
.step { background: var(--page); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px 20px; }
.step .art-frame { box-shadow: none; padding: 0; border-radius: 14px; margin: 0 auto 10px; max-width: 280px; }
/* Step 3: Bear Cub's own coloring-page twin beside the stones (a raster, so it sits
   outside the data-art figure that motion.js redraws). */
.step-pic { position: relative; max-width: 280px; margin: 0 auto; }
.step-cub { position: absolute; left: 6%; bottom: 8%; width: 30%; height: auto; }
.step h3 { display: flex; align-items: center; gap: 10px; }
.step p { margin: 0; color: var(--ink-soft); }
.step-no {
  flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--honey); border: 2px solid var(--ink);
  font: 800 1rem/1 var(--round);
}

/* A night. RENDER SLOT R2-night-read: the painted reading scene, with the approved
   listen pose composited at export, replaces night.svg edge to edge on --art-ground. */
.night { display: grid; gap: 24px; }
.night-art { max-width: 420px; }
.evening { display: grid; gap: 4px; margin: 18px 0 20px; }
.evening li { display: grid; grid-template-columns: 74px 1fr; gap: 14px; padding: 14px 0; border-bottom: 2px dashed var(--line); }
.evening li:last-child { border-bottom: 0; }
.evening h3 { font-size: 1.1rem; margin-bottom: .2em; }
.evening p { margin: 0; color: var(--ink-soft); }
.time {
  align-self: start; text-align: center; padding: 6px 4px; border-radius: 12px;
  background: var(--sage-soft); color: var(--sage-deep); font: 800 .95rem/1.2 var(--round);
}
.aside { background: var(--page); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); margin: 0; }

/* Sample book: real-book type and layout, picture above one sentence. */
.sample-grid { display: grid; gap: 20px; margin-top: 20px; }
/* The words page as it prints on the inside of the cover: small label, big bold words. */
.grown-up-sample { margin: 0; }
.grown-up-page {
  background: var(--page); border-radius: 10px; box-shadow: var(--shadow); padding: 18px 20px 22px;
  font-family: var(--book); color: var(--ink);
}
.grown-up-page p { margin: 0; }
.grown-up-page .print-label { font-size: .8rem; font-weight: 700; letter-spacing: .02em; margin-bottom: 14px; }
.word-label { font-size: .85rem; }
.grown-up-page .print-words { font-size: 1.9rem; font-weight: 700; line-height: 1.2; margin: 2px 0 12px; }
.grown-up-sample figcaption { font-size: .95rem; color: var(--ink-soft); margin-top: 10px; }
.book { overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 16px; scrollbar-width: thin; }
.pages { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px; }
.page {
  position: relative; scroll-snap-align: center; background: var(--page);
  border-radius: 10px; box-shadow: var(--shadow); padding: 12px 12px 34px;
}
.page .art-frame { box-shadow: none; padding: 4px; border: 2px solid var(--ink); border-radius: 4px; }
.book-text { font: 700 1.6rem/1.25 var(--book); margin: 14px 4px 0; letter-spacing: .01em; }
.name-slot {
  display: inline-block; padding: 0 6px; border: 2px dashed var(--sage);
  border-radius: 8px; background: var(--sage-soft); color: var(--sage-deep);
}
.page-no { position: absolute; right: 12px; bottom: 8px; font: 600 .85rem/1 var(--book); color: var(--ink-soft); }
.swipe-hint { text-align: right; color: var(--ink-soft); font-size: .95rem; margin: 4px 0 0; }

/* Promises */
.promise-list { display: grid; gap: 14px; margin-top: 18px; }
.promise-list li { background: var(--page); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.promise-list p { margin: 0; color: var(--ink-soft); }

/* Privacy and pricing lists use a drawn check. */
.check-list { display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 36px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .15em; width: 24px; height: 24px;
  border-radius: 50%; background: var(--sage-soft); border: 2px solid var(--sage);
}
.check-list li::after {
  content: ""; position: absolute; left: 8px; top: calc(.15em + 6px); width: 6px; height: 10px;
  border: solid var(--sage-deep); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.privacy { width: calc(100% - 16px); background: var(--sage-soft); border-radius: 28px; padding-top: 32px; padding-bottom: 32px; }
.privacy .check-list li::before { background: var(--page); }

.price-card { background: var(--page); border-radius: 28px; box-shadow: var(--shadow); padding: 26px 22px; border: 2px dashed var(--line); }
.plan-list { margin: 8px 0 18px; padding-left: 1.2em; list-style: disc; display: grid; gap: 8px; }
.price-card p:last-child { margin-bottom: 0; }
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--honey);
  border: 2px solid var(--ink); font: 800 .9rem/1 var(--round); margin-bottom: 14px;
}

/* FAQ uses native disclosure for keyboard and screen readers. */
.faq details { background: var(--page); border-radius: 16px; box-shadow: var(--shadow); margin-top: 12px; }
.faq summary {
  cursor: pointer; list-style: none; position: relative; min-height: 56px;
  padding: 16px 52px 16px 18px; font: 700 1.08rem/1.35 var(--round);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--sage-soft); color: var(--sage-deep); font: 800 1.2rem/1 var(--round);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 18px 18px; margin: 0; color: var(--ink-soft); }

/* Waitlist. Bear Cub: the approved master, its coloring-page twin and the wave,
   registered on one canvas and stacked. Without motion the master shows alone;
   after a sign-up the wave shows (data-state, set by waitlist.js), motion or not. */
.waitlist-card { position: relative; background: var(--page); border-radius: 28px; box-shadow: var(--shadow); padding: 24px 20px; display: grid; gap: 8px; }
.cub-art { position: absolute; top: 22px; right: 16px; width: 80px; aspect-ratio: 176 / 266; margin: 0; }
.cub-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cub-line, .cub-wave { opacity: 0; }
.waitlist-card[data-state=thanks] .cub-front { opacity: 0; }
.waitlist-card[data-state=thanks] .cub-wave { opacity: 1; }
.waitlist-body > h2, .waitlist-intro, .thanks { padding-right: 88px; }
/* The color-in: the painted master is uncovered left to right over its twin. */
.motion .cub-art:not([data-revealed]) { --reveal: -14%; }
.motion .cub-art:not([data-revealed]) .cub-line { opacity: 1; }
.motion .cub-front {
  -webkit-mask-image: linear-gradient(90deg, #000 var(--reveal, 200%), transparent calc(var(--reveal, 200%) + 12%));
  mask-image: linear-gradient(90deg, #000 var(--reveal, 200%), transparent calc(var(--reveal, 200%) + 12%));
}
.waitlist-form { display: grid; gap: 10px; margin-top: 12px; max-width: 520px; }
.waitlist-form label { font-weight: 700; }
.waitlist-form input[type=email] {
  min-height: 52px; padding: 12px 16px; font: inherit; color: var(--ink);
  border: 2px solid var(--ink-soft); border-radius: 14px; background: #fff;
}
.waitlist-form input[aria-invalid=true] { border-color: #a3341f; }
.consent { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; font-weight: 400 !important; font-size: .95rem; color: var(--ink-soft); padding: 6px 0; cursor: pointer; }
.consent input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--sage); }
.error { color: #a3341f; font-weight: 700; margin: 0; min-height: 1.4em; }
.waitlist-form .button { justify-self: start; }
.wl-privacy { margin: 4px 0 0; }
/* The trap field: off screen for people, still in the form for bots that fill every box. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.thanks h3 { font-size: 1.6rem; margin-top: 8px; }
.thanks h3:focus { outline: none; }

@media (min-width: 760px) {
  .step-list { grid-template-columns: repeat(3, 1fr); }
  .night { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: 48px; }
  .night-art { max-width: none; margin-top: 8px; }
  .sample-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; }
  .book { overflow: visible; margin: 0; padding: 0; }
  .pages { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; }
  .swipe-hint { display: none; }
  .promise-list { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .privacy { padding: 44px 48px; }
  .privacy .check-list { grid-template-columns: repeat(2, 1fr); gap: 16px 36px; }
  .price-card { padding: 36px 40px; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: center; }
  .plan-list { margin-top: 0; }
  .waitlist-card { grid-template-columns: 150px 1fr; padding: 40px; gap: 28px; align-items: start; }
  .cub-art { position: relative; top: auto; right: auto; width: 150px; }
  .waitlist-body > h2, .waitlist-intro, .thanks { padding-right: 0; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 44px; align-content: center; }
  main > .hero { margin-top: 28px; }
  .hero > * { grid-column: 1; }
  .hero > .hero-pic { grid-column: 2; grid-row: 1 / span 6; align-self: center; margin: 0 0 24px; }
  .hero .fine { margin-top: 0; }
}
