/*
 * Fuxia Nail Studio, «One manicure» — 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-36.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 — and between the acts lie the blocks of
 * the page: a word of the studio on its fuchsia and on its blush, its list of services.
 *
 * Then (html.live, set before the first paint when the film will play) the page becomes
 * four acts with real scroll between them:
 *   .act        as tall as its scene is pinned for, plus one screen (--pin, set by the script)
 *   .stage      the scene of the act: a sticky screen. The page brings it in from below,
 *               holds it and carries it away upwards
 *     .frame      the picture: the first frame of the act (.poster) until the film is
 *                 there, then the footage (.screen, a canvas of its own in every act).
 *                 In act 3 it is a window the shape of a nail in the blush page
 *                 (clip-path, set by the script) that 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 — the word on a flood inside an act — stands on the scene)
 *   .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 studio and the acts of the story — four nails — fixed over all of it
 * After the film, in the flow of the page: .foot — the table from over it, the fan of
 * shades and the booking card.
 *
 * The words take their ink from what lies under them (data-tone): white over the lacquer
 * ("night") and on the fuchsia and the lacquer themselves ("bare"); lacquer over the pale
 * walls ("day"); the fuchsia itself on the blush ("rose").
 *
 * The colours of the studio (tickets/SC-36.md): fuchsia #c2185b, lacquer #1a1418, blush #f7e1e9.
 */

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

  --fuxia: #c2185b;
  --lacquer: #1a1418;
  --night: #120e11;
  --petal: #ee6a9a;
  --blush: #f7e1e9;
  --chrome: #c9c4cb;

  /* The studio's own pair. Playfair Display italic — the letters of its name on the wall
     and of its brand book — for every large word; Epilogue for everything small. The
     web studio's faces (Unbounded, Onest) are in its lime corner and nowhere else. */
  --face-display: "Playfair Display", "Bodoni 72", Didot, Georgia, serif;
  --face-text: "Epilogue", 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: #120e11;
  color: #ffffff;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: #ffffff;
  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: seven stills, their words, and the blocks between ———
 */

body {
  position: relative;

  /* White: the ink of every word until something says otherwise. */
  --ui: #ffffff;
  --ui-dim: rgb(255 255 255 / 0.86);
  --under: #120e11;
  --plate: rgb(18 14 17 / 0.6);
  --polish: #ee6a9a;
  /* What lies round a picture smaller than the screen. */
  --ground: #120e11;
}

.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: #ffffff;
  line-height: 1;
}

/* The name as it stands on the wall of the studio: one italic word, and what it is beside it. */
.brand {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ui);
  transition: color 300ms linear;
}

.brand-word {
  font-family: var(--face-display);
  font-size: 34px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-kind {
  color: var(--ui-dim);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

/* It passes over the pale wall and over black glass alike: it carries its own soft plate. */
.brand::before {
  content: "";
  position: absolute;
  inset: -22px -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: 8px 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 goes into lacquer, so the white reads on any of the seven. */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to top, rgb(18 14 17 / 0.9), rgb(18 14 17 / 0.56) 30%, rgb(18 14 17 / 0) 62%);
  pointer-events: none;
}

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

.line {
  display: block;
  overflow: hidden;
  padding: 0.08em 0.14em 0.24em 0.04em;
  margin: -0.08em -0.14em -0.24em -0.04em;
}

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

/* The line of the first screen: three words, one under another. */
.title {
  font-family: var(--face-display);
  font-size: clamp(44px, 6.2vw, 104px);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 0.98;
  white-space: nowrap;
}

.lede {
  max-width: 15em;
  margin-top: 18px;
  color: var(--ui-dim);
  font-size: clamp(17px, 1.4vw, 21px);
  font-weight: 600;
  line-height: 1.35;
}

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

/* A word tied to a thing of the picture. */
.cue-caption {
  font-family: var(--face-display);
  font-size: clamp(32px, 3.9vw, 62px);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.08;
  white-space: nowrap;
}

.cue-two {
  font-size: clamp(30px, 3.3vw, 52px);
}

.final-title {
  font-family: var(--face-display);
  font-size: clamp(42px, 5.6vw, 92px);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.04;
  white-space: nowrap;
}

.final-act {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: clamp(20px, 3.4vh, 36px);
}

.final-note {
  color: var(--ui-dim);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

/* The button: a capsule of fuchsia, its arrow in a round of lacquer. */
.pill,
.book {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  height: 60px;
  padding: 6px 6px 6px 28px;
  border: 0;
  border-radius: 999px;
  background-color: #c2185b;
  color: #ffffff;
  font-family: var(--face-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms linear;
}

.pill:hover,
.book:hover {
  background-color: #a8124d;
}

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

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

.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,
.book:hover .pill-round svg,
.book:focus-visible .pill-round svg {
  transform: translate3d(4px, 0, 0);
}

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

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

.block[data-field="fuxia"] {
  --field: #c2185b;
  --ui: #ffffff;
}

.block[data-field="blush"] {
  --field: #f7e1e9;
  --ui: #c2185b;
}

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

/* A word of the studio: the italic of its name on the wall. */
.word {
  color: var(--ui);
  font-family: var(--face-display);
  font-size: clamp(56px, 8vw, 128px);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.96;
}

/* What the studio paints: its services, how long each takes and what it costs — as on its booking card. */
.menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(28px, 5vw, 88px);
  margin: clamp(22px, 4vh, 46px) 0 0;
  padding: 0;
  list-style: none;
}

.menu li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 3.4em;
  gap: 0 1.4em;
  align-items: baseline;
  padding: 0.62em 0 0.68em;
  border-top: 1px solid rgb(26 20 24 / 0.3);
  color: #1a1418;
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 600;
  line-height: 1.3;
}

.menu-name {
  font-family: var(--face-display);
  font-size: clamp(24px, 2.5vw, 40px);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

.menu-price {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/*
 * ——— 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: #ffffff;
  --ui-dim: rgb(255 255 255 / 0.86);
  --under: #120e11;
  --plate: rgb(18 14 17 / 0.6);
  --polish: #ee6a9a;
}

.live [data-tone="day"] {
  --ui: #1a1418;
  --ui-dim: rgb(26 20 24 / 0.84);
  --under: #ffffff;
  --plate: rgb(250 236 240 / 0.74);
  --polish: #c2185b;
}

/* On the fuchsia and on the lacquer: white, without its plate. */
.live [data-tone="bare"] {
  --ui: #ffffff;
  --ui-dim: rgb(255 255 255 / 0.9);
  --under: #120e11;
  --plate: rgb(18 14 17 / 0);
  --polish: #ffffff;
}

/* On the blush: the fuchsia itself. */
.live [data-tone="rose"] {
  --ui: #c2185b;
  --ui-dim: #8f1143;
  --under: #ffffff;
  --plate: rgb(247 225 233 / 0);
  --polish: #c2185b;
}

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

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

/* The nail-shaped window rides in under the foot of the block before it: the block ends on the window's own blush. */
.live .act[data-act="stroke"] {
  margin-top: -8vh;
  margin-top: -8svh;
}

/* A line comes up from under a mask and leaves the way it came. */
.live .line > span {
  transform: translate3d(0, 124%, 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);
}

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

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

/*
 * The first line: on the empty wall left of the shelf, in the light of the window. It
 * goes up with the page from the first turn of the wheel, and its lines fade one by one
 * as each comes under the header (set by the script).
 */
.live .cue-opening {
  left: calc(var(--gutter) + 1.5vw);
  top: 30vh;
  top: 30svh;
}

.live .cue-opening .line {
  opacity: var(--fade, 1);
}

/* The word of an act stands alone in the middle of its flood, as large as the screen lets it. */
.live .cue-card {
  text-align: center;
}

.live .cue-act,
.live .block .word {
  font-size: clamp(120px, 23vw, 400px);
}

/*
 * 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 is carried up past the pinned picture,
 * tied to its thing while its moment lasts, 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.62;
}

.live #cue-shades,
.live #cue-lacquer,
.live #cue-chrome,
.live #cue-fuchsia,
.live #cue-gel,
.live #cue-weeks {
  left: 6.5%;
}

/* On the black glass, over the hand that paints. */
.live #cue-mia {
  right: 6.5%;
}

/*
 * The last line rides in from below as the bottle comes home, and is on the wall under
 * the shelf, the button beside it, when the scene is let go.
 */
.live .cue-final {
  left: calc(var(--gutter) + 1.5vw);
  right: calc(var(--gutter) + 1.5vw);
  bottom: 5.5vh;
  bottom: 5.5svh;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

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

.live .final-act {
  align-items: flex-end;
  margin: 0 0 10px;
  text-align: right;
}

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

.live .cue-final.is-on .final-note {
  transition-delay: 460ms, 460ms, 0s;
}

/*
 * The blocks between the acts.
 */

/* A word of the studio, alone on its field, as large as the screen lets it; it drifts a little to one side as the block rides up. */
.live .block-word,
.live .block-menu {
  padding: 2vh var(--gutter) 13vh;
  padding: 2svh var(--gutter) 13svh;
  text-align: center;
}

.live .word {
  /* Set by the script: the word fades just before it would ride up under the header. */
  opacity: var(--fade, 1);
  transform: translate3d(calc((0.5 - var(--p, 0.5)) * var(--drift, 10vw)), 0, 0);
}

.live .block .word .line > span {
  margin: 0 auto;
}

.live .block-menu .word {
  --drift: -10vw;
}

/* The services under the word, in two columns; the rows ride a little apart, the lower the slower. */
.live .menu {
  max-width: 1280px;
  margin: 5vh auto 0;
  margin: 5svh auto 0;
  text-align: left;
}

.live .menu li {
  opacity: var(--fade, 1);
  transform: translate3d(0, calc((0.7 - var(--p, 0.5)) * (var(--k, 0) + 1) * 14px), 0);
}

/* «Shine.»: a band of light crosses the block from left to right as it rides up, over the word and the blush alike — the gloss of wet polish. */
.live .block-shine::after {
  --g: calc(var(--p, 0.5) * 230% - 65%);

  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(104deg, rgb(255 255 255 / 0) calc(var(--g) - 11%), rgb(255 255 255 / 0.62) var(--g), rgb(255 255 255 / 0) calc(var(--g) + 11%));
  /* The band has no ends: it goes out towards the head and the foot of the block. */
  -webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0) 4%, rgb(0 0 0 / 1) 36%, rgb(0 0 0 / 1) 74%, rgb(0 0 0 / 0) 98%);
  mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0) 4%, rgb(0 0 0 / 1) 36%, rgb(0 0 0 / 1) 74%, rgb(0 0 0 / 0) 98%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

/*
 * A line that is off is not drawn at all. Its dashes are of no length then, yet WebKit
 * still draws round caps — a dot was left where every hidden line begins. So: hidden
 * while off, and no round caps on the thin stroke.
 */
.leader {
  visibility: hidden;
  transition: visibility 0s linear 280ms;
}

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

/* A line: a hair of the word's ink over a wider one of the other tone, a ring where it lands. */
.leader path {
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: butt;
  transition: stroke-dashoffset 240ms var(--ease-camera);
}

.leader path.casing {
  stroke: var(--under);
  stroke-width: 5;
  opacity: 0.4;
}

.leader path.stroke {
  stroke: var(--ui);
  stroke-width: 1.5;
}

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

.leader circle.casing {
  fill: var(--under);
}

.leader .dot {
  fill: var(--ui);
}

.leader .ring {
  fill: none;
  stroke: var(--ui);
  stroke-width: 1.5;
}

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

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

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

.leader.is-on .ring {
  opacity: 0.85;
  transition: opacity 220ms linear 460ms;
}

/*
 * The acts of the story: four nails. Each is painted from its cuticle to its tip as its
 * act goes by, and stays painted 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: center;
  gap: clamp(14px, 1.7vw, 26px);
  list-style: none;
}

.acts button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  padding: 6px 0;
  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: 4px;
}

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

/* The nail: an almond, its tip up. */
.acts i {
  position: relative;
  display: block;
  flex: none;
  width: 15px;
  height: 23px;
  overflow: hidden;
  border: 1.5px solid currentColor;
  border-radius: 50% 50% 44% 44% / 72% 72% 28% 28%;
}

.acts i::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--polish);
  transform: scaleY(var(--p, 0));
  transform-origin: 50% 100%;
  transition: background-color 300ms linear;
}

.live .hint {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--gutter) + 6px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ui);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition:
    opacity 360ms var(--ease-camera),
    color 300ms linear;
}

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

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

/*
 * ——— The footer: the table, from over it ———
 *
 * The black glass of the manicure table. On it lies the fan of the seven shades
 * (textures/fan.webp, photographed), and beside the fan the studio's booking card:
 * service, artist, day and time — what its site puts on its first screen. The lime
 * corner is the one thing that is the same on every page.
 */

.foot {
  position: relative;
  padding-bottom: clamp(84px, 12vh, 112px);
  background-color: #120e11;
  color: #ffffff;
}

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

.fan {
  display: block;
}

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

/* The glass goes out into the black of the page above and below. */
.desk::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(to bottom, rgb(18 14 17 / 1), rgb(18 14 17 / 0) 14%, rgb(18 14 17 / 0) 86%, rgb(18 14 17 / 1));
  pointer-events: none;
}

/* The card: blush paper, laid on the glass a little askew. */
.card {
  position: absolute;
  left: 57.5%;
  top: 50%;
  z-index: 1;
  width: min(36%, 520px);
  padding: clamp(22px, 2.3vw, 36px) clamp(22px, 2.4vw, 38px) clamp(20px, 2vw, 30px);
  border-radius: 6px;
  background-color: #f7e1e9;
  color: #1a1418;
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.5);
  transform: translate3d(0, -50%, 0) rotate(-1.4deg);
}

.card-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  line-height: 1;
}

.card-word {
  color: #c2185b;
  font-family: var(--face-display);
  font-size: clamp(34px, 3.1vw, 50px);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-kind {
  font-size: 15px;
  font-weight: 600;
}

.card-title {
  margin-top: clamp(14px, 1.6vw, 24px);
  font-family: var(--face-display);
  font-size: clamp(24px, 2vw, 32px);
  font-style: italic;
  font-weight: 500;
  line-height: 1.1;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-top: 16px;
}

.field {
  display: block;
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  display: block;
  color: #5c2a3f;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.field select {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 2px;
  padding: 0 28px 0 0;
  border: 0;
  border-bottom: 1.5px solid #1a1418;
  border-radius: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1418' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 0 center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  color: #1a1418;
  font-family: var(--face-text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.field select:focus-visible {
  outline: 2px solid #c2185b;
  outline-offset: 3px;
}

.book {
  margin-top: 22px;
}

.book:focus-visible {
  outline-color: #1a1418;
}

.book .book-tick {
  display: none;
}

/* Booked: the capsule turns to lacquer, its arrow to a tick. */
.book.is-done {
  background-color: #1a1418;
  cursor: default;
}

.book.is-done .pill-round {
  background-color: #c2185b;
}

.book.is-done .book-arrow {
  display: none;
}

.book.is-done .book-tick {
  display: inline;
}

.book.is-done:hover .pill-round svg {
  transform: none;
}

.card-visit {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgb(26 20 24 / 0.22);
  color: #3a2530;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

/* The web studio signs in its own colours, not the salon'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 #ffffff;
  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
 * lacquer below the picture.)
 */

@media (max-aspect-ratio: 3 / 4) {
  .brand-word {
    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: 72px;
  }

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

  /* Under the picture there is room for two lines: the three words stand in a row. */
  .title {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.24em;
    font-size: clamp(34px, 10.2vw, 44px);
    line-height: 1.02;
  }

  .lede {
    max-width: none;
    margin-top: 10px;
    font-size: 16px;
  }

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

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

  .final-title {
    font-size: clamp(36px, 10.6vw, 46px);
  }

  .pill,
  .book {
    height: 56px;
  }

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

  /* The services in one column. */
  .menu {
    grid-template-columns: minmax(0, 1fr);
  }

  .menu li {
    grid-template-columns: minmax(0, 1fr) auto 3em;
    gap: 0 0.9em;
    font-size: 15px;
  }

  .menu-name {
    font-size: 23px;
  }

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

  .live .cue-act,
  .live .block .word {
    font-size: 27vw;
  }

  /* The first line stands in the lacquer under the picture. */
  .live .cue-opening {
    left: var(--gutter);
    right: var(--gutter);
    top: auto;
    bottom: calc(var(--pin, 1) * 100vh + var(--gutter) + 22px + env(safe-area-inset-bottom, 0px));
    bottom: calc(var(--pin, 1) * 100svh + var(--gutter) + 22px + env(safe-area-inset-bottom, 0px));
  }

  .live .lede .line > span {
    width: auto;
  }

  /* The captions come up out of the lacquer under the picture, one at a time, and send their lines up into it. */
  .live #cue-shades,
  .live #cue-lacquer,
  .live #cue-chrome,
  .live #cue-fuchsia,
  .live #cue-gel,
  .live #cue-mia,
  .live #cue-weeks {
    left: var(--gutter);
    right: auto;
  }

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

  /* The last line rides up into the lacquer under the picture; the button under the line. */
  .live .cue-final {
    left: var(--gutter);
    right: var(--gutter);
    bottom: calc(var(--gutter) + 6px + env(safe-area-inset-bottom, 0px));
    display: block;
  }

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

  .live .final-act {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin: 14px 0 0;
    text-align: left;
  }

  /* The line beside the button has no room here: the button alone. */
  .live .final-note {
    display: none;
  }

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

  .live .menu {
    margin-top: 3vh;
    margin-top: 3svh;
  }

  /* Only the act on screen keeps its name; the others are their nails. */
  .acts ol {
    gap: 9px;
  }

  .acts button {
    gap: 7px;
  }

  .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 fan alone, and the card under it, straight. */
  .foot {
    padding-bottom: 92px;
  }

  .desk {
    background-color: #120e11;
  }

  .desk::after {
    bottom: auto;
    aspect-ratio: 11 / 10;
    background-image: linear-gradient(to bottom, rgb(18 14 17 / 1), rgb(18 14 17 / 0) 12%, rgb(18 14 17 / 0) 84%, rgb(18 14 17 / 1));
  }

  .card {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    margin: -28px var(--gutter) 0;
    padding: 24px 22px 22px;
    box-shadow: none;
    transform: none;
  }

  .card-word {
    font-size: 40px;
  }

  .card-title {
    margin-top: 16px;
    font-size: 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;
}
