/* ==========================================================================
   ZUZU — Visual layer
   Loaded after style.css. Re-skins the greyscale wireframe into the first
   visual direction without touching its structure: warm paper surfaces,
   muted cloth-cover accents, Funnel Display for display type (#33), and real
   photography inside the existing .ph boxes.

   Direction pulled from Pinterest + Cosmos book/stationery references —
   Artifact Uprising-style floating hardcovers, cloth-bound spines on warm
   seamless backdrops, and typographic book design (big serif, lots of
   paper-colored negative space). See DECISIONS.md #24.

   All photography under assets/img/ref/ is TEMPORARY reference imagery
   (sources in assets/img/ref/SOURCES.txt) — it is not ZUZU's and must be
   replaced with our own product photography before anything goes public.
   ========================================================================== */

:root {
  /* Paper-and-cloth palette. Re-pointing the greyscale primitives means
     every semantic token in style.css follows automatically. */
  --black: #1d1b18;        /* warm ink, not pure black */
  --charcoal: #2b2824;
  --dark-grey: #4d473f;
  --mid-grey: #6f685e;
  --grey: #a39b8f;
  --light-grey: #d8d0c2;
  --off-white: #ece5d8;    /* deeper paper — alternating sections */
  --white: #fbf9f5;        /* card / raised surface */

  --paper: #f5f1ea;        /* default page surface */
  --forest: #2f4636;       /* cloth-cover green — the one accent */
  --forest-deep: #243629;
  --clay: #a9502b;         /* sparing warm accent — ratings, highlights */

  --border: #e2dace;
  --border-strong: #1d1b18;
  --placeholder-fill: #e6dfd2;
  --placeholder-border: #d9d0c1;

  --color-surface: var(--paper);
  --color-surface-alt: var(--off-white);

  --font-display: 'Funnel Display', 'Funnel Sans', -apple-system, sans-serif;

  /* Display steps for Funnel Display (DECISIONS.md #33) — slightly smaller
     than the serif needed, since a grotesk reads larger at the same size. */
  --fs-display-xl: clamp(2.9rem, 5vw + 1rem, 5.6rem);
  --fs-display-l: clamp(2.2rem, 2.8vw + 1rem, 3.2rem);
  --fs-display-m: clamp(1.8rem, 1.9vw + 1rem, 2.6rem);

  --radius: 3px;
  --radius-media: 6px;
}

/* Paper grain — a faint fixed noise layer so flat surfaces read as stock,
   not screen. Pointer-transparent and multiply-blended, so it never
   affects contrast or interaction. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Type ---------- */
h1, h2,
.font-display,
.statement-band__text:first-of-type,
.lead-quote__text,
.story-fact__value,
.sticky-rail__number,
.sticky-rail__stat-value,
.story-slide__title {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.04;
}
/* h3/h4 without .font-display stay in the sans — UI-level headings. */
h3:not(.font-display):not(.story-slide__title), h4 { font-family: 'Funnel Sans', sans-serif; letter-spacing: 0; }

/* Section heads whose eyebrow + heading sit directly inside (no wrapper
   div) were being pushed to opposite edges by the wireframe's
   space-between. Stack them instead; centered variants stay centered. */
.section-head:has(> .eyebrow) { flex-direction: column; align-items: flex-start; gap: 0; }
.section-head[style*="text-align:center"] { align-items: center; }
em, .italic { font-style: italic; }
h1 em, h2 em, .font-display em { font-family: var(--font-display); font-style: normal; font-weight: 300; }

.story-slide__title { font-size: clamp(1.75rem, 1.5vw + 1rem, 2.4rem); line-height: 1.05; }
.statement-band__text:first-of-type { font-size: var(--fs-display-l); line-height: 1.08; }
.lead-quote__text { line-height: 1.15; }
.logo { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; letter-spacing: 0.1em; }

/* ---------- Surfaces ---------- */
.announce { background: var(--forest); color: #e9efe6; }

.site-header {
  background: rgba(245, 241, 234, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
/* Bug fix carried over from the wireframe: the logo precedes the nav in
   the markup, so with only grid-column set, auto-placement pushed the nav
   (column 1) onto a second row after the logo (column 2). Pin all three
   to row 1. Scoped to desktop — below 960px the header is a flex row. */
@media (min-width: 961px) {
  .site-header__inner > .main-nav,
  .site-header__inner > .logo,
  .site-header__inner > .header-actions { grid-row: 1; }
}
.site-header__inner { padding-block: 18px; }
.icon-btn { border-color: var(--border); }
.cart-count { background: var(--clay); }

.statement-band--inverse { background: var(--forest); }
.statement-band--inverse .statement-band__text:first-of-type { color: #fbf9f5; }
.statement-band--inverse .statement-band__text { color: #d9e2d6; }

.quote-card {
  background: var(--white);
  border: none;
  border-radius: var(--radius-media);
  box-shadow: 0 1px 0 rgba(29, 27, 24, 0.04), 0 12px 32px -18px rgba(29, 27, 24, 0.25);
}
.quote-card__stars { color: var(--clay); }

.newsletter-band { background: var(--off-white); }
.newsletter-form { background: var(--white); border-radius: var(--radius); border-color: var(--border-strong); }
.newsletter-form button { border-radius: 0 2px 2px 0; }

.site-footer { background: var(--black); }

/* ---------- Photography inside the wireframe's .ph boxes ---------- */
/* A .ph that contains an <img> becomes a photo frame: hatch, caption and
   placeholder border drop away, the image covers the box. The .ph's own
   aspect-ratio still sets the shape, so no layout changes. Absolutely
   positioned so the image's intrinsic size can never stretch an
   aspect-ratio box. .story-slide__media is already absolutely positioned
   by style.css — excluded so this doesn't override it. */
.ph:has(> img) {
  background-image: none;
  background-color: var(--off-white);
  border-color: transparent;
  box-shadow: none;
  overflow: hidden;
}
.ph:has(> img):not(.story-slide__media) { position: relative; }
.ph > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* the 8%-black inset outline style.css reserved for real photography */
  outline: 1px solid rgba(0, 0, 0, 0.06);
  outline-offset: -1px;
}
.ph:has(> img) > span { display: none; }

.cat-tile .ph,
.split__media,
.story-choice-card__media,
.sticky-rail__pin .ph,
.ph--wide { border-radius: var(--radius-media); }

/* Remaining placeholders (portraits etc.) — quieter hatch on paper so they
   sit in the new palette instead of reading as grey holes. */
.ph:not(:has(> img)) {
  background-color: var(--placeholder-fill);
  background-image: repeating-linear-gradient(135deg, rgba(29,27,24,0.035) 0 1px, transparent 1px 12px);
  border-color: var(--placeholder-border);
  border-radius: var(--radius-media);
}
.story-swatch__circle.ph, .ph--swatch { border-radius: 50%; background-image: none; }

/* ---------- Home hero: split, floating-books composition ---------- */
/* The image is product-on-seamless, so instead of cropping it full-bleed
   the whole hero takes the photo's own backdrop color and the books float
   on the right, with the headline in open space on the left. */
.pin-hero--split .pin-hero__visual {
  background: #f7ead6; /* sampled from hero-floating-books.jpg edges */
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-inline-end: max(var(--sp-4), calc((100vw - var(--container)) / 2));
}
.pin-hero__art {
  height: min(88vh, 960px);
  aspect-ratio: 736 / 1104;
  /* Photo backdrop drifts lighter toward its right edge; a wide feathered
     mask dissolves the frame so no rectangle shows against the hero. */
  -webkit-mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, #000 48%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, #000 48%, transparent 100%);
}
.pin-hero__art img { width: 100%; height: 100%; object-fit: cover; }
.pin-hero--split .pin-hero__content {
  align-items: flex-start;
  text-align: start;
  padding-inline-start: max(var(--sp-4), calc((100vw - var(--container)) / 2 + var(--sp-4)));
}
/* Sized so headline + copy + CTAs all land in the first viewport. */
.pin-hero--split .pin-hero__content h1 { max-width: 11ch; font-size: clamp(3rem, 4.2vw + 1rem, 5.6rem); }
.pin-hero--split .pin-hero__content p { color: var(--dark-grey); }

@media (max-width: 760px) {
  .pin-hero--split .pin-hero__visual { justify-content: center; padding: var(--sp-4) 0 0; height: auto; }
  .pin-hero__art { height: 62vh; }
  .pin-hero--split .pin-hero__content { background: #f7ead6; padding-top: var(--sp-3); }
}

/* ---------- Story-page heroes: full-bleed photo + scrim ---------- */
.pin-hero__visual .ph--hero { border: none; border-radius: 0; }
.pin-hero--dark .pin-hero__visual::after,
.pin-hero--light .pin-hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pin-hero--dark .pin-hero__visual::after {
  background: linear-gradient(180deg, rgba(20,18,16,0.25) 0%, rgba(20,18,16,0.55) 100%);
}
/* Light photos keep dark text: a paper-colored wash, strongest behind the
   centered headline and falling off toward the edges. */
.pin-hero--light .pin-hero__visual::after {
  background: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(245,241,234,0.88) 0%, rgba(245,241,234,0.55) 60%, rgba(245,241,234,0.15) 100%);
}
.pin-hero--light .story-scroll-cue { color: var(--color-ink); }

/* ---------- Home: category tiles ---------- */
.cat-tile__label {
  background: rgba(251, 249, 245, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: var(--fs-body);
  bottom: var(--sp-2);
  inset-inline-start: var(--sp-2);
}
.cat-tile .ph > img { transition: transform 700ms var(--ease-out); }

/* ---------- Full-viewport story slides ---------- */
.story-slide__card {
  background: rgba(251, 249, 245, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: none;
  border-radius: var(--radius-media);
  box-shadow: 0 24px 48px -28px rgba(29, 27, 24, 0.45);
}

/* ---------- Story pages: choice cards ---------- */
.story-choice-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-media);
  background: var(--white);
}
.story-choice-card__media { border-radius: 0; }
.story-choice-card.active { box-shadow: 0 0 0 2px var(--forest); border-color: var(--forest); }
.story-choice-card.active .story-choice-card__check { background: var(--forest); border-color: var(--forest); }
.story-recap { background: var(--white); border: none; border-radius: var(--radius-media); box-shadow: 0 12px 32px -18px rgba(29,27,24,0.25); }
.story-bar { background: rgba(245, 241, 234, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top-color: var(--border); }
.story-bar__thumb { border-radius: 4px; }

/* ---------- Hover (pointer devices only, same guard as style.css) ---------- */
@media (hover: hover) {
  .cat-tile:hover .ph > img { transform: scale(1.04); }
  .story-choice-card:hover { box-shadow: 0 0 0 1px var(--grey); }
  .btn--secondary:hover { background: var(--forest); border-color: var(--forest); color: #fbf9f5; }
}

/* ---------- Cart / checkout / confirmation containers ---------- */
/* Order summaries and payment-option groups were hard 1px ink outlines in
   the wireframe; they become the same raised paper card as the reviews and
   story recap. Form inputs keep their ink outlines on purpose — fields
   should stay unmistakable. */
.surface-card {
  background: var(--white);
  border-radius: var(--radius-media);
  box-shadow: 0 1px 0 rgba(29, 27, 24, 0.04), 0 12px 32px -18px rgba(29, 27, 24, 0.25);
}

/* ==========================================================================
   Page banner — the visual opening for utility pages (cart, checkout,
   confirmation). Same photography + paper-wash treatment as the story
   heroes, scaled down: a full-width photo band with the page title on it,
   so every page opens on an image without pushing the task below the fold.
   ========================================================================== */
.page-banner {
  position: relative;
  min-height: clamp(260px, 36vh, 400px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.page-banner--compact { min-height: clamp(180px, 24vh, 260px); }
.page-banner__media { position: absolute; inset: 0; z-index: -2; }
.page-banner__media img { width: 100%; height: 100%; object-fit: cover; }
/* Paper wash rising from the bottom-left, where the title sits. */
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(245,241,234,0.92) 0%, rgba(245,241,234,0.7) 38%, rgba(245,241,234,0) 72%),
    linear-gradient(0deg, rgba(245,241,234,0.55) 0%, rgba(245,241,234,0) 45%);
}
.page-banner__content {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4);
}
.page-banner__content h1 { font-size: var(--fs-display-l); max-width: 14ch; }
.page-banner__content p { max-width: 440px; margin: var(--sp-1) 0 0; color: var(--dark-grey); }
.page-banner .breadcrumb { padding: 0 0 var(--sp-2); }
@media (max-width: 760px) {
  .page-banner::after { background: linear-gradient(0deg, rgba(245,241,234,0.95) 0%, rgba(245,241,234,0.75) 55%, rgba(245,241,234,0.2) 100%); }
}

/* ---------- Photo step cards (confirmation "what's next", shipping) ---------- */
.photo-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.photo-step .ph { border-radius: var(--radius-media); margin-bottom: var(--sp-2); }
.photo-step__index { font-family: var(--font-display); font-size: var(--fs-display-m); color: var(--grey); line-height: 1; }
.photo-step h3 { font-size: var(--fs-body-l); margin: 6px 0 4px; }
.photo-step p { color: var(--color-text-muted); margin: 0; }
@media (max-width: 760px) { .photo-steps { grid-template-columns: 1fr; } }

/* ---------- Checkout: promise card under the order summary ---------- */
.promise-card { display: flex; gap: var(--sp-2); align-items: center; padding: var(--sp-2); margin-top: var(--sp-3); }
.promise-card .ph { width: 88px; flex-shrink: 0; aspect-ratio: 1; border-radius: 4px; }
.promise-card strong { display: block; font-size: var(--fs-body); }
.promise-card span { font-size: var(--fs-label); color: var(--color-text-muted); }
.promise-card a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Product page gallery ---------- */
.pdp-thumb {
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 150ms ease;
}
.pdp-thumb .ph { border-radius: 3px; }
.pdp-thumb[aria-pressed="true"] { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.pdp-main .ph { border-radius: var(--radius-media); }
.pdp-main img { transition: opacity 200ms ease; }

/* ---------- Shipping page ---------- */
.rate-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.rate-table th, .rate-table td { text-align: start; padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.rate-table th { font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); font-weight: 500; }
.rate-table tr:last-child td { border-bottom: none; }
.rate-table td:last-child, .rate-table th:last-child { text-align: end; }

/* Bug fix: inline display:flex on rows like the cart's discount line beat
   the [hidden] attribute's UA display:none, so "Discount ()" showed with
   no promo applied. [hidden] must always win. */
[hidden] { display: none !important; }

/* ---------- Mobile fixes found in the phone-width pass ---------- */
/* Checkout overflowed sideways at 390px: grid children default to
   min-width:auto, so the form grew to its inputs' intrinsic width. */
.checkout-layout > *, .cart-layout > * { min-width: 0; }
.field input, .field select { min-width: 0; width: 100%; }
@media (max-width: 600px) {
  .progress-steps { flex-wrap: wrap; row-gap: var(--sp-1); }
  .progress-steps__sep { width: 16px; }
  /* Product thumbnails are a strip, not a product grid — keep four across
     instead of letting the generic .grid-4 rule stack them full-size. */
  [data-pd-thumbs] { grid-template-columns: repeat(4, 1fr); }
}


/* ==========================================================================
   Product page (notebooks.html) — DECISIONS.md #28.
   Visual language replicated from GESTE's "Brume" product page (Pinterest):
   the object alone on a seamless studio backdrop with one soft contact
   shadow; information on the right in hairline-divided sections; a small
   floating pill for colour + price + action. No textures, no cast window
   light, no stacked drop shadows — realism comes from correct geometry
   and one believable shadow, not from surface noise.
   ========================================================================== */
.pd { max-width: var(--container); margin: 0 auto; }
/* The [data-pv] template — product-preview.js clones it into each section. */
.pd__stage-col { display: none; }
.pd__info { padding: var(--sp-3) var(--sp-4) var(--sp-7); }
.pd__info .breadcrumb { padding: 0 0 var(--sp-4); }

/* ---------- Seamless studio backdrop ---------- */
.pv {
  --W: clamp(170px, 17vw, 270px);  /* A5: 148 × 210 */
  --H: calc(var(--W) * 1.419);
  --D: calc(var(--W) * 0.095);     /* hardcover thickness at 160pp */
  --r: 3px;
  --pv-cloth: #2f4636; --pv-band: #1f3026; --pv-ribbon: #cdbb9c;
  position: relative;
  height: 100%;
  overflow: hidden;
  /* a cyclorama: wall into floor with a soft sweep, lit from the left */
  background:
    radial-gradient(ellipse 60% 45% at 38% 40%, rgba(255, 253, 248, 0.55), rgba(255, 253, 248, 0) 70%),
    linear-gradient(180deg, #efebe4 0%, #ebe6dd 60%, #e2dcd1 100%);
}
.pv[data-cover="Softcover"] { --D: calc(var(--W) * 0.072); --r: 9px; }

.pv__scene {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  perspective: 1800px;
  opacity: 0; visibility: hidden;
  transition: opacity 600ms var(--ease-out), visibility 0s linear 600ms;
}
.pv[data-view="cover"] .pv__scene--book,
.pv[data-view="specs"] .pv__scene--book,
.pv[data-view="spread"] .pv__scene--spread,
.pv[data-view="pages"] .pv__scene--spread,
.pv[data-view="photo"] .pv__scene--photo {
  opacity: 1; visibility: visible;
  transition: opacity 600ms var(--ease-out), visibility 0s;
}

/* ---------- The book: a true 3D block (front, spine, fore-edge, top) ---------- */
.pv__bookwrap { position: relative; width: var(--W); height: var(--H); transform: translateY(-4%); }
.book3d {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(-8deg) rotateY(-36deg);
  transition: transform 900ms var(--ease-out);
}
.pv[data-view="specs"] .book3d { transform: rotateX(0deg) rotateY(0deg); }
.book3d__face { position: absolute; top: 0; left: 0; }
/* Cloth faces: flat colour + a single broad light falloff. Very faint
   weave via the cloth texture at low strength — felt, not seen. */
.book3d__front, .book3d__back, .book3d__spine {
  background-color: var(--pv-cloth);
  transition: background-color 600ms ease;
}
.book3d__front {
  width: var(--W); height: var(--H);
  border-radius: 1px var(--r) var(--r) 1px;
  transform: translateZ(calc(var(--D) / 2));
  background-image:
    linear-gradient(100deg, rgba(255, 252, 245, 0.10) 0%, rgba(255, 252, 245, 0) 45%, rgba(0, 0, 0, 0.10) 100%),
    url("../img/tex/cloth.jpg");
  background-size: 100% 100%, 140px;
  background-blend-mode: normal, soft-light;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}
/* hardcover hinge: a shallow groove a few mm in from the spine */
.book3d__front::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 7%; width: 1px;
  background: rgba(0, 0, 0, 0.22); box-shadow: 1px 0 0 rgba(255, 255, 255, 0.07);
}
.pv[data-cover="Softcover"] .book3d__front::before { opacity: 0; }
.book3d__back {
  width: var(--W); height: var(--H);
  border-radius: 1px var(--r) var(--r) 1px;
  transform: rotateY(180deg) translateZ(calc(var(--D) / 2));
  filter: brightness(0.8);
}
.book3d__spine {
  width: var(--D); height: var(--H);
  left: calc((var(--W) - var(--D)) / 2);
  transform: rotateY(-90deg) translateZ(calc(var(--W) / 2));
  filter: brightness(0.78);
  display: grid; place-items: center;
}
.book3d__spine-mark { writing-mode: vertical-rl; font-family: var(--font-display); font-size: 10px; letter-spacing: 0.3em; color: rgba(0, 0, 0, 0.35); }
/* Page block: fore-edge (right) and top — hardcover boards overhang it
   by a few px; softcover is nearly flush. */
.book3d__edge, .book3d__top { --inset: 3px; }
.pv[data-cover="Softcover"] .book3d__edge, .pv[data-cover="Softcover"] .book3d__top { --inset: 1px; }
.book3d__edge {
  width: calc(var(--D) - 2px); height: calc(var(--H) - var(--inset) * 2);
  top: var(--inset);
  left: calc((var(--W) - var(--D) + 2px) / 2);
  transform: rotateY(90deg) translateZ(calc(var(--W) / 2 - var(--inset)));
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.10)),
    repeating-linear-gradient(90deg, #f6f1e7 0 1px, #e6dfd1 1px 2px);
}
.book3d__top {
  width: calc(var(--W) - var(--inset)); height: calc(var(--D) - 2px);
  top: calc((var(--H) - var(--D) + 2px) / 2);
  transform: rotateX(90deg) translateZ(calc(var(--H) / 2 - var(--inset)));
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0) 40%),
    repeating-linear-gradient(0deg, #f8f4ec 0 1px, #e9e2d5 1px 2px);
}
/* Debossed mark: a darker impression with a hairline light catch. */
.book3d__mark {
  font-family: var(--font-display); font-size: calc(var(--W) * 0.1); letter-spacing: 0.32em; padding-left: 0.32em;
  color: rgba(0, 0, 0, 0.26);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.13);
}
.pv[data-tone="light"] .book3d__mark { color: rgba(70, 54, 32, 0.34); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3); }
.book3d__band {
  position: absolute; top: -1px; bottom: -1px; right: 9%; width: 3.2%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0.10) 45%, rgba(0, 0, 0, 0.25)), var(--pv-band);
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.25);
  transition: background-color 600ms ease;
}
.pv__ribbon {
  position: absolute; top: 99%; left: 44%; width: 3.2%; height: 11%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.2) 45%, rgba(0, 0, 0, 0.1)), var(--pv-ribbon);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 88%, 0 100%);
  transform: rotate(6deg); transform-origin: top center;
  transition: background-color 600ms ease, opacity 400ms ease;
}
.pv[data-view="specs"] .pv__ribbon { opacity: 0; }
/* One contact shadow where the book meets the floor, plus a faint wide
   ambient — the only shadows in the scene. */
.pv__shadow {
  position: absolute; left: 50%; top: calc(50% + var(--H) * 0.46);
  width: calc(var(--W) * 1.5); height: calc(var(--W) * 0.22);
  transform: translateX(-46%);
  background:
    radial-gradient(ellipse 48% 38% at 50% 50%, rgba(52, 40, 24, 0.34), rgba(52, 40, 24, 0) 70%),
    radial-gradient(ellipse 50% 50% at 56% 50%, rgba(52, 40, 24, 0.12), rgba(52, 40, 24, 0) 100%);
  filter: blur(6px);
  pointer-events: none;
}

/* ---------- Dimension lines (Specifications) ---------- */
.pv__dims { position: absolute; inset: 0; opacity: 0; transition: opacity 500ms ease 300ms; pointer-events: none; }
.pv[data-view="specs"] .pv__dims { opacity: 1; }
.pv__dim { position: absolute; display: flex; align-items: center; justify-content: center; color: var(--dark-grey); font-size: 11px; letter-spacing: 0.08em; }
.pv__dim span { background: #ebe6dd; padding: 0 8px; position: relative; font-variant-numeric: tabular-nums; }
.pv__dim--w { left: 0; right: 0; bottom: -34px; height: 12px; border-inline: 1px solid var(--grey); }
.pv__dim--w::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--grey); }
.pv__dim--h { top: 0; bottom: 0; left: -38px; width: 12px; border-block: 1px solid var(--grey); }
.pv__dim--h::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid var(--grey); }
.pv__dim--h span { writing-mode: vertical-rl; transform: rotate(180deg); padding: 8px 0; }

/* ---------- Open spread (Paper, Pages) ---------- */
.pv__spreadwrap { width: calc(var(--W) * 2.05); transform: rotateX(34deg) rotateZ(-3deg); transform-style: preserve-3d; }
.spread {
  position: relative; display: flex; aspect-ratio: 296 / 210;
  padding: 1.4%;
  border-radius: 4px;
  background-color: var(--pv-cloth);
  box-shadow: 0 2px 2px rgba(52, 40, 24, 0.22), 0 30px 40px -18px rgba(52, 40, 24, 0.35);
  transition: background-color 600ms ease;
}
.pv[data-cover="Softcover"] .spread { padding: 0.4%; border-radius: 8px; }
.spread__page { position: relative; flex: 1; background-color: #fbf8f1; }
.spread__page--l { border-radius: 3px 0 0 3px; box-shadow: inset -14px 0 18px -14px rgba(52, 40, 24, 0.28); }
.spread__page--r { border-radius: 0 3px 3px 0; box-shadow: inset 14px 0 18px -14px rgba(52, 40, 24, 0.28); }
.spread__num { position: absolute; bottom: 4%; font-size: 9px; color: var(--grey); }
.spread__page--l .spread__num { left: 7%; }
.spread__page--r .spread__num { right: 7%; }
.spread__ribbon {
  position: absolute; top: -4%; left: 58%; width: 1.4%; height: 110%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.2) 45%, rgba(0, 0, 0, 0.1)), var(--pv-ribbon);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 97%, 0 100%);
}
/* Printed patterns — sizes keep a square grid on an A5 page. */
.pv[data-paper="Ruled"] .spread__page {
  background-image:
    linear-gradient(90deg, transparent 12%, rgba(169, 80, 43, 0.28) 12%, rgba(169, 80, 43, 0.28) calc(12% + 1px), transparent calc(12% + 1px)),
    linear-gradient(180deg, transparent calc(100% - 1px), rgba(84, 104, 128, 0.26) calc(100% - 1px));
  background-size: 100% 100%, 100% 4.4%;
  background-position: 0 0, 0 8%;
  background-repeat: no-repeat, repeat-y;
}
.pv[data-paper="Dotted"] .spread__page {
  background-image: radial-gradient(circle, rgba(58, 54, 50, 0.42) 0 0.9px, transparent 1.3px);
  background-size: 6.2% 4.37%;
  background-position: 3% 4%;
}
.pv[data-paper="Plain"] .spread__page { background-image: none; }

/* Callouts (Pages) — hairline leaders, small caps labels. */
.pv__callouts { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; pointer-events: none; opacity: 0; transition: opacity 500ms ease 250ms; }
.pv[data-view="pages"] .pv__callouts { opacity: 1; }
.pv__callout { position: absolute; font-size: 12px; color: var(--dark-grey); white-space: nowrap; }
.pv__callout b { font-weight: 600; color: var(--color-ink); }
.pv__callout::before { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--color-ink); }
.pv__callout::after { content: ""; position: absolute; border-top: 1px solid rgba(29, 27, 24, 0.35); }
.pv__callout--paper  { left: 9%;  top: 22%; }
.pv__callout--paper::before  { left: calc(100% + 34px); top: 40px; }
.pv__callout--paper::after   { left: calc(100% + 6px); top: 7px; width: 32px; transform: rotate(45deg); transform-origin: left; }
.pv__callout--pages  { left: 9%;  bottom: 22%; }
.pv__callout--pages::before  { left: calc(100% + 30px); top: -24px; }
.pv__callout--pages::after   { left: calc(100% + 6px); top: 7px; width: 30px; transform: rotate(-45deg); transform-origin: left; }
.pv__callout--flat   { right: 8%; bottom: 20%; }
.pv__callout--flat::before   { right: calc(100% + 40px); top: -20px; }
.pv__callout--flat::after    { right: calc(100% + 6px); top: 7px; width: 34px; transform: rotate(40deg); transform-origin: right; }
.pv__callout--ribbon { right: 10%; top: 20%; }
.pv__callout--ribbon::before { right: calc(100% + 34px); top: 34px; }
.pv__callout--ribbon::after  { right: calc(100% + 6px); top: 7px; width: 30px; transform: rotate(-45deg); transform-origin: right; }

/* ---------- Photo view ---------- */
.pv__scene--photo img { width: 100%; height: 100%; object-fit: cover; }
.pv__scene--photo { place-items: stretch; }

/* ---------- Footer line + section dots ---------- */
.pv__footer {
  position: absolute; left: var(--sp-4); bottom: var(--sp-3); z-index: 2;
  display: flex; flex-direction: column; gap: 2px;
}
.pv__summary { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; color: var(--color-ink); }
.pv__caption { font-size: var(--fs-label); color: var(--color-text-muted); }
.pv[data-view="photo"] .pv__footer { color: #fbf9f5; }
.pv[data-view="photo"] .pv__summary, .pv[data-view="photo"] .pv__caption { color: #fbf9f5; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }
.pv__dots {
  position: absolute; right: var(--sp-3); top: 50%; transform: translateY(-50%); z-index: 2;
  display: flex; flex-direction: column; gap: 4px;
}
.pv__dot { width: 20px; height: 20px; border: none; background: none; padding: 0; display: grid; place-items: center; }
.pv__dot span { width: 5px; height: 5px; border-radius: 50%; background: rgba(29, 27, 24, 0.25); transition: height 300ms var(--ease-out), background 300ms ease; }
.pv__dot[aria-current="true"] span { height: 18px; border-radius: 3px; background: var(--color-ink); }
.pv[data-view="photo"] .pv__dot span { background: rgba(255, 255, 255, 0.5); }
.pv[data-view="photo"] .pv__dot[aria-current="true"] span { background: #fff; }

/* ---------- Right column: hairline sections, one at a time ---------- */
/* ---------- Sections: preview on the left, copy on the right ---------- */
.pd-sec {
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.pd-sec--split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: center;
}
.pd-sec--intro { border-top: none; padding-top: var(--sp-3); align-items: start; }
.pd-sec__body { display: flex; flex-direction: column; min-width: 0; }

.pd-title { font-size: var(--fs-display-l); margin: 4px 0 var(--sp-2); }
.pd-rating { display: inline-flex; gap: 8px; align-items: center; font-size: var(--fs-label); color: var(--color-text-muted); }
.pd-rating .quote-card__stars { margin: 0; letter-spacing: 2px; }
.pd-price { margin: var(--sp-3) 0 var(--sp-2); font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-price__note { font-size: var(--fs-label); font-weight: 400; color: var(--forest); margin-inline-start: 10px; }
.pd-lede { font-size: var(--fs-body-l); color: var(--dark-grey); max-width: 460px; }
.pd-scrollcue { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--sp-4); font-weight: 600; font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; }

.pd-sec__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: var(--sp-2); }
.pd-sec__n { font-family: var(--font-display); font-size: 1.1rem; color: var(--grey); font-variant-numeric: tabular-nums; }
.pd-sec__title { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-display-m); }
.pd-sec__value { margin-inline-start: auto; font-size: var(--fs-label); color: var(--color-text-muted); }
.pd-sec__lede { color: var(--dark-grey); max-width: 460px; margin-bottom: var(--sp-3); }
.pd-link { text-decoration: underline; text-underline-offset: 3px; }

/* Choice rows — hairline list, radio + thumb + text (GESTE-quiet). */
.pd-choices { border-top: 1px solid var(--border); }
.pd-choice {
  width: 100%;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 4px;
  background: none; border: none; border-bottom: 1px solid var(--border);
  text-align: start; cursor: pointer;
  transition: background 150ms ease;
}
.pd-choice__radio {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--grey); position: relative; transition: border-color 150ms ease;
}
.pd-choice__radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--color-ink); transform: scale(0); transition: transform 200ms var(--ease-out);
}
.pd-choice.active .pd-choice__radio { border-color: var(--color-ink); }
.pd-choice.active .pd-choice__radio::after { transform: scale(1); }
.pd-choice__thumb { width: 56px; height: 56px; border-radius: 3px; overflow: hidden; flex-shrink: 0; }
.pd-choice__swatch { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; margin-inline: 14px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.pd-choice__text { display: flex; flex-direction: column; }
.pd-choice__label { font-weight: 600; }
.pd-choice__desc { font-size: var(--fs-label); color: var(--color-text-muted); line-height: 1.45; }
@media (hover: hover) { .pd-choice:hover { background: rgba(29, 27, 24, 0.025); } }

/* Paper swatches (choice thumbs). */
.nb-paper { background-color: #fbf8f1; box-shadow: inset 0 0 0 1px var(--border); }
.nb-paper--ruled {
  background-image:
    linear-gradient(90deg, transparent 16%, rgba(169, 80, 43, 0.35) 16%, rgba(169, 80, 43, 0.35) calc(16% + 1px), transparent calc(16% + 1px)),
    linear-gradient(180deg, transparent calc(100% - 1px), rgba(84, 104, 128, 0.35) calc(100% - 1px));
  background-size: 100% 100%, 100% 16%;
}
.nb-paper--dotted {
  background-image: radial-gradient(circle, rgba(58, 54, 50, 0.5) 0 1px, transparent 1.4px);
  background-size: 16% 16%; background-position: 8% 8%;
}

.pd-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border-top: 1px solid var(--border); }
.pd-facts > div { padding: 14px 0; border-bottom: 1px solid var(--border); }
.pd-facts dt { font-size: var(--fs-label); color: var(--color-text-muted); }
.pd-facts dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.15; }
.pd-spec td:first-child { color: var(--color-text-muted); width: 34%; }
.pd-spec td:last-child { text-align: start; }

.pd-reviews { display: flex; flex-direction: column; }
.pd-review { margin: 0; padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.pd-review:first-child { border-top: 1px solid var(--border); }
.pd-review p { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.3; margin: 8px 0; color: var(--color-ink); }
.pd-review footer { font-size: var(--fs-label); color: var(--color-text-muted); }

.pd-recap { max-width: none; margin: 0 0 var(--sp-3); padding: 0; background: none; box-shadow: none; border: none; border-top: 1px solid var(--border); }
.pd-recap .story-recap__row { padding: 12px 0; }
.pd-buy { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-2); }

/* ---------- Floating pill (build bar, GESTE-style) ---------- */
.pd-pill {
  left: 50%; right: auto; bottom: 20px;
  transform: translate(-50%, 140%);
  background: var(--color-ink); color: #f5f1ea;
  border: none; border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(29, 27, 24, 0.5);
}
.pd-pill.visible { transform: translate(-50%, 0); }
.pd-pill__inner { display: flex; align-items: center; gap: 18px; padding: 8px 8px 8px 18px; }
.pd-pill__dots { display: flex; gap: 8px; }
.pd-pill__dot { width: 18px; height: 18px; border-radius: 50%; border: none; padding: 0; background: var(--dot); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); cursor: pointer; }
.pd-pill__dot.active { box-shadow: 0 0 0 2px var(--color-ink), 0 0 0 3px #f5f1ea; }
.pd-pill__info { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.pd-pill__meta { font-size: var(--fs-label); color: rgba(245, 241, 234, 0.7); }
.pd-pill__price { font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-pill__add, .pd-pill__checkout {
  border: none; border-radius: 999px; padding: 10px 18px;
  background: #f5f1ea; color: var(--color-ink); font-weight: 600; font-size: var(--fs-label);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.pd-pill__checkout { background: transparent; color: #f5f1ea; box-shadow: inset 0 0 0 1px rgba(245, 241, 234, 0.4); }

/* ---------- Product page: tablet & phone ---------- */
@media (max-width: 960px) {
  .pv { --W: clamp(96px, 22vw, 150px); }
  .pv__callout { font-size: 10px; }
  .pv__callout::before, .pv__callout::after { display: none; }
  .pv__footer { left: var(--sp-2); bottom: var(--sp-1); }
  .pv__summary { font-size: 1.05rem; }
  .pv__dots { display: none; }
  .pd__info { padding: var(--sp-2) var(--sp-3) var(--sp-7); }
  .pd-sec--split { grid-template-columns: 1fr; gap: 0; }
  .pd-pill__meta { display: none; }
  .pd-pill__inner { gap: 12px; }
}
@media (max-width: 420px) { .pd-pill__dots { display: none; } }

/* ==========================================================================
   Site-wide tone-down (DECISIONS.md #28): the heavy material layer read as
   noise. Keep the calm GESTE register everywhere — flat paper surface,
   hairline edges, shadows only where an object actually sits on something.
   ========================================================================== */
body::before { opacity: 0.025; }
.surface-card, .quote-card, .story-recap {
  box-shadow: none;
  border: 1px solid rgba(29, 27, 24, 0.08);
}
.story-slide__card { box-shadow: 0 1px 2px rgba(29, 27, 24, 0.06); }

/* ==========================================================================
   To-Do pad preview (todo-lists.html) — DECISIONS.md #29. Reuses the
   product-page scaffolding above (.pd / .pv / .book3d / sections / pill);
   only the object and its printed sheet are new.
   ========================================================================== */
.pv--pad { --D: calc(var(--W) * 0.05); --r: 2px; }
.pv--pad .book3d__front::before { display: none; }

/* Printed sheet — sized in container units (cqw) so the exact same layout
   renders on the small 3D pad face and the large flat sheet. */
/* The wrapper is the size container, so .tds's own padding (in cqw)
   resolves against the sheet — an element can't query itself. */
.pad__sheet, .flatsheet { container-type: size; }
.tds {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 9cqw 7cqw 5cqw;
  background: #fbf8f1;
  color: #6f685e;
  font-family: 'Funnel Sans', sans-serif;
}
.tds__head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 2cqw; margin-bottom: 4cqw; border-bottom: 0.4cqw solid rgba(29, 27, 24, 0.55); }
.tds__title { font-family: var(--font-display); font-size: 8cqw; line-height: 1; color: #1d1b18; }
.tds__date { display: flex; align-items: flex-end; gap: 1.5cqw; font-size: 2.5cqw; letter-spacing: 0.14em; text-transform: uppercase; }
.tds__rule { display: inline-block; width: 22cqw; border-bottom: 0.3cqw solid rgba(29, 27, 24, 0.35); }
.tds__body { flex: 1; display: grid; grid-template-columns: 1fr 25cqw; gap: 5cqw; min-height: 0; }
.tds__label { font-size: 2.3cqw; letter-spacing: 0.18em; text-transform: uppercase; color: #a39b8f; margin: 1cqw 0 1cqw; }
.tds__list { list-style: none; margin: 0 0 4cqw; padding: 0; }
.tds__list li { position: relative; display: flex; align-items: flex-end; gap: 2.4cqw; height: 7cqw; border-bottom: 0.25cqw solid rgba(84, 104, 128, 0.3); }
.tds__n { width: 3cqw; font-family: var(--font-display); font-size: 3.8cqw; line-height: 1.2; color: #1d1b18; }
.tds__box { position: relative; flex-shrink: 0; width: 3.2cqw; height: 3.2cqw; margin-bottom: 1.1cqw; border: 0.3cqw solid rgba(29, 27, 24, 0.5); border-radius: 0.5cqw; }
.tds__line { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; padding-bottom: 0.9cqw; }
.tds__notes { border-left: 0.25cqw solid rgba(169, 80, 43, 0.35); padding-left: 3cqw;
  background-image: radial-gradient(circle, rgba(58, 54, 50, 0.3) 0 0.28cqw, transparent 0.4cqw);
  background-size: 4cqw 4cqw; background-position: 3cqw 6cqw; background-repeat: repeat; }
.tds__foot { text-align: center; font-family: var(--font-display); font-size: 2.4cqw; letter-spacing: 0.35em; color: #c8bfb0; }

/* Handwriting in blue-black ink, a stroke through when done, a tick in the box. */
.tds__hand { position: relative; font-family: 'Caveat', 'Funnel Sans', cursive; font-size: 5.2cqw; line-height: 1; color: #2b3a55; white-space: nowrap; }
.tds__hand::after {
  content: ""; position: absolute; left: -3%; top: 52%; height: 0.4cqw; width: 0;
  background: #2b3a55; border-radius: 1px; transform: rotate(-1.5deg);
  transition: width 420ms cubic-bezier(0.3, 0.7, 0.2, 1);
}
.tds__list li.is-done .tds__hand::after { width: 106%; }
.tds__list li.is-done .tds__hand { color: rgba(43, 58, 85, 0.75); }
.tds__box::after {
  content: ""; position: absolute; left: 0.7cqw; top: -1.6cqw; width: 1.5cqw; height: 3.6cqw;
  border: solid #2b3a55; border-width: 0 0.55cqw 0.55cqw 0; transform: rotate(40deg) scale(0); transform-origin: bottom left;
  transition: transform 260ms cubic-bezier(0.3, 0.7, 0.2, 1);
}
.tds__list li.is-done .tds__box::after { transform: rotate(40deg) scale(1); }
.tds__list--prio li.is-done .tds__n { color: #a39b8f; }

/* ---------- Tear-off: printed top sheet, glue strip, perforation ---------- */
.pv--pad .book3d__front { background: #fbf8f1; overflow: hidden; }
.pad__sheet { position: absolute; inset: 0; }
.pad__glue {
  position: absolute; left: 0; right: 0; top: 0; height: 4.5%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12)), var(--pv-cloth);
  transition: background-color 600ms ease;
}
.pad__glue::after { /* perforation just under the strip */
  content: ""; position: absolute; left: 0; right: 0; top: calc(100% + 5px);
  border-top: 1px dashed rgba(29, 27, 24, 0.28);
}
.pv--pad .book3d__top { background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), var(--pv-cloth); }
.pv--pad[data-format="Tear-off"] .book3d__spine {
  background: repeating-linear-gradient(0deg, #f6f1e7 0 1px, #e6dfd1 1px 2px);
  filter: none;
}
/* ---------- Bound: cloth cover with a stitched edge ---------- */
.pad__cover {
  position: absolute; inset: 0; display: grid; place-items: center;
  background-color: var(--pv-cloth);
  background-image:
    linear-gradient(100deg, rgba(255, 252, 245, 0.10) 0%, rgba(255, 252, 245, 0) 45%, rgba(0, 0, 0, 0.10) 100%),
    url("../img/tex/cloth.jpg");
  background-size: 100% 100%, 140px;
  background-blend-mode: normal, soft-light;
  opacity: 0; transition: opacity 500ms ease, background-color 600ms ease;
}
.pad__cover::before { /* saddle stitches along the binding edge */
  content: ""; position: absolute; top: 6%; bottom: 6%; left: 5%; width: 1.5px;
  background: repeating-linear-gradient(180deg, rgba(255, 250, 238, 0.55) 0 7px, transparent 7px 13px);
}
.pv[data-tone="light"] .pad__cover::before { background: repeating-linear-gradient(180deg, rgba(60, 44, 24, 0.45) 0 7px, transparent 7px 13px); }
.pv--pad[data-format="Bound"] .pad__cover { opacity: 1; }
.pv--pad[data-format="Bound"] .pad__glue { opacity: 0; }
.pv--pad[data-format="Bound"] .book3d__top { background: repeating-linear-gradient(0deg, #f8f4ec 0 1px, #e9e2d5 1px 2px); }
.pv--pad .book3d__mark { font-size: calc(var(--W) * 0.09); }

/* ---------- Flat sheet views (The page, Crossing it off) ---------- */
.pv[data-view="page"] .pv__scene--sheet,
.pv[data-view="list"] .pv__scene--sheet {
  opacity: 1; visibility: visible;
  transition: opacity 600ms var(--ease-out), visibility 0s;
}
.pv[data-view="page"] .pv__callouts { opacity: 1; }
.pv__sheetwrap { position: relative; width: calc(var(--W) * 1.5); aspect-ratio: 148 / 210; transform: rotate(-2deg); }
.flatsheet {
  position: absolute; inset: 0; overflow: hidden; border-radius: 1px;
  /* the rest of the pad peeking out beneath the top sheet, then one
     contact shadow on the surface */
  box-shadow:
    0 1px 1px rgba(52, 40, 24, 0.14),
    1px 2px 0 #efe9dd, 2px 4px 0 #e6dfd1, 3px 5px 0 #dbd3c3,
    0 34px 44px -22px rgba(52, 40, 24, 0.38);
  transition: opacity 500ms ease;
}
.pv--pad[data-format="Tear-off"] .flatsheet::before {
  content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 4%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12)), var(--pv-cloth);
}
.pv--pad[data-format="Bound"] .flatsheet::before {
  content: ""; position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; width: 3%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0)), var(--pv-cloth);
}
.flatsheet--written { opacity: 0; }
.pv[data-view="list"] .flatsheet--blank { opacity: 0; }
.pv[data-view="list"] .flatsheet--written { opacity: 1; }

/* ==========================================================================
   Home + About in the product-page register — DECISIONS.md #30.
   ========================================================================== */

/* ---------- Feature cards (Kanmon-style tiles) ---------- */
.features { padding: var(--sp-5) 0 var(--sp-6); }
.feature-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.feature-card {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 260px;                 /* equal heights: grid stretch + a floor */
  padding: var(--sp-3);
  background: #ece7de;
  border-radius: 4px;
}
.feature-card__icon { width: 30px; height: 30px; stroke-width: 1.25; color: var(--color-ink); }
.feature-card__text { margin-top: var(--sp-6); }
.feature-card__title { font-family: 'Funnel Sans', sans-serif; font-size: var(--fs-body-l); font-weight: 600; margin: 0 0 6px; }
.feature-card__sub { margin: 0; font-size: var(--fs-body); color: var(--color-text-muted); line-height: 1.5; }
@media (max-width: 960px) { .feature-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-cards { grid-template-columns: 1fr; } .feature-card { min-height: 200px; } }

/* ---------- Values: numbered rows with one hairline detail each ---------- */
.values { padding: var(--sp-7) 0; }
.value-row { margin-top: var(--sp-6); }
.value { max-width: 440px; }
.value__n { display: block; font-family: var(--font-display); font-size: 1.1rem; color: var(--grey); margin-bottom: var(--sp-1); }
.value__title { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-display-m); margin-bottom: var(--sp-2); }
.value__body { font-size: var(--fs-body-l); color: var(--dark-grey); }
.value__detail {
  display: grid; grid-template-columns: 150px 1fr; gap: var(--sp-2);
  margin-top: var(--sp-3); padding-top: var(--sp-2); border-top: 1px solid var(--border);
  font-size: var(--fs-body); color: var(--dark-grey);
}
.value__detail-label { font-weight: 600; color: var(--color-ink); }
@media (max-width: 600px) { .value__detail { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Proof, not promises ---------- */
.proof { padding: var(--sp-7) 0; background: #ece7de; }
.proof__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--sp-6); align-items: center; }
.bleed { margin: 0; }
.bleed__stage {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-4);
  border-radius: 4px;
  background: linear-gradient(180deg, #f1ede6 0%, #e7e1d6 100%);   /* the seamless backdrop */
}
.bleed__sheet {
  position: relative; aspect-ratio: 148 / 180;
  background: #fbf8f1;
  box-shadow: 0 1px 1px rgba(52, 40, 24, 0.12), 0 22px 30px -20px rgba(52, 40, 24, 0.4);
}
.bleed__sheet--front { transform: rotate(-1.5deg); }
.bleed__sheet--back { transform: rotate(1.5deg); }
.bleed__side { position: absolute; top: -26px; left: 0; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); }
.bleed__ink { position: absolute; inset: 8% 6% 8% 30%; width: 64%; height: 84%; }
.bleed__labels {
  position: absolute; inset: 8% auto 8% 6%; width: 24%;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-rows: repeat(6, 1fr);
  font-size: 10px; color: var(--color-text-muted); line-height: 1.1;
}
.bleed__labels li { display: flex; align-items: center; }
.bleed figcaption { margin-top: var(--sp-2); font-size: var(--fs-label); color: var(--color-text-muted); }
.proof__list { margin: 0; border-top: 1px solid rgba(29, 27, 24, 0.14); }
.proof__item { display: grid; grid-template-columns: 140px 1fr; gap: var(--sp-3); align-items: baseline; padding: var(--sp-3) 0; border-bottom: 1px solid rgba(29, 27, 24, 0.14); }
.proof__item dt { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--color-ink); }
.proof__item dd { margin: 0; color: var(--dark-grey); }
.proof__item strong { color: var(--color-ink); }
@media (max-width: 960px) { .proof__grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .proof__item { grid-template-columns: 1fr; gap: 4px; } .bleed__stage { padding: var(--sp-5) var(--sp-2) var(--sp-3); } }

/* ---------- Home reviews: hairline quotes ---------- */
.home-reviews { padding: var(--sp-7) 0; }
.home-reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.home-reviews__grid .pd-review { border-top: 1px solid var(--border); border-bottom: none; }
@media (max-width: 960px) { .home-reviews__grid { grid-template-columns: 1fr; gap: 0; } }


/* ==========================================================================
   About — modelled on linear.app/about (DECISIONS.md #32). One strict grid:
   heading in the left column, content in the right; sections separated by
   hairlines and generous space; one wide rounded media block; monochrome
   square portraits; logo-style tiles with a dense name list; centred close.
   ========================================================================== */
.lx { --lx-gap: clamp(var(--sp-4), 6vw, var(--sp-8)); }
.lx-hero { padding-top: clamp(var(--sp-7), 12vh, 180px); padding-bottom: var(--sp-5); }
.lx-hero__title { font-size: clamp(2.6rem, 3.4vw + 1rem, 4.4rem); line-height: 1.04; letter-spacing: -0.02em; }
.lx-hero__sub { margin: var(--sp-2) 0 0; font-size: var(--fs-body); color: var(--color-text-muted); }
.lx-media { margin: 0 calc(var(--sp-4) * -0.5); }
.lx-media__img { aspect-ratio: 16 / 9; border-radius: 10px; }

.lx-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--lx-gap); align-items: start;
  padding-block: var(--sp-8) 0;
}
.lx-row__title { font-size: clamp(1.9rem, 1.6vw + 1rem, 2.6rem); line-height: 1.1; max-width: 12ch; }
.lx-row__body p { color: var(--color-text-muted); font-size: var(--fs-body); line-height: 1.65; max-width: 520px; }
.lx-lead { font-size: 1.3rem !important; line-height: 1.45 !important; color: var(--color-ink) !important; margin-bottom: var(--sp-3); }
.lx-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); color: var(--color-text-muted); }
@media (hover: hover) { .lx-link:hover { color: var(--color-ink); } }

.lx-section { margin-top: var(--sp-8); border-top: 1px solid var(--border); }
.lx-section.lx-row { padding-top: var(--sp-7); }
.lx-section > .lx-row--head { padding-top: var(--sp-7); }

.lx-people { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-3) var(--sp-2); margin-top: var(--sp-7); }
.lx-person { margin: 0; }
.lx-person__img { aspect-ratio: 1; border-radius: 4px; filter: grayscale(1) contrast(1.02); }
.lx-person figcaption { display: flex; flex-direction: column; padding-top: 12px; }
.lx-person__name { font-size: var(--fs-body); font-weight: 600; color: var(--color-ink); }
.lx-person__role { font-size: var(--fs-label); color: var(--color-text-muted); }

.lx-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.lx-steps li { display: grid; grid-template-columns: 40px 110px 1fr; gap: var(--sp-2); padding: 16px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.lx-steps__n { font-family: var(--font-display); color: var(--grey); }
.lx-steps__name { font-weight: 600; color: var(--color-ink); }
.lx-steps__text { color: var(--color-text-muted); }

.lx-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.lx-tile { margin: 0; }
.lx-tile__card { aspect-ratio: 16 / 9; border-radius: 4px; display: grid; place-items: center; }
.lx-tile__card span { font-family: var(--font-display); font-size: clamp(1.3rem, 1.2vw + 0.8rem, 1.9rem); }
.lx-tile__card--paper { background: #fbf8f1; box-shadow: inset 0 0 0 1px var(--border); color: var(--color-ink); }
.lx-tile__card--cloth { background: var(--forest); color: #f1ede4; }
.lx-tile__card--kraft { background: #c4a47c; color: #3a2a17; }
.lx-tile figcaption { display: flex; flex-direction: column; padding-top: 10px; }
.lx-tile__name { font-size: var(--fs-body); font-weight: 600; color: var(--color-ink); }
.lx-tile__sub { font-size: var(--fs-label); color: var(--color-text-muted); }
.lx-voices__title { font-family: 'Funnel Sans', sans-serif; font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); margin: var(--sp-6) 0 var(--sp-2); }
.lx-voices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2) var(--sp-3); }
.lx-voices li { display: flex; flex-direction: column; }
.lx-voices__name { font-weight: 600; font-size: var(--fs-body); color: var(--color-ink); }
.lx-voices__role { font-size: var(--fs-label); color: var(--color-text-muted); }

.lx-close { text-align: center; padding: var(--sp-9) var(--sp-4) var(--sp-8); margin-top: var(--sp-8); border-top: 1px solid var(--border); }
.lx-close__title { font-size: clamp(2.6rem, 4vw + 1rem, 5rem); line-height: 1.02; letter-spacing: -0.02em; }
.lx-close__actions { display: flex; gap: var(--sp-1); justify-content: center; margin-top: var(--sp-4); }
.lx-close .btn { border-radius: 999px; }

@media (max-width: 960px) {
  .lx-row { grid-template-columns: 1fr; gap: var(--sp-3); padding-top: var(--sp-6); }
  .lx-section.lx-row, .lx-section > .lx-row--head { padding-top: var(--sp-5); }
  .lx-section { margin-top: var(--sp-6); }
  .lx-people { grid-template-columns: repeat(2, 1fr); margin-top: var(--sp-5); }
  .lx-tiles { grid-template-columns: 1fr 1fr; }
  .lx-media { margin: 0; }
  .lx-media__img { aspect-ratio: 4 / 3; }
}
@media (max-width: 520px) {
  .lx-steps li { grid-template-columns: 32px 1fr; }
  .lx-steps__text { grid-column: 2; }
  .lx-voices { grid-template-columns: 1fr; }
}
@media (max-width: 960px) { .lx-hero__title br { display: none; } }

/* ==========================================================================
   Product pages — one preview per section (product-preview.js), fixed to
   that section's view and live-updated with the build. Beside the copy on
   desktop; above it on tablet and phone.
   ========================================================================== */
.pv--inline {
  --W: clamp(150px, 15vw, 230px);
  position: relative;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
}
.pv--inline .pv__footer { left: var(--sp-3); bottom: var(--sp-3); }
/* Drawn views: the section's own value label already names the choice,
   and an overlaid caption would collide with the object/dimension lines.
   Photo views keep their caption. */
.pv--inline:not([data-view="photo"]) .pv__footer { display: none; }
@media (max-width: 960px) {
  .pv--inline { --W: clamp(118px, 30vw, 210px); aspect-ratio: 4 / 3; margin: 0 0 var(--sp-3); }
  .pv--inline .pv__footer { left: var(--sp-2); bottom: var(--sp-2); }
  .pv--inline .pv__summary { font-size: 1.05rem; }
  .pd-sec--intro .pv--inline { aspect-ratio: 1 / 1; margin-top: var(--sp-1); }
  .pd__info { padding-top: var(--sp-2); }
  .pd-sec { padding: var(--sp-4) 0 var(--sp-5); }
}
@media (max-width: 960px) and (min-width: 601px) {
  .pv--inline { aspect-ratio: 16 / 9; --W: clamp(140px, 20vw, 220px); }
  .pd-sec--intro .pv--inline { aspect-ratio: 16 / 10; }
}
