/*
 * Emberloch, «Twelve years in oak» — 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).
 *
 * 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 phrase of the brand on the embers, three things of the
 * whisky on the pale of the label.
 *
 * 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).
 *                 The iron is seen through a door ajar — a slit as tall as the screen that
 *                 opens to both sides; the pour through a band across the pale page that
 *                 opens upwards and downwards (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
 *   .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 and the steps of the story, fixed over all of it
 * After the film, in the flow of the page: .foot — the head of a cask, stencilled.
 *
 * The words take their ink from what lies under them (data-tone): the night's ink on the
 * pale sky of the loch and on the pale page, the cream of the label on the dark.
 *
 * Brand colours (tickets/SC-15.md): night #0e0a07, amber #c8792b, light #f6e7c8, copper #8a4b1c.
 */

:root {
  --el-night: #0e0a07;
  --el-amber: #c8792b;
  --el-light: #f6e7c8;
  --el-copper: #8a4b1c;

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

  /* The brand's own pair: the face of the label for every large word, a quiet grotesque
     for the small type. The studio's face stays in the studio's corner alone. */
  --face-display: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --face-text: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
  --face-studio: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  background: var(--el-night);
  scrollbar-color: var(--el-copper) var(--el-night);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--el-light);
  font-family: var(--face-text);
  font-size: 16px;
  line-height: 1.4;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

::selection {
  background-color: var(--el-amber);
  color: var(--el-night);
}


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

ol,
ul {
  list-style: none;
}

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

body {
  position: relative;

  /* The cream of the label: the ink of every word until something says otherwise. */
  --ui: #f6e7c8;
  --ui-dim: rgb(246 231 200 / 0.9);
  --plate: rgb(14 10 7 / 0.6);
}

.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(--el-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);
  transition: color 300ms linear;
}

/* The name passes over a pale sky, smoke and a dark wall 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;
  transition: opacity 200ms linear;
}

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

/* The name as on the label. */
.brand-name {
  font-family: var(--face-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  flex: none;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
}

.brand-ember {
  fill: var(--el-amber);
  stroke: 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: 12px;
  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 cream reads on any of the six. */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to top, rgb(14 10 7 / 0.84), rgb(14 10 7 / 0.5) 26%, rgb(14 10 7 / 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(14 10 7 / 0.84), rgb(14 10 7 / 0.5) 26%, rgb(14 10 7 / 0) 56%),
    linear-gradient(to bottom, rgb(14 10 7 / 0.56), rgb(14 10 7 / 0) 20%);
}

/* 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.14em;
  margin-bottom: -0.14em;
}

.line > span {
  display: block;
}

/* The line of the first screen. */
.title {
  font-family: var(--face-display);
  font-size: clamp(32px, 3.9vw, 62px);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.08;
}

.notes {
  margin-top: 14px;
  color: var(--ui-dim);
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 600;
  line-height: 1.36;
}


/* The line of the story, and the phrase of the brand. */
.cue-act,
.phrase {
  font-family: var(--face-display);
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
}

.cue-act {
  font-size: clamp(40px, 5vw, 84px);
  font-weight: 700;
}

.phrase {
  font-size: clamp(44px, 9vw, 96px);
  font-weight: 900;
}

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

/* A word tied to a thing of the picture. */
.caption-word {
  width: -webkit-fit-content;
  width: fit-content;
  font-family: var(--face-display);
  font-size: clamp(30px, 3.8vw, 60px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.08;
  white-space: nowrap;
}

/* The figure counts the years: its place keeps one width, so the words do not jump. */
.figure {
  display: inline-block;
  min-width: 1.16em;
  text-align: center;
  font-variant-numeric: lining-nums tabular-nums;
}

.is-one .plural {
  visibility: hidden;
}

.final-title {
  font-family: var(--face-display);
  font-size: clamp(2.3rem, 3.9vw, 3.75rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.06;
}

/* The button: a capsule with its arrow in a round — the light of the label, amber in the round. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  height: 56px;
  margin-top: clamp(22px, 3.6vh, 38px);
  padding: 6px 6px 6px 24px;
  border-radius: 999px;
  background-color: var(--el-light);
  color: var(--el-night);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms linear;
}

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

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

.pill-round {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--el-amber);
  color: var(--el-night);
  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 colours.
 */

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

.block[data-field="ember"] {
  --field: #2b1409;
  --ink: #f6e7c8;
}

.block[data-field="light"] {
  --field: #f6e7c8;
  --ink: #0e0a07;
}

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

.block-facts {
  padding: clamp(48px, 10vh, 100px) var(--gutter);
}

/* Three things of the whisky: a still of the footage and its word, side by side; every second row the other way round. */
.facts {
  display: grid;
  gap: clamp(28px, 6vh, 60px);
}

.facts figure {
  display: grid;
  grid-template-columns: minmax(0, 34vw) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 5vw, 80px);
}

.facts li:nth-child(even) figure {
  grid-template-columns: minmax(0, 1fr) minmax(0, 34vw);
}

.facts li:nth-child(even) img {
  order: 2;
}

.facts li:nth-child(even) figcaption {
  text-align: right;
}

.facts img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 2px;
  background-color: #2b1409;
}

.facts figcaption {
  font-family: var(--face-display);
  font-size: clamp(34px, 6.4vw, 104px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.04;
}

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

/* The ink of the words over the footage. */
.live [data-tone="night"] {
  --ui: #f6e7c8;
  --ui-dim: rgb(246 231 200 / 0.9);
  --plate: rgb(14 10 7 / 0.6);
}

.live [data-tone="day"] {
  --ui: #0e0a07;
  --ui-dim: rgb(14 10 7 / 0.9);
  --plate: rgb(246 231 200 / 0.66);
}

.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 word that rides up the right of the page carries a soft plate wider than itself: it must not widen the page. (Not `hidden`: the scene inside is sticky.) */
  overflow-x: clip;
}

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

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

.live .stage[data-field="ember"] {
  background-color: #2b1409;
}

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

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

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

.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(--ui);
  opacity: 0;
  transition: opacity 140ms linear;
}

.leader .ring {
  fill: none;
  stroke: var(--ui);
  stroke-width: 1.5;
  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 dark of the doorway is one page: the door ajar rides in over the flood while that still stands pinned (the hold of the first act). */
.live .act[data-act="iron"] {
  margin-top: -10vh;
  margin-top: -10svh;
}

/* The band rides in under the foot of the pale block: the block is its own margin. */
.live .act[data-act="glass"] {
  margin-top: -6vh;
  margin-top: -6svh;
}

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

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

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

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

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

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

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

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

/* A large word that rides up the page by itself. */
.live .cue-ride {
  opacity: var(--fade, 1);
}

/*
 * A word tied to a thing of the picture rides up past it (--at, set by the script: where
 * on the act it lies). It is a shade dim until it crosses the line of its legend; then
 * it is lit and a line ties it to its thing.
 */
.live .cue-note {
  top: calc(var(--at, 0.6) * 100vh);
  top: calc(var(--at, 0.6) * 100svh);
  --lit: 0.82;
  opacity: calc(var(--lit) * var(--fade, 1));
  transform: translate3d(0, -50%, 0);
  transition:
    opacity 220ms linear,
    color 300ms linear,
    visibility 0s linear 0s;
}

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

.live .cue-note.is-now {
  --lit: 1;
}

/* Words that stand on a flood inside an act: in the middle of the pinned scene (the script moves them into it), drifting up as the page goes. */
.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(-50% + var(--ty, 0px)), 0);
}

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

/* The first screen: the words stand on the heather, right of the warehouse the camera is coming to. */
.live .cue-opening,
.live #cue-story {
  right: var(--gutter);
  text-align: right;
}

.live .cue-opening {
  width: min(44vw, 600px);
}

/* The line of the story comes up after the name. */
.live #cue-story {
  top: 124vh;
  top: 124svh;
}

/* A word that rides past its thing is set a size under the words that stand: it must not cover the thing on its way. */
.live .cue-note .caption-word {
  font-size: clamp(28px, 3.3vw, 52px);
}

/* Each word rides where its frame is quiet, on the side its thing is not. */
.live #cue-years,
.live #cue-oak,
.live #cue-name,
.live #cue-size {
  left: var(--gutter);
}

.live #cue-malt {
  left: 36%;
}

.live #cue-kind {
  right: var(--gutter);
}

/* The last line rides in from below once the glass is in the hand: on the dark of the wall over the hearth, left of the bottle. */
.live .cue-final {
  left: var(--gutter);
  top: calc((var(--pin, 1) + 0.16) * 100vh);
  top: calc((var(--pin, 1) + 0.16) * 100svh);
}

.live .cue-final::before {
  inset: -30% -40% -24% -60%;
}

/* «Ember & oak.»: two lines in the middle of the embers, growing as the block rides up — as the brand does while it glows. */
.live .block-brand {
  padding: 4vh var(--gutter) 10vh;
  padding: 4svh var(--gutter) 10svh;
}

.live .phrase {
  width: -webkit-max-content;
  width: max-content;
  margin: 0 auto;
  font-size: clamp(60px, 15vw, 250px);
  line-height: 0.94;
  text-align: center;
  /* Set by the script: the phrase fades just before it would ride up under the header. */
  opacity: var(--fade, 1);
  transform: scale(calc(0.78 + var(--p, 0.5) * 0.36));
  transform-origin: 50% 60%;
}

.live .phrase .line {
  display: block;
}

.live .block.is-on .phrase .line > span {
  transform: none;
  transition: transform 1100ms cubic-bezier(0.22, 0.72, 0.2, 1) calc(var(--i, 0) * 220ms + 80ms);
}

/* The three rows draw past one another as the pale page rides through: a still one way, its word the other. */
.live .block-facts {
  padding: 5vh var(--gutter) 13vh;
  padding: 5svh var(--gutter) 13svh;
}

.live .facts li {
  --slide: 10vw;
}

.live .facts li:nth-child(even) {
  --slide: -10vw;
}

.live .facts img {
  transform: translate3d(calc((0.5 - var(--p, 0.5)) * var(--slide)), 0, 0);
}

.live .facts figcaption {
  transform: translate3d(calc((var(--p, 0.5) - 0.5) * var(--slide) * 1.5), 0, 0);
}

/* The steps of the story: 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;
}

/* Like the name: the steps pass over light and dark alike, and carry their own soft plate. */
.live .steps::before {
  content: "";
  position: absolute;
  inset: -28px -48px;
  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: center;
  gap: clamp(14px, 1.8vw, 28px);
  list-style: none;
}

.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: 600;
  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: 700;
}

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

.live .hint::before {
  content: "";
  position: absolute;
  inset: -22px -36px;
  z-index: -1;
  background-image: radial-gradient(closest-side, rgb(14 10 7 / 0.6), rgb(0 0 0 / 0));
}

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

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

/*
 * ——— The footer: the head of a cask ———
 *
 * No grid of a name on the left and a list on the right, as on the other pages of the set.
 * The warehouse goes on under the stage in the dark, and one cask lies with its head to
 * the reader, as tall as the footer: a photograph of a cask's head, in the light of the
 * lamp. The name is stencilled across it — the ties of the plate left in the letters —
 * and under it what a cask is marked with. The studio's lime corner is the only thing
 * here that is not the brand's. (Carried over from the page of SC-15.)
 */

.foot {
  z-index: 1;
  --head: min(82vh, 100vw - 2 * var(--gutter), 780px);
  position: relative;
  display: grid;
  place-items: center;
  height: calc(var(--head) + 2 * clamp(14px, 2.4vh, 24px));
  overflow: hidden;
  isolation: isolate;
  background-color: #080605;
  background-image: radial-gradient(70% 90% at 50% 8%, rgb(200 121 43 / 0.2) 0%, transparent 100%);
  color: var(--el-light);
}

.head {
  position: relative;
  width: var(--head);
  height: var(--head);
}

/* The oak in the light of one lamp: down from the photograph's even daylight. */
.head-oak {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  filter: brightness(0.5) saturate(0.9) contrast(1.06);
}

/* The lamp over it: its pool on the upper staves, the dark under the chime. */
.head::after {
  content: "";
  position: absolute;
  inset: 1%;
  border-radius: 50%;
  background-image:
    radial-gradient(62% 48% at 50% 22%, rgb(255 194 122 / 0.2) 0%, transparent 100%),
    radial-gradient(closest-side, transparent 70%, rgb(4 3 2 / 0.5) 100%);
  pointer-events: none;
}

.head-marks {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: calc(var(--head) * 0.026);
  padding: 0 calc(var(--head) * 0.13);
  text-align: center;
}

/* Sprayed through a plate: the ties that hold the plate together are left bare in the letters. */
.head-name {
  font-family: var(--face-display);
  font-size: calc(var(--head) * 0.098);
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0 calc(50% - 0.028em),
    transparent calc(50% - 0.028em) calc(50% + 0.028em),
    #000 calc(50% + 0.028em)
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0 calc(50% - 0.028em),
    transparent calc(50% - 0.028em) calc(50% + 0.028em),
    #000 calc(50% + 0.028em)
  );
}

.head-facts {
  max-width: 44ch;
  text-wrap: balance;
  font-size: clamp(15px, calc(var(--head) * 0.027), 20px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.head-facts span {
  white-space: nowrap;
}

.head-note {
  margin-top: calc(var(--head) * 0.03);
  color: rgb(246 231 200 / 0.92);
  font-size: 14px;
  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;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px var(--gutter) 18px 26px;
  border-top-left-radius: 28px;
  background-color: #d6fa50;
  color: #0a0a0a;
  font-family: var(--face-studio);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 180ms linear;
}

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

.studio:focus-visible {
  outline: 2px solid var(--el-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 script switches to the tall series at the same ratio.)
 */

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

  .title {
    font-size: 32px;
  }

  .notes {
    margin-top: 10px;
    font-size: 15px;
  }

  .cue-act {
    font-size: clamp(38px, 11.4vw, 56px);
  }

  .caption-word {
    font-size: clamp(30px, 9.2vw, 44px);
  }

  .final-title {
    font-size: clamp(2.1rem, 10.4vw, 2.9rem);
  }

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

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

  /* A still over its word, row after row. */
  .facts figure,
  .facts li:nth-child(even) figure {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .facts li:nth-child(even) img {
    order: 0;
  }

  .facts figcaption {
    font-size: clamp(34px, 11vw, 52px);
  }

  /* The words of the first screen stand at its foot, from the left. */
  .live .cue-opening,
  .live #cue-story {
    left: var(--gutter);
    right: auto;
    text-align: left;
  }

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

  /* Every word rides up the left of the screen. */
  .live #cue-years,
  .live #cue-oak,
  .live #cue-malt,
  .live #cue-name,
  .live #cue-size,
  .live #cue-kind,
  .live .cue-final {
    left: var(--gutter);
    right: auto;
  }

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

  .live .cue-final::before {
    inset: -24% -30% -20% -30%;
  }

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

  .live .facts li {
    --slide: 5vw;
  }

  .live .facts li:nth-child(even) {
    --slide: -5vw;
  }

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

  .live .hint span {
    display: none;
  }

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

  .foot {
    --head: min(100vw - 2 * var(--gutter), 70vh);
    height: calc(var(--head) + 96px);
    place-items: start center;
    padding-top: 20px;
  }

  .head-facts {
    max-width: 18ch;
    font-size: 15px;
  }
}

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