/* Booklook marketing site — in keeping with the app's editorial brand. */
:root {
  --paper: #ffffff;
  --paper-2: #fafafa;
  --card: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --faint: #9a9a9a;
  --line: #ececec;
  --accent: #b5432b;
  --accent-dark: #9d3a25;
  --accent-soft: #faf3f1;
  --accent-border: #e7d3cc;
  --radius: 16px;
  --maxw: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 .4em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
.eyebrow { font-family: var(--sans); font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40ch; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: var(--ink); }
.brand svg { width: 24px; height: 23px; }
.brand:hover { text-decoration: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--ink); font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--accent); text-decoration: none; }
/* The nav CTA is a filled button: white text, darker red on hover. */
.nav a.btn-primary { color: #fff; }
.nav a.btn-primary:hover { color: #fff; background: var(--accent-dark); }
@media (max-width: 720px) { .nav a.nav-link { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #9d3a25; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: .92rem; }

/* Hero */
.hero { padding: clamp(56px, 9vw, 112px) 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: .9rem; color: var(--faint); }
.hero-art { position: relative; display: flex; justify-content: center; }
.phone { border-radius: 40px; border: 1px solid var(--line); box-shadow: 0 24px 50px -26px rgba(20,20,20,.28); background: var(--card); overflow: hidden; }
.hero-art .phone.front { width: min(300px, 78%); transform: rotate(-2deg); }
.hero-art .phone.back { position: absolute; right: 4%; top: 8%; width: min(230px, 58%); transform: rotate(5deg); z-index: -1; opacity: .96; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  /* Let the title wrap naturally on narrow screens so it can be big without overflowing. */
  .h1-break { display: none; }
  .hero h1 { font-size: clamp(3rem, 13vw, 3.7rem); overflow-wrap: break-word; }
  .lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { margin-top: 20px; }
  .hero-art .phone.back { display: none; }
}

/* Official App Store badge (Apple artwork) */
.appstore-badge { display: inline-block; line-height: 0; }
.appstore-badge:hover { text-decoration: none; opacity: .85; }
.appstore-badge img { height: 52px; width: auto; display: block; }
.cta .appstore-badge { margin: 0 auto; }

/* Feature rows — alternating: odd rows show the image first, even rows the text first. */
.features { padding: 40px 0; background: var(--paper); }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 44px 0; }
.feature:nth-child(odd) .feature-media { order: -1; }
.feature-media { display: flex; justify-content: center; }
.feature-media img.illo { width: min(340px, 84%); opacity: 1; }
.feature-media .phone { width: min(280px, 74%); }
.feature h2 { margin-bottom: .3em; }
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; text-align: center; }
  .feature .feature-media { order: -1; }
  .feature .lede { margin-inline: auto; }
  .chips { justify-content: center; }
}

/* Band / Pro */
.band { background: #fafaf9; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(56px, 8vw, 92px) 0; margin: 32px 0; }
.band .wrap { text-align: center; }
.band .eyebrow { /* stays accent, now centred with the block */ }
.band .lede { margin-inline: auto; }
.band .pro-illo { display: block; width: min(190px, 56%); margin: 0 auto 22px; }
.band .pro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; text-align: left; }
.pro-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.pro-card p { color: var(--muted); margin: 6px 0 0; font-size: .96rem; }
.pro-card .ic { color: var(--accent); font-size: 1.4rem; }
@media (max-width: 720px) { .band .pro-grid { grid-template-columns: 1fr; } }

/* Screens gallery */
.gallery { padding: 20px 0 60px; text-align: center; }
.gallery-strip { display: flex; gap: 22px; overflow-x: auto; padding: 30px 4px 12px; scroll-snap-type: x mandatory; }
.gallery-strip .phone { flex: 0 0 auto; width: 230px; scroll-snap-align: center; }
.gallery-strip::-webkit-scrollbar { height: 0; }

/* Final CTA */
.cta { text-align: center; padding: 20px 0 80px; }
.cta-note { margin: 14px 0 0; font-size: .9rem; color: var(--faint); }
.cta h2 { max-width: 18ch; margin-inline: auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fafafa; padding: 40px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.site-footer .brand { font-size: 1.2rem; }
.foot-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { color: var(--muted); font-size: .92rem; }
.foot-copy { width: 100%; color: var(--faint); font-size: .84rem; margin-top: 8px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* Legal / prose pages */
.prose-head { padding: 56px 0 8px; }
.prose { max-width: 760px; margin: 0 auto; padding: 20px 24px 80px; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.3em; }
.prose p, .prose li { color: #33302c; }
.prose .updated { color: var(--faint); font-size: .9rem; }
.prose .note { background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 12px; padding: 12px 16px; font-size: .95rem; color: #5c4b46; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-family: var(--sans); font-weight: 700; }
.prose code { background: #efece6; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose a { text-decoration: underline; }
.prose ul { padding-left: 1.35em; margin: .6em 0 1.1em; }
.prose li { margin: .4em 0; padding-left: .2em; }

/* Hand-drawn boil: the line illustrations wobble gently, like animated ink. */
.boil { filter: url(#boil); will-change: filter; }
@media (prefers-reduced-motion: reduce) { .boil { filter: none; } }

/* ---- Recomposed UI components (features shown on their own merit) ---- */
.cover { border-radius: 7px; overflow: hidden; background: #efeae2; box-shadow: 0 12px 28px -14px rgba(20,20,20,.4); }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A cover shown whole, at the artwork's own proportions (no cropping). */
.cover.natural { aspect-ratio: auto; height: auto; background: transparent; box-shadow: 0 24px 46px -28px rgba(20,20,20,.45); }
.cover.natural img { height: auto; object-fit: contain; }

/* Hero vignette: a fan of covers above a recomposed stat row */
.vignette { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.cover-fan { display: flex; justify-content: center; padding-top: 10px; }
.cover-fan .cover { width: 150px; aspect-ratio: 2/3; margin-inline: -12px; }
.cover-fan .cover:nth-child(1) { transform: rotate(-8deg) translateY(10px); }
.cover-fan .cover:nth-child(2) { transform: translateY(-6px); z-index: 3; }
.cover-fan .cover:nth-child(3) { transform: rotate(8deg) translateY(10px); }
.stat-row { display: flex; gap: 30px; }
.stat { text-align: center; }
.stat b { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; display: block; line-height: 1; }
.stat span { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* Genre chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; font-size: .92rem; background: var(--card); }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* A recomposed recommendation card (the Ask pick) */
.rec { display: flex; align-items: flex-start; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 26px 60px -34px rgba(20,20,20,.4); max-width: 430px; text-align: left; }
.rec .cover { width: 96px; flex: 0 0 auto; aspect-ratio: 2/3; }
.rec h4 { font-family: var(--serif); font-size: 1.2rem; margin: 2px 0 1px; }
.rec .by { color: var(--muted); font-size: .9rem; margin-bottom: 9px; }
.rec .why { font-size: .93rem; color: #444; line-height: 1.5; }
.rec .shops { display: flex; gap: 8px; margin-top: 12px; }
.rec .shop { font-size: .78rem; border: 1px solid var(--line); border-radius: 8px; padding: 5px 11px; color: var(--ink); }

/* A recomposed cover grid (a mini shelf) */
.mini-shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 360px; }
.mini-shelf .cover { aspect-ratio: 2/3; }

/* The scanner reticle over a cover, in isolation */
.scan-demo { position: relative; width: 240px; }
.scan-demo .cover { width: 100%; aspect-ratio: 2/3; }
.scan-demo .barcode { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); width: 60%; height: 40px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, #1a1a1a 0 2px, #fff 2px 4px, #1a1a1a 4px 5px, #fff 5px 9px); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.reticle { position: absolute; inset: 30% 16% 22%; }
.reticle i { position: absolute; width: 26px; height: 26px; border: 3px solid var(--accent); }
.reticle i:nth-child(1){ top:0; left:0; border-right:0; border-bottom:0; }
.reticle i:nth-child(2){ top:0; right:0; border-left:0; border-bottom:0; }
.reticle i:nth-child(3){ bottom:0; left:0; border-right:0; border-top:0; }
.reticle i:nth-child(4){ bottom:0; right:0; border-left:0; border-top:0; }
.reticle .laser { position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: var(--accent); box-shadow: 0 0 12px 1px var(--accent); }

/* A recomposed reading-list card */
.list-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 26px 60px -34px rgba(20,20,20,.4); max-width: 340px; text-align: left; }
.list-covers { display: flex; margin-bottom: 14px; }
.list-covers .cover { width: 62px; aspect-ratio: 2/3; margin-left: -20px; border: 2px solid var(--card); }
.list-covers .cover:first-child { margin-left: 0; }
.list-card h4 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 2px; }
.list-card .meta { color: var(--muted); font-size: .88rem; }
.list-card .follow { margin-top: 14px; display: inline-block; background: var(--accent); color: #fff; border-radius: 999px; padding: 7px 16px; font-size: .85rem; font-weight: 600; }

/* Isolated cover wall (replaces the screenshot gallery) */
/* Full-bleed horizontal scroller. Covers keep their own proportions (fixed
   height, natural width) so different aspect ratios add interest, sitting on a
   line like books on a shelf. Generous vertical padding keeps shadows uncut. */
.cover-wall { display: flex; align-items: flex-end; gap: 22px; overflow-x: auto; padding: 30px 24px 52px; scroll-snap-type: x mandatory; }
.cover-wall .cover { flex: 0 0 auto; height: 210px; width: auto; aspect-ratio: auto; background: transparent; scroll-snap-align: center; }
.cover-wall .cover img { height: 100%; width: auto; object-fit: contain; }
.cover-wall::-webkit-scrollbar { height: 0; }
@media (max-width: 720px) { .cover-wall { gap: 16px; padding: 24px 16px 44px; } .cover-wall .cover { height: 168px; } }

@media (max-width: 860px) {
  .cover-fan .cover { width: 120px; }
  .rec { max-width: 100%; }
}
