/*
 * Stillmoss, «An hour of quiet» — 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, SC-39).
 *
 * 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 second word, the four things of the hour.
 *
 * 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 2 it is a tall window at the right of the linen page, which
 *                 opens to the whole screen; in act 4 it closes to such a window
 *                 (clip-path, set by the script)
 *     .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
 *               (--at, set by the script: how far down the act they lie, in screens)
 *   .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 acts of the story, fixed over all of it
 * After the film, in the flow of the page: .foot — a stone of the spring on its moss,
 * the name carved into it.
 *
 * The words take their ink from what lies under them (data-tone): linen on the forest and
 * on the green-black room ("night", on a soft dark plate), linen with nothing under it on
 * the green-black and the moss of the page ("bare"), green-black on the linen and on the
 * mist in the window ("day").
 *
 * The colours of the house (tickets/SC-39.md): linen #e9e4da, moss #6b7f6a, green-black #1d2a22.
 */

: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);

  --linen: #e9e4da;
  --moss: #6b7f6a;
  --deep: #1d2a22;

  /* Linen: the ink of every word until something says otherwise. */
  --ui: #e9e4da;
  --ui-dim: rgb(233 228 218 / 0.84);
  --under: #1d2a22;
  --plate: rgb(29 42 34 / 0.58);

  /* The house's own pair. Tenor Sans — the letters carved into its stone — for every
     large word; Nunito Sans for everything small. The studio's faces (Unbounded, Onest)
     are in the studio's lime corner and nowhere else. */
  --face-display: "Tenor Sans", "Optima", "Gill Sans", "Trebuchet MS", sans-serif;
  --face-text: "Nunito Sans", 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: #1d2a22;
  color: #e9e4da;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  color: #e9e4da;
  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,
figure {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

/* The display face has one weight: nothing is made bold by the browser. */
h1,
h2 {
  font-weight: 400;
}

/*
 * ——— The page without the film: six 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: #e9e4da;
  line-height: 1;
}

/* The name as it is carved into the stone: wide, light capitals. */
.brand {
  position: relative;
  isolation: isolate;
  padding-top: 7px;
  color: var(--ui);
  font-family: var(--face-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: color 300ms linear;
}

/* It passes over forest, mist and candlelight 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;
  transition: opacity 200ms linear;
}

.bar.is-bare .brand::before,
.bar.is-bare .steps::before {
  opacity: 0;
}

/* 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 linen reads on any of the six. */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to top, rgb(20 30 24 / 0.9), rgb(20 30 24 / 0.52) 28%, rgb(20 30 24 / 0) 58%);
  pointer-events: none;
}

.cue {
  position: relative;
  color: #e9e4da;
}

.line {
  display: block;
  overflow: hidden;
  padding: 0.08em 0.08em 0.22em 0;
  margin: -0.08em 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.4vw, 90px);
  letter-spacing: -0.01em;
  line-height: 1.02;
  white-space: nowrap;
}

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

/* A word tied to a thing of the picture. */
.cue-caption {
  font-family: var(--face-display);
  font-size: clamp(30px, 3.5vw, 56px);
  line-height: 1.06;
  white-space: nowrap;
}

.final-title {
  font-family: var(--face-display);
  font-size: clamp(38px, 4.8vw, 80px);
  letter-spacing: -0.01em;
  line-height: 1.04;
  white-space: nowrap;
}

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

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

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

.pill-round {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #1d2a22;
  color: #e9e4da;
  transition:
    background-color 180ms linear,
    color 180ms linear;
}

.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: #e9e4da;
}

.block[data-field="deep"] {
  --field: #1d2a22;
}

.block[data-field="moss"] {
  --field: #6b7f6a;
}

.block[data-field="linen"] {
  --field: #e9e4da;
  color: #1d2a22;
}

.block-word {
  padding: clamp(48px, 11vh, 110px) var(--gutter);
}

/* The four things of the hour so far: a still of the footage each, its words under it; every second one a step lower. */
.block-hour {
  padding: clamp(40px, 8vh, 84px) var(--gutter) clamp(40px, 8vh, 84px);
}

.hour {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2.2vw, 36px);
  align-items: start;
  width: min(100%, 1240px);
  margin: 0 auto;
}

.hour li:nth-child(even) {
  margin-top: clamp(24px, 8vh, 76px);
}

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

.hour figcaption {
  margin-top: 14px;
  font-family: var(--face-display);
  font-size: clamp(24px, 2.05vw, 32px);
  line-height: 1.12;
}

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

/* The ink of the words over the footage. */
.live [data-tone="night"] {
  --ui: #e9e4da;
  --ui-dim: rgb(233 228 218 / 0.84);
  --under: #1d2a22;
  --plate: rgb(29 42 34 / 0.58);
}

/* On the green-black and the moss of the page: the linen without its plate. */
.live [data-tone="bare"] {
  --ui: #e9e4da;
  --ui-dim: rgb(233 228 218 / 0.84);
  --under: #1d2a22;
  --plate: rgb(29 42 34 / 0);
}

/* On the linen, and on the mist in the window: the green-black, lifted on a breath of linen. */
.live [data-tone="day"] {
  --ui: #1d2a22;
  --ui-dim: rgb(29 42 34 / 0.86);
  --under: #e9e4da;
  --plate: rgb(233 228 218 / 0.62);
}

.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 soft plate under a line of words may reach past the edge of a phone: it is cut there, and the page gets no sideways scroll. */
  overflow-x: clip;
}

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

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

.live .stage[data-field="moss"] {
  background-color: #6b7f6a;
}

.live .stage[data-field="deep"] {
  background-color: #1d2a22;
}

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

.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 {
  --ui: #e9e4da;
  --under: #1d2a22;
  visibility: hidden;
  transition: visibility 0s linear 280ms;
}

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

/* A line: a hair of linen over a wider one of the green-black, 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 420ms var(--ease-text) 60ms;
}

.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. --at (the script): how far down the act they
 * lie, in screens; --fade (the script): they fade just before they would ride up under
 * the header.
 */
.live .cue {
  position: absolute;
  top: calc(var(--at, 0.5) * 100vh);
  top: calc(var(--at, 0.5) * 100svh);
  z-index: 3;
  isolation: isolate;
  color: var(--ui);
  opacity: var(--fade, 1);
  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, 128%, 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;
}

/* The line of the first screen stands in its corner and rides up through the whole screen. */
.live .cue-opening {
  left: var(--gutter);
}

/* The word of an act rides up the left of the page, large: beside the window, or over the quiet of its picture. */
.live .cue-act {
  left: calc(var(--gutter) + 1vw);
  font-size: clamp(88px, 13vw, 230px);
}

.live .cue-act::before {
  inset: -34% -14%;
}

/*
 * «Quiet.» stands on the moss inside the third act: in the middle of the pinned scene (the
 * script moves it there), drifting up while the moss holds.
 */
.live .cue-card {
  left: 50%;
  top: 50%;
  width: -webkit-max-content;
  width: max-content;
  max-width: calc(100vw - 2 * var(--gutter));
  font-size: clamp(110px, 23vw, 400px);
  text-align: center;
  opacity: 1;
  transform: translate3d(-50%, calc(-52% + var(--ty, 0px)), 0);
}

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

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

.live #cue-bowl {
  left: 7%;
}

.live #cue-candle,
.live #cue-oil {
  left: 9%;
}

/* The last line rides in over the mist in the window, left of the cup. */
.live .cue-final {
  left: calc(var(--gutter) + 1.5vw);
}

/* Over the picture the button is the green-black of the house, its round linen; beside the tall window, on the green-black of the page, it is linen. */
.live .pill {
  background-color: #1d2a22;
  color: #e9e4da;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 220ms linear,
    transform 300ms var(--ease-camera),
    color 180ms linear,
    background-color 180ms linear;
}

.live .pill:hover {
  background-color: #2b3d32;
}

.live .pill:focus-visible {
  outline-color: #1d2a22;
}

.live .pill-round {
  background-color: #e9e4da;
  color: #1d2a22;
}

.live .cue-final[data-tone="bare"] .pill,
.live .cue-final[data-tone="night"] .pill {
  background-color: #e9e4da;
  color: #1d2a22;
}

.live .cue-final[data-tone="bare"] .pill:hover,
.live .cue-final[data-tone="night"] .pill:hover {
  background-color: #f6f3ec;
}

.live .cue-final[data-tone="bare"] .pill:focus-visible,
.live .cue-final[data-tone="night"] .pill:focus-visible {
  outline-color: #e9e4da;
}

.live .cue-final[data-tone="bare"] .pill-round,
.live .cue-final[data-tone="night"] .pill-round {
  background-color: #1d2a22;
  color: #e9e4da;
}

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

/* «Water.»: one word on the green-black, wide-set, its letters drawing apart as the block rides through — rings on still water. */
.live .block-word {
  padding: 4vh var(--gutter) 9vh;
  padding: 4svh var(--gutter) 9svh;
}

.live .word {
  width: -webkit-max-content;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(96px, 19vw, 330px);
  letter-spacing: calc(-0.02em + var(--p, 0.5) * 0.09em);
  line-height: 0.96;
  opacity: var(--fade, 1);
}

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

/* The four stills ride through at two paces: every second one a little ahead of the page, the others a little behind. */
.live .block-hour {
  padding: 3vh var(--gutter) 10vh;
  padding: 3svh var(--gutter) 10svh;
}

.live .hour li {
  --lift: 64px;
  transform: translate3d(0, calc((0.5 - var(--p, 0.5)) * var(--lift)), 0);
}

.live .hour li:nth-child(even) {
  --lift: -72px;
}

/* A still and its words come up as the moss shuts under them, one after another. */
.live .hour figure {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition:
    opacity 300ms linear,
    transform 300ms var(--ease-camera);
}

.live .block.is-on .hour figure {
  opacity: 1;
  transform: none;
  transition:
    opacity 640ms linear calc(var(--k, 0) * 130ms),
    transform 1100ms var(--ease-text) calc(var(--k, 0) * 130ms);
}

/* The acts of the story: a name and, under it, a hairline that fills as the act 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 200ms linear;
}

.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: 60px;
  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;
}

.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;
  color: #e9e4da;
  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: #e9e4da;
}

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

/*
 * ——— The footer: a stone of the spring ———
 *
 * Seen from over it: smooth dark basalt on a bed of moss, three lines of water and the
 * name of the house carved into it (textures/stone.webp, photographed). The lines of the
 * house lie on the moss beside it. 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: #1d2a22;
  color: #e9e4da;
}

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

.stone {
  display: block;
}

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

/* The moss goes out into the green of the page above and below, and is deeper where the lines lie. */
.bed::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom, rgb(29 42 34 / 1), rgb(29 42 34 / 0) 16%, rgb(29 42 34 / 0) 82%, rgb(29 42 34 / 1)),
    linear-gradient(to right, rgb(16 26 20 / 0) 54%, rgb(16 26 20 / 0.62) 70%, rgb(16 26 20 / 0.74));
  pointer-events: none;
}

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

.house-motto {
  font-family: var(--face-display);
  font-size: clamp(28px, 3vw, 50px);
  font-weight: 400;
  line-height: 1.1;
}

.house-hour {
  margin-top: 22px;
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 600;
  line-height: 1.4;
}

.house-days {
  margin-top: 6px;
  color: rgb(233 228 218 / 0.88);
  font-size: clamp(15px, 1.15vw, 17px);
  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 #e9e4da;
  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 up over the green
 * below the picture and over the picture itself.)
 */

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

  /* 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, 10vw, 44px);
  }

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

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

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

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

  /* Two stills to a row. */
  .hour {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 14px;
  }

  .hour li:nth-child(even) {
    margin-top: 28px;
  }

  .hour figcaption {
    margin-top: 10px;
    font-size: 24px;
  }

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

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

  .live .cue-card {
    left: 50%;
    font-size: 26vw;
  }

  /* The captions come up from under the picture and send their lines up into it. */
  .live #cue-stones,
  .live #cue-bowl,
  .live #cue-candle,
  .live #cue-oil {
    left: var(--gutter);
  }

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

  .live .cue-final {
    left: var(--gutter);
  }

  .live .word {
    font-size: 25vw;
  }

  .live .hour li {
    --lift: 34px;
  }

  .live .hour li:nth-child(even) {
    --lift: -40px;
  }

  /* Only the act 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 stone alone, and the lines of the house under it. */
  .foot {
    padding-bottom: 92px;
  }

  .bed {
    background-color: #1d2a22;
  }

  .bed::after {
    bottom: auto;
    aspect-ratio: 6 / 5;
    background-image: linear-gradient(to bottom, rgb(29 42 34 / 1), rgb(29 42 34 / 0) 14%, rgb(29 42 34 / 0) 84%, rgb(29 42 34 / 1));
  }

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

  .house-motto {
    font-size: 32px;
  }

  .house-hour {
    margin-top: 16px;
    font-size: 17px;
  }

  .house-days {
    font-size: 16px;
  }
}

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