/*
 * Brothmere, «One bowl» — a page played from footage, and a page that travels
 * (tickets/SC-46.md; the footage, the words and the colours are those of ../prototype-film).
 *
 * 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 shop's line, the six things of the bowl.
 *
 * 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 acts 2 and 3 it is a window in the margins of the page (clip-path,
 *                 set by the script): it opens to the whole screen and closes again
 *     .leaders    the line from a name to its thing in the bowl
 *   .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
 *   .block      what lies between two acts and scrolls as any page does: a phrase on the
 *               red, a row that runs sideways on the gold, six stills on the night.
 *               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 and the steps of the bowl, fixed over all of it
 * After the film, in the flow of the page: .foot — the counter, kept for the next guest.
 *
 * The words take their ink from what lies under them (data-tone): the light of the lamp
 * on the dark kitchen, the night's ink on the red or on the gold.
 *
 * Brand colours (tickets/SC-26.md): night #14110f, light #f6c28b, lantern #e63946.
 */

: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: #14110f;
  --light: #f6c28b;
  --lantern: #e63946;
  /* The night's ink a shade deeper: small type holds 4.5:1 on the red of the lantern. */
  --ink: #0a0807;

  /* The light of the lamp: the ink of every word until something says otherwise. */
  --ui: var(--light);
  --ui-dim: rgb(246 194 139 / 0.88);
  --plate: rgb(20 17 15 / 0.62);

  /* The shop's own pair. Kaisei Decol — a Japanese serif with soft, brush-cut ends — for
     everything large. Outfit for everything small. The studio's faces (Unbounded, Onest)
     are in the studio's lime corner and nowhere else. */
  --face-display: "Kaisei Decol", "Hiragino Mincho ProN", Georgia, "Times New Roman", serif;
  --face-text: "Outfit", 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: var(--night);
  color: var(--light);
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  color: var(--light);
  font-family: var(--face-text);
  font-size: 16px;
  line-height: 1.4;
  -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: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--light);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  isolation: isolate;
  color: var(--ui);
  font-family: var(--face-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: color 300ms linear;
}

/* The name passes over a lit doorway and a dark kitchen alike: it carries its own soft plate. */
.brand::before {
  content: "";
  position: absolute;
  inset: -22px -34px;
  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;
}

/* The mark of the shop is its lantern: a paper drum, lit. */
.brand-lantern {
  flex: none;
  width: 13px;
  height: 18px;
  border-radius: 46% / 34%;
  background-color: var(--lantern);
  /* Paper over a lamp: lighter down the middle of the drum. */
  background-image: linear-gradient(to right, #e63946, #f46a5e 50%, #e63946);
  box-shadow: 0 0 0 1.5px var(--ui);
  transition: box-shadow 300ms linear;
}

/* 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: 14px;
  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 light reads on any of the seven. */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to top, rgb(20 17 15 / 0.86), rgb(20 17 15 / 0.5) 26%, rgb(20 17 15 / 0) 56%);
  pointer-events: none;
}

/* The first still also carries the name, at its head. */
.shot[data-shot="C1"]::after {
  background-image:
    linear-gradient(to top, rgb(20 17 15 / 0.86), rgb(20 17 15 / 0.5) 26%, rgb(20 17 15 / 0) 56%),
    linear-gradient(to bottom, rgb(20 17 15 / 0.55), rgb(20 17 15 / 0) 18%);
}

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

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

.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}

.line > span {
  display: block;
}

/* The line of the first screen. */
.title {
  font-family: var(--face-display);
  font-size: clamp(38px, 4.5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.06;
}

/* The two halves of the shop's line, and the name: the large words of the page. */
.cue-word,
.phrase,
.run {
  font-family: var(--face-display);
  font-size: clamp(54px, 7.6vw, 120px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 0.98;
}

/* The name stands on a flood of the film only: without the film the footer says it. */
.cue-name {
  display: none;
}

/* Without the film a large word is set in one line. */
.cue-word .line,
.phrase .line {
  display: inline-block;
  vertical-align: top;
}

/* The six things of the bowl. Without the film: one line of words, as the shop says it. */
.parts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px clamp(14px, 1.6vw, 26px);
  max-width: 780px;
}

.cue-part {
  font-family: var(--face-display);
  font-size: clamp(30px, 3.2vw, 50px);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.12;
  white-space: nowrap;
}

.final-title {
  font-family: var(--face-display);
  font-size: clamp(2.4rem, 4.3vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

/* The button: a capsule in the red of the lantern, its arrow in a round of the night. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  height: 64px;
  margin-top: clamp(20px, 3.4vh, 34px);
  padding: 6px 6px 6px 30px;
  border-radius: 999px;
  background-color: var(--lantern);
  color: #0f0c0b;
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms linear;
}

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

.pill:focus-visible {
  outline: 2px solid var(--light);
  outline-offset: 3px;
}

.pill-round {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--night);
  color: var(--light);
  transition: transform 180ms var(--ease-camera);
}

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

.pill:hover .pill-round,
.pill:focus-visible .pill-round {
  transform: scale(1.06);
}

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

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

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

.block[data-field="lantern"] {
  --field: var(--lantern);
}

.block[data-field="broth"] {
  --field: var(--light);
}

.block[data-field="night"] {
  --field: var(--night);
  color: var(--light);
}

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

.run {
  white-space: nowrap;
}

/* Without the film the row says its line once. */
.run span[aria-hidden] {
  display: none;
}

/* What goes into the bowl: six stills of the footage in a row, every second one a step lower. */
.block-parts {
  padding: clamp(40px, 8vh, 84px) var(--gutter) clamp(36px, 6.5vh, 68px);
}

.larder {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.3vw, 20px);
  align-items: start;
}

.larder li:nth-child(even) {
  margin-top: clamp(22px, 5.5vh, 52px);
}

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

.larder figcaption {
  margin-top: 12px;
  font-family: var(--face-display);
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.005em;
  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: var(--light);
  --ui-dim: rgb(246 194 139 / 0.88);
  --plate: rgb(20 17 15 / 0.62);
}

/* On the red or the gold: the night's ink, and nothing to lift it off. */
.live [data-tone="day"] {
  --ui: var(--ink);
  --ui-dim: var(--ink);
  --plate: rgb(246 194 139 / 0);
}

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

/* A window rides in under the foot of the block before it: the block ends on the window's own margin. */
.live .act[data-act="broth"],
.live .act[data-act="noodles"] {
  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: var(--night);
}

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

.live .stage[data-field="broth"] {
  background-color: var(--light);
}

.live .stage[data-field="night"] {
  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 .parts {
  display: contents;
}

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

/* A line is the light of the lamp with a thin shadow under it: it reads on broth and on wood. */
.leader {
  --ui: var(--light);
  filter: drop-shadow(0 0 2px rgb(20 17 15 / 0.75));
}

.leader path {
  fill: none;
  stroke: var(--ui);
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 160ms var(--ease-camera);
}

.leader .dot {
  fill: var(--lantern);
  stroke: var(--ui);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 140ms linear;
}

.leader .ring {
  fill: none;
  stroke: var(--ui);
  stroke-width: 1.25;
  opacity: 0;
  transition: opacity 140ms linear;
}

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

.leader.is-on .dot {
  opacity: 1;
  transition: opacity 180ms linear 220ms;
}

.leader.is-on .ring {
  opacity: 0.7;
  transition: opacity 180ms linear 280ms;
}

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

/* 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) + 4px);
  bottom: calc(var(--pin, 1) * 100svh + var(--gutter) + 4px);
}

/*
 * The name stands on the flood inside the last act: in the middle of the pinned scene
 * (the script moves it into the scene), drifting up as the flood turns from gold to red.
 */
.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;
}

.live .cue-word {
  font-size: clamp(76px, 15vw, 250px);
  line-height: 0.9;
}

.live .cue-word .line {
  display: block;
}

.live .cue-name {
  display: block;
  font-size: clamp(60px, 14.5vw, 240px);
}

/*
 * The six things of the bowl: a column of names down the left of the page, which the
 * scroll carries up past the pinned bowl. A name is dim until it crosses the line; then
 * it is lit and a line ties it to its thing; the next one takes over from it.
 */
.live .parts .cue-part {
  left: var(--gutter);
  top: calc(var(--at, 0.56) * 100vh);
  top: calc(var(--at, 0.56) * 100svh);
  visibility: visible;
  font-size: clamp(34px, 3.1vw, 46px);
  --lit: 0;
  opacity: calc(var(--lit) * var(--fade, 1));
  transform: translate3d(0, -50%, 0);
  transition: opacity 220ms linear;
}

.live .cue-part .line > span {
  transform: none;
}

/* The names stand on the shade of the scene, not each on a plate of its own. */
.live .parts .cue-part::before {
  content: none;
}

.live .parts.is-on .cue-part {
  --lit: 0.72;
}

.live .parts.is-on .cue-part.is-now {
  --lit: 1;
}

/* The shade: the left of the picture goes toward the night while the names ride there. */
.live .shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(to right, rgb(20 17 15 / 0.74), rgb(20 17 15 / 0.5) 13%, rgb(20 17 15 / 0) 30%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms linear;
}

.live .shade.is-on {
  opacity: 1;
}

/* The last line rides in from below once the counter is in sight, and is at the head of the screen when the film ends. */
.live .cue-final {
  left: var(--gutter);
  top: calc((var(--pin, 1) + 0.22) * 100vh);
  top: calc((var(--pin, 1) + 0.22) * 100svh);
}

.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 380ms,
    transform 640ms var(--ease-text) 380ms,
    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));
}

/* «Slow broth.»: two lines in the middle of the red, the second a step to the right. */
.live .block-phrase {
  padding: 2vh var(--gutter) 3vh;
  padding: 2svh var(--gutter) 3svh;
}

.live .phrase {
  width: -webkit-max-content;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(76px, 14vw, 236px);
  line-height: 0.9;
}

.live .phrase .line {
  display: block;
  /* Set by the script: a line fades just before it would ride up under the header. */
  opacity: var(--fade, 1);
  /* The two lines draw apart a little as the block rides through the screen. */
  transform: translate3d(calc((var(--p, 0.5) - 0.5) * var(--drift, 0vw)), 0, 0);
}

.live .phrase .line:first-child {
  --drift: -9vw;
}

.live .phrase .line + .line {
  --drift: 9vw;
  margin-left: 0.62em;
}

/* It takes its time: each line rises slowly, the second well after the first. */
.live .block.is-on .phrase .line > span {
  transform: none;
  transition: transform 1300ms cubic-bezier(0.22, 0.72, 0.2, 1) calc(var(--i, 0) * 320ms + 80ms);
}

/* «Fast noodles.»: one row, far wider than the screen, that runs to the left as the page goes down. */
.live .block-run {
  padding: 2.5vh 0 4vh;
  padding: 2.5svh 0 4svh;
}

.live .run {
  display: flex;
  gap: 0.42em;
  width: -webkit-max-content;
  width: max-content;
  font-size: clamp(72px, 13vw, 220px);
  line-height: 1.08;
  opacity: var(--fade, 1);
  transform: translate3d(calc(5vw - var(--p, 0.5) * 118vw), 0, 0);
  visibility: hidden;
}

.live .run span[aria-hidden] {
  display: block;
}

.live .block.is-on .run {
  visibility: visible;
}

/* The six stills ride through at two paces: every second one a little ahead of the page, the others a little behind. */
.live .block-parts {
  margin-top: -12vh;
  margin-top: -12svh;
  padding-top: 6vh;
  padding-top: 6svh;
}

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

.live .larder li:nth-child(even) {
  --lift: -46px;
}

/* The steps of the bowl: a name and a measure each; a measure fills as its 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;
}

.steps ol {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 26px);
}

.steps button {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--ui-dim);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  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: 600;
}

.steps i {
  position: relative;
  display: block;
  width: 34px;
  height: 2px;
  overflow: hidden;
  border-radius: 1px;
  background-color: color-mix(in srgb, currentColor 36%, 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) + 4px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--light);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  transition: opacity 360ms var(--ease-camera);
}

.hint i {
  display: block;
  width: 1px;
  height: 34px;
  background-color: currentColor;
}

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

/*
 * ——— The footer: the place kept for the next guest ———
 *
 * The counter of the shop from over it (textures/counter.webp, a photograph): worn wood
 * in the pool of the lamp, a pair of chopsticks on their rest, the pale ring of the bowl
 * that stood here last. The name and the lines are set straight on the wood, where the
 * light falls off into the dark. The studio's lime corner is the one thing that is the
 * same on every page.
 */

.foot {
  position: relative;
  z-index: 1;
  background-color: var(--night);
  color: var(--light);
}

.counter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  justify-items: start;
  min-height: clamp(560px, 94vh, 900px);
  padding: clamp(44px, 9vh, 96px) var(--gutter) clamp(84px, 12vh, 112px);
  overflow: hidden;
  isolation: isolate;
  background-color: #3a2413;
  background-image: url("textures/counter.webp");
  background-position: 50% 50%;
  background-size: cover;
}

/* The lamp hangs over the middle of the counter: toward the guest's left hand the wood goes dark, and the words stand there. */
.counter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgb(20 17 15 / 0.86), rgb(20 17 15 / 0.62) 24%, rgb(20 17 15 / 0.12) 52%, rgb(20 17 15 / 0) 70%),
    linear-gradient(to bottom, rgb(20 17 15 / 0.82), rgb(20 17 15 / 0) 22%);
  pointer-events: none;
}

.foot-name {
  font-family: var(--face-display);
  font-size: clamp(4rem, 10.4vw, 10.4rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 0.96;
}

.foot-line {
  margin-top: clamp(14px, 2.4vh, 26px);
  font-family: var(--face-display);
  font-size: clamp(24px, 2.5vw, 38px);
  font-weight: 500;
  line-height: 1.14;
}

.foot-parts {
  align-self: end;
  max-width: 21em;
  color: var(--light);
  font-size: clamp(17px, 1.35vw, 20px);
  font-weight: 400;
  line-height: 1.45;
}

.foot-hours {
  margin-top: 10px;
  color: var(--light);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

/* The studio signs in its own colours, not the brand'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 var(--light);
  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 at the foot ———
 * (The script switches to the tall series at the same ratio.)
 */

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

  .title {
    font-size: 40px;
  }

  .cue-part {
    font-size: 30px;
  }

  .final-title {
    font-size: clamp(2.3rem, 10.6vw, 3rem);
  }

  .pill {
    gap: 16px;
    height: 56px;
    margin-top: 18px;
    padding-left: 24px;
    font-size: 17px;
  }

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

  /* Three stills to a row, the middle one a step lower. */
  .larder {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 10px;
  }

  .larder li:nth-child(even) {
    margin-top: 0;
  }

  .larder li:nth-child(3n + 2) {
    margin-top: 22px;
  }

  .larder figcaption {
    margin-top: 8px;
    font-size: 21px;
  }

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

  .live .cue-word {
    font-size: clamp(56px, 18.6vw, 112px);
  }

  .live .cue-name {
    font-size: clamp(50px, 16vw, 84px);
  }

  .live .cue::before {
    inset: -46% -16% -34%;
  }

  .live .phrase {
    font-size: clamp(56px, 18.6vw, 112px);
  }

  .live .phrase .line + .line {
    margin-left: 0.2em;
  }

  .live .run {
    font-size: clamp(64px, 21vw, 120px);
    transform: translate3d(calc(5vw - var(--p, 0.5) * 190vw), 0, 0);
  }

  /* The names ride up the left of the bowl; on a phone the bowl fills the screen, so each stands on its own plate. */
  .live .cue-part {
    font-size: 30px;
  }

  .live .shade {
    background-image: linear-gradient(to right, rgb(20 17 15 / 0.78), rgb(20 17 15 / 0.55) 28%, rgb(20 17 15 / 0) 62%);
  }

  /* The last line comes to rest at the foot of the screen, over the counter. */
  .live .cue-final {
    left: var(--gutter);
    right: auto;
    top: auto;
    bottom: calc(var(--gutter) + 10px + env(safe-area-inset-bottom, 0px));
  }

  .live .larder li,
  .live .larder li:nth-child(even) {
    --lift: 28px;
  }

  .live .larder li:nth-child(3n + 2) {
    --lift: -28px;
  }

  /* Only the step on screen keeps its name; the others are their measures. */
  .steps ol {
    gap: 8px;
  }

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

  .steps i {
    width: 16px;
  }

  .live .hint span {
    display: none;
  }

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

  /* The counter stands on end: the words in the dark at its head, the chopsticks in the lamp's pool at its foot. */
  .counter {
    min-height: 700px;
    padding: 56px var(--gutter) 300px;
    grid-template-rows: auto auto auto auto;
    background-position: 100% 100%;
    background-size: auto 62%;
    background-repeat: no-repeat;
    background-color: var(--night);
  }

  .counter::before {
    background-image: linear-gradient(to bottom, var(--night) 38%, rgb(20 17 15 / 0.7) 52%, rgb(20 17 15 / 0) 74%);
  }

  .foot-name {
    font-size: clamp(3.4rem, 17.5vw, 5rem);
  }

  .foot-parts {
    align-self: start;
    margin-top: 26px;
  }
}

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