.cp { margin: 0 clamp(12px, 2vw, 40px); }
.cp section { padding: clamp(56px, 8vw, 120px) clamp(24px, 6vw, 96px); }
.cp h1 { font-weight: 400; letter-spacing: -.045em; line-height: 1.1; font-size: clamp(44px, 7vw, 96px); }
.cp .lede { margin-top: 24px; max-width: 640px; font-size: clamp(19px, 2.2vw, 28px); line-height: 1.35; letter-spacing: -.025em; color: var(--muted); }
.cp__hero { text-align: center; padding-block: clamp(48px, 7vw, 110px) !important; }
.cp__hero .lede { margin-inline: auto; }

/* Manifesto: a wall of text. */
.cp .cp-wall { padding: 0; }
.cp-wall__text {
  max-width: 24em;
  margin: 0 auto;
  padding: clamp(96px, 14vw, 200px) clamp(24px, 6vw, 96px);
  font-size: clamp(23px, 2.6vw, 36px);
  line-height: 1.3;
  letter-spacing: -.03em;
  color: #6e6e73;
}
.cp-wall__text h2, .cp-wall__text em { font: inherit; font-style: normal; color: var(--ink); }
.cp-wall__text h2 { margin: 0; }
.cp-wall__text p { margin-top: 1.1em; }
.cp-wall__text p, .cp-wall__text h2 { text-wrap: pretty; text-shadow: 0 0 24px #fff, 0 0 12px #fff; }
.cp-wall__sign { padding-top: 1.4em; font-size: .5em; letter-spacing: 0; color: var(--muted); }
.cp-wall__cta { margin-top: 32px; letter-spacing: normal; }
[data-theme="dark"] .cp-wall__text { color: #9a9aa2; }
[data-theme="dark"] .cp-wall__text h2, [data-theme="dark"] .cp-wall__text em { color: #f5f5f7; }
[data-theme="dark"] .cp-wall__text p, [data-theme="dark"] .cp-wall__text h2 { text-shadow: 0 0 24px #101012, 0 0 12px #101012; }

/* Hero film: live Three.js room scan (composer-scan.js), sits under the lede.
   The poster holds the frame until the canvas has drawn, then the canvas fades in over it. */
/* The film breaks out of the section's inline padding (same clamp as `.cp section`) and spans
   the page up to 1440px. Phones get a taller 4:5 frame; both canvas and poster cover-fit. */
.cp-film {
  --film-gutter: clamp(24px, 6vw, 96px);
  --film-w: min(1440px, calc(100% + 2 * var(--film-gutter)));
  position: relative; width: var(--film-w); margin: 0 calc((100% - var(--film-w)) / 2);
}
.cp-film__media {
  position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9;
  border-radius: clamp(20px, 2.4vw, 36px); corner-shape: squircle;
  background: #0b0b0c;
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / .45), 0 0 0 1px rgb(0 0 0 / .06);
}
.cp-film__media :is(img, canvas) { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.cp-film__media img { object-fit: cover; }
.cp-film__media canvas { opacity: 0; transition: opacity .6s ease; }
.cp-film__media.is-live canvas { opacity: 1; }
/* Click/tap pings the room once it's live; repeated clicks shouldn't select the lede. */
.cp-film:has(.cp-film__media.is-live) { cursor: crosshair; -webkit-user-select: none; user-select: none; }

/* Lede sits over the top of the film, on a soft scrim for legibility. */
.cp-film::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 55%; z-index: 1; pointer-events: none;
  border-radius: clamp(20px, 2.4vw, 36px) clamp(20px, 2.4vw, 36px) 0 0;
  background: linear-gradient(rgb(0 0 0 / .55), transparent);
}
.cp-film__lede {
  position: absolute; z-index: 2; top: clamp(20px, 7%, 64px); left: 50%;
  width: min(88%, 620px); margin: 0; transform: translateX(-50%);
  font-size: clamp(17px, 2.2vw, 28px); line-height: 1.3; letter-spacing: -.025em;
  color: #fff; text-wrap: balance; text-shadow: 0 1px 18px rgb(0 0 0 / .45);
}

/* One sentence per line in the hero lede. */
.cp-film__lede { width: min(92%, 760px); text-wrap: pretty; }
.cp-film__lede span { display: block; }

/* Chosen hero lede: large, light weight (matches the essay text below).
   Each sentence stays on one line, with type scaled to the hero: the longest sentence is
   ~22.5em wide in the display cut, ~25.6em in the wider text cut the system font uses under
   20px. Small heroes get smaller type and a tighter top so the lede covers less of the scene;
   only below 300px (tiny phones) may a sentence wrap. */
.cp-film { container-type: inline-size; }
.cp-film__lede span { white-space: nowrap; }
.cp-film__lede { font-size: clamp(18px, 4cqi, 44px); font-weight: 300; letter-spacing: -.035em; line-height: 1.15; width: min(94%, 900px); }
@container (max-width: 500px) { .cp-film__lede { font-size: max(11px, 3.6cqi); top: 12px; } }
@container (max-width: 300px) { .cp-film__lede span { white-space: normal; } }
.cp-wall__text { font-weight: 300; }
.cp-wall__text :is(h2, em) { font-weight: 400; }

/* Phones: a taller 4:5 frame (kept last so it overrides the 16:9 base). */
@media (max-width: 600px) {
  .cp-film__media { aspect-ratio: 4 / 5; }
  .cp-film::before { height: 35%; }
}
