/*
 * Velmora, «Five reds» — a page played from footage, and a page that travels
 * (tickets/SC-48.md; the footage, the words, the faces and the colours are those of
 * ../prototype-film, tickets/SC-34.md).
 *
 * This sheet is written in two halves.
 *
 * First, the page as it is without the script, or where motion is not wanted: every shot
 * is a screen of its own — its still, its words at the foot of it — and between the acts
 * lie the blocks of the page: the two halves of the house's line, three stills.
 *
 * Then (html.live, set before the first paint when the film will play) the page becomes
 * four acts with real scroll between them:
 *   .act        as tall as its scene is pinned for, plus one screen (--pin, set by the script)
 *   .stage      the scene of the act: a sticky screen. The page brings it in from below,
 *               holds it and carries it away upwards
 *     .frame      the picture: the first frame of the act (.poster) until the film is
 *                 there, then the footage (.screen, a canvas of its own in every act).
 *                 In two acts it is a window (clip-path, set by the script): a round one —
 *                 a well of the mould — and a tall capsule, the shape of a lipstick
 *     .leaders    the line from a word to its thing
 *   .cue        the words of an act lie on the page, not on the scene: they come from
 *               below and leave upwards with the scroll while the picture stands pinned
 *               (the names of the shades stand on the paper itself)
 *   .block      what lies between two acts and scrolls as any page does: «Five reds,»
 *               beside the five bowls, «poured by hand.» with the crimson rising through
 *               it, three stills that slide sideways
 *   .bar        the name and the steps of the story, fixed over all of it
 * After the film, in the flow of the page: .foot — the sheet the shades were tried on.
 *
 * The words take their ink from what lies under them (data-tone): pale rose on the dark
 * of the walls and on the crimson ("night"), the dark of the walls on marble, on paper
 * and on the blush ("day").
 *
 * Brand colours (tickets/SC-34.md): crimson #c2185b, blush #f6c1d0, the dark #1a0b10.
 */

:root {
  --ease-camera: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-text: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 2.6vw, 40px);

  --night: #1a0b10;
  --crimson: #c2185b;
  --blush: #f6c1d0;
  --pale: #fff0f4;

  /* Pale rose: the ink of every word until something says otherwise. */
  --ui: #fff0f4;
  --ui-dim: rgb(255 240 244 / 0.84);
  --under: #1a0b10;
  --plate: rgb(26 11 16 / 0.62);

  /* The house's own pair. DM Serif Display — the letters on its caps and on its wall —
     for every large word; Sora for everything small. The studio's faces (Unbounded,
     Onest) are in the studio's lime corner and nowhere else. */
  --face-display: "DM Serif Display", "Bodoni 72", Didot, "Times New Roman", serif;
  --face-text: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --face-studio-display: "Unbounded", "Arial Black", Arial, sans-serif;
  --face-studio-text: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  background: #1a0b10;
  color: #fff0f4;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  color: #fff0f4;
  font-family: var(--face-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

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

ol,
ul {
  list-style: none;
}

/*
 * ——— The page without the film: seven stills, their words, and the blocks between ———
 */

.stage,
.steps,
.hint {
  display: none;
}

.bar {
  position: absolute;
  top: var(--gutter);
  left: var(--gutter);
  right: var(--gutter);
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: #fff0f4;
  line-height: 1;
}

/* The name as it stands on the wall and on the caps: spaced capitals. */
.brand {
  position: relative;
  isolation: isolate;
  padding-top: 6px;
  color: var(--ui);
  font-family: var(--face-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 300ms linear;
}

/* It passes over the dark wall and over marble alike: it carries its own soft plate. */
.brand::before {
  content: "";
  position: absolute;
  inset: -22px -36px;
  z-index: -1;
  background-image: radial-gradient(closest-side, var(--plate), rgb(0 0 0 / 0));
  pointer-events: none;
}

/* A shot: its still fills a screen, its words stand at the foot of it. */
.shot {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 6px 28px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 96px var(--gutter) clamp(28px, 6vh, 64px);
  overflow: hidden;
  isolation: isolate;
}

.still {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
}

.still img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Under the words a still is darker, so the pale ink reads on any of the seven. */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to top, rgb(26 11 16 / 0.9), rgb(26 11 16 / 0.52) 28%, rgb(26 11 16 / 0) 58%);
  pointer-events: none;
}

.cue {
  position: relative;
  color: var(--ui);
}

.line {
  display: block;
  overflow: hidden;
  padding: 0.06em 0.08em 0.22em 0;
  margin: -0.06em 0 -0.22em;
}

.line > span {
  display: block;
  width: -webkit-fit-content;
  width: fit-content;
}

/* The line of the first screen. */
.title {
  font-family: var(--face-display);
  font-size: clamp(40px, 5.6vw, 92px);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.02;
  white-space: nowrap;
}

/* The word of an act. */
.cue-act {
  font-family: var(--face-display);
  font-size: clamp(56px, 8vw, 128px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 0.96;
}

/* The phrase: its three words in a row (each is a line of its own, to come up one after another). */
.cue-phrase {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.2em;
}

/* A word tied to a thing of the picture. */
.cue-caption {
  font-family: var(--face-display);
  font-size: clamp(32px, 3.9vw, 62px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.06;
  white-space: nowrap;
}

/* The names of the five shades: in a row under their still. */
.names {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}

.cue-name {
  font-family: var(--face-display);
  font-size: clamp(26px, 3vw, 44px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.08;
  white-space: nowrap;
}

.final-title {
  font-family: var(--face-display);
  font-size: clamp(36px, 3.7vw, 60px);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.04;
  white-space: nowrap;
}

/* The button: a capsule of crimson, its arrow in a round of the dark. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  height: 60px;
  margin-top: clamp(20px, 3.4vh, 36px);
  padding: 6px 6px 6px 28px;
  border-radius: 999px;
  background-color: #c2185b;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms linear;
}

.pill:hover {
  background-color: #a3134c;
}

.pill:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.pill-round {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #1a0b10;
  color: #f6c1d0;
}

.pill-round svg,
.studio svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms var(--ease-camera);
}

.pill:hover .pill-round svg,
.pill:focus-visible .pill-round svg {
  transform: translate3d(4px, 0, 0);
}

/*
 * The blocks of the page, between the acts. Each lies on one of the house's three colours.
 */

.block {
  position: relative;
  overflow: hidden;
  background-color: var(--field);
  color: #1a0b10;
}

.block[data-field="blush"] {
  --field: #f6c1d0;
}

.block[data-field="crimson"] {
  --field: #c2185b;
  color: #fff0f4;
}

.block[data-field="night"] {
  --field: #1a0b10;
  color: #fff0f4;
}

/* «Five reds,» beside a still of the five bowls. */
.block-reds {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 4vw, 64px);
  padding: clamp(40px, 8vh, 84px) var(--gutter) clamp(44px, 9vh, 96px) clamp(16px, 6vw, 96px);
}

.reds,
.poured {
  font-family: var(--face-display);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 0.96;
  white-space: nowrap;
}

.reds {
  font-size: clamp(64px, 13vw, 220px);
}

/* The line is as wide as its words: wider than its column, it runs on towards the still. */
.reds .line {
  width: -webkit-max-content;
  width: max-content;
}

.bowls {
  justify-self: end;
  width: min(100%, 440px);
}

.bowls img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  /* A capsule, as a lipstick stands. */
  border-radius: 999px;
  background-color: #d9c8cb;
}

/* «poured by hand.» Without the film: the dark ink on the blush. */
.block-poured {
  padding: clamp(48px, 12vh, 120px) var(--gutter);
  text-align: center;
}

.poured {
  font-size: clamp(44px, 11.6vw, 200px);
}

.poured-over {
  display: none;
}

/* Three stills of the footage, a name under each. Without the film: in a row. */
.block-strip {
  padding: clamp(40px, 8vh, 84px) var(--gutter) clamp(44px, 9vh, 96px);
}

.strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 32px);
}

.strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 6px;
  background-color: #2b1820;
}

.strip figcaption {
  margin-top: 12px;
  font-family: var(--face-display);
  font-size: clamp(28px, 3.4vw, 54px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.08;
}

/*
 * ——— The film: the acts, and the page between them ———
 */

.live .bar {
  position: fixed;
  transition: opacity 320ms var(--ease-camera);
}

.live .bar.is-away {
  opacity: 0;
  pointer-events: none;
}

/* An act is as tall as its scene is pinned for, and the screen the scene itself takes. */
.live .act {
  position: relative;
  z-index: 0;
  height: calc((1 + var(--pin, 1)) * 100vh);
  height: calc((1 + var(--pin, 1)) * 100svh);
}

.live .stage {
  position: sticky;
  top: 0;
  z-index: 0;
  display: block;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: var(--night);
}

.live .frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: var(--night);
}

.live .poster {
  position: absolute;
  inset: 0;
  display: block;
}

/* Until the script has laid it exactly where the film will lie, the first frame covers its scene. */
.live .poster img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* A canvas is shown from its first drawing on: before that the first frame of the act stands there. */
.live .screen {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  visibility: hidden;
}

.live .screen.is-painted {
  visibility: visible;
}

/* A shot is no longer a box: its words lie on the page of its act. */
.live .shot {
  position: static;
  display: block;
  min-height: 0;
  padding: 0;
  overflow: visible;
  isolation: auto;
}

.live .shot::after {
  content: none;
}

.live .still {
  display: none;
}

.live .leaders {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/*
 * The words of an act. They are set on the page — on the act, which is taller than the
 * screen — so the scroll itself brings them up from below and carries them off at the
 * top, over a picture that stands pinned.
 */
.live .cue {
  position: absolute;
  z-index: 3;
  isolation: isolate;
  pointer-events: none;
  transition:
    color 300ms linear,
    visibility 0s linear 0s;
}

.live .cue:not(.is-on) {
  visibility: hidden;
  transition:
    color 300ms linear,
    visibility 0s linear 340ms;
}

/* A line comes up from under a mask and leaves the way it came. */
.live .line > span {
  transform: translate3d(0, 122%, 0);
  transition: transform 300ms var(--ease-camera);
}

.live .cue.is-on .line > span {
  transform: none;
  transition: transform 640ms var(--ease-text) calc(var(--i, 0) * 70ms + 90ms);
}

/* Under a block of words the picture is one soft plate of the block's own tone: no glow round every letter. */
.live .cue::before {
  content: "";
  position: absolute;
  inset: -58% -34%;
  z-index: -1;
  background-image: radial-gradient(closest-side, var(--plate), rgb(0 0 0 / 0));
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms linear;
}

.live .cue.is-on::before {
  opacity: 1;
  transition: opacity 520ms linear 80ms;
}

/* Over a flood a word takes the flood's ink and has no plate: on one even colour a plate is a smudge. */
.live .cue.is-flat::before {
  opacity: 0;
}

/*
 * A card stands on a flood inside an act: in the middle of the pinned scene (the script
 * moves it into the scene), drifting up as the page goes. On a flood there is nothing to
 * lift the words off.
 */
.live .cue-card {
  left: 50%;
  top: 50%;
  width: -webkit-max-content;
  width: max-content;
  max-width: calc(100vw - 2 * var(--gutter));
  transform: translate3d(-50%, calc(-50% + var(--ty, 0px)), 0);
}

.live .cue-card::before {
  content: none;
}

/*
 * The blocks between the acts scroll as any page does.
 */

.live .block {
  z-index: 1;
}

/*
 * A block after a flood lies over the last of the act before it (--over screens, set by
 * the script from the act's hold). Up there it is clear — the flood itself is the colour —
 * and its words rise over the pinned flood; below the act it paints the same colour on,
 * and flood and block ride away as one page.
 */
.live .block.is-over {
  margin-top: calc(var(--over, 0.2) * -100vh);
  margin-top: calc(var(--over, 0.2) * -100svh);
  background-color: rgb(0 0 0 / 0);
  background-image: linear-gradient(to bottom, rgb(0 0 0 / 0) calc(var(--over, 0.2) * 100vh - 2px), var(--field) calc(var(--over, 0.2) * 100vh - 2px));
  background-image: linear-gradient(to bottom, rgb(0 0 0 / 0) calc(var(--over, 0.2) * 100svh - 2px), var(--field) calc(var(--over, 0.2) * 100svh - 2px));
}

/* The ink of the words over the footage. */
.live [data-tone="night"] {
  --ui: #fff0f4;
  --ui-dim: rgb(255 240 244 / 0.84);
  --under: #1a0b10;
  --plate: rgb(26 11 16 / 0.62);
}

/* On a flood: the pale ink without its plate. */
.live [data-tone="bare"] {
  --ui: #fff0f4;
  --ui-dim: rgb(255 240 244 / 0.84);
  --under: #1a0b10;
  --plate: rgb(26 11 16 / 0);
}

/* On marble, on paper and on the blush: the dark of the walls, lifted off the veins of the stone by a pale plate. */
.live [data-tone="day"] {
  --ui: #1a0b10;
  --ui-dim: rgb(26 11 16 / 0.82);
  --under: #fff0f4;
  --plate: rgb(255 250 251 / 0.56);
}


/* The margins round a window are the page's colour of the moment. */
.live .stage[data-field="blush"] {
  background-color: #f6c1d0;
}

.live .stage[data-field="crimson"] {
  background-color: #c2185b;
}

/* The round window rides in under the foot of «Five reds,»; the capsule — as the crimson that has risen through «poured by hand.». */
.live .act[data-act="pour"] {
  margin-top: -10vh;
  margin-top: -10svh;
}

.live .names {
  display: block;
}

/* A line that is off is not painted at all, once it has drawn itself back: Safari's engine
   shows the round end of an empty dash as a dot where the line begins. */
.leader {
  visibility: hidden;
  transition: visibility 0s linear 300ms;
}

.leader.is-on {
  visibility: visible;
  transition: visibility 0s linear 0s;
}

/* A line: a hair of the word's ink over a wider one of the other tone, a ring where it lands. */
.leader path {
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 240ms var(--ease-camera);
}

.leader path.casing {
  stroke: var(--under);
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.42;
}

.leader path.stroke {
  stroke: var(--ui);
  stroke-width: 1.5;
}

.leader circle {
  opacity: 0;
  transition: opacity 160ms linear;
}

.leader circle.casing {
  fill: var(--under);
}

.leader .dot {
  fill: var(--ui);
}

.leader .ring {
  fill: none;
  stroke: var(--ui);
  stroke-width: 1.5;
}

.leader.is-on path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 520ms var(--ease-text) 120ms;
}

.leader.is-on circle.casing {
  opacity: 0.42;
  transition: opacity 200ms linear 380ms;
}

.leader.is-on .dot {
  opacity: 1;
  transition: opacity 200ms linear 380ms;
}

.leader.is-on .ring {
  opacity: 0.85;
  transition: opacity 220ms linear 460ms;
}

/* The line of the first screen stands in its corner and goes up with the page from the first turn of the wheel. */
.live .cue-opening {
  /* Set by the script: the words fade just before they would ride up under the header. */
  opacity: var(--fade, 1);
  left: var(--gutter);
  bottom: calc(var(--pin, 1) * 100vh + var(--gutter) + 2px);
  bottom: calc(var(--pin, 1) * 100svh + var(--gutter) + 2px);
}

/*
 * A word rides: the script lays it on the page (--at, screens from the top of its act) so
 * that it comes on at its line of the screen, and the scroll carries it up from there.
 */
.live .cue-act:not(.cue-card),
.live .cue-caption {
  top: calc(var(--at, 0.6) * 100vh);
  top: calc(var(--at, 0.6) * 100svh);
  opacity: var(--fade, 1);
  transform: translate3d(0, -50%, 0);
}

/* «Cherry.» — as large as the screen lets it be: it comes up through the crimson and rides on over the pitcher. */
.live .cue-act {
  font-size: clamp(110px, 24vw, 420px);
}

.live #cue-cherry {
  left: 50%;
  width: -webkit-max-content;
  width: max-content;
  transform: translate3d(-50%, -50%, 0);
}

.live #cue-cherry::before {
  inset: -24% -10%;
}

/* On a flood, and on the cream of the paper, there is nothing to lift the words off. */
.live .cue-card::before,
.live .cue-name::before {
  content: none;
}

.live .cue-card {
  text-align: center;
}

/* The phrase: three words in one line across the screen, each coming up after the one before. */
.live .cue-phrase {
  flex-wrap: nowrap;
  justify-content: center;
  font-size: clamp(72px, 12.6vw, 232px);
}

/* «3.5 g each.» rides up the marble at the left of the mould. */
.live #cue-weight {
  left: 6%;
}

/* The caption of the bullet rides up the dark beside it and sends its line to the tip. */
.live #cue-satin {
  left: 9%;
}

/* A name stands on the paper under its stroke: the script puts it there (its middle, its top), sized by the picture. */
.live .cue-name {
  font-size: calc(var(--frame, 9px) * 4.5);
  transform: translate3d(-50%, 0, 0);
}

/* The last line and its button: along the foot of the act's page, on the marble under the box and the paper; they ride in from below. */
.live .cue-final {
  left: calc(var(--gutter) + 1.2vw);
  right: calc(var(--gutter) + 1.2vw);
  bottom: 4.6vh;
  bottom: 4.6svh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.live .cue-final::before {
  inset: -70% -8%;
}

/* On a wide screen its two halves stand in one line (each still comes up by itself). */
.live .final-title {
  display: flex;
  gap: 0.15em;
}

.live .pill {
  margin-top: 0;
  margin-top: 0;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 220ms linear,
    transform 300ms var(--ease-camera),
    background-color 180ms linear;
}

.live .cue-final.is-on .pill {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 400ms linear 360ms,
    transform 640ms var(--ease-text) 360ms,
    background-color 180ms linear;
}


/* «Five reds,» comes up from under its mask as the blush shuts; the still of the bowls rides a little behind the page. */
.live .block-reds {
  padding-top: 6vh;
  padding-top: 6svh;
  padding-bottom: 16vh;
  padding-bottom: 16svh;
}

.live .reds {
  opacity: var(--fade, 1);
}

.live .block.is-on .reds .line > span {
  transform: none;
  transition: transform 1100ms cubic-bezier(0.22, 0.72, 0.2, 1) 80ms;
}

.live .bowls {
  opacity: 0;
  transform: translate3d(0, calc((0.5 - var(--p, 0.5)) * -220px), 0);
  transition: opacity 360ms linear;
}

.live .block.is-on .bowls {
  opacity: 1;
}

/*
 * «poured by hand.» The crimson of the next act rises through the block from its foot
 * (--q, from how far the block has ridden through the screen), and the words turn pale
 * where it has passed: the same line set twice, the pale one cut to the crimson.
 */
.live .block-poured {
  --q: clamp(0, (var(--p, 0) - 0.18) * 2.6, 1);
  padding: 9vh 0 13vh;
  padding: 9svh 0 13svh;
}

.live .poured {
  opacity: 0;
  transition: opacity 320ms linear;
}

.live .block.is-on .poured {
  opacity: 1;
}

.live .poured > span {
  display: inline-block;
  /* Set by the script: the words fade just before they would ride up under the header. */
  opacity: var(--fade, 1);
  transform: translate3d(calc((0.5 - var(--p, 0.5)) * 16vw), 0, 0);
}

.live .poured-over {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9vh 0 13vh;
  padding: 9svh 0 13svh;
  background-color: #c2185b;
  color: #fff0f4;
  -webkit-clip-path: inset(calc((1 - var(--q)) * 100%) 0 0 0);
  clip-path: inset(calc((1 - var(--q)) * 100%) 0 0 0);
}

/* Three stills, far wider than the screen together: they slide to the left as the page goes down. */
.live .block-strip {
  padding: 7vh 0 12vh;
  padding: 7svh 0 12svh;
}

.live .strip {
  display: flex;
  gap: 3vw;
  width: -webkit-max-content;
  width: max-content;
  opacity: 0;
  transform: translate3d(calc(40vw - var(--p, 0.5) * 150vw), 0, 0);
  transition: opacity 360ms linear;
}

.live .block.is-on .strip {
  opacity: 1;
}

.live .strip li {
  width: 46vw;
}

/* The steps of the story: a name and, under it, a hairline that fills as the step goes by and stays full after it. */
.live .steps {
  position: relative;
  display: block;
  isolation: isolate;
  color: var(--ui);
  transition: color 300ms linear;
}

.live .steps::before {
  content: "";
  position: absolute;
  inset: -26px -44px;
  z-index: -1;
  background-image: radial-gradient(closest-side, var(--plate), rgb(0 0 0 / 0));
  pointer-events: none;
  transition: opacity 240ms linear;
}

/* On a flood, a block or a margin — one even colour — the name and the steps need no plate. */
.live .steps.is-flat::before,
.live .brand.is-flat::before {
  opacity: 0;
}

.steps ol {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 2vw, 32px);
  list-style: none;
}

.steps button {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  min-width: 56px;
  margin: 0;
  padding: 8px 0 10px;
  border: 0;
  background: none;
  color: var(--ui-dim);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-align: left;
  cursor: pointer;
  transition: color 200ms linear;
}

.steps button:hover,
.steps .is-now button {
  color: var(--ui);
}

.steps button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.steps .is-now button {
  font-weight: 700;
}

.steps i {
  position: relative;
  display: block;
  height: 2px;
  overflow: hidden;
  background-color: color-mix(in srgb, currentColor 30%, transparent);
}

.steps i::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: currentColor;
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

.live .hint {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--gutter) + 6px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  /* It lies on the marble of the first screen: the dark ink. */
  color: #1a0b10;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: opacity 360ms var(--ease-camera);
}

.hint i {
  display: block;
  width: 44px;
  height: 2px;
  background-color: #c2185b;
}

.hint.is-off {
  opacity: 0;
}

/*
 * ——— The footer: the sheet the shades were tried on ———
 *
 * Seen from over it and close: a sheet of cotton paper on the marble, the five strokes
 * across it (textures/paper.webp, photographed). The name of each shade is written on
 * the paper under its stroke; the name of the house and the weight of a lipstick stand
 * at the foot of the sheet. The studio's lime corner is the one thing that is the same
 * on every page.
 */

.foot {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(84px, 12vh, 112px);
  background-color: #1a0b10;
  color: #fff0f4;
}

.sheet {
  position: relative;
  isolation: isolate;
  width: min(100%, 1680px);
  margin: 0 auto;
  background-color: #2a1a20;
  color: #1a0b10;
}

.paper {
  display: block;
}

.paper img {
  display: block;
  width: 100%;
  height: auto;
}

/* The marble goes out into the dark of the page above the sheet and below it. */
.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, rgb(26 11 16 / 1), rgb(26 11 16 / 0) 8%, rgb(26 11 16 / 0) 95%, rgb(26 11 16 / 1));
  pointer-events: none;
}

.shades {
  position: absolute;
  inset: 0;
  z-index: 1;
  list-style: none;
}

/* Under its stroke: the strokes lie 11.9% of the photograph apart, the first 27.5% from its left. */
.shades li {
  position: absolute;
  left: calc(27.5% + var(--n) * 11.9%);
  top: 77.5%;
  font-family: var(--face-display);
  font-size: clamp(20px, 2.5vw, 42px);
  font-style: italic;
  line-height: 1;
  white-space: nowrap;
  transform: translate3d(-50%, 0, 0);
}

.sheet-foot {
  position: absolute;
  left: 13.5%;
  right: 12.5%;
  bottom: 7.5%;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  line-height: 1;
}

.sheet-brand {
  font-family: var(--face-display);
  font-size: clamp(18px, 1.5vw, 24px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.sheet-weight {
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 500;
}

/* The studio signs in its own colours, not the house's: volt and ink, in the corner. */
.studio {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px var(--gutter) 18px 26px;
  border-top-left-radius: 28px;
  background-color: #d6fa50;
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms linear;
}

.studio-by {
  font-family: var(--face-studio-text);
  text-transform: uppercase;
}

.studio-name {
  font-family: var(--face-studio-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.studio:hover,
.studio:focus-visible {
  background-color: #b8dc2c;
}

.studio:focus-visible {
  outline: 2px solid #fff0f4;
  outline-offset: 3px;
}

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

.studio:hover svg,
.studio:focus-visible svg {
  transform: rotate(45deg);
}

/*
 * ——— A tall screen: the tall frames, the words under the picture ———
 * (The script switches to the tall series at the same ratio. On a phone it lays every
 * shot across the screen's width, under the header, and the words stand in the dark
 * below the picture.)
 */

@media (max-aspect-ratio: 3 / 4) {
  .brand {
    font-size: 19px;
  }

  /* Without the film: the still, whole, and its words under it. */
  .shot {
    min-height: 0;
    padding: 0 var(--gutter) 34px;
  }

  .shot[data-shot="C1"] {
    padding-top: 68px;
  }

  .still {
    position: relative;
    inset: auto;
    z-index: 0;
    width: calc(100% + 2 * var(--gutter));
    margin: 0 calc(-1 * var(--gutter)) 18px;
    aspect-ratio: 3 / 4;
  }

  .shot::after {
    content: none;
  }

  .title {
    font-size: clamp(34px, 10.4vw, 44px);
  }

  .cue-caption {
    font-size: 38px;
  }

  .cue-name {
    font-size: 26px;
  }

  .final-title {
    font-size: clamp(34px, 9.6vw, 44px);
  }

  .live .cue-act {
    font-size: 23vw;
  }

  .pill {
    height: 56px;
    margin-top: 18px;
  }

  .pill-round {
    width: 44px;
    height: 44px;
  }

  /* With the film: the picture is the stage's again. */
  .live .shot {
    padding: 0;
  }

  /* On a phone the words ride over the picture and over the dark under it: the pale ink on its plate, unless a flood lies under them. */
  .live .cue-opening:not(.is-flat),
  .live .cue-final:not(.is-flat),
  .live #cue-cherry:not(.is-flat),
  .live .cue-caption:not(.is-flat),
  .live .leader {
    --ui: #fff0f4;
    --ui-dim: rgb(255 240 244 / 0.84);
    --under: #1a0b10;
    --plate: rgb(26 11 16 / 0.66);
  }

  .live .cue-opening {
    bottom: calc(var(--pin, 1) * 100vh + var(--gutter) + 26px + env(safe-area-inset-bottom, 0px));
    bottom: calc(var(--pin, 1) * 100svh + var(--gutter) + 26px + env(safe-area-inset-bottom, 0px));
  }

  /* The phrase: its three words one under another. */
  .live .cue-phrase {
    flex-direction: column;
    align-items: center;
    gap: 0;
    font-size: 30vw;
    line-height: 0.92;
  }

  /* The captions ride up from the dark under the picture. */
  .live #cue-satin,
  .live #cue-weight {
    left: var(--gutter);
    right: auto;
    font-size: 34px;
  }

  /* The blocks. */
  .block-reds {
    grid-template-columns: minmax(0, 1fr);
  }

  .reds {
    font-size: clamp(64px, 21vw, 120px);
  }

  .bowls {
    justify-self: start;
    width: 62%;
    margin-left: 30%;
  }

  /* One under the other, the word and the still ride at the page's own pace. */
  .live .bowls {
    transform: none;
  }

  .poured {
    font-size: clamp(40px, 12.6vw, 64px);
  }

  .strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .live .strip {
    gap: 5vw;
    transform: translate3d(calc(70vw - var(--p, 0.5) * 290vw), 0, 0);
  }

  .live .strip li {
    width: 78vw;
  }

  .live .cue::before {
    inset: -40% -14% -30%;
  }

  /* The last line and the button stand in the dark under the picture. */
  .live .cue-final {
    left: var(--gutter);
    right: var(--gutter);
    bottom: calc(var(--gutter) + 20px + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 18px;
  }

  .live .cue-final::before {
    content: none;
  }

  .live .final-title {
    display: block;
  }

  /* Only the step on screen keeps its name; the others are their hairlines. */
  .steps ol {
    align-items: flex-end;
    gap: 8px;
  }

  .steps button {
    min-width: 20px;
  }

  .steps li:not(.is-now) span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .live .hint span {
    display: none;
  }

  .live .hint {
    bottom: calc(var(--gutter) + 6px + env(safe-area-inset-bottom, 0px));
  }

  /* The sheet turned: its strokes one under another, each name over its stroke; the foot of the sheet under it, in the dark. */
  .foot {
    padding-bottom: 92px;
  }

  .sheet {
    background-color: #1a0b10;
    color: #fff0f4;
  }

  .sheet::after {
    bottom: auto;
    aspect-ratio: 900 / 1064;
    background-image: linear-gradient(to bottom, rgb(26 11 16 / 1), rgb(26 11 16 / 0) 5%, rgb(26 11 16 / 0) 96%, rgb(26 11 16 / 1));
  }

  .shades {
    bottom: auto;
    aspect-ratio: 900 / 1064;
    color: #1a0b10;
  }

  /* Under its stroke, at the stroke's own left end: the strokes lie 18.05% of the photograph apart. */
  .shades li {
    left: 29%;
    top: calc(17% + var(--n) * 18.05%);
    font-size: clamp(18px, 5.4vw, 30px);
    transform: none;
  }

  .sheet-foot {
    position: static;
    padding: 18px var(--gutter) 8px;
  }

  .sheet-brand {
    font-size: 19px;
  }

  .sheet-weight {
    font-size: 16px;
  }
}

/*
 * A phone (narrower than 0.86 of the tall frame's shape): the script lays the picture
 * across the screen's width, 11% down from the top. The first still lies the same way.
 */
@media (max-aspect-ratio: 645 / 1000) {
  .live .shot[data-shot="C1"] .still {
    inset: 11% auto auto 50%;
    width: calc(100vw / 0.86);
    height: calc(100vw / 0.86 * 4 / 3);
    transform: translate3d(-50%, 0, 0);
  }
}

/* ——— Checks ——— */

.hud {
  position: fixed;
  left: 8px;
  top: 64px;
  z-index: 20;
  margin: 0;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgb(0 0 0 / 0.82);
  color: #b6ff7a;
  font: 11px/1.45 ui-monospace, Menlo, monospace;
  white-space: pre;
  pointer-events: none;
}
