/* ── The v2 pages share one voice: big serif, cream, one pill, real pages. ──
   Used by /v2, /v2/how-it-works and /v2/pricing (MAC-379, MAC-394). Page-
   specific layout stays in each page's own <style>; this file is only what
   every v2 page needs to look like the same site. Tokens come from globals.css. */

:root {
  --ink: var(--color-foreground);
  --ink-soft: var(--color-foreground-muted);
  --cream: var(--color-background);
  --cream-2: var(--color-background-muted);
  --display: "Crimson Pro", Georgia, serif;
  --text: "Lora", Georgia, serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --column: 1360px;
  /* The sticky bar's height, from the parts that make it: its vertical padding
     around the 44px pill. .bar and .bar .pill read these same tokens, so the
     scroll offset below can never drift from the bar it clears. */
  --bar-pad: 0.9rem;
  --bar-pill: 44px;
  --bar-h: calc(var(--bar-pill) + 2 * var(--bar-pad));
}
/* The bar is sticky, so anything the browser scrolls to the top edge — an
   in-page anchor, scrollIntoView, a page-down — would land underneath it.
   One offset on the root keeps every target, on every v2 page, fully below the
   bar with a little room to breathe; no per-page scroll-margin workarounds. */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 1.25rem); }
body { background: var(--cream); color: var(--ink); font-family: var(--text); margin: 0; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: italic; }
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); max-width: var(--column); margin-left: auto; margin-right: auto; }

/* Display type: the headline is the design. */
.d1 { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 5.6vw, 84px); line-height: 0.98; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.d2 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 6vw, 72px); line-height: 1.02; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
.d3 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
.lede { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-soft); max-width: 36ch; margin: 0; }
.small { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.label { font-family: var(--text); font-size: 12.5px; letter-spacing: 0.02em; color: var(--ink-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pill call to action, as a single object: text and an arrow coin. */
.pill {
  display: inline-flex; align-items: center; gap: 0.9rem; height: 52px; padding: 0 6px 0 1.4rem; border-radius: 999px;
  background: var(--ink); color: var(--cream); text-decoration: none; font-family: var(--text); font-size: 15px; font-weight: 500;
  transition: transform 0.15s ease, opacity 0.15s ease; white-space: nowrap;
}
.pill .coin { width: 40px; height: 40px; border-radius: 50%; background: var(--cream); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.pill:hover { transform: translateY(-1px); opacity: 0.92; }
.pill:focus-visible, .quiet:focus-visible, .bar a:focus-visible { outline: 2px solid var(--color-forest); outline-offset: 3px; }
.quiet { font-family: var(--text); font-size: 15px; color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(43,38,32,0.3); padding-bottom: 1px; }
.quiet:hover { border-color: var(--ink); }

/* ── Bar ── */
.bar {
  position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: var(--bar-pad) var(--gutter); background: rgba(247,241,230,0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.bar .mark { font-family: var(--display); font-size: 22px; letter-spacing: -0.01em; text-decoration: none; }
.bar .links { display: flex; gap: 1.4rem; justify-content: flex-end; font-size: 14px; }
.bar .links a { text-decoration: none; color: var(--ink-soft); }
.bar .links a:hover, .bar .links a[aria-current="page"] { color: var(--ink); }
.bar .pill { height: var(--bar-pill); padding-left: 1.2rem; font-size: 14px; }
.bar .pill .coin { width: 34px; height: 34px; font-size: 16px; }

/* ── Sections share one vertical rhythm ── */
.screen { padding-top: clamp(5rem, 14vh, 11rem); padding-bottom: clamp(5rem, 14vh, 11rem); }
.screen > .d2 { max-width: 16ch; }
.screen .lede { margin-top: 1.2rem; }
/* A centered screen: the heading and its one sentence sit on the axis; what
   follows (cards, a book, frames) decides its own alignment. */
.centered { text-align: center; }
.centered > .d2 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.centered > .lede { margin-left: auto; margin-right: auto; }

footer { max-width: var(--column); margin: 0 auto; padding: 2rem var(--gutter) 3rem; display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; border-top: 1px solid var(--color-border); font-size: 13.5px; color: var(--ink-soft); }
footer .navs { display: flex; gap: 0.75rem 2.25rem; flex-wrap: wrap; }
footer .links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
footer a { text-decoration: none; color: inherit; }
footer a:hover { color: var(--ink); }

/* ── Reveal on scroll, gently ── */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Phone ── */
@media (max-width: 760px) {
  .d1 { font-size: clamp(42px, 12vw, 56px); }
  .bar { grid-template-columns: 1fr auto; }
  .bar .links { display: none; }
}

/* ── The hardcover ──
   The real cover as a printed case, built as a 3D object
   so the binding and the pages are geometry, not drawn-on lines. Every
   length is cut from --w, the book's width: --d is the closed book's
   thickness, --b one board's thickness, --s the squares (how far the
   boards overhang the pages at the head, foot and fore-edge). The front
   board carries the cover render under the title band, with the hinge
   groove a casewrap has beside the spine and a little light across the
   gloss. The pages are two ruled faces, at the fore-edge and the head,
   recessed inside the boards' overhang; the boards' own thickness shows
   as a thin dark rim around them. The spine face exists but is turned
   away at this angle. The shadow is a soft panel two book-depths behind.
   TODO (Mac): replace with a photograph of the Prodigi copy once shot. */
.hardcover { --w: 56cqw; --d: calc(var(--w) * 0.08); --b: calc(var(--w) * 0.011); --s: calc(var(--w) * 0.016);
  width: var(--w); aspect-ratio: 1 / 1; position: relative; transform-style: preserve-3d;
  transform: perspective(1200px) rotateY(-28deg) rotateX(-5deg); }
.hardcover > * { position: absolute; backface-visibility: hidden; }
.hardcover::before { content: ""; position: absolute; inset: 12% 5% -4% 10%; border-radius: 6%; background: rgba(43,38,32,0.40); box-shadow: 0 0 36px 14px rgba(43,38,32,0.40); transform: translateZ(calc(var(--d) * -2.2)); }
/* And the contact shadow on the floor it stands on: an ellipse under the foot, seen edge-on. */
.hardcover::after { content: ""; position: absolute; left: -2%; width: 108%; top: 100%; height: calc(var(--d) * 4); transform-origin: center top; transform: translateZ(calc(var(--d) * -2.5)) rotateX(90deg); background: radial-gradient(ellipse at 50% 50%, rgba(43,38,32,0.6), rgba(43,38,32,0.22) 40%, rgba(43,38,32,0) 70%); }
.hardcover .board { inset: 0; transform: translateZ(calc(var(--d) / 2)); overflow: hidden; border-radius: 0 1.5% 1.5% 0; background: #fff; }
.hardcover .board img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The hinge: a casewrap has a groove beside the spine, where the board ends and the cloth bends. */
.hardcover .board::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 7%; z-index: 2;
  background: linear-gradient(to right, rgba(0,0,0,0.30), rgba(0,0,0,0.05) 36%, rgba(0,0,0,0.24) 56%, rgba(255,255,255,0.16) 74%, rgba(0,0,0,0.06) 90%, rgba(0,0,0,0)); }
.hardcover .board::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(112deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.13) 46%, rgba(255,255,255,0.03) 55%, rgba(0,0,0,0.07) 100%); }
/* The band sits at the foot of the cover: on this book the children fly
   across the top of the picture, and a band there cuts into Levi's head. */
.hardcover .title-band { position: absolute; bottom: 0; left: 0; right: 0; z-index: 1; background: rgba(250,245,236,0.9); padding: 5% 7%; text-align: center; }
.hardcover .title-band strong { display: block; font-family: var(--text); font-weight: 600; font-size: clamp(10px, 1.25vw, 17px); line-height: 1.25; color: var(--ink); }
.hardcover .title-band span { display: block; font-family: var(--display); font-style: italic; font-size: clamp(6.5px, 0.6vw, 8.5px); color: #5b5348; margin-top: 0.35em; }
/* The boards' thickness: the casewrap folds the cover art over the board's edge, so each rim shows the
   picture's own edge (--cover, set on the element) — the fore-edge rim its right-hand sliver, the head rim
   its top — darkened as an edge in the shade is, the front rim catching a little light, the back one darker. */
.hardcover .rim { background-image: linear-gradient(rgba(10,14,28,0.5), rgba(10,14,28,0.5)), var(--cover); background-repeat: no-repeat; }
.hardcover .rim.fore { left: 100%; top: 0; width: var(--b); height: 100%; transform-origin: left center; transform: translateZ(calc(var(--d) / 2)) rotateY(90deg);
  background-size: 100% 100%, var(--w) 100%; background-position: 0 0, right center;
  background-image: linear-gradient(to right, rgba(255,255,255,0.14), rgba(10,14,28,0.42) 55%, rgba(10,14,28,0.55)), var(--cover); }
.hardcover .rim.fore.back { transform: translateZ(calc(var(--b) - var(--d) / 2)) rotateY(90deg); background-image: linear-gradient(rgba(10,14,28,0.62), rgba(10,14,28,0.62)), var(--cover); }
.hardcover .rim.head { left: 0; top: 0; width: 100%; height: var(--b); transform-origin: center top; transform: translateZ(calc(var(--d) / 2 - var(--b))) rotateX(90deg);
  background-size: 100% 100%, 100% var(--w); background-position: 0 0, center top;
  background-image: linear-gradient(to top, rgba(255,255,255,0.10), rgba(10,14,28,0.40) 55%, rgba(10,14,28,0.5)), var(--cover); }
.hardcover .rim.head.back { transform: translateZ(calc(var(--d) / -2)) rotateX(90deg); background-image: linear-gradient(rgba(10,14,28,0.62), rgba(10,14,28,0.62)), var(--cover); }
/* The pages: ruled with the leaves' edges, shaded darker toward the back and under the front board. */
.hardcover .pages.fore { left: calc(100% - var(--s)); top: var(--s); width: calc(var(--d) - 2 * var(--b)); height: calc(100% - 2 * var(--s)); transform-origin: left center;
  transform: translateZ(calc(var(--d) / 2 - var(--b))) rotateY(90deg);
  background: linear-gradient(to right, rgba(60,50,35,0.38), rgba(60,50,35,0.06) 18%, rgba(60,50,35,0.10) 70%, rgba(60,50,35,0.46)), repeating-linear-gradient(to right, rgba(120,100,70,0.22) 0 1px, transparent 1px 7px), repeating-linear-gradient(to right, #d9ccb1 0 1.5px, #f3ecdc 1.5px 4px); }
.hardcover .pages.head { left: 0; top: var(--s); width: calc(100% - var(--s)); height: calc(var(--d) - 2 * var(--b)); transform-origin: center top;
  transform: translateZ(calc(var(--b) - var(--d) / 2)) rotateX(90deg);
  background: linear-gradient(to bottom, rgba(60,50,35,0.46), rgba(60,50,35,0.08) 45%, rgba(60,50,35,0.26)), repeating-linear-gradient(to bottom, rgba(120,100,70,0.22) 0 1px, transparent 1px 7px), repeating-linear-gradient(to bottom, #d9ccb1 0 1.5px, #f3ecdc 1.5px 4px); }
.hardcover .spine { left: 0; top: 0; width: var(--d); height: 100%; transform-origin: left center; transform: translateZ(calc(var(--d) / -2)) rotateY(-90deg); background: linear-gradient(rgba(10,14,28,0.5), rgba(10,14,28,0.5)), var(--cover) left center / var(--w) 100% no-repeat; }
