/*
 * Duskbloom, «Twelve shades of dusk» — a page played from footage, and a page that travels
 * (tickets/SC-48.md; the footage, the words and the colours are those of ../prototype-film, SC-42).
 *
 * 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 — and between the acts lie the blocks of
 * the page: a word of the house on its lilac or its rose, the twelve shades by name.
 *
 * 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 act 3 it is a window in the rose (clip-path, set by the script) that
 *                 opens to the whole screen; in act 4 the whole screen closes, as the lid
 *                 does, into a window beside the last lines
 *     .leaders    the lines from a word to its thing
 *   .cue        the words of an act lie on the page, not on the scene: the captions and
 *               the phrase of the house come from below and leave upwards with the scroll
 *               while the picture stands pinned
 *   .block      what lies between two acts and scrolls as any page does. A block that
 *               follows a flood lies over the end of the act before it, so its words rise
 *               on the colour while that still stands pinned
 *   .bar        the name of the house and the pans of the steps, fixed over all of it
 * After the film, in the flow of the page: .foot — the palette opened flat, the names
 * of its twelve shades inside the lid.
 *
 * The words take their ink from what lies under them (data-tone): pale on the dark of
 * the room ("night", on a soft dark plate; "bare", on a dark colour of the page, without
 * it), dark on the lilac and the rose ("day") and on the bright of the picture ("light",
 * on a soft pale plate).
 *
 * The colours of the house (tickets/SC-42.md): dusk #151018, lilac #b388eb, rose #f7aef8.
 */

: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: #151018;
  --lilac: #b388eb;
  --rose: #f7aef8;
  --paper: #f6eefa;

  /* The house's own pair. Bricolage Grotesque — the letters of its lid — for every large
     word; Schibsted Grotesk for everything small. The studio's faces (Unbounded, Onest)
     are in the studio's lime corner and nowhere else. */
  --face-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --face-text: "Schibsted Grotesk", 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;

  /* Pale: the ink of every word until something says otherwise. */
  --ui: #f6eefa;
  --ui-dim: rgb(246 238 250 / 0.84);
  --under: #151018;
  --plate: rgb(21 16 24 / 0.6);
}

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

html {
  background: #151018;
  color: #f6eefa;
  -webkit-text-size-adjust: 100%;
}

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

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

ol,
ul {
  list-style: none;
}

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

.stage,
.pans,
.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: #f6eefa;
  line-height: 1;
}

/* The name as it stands on the lid, and before it the dusk in one round: lilac going into rose. */
.brand {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 5px;
  color: var(--ui);
  font-family: var(--face-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  transition: color 300ms linear;
}

.brand-mark {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-image: linear-gradient(160deg, #b388eb 18%, #f7aef8 82%);
  box-shadow: 0 0 0 1.5px var(--under);
}

/* It passes over the sky and over the dark 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) 45%, 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: 10px 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(21 16 24 / 0.9), rgb(21 16 24 / 0.55) 30%, rgb(21 16 24 / 0) 62%);
  pointer-events: none;
}

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

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

.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(44px, 6.6vw, 112px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.94;
  white-space: nowrap;
}

/* The word of an act, on its flood or on a block of the page; the phrase of the house. */
.cue-act,
.cue-phrase,
.phrase {
  font-family: var(--face-display);
  font-size: clamp(56px, 8vw, 128px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

/* A word tied to a thing of the picture: the number of the shade in a ring, and its name. */
.cue-caption {
  font-family: var(--face-display);
  font-size: clamp(32px, 3.8vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  white-space: nowrap;
}

.cue-caption .line > span {
  display: flex;
  align-items: center;
  gap: 0.3em;
}

.num {
  display: inline-grid;
  place-items: center;
  min-width: 2.5em;
  padding: 0.42em 0.6em;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-family: var(--face-text);
  font-size: max(15px, 0.34em);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.final-title {
  font-family: var(--face-display);
  font-size: clamp(44px, 6.2vw, 104px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.94;
  white-space: nowrap;
}

/* The button: a capsule of rose, its arrow in a round of dusk. */
.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: #f7aef8;
  color: #151018;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms linear;
}

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

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

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

.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(0, 4px, 0);
}

/* A still with no words is left as it was shot. */
.shot[data-words="none"]::after {
  content: none;
}

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

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

.block[data-field="lilac"] {
  --field: #b388eb;
}

.block[data-field="rose"] {
  --field: #f7aef8;
}

.block[data-field="night"] {
  --field: #151018;
  color: #f6eefa;
}

.block-word,
.block-shades {
  padding: clamp(44px, 10vh, 100px) var(--gutter);
}

/* The twelve shades: each pan a square of the footage, its number and its name; four to a row, as the pans lie. */
.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 3vh, 30px) clamp(10px, 1.4vw, 22px);
  margin-top: clamp(24px, 5vh, 48px);
}

.swatches li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 8px;
  min-width: 0;
}

.swatches img {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: 10px;
  border-radius: 50%;
  background-color: #3a2a3d;
}

.swatches .no {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.swatches .name {
  font-family: var(--face-display);
  font-size: clamp(20px, 1.9vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

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

/* The ink of the words over the footage. */
.live [data-tone="night"] {
  --ui: #f6eefa;
  --ui-dim: rgb(246 238 250 / 0.84);
  --under: #151018;
  --plate: rgb(21 16 24 / 0.6);
}

/* On a dark colour of the page: the pale ink without its plate. */
.live [data-tone="bare"] {
  --ui: #f6eefa;
  --ui-dim: rgb(246 238 250 / 0.84);
  --under: #151018;
  --plate: rgb(21 16 24 / 0);
}

/* On the lilac and on the rose. */
.live [data-tone="day"] {
  --ui: #151018;
  --ui-dim: rgb(21 16 24 / 0.84);
  --under: #f6eefa;
  --plate: rgb(246 238 250 / 0);
}

/* On the bright of the picture: the dark ink on a soft pale plate. */
.live [data-tone="light"] {
  --ui: #151018;
  --ui-dim: rgb(21 16 24 / 0.84);
  --under: #f6eefa;
  --plate: rgb(246 238 250 / 0.6);
}

.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);
}

/* The window rides in under the foot of the word before it: the block ends on the window's own rose. */
.live .act[data-act="palette"] {
  margin-top: -10vh;
  margin-top: -10svh;
}

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

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

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

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

.live .frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #151018;
}

.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;
}

/*
 * A line that is off is not drawn at all. Its dashes are of no length then, yet WebKit
 * still draws their round caps — a dot was left where every hidden line begins.
 */
.leader {
  visibility: hidden;
  transition: visibility 0s linear 280ms;
}

.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 220ms 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 420ms var(--ease-text) 80ms;
}

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

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

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

/*
 * 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, 124%, 0);
  transition: transform 280ms var(--ease-camera);
}

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

/* 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: -64% -30%;
  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;
}

/* On a flood there is nothing to lift the words off. */
.live .cue-card::before {
  content: none;
}

/* The line of the first screen stands over the dark floor, under the table, 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) + 4px);
  bottom: calc(var(--pin, 1) * 100svh + var(--gutter) + 4px);
}

/*
 * The word of an act stands on a flood inside its act: in the middle of the pinned scene
 * (the script moves it into the scene), as large as the screen lets it, drifting up
 * while the flood holds.
 */
.live .cue-card {
  left: 50%;
  top: 50%;
  width: -webkit-max-content;
  width: max-content;
  max-width: calc(100vw - 2 * var(--gutter));
  text-align: center;
  transform: translate3d(-50%, calc(-52% + var(--ty, 0px)), 0);
}

.live .cue-card .line > span {
  margin: 0 auto;
}

.live .cue-act {
  font-size: clamp(110px, 22.5vw, 400px);
}

/* On the dark flood the word of the house is its rose. */
.live .cue-card[data-tone="bare"] {
  --ui: #f7aef8;
}

/*
 * The words that ride lie on the page of their act where the script puts them (--at, in
 * screens from the act's head): the scroll carries each up past the pinned picture, and
 * a caption's line follows the thing it is tied to.
 */
.live .cue-caption,
.live .cue-ride {
  top: calc(var(--at, 0.5) * 100vh);
  top: calc(var(--at, 0.5) * 100svh);
  opacity: var(--fade, 1);
}

/* Each caption rides where its frame is quiet, on the side its thing is not. */
.live #cue-lilac {
  left: 7%;
}

.live #cue-gram {
  left: 42%;
}

.live #cue-rose {
  left: 74%;
}

.live #cue-orchid {
  left: 5.5%;
}

/*
 * The phrase of the house, in its rose: it comes up on the dark the room has gone into
 * and rides on, up the left of the picture, all the while the shade is pressed.
 */
.live .cue-ride {
  --ui: #f7aef8;
  left: 4.5%;
  font-size: clamp(64px, 10vw, 184px);
  line-height: 0.88;
}

.live .cue-ride::before {
  inset: -30% -24%;
  background-image: radial-gradient(closest-side, rgb(21 16 24 / 0.7), rgb(21 16 24 / 0.4) 55%, rgb(0 0 0 / 0));
}

/* The last lines ride in from below, left of the lid, and stand beside the closed window when the scene is let go. */
.live .cue-final {
  left: calc(var(--gutter) + 0.8vw);
  top: calc((var(--pin, 1) + 0.34) * 100vh);
  top: calc((var(--pin, 1) + 0.34) * 100svh);
}

/* (A size smaller than on a still: they share the screen with the window.) */
.live .final-title {
  font-size: clamp(44px, 5.1vw, 86px);
}

.live .pill {
  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;
}

/*
 * The blocks between the acts.
 */

.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));
}

.live .block-word,
.live .block-shades {
  padding: 2vh var(--gutter) 4vh;
  padding: 2svh var(--gutter) 4svh;
}

/* One word in the middle of its colour, as large as the screen lets it. */
.live .phrase {
  width: -webkit-max-content;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(110px, 22.5vw, 400px);
}

.live .phrase .line {
  /* Set by the script: a line fades just before it would ride up under the header. */
  opacity: var(--fade, 1);
}

/* It takes its time to rise. */
.live .block.is-on .phrase .line > span {
  transform: none;
  transition: transform 1100ms cubic-bezier(0.22, 0.72, 0.2, 1) 80ms;
}

/*
 * The twelve shades: six to a row here, two rows. Each is set down in its turn as the
 * block rides through the screen (--p, set by the script; --k is its place of the twelve):
 * it comes up to its size and stays.
 */
.live .block-shades {
  padding-bottom: 7vh;
  padding-bottom: 7svh;
}

.live .swatches {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4vh clamp(14px, 2.2vw, 36px);
  gap: 4svh clamp(14px, 2.2vw, 36px);
  margin-top: 1vh;
  margin-top: 1svh;
  padding: 0 2vw;
}

.live .swatches li {
  --set: clamp(0, (var(--p, 1) - 0.2 - var(--k, 0) * 0.024) * 9, 1);
  opacity: var(--set);
  transform: translate3d(0, calc((1 - var(--set)) * 34px), 0) scale(calc(0.72 + 0.28 * var(--set)));
}

/*
 * The steps of the story: a name and, under it, three pans of the palette. Twelve in all,
 * from lilac to rose; a pan fills as its third of the step goes by and stays full after it.
 */
.live .pans {
  position: relative;
  display: block;
  isolation: isolate;
  color: var(--ui);
  transition: color 300ms linear;
}

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

.pans ol {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 1.8vw, 28px);
  list-style: none;
}

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

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

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

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

.pans i {
  display: flex;
  gap: 5px;
}

/* A pan: a ring of the header's ink, and in it its shade, growing from the middle. */
.pans b {
  position: relative;
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--ui-dim);
}

.pans b::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: var(--shade, #b388eb);
  box-shadow: inset 0 0 0 1.5px var(--ui);
  transform: scale(clamp(0, calc(var(--p, 0) * 3 - var(--k, 0)), 1));
}

.live .hint {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--gutter) + 6px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f6eefa;
  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: #f7aef8;
}

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

/*
 * ——— The footer: the palette, opened flat ———
 *
 * Seen from over it (textures/palette.webp, photographed): the twelve pans, and above
 * them the inside of the lid. The names of the shades are set on the lid in the order
 * of the pans, each over its own column. The lines of the house stand on the slate
 * beside it. The studio's lime corner is the one thing that is the same on every page.
 */

.foot {
  position: relative;
  padding-bottom: clamp(84px, 12vh, 112px);
  background-color: #151018;
  color: #f6eefa;
}

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

.tray {
  position: relative;
}

.flat {
  display: block;
}

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

/* The slate goes out into the dark of the page above and below, and is darker where the lines stand. */
.tray::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom, rgb(21 16 24 / 1), rgb(21 16 24 / 0) 12%, rgb(21 16 24 / 0) 88%, rgb(21 16 24 / 1)),
    linear-gradient(to right, rgb(21 16 24 / 0) 50%, rgb(21 16 24 / 0.5) 64%, rgb(21 16 24 / 0.62));
  pointer-events: none;
}

/* The inside of the lid: three rows of four names, as the pans lie under them. */
.shades {
  position: absolute;
  left: 18.2%;
  top: 11.5%;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 26.7%;
  height: 31.5%;
  list-style: none;
}

.shades li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  text-align: center;
  line-height: 1;
}

.shades .no {
  color: #d9bff6;
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.shades .name {
  color: #f6eefa;
  font-family: var(--face-display);
  font-size: clamp(15px, 1.5vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.maker {
  position: absolute;
  left: 57%;
  right: var(--gutter);
  top: 50%;
  z-index: 1;
  transform: translate3d(0, -50%, 0);
}

.maker-name {
  margin-bottom: clamp(14px, 1.8vw, 28px);
  color: #f7aef8;
  font-family: var(--face-display);
  font-size: clamp(48px, 7vw, 118px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.maker-line {
  font-size: clamp(18px, 1.7vw, 27px);
  font-weight: 500;
  line-height: 1.32;
}

.maker-fact {
  margin-top: clamp(14px, 1.6vw, 24px);
  color: #d9bff6;
  font-size: clamp(15px, 1.15vw, 18px);
  font-weight: 600;
  line-height: 1.4;
}

/* 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 #f6eefa;
  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 ride in the dark
 * below the picture.)
 */

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

  /* 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;
  }

  .shot[data-words="none"] {
    padding-bottom: 0;
  }

  .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[data-words="none"] .still {
    margin-bottom: 0;
  }

  .shot::after {
    content: none;
  }

  .title {
    font-size: clamp(40px, 12.4vw, 56px);
  }

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

  .final-title {
    font-size: clamp(42px, 13vw, 58px);
  }

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

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

  /* Three shades to a row. */
  .swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 12px;
  }

  .swatches .name {
    font-size: 19px;
  }

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

  .live .cue-act,
  .live .phrase {
    font-size: 21.5vw;
  }

  /*
   * A phone has no window in the rose: the scene after «One.» is the dark of the page from
   * edge to edge. So the word keeps a rose of its own under it — the block is taller than
   * the flood it lies over — and the scene does not ride in under its foot.
   */
  .live .block-word {
    min-height: calc((var(--over, 0.2) + 0.12) * 100vh);
    min-height: calc((var(--over, 0.2) + 0.12) * 100svh);
  }

  .live .act[data-act="palette"] {
    margin-top: 0;
  }

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

  /* The captions ride under the picture, one at a time, and send their lines up into it. */
  .live #cue-lilac,
  .live #cue-gram,
  .live #cue-rose,
  .live #cue-orchid {
    left: var(--gutter);
    right: auto;
  }

  /* There a caption rides on the dark of the page, whatever its thing is like: pale ink, and its line too. */
  .live .cue-caption,
  .live .leader {
    --ui: #f6eefa;
    --ui-dim: rgb(246 238 250 / 0.84);
    --under: #151018;
    --plate: rgb(21 16 24 / 0.6);
  }

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

  .live .cue-ride {
    left: var(--gutter);
    font-size: 19vw;
  }

  /* The last lines come to stand in the dark under the picture, the button under them. */
  .live .cue-final {
    left: var(--gutter);
    right: var(--gutter);
    top: calc((var(--pin, 1) + 0.71) * 100vh);
    top: calc((var(--pin, 1) + 0.71) * 100svh);
  }

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

  .live .swatches {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 10px;
    padding: 0;
  }

  .live .swatches li {
    grid-template-columns: minmax(0, 1fr);
    --set: clamp(0, (var(--p, 1) - 0.14 - var(--k, 0) * 0.03) * 9, 1);
  }

  .live .swatches .name {
    font-size: clamp(14px, 4vw, 19px);
  }

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

  .pans button {
    min-width: 0;
  }

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

  .pans i {
    gap: 4px;
  }

  .pans b {
    width: 9px;
    height: 9px;
  }

  .live .hint span {
    display: none;
  }

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

  /* The palette alone, as tall as it lies, and the lines of the house under it. */
  .foot {
    padding-bottom: 92px;
  }

  .bench {
    background-color: #151018;
  }

  .tray::after {
    background-image: linear-gradient(to bottom, rgb(21 16 24 / 1), rgb(21 16 24 / 0) 7%, rgb(21 16 24 / 0) 92%, rgb(21 16 24 / 1));
  }

  .shades {
    left: 13.6%;
    top: 10.4%;
    width: 72.4%;
    height: 32%;
  }

  .shades li {
    gap: 4px;
  }

  .shades .no {
    font-size: 14px;
  }

  .shades .name {
    font-size: clamp(14px, 4.1vw, 22px);
  }

  .maker {
    position: static;
    padding: 18px var(--gutter) 8px;
    transform: none;
  }

  .maker-name {
    margin-bottom: 14px;
    font-size: clamp(52px, 16vw, 84px);
  }

  .maker-line {
    font-size: 19px;
  }

  .maker-fact {
    margin-top: 14px;
    font-size: 16px;
  }
}

/* ——— Checks ——— */

.hud {
  position: fixed;
  left: 8px;
  top: 76px;
  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;
}
