/*
 * Loafing Otter, «Fresh bread, every morning» — 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-27).
 *
 * 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: what is in the oven today, the five steps, the phrase.
 *
 * 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
 *                 round windows between two shots and the floods are drawn on it). In
 *                 act 2 it is a band across the butter page, which opens to the whole
 *                 screen and closes again (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 bakery and the row of five steps, on two paper tags, fixed
 *               over all of it
 * After the film, in the flow of the page: .foot — a kraft bag on the bench, stamped.
 *
 * The footage is a bakery before dawn: the words over it are in the cream of its paper,
 * each block on one soft patch of the dark ("night"). On the butter of the page they take
 * the dark ink ("day"); on the red of the stamp the cream again.
 *
 * Brand colours (the site's brand book and tickets/SC-27.md): cream #f5e6cc, stamp red
 * #b23a2b, ink #2b1d12. Its kraft (#8a5a33) is not a paint of this sheet: it is the paper of
 * the bag in the footer's photograph.
 */

:root {
  --lo-cream: #f5e6cc;
  --lo-red: #b23a2b;
  --lo-ink: #2b1d12;
  /* The dark of the street before dawn: what lies under a frame that has not come yet. */
  --lo-night: #17110c;
  /* The colour the light of the shop window turns to: butter. */
  --lo-butter: #f2d98e;
  /* The brown ink of the second stamp pad, as it prints on kraft. */
  --lo-brown: #3d2714;

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

  --ui: var(--lo-cream);
  --ui-dim: rgb(245 230 204 / 0.92);
  --plate: rgb(23 17 12 / 0.62);

  /* The bakery's pair: the old-style serif of its stamps for everything large, a plain humanist sans for what is small. */
  --face-display: "Vollkorn", "Iowan Old Style", Georgia, serif;
  --face-text: "Cabin", "Helvetica Neue", Arial, sans-serif;
  /* The studio's own face, for its corner only. */
  --face-studio: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  background: var(--lo-night);
  -webkit-text-size-adjust: 100%;
}

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

::selection {
  background-color: var(--lo-red);
  color: var(--lo-cream);
}

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

ol,
ul {
  list-style: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/*
 * ——— 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: 12px;
  line-height: 1;
}

/* The name of the bakery, on a tag of its cream paper: it reads the same on the night, on the oven and on a colour of the page. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 18px 11px 13px;
  border-radius: 999px;
  background-color: var(--lo-cream);
  box-shadow: 0 6px 16px rgb(23 17 12 / 0.28);
  color: var(--lo-ink);
  font-family: var(--face-display);
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.brand > span {
  /* The serif sits low in its line: lifted to the middle of the tag. */
  padding-bottom: 2px;
}

.brand-mark {
  flex: none;
  width: 60px;
  height: 26px;
  overflow: visible;
}

/* A shot: its still fills a screen, its words stand at the foot of it. */
.shot {
  position: relative;
  display: flex;
  flex-flow: row wrap;
  align-content: flex-end;
  align-items: flex-end;
  gap: 8px clamp(24px, 4vw, 64px);
  min-height: 100vh;
  min-height: 100svh;
  padding: 96px var(--gutter) clamp(28px, 6vh, 60px);
  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 shaded with the dark of the street, so the cream reads on any of the seven. */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to top, rgb(23 17 12 / 0.9), rgb(23 17 12 / 0.62) 18%, rgb(23 17 12 / 0) 42%);
  pointer-events: none;
}

.cue {
  position: relative;
  display: block;
  color: var(--lo-cream);
}

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

.line > span {
  display: block;
}

/* The line of the bakery. */
.voice {
  font-family: var(--face-display);
  font-size: clamp(40px, 6.2vw, 100px);
  font-weight: 800;
  line-height: 0.98;
}

.notes {
  margin-top: 12px;
  color: var(--ui-dim);
  font-size: clamp(18px, 1.5vw, 23px);
  font-weight: 600;
  line-height: 1.28;
}

.stack {
  flex-basis: 100%;
}

/* The word of a step: tied by a line to where the hands are. */
.verb {
  flex-basis: 100%;
}

.verb-word {
  display: block;
  width: -webkit-fit-content;
  width: fit-content;
  font-family: var(--face-display);
  font-size: clamp(64px, 11.5vw, 184px);
  font-weight: 800;
  line-height: 0.9;
}

/* The hour the first tray is out. */
.hour {
  flex-basis: 100%;
}

.hour-figure {
  font-family: var(--face-display);
  font-size: clamp(64px, 11.5vw, 184px);
  font-weight: 800;
  line-height: 0.9;
}

.hour-note {
  margin-top: 6px;
  color: var(--ui-dim);
  font-size: clamp(19px, 1.7vw, 26px);
  font-weight: 700;
  line-height: 1.25;
}

.final {
  flex-basis: 100%;
}

.final-title {
  font-family: var(--face-display);
  font-size: clamp(2.6rem, 5.6vw, 5.75rem);
  font-weight: 800;
  line-height: 0.98;
}

/* The button: a tag of the cream paper with its arrow in a round of the stamp's red. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  height: 58px;
  margin-top: clamp(18px, 3vh, 30px);
  padding: 6px 6px 6px 26px;
  border-radius: 999px;
  background-color: var(--lo-cream);
  color: var(--lo-ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms linear;
}

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

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

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

.pill-round svg,
.studio svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  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: translate3d(0, 2px, 0);
}

/*
 * The blocks of the page, between the acts. Each lies on one of the page's three colours:
 * the butter the window's light turns to, the dark of the street, the red of the stamp.
 */

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

.block[data-field="butter"] {
  --field: #f2d98e;
  color: var(--lo-ink);
}

.block[data-field="night"] {
  --field: #17110c;
}

.block[data-field="red"] {
  --field: #b23a2b;
}

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

/* What is in the oven today: its name and what it is made with. */
.card-name {
  font-family: var(--face-display);
  font-size: clamp(56px, 9vw, 150px);
  font-weight: 800;
  line-height: 0.96;
}

.card-notes {
  margin-top: 6px;
  font-size: clamp(20px, 1.9vw, 30px);
  font-weight: 700;
  line-height: 1.3;
}

/* The five steps, one after another. Without the film the row says them once. */
.run {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1em 0.34em;
  font-family: var(--face-display);
  font-size: clamp(44px, 7vw, 112px);
  font-weight: 800;
  line-height: 1;
}

/* Between two steps: the round of the header's row, full. */
.run i {
  flex: none;
  display: block;
  width: 0.2em;
  height: 0.2em;
  border-radius: 50%;
  background-color: var(--lo-red);
}

.run [aria-hidden="true"]:is(span),
.run span[aria-hidden="true"] + i,
.run i:has(+ span[aria-hidden="true"]) {
  display: none;
}

/* The phrase of the page, on the stamp's red. */
.phrase {
  color: var(--lo-cream);
  font-family: var(--face-display);
  font-size: clamp(56px, 12vw, 190px);
  font-weight: 800;
  line-height: 0.92;
}

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

/* The ink of the words: the cream on the footage, on the dark and on the red — over the footage, on one soft patch of the dark. */
.live [data-tone="night"] {
  --ui: var(--lo-cream);
  --ui-dim: rgb(245 230 204 / 0.94);
  --plate: rgb(23 17 12 / 0.62);
}

/* On the butter: the dark ink, and nothing under it. */
.live [data-tone="day"] {
  --ui: var(--lo-ink);
  --ui-dim: rgb(43 29 18 / 0.9);
  --plate: rgb(23 17 12 / 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);
  /* 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;
}

/* The band rides in under the foot of the card: the block ends on the band's own butter margin. */
.live .act[data-act="bench"] {
  margin-top: -12vh;
  margin-top: -12svh;
}

.live .stage {
  position: sticky;
  top: 0;
  z-index: 0;
  display: block;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: var(--lo-night);
}

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

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

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

.live .frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: var(--lo-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 .leaders {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* A line is drawn twice: a wider one of the dark under a thin one of the cream, so it reads on dough, wood and hands alike. */
/* A line that is not on is not drawn at all: Safari leaves a dot where a dash of no length begins. */
.leader path {
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linejoin: round;
  visibility: hidden;
  transition:
    stroke-dashoffset 240ms var(--ease-camera),
    visibility 0s linear 240ms;
}

.leader path.casing {
  stroke: rgb(23 17 12 / 0.6);
  stroke-width: 6;
}

.leader path.stroke {
  stroke: var(--lo-cream);
  stroke-width: 2;
}

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

.leader circle.casing {
  fill: rgb(23 17 12 / 0.3);
}

.leader .dot {
  fill: var(--lo-cream);
  stroke: var(--lo-ink);
  stroke-width: 2;
}

.leader .ring {
  fill: none;
  stroke: var(--lo-cream);
  stroke-width: 2;
}

.leader.is-on path {
  stroke-dashoffset: 0;
  visibility: visible;
  transition:
    stroke-dashoffset 420ms var(--ease-text) 60ms,
    visibility 0s linear 60ms;
}

.leader.is-on circle {
  opacity: 1;
  transition: opacity 200ms linear 320ms;
}

/*
 * 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 240ms linear,
    visibility 0s linear 0s;
}

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

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

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

/* Under a block of words the picture is shaded with one soft patch of the dark: no glow round every letter. */
.live .cue::before {
  content: "";
  position: absolute;
  inset: -42% -24%;
  z-index: -1;
  background-image: radial-gradient(closest-side, var(--plate), rgb(23 17 12 / 0));
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms linear;
}

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

/* The line of the bakery: in the dark of the street, clear of the lit window. */
.live .stack {
  left: clamp(24px, 5vw, 84px);
}

/*
 * The word of a step rides up the left of the bench, as large as a word of this page gets.
 * The one whose step is on screen is lit and tied to its thing by a line; the others wait
 * a shade dimmer.
 */
.live .verb {
  left: clamp(24px, 5vw, 84px);
  --lit: 0.62;
  opacity: calc(var(--fade, 1) * var(--lit));
  transition:
    color 240ms linear,
    opacity 260ms linear,
    visibility 0s linear 0s;
}

.live .verb.is-now {
  --lit: 1;
}

/* By the oven the baker stands on the left: there the word rides on the dark of the wall, to the right. */
.live #cue-bake {
  left: auto;
  right: clamp(24px, 5vw, 84px);
}

/* The hour stands on its point of the picture — the mouth of the oven: it is in the pinned scene, and the script puts it there. */
.live .hour {
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  opacity: 1;
}

.live .hour > .hour-box {
  position: absolute;
  left: 0;
  top: 0;
  width: -webkit-max-content;
  width: max-content;
  text-align: center;
  transform: translate3d(-50%, -50%, 0);
}

.live .hour::before {
  inset: -150px -260px;
}

.live .hour-figure {
  font-size: clamp(88px, 14vw, 216px);
}

/* The last line rides in where the words of the steps rode. */
.live .final {
  left: clamp(24px, 5vw, 84px);
}

.live .pill {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 200ms linear,
    transform 280ms var(--ease-camera),
    background-color 180ms linear;
}

.live .final.is-on .pill {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 380ms linear 360ms,
    transform 620ms var(--ease-text) 360ms,
    background-color 180ms linear;
}

/*
 * The blocks between the acts.
 */

.live .block {
  z-index: 1;
}

/*
 * A block after a flood lies over the last of the act before it (--over screens, set by
 * the script from the act's hold). Up there it is clear — the flood itself is the colour —
 * and its words rise over the pinned flood; below the act it paints the same colour on,
 * and flood and block ride away as one page.
 */
.live .block.is-over {
  margin-top: calc(var(--over, 0.2) * -100vh);
  margin-top: calc(var(--over, 0.2) * -100svh);
  background-color: rgb(0 0 0 / 0);
  background-image: linear-gradient(to bottom, rgb(0 0 0 / 0) calc(var(--over, 0.2) * 100vh - 2px), var(--field) calc(var(--over, 0.2) * 100vh - 2px));
  background-image: linear-gradient(to bottom, rgb(0 0 0 / 0) calc(var(--over, 0.2) * 100svh - 2px), var(--field) calc(var(--over, 0.2) * 100svh - 2px));
}

/* «Croissant. All butter»: the name as wide as the butter lets it, what it is made with under its end. */
.live .block-card {
  padding: 2vh var(--gutter) 15vh;
  padding: 2svh var(--gutter) 15svh;
}

.live .card {
  width: -webkit-max-content;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.live .card-name {
  font-size: clamp(64px, 15.5vw, 250px);
  line-height: 0.9;
  opacity: var(--fade, 1);
}

.live .card-notes {
  /* Clear of the tails of the letters above: the name is set tight. */
  margin-top: clamp(14px, 2.4vh, 28px);
  font-size: clamp(22px, 2.3vw, 36px);
  opacity: var(--fade, 1);
  /* It lags a little behind the name as the block rides through. */
  transform: translate3d(0, calc((0.5 - var(--p, 0.5)) * -70px), 0);
}

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

/* The five steps: one row, far wider than the screen, that runs to the left as the page goes down. */
.live .block-run {
  padding: 5vh 0 6vh;
  padding: 5svh 0 6svh;
}

.live .run {
  flex-wrap: nowrap;
  width: -webkit-max-content;
  width: max-content;
  gap: 0 0.3em;
  font-size: clamp(72px, 12vw, 200px);
  line-height: 1.04;
  opacity: var(--fade, 1);
  transform: translate3d(calc(18vw - var(--p, 0.5) * 150vw), 0, 0);
}

.live .run [aria-hidden="true"]:is(span) {
  display: block;
}

.live .run span[aria-hidden="true"] + i,
.live .run i:has(+ span[aria-hidden="true"]) {
  display: block;
}

/* «In the oven today.»: two lines on the red, set a little askew, as the bakery's stamp is pressed. */
.live .block-phrase {
  padding: 3vh var(--gutter) 9vh;
  padding: 3svh var(--gutter) 9svh;
}

.live .phrase {
  width: -webkit-max-content;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(60px, 13vw, 208px);
  line-height: 0.9;
  transform: rotate(-3deg);
  transform-origin: 50% 50%;
}

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

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

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

/*
 * The row of five steps, on a tag of the same cream paper as the name: each step has a
 * round that fills with the stamp's red while the step is on screen, and stays full.
 */
.live .steps {
  display: block;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  background-color: var(--lo-cream);
  box-shadow: 0 6px 16px rgb(23 17 12 / 0.28);
  color: var(--lo-ink);
  font-size: 16px;
  font-weight: 600;
}

.steps ol {
  display: flex;
  align-items: center;
  gap: clamp(0px, 0.5vw, 8px);
}

.steps button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.steps button:focus-visible {
  outline: 2px solid var(--lo-ink);
  outline-offset: -4px;
}

.steps button > span {
  transition: color 200ms linear;
}

.steps li.is-now button > span {
  color: var(--lo-red);
  font-weight: 700;
}

/* The round of a step. */
.pip {
  position: relative;
  flex: none;
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--lo-ink);
  border-radius: 50%;
  overflow: hidden;
  transition:
    transform 420ms var(--ease-text),
    border-color 200ms linear;
}

.pip::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--lo-red);
  transform: translate3d(0, calc((1 - var(--p, 0)) * 100%), 0);
}

.steps li.is-now .pip,
.steps li.is-done .pip {
  border-color: var(--lo-red);
}

.steps li.is-now .pip {
  transform: scale(1.3);
}

.live .hint {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--gutter) + 4px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--lo-cream);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  transition: opacity 360ms var(--ease-camera);
}

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

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

/* ——— The footer: the bench from above, and a bag of the bakery on it ——— */

.foot {
  position: relative;
  z-index: 1;
  overflow: hidden;
  /* The kraft of the bag, until the photograph is there: what is printed on it reads from the first moment. */
  background-color: #c9a377;
  color: var(--lo-brown);
}

/* The photograph keeps its shape; what is printed on the bag is placed in shares of it. */
.foot-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 2400 / 1340;
}

.foot-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The face of the bag, under its folded top: the inks soak into the paper. */
.bag {
  position: absolute;
  left: 38.9%;
  top: 27.2%;
  width: 22.4%;
  height: 55.4%;
  container-type: size;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  mix-blend-mode: multiply;
  transform: rotate(-0.35deg);
}

.bag-stamps {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5cqw;
  margin-bottom: 3.6cqh;
}

/* The round stamp, in the red pad's ink, pressed a little askew. */
.seal {
  flex: none;
  width: 52cqw;
  height: 52cqw;
  overflow: visible;
  /* The red of the stamp, as deep as it has to be for its small letters to read on kraft. */
  color: #6c1a0f;
  transform: rotate(-7deg);
}

.seal-text {
  fill: currentColor;
  font-family: var(--face-display);
  font-weight: 800;
}

/* «Baked today»: the second stamp, in the brown. */
.today {
  flex: none;
  display: grid;
  gap: 0.02em;
  padding: 0.34em 0.62em 0.3em;
  border: 0.13em solid currentColor;
  border-radius: 0.3em;
  outline: 0.05em solid currentColor;
  outline-offset: -0.26em;
  font-family: var(--face-display);
  font-size: 8.2cqw;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(4deg);
}

.card-title {
  padding-bottom: 2.4cqh;
  border-bottom: 2px solid currentColor;
  font-family: var(--face-display);
  font-size: 9.6cqw;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.prices {
  display: grid;
  gap: 2.6cqh;
  padding: 3.2cqh 0;
}

.prices li {
  display: grid;
  grid-template-columns: auto minmax(12px, 1fr) auto;
  align-items: baseline;
  column-gap: 6px;
}

.prices b {
  font-family: var(--face-display);
  font-size: 7.4cqw;
  font-weight: 800;
  line-height: 1.05;
}

/* The dots from a thing to its price. */
.prices i {
  align-self: end;
  height: 0;
  margin-bottom: 0.32em;
  border-bottom: 2px dotted currentColor;
}

.price {
  font-family: var(--face-display);
  font-size: 7.4cqw;
  font-weight: 800;
  line-height: 1.05;
}

.what {
  grid-column: 1 / -1;
  font-size: 5cqw;
  font-weight: 600;
  line-height: 1.25;
}

.card-foot {
  margin-top: auto;
  padding-top: 2.4cqh;
  border-top: 2px solid currentColor;
  font-size: 5cqw;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

/* The studio signs in its own colours, not the bakery's: volt and ink, in the corner. */
.studio {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  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 #0a0a0a;
  outline-offset: 3px;
}

.studio svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}

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

/* ——— A tall screen ——— */

@media (max-aspect-ratio: 7 / 10) {
  .brand {
    min-height: 44px;
    padding: 10px 14px 10px 11px;
    gap: 8px;
    font-size: 20px;
  }

  .brand-mark {
    width: 48px;
    height: 21px;
  }

  .voice {
    font-size: clamp(38px, 11.4vw, 52px);
  }

  .verb-word,
  .hour-figure {
    font-size: clamp(64px, 22vw, 104px);
  }

  .final-title {
    font-size: clamp(2.5rem, 12.4vw, 3.5rem);
  }

  .card-name {
    font-size: clamp(52px, 16vw, 84px);
  }

  .run {
    font-size: clamp(40px, 12vw, 60px);
  }

  .phrase {
    font-size: clamp(52px, 16.4vw, 88px);
  }

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

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

  /* The rounds without their words: there is no room for five of them beside the name. */
  .live .steps {
    padding: 0 7px;
  }

  .steps ol {
    gap: 0;
  }

  .steps button {
    min-height: 44px;
    padding: 0 6px;
  }

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

  .live .stack,
  .live .verb,
  .live .final {
    left: var(--gutter);
  }

  .live #cue-bake {
    left: var(--gutter);
    right: auto;
  }

  .live .card-name {
    font-size: clamp(56px, 18.6vw, 96px);
  }

  .live .card-notes {
    font-size: 22px;
  }

  .live .run {
    font-size: clamp(72px, 23vw, 120px);
    transform: translate3d(calc(18vw - var(--p, 0.5) * 300vw), 0, 0);
  }

  .live .phrase {
    font-size: clamp(52px, 16.4vw, 88px);
  }

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

  .live .hour-figure {
    font-size: clamp(88px, 30vw, 132px);
  }

  .live .hour::before {
    inset: -110px -150px;
  }

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

  .hint span {
    display: none;
  }

  /* The bag fills the width: the photograph is wider than the screen, and the stamp and the croissant look in from its sides. */
  .foot-scene {
    width: 356vw;
    margin-left: -128vw;
  }
}

/* ——— Checks ——— */

.hud {
  position: fixed;
  left: 8px;
  bottom: 8px;
  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-wrap;
  max-width: calc(100vw - 16px);
  pointer-events: none;
}
