/* Zone Theta — Does It Really Work? page (does-it-work.html, generated by tools/build_does_it_work.py).
   Shared parts .dw-*; the page's layout .dwa-* (A · The long read). Owner picks: A1 · Wide photo's read
   (2026-10-29) with round 6's D · Smaller photo top (2026-10-29); research: research/does-it-work.md.
   One copy of Zach's words (content/does-it-work.md).
   A long read: page title at the shared size, body 18px / 1.72 at <= 64ch, Gelica for headings and the lead.
   Motion: each part arrives once (transform/opacity only); the photo settles in. The photo is a stand-in. */

:root { --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1); --photo-radius: 16px; }
html.motion { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* ---------- Shared type ---------- */
.dw-h1 {
  margin: 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.25rem, 3.8vw, 3.5rem); line-height: 1.03; letter-spacing: -0.025em; text-wrap: balance;
}
/* The title centred on a hairline, like home's "Areas of Focus" (owner, 2026-11-18): a line runs out to
   each edge of the page, with room beneath it. Below 600px the title is too long to share a line with them,
   so it is centred on its own over two lines. */
.dw-h1 { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); margin-bottom: clamp(16px, 3vw, 40px); text-align: center; }
@media (max-width: 599px) {
  .dw-h1 { justify-content: center; text-wrap: balance; }
  .dw-h1::before, .dw-h1::after { display: none; }
}
.dw-h1 > span { flex: 0 1 auto; }
.dw-h1::before, .dw-h1::after {
  content: ""; flex: 1 1 0; min-width: 20px; height: 1px;
  background: color-mix(in oklab, var(--ink) 18%, var(--paper));
}
/* Zach's first words under the title, set as the page's lead (as on the topic pages) */
.dw-lead {
  margin: clamp(18px, 2vw, 28px) 0 0; max-width: 36ch;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.5rem, 2.3vw, 2.125rem); line-height: 1.28; letter-spacing: -0.012em; text-wrap: pretty;
}
.dw-head .dw-prose { margin-top: 24px; }
.dw-h2 {
  margin: 0 0 24px; max-width: 30ch;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.875rem, 3.2vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance;
}
.dw-prose p {
  margin: 0; max-width: 64ch;
  font-size: 1.125rem; line-height: 1.72; text-wrap: pretty;
  color: color-mix(in oklab, var(--ink) 90%, var(--paper));
}
.dw-prose p + p { margin-top: 1.05em; }
/* .dw-lorem marks Lorem ipsum standing in for Zach's words (TODO(Zach) in the HTML). It looks exactly like
   real text (owner, 2026-10-22): no muting, no underline. */

/* A part of the read: the About page's rhythm (space, then a hairline, then the heading) */
.dw-sec { margin-top: clamp(72px, 9vw, 120px); padding-top: 32px; border-top: 1px solid var(--line); }

/* Zach's source for a part: one quiet line under the words, linking to the article */
.dw-source {
  margin: 28px 0 0; max-width: 64ch; align-self: start;
  font-size: 0.9375rem; line-height: 1.5; color: var(--muted);
}
.dw-source-label { margin-right: 6px; font-weight: 500; color: var(--ink); }
.dw-source a {
  color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklab, var(--ink) 35%, transparent); transition: text-decoration-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .dw-source a:hover { text-decoration-color: var(--ink); } }
.dw-source a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

/* Stand-in photos: one grade for all, labelled until Zach chooses the real set (DESIGN.md §9) */
.dw-photo { position: relative; margin: 0; overflow: hidden; border-radius: var(--photo-radius); background: var(--paper-deep); }
.dw-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.72) sepia(0.1) contrast(0.96);
}
.dw-photo--real img { filter: none; } /* Zach's own photos show as taken */
.dw-standin {
  position: absolute; top: 10px; right: 10px; z-index: 2; padding: 4px 7px; border-radius: 4px;
  background: rgb(23 19 26 / 60%); color: #f7f4ef; font-size: 0.6875rem; line-height: 1.2; letter-spacing: 0.02em; pointer-events: none;
}

/* The research shows / can't confirm: two halves of one honest answer, side by side, one hairline between */
.dw-half .dw-h2 { font-size: clamp(1.625rem, 2.5vw, 2.25rem); max-width: 18ch; }
.dw-half + .dw-half { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--spine, var(--line)); }
/* Side by side (A from 1280px), the heading, text and sources rows line up across the two
   halves (subgrid), however the headings wrap */

/* Closing: Zach's own last words */
.dw-close { margin-top: clamp(96px, 12vw, 168px); padding-top: 32px; border-top: 1px solid var(--line); }
.dw-close-h {
  margin: 0; max-width: 16ch;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.25rem, 4.4vw, 4rem); line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance;
}
.dw-close-p {
  margin: 18px 0 0; max-width: 32ch;
  font-family: var(--font-display); font-size: clamp(1.25rem, 1.9vw, 1.75rem); line-height: 1.35; text-wrap: pretty;
}

/* ---------- Each part arrives once ---------- */
.motion [data-dw-reveal] .dw-fade { opacity: 0; transform: translateY(12px); }
.motion [data-dw-reveal].is-in .dw-fade {
  opacity: 1; transform: none;
  transition: opacity 800ms ease, transform 1000ms var(--ease-reveal);
  transition-delay: calc(100ms + var(--i, 0) * 90ms);
}

/* =====================================================================
   A · The long read (Harvest, Dub, Attio: contents beside the article; Wild, MindMarket: two plain columns
   for "good at / not good at"). The read keeps its contents beside it: a sceptic can go straight to "What
   the research can't confirm", and the contents quietly mark the part you're in. The two research parts
   share one panel.
   ===================================================================== */
.dwa { padding-block: var(--page-top) clamp(96px, 11vw, 160px); }

/* The top (round 6 D · Smaller photo, owner 2026-10-29; Canva, Craft, Wise in the research): the title on
   one line across the page; under it, Zach's first words beside a smaller landscape photo (4:3, about 40% of
   the width, near the stand-in's real size and uncropped), level with the lead. It fills the right side
   while the words stay the first thing you read. Below 900px: the words, then the photo at 3:2.
   It replaced A1's wide 21:9 photo under the words, which the owner found looked bad (rounds 6, 6b). */
.dw-side { margin-top: 40px; }
.dw-side .dw-photo { aspect-ratio: 3 / 2; }
@media (min-width: 900px) {
  .dw-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(40px, 5vw, 96px); align-items: start; }
  .dw-h1 { grid-column: 1 / -1; }
  .dw-side { margin-top: clamp(18px, 2vw, 28px); } /* level with the lead */
  .dw-side .dw-photo { aspect-ratio: 4 / 3; }
}
/* The photo settles in once, slowly */
.motion [data-dw-settle] img { transform: scale(1.06); }
.motion [data-dw-settle].is-in img { transform: none; transition: transform 1800ms var(--ease-reveal); }

.dwa-grid { margin-top: clamp(72px, 9vw, 128px); }
.dwa-toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.dwa-toc a {
  position: relative; display: block; padding: 9px 0 9px 18px;
  font-size: 0.9375rem; line-height: 1.4; text-decoration: none; color: var(--muted);
  transition: color 200ms ease;
}
.dwa-toc a::before {
  content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 2px; background: var(--ink);
  transform: scaleY(0); transition: transform 300ms var(--ease-out);
}
.dwa-toc a.is-active { color: var(--ink); }
.dwa-toc a.is-active::before { transform: none; }
@media (hover: hover) and (pointer: fine) { .dwa-toc a:hover { color: var(--ink); } }
.dwa-main > :first-child { margin-top: 0; }
@media (max-width: 1023px) {
  /* Phones and tablets: the contents sit under the top as a plain list of the parts */
  .dwa-toc { margin-bottom: clamp(56px, 8vw, 80px); }
}
@media (min-width: 1024px) {
  .dwa-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: clamp(48px, 6vw, 112px); align-items: start; }
  .dwa-toc { position: sticky; top: calc(var(--nav-h) + 32px); }
}
.dwa-pair { margin-top: clamp(72px, 9vw, 120px); }
.dwa-pair .dw-pair-in {
  --spine: color-mix(in oklab, var(--ink) 22%, var(--paper-deep));
  padding: clamp(24px, 3.5vw, 56px); border-radius: 24px; background: var(--paper-deep);
}
@media (min-width: 1280px) {
  .dwa-pair .dw-pair-in { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); }
  .dwa-pair .dw-half { display: grid; grid-row: span 3; grid-template-rows: subgrid; padding-right: clamp(24px, 2.5vw, 40px); }
  .dwa-pair .dw-half + .dw-half { margin: 0; padding: 0 0 0 clamp(24px, 2.5vw, 40px); border-top: 0; border-left: 1px solid var(--spine); }
  .dwa-pair .dw-prose p { font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  .motion [data-dw-reveal] .dw-fade { transition-duration: 1ms !important; }
}
