/* PageCast landing page.

   The page travels the way the product does: it begins as something you read
   (paper, serif body text) and ends as something you watch (film black, video
   glowing). The hero performs the cut rather than describing it.

   Type: Bricolage Grotesque for display against Newsreader for reading — a sans
   headline over a serif body, the inverse of the usual pairing. */

:root {
  --paper: #eceeef;
  --paper-deep: #dfe2e4;
  --ink: #0d1014;
  --ink-soft: #55606a;
  --rule: #c5cbd0;

  --film: #0a0c0f;
  --film-soft: #141922;
  --bone: #eae7e0;
  --bone-soft: #9aa3ad;
  --film-rule: #242c36;

  --ember: #d2541f;
  --keep: #1d6a4f;

  --wrap: 1180px;
  --pad: clamp(1.1rem, 4vw, 3.2rem);
  --measure: 58ch;

  --sans: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  color-scheme: only light; /* opt out of browser "force dark mode", which inverted the artwork */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(1.02rem, .98rem + .22vw, 1.14rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: from-font; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 2.5px solid var(--ember); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }

h1, h2, .count, .btn, .masthead, .points dt, .side-label, .provenance, figcaption, .note, .signup input, .blk {
  font-family: var(--sans);
}
h1, h2 {
  margin: 0;
  font-weight: 800;
  font-variation-settings: 'wdth' 92;
  letter-spacing: -.035em;
  line-height: .94;
  text-wrap: balance;
}
h1 { font-size: clamp(2.7rem, 1.4rem + 5.4vw, 5.2rem); }
h2 { font-size: clamp(2rem, 1.2rem + 3.1vw, 3.4rem); }
h2.wide { max-width: 20ch; }
.lede { max-width: var(--measure); margin: 1.1rem 0 0; color: var(--ink-soft); }
.film .lede { color: var(--bone-soft); }

/* ── masthead ─────────────────────────────────────────────── */
.masthead {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem var(--pad);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.wordmark { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; text-decoration: none; }
.wordmark img { border-radius: 7px; }
.masthead nav { display: flex; align-items: center; gap: clamp(.8rem, 2.2vw, 1.8rem); font-size: .94rem; font-weight: 500; }
.masthead nav a { text-decoration: none; color: var(--ink-soft); }
.masthead nav a:hover { color: var(--ink); }
.masthead .pill { background: var(--ink); color: var(--paper); padding: .45rem 1rem; border-radius: 999px; font-weight: 600; }
.masthead .pill:hover { background: var(--ember); color: #fff; }
@media (max-width: 640px) { .masthead nav a:not(.pill) { display: none; } }

/* ── hero ─────────────────────────────────────────────────── */
.hero { padding-block: clamp(2.6rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-copy .lede { font-size: 1.06em; }

/* the cut, performed: a page diagram that loses its furniture, then the video */
.stage { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.sheet {
  position: absolute; inset: 0 30% 6% 0;
  background: #fff; border: 1px solid var(--rule); border-radius: 3px;
  padding: .7rem; display: flex; flex-direction: column; gap: .4rem;
  box-shadow: 0 18px 40px -30px rgba(9, 15, 17, .6);
  transition: transform .9s cubic-bezier(.2, .7, .2, 1), opacity .9s ease;
  font-size: .68rem; color: var(--ink-soft);
  overflow: hidden;
}
.blk { border-radius: 2px; padding: .28rem .45rem; background: var(--paper-deep); transition: opacity .55s ease, transform .55s ease, color .4s ease; }
.blk.bar { display: flex; gap: .3rem; background: none; padding: .1rem .2rem; }
.blk.bar i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--rule); }
.blk.strip, .blk.foot, .blk.related { background: none; border-block: 1px solid var(--rule); border-radius: 0; font-size: .57rem; }
.blk.appeal { background: #f6ece1; border: 1px solid #e3cdb4; text-align: center; padding-block: .75rem; letter-spacing: .01em; }
.blk.toc { background: #eaeef2; border: 1px solid var(--rule); font-size: .58rem; padding-block: .5rem; }
.blk.head { background: none; font-size: 1.15rem; font-weight: 800; line-height: 1.04; color: var(--ink); letter-spacing: -.025em; padding-inline: .1rem; }
.blk.byline { background: none; padding-inline: .1rem; font-size: .55rem; }
.blk.photo { flex: 1 1 4.5rem; min-height: 3rem; background: linear-gradient(145deg, #c9d2d8, #aab6bf 60%, #9aa7b1); border-radius: 2px; }
.blk.para { background: none; padding-inline: .1rem; min-height: 2.5rem;
  background-image: repeating-linear-gradient(to bottom, var(--paper-deep) 0 .32rem, transparent .32rem .6rem); }
.blk.para.short { min-height: 1.5rem; }

.blk[data-fate="cut"] { position: relative; }
.blk[data-fate="cut"]::after {
  content: ''; position: absolute; left: .35rem; right: .35rem; top: 50%;
  height: 1.5px; background: var(--ember); transform: scaleX(0); transform-origin: left;
  transition: transform .45s ease;
}
.sheet.cut .blk[data-fate="cut"] {
  opacity: .62; transform: scaleY(.74);
  color: var(--ember); background-color: transparent; background-image: none;
  border-color: color-mix(in srgb, var(--ember) 35%, transparent);
}
.sheet.cut .blk[data-fate="cut"]::after { transform: scaleX(1); }
.sheet.done { transform: translateX(-2%) scale(.97); opacity: .9; }

.screen {
  position: absolute; right: 0; bottom: 3%; width: 70%; margin: 0;
  aspect-ratio: 16 / 9; background: var(--film); border-radius: 4px; overflow: hidden;
  box-shadow: 0 34px 70px -34px rgba(9, 12, 17, .8), 0 0 0 1px rgba(13, 16, 20, .1);
  opacity: 0; transform: translateY(1.4rem) scale(.97);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.screen.in { opacity: 1; transform: none; }
.screen video { width: 100%; height: 100%; object-fit: cover; }
.btn.sound {
  position: absolute; right: .55rem; bottom: .55rem;
  background: rgba(255, 255, 255, .9); border: 0; color: var(--ink);
  font-size: .8rem; padding: .35rem .7rem;
}
.btn.sound[aria-pressed="true"] { background: var(--ember); color: #fff; }
@media (min-width: 901px) { .stage { min-height: 25rem; } }
@media (max-width: 900px) { .stage { aspect-ratio: 5 / 4; } .screen { width: 76%; } }

.provenance {
  display: flex; flex-wrap: wrap; gap: .3rem 1.5rem;
  margin: clamp(1.4rem, 3vw, 2.4rem) auto 0;
  font-size: .82rem; color: var(--ink-soft); font-weight: 500;
}
.provenance a { color: var(--ink); }

/* ── buttons and signup ───────────────────────────────────── */
.btn {
  font-size: .98rem; font-weight: 600;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  padding: .68rem 1.25rem; border-radius: 2px; cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.btn.primary { background: var(--ember); border-color: var(--ember); color: #fff; }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.film .btn.primary:hover { background: var(--bone); color: var(--film); border-color: var(--bone); }

.signup { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-top: clamp(1.6rem, 3vw, 2.2rem); }
.signup label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.signup input {
  flex: 1 1 13rem; min-width: 11rem; max-width: 18rem;
  font-size: .98rem; padding: .68rem .85rem; border-radius: 2px;
  border: 1px solid var(--rule); background: #fff; color: var(--ink);
}
.film .signup input { background: var(--film-soft); border-color: var(--film-rule); color: var(--bone); }
.signup input:hover { border-color: var(--ink-soft); }
.signup .note { flex: 1 0 100%; margin: .35rem 0 0; font-size: .84rem; color: var(--ink-soft); max-width: 50ch; font-weight: 500; }
.film .signup .note { color: var(--bone-soft); }
.signup .note.error { color: var(--ember); }
.signup .note.ok { color: var(--keep); }
@media (max-width: 520px) { .signup input, .signup .btn { flex: 1 0 100%; } }

/* ── the cut, as data ─────────────────────────────────────── */
.cut-section { padding-block: clamp(3.4rem, 7vw, 6rem); border-top: 1px solid var(--rule); background: linear-gradient(to bottom, var(--paper), var(--paper-deep)); }
.cut-head { max-width: 46rem; margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: clamp(1.8rem, 4vw, 3.4rem); }
.side { border-top: 2px solid currentColor; padding-top: .6rem; }
.side.keep { color: var(--keep); }
.side.cut { color: var(--ember); }
.count { margin: 0; font-weight: 800; font-variation-settings: 'wdth' 78; font-size: clamp(4rem, 2rem + 7vw, 7.5rem); line-height: .8; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.side-label { margin: .55rem 0 1.1rem; font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.side ul { list-style: none; margin: 0; padding: 0; color: var(--ink); }
.side li { padding: .46rem 0; border-top: 1px solid var(--rule); font-size: .97rem; }
.side.keep li::before { content: ''; display: inline-block; width: .42rem; height: .42rem; margin-right: .55rem; background: var(--keep); vertical-align: .1em; }
.reasons li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0 .5rem; }
.reasons b { font-family: var(--sans); font-weight: 700; color: var(--ember); font-variant-numeric: tabular-nums; }
.reasons s { color: var(--ink-soft); text-decoration-color: var(--ember); text-decoration-thickness: 1.5px; }
.reasons em { grid-column: 2; font-style: normal; font-size: .84rem; color: var(--ink-soft); font-family: var(--sans); }
.aside { max-width: var(--measure); color: var(--ink-soft); font-size: .95rem; margin: clamp(1.6rem, 3vw, 2.4rem) 0 0; }

/* ── film half ────────────────────────────────────────────── */
.film { background: var(--film); color: var(--bone); padding-block: clamp(3.4rem, 7vw, 6rem); }
.film + .film { padding-top: 0; }
.film.first { padding-top: clamp(4.5rem, 9vw, 8rem); }
.film h2 { color: var(--bone); }

/* the storyboard video straddles the line between reading and watching */
.bridge {
  margin: calc(-1 * clamp(7rem, 13vw, 12rem)) 0 clamp(2.4rem, 5vw, 4rem);
  border-radius: 5px; overflow: hidden; background: var(--film-soft);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9), 0 0 0 1px var(--film-rule);
}
.bridge video, .plain video { width: 100%; aspect-ratio: 1200 / 750; background: var(--film-soft); }
.plain { margin: 1.6rem 0 0; border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1px var(--film-rule); }

.split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.6rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split-body > .lede:first-child { margin-top: 0; }

.points { margin: clamp(1.6rem, 3vw, 2.2rem) 0 0; display: grid; gap: 1.1rem; }
.points.two { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem 2.4rem; margin-top: 0; }
.points > div { border-top: 1px solid var(--film-rule); padding-top: .65rem; }
.points dt { font-weight: 600; font-size: .98rem; }
.points dd { margin: .25rem 0 0; color: var(--bone-soft); font-size: .95rem; }

/* ── examples ─────────────────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr)); gap: clamp(1.4rem, 3vw, 2.4rem); margin-top: clamp(2rem, 4vw, 3rem); }
.gallery figure { margin: 0; }
.gallery video { width: 100%; aspect-ratio: 16 / 9; background: var(--film-soft); border-radius: 4px; box-shadow: 0 0 0 1px var(--film-rule); }
.gallery figcaption { display: flex; flex-wrap: wrap; gap: .1rem .7rem; align-items: baseline; margin-top: .6rem; font-size: .88rem; }
.gallery figcaption b { font-weight: 600; }
.gallery figcaption span { color: var(--bone-soft); font-variant-numeric: tabular-nums; }

/* ── close and footer ─────────────────────────────────────── */
.film.close { padding-block: clamp(4rem, 8vw, 7rem); }
.film.close .lede { max-width: 44ch; }
footer { background: var(--film); color: var(--bone-soft); font-size: .84rem; padding: 1.6rem 0 3rem; border-top: 1px solid var(--film-rule); }
footer p { max-width: var(--measure); margin: 0; font-family: var(--sans); }
