/* Shared by index.html and covering-free.html. Familiar patterns on purpose (Jacob's Law):
   app bar like a Facebook page, "choose your book" box like Amazon, sticky "Buy now" bar,
   "Look inside" like Amazon, comment bubbles like Facebook. Colours are literal so both pages match. */

/* ---------- Buy box (like an Amazon "choose your format" box) ---------- */
.buybox{
  width:100%; max-width:440px; margin:0 auto; text-align:left;
  background:#fff; color:#211a2c; border:1px solid #e3d8c2; border-radius:16px;
  padding:18px 16px 16px; box-shadow:0 8px 28px rgba(36,27,46,.14);
  font-family:'Segoe UI',system-ui,-apple-system,Roboto,sans-serif;
}
.bb-head{ font-weight:800; font-size:1.05rem; margin:0 0 10px; color:#211a2c; }
.bb-opts{ display:flex; flex-direction:column; gap:10px; }
.bb-opt{
  display:flex; align-items:center; gap:12px; width:100%; min-height:68px; padding:12px 14px;
  background:#faf5ea; border:2px solid #d9ccb2; border-radius:12px; cursor:pointer; text-align:left;
  font:inherit; color:inherit; -webkit-tap-highlight-color:transparent;
}
.bb-opt[aria-checked="true"]{ border-color:#7c2436; background:#fff6f4; box-shadow:0 0 0 1px #7c2436 inset; }
.bb-dot{ flex:none; width:22px; height:22px; border-radius:50%; border:2px solid #8a7e6c; background:#fff; position:relative; }
.bb-opt[aria-checked="true"] .bb-dot{ border-color:#7c2436; }
.bb-opt[aria-checked="true"] .bb-dot::after{ content:""; position:absolute; inset:3px; border-radius:50%; background:#7c2436; }
.bb-txt{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.bb-txt b{ font-size:1.05rem; line-height:1.25; }
.bb-txt small{ font-size:.85rem; color:#4a3f57; line-height:1.3; }
.bb-txt small.bb-save{ color:#2f7a45; font-weight:700; }
.bb-pr{ flex:none; text-align:right; font-weight:800; font-size:1.2rem; color:#7c2436; line-height:1.1; }
.bb-pr s{ display:block; font-size:.8rem; font-weight:500; color:#6b6075; }
.bb-buy{
  display:flex; align-items:center; justify-content:center; width:100%; min-height:58px; margin-top:14px; padding:14px 18px;
  background:#c9a24b; color:#1a1226; font-weight:800; font-size:1.15rem; text-decoration:none; border-radius:999px;
  box-shadow:0 8px 20px rgba(124,36,54,.2);
}
.bb-buy:active{ transform:translateY(1px); }
.bb-trust{ list-style:none; margin:14px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; font-size:.95rem; color:#352b42; }
.bb-trust li{ display:flex; align-items:center; gap:8px; }
.bb-trust li::before{ content:"\2713"; color:#2f7a45; font-weight:900; }
.bb-sold{ margin:12px 0 0; font-size:.85rem; color:#5a4f68; line-height:1.4; }
.buybox .payment-icons{ display:flex; justify-content:flex-start; gap:8px; margin-top:12px; }
.buybox .payment-icons svg{ border-radius:4px; box-shadow:0 1px 3px rgba(36,27,46,.2); }

/* ---------- Look inside (like Amazon) ---------- */
.look-inside{
  display:inline-flex; align-items:center; justify-content:center; gap:8px; margin-top:6px; min-height:48px; padding:10px 20px;
  background:rgba(250,245,234,.95); color:#1a1226; font-family:'Segoe UI',system-ui,-apple-system,Roboto,sans-serif;
  font-weight:700; font-size:1rem; text-decoration:none; border-radius:999px; border:1px solid #c9a24b;
}
.look-inside svg{ width:18px; height:18px; flex:none; }

/* ---------- Sticky buy bar (like Amazon / Shopify on a phone) ---------- */
.bb-sticky{
  position:fixed; left:0; right:0; bottom:0; z-index:60;
  display:flex; align-items:center; gap:12px; padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  background:#fff; border-top:1px solid #e3d8c2; box-shadow:0 -6px 22px rgba(36,27,46,.16);
  transform:translateY(110%); transition:transform .25s ease; visibility:hidden;
  font-family:'Segoe UI',system-ui,-apple-system,Roboto,sans-serif;
}
.bb-sticky.show{ transform:none; visibility:visible; }
.bb-sticky .bs-info{ flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.2; }
.bb-sticky .bs-info b{ font-size:.98rem; color:#211a2c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bb-sticky .bs-info span{ font-size:1.15rem; font-weight:800; color:#7c2436; }
.bb-sticky .bs-btn{
  flex:none; display:inline-flex; align-items:center; justify-content:center; min-height:50px; padding:12px 22px;
  background:#c9a24b; color:#1a1226; font-weight:800; font-size:1.05rem; text-decoration:none; border-radius:999px;
}
body.has-sticky{ padding-bottom:78px; }

@media (min-width:700px){
  .bb-sticky{ display:none; }
  body.has-sticky{ padding-bottom:0; }
}

/* ---------- "Best Deal" badge on the bundle option ---------- */
.bb-opts{ padding-top:8px; }
.bb-opt{ position:relative; }
.bb-badge{
  position:absolute; top:-11px; right:14px; z-index:1;
  background:#7c2436; color:#fff; font-weight:800; font-size:.74rem; letter-spacing:.06em; text-transform:uppercase;
  padding:4px 11px; border-radius:999px; box-shadow:0 3px 8px rgba(124,36,54,.35); line-height:1.2;
}

/* ---------- Covers follow the selected book (homepage hero + free-page close card) ---------- */
.hero-covers{ width:clamp(220px, 62vw, 270px); height:calc(clamp(220px, 62vw, 270px) * .75); align-items:center; }
/* tighter hero so the price and Buy now button sit inside the first screen */
.hero-photo-zone{ padding:18px 20px 22px; }
.hero-photo-zone .hero-trust-line{ margin-bottom:10px; }
.hero-photo-zone .hero-sub{ margin-bottom:.8em; }
html[data-book="son"] .hero-covers img:nth-child(2),
html[data-book="daughter"] .hero-covers img:nth-child(1){ display:none; }
html[data-book="son"] .hero-covers img,
html[data-book="daughter"] .hero-covers img{ width:auto; height:100%; }
.next-covers{ min-height:180px; align-items:center; }

/* ---------- Nudge toward the bundle (honest persuasion: default choice, badge, per-book price, "just $10 more") ---------- */
.bb-opt[data-key="bundle"][aria-checked="false"]{ border-color:#c9a24b; background:#fffaf0; }
.bb-opt[data-key="bundle"] .bb-txt b{ font-size:1.12rem; }
.bb-opt[data-key="bundle"][aria-checked="true"]{ box-shadow:0 0 0 1px #7c2436 inset, 0 6px 16px rgba(124,36,54,.16); }
.bb-upsell{ margin-top:12px; padding:12px 14px; background:#fff6dc; border:1.5px dashed #c9a24b; border-radius:12px; }
.bb-upsell[hidden]{ display:none; }
.bb-up-text{ margin:0 0 10px; font-size:.98rem; line-height:1.4; color:#352b42; }
.bb-up-text b{ color:#7c2436; }
.bb-up-btn{
  width:100%; min-height:48px; font:inherit; font-weight:800; font-size:1rem; color:#7c2436; background:#fff;
  border:2px solid #7c2436; border-radius:999px; cursor:pointer;
}
.bb-up-btn:active{ transform:translateY(1px); }

/* ---------- Cover preview inside a buy box (shows the chosen book wherever she picks it) ---------- */
.bb-preview{ display:flex; justify-content:center; align-items:center; gap:12px; height:228px; margin:0 0 6px; --fcw:146px; }
.fc-hint{ margin:0 0 14px; text-align:center; font-size:.85rem; color:#5a4f68; line-height:1.3; }

/* ---------- Flip cards: tap a cover, see what is inside (simple, one tap, no libraries) ---------- */
.fc{ flex:none; width:var(--fcw,110px); padding:0; border:0; background:none; cursor:pointer; perspective:800px; container-type:inline-size; -webkit-tap-highlight-color:transparent; font:inherit; }
.fc-in{ position:relative; display:block; width:100%; aspect-ratio:2/3; transition:transform .55s cubic-bezier(.3,.7,.2,1); transform-style:preserve-3d; }
.fc.flipped .fc-in{ transform:rotateY(180deg); }
.fc-face{ position:absolute; inset:0; display:block; border-radius:3px; overflow:hidden; backface-visibility:hidden; -webkit-backface-visibility:hidden; }
.fc-front img{ width:100%; height:100%; box-shadow:0 8px 18px rgba(36,27,46,.35); border-radius:3px; }
.fc-back{
  transform:rotateY(180deg); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3.5cqw; text-align:center;
  background:#faf5ea; color:#211a2c; border:1.5px solid #c9a24b; box-shadow:0 8px 18px rgba(36,27,46,.35); padding:6cqw;
  font-family:Georgia,'Iowan Old Style','Palatino Linotype',serif;
}
.fc-back .fc-t{ font-family:'Segoe UI',system-ui,sans-serif; font-size:9px; font-size:7.2cqw; letter-spacing:.14em; text-transform:uppercase; color:#8a5f1a; font-weight:700; margin-bottom:2cqw; }
.fc-back b{ font-size:17px; font-size:15cqw; line-height:1.15; color:#7c2436; }
.fc-back small{ font-family:'Segoe UI',system-ui,sans-serif; font-size:10px; font-size:8.5cqw; color:#4a3f57; margin-top:2cqw; }
html[data-book="son"] .fc[data-book="daughter"],
html[data-book="daughter"] .fc[data-book="son"]{ display:none; }
.next-covers .fc{ --fcw:120px; }
.fc-hint-dk{ color:rgba(244,236,220,.75); margin:-4px 0 14px; }
.next-covers .fc .fc-front img{ box-shadow:0 10px 22px rgba(0,0,0,.45); }

/* ---------- Look inside: swipe through real pages ---------- */
.inside-lede{ text-align:center; color:#4a3f57; font-size:1rem; margin:0 auto 16px; max-width:480px; }
.pageslider{
  --pw:min(86vw, 340px); position:relative; display:flex; gap:16px; overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;
  padding:6px calc((100% - var(--pw)) / 2) 14px; scrollbar-width:thin; overscroll-behavior-x:contain;
}
.ps-page{ flex:0 0 var(--pw); margin:0; scroll-snap-align:center; }
.ps-page img{ width:100%; height:auto; aspect-ratio:2/3; background:#fff; border-radius:3px; box-shadow:0 10px 26px rgba(36,27,46,.22), 0 0 0 1px rgba(36,27,46,.06); }
.ps-page figcaption{ margin-top:10px; text-align:center; font-size:.9rem; font-weight:700; color:#352b42; }
.ps-dots{ display:flex; justify-content:center; gap:8px; margin:2px 0 14px; }
.ps-dot{ width:8px; height:8px; border-radius:50%; background:#cdbf9f; transition:background .2s, transform .2s; }
.ps-dot.on{ background:#7c2436; transform:scale(1.25); }
.ps-more{
  display:flex; align-items:center; justify-content:center; width:fit-content; margin:0 auto; min-height:48px; padding:10px 22px;
  border:2px solid #7c2436; border-radius:999px; color:#7c2436; font-weight:800; text-decoration:none; font-size:1rem;
}

/* ---------- Gentle reveal + marker highlight (only when JS and IntersectionObserver exist; html gets .js-rv in the head) ---------- */
.js-rv [data-reveal]{ opacity:0; transform:translateY(14px); transition:opacity .6s ease, transform .6s cubic-bezier(.3,.7,.2,1); transition-delay:calc(var(--i, 0) * 140ms); }
.js-rv [data-reveal].rv-in{ opacity:1; transform:none; }
.hl{ background:linear-gradient(transparent 55%, rgba(227,200,120,.85) 55%) no-repeat 0 0 / 100% 100%; -webkit-box-decoration-break:clone; box-decoration-break:clone; }
.hl.hl-dk{ background-image:linear-gradient(transparent 58%, rgba(201,162,75,.6) 58%); }
.js-rv .hl{ background-size:0% 100%; transition:background-size 1s cubic-bezier(.3,.7,.2,1) .35s; }
.js-rv .hl.rv-in{ background-size:100% 100%; }
@media (prefers-reduced-motion: reduce){
  .js-rv [data-reveal]{ opacity:1; transform:none; transition:none; }
  .js-rv .hl{ background-size:100% 100%; transition:none; }
  .fc-in{ transition:none; }
}

/* ---------- Price + Buy now strip in the hero (follows the selected book) ---------- */
.buystrip{
  display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; max-width:340px; margin-top:14px;
  padding:10px 10px 10px 16px; background:rgba(250,245,234,.97); border-radius:16px; box-shadow:0 10px 26px rgba(0,0,0,.35);
  font-family:'Segoe UI',system-ui,-apple-system,Roboto,sans-serif; text-align:left;
}
.buystrip .bs-left{ display:flex; flex-direction:column; line-height:1.2; min-width:0; }
.buystrip .bs-left b{ font-size:.92rem; color:#211a2c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.buystrip .bs-left span{ font-size:1.35rem; font-weight:800; color:#7c2436; }
.buystrip .bs-left s{ font-size:.85rem; font-weight:500; color:#6b6075; }
.buystrip .bs-go{
  flex:none; display:inline-flex; align-items:center; justify-content:center; min-height:50px; padding:0 22px;
  background:#c9a24b; color:#1a1226; font-weight:800; font-size:1.05rem; text-decoration:none; border-radius:999px;
}
.hero-photo-zone .look-inside{ min-height:40px; padding:6px 16px; margin-top:10px; font-size:.92rem; background:transparent; color:#f4ecdc; border-color:rgba(227,200,120,.55); }

/* ---------- Buy prompt at the end of each free sample page ---------- */
.sample-cta{ margin:18px 0 0; padding:14px 16px 16px; background:#fff6dc; border:1.5px dashed #c9a24b; border-radius:12px; text-align:center; font-family:'Segoe UI',system-ui,-apple-system,Roboto,sans-serif; }
.sample-cta p{ margin:0 0 12px; font-size:1rem; line-height:1.45; color:#352b42; }
.sample-btn{
  display:inline-flex; align-items:center; justify-content:center; min-height:50px; padding:0 22px; background:#7c2436; color:#faf5ea;
  font-weight:800; font-size:1rem; text-decoration:none; border-radius:999px;
}

/* ---------- Order bump (tick-box cross-sell) ---------- */
.bb-bump{ display:flex; gap:12px; align-items:flex-start; margin-top:12px; padding:12px; background:#fffbe9; border:2px dashed #c9a24b; border-radius:12px; cursor:pointer; }
.bb-bump input{ flex:none; width:26px; height:26px; margin:2px 0 0; accent-color:#7c2436; cursor:pointer; }
.bb-bump-t{ font-size:.98rem; line-height:1.4; color:#352b42; }
.bb-bump-t b{ color:#7c2436; }
.bb-bump-t small{ display:block; margin-top:2px; font-size:.86rem; color:#4a3f57; }
.bb-bump[hidden]{ display:none; }
/* ---------- Checkout redesign (44px+ targets, 8px+ gaps, 4.5:1 text, visible focus, 180ms transitions) ---------- */
.bb-head{ font-size:1.15rem; margin-bottom:4px; }
.bb-head::after{ content:"Tap one. You can change it before you pay."; display:block; margin-top:2px; font-weight:500; font-size:.88rem; color:#5a4f68; }
.bb-opts{ gap:10px; padding-top:14px; }
.bb-opt{ min-height:76px; padding:12px 14px; gap:12px; transition:border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.bb-opt:hover{ border-color:#b98f98; }
.bb-opt:focus-visible, .bb-bump:focus-within, .bb-buy:focus-visible, .bb-up-btn:focus-visible{ outline:3px solid #7c2436; outline-offset:3px; }
.bb-dot{ width:24px; height:24px; transition:border-color .18s ease; }
.bb-dot::after{ transition:transform .18s ease; }
.bb-th{ flex:none; display:flex; align-items:center; }
.bb-th img{ width:30px; height:auto; border-radius:2px; box-shadow:0 2px 6px rgba(36,27,46,.35); }
.bb-th2 img + img{ margin-left:-12px; }
.bb-txt b{ font-size:1.05rem; }
.bb-txt small{ font-size:.88rem; color:#4a3f57; }
.bb-pr{ font-size:1.3rem; }
.bb-bump{ margin-top:14px; align-items:center; border-style:solid; border-width:1.5px; background:#fffbe9; min-height:64px; transition:border-color .18s ease; }
.bb-bump input{ width:28px; height:28px; margin:0; }
.bb-bump-t b{ font-size:1rem; }
.bb-sum{ display:grid; grid-template-columns:1fr auto; align-items:baseline; gap:2px 12px; margin:16px 0 12px; padding-top:14px; border-top:1px solid #e3d8c2; }
.bb-sum-l{ font-weight:700; font-size:1.05rem; color:#352b42; }
.bb-sum-r{ font-weight:800; font-size:1.8rem; line-height:1; color:#7c2436; }
.bb-sum-n{ grid-column:1 / -1; font-size:.88rem; color:#5a4f68; }
.bb-buy{ margin-top:0; min-height:60px; font-size:1.2rem; transition:background-color .18s ease, transform .18s ease; }
.bb-buy:hover{ background:#d4af5e; }
.bb-trust{ gap:8px; margin-top:16px; }
.bb-sold{ margin-top:14px; padding-top:12px; border-top:1px solid #eee3cd; color:#4f4560; }
@media (prefers-reduced-motion: reduce){ .bb-opt, .bb-dot, .bb-dot::after, .bb-bump, .bb-buy{ transition:none; } }
