/*
 * Razorbill Barber Co., «The straight razor shave» — 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, tickets/SC-37.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 shop's words on its red and on its bone.
 *
 * 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 4 it is a window in the page (clip-path, set by the
 *                 script): a tall one at the right of the red page, a low wide one in the
 *                 bone page; each opens to the whole screen
 *     .leaders    the lines 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
 *               (.cue-card — a word on a flood inside an act — stands on the scene)
 *   .block      what lies between two acts and scrolls as any page does: a word as wide
 *               as the frame on the red, a row that runs sideways on the bone, a word on
 *               the bone. 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 shop and the acts of the story, fixed over all of it
 * After the film, in the flow of the page: .foot — the strop, laid out flat, the name
 * stamped into it.
 *
 * The words take their ink from what lies under them (data-tone): bone on the dark of
 * the shop and on black ("night", and "bare" without its plate), bone on the red ("red"),
 * black on the bone ("day").
 *
 * The shop's device, from its covers: a word or two in capitals as wide as the frame and
 * a red line under them, like the light in the shop (.rule).
 *
 * The colours of the shop (tickets/SC-37.md): red #d7261e, black #0b0b0b, bone #f1ece4.
 */

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

  --black: #0b0b0b;
  --red: #d7261e;
  --bone: #f1ece4;

  /* The shop's own pair. Sofia Sans Extra Condensed, black — the letters of its sign and
     of its covers — for every large word; Libre Franklin for everything small. The
     studio's faces (Unbounded, Onest) are in the studio's lime corner and nowhere else. */
  --face-display: "Sofia Sans Extra Condensed", "Arial Narrow", "Helvetica Neue Condensed", Arial, sans-serif;
  --face-text: "Libre Franklin", 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: #0b0b0b;
  color: #f1ece4;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: #f1ece4;
  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;
}
/*
 * ——— The page without the film: eight stills, their words, and the blocks between ———
 */

body {
  position: relative;

  /* Bone: the ink of every word until something says otherwise. */
  --ui: #f1ece4;
  --ui-dim: rgb(241 236 228 / 0.84);
  --under: #0b0b0b;
  --plate: rgb(11 11 11 / 0.66);
  --line: #d7261e;
  /* What lies round a picture smaller than the screen. */
  --ground: #0b0b0b;
}

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

/* The name as it stands over the door: narrow black capitals, the line of light under them. */
.brand {
  position: relative;
  isolation: isolate;
  padding-bottom: 7px;
  color: var(--ui);
  font-family: var(--face-display);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 0.9;
  text-transform: uppercase;
  transition: color 300ms linear;
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background-color: var(--line);
  transition: background-color 300ms linear;
}

/* It passes over the street, the lather and the black alike: it carries its own soft plate. */
.brand::before {
  content: "";
  position: absolute;
  inset: -24px -40px;
  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: 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 bone reads on any of the eight. */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to top, rgb(11 11 11 / 0.9), rgb(11 11 11 / 0.55) 30%, rgb(11 11 11 / 0) 62%);
  pointer-events: none;
}

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

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

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

/* The line of light under a word: as wide as the word. */
.rule {
  display: block;
  height: max(4px, 0.06em);
  margin-top: 0.1em;
  background-color: var(--line);
}

/* Every large word: the narrow black capitals of the sign. */
.title,
.cue-act,
.cue-caption,
.final-title {
  font-family: var(--face-display);
  font-weight: 900;
  text-transform: uppercase;
}

/* The line of the first screen. */
.cue-opening {
  width: -webkit-fit-content;
  width: fit-content;
  font-size: clamp(54px, 7.4vw, 124px);
}

.title {
  font-size: 1em;
  letter-spacing: 0.01em;
  line-height: 0.9;
  white-space: nowrap;
}

.title .line {
  display: inline-block;
  vertical-align: top;
}

.title .line + .line {
  margin-left: 0;
}

.cue-opening .rule {
  height: max(5px, 0.07em);
}

/* The word of an act. */
.cue-act {
  width: -webkit-fit-content;
  width: fit-content;
  font-size: clamp(72px, 13vw, 220px);
  letter-spacing: 0.005em;
  line-height: 0.84;
  white-space: nowrap;
}

.cue-act .line {
  display: inline-block;
  vertical-align: top;
}

.cue-act .line + .line {
  margin-left: 0;
}

/* A word tied to a thing of the picture. */
.cue-caption {
  font-size: clamp(46px, 6.2vw, 104px);
  letter-spacing: 0.015em;
  line-height: 0.92;
  white-space: nowrap;
}

.cue-final {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: -webkit-fit-content;
  width: fit-content;
  font-size: clamp(96px, 12vw, 208px);
}

.cue-final .rule {
  align-self: stretch;
}

.final-title {
  font-size: 1em;
  letter-spacing: 0.005em;
  line-height: 0.84;
  white-space: nowrap;
}

/* The button: a capsule of the shop's red, its arrow in a round of black. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  height: 60px;
  margin-top: clamp(18px, 3vh, 30px);
  padding: 6px 6px 6px 30px;
  border-radius: 999px;
  background-color: #d7261e;
  color: #ffffff;
  font-family: var(--face-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  transition: background-color 180ms linear;
}

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

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

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

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

/* 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 shop's colours.
 */

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

.block[data-field="red"] {
  --field: #d7261e;
  --ui: #f1ece4;
  --line: #0b0b0b;
}

.block[data-field="bone"] {
  --field: #f1ece4;
  --ui: #0b0b0b;
  --line: #d7261e;
}

.block-word {
  padding: clamp(40px, 9vh, 96px) var(--gutter);
}

/* A word of the shop, as on its covers: narrow black capitals, and the line of light under them. */
.word {
  width: -webkit-fit-content;
  width: fit-content;
  color: var(--ui);
  font-family: var(--face-display);
  font-size: clamp(72px, 13vw, 220px);
  font-weight: 900;
  letter-spacing: 0.005em;
  line-height: 0.84;
  text-transform: uppercase;
  white-space: nowrap;
}

.word .line {
  display: inline-block;
  vertical-align: top;
}

.block-run {
  padding: clamp(36px, 8vh, 84px) var(--gutter);
}

.run {
  color: var(--ui);
  font-family: var(--face-display);
  font-size: clamp(54px, 7.4vw, 124px);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 0.92;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.run-rule {
  display: block;
  width: min(100%, 9.2em);
  height: 5px;
  margin-top: 14px;
  background-color: var(--line);
  font-size: clamp(54px, 7.4vw, 124px);
}

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

/* The scene of an act: the page brings it in from below, holds it and carries it away upwards. */
.live .stage {
  position: sticky;
  top: 0;
  z-index: 0;
  display: block;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: var(--ground);
}

/* The picture. In a window act the script cuts it to the window (clip-path) and opens it. */
.live .frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: var(--ground);
}

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

/* The lines from a word to its thing are drawn on the pinned scene. */
.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. (A word the script has moved into the scene
 * stands on the picture instead.)
 */
.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;
}

/* Words on a flood inside an act stand in the middle of the pinned scene and drift up through the colour. */
.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.
 * 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 {
  z-index: 1;
}

.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: #f1ece4;
  --ui-dim: rgb(241 236 228 / 0.84);
  --under: #0b0b0b;
  --plate: rgb(11 11 11 / 0.66);
  --line: #d7261e;
}

/* On black: the bone without its plate. */
.live [data-tone="bare"] {
  --ui: #f1ece4;
  --ui-dim: rgb(241 236 228 / 0.84);
  --under: #0b0b0b;
  --plate: rgb(11 11 11 / 0);
  --line: #d7261e;
}

/* On the red: bone, and the line of light goes black. */
.live [data-tone="red"] {
  --ui: #f1ece4;
  --ui-dim: rgb(241 236 228 / 0.92);
  --under: #0b0b0b;
  --plate: rgb(11 11 11 / 0);
  --line: #0b0b0b;
}

.live [data-tone="day"] {
  --ui: #0b0b0b;
  --ui-dim: rgb(11 11 11 / 0.84);
  --under: #f1ece4;
  --plate: rgb(241 236 228 / 0);
  --line: #d7261e;
}

/* The names of the acts are small: on the red they go white, which reads better there than the bone. */
.live .acts[data-tone="red"] {
  --ui: #ffffff;
  --ui-dim: #ffffff;
}

/* While a flood grows over the picture the soft plates under the name and the acts are put away. */
.brand::before,
.live .acts::before {
  transition: opacity 200ms linear;
}

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

/* 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="chair"],
.live .act[data-act="towel"] {
  margin-top: -10vh;
  margin-top: -10svh;
}

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

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

/* The line of light is drawn from its left end once the word stands. */
.live .cue .rule {
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition:
    transform 240ms var(--ease-camera),
    background-color 300ms linear;
}

.live .cue.is-on .rule {
  transform: none;
  transition:
    transform 620ms var(--ease-text) 260ms,
    background-color 300ms linear;
}

/* 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: -46% -26%;
  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 word of an act stands alone in the middle of its flood, as wide as the frame: the script sets its size. */
.live .cue-card {
  text-align: left;
  max-width: none;
}

/*
 * A caption rides with the page. The script says where it lies on the page of its act
 * (--at, in screens from the top of the act): it comes on as its moment comes, is carried
 * up past the pinned picture, and fades just under the header. Each rides up the side its
 * thing is not on.
 */
.live .cue-caption {
  top: calc(var(--at, 0.5) * 100vh);
  top: calc(var(--at, 0.5) * 100svh);
  opacity: calc(var(--lit, 1) * var(--fade, 1));
  transition:
    color 300ms linear,
    opacity 260ms linear,
    visibility 0s linear 0s;
}

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

/* Before its moment and after it a caption rides dimmer. */
.live .cue-caption.is-on:not(.is-now) {
  --lit: 0.6;
}

/* «ONE CHAIR» stands beside the window, in the margin of the red page. */
.live .cue-side {
  left: var(--gutter);
  font-size: clamp(84px, 15vw, 240px);
  line-height: 0.86;
}

.live #cue-razor {
  left: 6%;
}

.live #cue-soap {
  left: 21%;
}

.live #cue-strop {
  left: 60%;
}

.live #cue-line {
  left: 5%;
}

/*
 * The last word rides in from below as the counter comes into sight, and is over the dark
 * of the wall, above the towel the razor has come back to, when the scene is let go.
 */
.live .cue-final {
  left: calc(var(--gutter) + 1.5vw);
  top: calc((var(--pin, 1) + 0.11) * 100vh);
  top: calc((var(--pin, 1) + 0.11) * 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 460ms,
    transform 640ms var(--ease-text) 460ms,
    background-color 180ms linear;
}

/*
 * The blocks between the acts.
 */

/* A word of the shop on its colour: as wide as the frame (the script sets its size), the line of light drawn under it as the block rides up. */
.live .block-word {
  padding: 3vh var(--gutter) 13vh;
  padding: 3svh var(--gutter) 13svh;
}

.live .word {
  width: -webkit-max-content;
  width: max-content;
  /* Set by the script: the word fades just before it would ride up under the header. */
  opacity: var(--fade, 1);
}

.live .block .rule {
  transform: scaleX(clamp(0, (var(--p, 0.5) - 0.16) * 2.6, 1));
  transform-origin: 0 50%;
}

/* «Cuts, fades and beards.»: one row, far wider than the screen, that runs to the left as the page goes down; the line of light under it runs the other way. */
.live .block-run {
  padding: 6vh 0 13vh;
  padding: 6svh 0 13svh;
}

.live .run {
  display: flex;
  gap: 0.5em;
  width: -webkit-max-content;
  width: max-content;
  font-size: clamp(72px, 12.4vw, 204px);
  opacity: var(--fade, 1);
  transform: translate3d(calc(6vw - var(--p, 0.5) * 124vw), 0, 0);
  visibility: hidden;
}

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

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

.live .run-rule {
  width: 62vw;
  height: max(5px, 0.6vw);
  margin-top: 1.2vw;
  transform: translate3d(calc(var(--p, 0.5) * 118vw - 60vw), 0, 0);
  visibility: hidden;
}

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

/* A line: the red of the shop's light over a wider dark one, a ring where it lands; bone
   while its word still stands on the red flood.
   (No round ends: the engine of Safari leaves a dot of a hidden line with them.) */
.leader {
  --lead: #d7261e;
}

.leader[data-tone="red"] {
  --lead: #f1ece4;
}

.leader path {
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: butt;
  stroke-linejoin: round;
  opacity: 0;
  transition:
    stroke-dashoffset 240ms var(--ease-camera),
    opacity 0s linear 240ms;
}

.leader path.casing {
  stroke: #0b0b0b;
  stroke-width: 7;
}

.leader path.stroke {
  stroke: var(--lead);
  stroke-width: 3;
  transition:
    stroke-dashoffset 240ms var(--ease-camera),
    opacity 0s linear 240ms,
    stroke 300ms linear;
}

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

.leader circle.casing {
  fill: #0b0b0b;
}

.leader .dot {
  fill: #f1ece4;
}

.leader .ring {
  fill: none;
  stroke: var(--lead);
  stroke-width: 3;
}

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

.leader.is-on path.casing {
  opacity: 0.5;
}

.leader.is-on path.stroke {
  opacity: 1;
}

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

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

.leader.is-on .ring {
  opacity: 1;
  transition: opacity 220ms linear 460ms;
}
/* 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 .acts {
  position: relative;
  display: block;
  isolation: isolate;
  color: var(--ui);
  transition: color 300ms linear;
}

.live .acts::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;
}

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

.acts 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: 600;
  line-height: 1;
  text-align: left;
  cursor: pointer;
  transition: color 200ms linear;
}

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

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

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

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

.acts 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: #f1ece4;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: opacity 360ms var(--ease-camera);
}

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

.hint.is-off {
  opacity: 0;
}
/*
 * ——— The footer: the name, made of the strop ———
 *
 * The shop writes its name as a word, a line of light under it and «Barber Co.» under
 * the line. Here the word is the leather strop itself, laid out flat with the name
 * stamped into it (textures/strop.webp, photographed); the line of light and the words
 * under it are set in type. The studio's lime corner is the one thing that is the same
 * on every page.
 */

.foot {
  position: relative;
  padding: clamp(40px, 9vh, 96px) 0 clamp(96px, 14vh, 132px);
  background-color: #0b0b0b;
  color: #f1ece4;
}

.sign {
  position: relative;
  width: min(100%, 1680px);
  margin: 0 auto;
}

.strop {
  position: relative;
  display: block;
}

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

/* The black the strop lies on goes out into the black of the page. */
.strop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom, rgb(11 11 11 / 1), rgb(11 11 11 / 0) 22%, rgb(11 11 11 / 0) 74%, rgb(11 11 11 / 1)),
    linear-gradient(to right, rgb(11 11 11 / 1), rgb(11 11 11 / 0) 4%, rgb(11 11 11 / 0) 96%, rgb(11 11 11 / 1));
  pointer-events: none;
}

/* The line of light: from the first letter of the stamp to the last. */
.sign-light {
  position: relative;
  display: block;
  width: 26.1%;
  height: 4px;
  margin: clamp(-22px, -1.3vw, -8px) 0 0 36.6%;
  background-color: #d7261e;
}

.sign-under {
  margin: clamp(14px, 1.6vw, 26px) var(--gutter) 0 36.6%;
}

.sign-co {
  font-family: var(--face-display);
  font-size: clamp(44px, 5vw, 84px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: uppercase;
}

.sign-does {
  margin-top: 18px;
  font-size: clamp(17px, 1.35vw, 21px);
  font-weight: 600;
  line-height: 1.4;
}

.sign-day {
  margin-top: 4px;
  color: rgb(241 236 228 / 0.86);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.4;
}

/* The studio signs in its own colours, not the shop'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 #f1ece4;
  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 from the black
 * below the picture.)
 */

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

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

  /* The towel with the razor is out of a phone's cut of this shot: its word waits for the razor's own shots. */
  #cue-razor {
    display: none;
  }

  /* Two words of a line stand one under the other. */
  .title .line,
  .cue-act .line,
  .word .line {
    display: block;
  }

  .cue-opening {
    font-size: clamp(60px, 19vw, 84px);
  }

  .cue-act,
  .word {
    font-size: clamp(84px, 27vw, 132px);
  }

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

  .cue-final {
    font-size: clamp(110px, 34vw, 150px);
  }

  .run {
    font-size: 60px;
    white-space: normal;
  }

  .run-rule {
    font-size: 60px;
  }

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

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

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

  .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 captions come up out of the black under the picture, one at a time, and send their lines up into it. */
  .live #cue-chair,
  .live #cue-razor,
  .live #cue-soap,
  .live #cue-strop,
  .live #cue-line {
    left: var(--gutter);
    right: auto;
  }

  /* «ONE CHAIR» is one line under the window. */
  .live .cue-side {
    font-size: 60px;
    line-height: 0.92;
  }

  .live .cue-side .line {
    display: inline-block;
    vertical-align: top;
  }

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

  /* The last word rides up into the black under the picture, the button under it. */
  .live .cue-final {
    left: var(--gutter);
    right: var(--gutter);
    top: auto;
    bottom: calc(var(--gutter) + 12px + env(safe-area-inset-bottom, 0px));
  }

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

  .live .block-word {
    padding: 3vh var(--gutter) 16vh;
    padding: 3svh var(--gutter) 16svh;
  }

  .live .block-run {
    padding: 6vh 0 16vh;
    padding: 6svh 0 16svh;
  }

  .live .run {
    font-size: clamp(72px, 24vw, 132px);
    white-space: nowrap;
    transform: translate3d(calc(6vw - var(--p, 0.5) * 300vw), 0, 0);
  }

  .live .run-rule {
    height: 5px;
    margin-top: 12px;
  }

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

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

  .acts 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 stamp alone, close; the line of light and the words under it from the left edge. */
  .foot {
    padding: 28px 0 104px;
  }

  .strop::after {
    background-image: linear-gradient(to bottom, rgb(11 11 11 / 1), rgb(11 11 11 / 0) 20%, rgb(11 11 11 / 0) 78%, rgb(11 11 11 / 1));
  }

  .sign-light {
    width: 65.3%;
    margin: -10px 0 0 16.5%;
  }

  .sign-under {
    margin: 16px var(--gutter) 0 16.5%;
  }

  .sign-co {
    font-size: 56px;
  }

  .sign-does {
    margin-top: 14px;
    font-size: 17px;
  }

  .sign-day {
    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;
}
