/* The page is black because the footage is: clips sit on it without an edge. */
:root {
  --bg: #000;
  --ink: #f2f1ee;
  --dim: #8d8c88;
  --line: #26262a;
  --cyan: #46dcdc;
  --magenta: #e455d6;
  --yellow: #e8e24e;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.08; }

/* Navigation */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: #0009;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-size: 15px; color: var(--dim); }
.nav nav a:hover { color: var(--ink); }
.pill { color: var(--ink); border-bottom: 1px solid var(--ink); padding: 3px 0; }
.pill:hover { border-color: var(--cyan); }

/* Buttons: a lightly rounded frame for the main action, an underlined line of text
   for the other. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.button { display: inline-block; font-size: 16px; font-weight: 500; padding: 4px 0; border-bottom: 1px solid #ffffff5a; }
.button:hover { border-color: var(--ink); }
.button.primary, .join button {
  padding: 13px 24px; color: var(--ink); background: #000; border: 1px solid var(--ink); border-radius: 8px;
  transition: background .15s, color .15s;
}
.button.primary:hover, .join button:hover { background: var(--ink); color: #000; }

/* First screen: the words on the left, the form on show on the right. */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-visual { position: absolute; inset: 0 0 0 auto; width: 60%; }
.hero-visual video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .8s;
  -webkit-mask-image: linear-gradient(90deg, #0000 0%, #000 14%);
  mask-image: linear-gradient(90deg, #0000 0%, #000 14%);
}
.hero-visual video.on { opacity: 1; }
/* The slide of nine forms is shown whole, not cut to fill. */
.hero-visual video.whole { object-fit: contain; -webkit-mask-image: none; mask-image: none; padding: 76px 0 64px; }
.slide-bar {
  position: absolute; right: var(--gutter); bottom: 26px; z-index: 1;
  display: flex; align-items: center; gap: 18px;
  font: 12px/1 var(--mono); letter-spacing: .08em; color: var(--dim);
}
.slide-dots { display: flex; gap: 2px; }
.slide-dots button {
  appearance: none; border: 0; background: none; cursor: pointer; padding: 8px 4px;
}
.slide-dots button::before { content: ""; display: block; width: 18px; height: 2px; background: #ffffff3a; }
.slide-dots button:hover::before { background: var(--dim); }
.slide-dots button[aria-selected="true"]::before { background: var(--ink); }
.hero-text { position: relative; z-index: 1; width: 44%; padding: 0 0 clamp(48px, 9vh, 110px) var(--gutter); }
.hero h1 { font-size: clamp(36px, 4.6vw, 68px); line-height: 1.02; }
.hero p { margin: 22px 0 30px; max-width: 27em; font-size: clamp(17px, 1.4vw, 20px); color: #cfcdc8; }
.platforms { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 28px 0 0; padding: 0; list-style: none; font: 13px/1 var(--mono); letter-spacing: .04em; }
.platforms li:has(small) { color: var(--dim); }
.platforms small { font-size: 11px; margin-left: 6px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; }

/* Sections */
section:not(.hero) { padding: clamp(80px, 13vh, 160px) var(--gutter); max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; }
.section-head { margin-bottom: clamp(28px, 5vh, 56px); }
.lead { margin: 16px 0 0; max-width: 34em; font-size: clamp(17px, 1.5vw, 20px); color: var(--dim); }

/* Dimensions */
.section-head.split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.stage { aspect-ratio: 16 / 9; max-height: 62vh; margin: 0 auto; overflow: hidden; }
.stage video { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.stage video.swapping { opacity: 0; }
.dim-picker { display: flex; gap: clamp(4px, 1.4vw, 14px); }
.dim-picker button {
  appearance: none; border: 0; background: none; color: #5f5e5b; cursor: pointer;
  font: 500 clamp(18px, 2vw, 24px)/1 var(--sans); padding: 8px 6px;
}
.dim-picker button:hover { color: var(--dim); }
.dim-picker button[aria-selected="true"] { color: var(--ink); }
.counts, .requires { text-align: center; margin: 18px 0 0; font: 13px/1.7 var(--mono); color: var(--dim); letter-spacing: .04em; }
.counts i, .requires i { display: inline-block; width: 3px; height: 3px; margin: 0 10px 3px; border-radius: 50%; background: var(--dim); }
.counts span { color: var(--ink); }

/* Forms */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid figure { margin: 0; background: var(--bg); }
.grid video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.grid figcaption { padding: 4px 18px 20px; font-size: 14px; line-height: 1.4; }
.grid figcaption b { display: block; font-weight: 600; font-size: 16px; }
.grid figcaption span { color: var(--dim); }

/* Lessons: a picture from one of them, and the list of all four. */
.lesson-row { display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.lesson-row figure { margin: 0; }
.lesson-row video { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.lesson-row figcaption { margin-top: 10px; max-width: 40em; font-size: 15px; line-height: 1.5; color: var(--dim); }
.lesson-list { margin: 0; padding: 0; list-style: none; counter-reset: lesson; }
.lesson-list li { counter-increment: lesson; position: relative; padding: 16px 0 16px 34px; border-top: 1px solid var(--line); }
.lesson-list li:last-child { border-bottom: 1px solid var(--line); }
.lesson-list li::before { content: counter(lesson); position: absolute; left: 0; top: 19px; font: 13px/1.4 var(--mono); color: #5f5e5b; }
.lesson-list b { display: block; font-weight: 600; font-size: 17px; }
.lesson-list span { color: var(--dim); font-size: 15px; }
.credit { margin: 18px 0 0; font-size: 12px; color: #5f5e5b; }
.credit a { text-decoration: underline; }

/* Controls: a control in the picture and its line below light up together. */
.window { position: relative; margin: 0 auto; }
.window img { width: 100%; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 40px 120px #0b1a2a; }
.spot {
  position: absolute; appearance: none; background: none; cursor: pointer; padding: 0;
  border: 1.5px solid #0000; border-radius: 8px; transition: border-color .15s, background .15s;
}
.spot.lit { border-color: var(--cyan); background: #46dcdc1f; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 16px; margin: clamp(28px, 5vh, 48px) 0 0; }
.features > div { padding: 12px 14px; border-radius: 10px; border: 1.5px solid #0000; cursor: default; transition: border-color .15s, background .15s; }
.features > div.lit { border-color: var(--cyan); background: #46dcdc14; }
.features dt { font-weight: 600; margin-bottom: 4px; }
.features dd { margin: 0; color: var(--dim); font-size: 15px; }
kbd { font: 12px/1 var(--mono); color: var(--ink); border: 1px solid #ffffff3a; border-radius: 5px; padding: 2px 6px; margin-left: 4px; }

/* Become a tester: the form the Gridbend page uses. */
.get { text-align: center; }
.get-icon { margin: 0 auto 22px; border-radius: 25px; }
.get .lead { margin: 14px auto 28px; }
.join { max-width: 440px; margin: 0 auto; }
.join form { display: flex; gap: 8px; }
.join input[type="email"] {
  flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; color: var(--ink);
  background: #0c0c0e; border: 1px solid #ffffff3a; border-radius: 8px; padding: 12px 16px;
}
.join input[type="email"]::placeholder { color: #6a6a6e; }
.join button { flex: 0 0 auto; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; }
.join button:disabled { opacity: .6; cursor: default; }
.join .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.join .msg { margin: 12px 0 0; font-size: 14px; min-height: 1.4em; color: var(--dim); }
.join .msg.ok { color: var(--cyan); }
.join .msg.bad { color: #ff8a7a; }
.join.done form { display: none; }
/* Turnstile's slot stays shut unless Cloudflare asks the visitor something. */
.join .cf-turnstile { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .25s, opacity .25s, margin-top .25s; }
.join .cf-turnstile > * { min-height: 0; overflow: hidden; }
.join .cf-turnstile.asking { grid-template-rows: 1fr; opacity: 1; margin-top: 12px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.requires { margin-top: 26px; }

/* The two one-message pages a confirmation link lands on. */
.note { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px var(--gutter); }
.note img { border-radius: 25px; }
.note h1 { margin-top: 24px; font-size: clamp(26px, 4vw, 38px); }
.note p { margin: 12px 0 0; max-width: 30em; color: var(--dim); }
.note a { color: var(--ink); text-decoration: underline; }

.page { max-width: 40em; margin: 0 auto; padding: 120px var(--gutter) 80px; }
.page h1 { font-size: clamp(30px, 4.2vw, 52px); margin-bottom: 28px; }
.page p { margin: 0 0 16px; color: var(--dim); line-height: 1.6; }
.page a { color: var(--ink); text-decoration: underline; }

footer {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 26px var(--gutter); border-top: 1px solid var(--line);
  font-size: 13px; color: var(--dim);
}
footer nav { display: flex; gap: 22px; }
footer a:hover { color: var(--ink); }

@media (max-width: 820px) {
  .nav nav a:not(.pill) { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .hero { display: block; min-height: 0; padding-top: 56px; }
  .hero-visual { position: relative; width: 100%; aspect-ratio: 1; }
  .hero-visual video { -webkit-mask-image: none; mask-image: none; }
  .hero-visual video.whole { padding: 0 0 26px; }
  .slide-bar { bottom: 6px; }
  .hero-text { width: auto; padding: 18px var(--gutter) 56px; }
  .stage { aspect-ratio: 1; }
  .lesson-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
  .grid figcaption { padding: 2px 12px 14px; }
  .join form { flex-direction: column; }
  .platforms { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
