/* Many Hands launch site. Palette, type and layout from docs/site/BRIEF.md. */

:root {
  color-scheme: light dark;
  --paper: #f6f1e9;
  --paper-deep: #efe7db;
  --card: #fffdf9;
  --line: #ddd2c2;
  --ink: #2a231d;
  --ink-soft: #6b5f53;
  --accent: #b04a23;
  --accent-hover: #933b19;
  --accent-soft: #f6e0d3;
  --on-accent: #ffffff;
  --sage: #3f6f45;
  --sage-soft: #e2eedf;
  --amber: #8a5a00;
  --amber-soft: #f8ebcc;
  --brick: #a32b2b;
  --brick-soft: #f7dcd8;
  --glow: #fbe7d6;
  --focus: #1f6f8b;
  --shadow-rgb: 60 40 20;

  --grain-opacity: 0.04;
  --shadow-rest: 0 1px 2px rgb(var(--shadow-rgb) / 0.08), 0 2px 6px rgb(var(--shadow-rgb) / 0.06);
  --shadow-lift: 0 4px 10px rgb(var(--shadow-rgb) / 0.08), 0 18px 40px rgb(var(--shadow-rgb) / 0.1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gap: clamp(72px, 12vw, 140px);
  --pad: 24px;
  --tilt: 1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1815;
    --paper-deep: #221e1a;
    --card: #25211d;
    --line: #433b33;
    --ink: #f1e9de;
    --ink-soft: #b9ab9b;
    --accent: #ec9467;
    --accent-hover: #f3ad87;
    --accent-soft: #45291c;
    --on-accent: #1b1815;
    --sage: #93c49a;
    --sage-soft: #22352a;
    --amber: #e7b85a;
    --amber-soft: #3d3018;
    --brick: #f08a80;
    --brick-soft: #45201d;
    --glow: #2c211a;
    --focus: #7cc6df;
    --shadow-rgb: 0 0 0;
    --grain-opacity: 0.025;
  }
}

@media (max-width: 639.98px) {
  :root {
    --pad: 20px;
    --tilt: 0.5;
  }
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: radial-gradient(ellipse 70rem 42rem at 50% -6rem, var(--glow), transparent 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

@media (max-width: 639.98px) {
  body {
    font-size: 16px;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  body::before {
    filter: invert(1);
  }
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

h3 {
  font-size: 1.375rem;
}

p,
li {
  text-wrap: pretty;
}

p {
  margin: 0;
  max-width: 62ch;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

main:focus {
  outline: none;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: calc(72rem + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  margin-top: var(--gap);
}

.eyebrow {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.lead {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* ---------- Logo mark ---------- */

.mark {
  flex: none;
  display: block;
}

.mark-card {
  fill: var(--card);
  stroke: var(--ink);
  stroke-width: 1.75;
}

.mark-tape,
.mark-a {
  fill: var(--accent);
}

.mark-b {
  fill: var(--sage);
}

.mark-c {
  fill: var(--ink);
}

/* ---------- Controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  background-color: var(--accent);
  color: var(--on-accent);
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow-rest);
  transition:
    background-color 160ms ease,
    box-shadow 180ms ease,
    transform 120ms ease;
}

.btn:hover {
  background-color: var(--accent-hover);
  box-shadow: var(--shadow-lift);
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  border-radius: 12px;
}

.btn--small {
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.9375rem;
}

.btn--large {
  min-height: 56px;
  padding: 0 28px;
  font-size: 1.0625rem;
}

.quiet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition:
    text-decoration-color 160ms ease,
    text-decoration-thickness 160ms ease;
}

.quiet:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 200;
  transform: translateY(-160%);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background-color: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.chip--amber {
  background-color: var(--amber-soft);
  border-color: transparent;
  color: var(--amber);
  font-weight: 600;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  border-bottom: 1px solid transparent;
  transition:
    background-color 200ms ease,
    border-color 200ms ease;
}

.site-header.is-scrolled {
  background-color: color-mix(in srgb, var(--paper) 85%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}

.brand__word {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
}

@media (max-width: 639.98px) {
  .site-nav__how {
    display: none;
  }
}

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

.hero {
  padding-top: clamp(32px, 6vw, 80px);
}

.hero__grid {
  display: grid;
  gap: 56px;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: 48px;
  }
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.25rem);
  line-height: 1.05;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.hero__sub {
  margin-top: 22px;
  font-size: 1.125rem;
  color: var(--ink);
}

.hero__actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.hero__reassure {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* The rota that fills itself */

.hero__visual {
  position: relative;
}

.hv {
  position: relative;
  padding: 40px 0 0 0;
  max-width: 560px;
  margin-inline: auto;
}

@media (min-width: 960px) {
  .hv {
    padding: 56px 72px 72px 40px;
  }
}

.note {
  position: relative;
  background-color: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  transform: translate(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px)) rotate(var(--rot, 0deg));
  transition: transform 400ms var(--ease);
}

.note::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 84px;
  height: 6px;
  margin-left: -42px;
  border-radius: 2px;
  background-color: var(--accent);
  opacity: 0.9;
}

.note__title {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  letter-spacing: -0.02em;
  font-size: 1.5rem;
  line-height: 1.15;
}

.note__meta {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.note--rota {
  --rot: calc(-1.5deg * var(--tilt));
  z-index: 2;
  padding: 26px 24px 20px;
}

.note--away {
  --rot: calc(-6deg * var(--tilt));
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  padding: 26px 22px 64px;
  width: 300px;
  box-shadow: var(--shadow-rest);
}

.note--away::before {
  width: 56px;
  margin-left: -28px;
}

@media (max-width: 639.98px) {
  .note--away {
    display: none;
  }

  .hv {
    padding-top: 8px;
  }
}

.rota {
  margin-top: 6px;
}

.rota__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rota__row:last-child {
  border-bottom: 0;
}

.rota__role {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 118px;
  height: 34px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background-color: var(--sage-soft);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  overflow: hidden;
}

.pill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px dashed var(--brick);
  opacity: 0;
}

.pill__tick {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: var(--sage);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16;
  stroke-dashoffset: 0;
}

.pill__gap {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--brick);
  opacity: 0;
}

.pill__name {
  display: inline-block;
}

.note--tally {
  --rot: calc(2deg * var(--tilt));
  z-index: 3;
  width: min(300px, 78%);
  margin: -24px -48px 0 auto;
  padding: 22px 20px 16px;
}

.note--tally::before {
  width: 56px;
  margin-left: -28px;
}

.note--tally .note__title {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

@media (max-width: 959.98px) {
  .note--tally {
    margin: -16px 0 0 auto;
  }
}

.tally__row {
  display: grid;
  grid-template-columns: 68px 1fr 18px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 3px 0;
}

.tally__track {
  height: 8px;
  border-radius: 99px;
  background-color: var(--paper-deep);
  overflow: hidden;
}

.tally__bar {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background-color: var(--sage);
  transform-origin: left center;
}

.tally__n {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.n-from {
  display: none;
}

.tally__spread {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--sage);
  color: var(--sage);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Problem ---------- */

.problem .wrap {
  text-align: center;
}

.problem__lines {
  max-width: 40ch;
  margin-inline: auto;
  font-family: var(--display);
  font-weight: 400;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

.problem__lines span {
  display: inline;
}

.problem__after {
  margin: 24px auto 0;
  color: var(--ink-soft);
}

/* ---------- How it works ---------- */

.steps {
  position: relative;
  margin-top: 48px;
  display: grid;
  gap: 40px;
}

.steps::before {
  content: "";
  position: absolute;
  left: 40px;
  top: 24px;
  bottom: 24px;
  border-left: 2px dashed var(--line);
  clip-path: inset(0 0 0 0);
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .steps::before {
    left: 8%;
    right: 8%;
    top: 52px;
    bottom: auto;
    border-left: 0;
    border-top: 2px dashed var(--line);
  }
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-rest);
  padding: 26px 24px 22px;
}

.step::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 56px;
  height: 4px;
  margin-left: -28px;
  border-radius: 2px;
  background-color: var(--accent);
}

.step__num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 3.25rem;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.step h3 {
  margin-top: 12px;
}

.step p {
  margin-top: 8px;
  color: var(--ink-soft);
}

.mock {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mock::before {
  content: "";
  flex-basis: 100%;
  border-top: 1px solid var(--line);
  margin-bottom: 12px;
}

.mock__line {
  flex-basis: 100%;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.mock__btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  background-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 15px;
}

.mock__ok {
  flex-basis: 100%;
  margin-top: 8px;
  color: var(--sage);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- The real app ---------- */

.section-band {
  margin-top: var(--gap);
  padding-block: clamp(64px, 10vw, 120px);
  background-color: var(--paper-deep);
}

.shots {
  position: relative;
  margin-top: 48px;
}

.shot {
  margin: 0;
}

.shot--desktop {
  border-radius: 14px;
  overflow: hidden;
  background-color: var(--card);
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--line);
}

.browser {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 14px;
  background-color: var(--card);
  border-bottom: 1px solid var(--line);
}

.browser span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--line);
}

.shot--phone {
  width: 70%;
  max-width: 300px;
  margin: 32px auto 0;
  border: 8px solid var(--ink);
  border-radius: 32px;
  overflow: hidden;
  background-color: var(--ink);
  box-shadow: var(--shadow-lift);
}

.shot--phone img {
  border-radius: 24px;
}

/* Below 640 px the desktop capture is too small to read, so the phone capture stands alone */
@media (max-width: 639.98px) {
  .shot--desktop {
    display: none;
  }

  .shot--phone {
    width: 78%;
    max-width: 320px;
    margin-top: 0;
  }
}

@media (min-width: 960px) {
  .shots {
    padding-right: 12%;
    padding-bottom: 48px;
  }

  .shot--phone {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 22%;
    margin: 0;
  }
}

.captions {
  margin-top: 48px;
  display: grid;
  gap: 20px;
}

@media (min-width: 760px) {
  .captions {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.captions li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
}

.captions strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.dot {
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot--sage {
  background-color: var(--sage);
}

.dot--brick {
  background-color: var(--brick);
}

.dot--accent {
  background-color: var(--accent);
}

/* ---------- Features ---------- */

.feature-grid {
  margin-top: 48px;
  display: grid;
  gap: 24px;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

.feature {
  --rot: 0deg;
  position: relative;
  padding: 28px 24px 24px;
  background-color: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-rest);
  transform: rotate(var(--rot));
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 500ms var(--ease);
}

@media (min-width: 640px) {
  .feature:nth-child(3n + 1) {
    --rot: -0.6deg;
  }

  .feature:nth-child(3n + 2) {
    --rot: 0.4deg;
  }

  .feature:nth-child(3n) {
    --rot: -0.3deg;
  }
}

@media (hover: hover) and (pointer: fine) {
  .feature:hover {
    --rot: 0deg;
    box-shadow: var(--shadow-lift);
  }
}

.feature::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 56px;
  height: 4px;
  margin-left: -28px;
  border-radius: 2px;
  background-color: var(--accent);
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  margin-top: 14px;
}

.feature p {
  margin-top: 8px;
  color: var(--ink-soft);
}

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

.trust__card {
  display: grid;
  gap: 28px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 20px;
  background-color: var(--paper-deep);
  border: 1px solid var(--line);
}

@media (min-width: 760px) {
  .trust__card {
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    align-items: start;
  }
}

.ticks li {
  display: flex;
  gap: 12px;
  padding: 8px 0;
}

.tick {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 3px;
  fill: none;
  stroke: var(--sage);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Closing ---------- */

.closing .wrap {
  display: flex;
  justify-content: center;
}

.closing__note {
  --rot: calc(-1deg * var(--tilt));
  position: relative;
  max-width: 44rem;
  width: 100%;
  padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 56px);
  text-align: center;
  background-color: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-lift);
  transform: rotate(var(--rot));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing__tape {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 120px;
  height: 10px;
  margin-left: -60px;
  border-radius: 2px;
  background-color: var(--accent);
  transform-origin: center top;
}

.closing__note h2 {
  margin-top: 20px;
}

.closing__note p {
  margin-top: 14px;
  color: var(--ink-soft);
}

.closing__note .btn {
  margin-top: 28px;
}

.closing__note .closing__small {
  margin-top: 14px;
  font-size: 14px;
}

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

.site-footer {
  margin-top: var(--gap);
  padding-block: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer__name {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: none;
}

.site-footer__links {
  display: flex;
  gap: 24px;
}

.site-footer .quiet {
  color: var(--ink-soft);
}

/* ---------- Motion (only when the visitor has not asked for less) ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* Reveals, only once main.js has set .js */
  .js [data-reveal] {
    --delay: calc(var(--i, 0) * var(--stagger, 100ms));
    transition:
      opacity 600ms var(--ease) var(--delay),
      translate 600ms var(--ease) var(--delay),
      transform 180ms ease,
      box-shadow 180ms ease;
  }

  .js .problem [data-reveal] {
    --stagger: 120ms;
    display: inline-block;
  }

  .js .feature-grid [data-reveal] {
    --stagger: 60ms;
  }

  .js [data-reveal]:not(.is-in) {
    opacity: 0;
    translate: 0 12px;
  }

  .js .problem [data-reveal]:not(.is-in) {
    translate: 0 8px;
  }

  .js .steps::before {
    transition: clip-path 700ms var(--ease);
  }

  .js .steps:not(.is-in)::before {
    clip-path: inset(0 0 100% 0);
  }

  @media (min-width: 900px) {
    .js .steps:not(.is-in)::before {
      clip-path: inset(0 100% 0 0);
    }
  }

  /* The real app: scroll-linked where supported, a one-shot class otherwise */
  @supports (animation-timeline: view()) {
    .shot--desktop {
      animation: rise-24 linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }

    .shot--phone {
      animation: rise-48 linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
  }

  @supports not (animation-timeline: view()) {
    .js .shot {
      transition:
        transform 800ms var(--ease),
        opacity 800ms var(--ease);
    }

    .js .shots:not(.is-in) .shot--desktop {
      transform: translateY(24px);
      opacity: 0;
    }

    .js .shots:not(.is-in) .shot--phone {
      transform: translateY(48px);
      opacity: 0;
    }
  }

  /* Closing note: the tape presses down and the note settles */
  .js .closing__note {
    transition: transform 500ms var(--ease);
  }

  .js .closing__note:not(.is-in) {
    transform: rotate(calc(-3deg * var(--tilt)));
  }

  .js .closing__note.is-in .closing__tape {
    animation: press 200ms ease-out both;
  }

  /* Hero fill sequence: .is-waiting shows the gaps until each row is filled */
  .pill,
  .pill::after,
  .pill__gap,
  .pill__name,
  .pill__tick,
  .tally__bar,
  .tally__spread {
    transition:
      background-color 300ms ease,
      opacity 300ms ease,
      transform 360ms var(--ease),
      stroke-dashoffset 360ms ease 120ms;
  }

  .tally__bar {
    transition: transform 500ms var(--ease);
  }

  .is-waiting .rota__row:not(.is-filled) .pill {
    background-color: var(--brick-soft);
  }

  .is-waiting .rota__row:not(.is-filled) .pill::after,
  .is-waiting .rota__row:not(.is-filled) .pill__gap {
    opacity: 1;
  }

  .is-waiting .rota__row:not(.is-filled) .pill__name {
    opacity: 0;
    transform: translateY(6px);
  }

  .is-waiting .rota__row:not(.is-filled) .pill__tick {
    stroke-dashoffset: 16;
  }

  .is-waiting .tally__row:not(.is-filled) .tally__bar {
    transform: scaleX(0.6667);
  }

  .is-waiting .tally__row:not(.is-filled) .n-from {
    display: inline;
  }

  .is-waiting .tally__row:not(.is-filled) .n-to {
    display: none;
  }

  .is-waiting:not(.is-done) .tally__spread {
    opacity: 0;
  }
}

@keyframes rise-24 {
  from {
    transform: translateY(24px);
  }
  to {
    transform: none;
  }
}

@keyframes rise-48 {
  from {
    transform: translateY(48px);
  }
  to {
    transform: none;
  }
}

@keyframes press {
  from {
    transform: scaleY(1.4);
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .note {
    transition: none;
  }
}
