/* Shared stylesheet for the individual book pages (heartfelt-stories.html,
   little-hearts.html).

   Unlike library.html, which inlines its own copy of the tokens, these two
   pages share this file — duplicating ~250 lines of identical CSS twice more
   was not worth it. The tokens below are copied from index.html; if one
   changes there, change it here too. */

:root {
  --warm-white: #fffdf8;
  --cream: #fdf5e8;
  --cream2: #f7ead4;
  --orange: #d96a28;
  --orange-light: #e87d3a;
  --orange-bg: rgba(224,112,48,0.08);
  --teal: #1f7a6a;
  --teal-light: #2e9480;
  --teal-bg: rgba(42,128,112,0.08);
  --warm-brown: #3d2c1e;
  --brown-mid: #7a5c42;
  --text: #2d1f14;
  --text-mid: #6b4f38;
  --text-soft: #9a7a62;
  --border: rgba(61,44,30,0.1);
  --shadow-sm: 0 2px 16px rgba(61,44,30,0.10);
  --shadow-md: 0 8px 36px rgba(61,44,30,0.15);
  --shadow-lg: 0 24px 64px rgba(61,44,30,0.20);
  --radius: 20px;
  --radius-sm: 12px;
  --gold: #d4a853;
  --gold-dark: #8a6820;
  --star-gold: #f5a623;
  --bg-orange-soft: #fff7f2;
  --bg-teal-soft: #f0faf8;
  --bg-gold-soft: #fdf8ee;
  --text-light: rgba(255,253,248,0.9);
  --text-light-soft: rgba(255,253,248,0.5);
  --text-light-faint: rgba(255,253,248,0.3);
  --border-light: rgba(255,253,248,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }

/* ── NAV (mirrors index.html) ──
   Scoped with :not(.bp-crumb) because the breadcrumb below is also a <nav>
   landmark; without this it inherits position:fixed and space-between and
   lands on top of the <h1>. */
nav:not(.bp-crumb) {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(253,245,232,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 3rem;
}
.nav-logo { font-family: 'Lora', serif; font-size: 1.35rem; font-weight: 700; color: var(--warm-brown); text-decoration: none; }
.nav-logo em { color: var(--orange); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { text-decoration: none; font-size: 0.85rem; font-weight: 600; color: var(--text-mid); transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--orange); }
.nav-amazon { background: var(--orange); color: #fff !important; padding: 0.6rem 1.3rem; border-radius: 999px; font-weight: 700; }
@media (max-width: 1000px) { .nav-links { gap: 1.1rem; } .nav-links a { font-size: 0.8rem; } }
@media (max-width: 760px) {
  nav { padding: 0.85rem 1.25rem; }
  .nav-links { gap: 0.8rem; }
  .nav-links a { font-size: 0.74rem; }
  .nav-amazon { padding: 0.5rem 0.9rem; }
}
/* Below 560px the one-row nav does not fit: the logo wraps mid-name and the
   Amazon pill collides with Contact. (library.html still shows that; it has
   its own copy of these rules.) Two deliberate rows instead. */
@media (max-width: 560px) {
  nav:not(.bp-crumb) { flex-wrap: wrap; justify-content: center; gap: 0.45rem; padding: 0.6rem 1rem; }
  .nav-logo { flex-basis: 100%; text-align: center; font-size: 1.15rem; white-space: nowrap; }
  .nav-links { width: 100%; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
  .nav-links li:nth-child(-n+2) { display: none; }
  .nav-links a { font-size: 0.72rem; white-space: nowrap; }
  .nav-amazon { padding: 0.4rem 0.85rem; }
  .bp-crumb { padding-top: 7.5rem; }
}

/* ── BREADCRUMB ── */
.bp-crumb {
  display: block; position: static;
  max-width: 1100px; margin: 0 auto; padding: 7rem 2rem 0;
  font-size: 0.8rem; color: var(--text-soft);
}
.bp-crumb a { color: var(--text-mid); text-decoration: none; font-weight: 600; }
.bp-crumb a:hover { color: var(--orange); }

/* ── HERO: the cover sits beside the buying decision ── */
.bp-hero {
  max-width: 1100px; margin: 0 auto; padding: 1.5rem 2rem 3.5rem;
  display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 3rem; align-items: start;
}
.bp-cover-wrap { position: relative; }
.bp-cover { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.bp-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.bp-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; border-radius: 999px; padding: 0.35rem 0.85rem;
}
.bp-badge--new { background: var(--teal-bg); color: var(--teal); border: 1px solid rgba(31,122,106,0.28); }
.bp-badge--gold { background: linear-gradient(135deg, rgba(212,168,83,0.18), rgba(212,168,83,0.07)); color: var(--gold-dark); border: 1px solid rgba(212,168,83,0.45); }
.bp-badge--debut { background: var(--orange-bg); color: var(--orange); border: 1px solid rgba(217,106,40,0.28); }

.bp-title { font-family: 'Lora', serif; font-size: clamp(1.9rem, 4.2vw, 2.8rem); font-weight: 700; color: var(--warm-brown); line-height: 1.15; margin-bottom: 0.5rem; }
.bp-byline { font-size: 0.9rem; color: var(--text-soft); margin-bottom: 1rem; }
.bp-rating { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-mid); margin-bottom: 1.1rem; font-weight: 600; }
.bp-rating .stars { color: var(--star-gold); letter-spacing: 0.08em; }
.bp-synopsis { font-size: 1.02rem; color: var(--text-mid); line-height: 1.85; margin-bottom: 1.5rem; }

/* key facts strip */
.bp-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; padding: 1rem 1.25rem; background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 1.75rem; }
.bp-fact { font-size: 0.8rem; color: var(--text-mid); }
.bp-fact strong { display: block; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 0.15rem; }

/* buy buttons */
.bp-buy { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.9rem; }
.bp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 48px; padding: 0.8rem 1.7rem; border-radius: 999px;
  font-size: 0.92rem; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.bp-btn:hover { transform: translateY(-1px); }
.bp-btn--orange { background: var(--orange); color: #fff; }
.bp-btn--orange:hover { background: var(--orange-light); }
.bp-btn--teal { background: var(--teal); color: #fff; }
.bp-btn--teal:hover { background: var(--teal-light); }
.bp-btn--ghost { background: transparent; color: var(--teal); border-color: var(--teal); }
.bp-btn--ghost:hover { background: var(--teal); color: #fff; }
.bp-btn:focus-visible { outline: 3px solid var(--warm-brown); outline-offset: 2px; }
.bp-buy-note { font-size: 0.76rem; color: var(--text-soft); }

/* ── SECTIONS ── */
.bp-section { max-width: 1100px; margin: 0 auto; padding: 0 2rem 3.5rem; }
.bp-section--tint {
  max-width: none; background: var(--bg-teal-soft);
  border-top: 1px solid rgba(31,122,106,0.12); border-bottom: 1px solid rgba(31,122,106,0.12);
  padding: 3.5rem 2rem; margin-bottom: 3.5rem;
}
.bp-section--tint > .bp-inner { max-width: 1100px; margin: 0 auto; }
.bp-eyebrow {
  display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal); background: var(--teal-bg);
  border: 1px solid rgba(31,122,106,0.2); border-radius: 999px; padding: 0.35rem 0.9rem; margin-bottom: 0.9rem;
}
.bp-h2 { font-family: 'Lora', serif; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: var(--warm-brown); line-height: 1.25; margin-bottom: 0.75rem; }
.bp-lead { font-size: 0.98rem; color: var(--text-mid); line-height: 1.8; max-width: 680px; margin-bottom: 1.75rem; }

/* ── THEMES ── */
.bp-themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.bp-theme { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.25rem; }
.bp-theme-ico { font-size: 1.4rem; line-height: 1; margin-bottom: 0.6rem; display: block; }
.bp-theme-name { font-family: 'Lora', serif; font-size: 1.02rem; font-weight: 700; color: var(--warm-brown); margin-bottom: 0.35rem; }
.bp-theme-desc { font-size: 0.84rem; color: var(--text-mid); line-height: 1.65; }

/* ── READING GUIDE ── */
.bp-ages { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.bp-age {
  background: var(--warm-white); border: 1px solid var(--border);
  border-left: 4px solid var(--orange); border-radius: var(--radius-sm); padding: 1.25rem;
}
.bp-age:nth-child(2) { border-left-color: var(--teal); }
.bp-age:nth-child(3) { border-left-color: var(--gold); }
.bp-age-range { font-family: 'Lora', serif; font-size: 1.1rem; font-weight: 700; color: var(--warm-brown); margin-bottom: 0.2rem; }
.bp-age-how { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); margin-bottom: 0.5rem; }
.bp-age:nth-child(2) .bp-age-how { color: var(--teal); }
.bp-age:nth-child(3) .bp-age-how { color: var(--gold-dark); }
.bp-age-desc { font-size: 0.84rem; color: var(--text-mid); line-height: 1.65; }

/* ── PREVIEW ── */
.bp-preview {
  display: grid; grid-template-columns: minmax(0, 240px) 1fr; gap: 2rem; align-items: center;
  background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem;
}
.bp-preview img { width: 100%; height: auto; border-radius: 10px; box-shadow: var(--shadow-md); display: block; }
.bp-preview-title { font-family: 'Lora', serif; font-size: 1.25rem; font-weight: 700; color: var(--warm-brown); margin-bottom: 0.4rem; }
.bp-preview-sub { font-size: 0.82rem; color: var(--text-soft); font-style: italic; margin-bottom: 1rem; }
.bp-excerpt { font-size: 0.95rem; color: var(--text-mid); line-height: 1.85; margin-bottom: 1.25rem; }
.bp-excerpt--fade { position: relative; max-height: 11.5em; overflow: hidden; }
.bp-excerpt--fade::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5em;
  background: linear-gradient(to bottom, rgba(255,253,248,0), var(--warm-white)); pointer-events: none;
}

/* story list (Little Hearts) */
.bp-stories { list-style: none; display: grid; gap: 0.6rem; }
.bp-stories li {
  display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap;
  font-size: 0.9rem; color: var(--text-mid); background: var(--warm-white);
  border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 1rem;
}
.bp-stories .n { font-family: 'Lora', serif; font-weight: 700; color: var(--orange); font-size: 0.95rem; flex-shrink: 0; min-width: 1.1em; }
.bp-stories .t { font-weight: 700; color: var(--warm-brown); }
.bp-stories .q { font-style: italic; color: var(--text-soft); font-size: 0.84rem; }
.bp-stories li.is-unknown { background: transparent; border-style: dashed; color: var(--text-soft); }

/* ── REVIEWS ── */
.bp-reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.bp-review { background: var(--warm-white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.5rem; display: flex; flex-direction: column; }
.bp-review-stars { color: var(--star-gold); font-size: 0.9rem; letter-spacing: 0.08em; margin-bottom: 0.55rem; }
.bp-review-head { font-family: 'Lora', serif; font-size: 1rem; font-weight: 700; color: var(--warm-brown); line-height: 1.35; margin-bottom: 0.6rem; }
.bp-review-body { font-size: 0.87rem; color: var(--text-mid); line-height: 1.75; margin-bottom: 1rem; flex-grow: 1; }
.bp-review-by { font-size: 0.78rem; color: var(--text-soft); display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.bp-review-by .who { font-weight: 700; color: var(--text-mid); }
.bp-verified { font-size: 0.68rem; font-weight: 800; color: var(--teal); background: var(--teal-bg); border-radius: 999px; padding: 0.15rem 0.55rem; }
.bp-noreviews {
  background: var(--warm-white); border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 1.5rem; font-size: 0.9rem; color: var(--text-mid); line-height: 1.75;
}

/* ── COMPARISON ── */
.bp-compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bp-compare {
  width: 100%; min-width: 580px; border-collapse: separate; border-spacing: 0;
  background: var(--warm-white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.bp-compare th, .bp-compare td { padding: 0.95rem 1.1rem; text-align: left; font-size: 0.86rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.bp-compare tr:last-child th, .bp-compare tr:last-child td { border-bottom: 0; }
.bp-compare thead th { background: var(--cream2); font-family: 'Lora', serif; font-size: 0.98rem; color: var(--warm-brown); font-weight: 700; }
.bp-compare thead th:first-child { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); font-weight: 800; }
.bp-compare tbody th { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft); white-space: nowrap; }
.bp-compare td { color: var(--text-mid); }
.bp-compare .is-this { background: var(--bg-orange-soft); }
.bp-compare-cover { width: 54px; height: auto; border-radius: 5px; box-shadow: var(--shadow-sm); display: block; margin-bottom: 0.5rem; }
.bp-compare-cta { display: inline-block; margin-top: 0.3rem; font-size: 0.8rem; font-weight: 700; color: var(--teal); text-decoration: none; }
.bp-compare-cta:hover { text-decoration: underline; }
.bp-compare-note { font-size: 0.8rem; color: var(--text-soft); margin-top: 1rem; }

/* ── FOOTER (mirrors index.html) ── */
footer { background: var(--warm-brown); padding: 3rem 6rem; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer-logo { font-family: 'Lora', serif; font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.footer-logo em { color: var(--orange); font-style: normal; }
.footer-tagline { font-size: 0.8rem; color: var(--text-light-soft); margin-bottom: 1.25rem; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a { color: var(--text-light); text-decoration: none; }
.footer-col-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-light-faint); margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { color: var(--text-light-soft); text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { grid-column: 1 / -1; padding-top: 2rem; border-top: 1px solid var(--border-light); font-size: 0.73rem; color: var(--text-light-faint); text-align: center; }

/* ── RESPONSIVE ── */
@media (max-width: 880px) {
  .bp-hero { grid-template-columns: 1fr; gap: 2rem; padding-bottom: 2.5rem; }
  .bp-cover-wrap { max-width: 260px; }
  .bp-preview { grid-template-columns: 1fr; gap: 1.25rem; }
  .bp-preview img { max-width: 220px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .bp-crumb { padding-top: 6rem; }
  .bp-hero, .bp-section { padding-left: 1.25rem; padding-right: 1.25rem; }
  .bp-section--tint { padding-left: 1.25rem; padding-right: 1.25rem; }
  .bp-btn { flex: 1 1 100%; }
  footer { padding: 2.5rem 1.5rem; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bp-btn:hover { transform: none; }
}
