/*
 * Lento. One system with the app: paper and ink, one geometric typeface (Jost), the footage as the only
 * colour. Soft shapes throughout: frames 28 to 32px, cards 24px, actions are pills.
 * Motion is scroll-led and slow; with "reduce motion" every scene lays itself out still.
 * Layers: page 0, floating still 5, bar 10, cursor 15, intro 30, dialog (top layer).
 */
@font-face { font-family: "Jost"; src: url("fonts/Jost-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap }

:root {
  color-scheme: light; interpolate-size: allow-keywords;
  --paper: #f4f4f1; --soft: #eaeae5; --ink: #111311; --grey: #565a52; --hair: #dcddd7; --veil: rgba(244, 244, 241, .7);
  --ease: cubic-bezier(.16, 1, .3, 1); --pad: clamp(1.25rem, calc(4 * var(--vw)), 3.5rem); --frame: 2rem; --bar: clamp(1rem, calc(2 * var(--vw)), 2rem);
  /* Spacing is on a 4px grid: 4, 8, 12, 16, 24, 32, 48, 64, 96 and up. A fluid vw stops growing at 1440 and then follows the root. */
  --vw: min(1vw, .9rem);
  --edge: max(var(--pad), (100vw - 90rem) / 2);
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --paper: #0b0c0b; --soft: #161815; --ink: #ecece6; --grey: #a4a89f; --hair: #262823; --veil: rgba(11, 12, 11, .66) }
}

* { box-sizing: border-box; margin: 0 }
/* Above 1440 × 900 the whole page grows with the screen: every size is in rem, and the root grows
   with the window, so a big monitor sees the same composition as a laptop, only larger. */
html { font-size: max(100%, min(100vw / 90, 100svh / 56.25)); background: var(--paper); color: var(--ink); font-family: "Jost", -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-padding-top: 7rem }
body { font-size: 1.125rem; line-height: 1.5 }
body { overflow-x: clip }
a { color: inherit; text-decoration: none }
img, video { display: block; max-width: 100% }
ol, ul { list-style: none; padding: 0 }
h1, h2, h3 { font-weight: 600; letter-spacing: -.03em; line-height: 1 }
::selection { background: var(--ink); color: var(--paper) }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: .25rem; border-radius: .75rem }
.wrap { width: min(90rem, 100% - var(--pad) * 2); margin-inline: auto }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 20; background: var(--ink); color: var(--paper); padding: .75rem 1.25rem; border-radius: 999px }
.skip:focus { top: .75rem }
h2 { font-size: clamp(2.875rem, calc(7 * var(--vw)), 7.75rem); letter-spacing: -.04em; line-height: .92 }
.sub { color: var(--grey); font-size: clamp(1.125rem, calc(1.45 * var(--vw)), 1.375rem); line-height: 1.45; max-width: 36ch }

/* Actions: pills in ink, quiet links with a line that draws itself. */
.pill { display: inline-flex; align-items: center; justify-content: center; height: 3.5rem; padding: 0 2rem; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 1rem; white-space: nowrap; transition: transform .6s var(--ease), opacity .3s; will-change: transform }
.pill:hover { opacity: .9 }
.pill.small { height: 3rem; padding: 0 1.5rem; font-size: .9375rem }
.pill.large { height: 4.5rem; padding: 0 3rem; font-size: 1.1875rem }
.link { color: var(--grey); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 2px; transition: color .3s, background-size .6s var(--ease) }
.link:hover { color: var(--ink); background-size: 100% 1px }

/* Bar: name, a glass pill of sections, one download. */
.bar { position: fixed; inset: var(--bar) var(--edge) auto; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; pointer-events: none }
.bar > * { pointer-events: auto }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 1.0625rem; line-height: 1.5rem; letter-spacing: -.01em; justify-self: start;
  padding: .75rem 1rem .75rem .75rem; margin-left: -.75rem; border-radius: 999px; transition: background-color .4s }
.brand i { width: .875rem; height: 1.25rem; flex: none; border-radius: .3125rem; background: var(--ink); position: relative }
.brand i::after { content: ""; position: absolute; inset: 0; margin: auto; width: .3125rem; height: .3125rem; border-radius: 50%; background: var(--paper) }
.links { display: flex; gap: .25rem; padding: .25rem; border-radius: 999px; background: var(--veil); box-shadow: inset 0 0 0 1px var(--hair);
  -webkit-backdrop-filter: blur(1.25rem) saturate(1.3); backdrop-filter: blur(1.25rem) saturate(1.3) }
.links a { padding: .5rem 1.25rem; line-height: 1.5rem; border-radius: 999px; font-size: .9375rem; font-weight: 500; color: var(--grey); transition: color .3s, background-color .3s }
.links a:hover, .links a.on { color: var(--ink); background: var(--soft) }
.bar-end { justify-self: end; display: flex; align-items: center; gap: .5rem }
/* The language switch: a glass circle beside the download, the same height as everything in the bar. */
.lang { display: inline-grid; place-items: center; min-width: 3rem; height: 3rem; padding: 0 1rem; border-radius: 999px; font-size: .9375rem; font-weight: 600;
  background: var(--veil); box-shadow: inset 0 0 0 1px var(--hair); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); transition: background-color .3s }
.lang:hover { background: var(--soft) }
.bar.moved .brand { background: var(--veil); -webkit-backdrop-filter: blur(1.25rem); backdrop-filter: blur(1.25rem) }

/* Hero. The stage stays while the frame grows from its slot to the whole screen. */
.hero { position: relative; height: 250vh }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden }
/* The words take everything left of the card. */
.hero-copy { position: absolute; left: var(--edge); bottom: clamp(2.5rem, 7vh, 5rem); width: calc(100vw - var(--edge) * 2 - var(--pad) - min((100svh - 10.75rem) * 9 / 16, 40vw)); will-change: transform, opacity }
h1 { font-size: clamp(3.875rem, calc(8.4 * var(--vw)), 10.5rem); line-height: .88; letter-spacing: -.045em; margin: 1.5rem 0 2rem }
.mask { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em }
.mask > span { display: block }
.lead { font-size: clamp(1.1875rem, calc(1.6 * var(--vw)), 1.5rem); color: var(--grey); max-width: 30ch; line-height: 1.4 }
.cta { display: flex; align-items: center; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap }
.slot { position: absolute; right: var(--edge); bottom: clamp(2.5rem, 7vh, 5rem); height: calc(100svh - 10.75rem); aspect-ratio: 9 / 16; max-width: 40vw; pointer-events: none }
/* Without scripts the frame simply sits in its slot. With them it covers the stage and is cut to the
   visible window by a clip, so growing it never triggers layout; the video is moved and scaled. */
.hero-frame { position: absolute; right: var(--edge); bottom: clamp(2.5rem, 7vh, 5rem); height: calc(100svh - 10.75rem); aspect-ratio: 9 / 16; max-width: 40vw;
  border-radius: var(--frame); overflow: hidden; background: var(--soft) }
.js .hero-frame { inset: 0; height: auto; max-width: none; aspect-ratio: auto; border-radius: 0; background: transparent; clip-path: inset(100% 0 0 0) }
.hero-frame video { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; will-change: transform; background: var(--soft) }
/* The sharp film lies over the light one and fades in once it plays the same frame. */
.hero-sharp { position: absolute; inset: 0; opacity: 0; transition: opacity .6s linear; background: none }
.hero-sharp.on { opacity: 1 }
.hero-frame::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, rgba(0, 0, 0, .42)); pointer-events: none }
.say { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; z-index: 1;
  font-size: clamp(3rem, calc(8 * var(--vw)), 9.375rem); font-weight: 600; letter-spacing: -.045em; line-height: .9; opacity: 0; text-shadow: 0 2px 2.5rem rgba(0, 0, 0, .25); pointer-events: none }
.now { position: absolute; left: 1.5rem; bottom: 2.25rem; width: max-content; max-width: 18.75rem; will-change: transform; z-index: 1; color: #fff; display: grid; grid-template-columns: auto 1fr; column-gap: .75rem; font-size: .875rem; line-height: 1.4 }
.count { grid-row: span 2; opacity: .7; font-variant-numeric: tabular-nums }
.now-date { font-weight: 600; font-size: .9375rem }
.now-text { opacity: .8 }
.ticks { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.25rem; z-index: 1; transform-origin: 0 50%; will-change: transform; display: grid; grid-template-columns: repeat(12, 1fr); gap: .25rem }
.ticks i { height: .25rem; border-radius: .25rem; background: rgba(255, 255, 255, .28); transition: background-color .5s }
.ticks i.past { background: rgba(255, 255, 255, .6) }
.ticks i.on { background: #fff }
.pause { position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(10, 11, 10, .28); -webkit-backdrop-filter: blur(.75rem); backdrop-filter: blur(.75rem); opacity: 0; transition: opacity .3s }
/* With a mouse the cursor itself says «Пауза» / «Играть», so the button only shows for the keyboard and on touch screens. */
.pause:focus-visible { opacity: 1 }
@media (hover: none), (pointer: coarse) { .pause[aria-pressed="true"] { opacity: 1 } }
.pause span { position: absolute; inset: 0; margin: auto; width: .6875rem; height: .8125rem; border-inline: .2188rem solid #fff; border-radius: 1px }
.pause[aria-pressed="true"] span { width: 0; height: 0; border: 0; border-left: .6875rem solid #fff; border-block: .4375rem solid transparent; margin-left: .9375rem }
.hint { position: absolute; left: 50%; bottom: 1.5rem; translate: -50% 0; font-size: .75rem; color: var(--grey); letter-spacing: .04em }
.hint::after { content: ""; display: block; width: 1px; height: 2rem; margin: .5rem auto 0; background: linear-gradient(var(--grey), transparent); animation: drip 2.2s var(--ease) infinite }
@keyframes drip { from { transform: scaleY(0); transform-origin: top } 50% { transform: scaleY(1); transform-origin: top } 51% { transform-origin: bottom } to { transform: scaleY(0); transform-origin: bottom } }

/* Manifest: the words light up as they are read. */
.manifest { padding-block: clamp(7.5rem, calc(18 * var(--vw)), 16.25rem) }
.words { font-size: clamp(2.5rem, calc(6 * var(--vw)), 6.5rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; max-width: 18ch }
.js .words .w { opacity: .14 }

/* Year: a sticky stage, the months travel across it. */
.year { position: relative }
.year-stage { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; row-gap: 1.5rem; padding-block: 6rem 2rem; overflow: hidden }
.year-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem }
.month { font-size: clamp(3.75rem, calc(9 * var(--vw)), 10rem); font-weight: 600; letter-spacing: -.045em; line-height: .8; font-variant-numeric: tabular-nums }
.month-of { color: var(--hair) }
.track { display: flex; gap: clamp(1rem, calc(1.6 * var(--vw)), 1.5rem); align-items: center; justify-self: start; padding-inline: var(--edge); will-change: transform; width: max-content }
.track li { flex: none; width: var(--tile, clamp(11.25rem, calc((100svh - 22.5rem) * 9 / 16), 22.5rem)) }
.track figure { transition: transform 1s var(--ease), opacity 1s var(--ease) }
.track video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 1.75rem; background: var(--soft); transition: filter 1s var(--ease) }
.track figcaption { margin-top: 1rem; font-size: 1rem; line-height: 1.35; padding-left: .25rem }
.track b { display: block; font-weight: 600 }
.track figcaption span { color: var(--grey) }
.js .track li:not(.on) figure { transform: scale(.94); opacity: .55 }
.js .track li:not(.on) video { filter: grayscale(1) }
.rail { height: .25rem; border-radius: .25rem; background: var(--hair); overflow: hidden }
.rail i { display: block; height: 100%; width: 100%; border-radius: .25rem; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)) }

/* Marquee: the year's phrases drift by. */
.marquee { overflow: hidden; padding-block: clamp(4rem, calc(9 * var(--vw)), 7.5rem); border-block: 1px solid var(--hair) }
.run { display: flex; width: max-content; animation: run 60s linear infinite }
.run span { font-size: clamp(3.5rem, calc(9 * var(--vw)), 10rem); font-weight: 600; letter-spacing: -.045em; white-space: nowrap; padding-inline: .45em; display: flex; align-items: center; gap: .9em }
.run span::after { content: ""; width: .22em; height: .22em; border-radius: 50%; background: var(--ink); opacity: .25 }
.marquee:hover .run, .marquee.off .run { animation-play-state: paused }
@keyframes run { to { transform: translateX(-50%) } }

/* Film: a running tally beside the year film in a plain rounded frame. */
.section { padding-block: clamp(7.5rem, calc(14 * var(--vw)), 13.75rem) 0 }
.film-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2.5rem, calc(8 * var(--vw)), 10rem); align-items: center }
.film-text h2 { max-width: 17ch; font-size: clamp(2.75rem, calc(5.6 * var(--vw)), 6.25rem); text-wrap: balance; margin-bottom: 2rem }
.big { margin-top: clamp(3rem, calc(6 * var(--vw)), 5.5rem); display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap }
.tally { font-size: clamp(6.875rem, calc(16 * var(--vw)), 17.5rem); font-weight: 600; letter-spacing: -.055em; line-height: .8; font-variant-numeric: tabular-nums }
.unit { color: var(--grey); font-size: 1.25rem; font-weight: 500 }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem }
.chips li { padding: .75rem 1.5rem; line-height: 1.5rem; border-radius: 999px; background: var(--soft); font-size: 1rem; color: var(--grey) }
.chips b { color: var(--ink); font-weight: 600; margin-right: .5rem }
/* The frame leans toward the pointer, like a print held in the hand. */
.film-media { justify-self: end; perspective: 75rem }
/* A soft mat hugs the frame: a wide faint band and a hairline at its edge. While the year assembles,
   --hug carries it in from wide and clear to its place. */
.film-frame { --hug: 1; --mat: calc(.75rem + (1 - var(--hug)) * 3rem);
  width: min(28.75rem, 80vw, calc((100svh - 8rem) * 9 / 16)); aspect-ratio: 9 / 16; border-radius: var(--frame); overflow: hidden; background: var(--soft);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .9s var(--ease); will-change: transform;
  box-shadow: 0 0 0 var(--mat) color-mix(in srgb, var(--ink) calc(var(--hug) * var(--hug) * 5%), transparent),
    0 0 0 calc(var(--mat) + 1px) color-mix(in srgb, var(--ink) calc(var(--hug) * 12%), transparent),
    0 3.125rem 6.25rem -3.125rem rgba(0, 0, 0, calc(var(--hug) * .45)) }
.film-frame video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit }

/* Assembly (wide screens with motion): the film section holds still while the year assembles itself
   behind it. Without it, as on a phone or with less motion, the section is the plain text and frame. */
.assembly, .assembly-say { display: none }
.film.assembling { height: 440vh; padding-block: 0 }
/* The mosaic is drawn under the frame: the frame stays clear and still until the film takes over. */
.assembling .film-stage { padding-top: 3rem }
.assembling .film-frame { width: min(28.75rem, calc((100svh - 12rem) * 9 / 16)); background: transparent }
.assembling:not(.revealed) .film-frame { transform: none }
.assembling:not(.revealed) .film-frame video { opacity: 0 }
.assembling .film-stage { position: sticky; top: 0; height: 100svh; display: grid; align-content: center; overflow: hidden }
.assembling .film-grid { position: relative; z-index: 1 }
.assembling .assembly { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none }
.assembling .assembly-say { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: .75rem; position: absolute; z-index: 2;
  left: var(--edge); bottom: clamp(2rem, calc(5 * var(--vw)), 4rem); pointer-events: none }
.assembly-count { font-size: clamp(4rem, calc(7 * var(--vw)), 7.5rem); font-weight: 600; letter-spacing: -.05em; line-height: .8; font-variant-numeric: tabular-nums }
.assembly-of { color: var(--grey); font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums }
.assembly-lines { grid-column: 1 / -1; display: grid; margin-top: 1rem; font-size: 1.25rem; color: var(--grey) }
.assembly-lines span { grid-area: 1 / 1; opacity: 0; transform: translateY(.75rem); transition: opacity .6s var(--ease), transform .8s var(--ease) }
.assembly-lines span.on { opacity: 1; transform: none }

/* App: the stack fans out into a row while the stage holds still. */
.app { position: relative; height: 260vh; margin-top: clamp(7.5rem, calc(14 * var(--vw)), 13.75rem) }
.app-stage { position: sticky; top: 0; height: 100svh; display: grid; grid-template-rows: auto minmax(0, 1fr); row-gap: 1.5rem; padding-block: 6rem 1.5rem; overflow: hidden }
/* The pinned scenes keep their titles on one line, so the frames below get the height. */
.year h2, .app h2 { font-size: clamp(2.75rem, calc(5.6 * var(--vw)), 6.25rem) }
.year h2, .app h2 { white-space: nowrap }
.app .head { grid-template-columns: max-content minmax(0, 1fr) }
.head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 3rem; align-items: end }
.head .sub { justify-self: end }
.screens { position: relative; --w: min(17.5rem, (100vw - 12.5rem) / 4, (100svh - 25rem) / 2.22); --gap: clamp(1rem, calc(2 * var(--vw)), 2rem); --e: 0 }
.screens li { will-change: transform; position: absolute; left: 50%; top: 50%; width: var(--w); translate: -50% -50%;
  transform: translateX(calc((var(--i) - 1.5) * (var(--w) + var(--gap)) * var(--e))) translateY(calc((1 - var(--e)) * var(--i) * .5rem)) rotate(calc(var(--r) * (1 - var(--e)))) scale(calc(.88 + .12 * var(--e))) }
.screens img { width: 100%; height: auto; border-radius: 2rem; box-shadow: 0 0 0 1px var(--hair), 0 1.875rem 3.75rem -1.875rem rgba(0, 0, 0, .3) }
.screens h3, .screens p { opacity: clamp(0, (var(--e) - .75) * 4, 1) }
.screens h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.01em; margin-top: 1rem }
.screens h3 span, .rows .y { font-variant-numeric: tabular-nums }
.screens h3 span { color: var(--grey); font-weight: 400; margin-right: .5rem }
.screens p { color: var(--grey); font-size: .9375rem; margin-top: .5rem }

/* Real films: index rows; a still follows the pointer, the film opens in a window. */
.author .head { margin-bottom: clamp(3rem, calc(6 * var(--vw)), 5.5rem) }
.rows { border-bottom: 1px solid var(--hair) }
.rows a { display: grid; grid-template-columns: minmax(7.5rem, 1fr) minmax(0, 2.2fr) minmax(0, 1fr) auto; align-items: center; gap: 1.5rem;
  padding: clamp(1.5rem, calc(3 * var(--vw)), 2.5rem) 0; border-top: 1px solid var(--hair); transition: padding .6s var(--ease), color .4s }
.rows .y { font-size: clamp(3.25rem, calc(7 * var(--vw)), 7.5rem); font-weight: 600; letter-spacing: -.045em; line-height: .9 }
.rows .t { font-size: clamp(1.1875rem, calc(1.8 * var(--vw)), 1.625rem); font-weight: 500; letter-spacing: -.01em }
.rows .d { color: var(--grey); font-size: .875rem }
.rows .go { padding: .75rem 1.25rem; line-height: 1.5rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hair); font-size: .9375rem; font-weight: 600; transition: background-color .4s, color .4s, box-shadow .4s }
.rows a:hover .go { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1px var(--ink) }
.rows a:hover { padding-inline: 1rem }
.rows img { display: none }
.rows:hover a:not(:hover) { color: var(--grey) }
.float { position: fixed; left: 0; top: 0; z-index: 5; width: 30rem; aspect-ratio: 16 / 9; border-radius: 1.5rem; overflow: hidden; pointer-events: none;
  opacity: 0; scale: .8; transition: opacity .4s, scale .6s var(--ease); box-shadow: 0 1.875rem 3.75rem -1.875rem rgba(0, 0, 0, .4) }
.float.on { opacity: 1; scale: 1 }
.float img { width: 100%; height: 100%; object-fit: cover }
.course { margin-top: 2.5rem; font-size: .9375rem }
.player { padding: 0; border: 0; background: transparent; width: min(75rem, 92vw); max-width: none; max-height: none; overflow: visible; margin: auto }
.player::backdrop { background: rgba(8, 9, 8, .82); -webkit-backdrop-filter: blur(.625rem); backdrop-filter: blur(.625rem) }
.player[open] { animation: rise .7s var(--ease) }
.player-box { position: relative; aspect-ratio: 16 / 9; border-radius: 1.75rem; background: #000 }
.player iframe { width: 100%; height: 100%; border: 0; border-radius: 1.75rem }
.close { position: absolute; top: -4rem; right: 0; width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: #f4f4f1; cursor: pointer }
.close::before, .close::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1rem; height: 1.5px; background: #111311; rotate: 45deg }
.close::after { rotate: -45deg }
@keyframes rise { from { opacity: 0; transform: translateY(1.875rem) scale(.97) } }

/* Questions: soft cards that open smoothly. */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 3rem; align-items: start }
.qa { display: grid; gap: .5rem }
details { border-radius: 1.5rem; background: var(--soft); padding: 0 2rem }
summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.5rem 0; font-size: 1.3125rem; font-weight: 500; letter-spacing: -.01em; cursor: pointer }
summary::-webkit-details-marker { display: none }
summary::after { content: ""; flex: none; width: 2rem; height: 2rem; border-radius: 50%; background:
  linear-gradient(currentColor, currentColor) center / .75rem 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px .75rem no-repeat, var(--paper);
  transition: transform .6s var(--ease) }
details[open] summary::after { transform: rotate(135deg) }
details::details-content { block-size: 0; overflow: clip; transition: block-size .6s var(--ease), content-visibility .6s allow-discrete }
details[open]::details-content { block-size: auto }
details p { color: var(--grey); max-width: 58ch; padding-bottom: 1.5rem }

/* Sections far below the fold are rendered only when they come near. */
.faq, .last { content-visibility: auto; contain-intrinsic-size: auto 56.25rem }
.foot { content-visibility: auto; contain-intrinsic-size: auto 26.25rem }

/* Last word and the name, large, at the very bottom. */
.last { padding-block: clamp(10rem, calc(22 * var(--vw)), 20rem); text-align: center }
.last h2 { font-size: clamp(3.5rem, calc(10 * var(--vw)), 11.875rem); letter-spacing: -.05em; line-height: .88; margin-bottom: 3.5rem }
.note { color: var(--grey); font-size: .875rem; margin-top: 1.25rem }
.foot { overflow: hidden; border-top: 1px solid var(--hair) }
.foot-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.5rem; color: var(--grey); font-size: .875rem }
.mark { font-size: 15.2vw; font-weight: 700; letter-spacing: -.05em; line-height: .78; text-align: center; white-space: nowrap; margin-bottom: -.04em; padding-top: 2vw }

/* Cursor: appears over films and frames with a word inside. */
.cursor { position: fixed; left: 0; top: 0; z-index: 15; pointer-events: none; width: 6rem; height: 6rem; margin: -3rem 0 0 -3rem; border-radius: 50%;
  background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: .9375rem; font-weight: 600; scale: 0; transition: scale .5s var(--ease) }
.cursor.on { scale: 1 }
@media (hover: none), (pointer: coarse) { .cursor, .float { display: none } }

/* Intro: a year counts itself in, then the curtain lifts. */
.intro { position: fixed; inset: 0; z-index: 30; background: var(--ink); color: var(--paper); display: grid; place-items: center; border-radius: 0 0 3rem 3rem;
  transition: transform 1.1s var(--ease) }
.intro.gone { transform: translateY(-104%) }
.intro p { text-align: center; font-size: .875rem; color: color-mix(in srgb, var(--paper) 60%, transparent) }
.intro b { display: block; font-size: clamp(6.25rem, calc(18 * var(--vw)), 18.75rem); font-weight: 600; letter-spacing: -.055em; line-height: .9; color: var(--paper); font-variant-numeric: tabular-nums; margin-bottom: .75rem }

/* Arrival and reveals. */
.js [data-rise] { opacity: 0; transform: translateY(2.5rem) }
.js .mask > [data-rise] { opacity: 1; transform: translateY(105%) }
.js.ready [data-rise] { opacity: 1; transform: none; transition: opacity 1.2s var(--ease), transform 1.5s var(--ease); transition-delay: calc(var(--i, 0) * 90ms) }
.js [data-reveal] { opacity: 0; transform: translateY(3rem); transition: opacity 1.2s var(--ease), transform 1.5s var(--ease) }
.js [data-reveal].in { opacity: 1; transform: none }

@media (max-width: 1100px) {
  .rows a { grid-template-columns: 6.25rem minmax(0, 1fr) auto }
  .rows .d { display: none }
}
/* Phones: no pinned stages. The frame sits under the words, the year and the screens swipe. */
@media (max-width: 820px) {
  .links { display: none }
  h1 { font-size: clamp(3.125rem, calc(14.5 * var(--vw)), 5.25rem) }
  h2 { font-size: clamp(2.625rem, calc(11.5 * var(--vw)), 4rem) }
  .words { font-size: clamp(2.25rem, calc(10 * var(--vw)), 3.5rem) }
  .bar { grid-template-columns: 1fr auto }
  .hero { height: auto }
  .stage { position: relative; height: auto; overflow: visible; padding: 8rem var(--pad) 0 }
  .hero-copy { position: static; width: auto }
  .slot, .hint, .say { display: none }
  .hero-frame, .js .hero-frame { position: relative; inset: auto; width: 100%; height: auto; max-width: none; aspect-ratio: 4 / 5; margin-top: 3rem; border-radius: 1.75rem; clip-path: none; background: var(--soft) }
  .hero-frame video { will-change: auto }
  .now, .ticks { will-change: auto }
  .screens li { will-change: auto }
  .year-stage { position: relative; height: auto; padding-block: 0; grid-template-rows: auto auto }
  .year-head { margin-bottom: 2rem }
  .month { display: none }
  .track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: .25rem; transform: none !important }
  .track::-webkit-scrollbar { display: none }
  .track li { width: 78vw; scroll-snap-align: center }
  .rail { display: none }
  .film-grid, .faq-grid, .head { grid-template-columns: 1fr }
  .app .head { grid-template-columns: 1fr }
  .year h2, .app h2 { white-space: normal }
  .head .sub { justify-self: start; margin-top: 1.25rem }
  /* On a phone the film comes right under its headline, before the words about it. */
  .film-grid { gap: 0 }
  .film-text { display: contents }
  .film-text > * { order: 2 }
  .film-text > h2 { order: 0 }
  .film-media { order: 1; justify-self: stretch; margin-bottom: 2.5rem }
  .film-frame { width: 100%; border-radius: 1.75rem }
  .app { height: auto }
  .app-stage { position: relative; height: auto; padding-block: 0; display: block }
  .screens { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2.5rem var(--pad) .5rem; --e: 1 !important }
  .screens::-webkit-scrollbar { display: none }
  .screens li { position: static; flex: 0 0 76vw; translate: none; transform: none; scroll-snap-align: center }
  .rows a { grid-template-columns: 1fr auto; row-gap: 1rem }
  .rows .t { grid-column: 1 / -1; grid-row: 2 }
  .rows img { display: block; grid-column: 1 / -1; width: 100%; border-radius: 1.25rem }
  details { padding: 0 1.25rem }
}
@media (prefers-reduced-motion: reduce) {
  .hero, .app { height: auto }
  .stage, .app-stage { position: relative; height: auto; min-height: 100svh }
  .run { animation: none }
  .hint::after { animation: none }
  .js [data-rise], .js .mask > [data-rise], .js [data-reveal] { opacity: 1; transform: none; transition: none }
  .js .words .w { opacity: 1 }
  .screens { --e: 1 !important }
  .film-frame, .track figure, .track video { transition: none }
}

/* With less motion the year is a row to swipe, like on a phone. */
.calm .year { height: auto !important }
.calm .year-stage { position: relative; height: auto; padding-block: 0; grid-template-rows: auto auto }
.calm .year-head { margin-bottom: 2rem }
.calm .track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; transform: none !important }
.calm .track li { scroll-snap-align: start }
.calm .track li:not(.on) figure { transform: none; opacity: 1 }
.calm .track li:not(.on) video { filter: none }
.calm .rail, .calm .month { display: none }

/* Jost has no arrows: small drawn ones follow outward and upward links. */
.ext, .up { display: inline-block; width: .62em; height: .62em; margin-left: .3em; background: currentColor; vertical-align: .05em;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat }
.ext { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 8 8 2M3.2 2H8v4.8' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") }
.up { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 9V1.5M1.8 4.6 5 1.4l3.2 3.2' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") }
