/* ==========================================================================
   CHIKO, site 7: the modern collage.
   The same cut-outs as site 6, with the scrapbook props taken away:
   - one typeface (Archivo, from condensed to wide) plus an italic serif accent
   - backdrop photos printed in a single ink on pastel paper
   - every section is a sheet of coloured paper laid over the one before,
     with cut-outs crossing the seams, so the whole page reads as one collage
   The cut-outs live in assets/media/cutouts/.
   ========================================================================== */

:root {
  --paper: #f7f4ef;
  --ink: #150a2e;
  --soft: #5d5378;
  --rule: rgba(21, 10, 46, .16);

  /* Tie-dye pastels (tie-dye.jpg is drawn from these) */
  --lilac: #c6b5ff;
  --pink: #ffb0e0;
  --mint: #aef3cd;
  --sky: #a8d9ff;
  --violet: #6a3fe0;
  --print: #7b63d6; /* the ink a backdrop photo is printed in (each paper has its own) */

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --space: clamp(4.5rem, 9vw, 8.5rem);
  --lap: 3vw; /* how far each sheet overlaps the one above it */
  --edge: clamp(2px, .17vw, 4px); /* the paper edge left around a cut-out */

  --shadow: 0 1px 2px rgba(21, 10, 46, .14), 0 1.25rem 2.25rem -1rem rgba(21, 10, 46, .5);
  --ease: cubic-bezier(.22, 1, .36, 1);

  --sans: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ink);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
p, figure, h1, h2, h3, ul { margin: 0; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
}

.skip {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  transform: translateY(-300%);
}
.skip:focus { transform: none; }

/* --------------------------------------------------------------------------
   Small parts
   -------------------------------------------------------------------------- */

.wrap {
  max-width: calc(84rem + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  display: flex;
  align-items: center;
  gap: .7em;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.label__dot {
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 .3em rgba(106, 63, 224, .2);
}

.body {
  max-width: 34em;
  color: var(--soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85em 1.5em;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.btn:hover {
  border-color: var(--violet);
  background: var(--violet);
}
.btn--line {
  background: none;
  color: var(--ink);
}
.btn--line:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.btn--small {
  padding: .7em 1.25em;
  font-size: .82rem;
}

/* A cut-out: a thin edge of white paper left around it, and a soft shadow */
.cut {
  height: auto;
  filter:
    drop-shadow(var(--edge) 0 0 #fff)
    drop-shadow(calc(-1 * var(--edge)) 0 0 #fff)
    drop-shadow(0 var(--edge) 0 #fff)
    drop-shadow(0 calc(-1 * var(--edge)) 0 #fff)
    drop-shadow(0 .5rem .7rem rgba(21, 10, 46, .38));
  pointer-events: none;
  user-select: none;
}

/* A print: a photo in one ink (--print) on paper of the same colour (--tone) */
.tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--tone, var(--lilac));
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(1.2) contrast(1.05);
  mix-blend-mode: multiply;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--print);
  mix-blend-mode: screen;
}
.tile--lilac { --tone: var(--lilac); --print: #7b63d6; }
.tile--pink { --tone: var(--pink); --print: #d868b0; }
.tile--mint { --tone: var(--mint); --print: #3fb28a; }
.tile--sky { --tone: var(--sky); --print: #4d8fe0; }

/* --------------------------------------------------------------------------
   Nav: a floating bar, so the collage runs to the top of the screen
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: .75rem;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: min(100% - 1.5rem, 78rem);
  min-height: 3.25rem;
  margin-inline: auto;
  padding: .4rem .4rem .4rem 1.4rem;
  border-radius: 99px;
  background: rgba(247, 244, 239, .9);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 0 0 1px rgba(21, 10, 46, .1), 0 1rem 2rem -1.25rem rgba(21, 10, 46, .65);
}

.nav__brand {
  font-size: 1.15rem;
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav__links {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  margin-left: auto;
}
.nav__links a,
.foot__links a {
  padding: .4rem 0;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left 100% / 0 1.5px no-repeat;
  transition: background-size .3s var(--ease);
}
.nav__links a:hover,
.nav__links a[aria-current],
.foot__links a:hover { background-size: 100% 1.5px; }

/* A hairline along the foot of the bar fills as the page is read (--progress, script.js) */
.nav::after {
  content: "";
  position: absolute;
  left: 1.75rem;
  right: 1.75rem;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--violet);
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
}

/* --------------------------------------------------------------------------
   Hero: the whole first screen is one collage.

   The pieces are drawn for a 100 x 56 board (--H), measured from its centre:
   --x = where the middle of the piece sits across, --t = where its top edge
   sits, --w = its width, --z = stacking order.
   Positions follow the window (1vw across, --v down) and sizes follow --u,
   the larger of the two, so the board always covers the screen: on a window
   that is narrower or wider than the drawing, the pieces close up or grow
   off the bottom edge instead of leaving gaps.
   -------------------------------------------------------------------------- */

.hero {
  --H: 56;
  --hh: max(100svh, 34rem);
  --v: calc(var(--hh) / var(--H));
  --u: max(1vw, var(--v));
  position: relative;
  isolation: isolate;
  height: calc(var(--hh) + var(--lap)); /* one screen, plus the strip the next sheet covers */
  overflow: hidden;
  overflow: clip;
  background: var(--lilac);
}
@supports not (height: 1svh) {
  .hero { --hh: max(100vh, 34rem); }
}

/* Back: the wall of prints */
.hero__wall {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template: 52% 48% / repeat(20, minmax(0, 1fr));
}
.hero__wall .tile { min-height: 0; }
.w-booth { grid-area: 1 / 1 / 2 / 6; }
.w-street { grid-area: 1 / 6 / 2 / 13; }
.w-necklace { grid-area: 1 / 13 / 2 / 17; }
.w-garden { grid-area: 1 / 17 / 2 / 21; }
.w-double { grid-area: 2 / 1 / 3 / 7; }
.w-flat-a { grid-area: 2 / 7 / 3 / 12; }
.w-sign { grid-area: 2 / 12 / 3 / 16; }
.w-flat-b { grid-area: 2 / 16 / 3 / 21; }

/*
   Middle: the name, as a masthead. It is as wide as the window allows (--fs),
   and its foot stays where the heads of the cut-outs reach, below the nav.
*/
.wordmark {
  --fs: min(24.6vw, 24.6 * var(--v));
  position: absolute;
  left: 50%;
  top: max(4.6rem, var(--hh) / 2 - 5.6 * var(--v) - .69 * var(--fs));
  z-index: 1;
  translate: -50% 0;
  font-size: var(--fs);
  font-weight: 900;
  font-stretch: 110%;
  line-height: .72;
  letter-spacing: -.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}

/*
   Front: the cut-outs. They sit on four planes, each the size of the hero,
   stacked from the back (1) to the front (4), so that a whole plane can be
   moved at once (see "Scroll"). --d is how far a piece drifts with the pointer
   (script.js).
*/
.plane {
  position: absolute;
  inset: 0;
  z-index: var(--z);
  pointer-events: none;
}
.plane--1 { --z: 2; }
.plane--2 { --z: 4; }
.plane--3 { --z: 5; }
.plane--4 { --z: 6; }

.plane > .pc {
  position: absolute;
  left: calc(50% + var(--x, 0) * 1vw);
  top: calc(var(--hh) / 2 + var(--t, 0) * var(--v));
  z-index: var(--z, 2);
  width: calc(var(--w) * var(--u));
  translate: calc(-50% + var(--mx, 0) * var(--d, 0) * 1px) calc(var(--my, 0) * var(--d, 0) * 1px);
  rotate: var(--r, 0deg);
  transition: translate .7s var(--ease);
}

/* Back row: the two big faces */
.c-portrait { --x: -35; --t: -9.4; --w: 38; --z: 2; --d: 8; }
.c-amber { --x: 33; --t: -11.2; --w: 30; --z: 3; --d: 8; }

/* Front row: shoulder to shoulder, running off the bottom of the screen */
.c-teal { --x: -8; --t: -9.5; --w: 29; --z: 4; --d: 14; }
.c-dark { --x: 17; --t: -9; --w: 27; --z: 4; --d: 14; }
.c-light { --x: -21; --t: 0; --w: 19; --z: 5; --r: -3deg; --d: 20; }
.c-floor { --x: 35; --t: 4; --w: 27; --z: 5; --d: 20; }
.c-hall { --x: 4; --t: 7; --w: 11; --z: 6; --r: 3deg; --d: 28; }
.c-desk { --x: 45; --t: 8; --w: 15; --z: 6; --r: 4deg; --d: 28; }

/* The paper label */
.note {
  position: absolute;
  left: var(--gutter);
  bottom: calc(var(--lap) + clamp(1.25rem, 4.5vh, 3rem));
  z-index: 9;
  width: min(100% - 2 * var(--gutter), 24.5rem);
  padding: 1.25rem 1.4rem 1.4rem;
  background: var(--paper);
  rotate: -1.5deg;
  box-shadow: 0 1px 2px rgba(21, 10, 46, .2), 0 1.5rem 2.5rem -1rem rgba(21, 10, 46, .65);
}
.note__line {
  margin: .7rem 0 1.15rem;
  font-size: clamp(1.7rem, 2.5vw, 2.15rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -.025em;
}
.note__line span { white-space: nowrap; }
.note__line em,
.about__lead em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: -.02em;
}
.note__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* Entrance: the pieces land one after another, then the label */
html.js .plane > .pc {
  animation: land .9s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 70ms + 150ms);
}
html.js .wordmark { animation: rise .9s var(--ease) backwards; }
html.js .note { animation: rise .8s var(--ease) .9s backwards; }

@keyframes land {
  from {
    opacity: 0;
    scale: .92;
    translate: -50% calc(4 * var(--u));
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
}

/* --------------------------------------------------------------------------
   Sheets: each section is a sheet of paper laid over the one above it,
   cut slightly off-square. --bg = its colour, --fg = its text colour.
   -------------------------------------------------------------------------- */

.sheet {
  --tilt: -1.2deg;
  --pivot: 100% 0;
  position: relative;
  isolation: isolate;
  margin-top: calc(-1 * var(--lap));
  padding: calc(var(--space) + var(--lap)) 0 var(--space);
  color: var(--fg, var(--ink));
  overflow-x: clip; /* pieces may run off the sides, and over the sheets above and below */
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 0 0 -4vw;
  z-index: -1;
  background: var(--bg, var(--paper));
  transform: skewY(var(--tilt));
  transform-origin: var(--pivot);
  box-shadow: 0 -1.5rem 2.5rem -1.25rem rgba(21, 10, 46, .55);
}
.sheet--flip {
  --tilt: 1.2deg;
  --pivot: 0 0;
}
.sheet--flush { padding-bottom: 0; }
.sheet--paper { --bg: var(--paper); }
.sheet--sky { --bg: var(--sky); }
.sheet--lilac { --bg: var(--lilac); }
.sheet--mint { --bg: var(--mint); }
.sheet--ink {
  --bg: var(--ink);
  --fg: var(--paper);
  --soft: #b9aed6;
  --rule: rgba(247, 244, 239, .2);
}

/* Section heading: a number, then one big word that the collage overlaps */
.head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.1rem 2rem;
}
.head__index { grid-column: 1 / -1; }
.head__index span { opacity: .5; }
.head__title {
  margin-left: -.04em;
  font-size: clamp(3.4rem, 12.4vw, 16rem);
  font-weight: 900;
  font-stretch: 125%;
  line-height: .74;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.head__title > span { display: block; }
/* A seven-letter word is set a little smaller, so it fits like the six-letter ones */
.head__title--long { font-size: clamp(2.9rem, 10.6vw, 13.7rem); }
.head__meta {
  max-width: 15rem;
  padding-bottom: .2rem;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .14em;
  text-align: right;
  text-transform: uppercase;
  color: var(--soft);
}

/* Scroll reveal */
html.js [data-reveal] {
  transition: opacity .8s ease, translate .8s var(--ease), rotate .45s var(--ease);
}
html.js [data-reveal]:not(.is-in) {
  opacity: 0;
  translate: 0 1.75rem;
}

/* A cluster: a small collage. Pieces are placed in % of its width (it is square). */
.cluster {
  position: relative;
  aspect-ratio: 1;
  container-type: inline-size;
}
.cluster > * {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  z-index: var(--z, 1);
  width: calc(var(--w) * 1%);
  rotate: var(--r, 0deg);
}

/* --------------------------------------------------------------------------
   Music
   -------------------------------------------------------------------------- */

.release {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
  margin-top: 1.5rem;
}

/* The collage climbs over the bottom of the word "Music", and its foot is tucked under the next sheet */
.cluster--music { margin: clamp(-6.5rem, -5.5vw, -1.5rem) 0 -9%; }
/*
   Keep this column no taller than the collage beside it, or the collage's foot
   comes out from under the next sheet. The room underneath lifts the form
   clear of that sheet's edge.
*/
.release__body { padding-bottom: 4.5rem; }

.k-booth { --x: 44; --y: 0; --w: 54; --z: 1; aspect-ratio: 4 / 5; }
.k-block {
  --x: -3;
  --y: 55;
  --w: 46;
  --z: 1;
  aspect-ratio: 5 / 4;
  background: var(--mint);
}
.k-cover { --x: 5; --y: 21; --w: 58; --z: 2; --r: -3deg; }
.k-desk { --x: 51; --y: 37; --w: 45; --z: 3; --r: 3deg; }

.cover {
  border: var(--edge) solid #fff;
  box-shadow: var(--shadow);
}
.cover__art {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  aspect-ratio: 1;
  padding: 7%;
  overflow: hidden;
  background: var(--lilac) url("tie-dye.jpg") 30% 40% / 170% no-repeat;
  transition: color .5s ease;
}

/*
   The loaded song's picture fills the cover (script.js adds .has-photo). A dark
   wash at the top and bottom keeps the words readable, and they turn to paper.
*/
.cover__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%; /* the photos are tall: keep the face in the square */
  opacity: 0;
  transition: opacity .5s ease;
}
.cover__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(21, 10, 46, .72), rgba(21, 10, 46, .55) 16%, rgba(21, 10, 46, 0) 38%, rgba(21, 10, 46, 0) 48%, rgba(21, 10, 46, .82));
  opacity: 0;
  transition: opacity .5s ease;
}
.cover__row,
.cover__title {
  position: relative;
  z-index: 1;
}
.cover.has-photo .cover__art { color: var(--paper); }
.cover.has-photo .cover__photo,
.cover.has-photo .cover__art::after { opacity: 1; }
.cover__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .62rem;
  font-size: max(.58rem, 1.9cqw);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cover__title {
  align-self: end;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 3rem;
  font-size: 12.5cqw;
  line-height: .9;
  letter-spacing: -.04em;
}

.release__title {
  margin: .8rem 0 1rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  line-height: .95;
  letter-spacing: -.04em;
}

/* While a song plays, the dye on the cover drifts */
.cover__art { animation: dye 24s ease-in-out infinite alternate paused; }
.cover.is-playing .cover__art { animation-play-state: running; }
@keyframes dye {
  to { background-position: 72% 64%; }
}
/* With a picture on the cover, the picture moves instead: a slow push in */
.cover__photo { animation: push 18s ease-in-out infinite alternate paused; }
.cover.is-playing .cover__photo { animation-play-state: running; }
@keyframes push {
  to { scale: 1.08; }
}

/*
   The songs. Each row is one button: press it to play, press again to pause.
   The row that is playing turns to ink, and the line along its foot is a
   seek bar (script.js adds it, with the icons, and fills it through --p).
*/
.tracks {
  max-width: 30rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--ink);
}
.track {
  position: relative;
  border-top: 1px solid var(--ink);
}
.track__play {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .9rem;
  width: 100%;
  height: 2.125rem;
  padding: 0 .25rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: padding .35s var(--ease), background-color .35s ease, color .35s ease;
}
.track__title {
  overflow: hidden;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track__no,
.track__time {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
  color: var(--soft);
  transition: color .35s ease;
}

/* Where the number sits: it gives way to a play arrow, or to bars that move while the song plays */
.track__mark {
  display: grid;
  place-items: center start;
}
.track__mark > * {
  grid-area: 1 / 1;
  transition: opacity .2s ease;
}
.track__icon {
  width: .6rem;
  fill: currentColor;
  opacity: 0;
}
.track__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: .75rem;
  opacity: 0;
}
.track__bars i {
  width: 3px;
  height: 100%;
  background: currentColor;
  transform-origin: 50% 100%;
}
.track.is-playing .track__bars i { animation: bars .7s ease-in-out infinite alternate; }
.track.is-playing .track__bars i:nth-child(2) { animation-delay: -.45s; }
.track.is-playing .track__bars i:nth-child(3) { animation-delay: -.2s; }
@keyframes bars {
  from { transform: scaleY(.25); }
}

.track.is-current .track__play {
  padding: 0 .9rem .5rem;
  background: var(--ink);
  color: var(--paper);
}
.track.is-current .track__time { color: #b9aed6; }
.track.is-current .track__mark { color: var(--pink); }
.track.is-current .track__no { opacity: 0; }
.track.is-current .track__icon { opacity: 1; }
.track.is-playing .track__icon { opacity: 0; }
.track.is-playing .track__bars { opacity: 1; }
.track.is-current .track__play:focus-visible { outline-color: var(--pink); }

@media (hover: hover) {
  .track:not(.is-current) .track__play:hover {
    padding-inline: .9rem;
    background: var(--lilac);
  }
  .track:not(.is-current) .track__play:hover .track__time { color: var(--ink); }
  .track:not(.is-current) .track__play:hover .track__no { opacity: 0; }
  .track:not(.is-current) .track__play:hover .track__icon { opacity: 1; }
  /* Pointing at the song that is playing stills the bars into a pause sign */
  .track.is-playing .track__play:hover .track__bars i { animation: none; }
  .track.is-playing .track__play:hover .track__bars i:last-child { display: none; }
}

/* The seek bar: a line along the foot of the row, with a taller strip around it to grab */
.track__seek {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: .9rem;
  right: .9rem;
  bottom: 0;
  width: auto;
  height: .9rem;
  margin: 0;
  background:
    linear-gradient(var(--pink), var(--pink)) 0 50% / calc(var(--p, 0) * 1%) 2px no-repeat,
    linear-gradient(rgba(247, 244, 239, .28), rgba(247, 244, 239, .28)) 0 50% / 100% 2px no-repeat;
  cursor: pointer;
}
.track__seek::-webkit-slider-runnable-track { background: none; }
.track__seek::-moz-range-track { background: none; }
.track__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: .6rem;
  height: .6rem;
  border: 0;
  border-radius: 50%;
  background: var(--pink);
  scale: 0;
  transition: scale .2s var(--ease);
}
.track__seek::-moz-range-thumb {
  width: .6rem;
  height: .6rem;
  border: 0;
  border-radius: 50%;
  background: var(--pink);
  scale: 0;
  transition: scale .2s var(--ease);
}
.track__seek:hover::-webkit-slider-thumb,
.track__seek:focus-visible::-webkit-slider-thumb { scale: 1; }
.track__seek:hover::-moz-range-thumb,
.track__seek:focus-visible::-moz-range-thumb { scale: 1; }
.track__seek:focus-visible {
  outline-color: var(--pink);
  outline-offset: 0;
}

.signup {
  max-width: 30rem;
  margin-top: 1.75rem;
  scroll-margin-top: 7rem;
}
.signup__row {
  display: flex;
  gap: .4rem;
  margin-top: .8rem;
  padding: .3rem;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: #fff;
}
.signup__row:focus-within {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}
.signup input {
  flex: 1;
  min-width: 0;
  padding: .55rem .5rem .55rem 1.1rem;
  border: 0;
  border-radius: 99px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.signup input::placeholder { color: var(--soft); }
.signup input:focus-visible { outline: none; }
/* Takes up no room until there is a message to show */
.signup__status {
  padding-left: 1.1rem;
  font-size: .9rem;
  font-weight: 500;
}
.signup__status:not(:empty) { margin-top: .75rem; }

/* --------------------------------------------------------------------------
   Photos: one wall-to-wall pile.
   Pieces sit on a 100 x 47 grid of --k units (1% of the window's width):
   --x, --y = top-left corner, --w = width, --z = stacking order.
   The back row stands higher and climbs over the word "Photos"; the front
   row runs off the bottom, where the next sheet covers where the photos end.
   -------------------------------------------------------------------------- */

.pile {
  --k: 1vw;
  position: relative;
  isolation: isolate;
  height: calc(47 * var(--k));
  margin-top: -1.5vw;
}
.pile.has-hot { cursor: zoom-in; }

.doll {
  position: absolute;
  left: calc(var(--x) * var(--k));
  top: calc(var(--y) * var(--k));
  z-index: var(--z, 1);
  width: calc(var(--w) * var(--k));
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: inherit;
}
.doll__img {
  display: block;
  width: 100%;
  height: auto;
  rotate: var(--r, 0deg);
  filter:
    drop-shadow(var(--edge) 0 0 #fff)
    drop-shadow(calc(-1 * var(--edge)) 0 0 #fff)
    drop-shadow(0 var(--edge) 0 #fff)
    drop-shadow(0 calc(-1 * var(--edge)) 0 #fff)
    drop-shadow(0 .5rem .7rem rgba(21, 10, 46, .38));
  transition: rotate .45s var(--ease), translate .45s var(--ease), scale .45s var(--ease);
}

/* The two photos with no figure to cut around stay as straight prints */
.doll--print .doll__img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: var(--edge) solid #fff;
  filter: none;
  box-shadow: var(--shadow);
}

/* Back row */
.d-booth { --x: 2; --y: 3.5; --w: 21; --z: 0; --r: -3deg; }
.d-teal { --x: 13; --y: -3.5; --w: 30; --z: 2; }
.d-amber { --x: 38; --y: 2.5; --w: 33; --z: 1; }
.d-double { --x: 59; --y: -2.5; --w: 22; --z: 0; --r: 3deg; }
.d-dark { --x: 70; --y: 1.5; --w: 27; --z: 2; }

/* Front row: every piece ends below the bottom edge */
.d-light { --x: -1; --y: 16; --w: 19.5; --z: 3; }
.d-desk { --x: 15; --y: 22; --w: 17; --z: 4; --r: -3deg; }
.d-garden { --x: 28; --y: 18; --w: 22; --z: 3; }
.d-hall { --x: 49.5; --y: 25; --w: 12.5; --z: 5; --r: 2deg; }
.d-floor { --x: 58; --y: 19; --w: 31; --z: 4; }
.d-portrait { --x: 81; --y: 20.5; --w: 25; --z: 3; }

/* The name of the photo, on a paper tag, when a piece is picked out */
.doll__cap {
  position: absolute;
  left: 50%;
  bottom: 12%;
  z-index: 1;
  padding: .45em .85em;
  background: var(--paper);
  box-shadow: var(--shadow);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  translate: -50% .4rem;
  transition: opacity .25s ease, translate .35s var(--ease);
  pointer-events: none;
}

/* script.js adds .is-hot to the piece that is really under the pointer */
.doll.is-hot,
.doll:focus-visible { z-index: 9; }
.doll.is-hot > .doll__img,
.doll:focus-visible > .doll__img {
  rotate: 0deg;
  translate: 0 -.4rem;
  scale: 1.04;
}
.doll.is-hot .doll__cap,
.doll:focus-visible .doll__cap {
  opacity: 1;
  translate: -50% 0;
}

/* --------------------------------------------------------------------------
   Videos: three frames, set down a little off-square
   -------------------------------------------------------------------------- */

.films {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(2.5rem, 4.5vw, 4.5rem);
}
.film {
  position: relative;
  flex: var(--ar) 1 0;
  min-width: 0;
  rotate: var(--r, 0deg);
}
.film--session { --ar: .929; --r: -1.5deg; }
.film--set { --ar: 1.778; --r: 1deg; margin-top: 6.5vw; }
.film--lens { --ar: .5625; --r: -2deg; margin-top: -1.5vw; }

/* A sheet of coloured paper under each frame */
.film::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  aspect-ratio: var(--ar);
  background: var(--c, var(--lilac));
  translate: var(--bx, 1rem) var(--by, 1rem);
  rotate: var(--br, 3deg);
}
.film--session { --c: var(--lilac); --bx: -1.1rem; --by: 1.2rem; --br: -3deg; }
.film--set { --c: var(--pink); --bx: 1.4rem; --by: 1rem; --br: 2deg; }
.film--lens { --c: var(--mint); --bx: 1rem; --by: -1rem; --br: 4deg; }

.film__frame {
  position: relative;
  aspect-ratio: var(--ar);
  overflow: hidden;
  border: var(--edge) solid #fff;
  background: #000;
  box-shadow: 0 1.75rem 2.5rem -1rem rgba(0, 0, 0, .7);
}
.film video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.film figcaption {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .9rem;
  margin-top: 1.1rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.film figcaption span:first-child,
.film figcaption span:last-child { color: var(--soft); }

/* A cut-out standing on the top edge of the wide frame, in front of the heading */
.film__topper {
  position: absolute;
  top: 0;
  right: 27%;
  z-index: 2;
  width: 21%;
  translate: 0 -95%;
  rotate: -2deg;
}

.film__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.film__icon {
  display: grid;
  place-items: center;
  width: clamp(3.25rem, 5vw, 4.25rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 .5rem 1.25rem rgba(10, 4, 24, .35);
  transition: scale .3s var(--ease), background-color .3s ease;
}
.film__icon svg {
  width: 30%;
  margin-left: 8%;
  fill: currentColor;
}
.film__play:hover .film__icon,
.film__play:focus-visible .film__icon {
  scale: 1.1;
  background: var(--pink);
}
.film__play:focus-visible { outline-offset: -8px; outline-color: #fff; }
.is-playing .film__play { display: none; }

/* --------------------------------------------------------------------------
   About: the text on the left, a collage running off the right-hand edge
   -------------------------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(52vw, 48rem);
  align-items: end;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: none;
  padding-left: max(var(--gutter), (100% - 84rem) / 2);
  padding-right: 0;
}
.about__text { padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(4.5rem, 7vw, 6.5rem); }

.about__lead {
  max-width: 13em;
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 3.3vw, 3rem); /* sized so the line sets in three even rows */
  text-wrap: balance;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -.03em;
}
.about__text .body { color: #43356b; }
.about__text .body + .body { margin-top: 1em; }

.links {
  max-width: 34rem;
  margin-top: 2.5rem;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--ink);
}
.links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem .25rem;
  border-top: 1px solid var(--ink);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: padding .35s var(--ease), background-color .35s ease, color .35s ease;
}
.links a:hover {
  padding-inline: 1rem;
  background: var(--ink);
  color: var(--paper);
}

/* The collage climbs over the heading and sits on the next sheet's top edge */
.cluster--about { margin-top: -9vw; }

.k-halo {
  --x: 13;
  --y: 3;
  --w: 80;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--pink) url("tie-dye.jpg") 60% 30% / 190% no-repeat;
}
.k-ident {
  --x: -5;
  --y: 1;
  --w: 26;
  --z: 3;
  --r: -5deg;
  border: var(--edge) solid #fff;
  box-shadow: var(--shadow);
}
.k-ident video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}
.k-portrait { --x: 20; --y: 6; --w: 86; --z: 2; }
.k-garden { --x: -3; --y: 48.5; --w: 40; --z: 4; }

/* --------------------------------------------------------------------------
   Contact: a few words and the direct links on the left; on the right the
   form, on a sheet of white paper laid over a pink one.
   -------------------------------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
  align-items: start;
  gap: clamp(2.5rem, 7vw, 7rem);
  margin-top: clamp(3rem, 6vw, 5.5rem);
}

.contact__lead {
  max-width: 12em;
  margin-bottom: 1.25rem;
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -.03em;
}
.contact__lead em {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -.04em;
}
.contact__lead + .body { color: #2f5a48; }

/* Links that carry a value on the right (an address, a handle) instead of only an arrow */
.links--pairs a span:last-child {
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.contact__card {
  position: relative;
  margin-top: clamp(2.75rem, 6vw, 5.5rem); /* room for her head under the big title */
  isolation: isolate;
}
/* The pink sheet underneath, a little askew */
.contact__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--pink);
  rotate: -2.2deg;
  translate: -1.1rem .9rem;
}
/* She leans in from behind the top edge of the form, over the end of the heading */
.contact__topper {
  position: absolute;
  left: 4%;
  bottom: calc(100% - 7rem);
  z-index: -1;
  width: min(34%, 13.5rem);
}

.reach {
  display: grid;
  gap: 1.6rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: #fff;
  box-shadow: var(--shadow);
}
.field {
  display: grid;
  gap: .6rem;
}
.reach input[type="text"],
.reach textarea {
  width: 100%;
  padding: .35rem 0 .6rem;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.reach textarea {
  min-height: 6.5rem;
  line-height: 1.5;
  resize: vertical;
}
.reach input[type="text"]:focus-visible,
.reach textarea:focus-visible {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 1.5px 0 var(--violet);
}

/* The subject: one of a row of paper tags (each is a radio button underneath) */
.picks {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.pick {
  position: relative;
  cursor: pointer;
}
.pick input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.pick span {
  display: block;
  padding: .6em 1.15em;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color .25s ease, color .25s ease;
}
.pick:hover span { background: var(--lilac); }
.pick input:checked + span {
  background: var(--ink);
  color: var(--paper);
}
.pick input:focus-visible + span {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

.reach__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
}
.reach__status {
  flex: 1 1 14rem;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.foot {
  padding-bottom: 3.5rem; /* the last row stays clear of the floating player */
  clip-path: inset(-4rem 0 0);
}
.foot::before { inset: 0; }
.foot__word {
  padding-bottom: .04em;
  font-size: 24.6vw;
  font-weight: 900;
  font-stretch: 110%;
  line-height: .78;
  letter-spacing: -.02em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--lilac);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .foot__word {
    background: var(--lilac) url("tie-dye.jpg") center / cover no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.foot__row::before {
  content: "";
  flex: 0 0 100%;
  height: 1px;
  margin-bottom: .5rem;
  background: var(--rule);
}
.foot__row > a { text-decoration: none; }
.foot__row > a:hover { text-decoration: underline; text-underline-offset: .3em; }
.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.75rem;
}
.foot :focus-visible { outline-color: var(--pink); }

/* --------------------------------------------------------------------------
   Floating player: one button in the bottom right corner of the screen, cut
   from the same paper as the nav. It shows a play arrow, or a pause sign while
   a song plays, and the ring around it fills as the song goes (--p, script.js).
   -------------------------------------------------------------------------- */

.dock {
  position: fixed;
  right: max(.75rem, env(safe-area-inset-right));
  bottom: max(.75rem, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.25rem;
  padding: .3rem 1.3rem .3rem .3rem;
  border: 0;
  border-radius: 99px;
  background: rgba(247, 244, 239, .9);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 0 0 1px rgba(21, 10, 46, .1), 0 1rem 2rem -1.25rem rgba(21, 10, 46, .65);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: opacity .3s ease, translate .4s var(--ease), visibility .3s;
}
.dock[hidden] { display: none; }

/* The ring is the outer 2px of this circle; the ink disc sits inside a thin gap of paper */
.dock__disc {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  background: conic-gradient(var(--violet) calc(var(--p, 0) * 1%), var(--rule) 0);
  color: var(--paper);
}
.dock__disc::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--paper);
  transition: background-color .25s ease;
}
.dock:hover .dock__disc::before { background: var(--violet); }
/* The loaded song's picture sits on the ink disc, darkened so the arrow still reads */
.dock__art {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: brightness(.62);
  opacity: 0;
  transition: opacity .3s ease, filter .25s ease;
}
.dock.has-photo .dock__art { opacity: 1; }
.dock:hover .dock__art { filter: brightness(.45); }
.dock__disc svg {
  position: relative;
  grid-area: 1 / 1;
  width: .7rem;
  fill: currentColor;
  transition: opacity .2s ease;
}
.dock__arrow { translate: 1px 0; } /* an arrow looks off-centre unless it is nudged */
.dock__pause,
.dock.is-playing .dock__arrow { opacity: 0; }
.dock.is-playing .dock__pause { opacity: 1; }

.dock__text {
  display: grid;
  gap: .05rem;
  min-width: 0;
}
.dock__note {
  display: flex;
  align-items: center;
  font-size: .6rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--soft);
}
.dock__title {
  max-width: 11rem;
  overflow: hidden;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Three bars that move beside "Now playing" */
.dock__bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: .55rem;
  margin-right: .5em;
  color: var(--violet);
}
.dock__bars i {
  width: 2px;
  height: 100%;
  background: currentColor;
  transform-origin: 50% 100%;
  animation: bars .7s ease-in-out infinite alternate;
}
.dock__bars i:nth-child(2) { animation-delay: -.45s; }
.dock__bars i:nth-child(3) { animation-delay: -.2s; }
.dock.is-playing .dock__bars { display: flex; }

/* --------------------------------------------------------------------------
   Photo viewer
   -------------------------------------------------------------------------- */

.viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: none;
  color: var(--ink);
  overflow: hidden;
}
.viewer[open] {
  display: grid;
  place-items: center;
}
.viewer::backdrop {
  background: rgba(21, 10, 46, .86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.viewer__card {
  padding: .6rem .6rem 0;
  background: #fff;
  box-shadow: 0 2rem 4rem -1rem rgba(10, 4, 24, .7);
  animation: card-in .45s var(--ease);
}
.viewer__img {
  width: auto;
  max-width: min(100%, calc(100vw - 11rem));
  height: auto;
  max-height: calc(100dvh - 7.5rem);
  margin: 0 auto;
}
.viewer__card figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .75rem .1rem .8rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.round {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1.5px solid rgba(247, 244, 239, .6);
  border-radius: 50%;
  background: none;
  color: var(--paper);
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.round:hover {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}
.round:focus-visible { outline-color: var(--pink); }
.round svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.viewer__close { top: 1rem; right: 1rem; }
.viewer__prev { top: calc(50% - 1.5rem); left: 1rem; }
.viewer__next { top: calc(50% - 1.5rem); right: 1rem; }

@keyframes card-in {
  from {
    opacity: 0;
    translate: 0 1rem;
  }
}

/* --------------------------------------------------------------------------
   Scroll: everything that moves as the page does.
   script.js writes the numbers: --sy on the hero, --s and --e on [data-scrub],
   and --wait on pieces that are revealed together (all explained there).
   --depth is how far a piece drifts: above 0 it hangs back, like something
   further away; below 0 it runs ahead.
   None of this applies with reduced motion.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] { transition-delay: var(--wait, 0s); }

  /* Every piece that moves with the page is kept on a layer of its own, so
     moving it never redraws it. Without this the cut-out edges, which are
     slow to draw, make scrolling stutter. (For the same reason the hero's
     cut-outs move a plane at a time, and never one by one.) */
  .hero__wall,
  .wordmark,
  .plane,
  .note,
  .head__title,
  .k-booth,
  .k-block,
  .k-cover,
  .k-halo,
  .k-ident,
  .film--session,
  .film--lens,
  .doll,
  .foot__word { will-change: transform; }

  /* Hero: the layers come apart on the way out. --fall is the share of the
     scrolling a layer falls behind by: the wall and the name most, then each
     plane of cut-outs a little less, while the front one keeps up with the
     page and the label runs just ahead of it. */
  .hero__wall,
  .wordmark,
  .plane,
  .note { transform: translate3d(0, calc(var(--sy, 0) * var(--hh) * var(--fall, 0)), 0); }
  .hero__wall { --fall: .4; }
  .wordmark { --fall: .32; }
  .plane--1 { --fall: .18; }
  .plane--2 { --fall: .12; }
  .plane--3 { --fall: .07; }
  .note { --fall: -.05; }
  /* Upright, planes 2 and 3 swap places (see "Upright screens") */
  @media (max-aspect-ratio: 1/1) {
    .plane--2 { --fall: .07; }
    .plane--3 { --fall: .12; }
  }

  /* Section headings: the word rises from behind its own baseline, then
     eases sideways into line as it travels up the window. */
  .head__title {
    clip-path: inset(-.1em -.5em -.03em);
    transform: translate3d(calc((1 - var(--e, 1)) * var(--slide, 3vw)), 0, 0);
  }
  .sheet--flip .head__title { --slide: -3vw; }
  html.js .head__title > span {
    transition: translate 1.1s var(--ease) calc(var(--wait, 0s) + .05s);
  }
  html.js .head__index,
  html.js .head__meta {
    transition: opacity .7s ease var(--wait, 0s), translate .7s var(--ease) var(--wait, 0s);
  }
  html.js .head__meta { transition-delay: calc(var(--wait, 0s) + .35s); }
  html.js .head[data-reveal]:not(.is-in) {
    opacity: 1;
    translate: none;
  }
  html.js .head:not(.is-in) .head__title > span { translate: 0 110%; }
  html.js .head:not(.is-in) > .head__index,
  html.js .head:not(.is-in) > .head__meta {
    opacity: 0;
    translate: 0 .75rem;
  }

  /* Clusters: the pieces are set down one at a time, back to front */
  html.js .cluster[data-reveal]:not(.is-in) {
    opacity: 1;
    translate: none;
  }
  html.js .cluster > * {
    transition: opacity .7s ease, translate .9s var(--ease), scale .9s var(--ease), rotate .9s var(--ease);
    transition-delay: calc(var(--wait, 0s) + var(--n, 0) * 90ms);
  }
  html.js .cluster:not(.is-in) > * {
    opacity: 0;
    translate: 0 2rem;
    scale: .94;
    rotate: calc(var(--r, 0deg) - 3deg);
  }
  .cluster > :nth-child(2) { --n: 1; }
  .cluster > :nth-child(3) { --n: 2; }
  .cluster > :nth-child(4) { --n: 3; }

  /* ...then drift apart a little. The pieces whose feet are tucked under the
     next sheet (.k-desk, .k-portrait, .k-garden) stay where they are. */
  .k-booth,
  .k-block,
  .k-cover,
  .k-halo,
  .k-ident,
  .film--session,
  .film--lens { transform: translate3d(0, calc(var(--s, 0) * var(--depth) * 1rem), 0); }
  .k-booth { --depth: 1.5; }
  .k-block { --depth: .75; }
  .k-cover { --depth: -.75; }
  .k-halo { --depth: 1.75; }
  .k-ident { --depth: -1.25; }
  .film--session { --depth: 1.25; }
  .film--lens { --depth: -1.25; }
  /* Stacked, the booth print sits right under the heading's last line, so it stays put */
  @media (max-width: 900px) {
    .k-booth { --depth: 0; }
  }

  /* Photos: the back row hangs back, and the front row closes up from below
     (it never rises past its place, so its feet stay under the next sheet).
     The pile comes together as it reaches the middle of the window. */
  html.js .doll[data-reveal] {
    transition: opacity .8s ease, translate .9s var(--ease), scale .9s var(--ease);
    transition-delay: var(--wait, 0s);
  }
  html.js .doll[data-reveal]:not(.is-in) {
    translate: 0 2.5rem;
    scale: .95;
  }
  .doll { transform: translate3d(0, calc(var(--s, 0) * var(--depth, 0) * var(--k)), 0); }
  .d-booth, .d-double { --depth: 2; }
  .d-teal, .d-amber, .d-dark { --depth: 1.25; }
  .d-light, .d-desk, .d-garden, .d-hall, .d-floor, .d-portrait {
    transform: translate3d(0, calc(min(var(--s, 0), 0) * var(--depth) * var(--k)), 0);
  }
  .d-light, .d-garden, .d-portrait { --depth: -1; }
  .d-desk, .d-floor { --depth: -1.75; }
  .d-hall { --depth: -2.5; }

  /* Videos: each frame is set down square and turns to its angle, the sheet of
     paper slides out from under it, and the cut-out drops onto the top edge. */
  html.js .film[data-reveal] {
    transition: opacity .8s ease, translate .9s var(--ease), rotate 1.1s var(--ease);
    transition-delay: var(--wait, 0s);
  }
  html.js .film:not(.is-in) {
    translate: 0 2.5rem;
    rotate: 0deg;
  }
  html.js .film::before {
    transition: translate 1s var(--ease), rotate 1s var(--ease);
    transition-delay: calc(var(--wait, 0s) + .3s);
  }
  html.js .film:not(.is-in)::before {
    translate: 0 0;
    rotate: 0deg;
  }
  html.js .film__topper {
    transition: opacity .4s ease, translate .9s var(--ease);
    transition-delay: calc(var(--wait, 0s) + .55s);
  }
  html.js .film:not(.is-in) .film__topper {
    opacity: 0;
    translate: 0 -125%;
  }

  /* About: the opening line lights up word by word (--i of --n, script.js) */
  .about__lead .word {
    opacity: clamp(.22, calc(var(--e, 1) * (var(--n, 0) + 2) - var(--i, 0)), 1);
    transition: opacity .3s linear;
  }

  /* Footer: the name rises into place as the page ends */
  .foot__word { transform: translate3d(0, calc((1 - var(--e, 1)) * 40%), 0); }
}

/* --------------------------------------------------------------------------
   Upright screens (phones, tablets held upright): the hero is re-cut as a
   tall poster, 100 x 180, with the name set narrow so it stands taller.
   -------------------------------------------------------------------------- */

@media (max-aspect-ratio: 1/1) {
  .hero { --H: 180; }

  .hero__wall { grid-template: 40% 30% 30% / 1fr 1fr; }
  .w-booth { grid-area: 1 / 1; }
  .w-street { grid-area: 1 / 2; }
  .w-necklace { grid-area: 2 / 1; }
  .w-garden { grid-area: 2 / 2; }
  .w-double { grid-area: 3 / 1; }
  .w-sign { grid-area: 3 / 2; }
  .w-flat-a,
  .w-flat-b,
  .c-hall,
  .c-desk { display: none; }

  .wordmark {
    --fs: min(40vw, 40 * var(--v));
    top: max(4.6rem, var(--hh) / 2 - 43.5 * var(--v) - .69 * var(--fs));
    font-stretch: 62%;
    letter-spacing: -.01em;
  }

  /* Top: the two big faces */
  .c-portrait { --x: -21; --t: -50; --w: 66; }
  .c-amber { --x: 28; --t: -46; --w: 46; }

  /* Middle */
  .c-light { --x: -28; --t: -6; --w: 38; --z: 4; }
  .c-floor { --x: 20; --t: -14; --w: 52; --z: 4; }

  /* Bottom: the front row, running off the screen behind the label */
  .c-teal { --x: -22; --t: 12; --w: 60; --z: 5; }
  .c-dark { --x: 25; --t: 6; --w: 54; --z: 6; }

  /* ...so their plane now lies in front of the middle one */
  .plane--2 { --z: 5; }
  .plane--3 { --z: 4; }

  .note {
    left: 0;
    right: 0;
    bottom: calc(var(--lap) + 1rem);
    width: min(100% - 2rem, 24.5rem);
    margin-inline: auto;
    padding: 1rem 1.1rem 1.1rem;
    rotate: -1deg;
  }
  .note__line {
    margin: .55rem 0 .9rem;
    font-size: 1.45rem;
  }
  .note .btn {
    padding: .75em 1.15em;
    font-size: .84rem;
  }

  /* The footer's name is set narrow too */
  .foot__word {
    font-size: 40vw;
    font-stretch: 62%;
    letter-spacing: -.01em;
  }
}

/* --------------------------------------------------------------------------
   Smaller screens
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .release { grid-template-columns: minmax(0, 1fr); }
  .release { padding-bottom: var(--space); }
  .release__body { padding-block: 0; }
  /* Taller rows, and a taller strip to grab, for fingers */
  .track__play { height: 3.25rem; }
  .track__title { font-size: 1.3rem; }
  .track.is-current .track__play { padding-bottom: .7rem; }
  .track__seek { height: 1.3rem; }
  .cluster--music {
    width: min(100%, 32rem);
    margin: -1.5rem 0 6%;
  }

  .films { flex-wrap: wrap; }
  /* The session clip gets a row to itself (the margin fills the rest of the row) */
  .film--session {
    flex: 0 0 min(100%, 30rem);
    margin-right: calc(100% - min(100%, 30rem));
  }
  .film--set { flex: 1.778 1 0; margin-top: 0; }
  .film--lens { flex: .5625 1 0; margin-top: 0; }
  .film__topper { display: none; }

  .about {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 0;
  }
  .about__text { padding: 2.5rem var(--gutter) 0 0; }
  .cluster--about {
    width: min(100%, 34rem);
    margin: 1rem 0 0 auto;
  }

  .contact { grid-template-columns: minmax(0, 1fr); }
  /* Room above the form for the cut-out that leans over it */
  .contact__card {
    width: min(100%, 36rem);
    margin-top: 5.25rem;
  }
  .contact__topper { bottom: calc(100% - 3.5rem); }
}

/* Phones: the photo pile is re-cut as a tall poster, 100 x 236 */
@media (max-width: 720px) {
  .pile { height: calc(236 * var(--k)); margin-top: 2vw; }
  .d-booth { --x: -2; --y: 4; --w: 50; }
  .d-teal { --x: 40; --y: 0; --w: 62; }
  .d-light { --x: 0; --y: 38; --w: 40; }
  .d-desk { --x: 26; --y: 64; --w: 36; }
  .d-amber { --x: 54; --y: 54; --w: 48; --z: 3; }
  .d-portrait { --x: -6; --y: 98; --w: 64; --z: 2; }
  .d-double { --x: 54; --y: 112; --w: 44; --z: 1; }
  .d-dark { --x: 42; --y: 144; --w: 56; --z: 4; }
  .d-hall { --x: 25; --y: 152; --w: 24; --z: 5; }
  .d-garden { --x: -4; --y: 154; --w: 54; --z: 5; }
  .d-floor { --x: 40; --y: 179.5; --w: 60; --z: 6; }
}

@media (max-width: 640px) {
  /* The name and five links share the width of a phone, so everything closes up */
  .nav {
    gap: .6rem;
    padding: .4rem .9rem .4rem 1rem;
  }
  .nav__brand { font-size: 1rem; }
  .nav__cta { display: none; }
  .nav__links { gap: .6rem; }
  .nav__links a {
    font-size: .6rem;
    letter-spacing: .04em;
  }
  .foot__links a {
    font-size: .66rem;
    letter-spacing: .1em;
  }

  .head { grid-template-columns: minmax(0, 1fr); }
  .head__title {
    font-size: 18.5vw;
    font-stretch: 100%;
  }
  .head__title--long { font-size: 15.8vw; }
  .head__meta {
    max-width: none;
    text-align: left;
  }

  .films { gap: 2.5rem 1.5rem; }
  .film--set { flex: 1 1 100%; }
  .film--lens { flex: 0 1 62%; }

  .foot__row {
    flex-direction: column;
    align-items: flex-start;
  }
  .foot__row::before { align-self: stretch; flex-basis: auto; }
  .foot { padding-bottom: 4.75rem; } /* the stacked rows end above the floating player */

  /* The floating player is only its button until a song has been picked. At
     the top of the page it would sit on the hero's buttons, so there it waits
     out of sight, or stays as small as it can if a song is already loaded. */
  .dock:not(.is-loaded),
  .dock.is-over-hero { padding-right: .3rem; }
  .dock:not(.is-loaded) .dock__text,
  .dock.is-over-hero .dock__text { display: none; }
  .dock.is-over-hero:not(.is-loaded) {
    opacity: 0;
    visibility: hidden;
    translate: 0 .5rem;
  }
  .dock__title { max-width: 8rem; }

  .viewer { padding: .75rem; }
  .viewer__img {
    max-width: 100%;
    max-height: calc(100dvh - 12rem);
  }
  .viewer__prev,
  .viewer__next { top: auto; bottom: 1rem; }
  .viewer__prev { left: calc(50% - 3.75rem); }
  .viewer__next { right: calc(50% - 3.75rem); }
}

/* Small phones: the bar closes up once more */
@media (max-width: 370px) {
  .nav {
    gap: .55rem;
    padding: .4rem .85rem .4rem .95rem;
  }
  .nav__brand { font-size: .95rem; }
  .nav__links { gap: .5rem; }
  .nav__links a {
    font-size: .58rem;
    letter-spacing: .03em;
  }
}

/* The very narrowest: About gives up its place in the bar (it is still in the footer) */
@media (max-width: 346px) {
  .nav__links a[href="#about"] { display: none; }
}

/* --------------------------------------------------------------------------
   Reduced motion: everything is simply there
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }

  html.js [data-reveal]:not(.is-in) {
    opacity: 1;
    translate: none;
  }
}
