/* Home page (Julie's R1, Nov 16, 2026). Base tokens and type live in site.css. */

/* Registered so the page color can glide between tones as you scroll. */
@property --bg   { syntax: "<color>"; inherits: true; initial-value: #ffd1e8; }
@property --fg   { syntax: "<color>"; inherits: true; initial-value: #4a1f33; }
@property --head { syntax: "<color>"; inherits: true; initial-value: #e0457b; }

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  /* The app's sticker unlock spring (response .45, damping .7), sampled over 800ms. */
  --spring: linear(0, 0.034, 0.119, 0.233, 0.359, 0.486, 0.605, 0.71, 0.8, 0.874, 0.932, 0.975, 1.006, 1.027, 1.039, 1.045, 1.046, 1.044, 1.039, 1.034, 1.028, 1.022, 1.017, 1.012, 1.008, 1.005, 1.003, 1.001, 0.999, 0.999, 0.998, 0.998, 0.998, 0.998, 0.998, 0.999, 0.999, 0.999, 0.999, 0.999, 1);
}

body.home {
  background: var(--bg);
  color: var(--fg);
  transition: --bg 700ms ease, --fg 700ms ease, --head 700ms ease;
}
body.home[data-tone="blush"]     { --bg: var(--blush);     --fg: var(--ink);   --head: var(--raspberry); --muted: var(--ink-muted); }
body.home[data-tone="raspberry"] { --bg: var(--raspberry); --fg: var(--cream); --head: var(--blush);     --muted: rgba(255, 241, 241, .88); }
body.home[data-tone="tangerine"] { --bg: var(--tangerine); --fg: var(--ink);   --head: var(--blush);     --muted: var(--ink); }
body.home[data-tone="plum"]      { --bg: var(--plum);      --fg: var(--cream); --head: var(--pink);      --muted: rgba(255, 241, 241, .78); }
body.home[data-tone="you"]       { --bg: #ff8f8a;          --fg: var(--ink);   --head: var(--cream);     --muted: var(--ink); }

/* The You gradient sits behind everything and fades in only for that section. */
.you-ground {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity 700ms ease;
  background:
    radial-gradient(ellipse 55% 45% at 20% 15%, #ffb0c8 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 85% 30%, #ff4fa0 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 30% 85%, #ffb347 0%, transparent 70%),
    linear-gradient(180deg, #ff8f8a, #ff7a66);
}
body.home[data-tone="you"] .you-ground { opacity: 1; }

.home main, .home header.hero { overflow-x: clip; }
.home .masthead { border-color: var(--fg); }
.home .masthead { flex-wrap: wrap; align-items: center; row-gap: 14px; }
.home .masthead .wordmark { display: inline-flex; align-items: center; gap: 10px; }
/* The wordmark types out "here for the plot, ish." and then backs into "plotish" again (home.js). Plain inline text,
   so every letter sits on one baseline. The caret shows only while it types. */
.wm { white-space: nowrap; }
.wm.typing::after { content: ""; display: inline-block; width: 2px; height: .9em; margin-left: 2px; vertical-align: -.08em;
  background: currentColor; animation: caret 900ms steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.mark-icon { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.home .pill { background: var(--fg); color: var(--bg); transition: transform 160ms var(--ease-out); }
.home .pill:active { transform: scale(.97); }

/* ---------- Phones (App Store screenshots in a drawn bezel) ---------- */
.phone {
  position: relative;
  width: var(--w, clamp(220px, 25vw, 300px));
  aspect-ratio: 720 / 1564;
  border: clamp(6px, .8vw, 9px) solid #2a1520; /* the screenshots are bare screens, so draw the bezel */
  border-radius: 11% / 5.2%;
  overflow: hidden;
  box-shadow: 0 30px 60px -10px rgba(46, 21, 34, .45), 0 0 0 1px rgba(46, 21, 34, .08);
  transform: rotate(var(--r, 0deg));
  flex: none;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.js .phone.rise { opacity: 0; transform: translateY(48px) rotate(calc(var(--r, 0deg) * 2)); }
.js .phone.rise.in {
  opacity: 1; transform: rotate(var(--r, 0deg));
  transition: transform 900ms var(--ease-out) var(--d, 0ms), opacity 400ms ease-out var(--d, 0ms);
}

/* ---------- Hero ---------- */
.hero-stage { display: grid; gap: 48px; align-items: center; padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 9vw, 112px); }
@media (min-width: 900px) { .hero-stage { grid-template-columns: 1.25fr 1fr; } }
.hero-copy { position: relative; display: grid; gap: 26px; }
.home .hero h1 { font-size: clamp(56px, 8vw, 116px); line-height: .9; position: relative; color: var(--head); }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero .actions small { color: var(--muted); font-size: 15px; flex-basis: 100%; }
/* "TBR" stays in capitals inside the lowercase headline, and "your TBR" stays on one line (Julie). site.css makes
   hero headline spans blocks for other pages, so these stay inline here. */
.home .hero h1 span { display: inline; }
.keep-case { text-transform: none; }
.nowrap { white-space: nowrap; }
.home .more { font-weight: 600; text-underline-offset: 4px; color: inherit; }

/* Hero: real lists, their covers filled in from the catalog (home.js) */
.hero-lists { display: grid; gap: 14px; min-width: 0; }
.hl { display: grid; gap: 4px; border-radius: 22px; padding: 18px; text-decoration: none; color: var(--ink); background: var(--cream);
  box-shadow: 0 18px 40px rgba(46, 21, 34, .25); transition: transform 160ms var(--ease-out); min-width: 0; }
.hl:active { transform: scale(.98); }
.hl-by { font: 600 12px/1.3 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.hl-name { font: 400 clamp(20px, 2vw, 26px)/1.1 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.hl-big .hl-covers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.hl-covers img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; display: block; box-shadow: 0 8px 16px rgba(46, 21, 34, .25); }
.hl-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.hl-mini, .hl-row .hl { grid-template-columns: auto 1fr; align-items: center; gap: 14px; }
.hl-mini .hl-name, .hl-row .hl-name { font-size: 18px; display: block; overflow-wrap: normal; }
.hl-mini .hl-by, .hl-row .hl-by { display: block; margin-top: 4px; letter-spacing: 0; text-transform: none; font-size: 13px; }
.hl-mini .hl-covers, .hl-row .hl-covers { display: flex; width: 76px; min-height: 62px; }
.hl-mini .hl-covers img, .hl-row .hl-covers img { width: 44px; flex: none; }
.hl-mini .hl-covers img:first-child, .hl-row .hl-covers img:first-child { transform: rotate(-6deg); }
.hl-mini .hl-covers img + img, .hl-row .hl-covers img + img { margin-left: -12px; transform: rotate(5deg); }
/* Hero: the Browse screen */
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual .phone { --w: clamp(240px, 25vw, 310px); }
.hl-plum { background: var(--plum); color: var(--cream); }
.hl-plum .hl-by { color: rgba(255, 241, 241, .8); }
.hl-blush { background: var(--blush); }

/* ---------- Brooklyn's favorites ---------- */
.picks-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 18px 32px; }
.home .picks h2 { max-width: 14ch; }
.pick-covers { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
.pick-covers img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; display: block; box-shadow: var(--cover-shadow); }
@media (max-width: 700px) { .pick-covers { grid-template-columns: repeat(4, minmax(0, 1fr)); } .pick-covers li:nth-child(n+9) { display: none; } }
.picks .lede { margin-top: 28px; max-width: 40rem; }

/* ---------- Feature sections ---------- */
.feature { padding: clamp(72px, 11vw, 140px) 0; }
.feature-grid { display: grid; gap: clamp(56px, 7vw, 96px); align-items: center; }
@media (min-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid.flip > .stage { order: -1; }
}
.home .feature h2 { font-size: clamp(50px, 7.2vw, 100px); margin: 14px 0 22px; }
.feature .kicker { color: var(--fg); }
.stage { position: relative; display: flex; justify-content: center; align-items: center; min-height: 420px; }


/* Fit: two phones, the list and one of its books */
.pair .phone { --w: clamp(150px, 22vw, 270px); }
.pair .phone:first-child { margin-right: -10%; z-index: 1; }
.pair .phone:last-child { margin-top: 14%; z-index: 2; }
.feature .lede.quiet { margin-top: 16px; color: var(--muted); }

/* Lists: tiles like the app's, covers filled in from the catalog */
.lists-copy { max-width: 36rem; }
.list-tiles { list-style: none; margin: 44px 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.list-tiles a { display: grid; gap: 6px; padding: 26px 22px 22px; border-radius: 22px; text-decoration: none; color: var(--ink); background: var(--cream);
  box-shadow: 0 18px 40px rgba(46, 21, 34, .2); height: 100%; box-sizing: border-box; transition: transform 160ms var(--ease-out); }
.list-tiles a:active { transform: scale(.98); }
.list-tiles li:first-child a { background: var(--plum); color: var(--cream); }
.list-tiles li:nth-child(2) a { background: var(--blush); }
.lt-fan { display: flex; justify-content: center; align-items: center; height: 180px; margin-bottom: 12px; }
.lt-fan img { width: 100px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: 0 10px 20px rgba(0, 0, 0, .35); }
.lt-fan img:first-child { transform: rotate(-7deg); }
.lt-fan img + img { margin-left: -32px; margin-top: 22px; transform: rotate(6deg); }
.lt-name { font: 400 26px/1.05 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.lt-by { font: 600 13px/1.3 var(--body); opacity: .8; }

/* You: centered, then the quiz takes the section over (quiz.js) */
.you-teaser { text-align: center; }
.home .feature.you h2 { text-transform: lowercase; max-width: 11ch; margin-left: auto; margin-right: auto; }
.you-teaser .lede { margin: 0 auto; max-width: 34rem; }
.you-chips { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.you-chips li { padding: 9px 18px; border-radius: 999px; border: 1.5px solid currentColor; font: 600 15px/1.2 var(--body); }
.you-cta { margin-top: 32px; }

/* ---------- Closer: the app icon, built big ---------- */
.closer { padding: clamp(80px, 12vw, 150px) 0 0; text-align: center; position: relative; }
.home .closer h2 { font-size: clamp(54px, 9vw, 128px); margin: 0 auto 22px; max-width: 12ch; }
.closer .lede { margin: 0 auto 30px; }
/* Beta: two steps, plus a QR for people reading on a computer. */
.get { display: grid; gap: 32px; max-width: 780px; margin: 0 auto; text-align: left; align-items: center; }
@media (min-width: 760px) { .get { grid-template-columns: 1fr auto; } }
.get-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 22px; }
.get-steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; align-items: start; }
.get-steps li::before {
  content: counter(step); grid-row: 1 / span 3;
  font-family: var(--display); font-size: 44px; line-height: .85; color: var(--raspberry);
}
/* One step (the App Store, since Nov 26, 2026) needs no number. */
.get-steps li:only-child { grid-template-columns: 1fr; }
.get-steps li:only-child::before { display: none; }
.get-steps b { font: 600 19px/1.3 var(--body); }
.get-steps span { color: var(--muted); font-size: 16px; }
.get-steps a:not(.pill) { font-weight: 600; justify-self: start; margin-top: 4px; }
.get-steps .pill { justify-self: start; margin-top: 10px; }
.get-qr { margin: 0; justify-self: center; text-align: center; }
.get-qr img { width: 168px; height: 168px; padding: 14px; background: var(--cream); border-radius: 18px; box-shadow: 0 12px 28px rgba(74, 31, 51, .18); }
.get-qr figcaption { font-size: 14px; color: var(--muted); max-width: 168px; margin: 12px auto 0; }
@media (max-width: 759px) { .get-qr { display: none; } } /* on a phone, the button is the way in */

/* The closing shelf (Claude Design "Landing Shelf Animation"): the icon's four tiles stand on the footer's rule,
   then drop one by one into a crooked stack of books. The stage is 393 × 300 design units (its empty top 40
   cropped), scaled to fit by home.js (--k); the rule is its bottom edge. The icon
   and the stack are both centered on x 196.5 (the design's icon sat 47 units right). */
.closer .shelf {
  --u: clamp(1px, .2vw, 1.8px);
  width: min(100%, calc(230.7 * var(--u))); aspect-ratio: 393 / 260;
  position: relative; margin: clamp(48px, 8vw, 88px) auto 0; cursor: pointer;
}
.shelf-stage { position: absolute; left: 0; top: 0; width: 393px; height: 300px; transform: scale(var(--k, 1)) translateY(-40px); transform-origin: 0 0; }
.shelf-stage i { position: absolute; display: block; border-radius: 18px; }
.shelf-stage .b0 { left: 84px; top: 40px; width: 100px; height: 131px; background: var(--raspberry); overflow: hidden; }
.shelf-stage .ribbon {
  left: 50%; top: 0; width: 34.4px; height: 65.6px; border-radius: 0; background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 63%, 0 100%);
}
.shelf-stage .b1 { left: 199px; top: 46px; width: 103px; height: 103px; background: var(--tangerine); transform: rotate(-14deg); }
.shelf-stage .b2 { left: 206px; top: 162px; width: 103px; height: 103px; background: #ffd05a; }
.shelf-stage .b3 { left: 84px; top: 193px; width: 103px; height: 72px; background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  body.home, .you-ground { transition-duration: 0ms; }
  .js .phone.rise { opacity: 1; transform: rotate(var(--r, 0deg)); transition: none; }
}


/* Big screens: headlines, phones and the closing shelf grow with the wider column. */
@media (min-width: 1500px) {
  .home .hero h1 { font-size: clamp(116px, 7vw, 150px); }
  .home .feature h2 { font-size: clamp(100px, 6.5vw, 128px); }
  .phone { --w: clamp(300px, 17vw, 380px); }
  .pair .phone { --w: clamp(270px, 14vw, 320px); }
  .stage { min-height: 520px; }
  .home .closer h2 { font-size: clamp(128px, 8vw, 160px); }
  .closer .shelf { --u: clamp(1.8px, .1vw, 2.2px); }
}

/* Lists (Julie, 2026-12-03): one list in five designs made in the app, then the book club: one list made in the app and
   joined in a browser. */
.designs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin: 40px 0 56px; padding: 0 6px; }
.designs img { width: 100%; height: auto; display: block; border-radius: 6px; transform: rotate(var(--r, 0)); box-shadow: 0 24px 44px -12px rgba(46, 21, 34, .5); transition: transform .3s; }
.designs img:hover { transform: rotate(0) translateY(-6px); }
.make { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.make-copy .lede + .lede { margin-top: 12px; }
.make-copy h3 { font-size: clamp(30px, 3.4vw, 46px); margin: 0 0 14px; line-height: 1; }
/* Book club: the maker in the app, then a friend joining and adding in a browser (Julie, 2026-12-03) */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px); align-items: start; min-height: 0; padding-bottom: 8%; }
.trio .shot { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.trio .shot:nth-child(2) { margin-top: 8%; }
.trio .shot:nth-child(3) { margin-top: 16%; }
.trio .phone { --w: 100%; border-width: clamp(4px, .6vw, 8px); }
.trio figcaption { font: 600 14px/1.2 var(--body); color: var(--fg); white-space: nowrap; }
@media (max-width: 700px) {
  .designs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .designs img:nth-child(5) { display: none; }
  .make { grid-template-columns: 1fr; gap: 28px; }
  .trio figcaption { font-size: 12px; }
}
