/* Same paper, ink and pink as the app (apps/ops/src/app/globals.css). */
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #262523;
  --paper: #faf9f5;
  --bright: #fffefa;
  --soft: #5c5955;
  --line: #d4d1cb;
  --outline: #88817a;
  --pink: #f8c5d4;
  --on-pink: #403330;
  --coral: #f58caa;
  --sky: #d9eff8;
  --mist: #345966;
  --on-ink-soft: #d4d1cb;
  --ink-line: #4a4845;
  /* The large mark behind the first screen: the app's line colour, thinned with paper. */
  --ring-tone: #e7e4de;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --lift: 0 1px 2px rgb(38 37 35 / 0.08), 0 28px 56px -18px rgb(38 37 35 / 0.32);
  /* Running text in three sizes; headings in three more (h1, h2, h3). */
  --small: 0.9375rem;
  --text: 1.0625rem;
  --lead: 1.1875rem;
  --gutter: 1.5rem;
}

* { box-sizing: border-box; }

html {
  color-scheme: only light;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Instrument Sans", Arial, sans-serif;
  font-size: var(--text);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--pink); color: var(--on-pink); }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.04em; text-wrap: balance; line-height: 1.04; }
/* On a phone the longest word of the headline keeps air to the right edge. */
h1 { font-size: clamp(2rem, 9.6vw, 2.6rem); hyphens: manual; }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.03em; }
p, dd, li, figcaption { text-wrap: pretty; }
p { margin: 0 0 1rem; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 0.25rem; }
.band-ink :focus-visible { outline-color: var(--pink); }

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 5; background: var(--bright); padding: 0.75rem 1rem; border-radius: 1rem; }

/* One left edge for everything: the gutter. */
.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding: 0 var(--gutter); }
/* A column for reading keeps the page's left edge and ends early instead of standing in the middle. */
.narrow > * { max-width: 46rem; }

.logo { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; text-decoration: none; }
.logo svg { width: 2rem; height: 2rem; flex: none; transition: transform 0.6s var(--ease); }
.logo:hover svg { transform: rotate(-40deg); }
.logo-small { font-size: 1.1rem; color: var(--ink); }
.logo-small svg { width: 1.5rem; height: 1.5rem; }

/* Buttons: on a phone each takes the column, so two of them end on the same edge. */
.actions { display: grid; gap: 0.75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0.6rem 1.6rem; border-radius: 999px; border: 1px solid transparent; font: inherit; font-size: var(--text); font-weight: 500; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: transform 0.25s var(--ease), background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s var(--ease); }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button-dark { background: var(--ink); color: var(--paper); }
.button-dark:hover { box-shadow: 0 10px 22px -10px rgb(38 37 35 / 0.6); }
.button-light { background: var(--paper); color: var(--ink); }
.button-light:hover { background: var(--pink); color: var(--on-pink); }
.button-outline { border-color: var(--outline); background: transparent; color: inherit; }
.button-outline:hover { border-color: currentColor; }

/* First screen */
.hero { padding: 1rem 0 0; overflow: clip; }
.top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top-link { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.15rem; border: 1px solid var(--line); border-radius: 999px; font-size: var(--small); font-weight: 500; line-height: 1; text-decoration: none; background: var(--bright); transition: border-color 0.2s ease; }
.top-link:hover { border-color: var(--ink); }
.hero-grid { display: grid; gap: 2.5rem; margin-top: 2rem; }
.lead { margin: 1.25rem 0 1.75rem; font-size: var(--lead); line-height: 1.45; color: var(--soft); max-width: 34rem; }
/* The label and the line under it: two rows, one edge, room between them. */
.hero-note { display: grid; justify-items: start; gap: 0.75rem; margin: 1.75rem 0 0; font-size: var(--small); color: var(--soft); max-width: 30rem; }
.badge { padding: 0.3rem 0.85rem; border-radius: 999px; background: var(--pink); color: var(--on-pink); font-weight: 500; line-height: 1.3; }

/* The stage: the mark as a watermark behind the app. The logo's open circle with a thin line and a
   small dot on that line, in the opening. It is placed by its circle, not by its box: --r is the
   radius (30 of the 100 the drawing is wide), --cx/--cy the centre (at 50/48 of the box), and it
   stands turned by --from, turning to --to while the page scrolls. The top of the circle hides
   behind the device; on a phone the line runs through the strips beside it, and the dot with it. */
.stage { --r: clamp(9rem, 25vw + 4.45rem, 13.5rem); --cx: 50%; --cy: calc(var(--r) + 0.3rem); --from: 20deg; --to: 47deg; position: relative; display: grid; justify-items: center; }
.ring { --w: calc(var(--r) / 0.3); position: absolute; width: var(--w); max-width: none; left: calc(var(--cx) - var(--w) * 0.5); top: calc(var(--cy) - var(--w) * 0.48); color: var(--ring-tone); pointer-events: none; transform-origin: 50% 48%; transform: rotate(var(--from)); }
.ring path { vector-effect: non-scaling-stroke; stroke-width: 0.25rem; }
.ring circle { fill: var(--pink); opacity: 0.8; }
.phone { position: relative; width: 100%; max-width: 17.5rem; padding: 0.5rem; border-radius: 2.6rem; background: var(--ink); box-shadow: var(--lift); }
.shot { display: block; width: 100%; height: auto; border-radius: 2.15rem; background: var(--paper); }
.shot-missing { aspect-ratio: 390 / 844; display: flex; align-items: center; justify-content: center; padding: 1rem; color: var(--soft); font-size: 0.9rem; text-align: center; border: 1px dashed var(--outline); }
.phone-back { display: none; }
/* The first screen ends inside the device, and the cut is chosen: --cut is a height in the picture
   (of 844) that lies between two tasks, below the link and above the dividing line, never in a button. */
.stage .phone-front { --w: 17.5rem; --cut: 480; margin-bottom: calc(-0.5rem - (var(--w) - 1rem) * (844 - var(--cut)) / 390); }

/* Close-up: the lower half of a screen as a card. */
.detail { width: 100%; max-width: 21rem; border-radius: 1.75rem; overflow: hidden; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--lift); }
.shot-detail { border-radius: 0; aspect-ratio: 390 / 410; object-fit: cover; object-position: 50% 100%; }

/* Sections: paper, then ink, bright, sky, bright, paper, ink. Each change of surface is an edge. */
.band { padding: 4.5rem 0; }
.band-bright { background: var(--bright); border-block: 1px solid var(--line); }
.band-sky { background: var(--sky); }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink .lead, .band-ink .quiet { color: var(--on-ink-soft); }
.quiet { color: var(--soft); font-size: var(--small); }
.head { max-width: 40rem; margin-bottom: 2.5rem; }
.head p { margin: 1rem 0 0; font-size: var(--lead); line-height: 1.45; color: var(--soft); }
.h-small { font-size: var(--text); font-weight: 500; letter-spacing: 0; color: var(--on-ink-soft); margin-bottom: 1.5rem; }

/* The three questions of the end of the month */
.asks { list-style: none; margin: 0; padding: 0; }
.asks li { padding: 1.4rem 0; border-top: 1px solid var(--ink-line); font-size: clamp(1.6rem, 4.6vw, 3rem); font-weight: 500; line-height: 1.12; letter-spacing: -0.035em; text-wrap: balance; }
.asks li:last-child { border-bottom: 1px solid var(--ink-line); }
.asks-answer { margin: 2.5rem 0 0; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.3; letter-spacing: -0.02em; color: var(--pink); max-width: 34rem; text-wrap: balance; }

/* The month as a line with four moments */
.steps { list-style: none; margin: 0; padding: 0 0 0 2rem; position: relative; display: grid; gap: 4.5rem; }
.steps::before, .steps::after { content: ""; position: absolute; left: 0.3rem; top: 0.5rem; bottom: 0; width: 2px; border-radius: 2px; background: var(--line); }
.steps::after { background: var(--coral); transform-origin: top; }
.step { position: relative; display: grid; gap: 2rem; }
.step::before { content: ""; position: absolute; left: -2rem; top: 0.3rem; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0.35rem var(--bright); z-index: 1; }
.step-when { margin: 0 0 0.75rem; font-size: var(--text); font-weight: 500; color: var(--soft); }
.step h3 { margin-bottom: 0.9rem; font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.04em; line-height: 1.08; }
.step-text p:last-child { margin-bottom: 0; max-width: 32rem; color: var(--soft); }
.screen { margin: 0; display: grid; justify-items: center; gap: 1rem; }
.screen figcaption { font-size: var(--small); color: var(--soft); text-align: center; max-width: 19rem; }

/* Ways studios pay: five small cards on the blue of the app's hint cards. */
.rates { margin: 0; display: grid; gap: 0.75rem; }
.rates > div { padding: 1.1rem 1.25rem 1.2rem; border-radius: 1.25rem; background: var(--bright); }
.rates dt { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.rates dd { margin: 0.3rem 0 0; color: var(--soft); }

/* The class you can touch: a piece of the app rebuilt in HTML, reckoned by src/demo.js.
   Without the script it is a finished picture: the number stands still, the controls stay away. */
[hidden] { display: none !important; }
/* The same device as the pictures; only the lean is left out, so the buttons stand still.
   Inside, everything that belongs to the app's head is measured in --px: one pixel of the 390 px wide
   screen the pictures were taken from, so head, margins and corners shrink exactly as they do there. */
.step .phone.phone-demo { rotate: none; container-type: inline-size; }
.demo { --px: 0.68px; position: relative; display: grid; gap: 0.75rem; padding: calc(var(--px) * 24) calc(var(--px) * 20) calc(var(--px) * 28); border-radius: 2.15rem; background: var(--paper); font-size: 0.78rem; line-height: 1.4; text-align: left; }
@supports (width: 1cqw) { .demo { --px: calc(100cqw / 390); } }
.demo p { margin: 0; }
.demo-app { display: grid; gap: calc(var(--px) * 12); margin-bottom: calc(var(--px) * 12); color: var(--ink); user-select: none; }
.demo-brand { display: flex; align-items: center; gap: calc(var(--px) * 8); min-height: calc(var(--px) * 44); font-size: calc(var(--px) * 24); font-weight: 600; letter-spacing: -0.025em; line-height: 1; }
.demo-brand svg { flex: none; width: calc(var(--px) * 32); height: calc(var(--px) * 32); }
.demo-nav { display: grid; grid-template-columns: 1fr 0.9fr 1.25fr 0.75fr; gap: calc(var(--px) * 4); padding: calc(var(--px) * 4); border: 1px solid var(--line); border-radius: 999px; background: var(--bright); font-size: calc(var(--px) * 14); color: var(--mist); }
.demo-nav span { display: flex; align-items: center; justify-content: center; min-height: calc(var(--px) * 44); border-radius: 999px; }
.demo-nav .is-here { background: var(--pink); color: var(--on-pink); font-weight: 600; }
.demo-day { color: var(--mist); }
.demo-card { display: grid; gap: 0.15rem; padding: 0.9rem max(0.7rem, calc(var(--px) * 17)) 0.85rem; border-radius: calc(var(--px) * 28); background: var(--bright); border: 1px solid var(--line); }
.demo-title { font-size: 1rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.demo-meta { color: var(--soft); }
/* The invitation keeps its place when it goes, so nothing moves under the finger. */
.demo-hint { justify-self: end; margin-top: 0.8rem !important; padding: 0.2rem 0.65rem; border-radius: 1rem; background: var(--pink); color: var(--on-pink); font-size: min(0.72rem, calc(var(--px) * 17.5)); font-weight: 500; text-align: right; white-space: nowrap; rotate: -1.5deg; transition: opacity 0.3s ease, visibility 0.3s; }
.demo-hint.is-gone { opacity: 0; visibility: hidden; }
.demo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem; margin-top: 0.75rem; }
.demo-hint:not([hidden]) + .demo-row { margin-top: 0.5rem; }
.demo-row label { color: var(--soft); }
/* Each control is 44 px to the finger and 36 px to the eye, as large as it looks in the pictures. */
.demo-stepper { display: flex; align-items: center; margin: 0 -0.25rem 0 auto; }
.demo-stepper button { flex: none; position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--on-pink); font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform 0.2s var(--ease), opacity 0.2s ease; }
.demo-stepper button::before { content: ""; position: absolute; inset: 0.25rem; z-index: -1; border-radius: 50%; background: var(--pink); transition: background-color 0.2s ease; }
.demo-stepper button:active { transform: scale(0.92); }
.demo-stepper button[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.demo-stepper button:focus-visible { outline-offset: -2px; border-radius: 50%; }
.demo-stepper input, .demo-still { width: 3.25rem; height: 2.75rem; padding: 0; border: 0.25rem solid transparent; border-radius: 999px; background: var(--paper) padding-box; box-shadow: inset 0 0 0 1px var(--outline); color: var(--ink); font: inherit; font-size: 1rem; text-align: center; font-variant-numeric: tabular-nums; caret-color: var(--coral); }
.demo-still { display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--line); }
.demo-stepper input:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 999px; }
.demo-fee { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 0.75rem; margin-top: 0.75rem; padding-top: 0.7rem; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.demo-fee-label { color: var(--soft); }
.demo-amount { display: inline-block; font-size: 1.4rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; transform-origin: 100% 60%; }
.demo-sum { grid-column: 1 / -1; min-height: 1.4em; text-align: right; color: var(--mist); }
.demo-kinds { min-width: 0; margin: 0.35rem 0 0; padding: 0; border: 0; }
.demo-kinds legend { padding: 0 0 0.4rem; color: var(--soft); }
.demo-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 999px; background: var(--bright); border: 1px solid var(--line); }
.demo-switch label { position: relative; display: flex; min-height: 2.75rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.demo-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.demo-switch span { flex: 1; display: flex; align-items: center; justify-content: center; margin: 0.25rem 0.125rem; padding: 0 0.2rem; border-radius: 999px; transition: background-color 0.2s ease, color 0.2s ease; }
.demo-switch label:first-child span { margin-left: 0.25rem; }
.demo-switch label:last-child span { margin-right: 0.25rem; }
.demo-switch input:checked + span { background: var(--ink); color: var(--paper); }
.demo-switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.demo-rule { min-height: 2.8em; color: var(--soft); font-variant-numeric: tabular-nums; }
.demo-month { display: grid; gap: 0.1rem; margin-top: 0.25rem; padding: 0.7rem 0.9rem; border-radius: 1.25rem; background: var(--ink); color: var(--on-ink-soft); font-variant-numeric: tabular-nums; }
.demo-month span { color: var(--paper); font-size: 0.95rem; }
.demo-month strong { font-weight: 600; }
.demo-keys { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.try { margin: 1.5rem 0 0; }
.try a { display: inline-flex; align-items: center; min-height: 2.75rem; }
@media (hover: hover) and (pointer: fine) {
  .demo-stepper button:not([aria-disabled="true"]):hover::before { background: var(--coral); }
}

/* What else is there: plain pairs of a name and a sentence, no lines. */
.extras { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.extras h3 { margin-bottom: 0.4rem; }
.extras p { margin: 0; color: var(--soft); max-width: 26rem; }

/* Doubts: rows that open, in one panel. Works without the script. */
.doubts { border: 1px solid var(--line); border-radius: 1.5rem; background: var(--bright); overflow: hidden; }
.doubts details + details { border-top: 1px solid var(--line); }
.doubts summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; padding: 0.9rem 1rem 0.9rem 1.25rem; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.doubts summary::-webkit-details-marker { display: none; }
.doubts summary::after { content: "+"; content: "+" / ""; flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--pink); color: var(--on-pink); font-size: 1.35rem; font-weight: 400; letter-spacing: 0; line-height: 1; transition: background-color 0.2s ease, color 0.2s ease; }
.doubts details[open] > summary::after { content: "−"; content: "−" / ""; background: var(--ink); color: var(--paper); }
.doubts summary:focus-visible { outline-offset: -4px; border-radius: 1.25rem; }
.doubts details > p { margin: 0; padding: 0 1.25rem 1.4rem; max-width: 40rem; color: var(--soft); }
@media (hover: hover) and (pointer: fine) {
  .doubts details:not([open]) > summary:hover::after { background: var(--coral); }
}

/* Closing: the same watermark behind the words, running out of the picture on the right. Its opening
   and the dot stand at the top, in the room above the headline. */
.close { --r: 11rem; --cx: calc(100% - 2.25rem); --cy: calc(var(--r) + 2.5rem); --from: -41deg; --to: -71deg; position: relative; overflow: clip; padding: 5.5rem 0 5rem; }
.close .wrap { position: relative; }
/* Standing still, it shows the middle of its way: the dot at the top. */
.close .ring { color: var(--ink-line); opacity: 0.7; transform: rotate(calc((var(--from) + var(--to)) / 2)); }
.close .ring circle { opacity: 0.6; }
.close .lead { margin-top: 1.5rem; }
.close .quiet { margin: 1.75rem 0 0; max-width: 34rem; }

/* Waitlist: one field that must be filled, one question that may be tapped. */
#warteliste { scroll-margin-top: 2rem; }
.waitlist { display: grid; gap: 0.4rem; margin-top: 2.25rem; max-width: 32rem; }
.field, .choice legend { font-size: var(--small); color: var(--on-ink-soft); }
.field-input { min-height: 3.25rem; width: 100%; padding: 0.5rem 1.1rem; border-radius: 1rem; border: 1px solid var(--outline); background: var(--paper); color: var(--ink); font: inherit; font-size: var(--text); caret-color: var(--coral); }
.field-input::placeholder { color: #6f6a64; }
.field-input:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 1rem; }
.choice { min-width: 0; margin: 1.1rem 0 0; padding: 0; border: 0; }
.choice legend { padding: 0 0 0.55rem; }
.optional { display: inline-block; padding: 0 0.55rem; border: 1px solid var(--ink-line); border-radius: 999px; font-size: 0.8rem; white-space: nowrap; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice label { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice label span { display: flex; align-items: center; min-height: 2.75rem; padding: 0 1.1rem; border: 1px solid var(--outline); border-radius: 999px; color: var(--paper); transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.choice label:hover span { border-color: var(--paper); }
.choice input:checked + span { background: var(--pink); border-color: var(--pink); color: var(--on-pink); }
.choice input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 3px; }
/* As wide as the field above it on a phone. */
.waitlist .button { margin-top: 1.25rem; }
.close .waitlist .quiet { margin: 0.85rem 0 0; }
.trap { position: absolute; left: -999rem; width: 1px; height: 1px; opacity: 0; }
/* The second way, said in a sentence. */
.aside { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--ink-line); max-width: 36rem; color: var(--on-ink-soft); }
.aside p:last-child { margin-bottom: 0; }
.aside a { color: var(--paper); }

/* Legal and thank-you pages */
/* The logo stands where it stands on the first page. */
.band.text-page { padding-top: 1rem; min-height: 70vh; }
.text-page h1 { font-size: clamp(2.25rem, 6vw, 3.25rem); margin: 2.5rem 0 1.5rem; }
.text-page h2 { font-size: 1.3rem; letter-spacing: -0.03em; line-height: 1.2; margin: 2rem 0 0.5rem; }
.text-page p { overflow-wrap: anywhere; max-width: 40rem; }
.text-page .actions { margin-top: 1.5rem; }

.foot { padding: 1.5rem 0 2rem; font-size: var(--small); color: var(--soft); border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 2rem; }
.foot-note { flex: 1 1 16rem; }
.foot nav { display: flex; gap: 0.25rem 1.25rem; flex-wrap: wrap; }
.foot nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }

@media (min-width: 30rem) {
  .actions { display: flex; flex-wrap: wrap; }
  .waitlist .button { justify-self: start; }
}

@media (min-width: 34rem) {
  .rates { grid-template-columns: 1fr 1fr; }
  .rates > div:last-child { grid-column: 1 / -1; }
}

@media (min-width: 40rem) {
  h1 { font-size: clamp(3.25rem, 5.2vw, 4.5rem); }
  .hero-grid { margin-top: 3rem; }
  .text-page h1 { font-size: 3.25rem; }
  .phone { max-width: 19rem; }
  .stage .phone-front { --w: 19rem; }
  .head { margin-bottom: 3rem; }
  .extras { grid-template-columns: 1fr 1fr; gap: 2.5rem 3rem; }
  .step { grid-template-columns: 1fr minmax(0, 17rem); gap: 2.5rem; align-items: start; }
  /* The words stay beside the screen while it passes. */
  .step-text { position: sticky; top: 28vh; }
  .step .phone { max-width: 17rem; }
  .step-text p:last-child { font-size: var(--lead); line-height: 1.45; }
}

@media (min-width: 60rem) {
  :root { --gutter: 2rem; --lead: 1.25rem; }
  .hero, .band.text-page { padding-top: 1.5rem; }
  .hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 2rem; margin-top: 3.5rem; align-items: start; }
  .hero-copy { padding: 3.5rem 0 4.5rem; }
  .hero .lead { font-size: 1.35rem; }
  /* Two devices; the circle lies behind both and its dot in the corner they leave free, right of the
     front one and above the back one. Whichever column is longer, the stage stands on the lower edge,
     so the cut through the device stays where it was chosen. */
  .stage { --r: 16rem; --cx: 12.3rem; --from: -26deg; --to: -26deg; justify-items: start; align-self: end; }
  .stage .phone-front { z-index: 2; }
  .phone-back { display: block; position: absolute; left: 12.5rem; top: 5rem; max-width: 16.5rem; z-index: 1; }
  .band { padding: 7.5rem 0; }
  .head { margin-bottom: 4.5rem; }
  .asks li { padding: 1.75rem 0; }
  .steps { padding-left: 4rem; gap: 7rem; }
  .steps::before, .steps::after { left: 0.45rem; }
  .step { grid-template-columns: minmax(0, 1fr) 24rem; gap: 4rem; }
  .step::before { left: -4rem; top: 0.25rem; width: 1rem; height: 1rem; }
  .step .phone { max-width: 19rem; }
  /* Every second screen leans to the other side, so the column does not read as a stack. */
  .step:nth-child(odd) .phone { rotate: 1.5deg; }
  .step:nth-child(even) .detail { rotate: -1.5deg; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5rem; align-items: start; }
  .split .head { margin-bottom: 0; position: sticky; top: 3rem; }
  .extras { grid-template-columns: repeat(4, 1fr); gap: 2.5rem; }
  .doubts summary { padding-left: 1.5rem; }
  .doubts details > p { padding: 0 4.5rem 1.5rem 1.5rem; }
  /* Beside the words instead of above them. */
  /* Narrower than this, the screen ends right beside the dot, so it stays where it is. */
  @media (min-width: 68rem) { .stage { --to: -19deg; } }
  .close { --r: 16rem; --cx: calc(100% - 9rem); --cy: calc(var(--r) + 3.5rem); padding: 9rem 0; }
}

/* Movement: the mark turns as you scroll past it, the line of the month fills while you read down it,
   and the screens settle into place. All of it is tied to the scroll position; nothing runs on its own.
   The turn is small: the dot travels a short way along its circle and stays in the open, beside the device.
   Where the browser cannot tie an animation to scrolling, src/demo.js sets --turn (0 to 1) instead. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes arrive { from { opacity: 0; transform: translateY(1.5rem); } }
  @keyframes nudge { from { transform: scale(1.08); color: var(--mist); } }
  .demo-amount.is-new { animation: nudge 0.45s var(--ease); }
  @keyframes wave { 50% { translate: 0 -0.2rem; } }
  .demo-hint { animation: wave 1.6s ease-in-out 3; }
  .hero-copy > * { animation: arrive 0.9s var(--ease) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
  .stage .phone-front { animation: arrive 1.1s var(--ease) 0.15s backwards; }
  .stage .phone-back { animation: arrive 1.1s var(--ease) 0.3s backwards; }

  .ring { will-change: transform; }
  .stage .ring { transform: rotate(calc(var(--from) + var(--turn, 0) * (var(--to) - var(--from)))); }
  .close .ring { transform: rotate(calc(var(--from) + var(--turn, 0.5) * (var(--to) - var(--from)))); }

  @supports (animation-timeline: view()) {
    @keyframes turn { from { transform: rotate(var(--from)); } to { transform: rotate(var(--to)); } }
    .stage .ring { animation: turn linear both; animation-timeline: scroll(root); animation-range: 0 56rem; }
    .close .ring { animation: turn linear both; animation-timeline: view(); animation-range: cover; }

    @keyframes fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
    @keyframes settle { from { opacity: 0.2; transform: translateY(3rem) scale(0.96); } }
    .steps::after { animation: fill linear both; animation-timeline: view(); animation-range: cover 15% cover 75%; }
    .step .screen { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
