/* RemakeFlow marketing site. Dark-first, same palette as the app's design system. */

@font-face {
  font-family: "Archivo Expanded";
  src: url("/assets/fonts/archivo-expanded-extrabold.338e843946.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Arial stretched to Archivo Expanded's width, so the swap when the font arrives barely moves text. */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial");
  font-weight: 800;
  size-adjust: 129.7%;
  ascent-override: 67.7%;
  descent-override: 16.2%;
  line-gap-override: 0%;
}

:root {
  --dusk: #1c1c1e;
  --night: #0e0e0f;
  --carbon: #262628;
  --slate: #343436;
  --fog: #a3a3a3;
  --mist: #cfcfcb;
  --paper: #f6f6f3;
  --lime: #d7ff3f;
  --graphite: #111111;

  --font-display: "Archivo Expanded", "Archivo Fallback", system-ui, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --max-width: 1200px;
  --header-height: 56px;
  --chapter-space: clamp(5rem, 10vw, 8rem);
  --radius-card: 20px;
  --radius-clip: 26px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

@media (min-width: 40rem) {
  :root { --gutter: 28px; }
}

@media (min-width: 64rem) {
  :root { --gutter: 40px; --header-height: 64px; }
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

/* A column that fills the screen, so on short pages the footer sits at the bottom instead of mid-screen. */
body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: transparent;
  color: var(--paper);
  font: 400 1.0625rem/1.55 var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* The app's screen gradient, pinned to the viewport so every scroll position looks like an app screen. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--dusk) 0%, var(--night) 100%);
  pointer-events: none;
}

main { flex: 1 0 auto; }

img,
video,
svg { display: block; max-width: 100%; }

img,
video { height: auto; }

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }

ul[class],
ol[class] { padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--lime); color: var(--graphite); }

.container {
  width: min(100% - 2 * var(--gutter), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--lime);
  color: var(--graphite);
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
}

.skip-link:focus { top: 0.5rem; }

/* ---------- Type pieces ---------- */

.slate {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  color: var(--fog);
  font: 800 0.75rem/1.2 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.slate::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--lime);
}

.slate__number { color: var(--paper); }

.chapter { padding-block: var(--chapter-space); }

.chapter__title {
  max-width: 13ch;
  margin-bottom: 1.5rem;
  font: 800 clamp(2.125rem, 8.4vw, 4.75rem)/1 var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.chapter__title--small { font-size: clamp(2rem, 7vw, 3.5rem); }

.chapter__lede {
  max-width: 34ch;
  color: var(--mist);
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

/* Only the words are underlined; the arrow sits beside them. */
.text-link__label {
  text-decoration: underline;
  text-decoration-color: var(--slate);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.2s;
}

.text-link:hover { color: var(--lime); }

.text-link:hover .text-link__label { text-decoration-color: currentColor; }

.text-link__arrow { margin-left: 0.4em; transition: translate 0.2s var(--ease-out); }

.text-link:hover .text-link__arrow { translate: 0.2em 0; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
}

.cta--soon {
  border: 1px solid var(--slate);
  background: var(--carbon);
  color: var(--paper);
}

.cta__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--lime);
}

.cta--live,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--graphite);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out);
}

.cta--live:hover,
.button:hover { transform: translateY(-1px); }

.cta--large { min-height: 56px; padding-inline: 1.6rem; font-size: 1.0625rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--dusk);
  border-bottom: 1px solid transparent;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2 * var(--gutter), var(--max-width));
  height: var(--header-height);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: -4px;
  padding-inline: 4px;
}

.brand img { width: auto; height: 22px; }

/* On wider screens the header has room, so the lockup can carry the brand properly. */
@media (min-width: 720px) {
  .brand img { height: 28px; }
  .site-nav a { font-size: 1rem; }
}

.site-nav { display: flex; }

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  white-space: nowrap;
  border-radius: 999px;
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
}

.site-nav a:hover { background: var(--carbon); }

.site-nav a[aria-current="page"] { color: var(--lime); }

/* Only the last link hangs into the gutter, so the row lines up with the page edge. */
.site-nav a:last-child { margin-right: -12px; }

/* Two nav links and the full lockup only just fit on a 375 pt phone; tighten before they collide. */
@media (max-width: 400px) {
  .brand img { height: 20px; }
  .site-nav a { padding-inline: 9px; font-size: 0.875rem; }
  .site-nav a:last-child { margin-right: -9px; }
}

@media (max-width: 345px) {
  .brand img { height: 17px; }
  .site-nav a { padding-inline: 6px; font-size: 0.8125rem; }
  .site-nav a:last-child { margin-right: -6px; }
}

.close__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}

/* Scene progress: the app's "scene 1 of 3" bar, filled by scrolling the page. */
.scene-progress { display: none; }

/* ---------- Hero ---------- */

.hero { padding-block: 2rem 1rem; }

.hero__grid {
  display: grid;
  gap: 3.25rem;
  align-items: center;
}

.hero__title {
  margin-bottom: 1.5rem;
  font: 800 clamp(2.5rem, 13.4vw, 6.5rem)/0.94 var(--font-display);
  letter-spacing: -0.03em;
}

.hero__title .line,
.close__title .line { display: block; white-space: nowrap; }

.line--accent { color: var(--lime); }

.hero__lede {
  max-width: 33ch;
  margin-bottom: 2rem;
  color: var(--mist);
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.hero__demo { justify-self: center; width: min(70vw, 300px); }

.clip-stage { position: relative; }

.clip {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--radius-clip);
  background: var(--graphite);
  box-shadow: 0 0 0 1px var(--slate), 0 40px 80px -24px rgb(0 0 0 / 0.75);
}

.clip picture,
.clip img,
.clip__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip__video {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.clip.is-playing .clip__video { opacity: 1; }

/* "Their video" behind "your version": the brand's frame-to-frame idea. */
.clip-ghost {
  position: absolute;
  inset: 0;
  border: 1px solid var(--slate);
  border-radius: var(--radius-clip);
  translate: -8% -4%;
  rotate: -3deg;
}

.clip__toggle {
  position: absolute;
  left: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 50%;
  background: rgb(17 17 17 / 0.72);
  color: var(--paper);
  cursor: pointer;
}

.clip__toggle svg { width: 16px; height: 16px; }

.beats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 1rem;
  margin-top: 1.5rem;
  color: var(--fog);
  font: 800 0.6875rem/1.2 var(--font-display);
  letter-spacing: 0.1em;
  white-space: nowrap;
  text-transform: uppercase;
}

.beats span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.beats span::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1.5px;
  background: var(--lime);
}

/* ---------- Recognition ---------- */

.recognition__grid {
  display: grid;
  gap: 3rem;
}

.saved { width: min(100%, 26rem); margin-inline: auto; }

.saved__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  color: var(--fog);
  font-size: 0.875rem;
  font-weight: 600;
}

.saved__stack {
  display: grid;
  justify-items: center;
  padding-block: 4% 8%;
}

.saved__tile {
  grid-area: 1 / 1;
  position: relative;
  width: 34%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 14px;
  background: var(--carbon);
  box-shadow: 0 0 0 1px var(--slate), 0 24px 40px -16px rgb(0 0 0 / 0.8);
}

.saved__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.72);
}

.saved__tile:nth-child(1) { transform: translateX(-70%) rotate(-8deg); }
.saved__tile:nth-child(2) { z-index: 1; width: 38%; transform: translateY(-4%); }
.saved__tile:nth-child(3) { transform: translateX(70%) rotate(8deg); }

.saved__mark {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 50%;
  background: rgb(17 17 17 / 0.7);
  color: var(--paper);
}

.prompter { counter-reset: none; }

.prompter__line {
  display: grid;
  gap: 0.4rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--slate);
  color: var(--paper);
  font: 800 clamp(1.5rem, 6.2vw, 2.5rem)/1.12 var(--font-display);
  letter-spacing: -0.02em;
}

.prompter__line:last-child { border-bottom: 1px solid var(--slate); }

.prompter__slate {
  color: var(--lime);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.recognition__end {
  max-width: 24ch;
  color: var(--fog);
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2.125rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.recognition__end span { color: var(--paper); font-weight: 650; }

/* ---------- Turn ---------- */

.turn__grid,
.record__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.turn__head .chapter__title,
.turn__copy .chapter__lede { margin-bottom: 0; }

.turn__grid { row-gap: 1.5rem; }

.turn__phones { margin-top: 1.5rem; }

/* Copy before pictures on phones; pictures lead on wide screens. */
.record__copy { order: -1; }

.answers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.answers li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0.45rem 0.95rem 0.45rem 0.8rem;
  border: 1px solid var(--slate);
  border-radius: 999px;
  background: var(--carbon);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* A check drawn with borders: no image requests, no inline SVG per chip. */
.answers li::before {
  content: "";
  width: 0.7rem;
  height: 0.38rem;
  margin-top: -0.2rem;
  border-left: 2px solid var(--lime);
  border-bottom: 2px solid var(--lime);
  transform: rotate(-45deg);
}

.turn__phones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 3vw, 2rem);
  align-items: start;
  width: min(100%, 40rem);
  margin-inline: auto;
}

.turn__phone--b { margin-top: clamp(2rem, 9vw, 4.5rem); }

.turn__phone figcaption {
  margin-top: 1rem;
  color: var(--fog);
  font-size: 0.875rem;
  line-height: 1.4;
}

.turn__phone figcaption .slate__text {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--lime);
  font: 800 0.6875rem/1.2 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Phone frame ---------- */

.phone { container-type: inline-size; width: 100%; }

.phone__screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 720 / 1565;
  border-radius: 13.6cqi;
  background: var(--graphite);
  box-shadow:
    0 0 0 2.4cqi #0b0b0c,
    0 0 0 calc(2.4cqi + 1px) #3a3a3d,
    0 40px 70px -20px rgb(0 0 0 / 0.8);
  margin: calc(2.4cqi + 1px);
}

.phone__screen img { width: 100%; height: 100%; object-fit: cover; }

.phone__island {
  position: absolute;
  top: 2.4cqi;
  left: 50%;
  width: 30cqi;
  height: 8.8cqi;
  border-radius: 99px;
  background: #000;
  translate: -50% 0;
}

/* ---------- Record ---------- */

.record__phones {
  position: relative;
  display: grid;
  width: min(100%, 26rem);
  margin-inline: auto;
}

.record__phone { grid-area: 1 / 1; }

.record__phone--front {
  position: relative;
  z-index: 2;
  width: 64%;
  margin-inline: auto;
}

.record__phone--left,
.record__phone--right {
  width: 46%;
  margin-top: 10%;
  filter: brightness(0.45) saturate(0.6);
}

.record__phone--left { justify-self: start; transform: rotate(-6deg); }
.record__phone--right { justify-self: end; transform: rotate(6deg); }

.callsheet { margin-top: 2rem; }

.callsheet div {
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  gap: 1rem;
  padding-block: 1rem;
  border-top: 1px solid var(--slate);
}

.callsheet div:last-child { border-bottom: 1px solid var(--slate); }

.callsheet dt {
  padding-top: 0.2rem;
  color: var(--lime);
  font: 800 0.6875rem/1.4 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.callsheet dd { color: var(--mist); }

.record__after {
  margin-top: 1.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

/* ---------- Finish ---------- */

.finish__grid {
  display: grid;
  gap: 3rem;
  justify-items: center;
  text-align: center;
}

.finish__copy { display: grid; justify-items: center; }

.finish__copy .chapter__title { max-width: 15ch; }

.finish__compare {
  display: grid;
  grid-template-columns: 34fr 8fr 58fr;
  align-items: center;
  width: min(100%, 34rem);
}

.finish__compare picture {
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--radius-clip);
  box-shadow: 0 0 0 1px var(--slate), 0 50px 90px -30px rgb(0 0 0 / 0.85);
}

.finish__compare img { width: 100%; height: 100%; object-fit: cover; }

.finish__theirs picture { border-radius: 14px; filter: saturate(0.65) brightness(0.7); }

.finish__compare figcaption {
  margin-top: 1rem;
  color: var(--fog);
  font: 800 0.6875rem/1.2 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.finish__yours figcaption { color: var(--lime); }

.finish__arrow {
  justify-self: center;
  width: 60%;
  height: 2px;
  margin-bottom: 1.75rem;
  background: var(--slate);
  position: relative;
}

.finish__arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-top: 2px solid var(--slate);
  border-right: 2px solid var(--slate);
  transform: translateY(-50%) rotate(45deg);
}

.finish__specs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.finish__specs li {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--slate);
  border-radius: 999px;
  color: var(--mist);
  font: 800 0.6875rem/1.2 var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Trust ---------- */

.promises {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.promise {
  position: relative;
  padding: 1.75rem 1.5rem 1.75rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius-card);
  background: var(--carbon);
}

.promise__number {
  display: block;
  margin-bottom: 1.5rem;
  color: var(--lime);
  font: 800 1rem/1 var(--font-display);
}

.promise h3 {
  margin-bottom: 0.85rem;
  font: 800 clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem)/1.15 var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.promise p { color: var(--mist); font-size: 1rem; }

.promise .promise__fine { margin-top: 0.85rem; color: var(--fog); font-size: 0.875rem; }

/* ---------- Close ---------- */

.close { padding-bottom: calc(var(--chapter-space) * 0.8); }

.close__inner {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  text-align: center;
}

.close__icon {
  width: 88px;
  height: 88px;
  box-shadow: 0 0 0 1px var(--slate);
  border-radius: 22%;
}

.close__title {
  font: 800 clamp(2.5rem, 11.5vw, 6.5rem)/0.95 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.close__note { color: var(--fog); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--slate);
  background: var(--night);
  padding-block: 3rem calc(3rem + env(safe-area-inset-bottom));
}

.site-footer__inner {
  display: grid;
  gap: 2rem;
}

.site-footer__brand img { width: auto; height: 22px; }

@media (min-width: 720px) {
  .site-footer__brand img { height: 26px; }
}

.site-footer__brand p { margin-top: 0.75rem; color: var(--fog); font-size: 0.9375rem; }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-footer__nav a:hover { color: var(--lime); }

.site-footer__legal { color: var(--fog); font-size: 0.8125rem; line-height: 1.5; }

.site-footer__legal p + p { margin-top: 0.35rem; }

/* ---------- Doc pages and 404 ---------- */

.doc { max-width: 46rem; padding-block: 3rem 7rem; }

.draft-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--lime);
  border-radius: 999px;
  color: var(--lime);
  font: 800 0.6875rem/1.2 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.draft-badge span { width: 0.45rem; height: 0.45rem; border-radius: 1.5px; background: var(--lime); }

.doc__title {
  margin-bottom: 1.25rem;
  font: 800 clamp(2.25rem, 8vw, 3.75rem)/1 var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.doc__lede { color: var(--mist); font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem); line-height: 1.5; }

.doc__meta { margin-top: 1rem; color: var(--fog); font-size: 0.875rem; }

.doc__body { margin-top: 2.5rem; }

/* Long-form text: legal pages, the product guide and support answers. */
.prose {
  color: var(--mist);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose > * + * { margin-top: 1.15rem; }

.prose h2 {
  clear: both;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--slate);
  color: var(--paper);
  font: 800 clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem)/1.2 var(--font-display);
  letter-spacing: -0.01em;
  scroll-margin-top: calc(var(--header-height) + 1rem);
  text-wrap: balance;
}

.prose > h2:first-child { margin-top: 0; }

.prose h2 + * { margin-top: 1rem; }

.prose ul,
.prose ol { padding-left: 1.25rem; }

.prose li + li { margin-top: 0.55rem; }

.prose li::marker { color: var(--lime); }

.prose strong { color: var(--paper); font-weight: 650; }

.prose em { color: var(--paper); font-style: normal; }

.prose a {
  color: var(--paper);
  text-decoration-color: var(--lime);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

.prose a:hover { color: var(--lime); }

/* The legal documents open with the app name and the date they took effect. */
.page-legal .prose > p:first-child { color: var(--fog); font-size: 0.9375rem; }

.prose .steps { counter-reset: step; padding-left: 0; list-style: none; }

.steps li {
  position: relative;
  padding-left: 2.5rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--slate);
  border-radius: 50%;
  color: var(--lime);
  font: 800 0.75rem/1 var(--font-display);
}

.doc-figure {
  width: min(62vw, 15rem);
  margin: 1.75rem auto 2rem;
  text-align: center;
}

.doc-figure figcaption { margin-top: 0.85rem; color: var(--fog); font-size: 0.8125rem; line-height: 1.4; }

.table-wrap { margin-top: 1.5rem; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.prose th {
  padding: 0 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--slate);
  color: var(--fog);
  font: 800 0.6875rem/1.2 var(--font-display);
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.prose td {
  padding: 0.85rem 0.75rem 0.85rem 0;
  border-bottom: 1px solid var(--slate);
  vertical-align: top;
}

.prose td:first-child { color: var(--paper); font-weight: 600; }

/* Narrow screens: each row becomes a small card, each cell labelled with its column. */
@media (max-width: 40rem) {
  .prose table,
  .prose tbody,
  .prose tr,
  .prose td { display: block; }

  .prose thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .prose tr { padding-block: 0.9rem; border-bottom: 1px solid var(--slate); }

  .prose td { padding: 0; border: 0; }

  .prose td + td::before {
    content: attr(data-label);
    display: block;
    margin-top: 0.6rem;
    color: var(--fog);
    font: 800 0.625rem/1.4 var(--font-display);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
}

@media (min-width: 48rem) {
  .doc-figure {
    float: right;
    width: 13.5rem;
    margin: 0.4rem 0 1.5rem 2.5rem;
  }
}

.support-email {
  margin-top: 1.5rem;
  font: 800 clamp(1.25rem, 1rem + 1.4vw, 1.75rem)/1.2 var(--font-display);
  letter-spacing: -0.01em;
}

.support-email a {
  color: var(--lime);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}

.doc__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--slate);
  clear: both;
}

.not-found { padding-block: clamp(4rem, 14vw, 9rem) clamp(6rem, 16vw, 11rem); }

.not-found__title {
  max-width: 12ch;
  margin-bottom: 1.25rem;
  font: 800 clamp(2.5rem, 10vw, 5.5rem)/0.98 var(--font-display);
  letter-spacing: -0.03em;
}

.not-found__lede { color: var(--mist); font-size: 1.1875rem; margin-bottom: 2.25rem; }

.not-found__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

/* ---------- Guides ---------- */

.article { max-width: 44rem; padding-block: 3rem 6rem; }

.slate__link { color: inherit; text-decoration: none; }

.slate__link:hover { color: var(--lime); }

.article__title {
  margin-bottom: 1.25rem;
  font: 800 clamp(2.25rem, 8.4vw, 3.75rem)/1.02 var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.article__dek {
  color: var(--mist);
  font-size: clamp(1.1875rem, 1.1rem + 0.45vw, 1.4375rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.article__meta {
  margin-top: 1.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--slate);
  color: var(--fog);
  font-size: 0.875rem;
}

.prose--article { margin-top: 2.5rem; }

@media (min-width: 48rem) {
  .prose--article { font-size: 1.125rem; line-height: 1.75; }
}

.prose--article > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Beats over shots on one time axis: segment widths are the real lengths in seconds. */
.timeline {
  margin-block: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius-card);
  background: var(--carbon);
}

.timeline__label {
  margin: 0 0 0.4rem;
  color: var(--fog);
  font: 800 0.625rem/1.2 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timeline__label + .timeline__row { margin-top: 0; }

.timeline__row {
  display: grid;
  gap: 3px;
  margin-bottom: 1rem;
}

.timeline__row--beats { grid-template-columns: 3.5fr 8fr 2fr 3fr; }

.timeline__row--shots { grid-template-columns: 3.5fr 3.5fr 4.5fr 2fr 3fr; }

.tl {
  overflow: hidden;
  min-width: 0;
  padding: 0.55rem 0.4rem;
  border-radius: 6px;
  background: var(--slate);
  color: var(--paper);
  font: 600 0.75rem/1.2 var(--font-text);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl--hook { background: var(--lime); color: var(--graphite); }

.tl--shot {
  background: transparent;
  border: 1px solid var(--fog);
  font: 800 0.75rem/1.2 var(--font-display);
}

.tl--silent { border-style: dashed; color: var(--fog); }

.timeline__ruler { margin: -0.4rem 0 0; }

.timeline__ruler span {
  position: relative;
  color: var(--fog);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.timeline__ruler em { position: absolute; right: 0; font-style: normal; }

.timeline__ruler i { font-style: normal; }

/* Phones: the shortest segments are ~35 px wide, so labels get tighter and one tick steps aside. */
@media (max-width: 30rem) {
  .timeline { padding: 1rem 0.85rem; }

  .tl { padding: 0.5rem 0.1rem; font-size: 0.625rem; text-overflow: clip; }

  .timeline__ruler i { visibility: hidden; }
}

.timeline figcaption,
.compare figcaption {
  margin-top: 0.25rem;
  color: var(--fog);
  font-size: 0.8125rem;
}

/* Theirs and yours, the remake larger. */
.compare {
  display: grid;
  grid-template-columns: 34fr 8fr 50fr;
  align-items: center;
  margin-block: 2rem;
}

.compare picture {
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--slate);
}

.compare img { width: 100%; height: 100%; object-fit: cover; }

.compare__item:first-child picture { filter: saturate(0.65) brightness(0.75); }

.compare__label {
  margin-top: 0.75rem;
  color: var(--fog);
  font: 800 0.6875rem/1.2 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compare__item--yours .compare__label { color: var(--lime); }

.compare__arrow {
  position: relative;
  justify-self: center;
  width: 60%;
  height: 2px;
  margin-bottom: 1.75rem;
  background: var(--slate);
}

.compare__arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-top: 2px solid var(--slate);
  border-right: 2px solid var(--slate);
  transform: translateY(-50%) rotate(45deg);
}

.compare figcaption { grid-column: 1 / -1; margin-top: 1rem; }

.keep-change {
  display: grid;
  gap: 1rem;
  margin-block: 2.5rem;
}

.keep-change__col {
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius-card);
  background: var(--carbon);
}

.keep-change__col--change { border-color: var(--lime); }

.prose .keep-change__title {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  font-size: 1.125rem;
}

.keep-change__col--change .keep-change__title { color: var(--lime); }

.keep-change ul { padding-left: 1.1rem; font-size: 1rem; line-height: 1.6; }

@media (min-width: 48rem) {
  .keep-change { grid-template-columns: 1fr 1fr; }
}

.article__end {
  margin-top: 4rem;
  padding: 2rem 1.5rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--carbon), var(--night));
}

.article__end-kicker {
  color: var(--lime);
  font: 800 0.6875rem/1.2 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article__end-title {
  margin: 0.75rem 0 0.75rem;
  font: 800 clamp(1.5rem, 1.2rem + 1.2vw, 2rem)/1.1 var(--font-display);
  letter-spacing: -0.015em;
}

.article__end p:not(.article__end-kicker):not(.cta) { color: var(--mist); }

.article__end-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 1.5rem;
}

.article__more { margin-top: 2.5rem; }

.article__more-label {
  color: var(--fog);
  font: 800 0.6875rem/1.2 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article__more ul { margin-top: 0.5rem; padding: 0; list-style: none; }

.article__more a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--paper);
  font: 800 clamp(1.125rem, 1rem + 0.5vw, 1.375rem)/1.25 var(--font-display);
  text-decoration: none;
}

.article__more a:hover { color: var(--lime); }

.guide-list { display: grid; gap: 1rem; padding: 0; list-style: none; }

.guide-card a {
  display: block;
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--slate);
  border-radius: var(--radius-card);
  background: var(--carbon);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s;
}

.guide-card a:hover { border-color: var(--lime); }

.guide-card__title {
  display: block;
  color: var(--paper);
  font: 800 clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem)/1.2 var(--font-display);
  letter-spacing: -0.01em;
}

.guide-card__text { display: block; margin-top: 0.6rem; color: var(--mist); }

.guide-card__meta { display: block; margin-top: 0.9rem; color: var(--fog); font-size: 0.8125rem; }

/* ---------- Wider screens ---------- */

@media (min-width: 48rem) {
  .promises { grid-template-columns: repeat(3, 1fr); }

  .prompter__line {
    grid-template-columns: 7.5rem 1fr;
    align-items: baseline;
    gap: 1.5rem;
  }

  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .site-footer__legal { grid-column: 1 / -1; }
}

@media (min-width: 64rem) {
  .hero { padding-block: 3rem 6rem; }

  .hero__grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    min-height: min(calc(100svh - var(--header-height) - 9rem), 46rem);
  }

  .hero__title { font-size: clamp(4rem, 6.6vw, 6rem); }

  .hero__demo { width: min(100%, 340px); }

  .recognition__grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    column-gap: 5rem;
    row-gap: 3.5rem;
  }

  .recognition__intro { grid-column: 1; grid-row: 1; }
  .saved {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    position: sticky;
    top: calc(var(--header-height) + 12vh);
    width: 100%;
  }
  .prompter { grid-column: 1; grid-row: 2; }
  .recognition__end { grid-column: 1; grid-row: 3; }

  .turn__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    column-gap: 5rem;
    row-gap: 2.5rem;
  }

  .turn__head { grid-column: 1 / -1; }
  .turn__copy { align-self: start; padding-top: 2rem; }
  .turn__title { max-width: none; }
  .turn__title .line { display: block; }
  .turn__phones { margin-top: 0; }

  .record__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 5rem; }
  .record__copy { order: 0; }

  .record__phones { width: min(100%, 32rem); }

}

/* ---------- Motion (progressive enhancement; nothing moves for reduced motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * {
    animation: rise-in 0.9s var(--ease-out) both;
  }

  .hero__copy > :nth-child(1) { animation-delay: 0s; }
  .hero__copy > :nth-child(2) { animation: none; }
  .hero__copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero__copy > :nth-child(4) { animation-delay: 0.22s; }

  /* Transform only: the poster is the largest paint on phones and must not wait on opacity. */
  .clip { animation: settle 1.1s var(--ease-out) both; }
  .clip-ghost { animation: ghost-apart 1.4s 0.2s var(--ease-out) both; }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 95%;
    }

    .prompter__line {
      animation: prompter-focus linear both, reveal linear both;
      animation-timeline: view(), view();
      animation-range: cover 0% cover 100%, entry 10% entry 100%;
    }

    .saved__tile { animation: linear both; animation-timeline: view(); animation-range: entry 0% cover 55%; }
    .saved__tile:nth-child(1) { animation-name: fan-left; }
    .saved__tile:nth-child(3) { animation-name: fan-right; }

    .record__phone--left,
    .record__phone--right {
      animation: linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 50%;
    }

    .record__phone--left { animation-name: spread-left; }
    .record__phone--right { animation-name: spread-right; }

    .finish__yours picture {
      animation: arrive linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }

    .site-header { animation: header-line linear both; animation-timeline: scroll(root); animation-range: 0 120px; }

    .page-home .scene-progress {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 4px;
      width: min(100% - 2 * var(--gutter), var(--max-width));
      height: 2px;
      margin: -2px auto 0;
    }

    .scene-progress span {
      overflow: hidden;
      border-radius: 2px;
      background: var(--slate);
    }

    .scene-progress span::after {
      content: "";
      display: block;
      height: 100%;
      background: var(--lime);
      transform-origin: left;
      animation: fill linear both;
      animation-timeline: scroll(root);
    }

    .scene-progress span:nth-child(1)::after { animation-range: 0% 16.6%; }
    .scene-progress span:nth-child(2)::after { animation-range: 16.6% 33.3%; }
    .scene-progress span:nth-child(3)::after { animation-range: 33.3% 50%; }
    .scene-progress span:nth-child(4)::after { animation-range: 50% 66.6%; }
    .scene-progress span:nth-child(5)::after { animation-range: 66.6% 83.3%; }
    .scene-progress span:nth-child(6)::after { animation-range: 83.3% 100%; }
  }
}

@keyframes rise-in {
  from { opacity: 0; translate: 0 1rem; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes settle {
  from { transform: translateY(2rem) scale(0.96); }
  to { transform: none; }
}

@keyframes ghost-apart {
  from { translate: 0 0; rotate: 0deg; }
  to { translate: -8% -4%; rotate: -3deg; }
}

@keyframes reveal {
  from { opacity: 0; translate: 0 2.5rem; }
  to { opacity: 1; translate: 0 0; }
}

/* The teleprompter: each line brightens as it crosses the middle of the screen. Never below AA. */
@keyframes prompter-focus {
  0%, 25% { color: var(--fog); }
  45%, 60% { color: var(--paper); }
  85%, 100% { color: var(--fog); }
}

@keyframes fan-left {
  from { transform: translateX(-8%) rotate(-2deg); }
  to { transform: translateX(-70%) rotate(-8deg); }
}

@keyframes fan-right {
  from { transform: translateX(8%) rotate(2deg); }
  to { transform: translateX(70%) rotate(8deg); }
}

@keyframes spread-left {
  from { transform: translateX(30%) rotate(0deg); }
  to { transform: rotate(-6deg); }
}

@keyframes spread-right {
  from { transform: translateX(-30%) rotate(0deg); }
  to { transform: rotate(6deg); }
}

@keyframes arrive {
  from { transform: translateY(3rem) scale(0.9); }
  to { transform: none; }
}

@keyframes header-line {
  to { border-bottom-color: var(--slate); }
}

@keyframes fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
