/* Self-hosted fonts: no third-party stylesheet or font requests. */
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-Variable.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face {
  font-family: "Noto Sans JP";
  src: url("../fonts/NotoSansJP-latin-ext.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Noto Sans JP";
  src: url("../fonts/NotoSansJP-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─────────────────────────────────────────────────────────────
   Arink Visuals — one system across every page.

   Black and white so the work is the only thing with colour,
   plus one orange spent on the mark and on links.
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: "English Towne";
  src: url("../fonts/EnglishTowne.woff2") format("woff2"),
       url("../fonts/EnglishTowne.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #0d0d0d;
  --accent: #e24a16;
  --rule: rgba(13, 13, 13, 0.16);
  --hairline: rgba(13, 13, 13, 0.12);
  --toolbar-top: #fafafa;
  --toolbar-bottom: #e6e6e6;
  --muted: rgba(13, 13, 13, 0.56);
  --tint: rgba(13, 13, 13, 0.04);

  --font-display: "English Towne", "Trebuchet MS", Georgia, serif;
  --font-sans: "Noto Sans JP", "MS PGothic", Osaka, Arial, sans-serif;
  --font-ui: var(--font-sans);
  --font-mono: var(--font-sans);

  /* One spacing scale. Every gap on the site is a step on it. */
  --s1: 0.5rem;
  --s2: 0.875rem;
  --s3: 1.25rem;
  --s4: 2rem;
  --s5: 3rem;
  --s6: clamp(3.5rem, 8vw, 5.5rem);
  --s7: clamp(5rem, 12vw, 8rem);

  --radius: 14px;
  --radius-sm: 9px;

  --gutter: clamp(0.75rem, 3.2vw, 2.25rem);
  --measure: 880px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-toggle: cubic-bezier(0.4, 0, 0.2, 1);
  /* Theme wipe: speed at the start, a long settle at the end. */
  --ease-wipe: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --fg: #f4f4f1;
  --accent: #ff7a47;
  --rule: rgba(244, 244, 241, 0.2);
  --hairline: rgba(244, 244, 241, 0.14);
  --toolbar-top: #292929;
  --toolbar-bottom: #191919;
  --muted: rgba(244, 244, 241, 0.58);
  --tint: rgba(244, 244, 241, 0.05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: color 0.25s ease;
}

/* Theme snapshots animate only the content; both snapshots have white margins. */
.vt-supported body { transition: none; }

::selection { background: var(--accent); color: #fff; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

img, video { max-width: 100%; }

.shell {
  width: 90%;
  max-width: var(--measure);
  min-height: 100svh;
  margin: 0 auto;
  padding: 1rem var(--gutter) 0;
  border-inline: 1px solid var(--hairline);
  background: var(--bg);
}

/* A small signature in the white margin, independent of the site's colour mode. */
.bay-village {
  position: fixed;
  z-index: 1;
  top: clamp(72px, 14vh, 144px);
  left: calc((100vw - var(--measure)) / 4);
  width: clamp(100px, calc((100vw - var(--measure)) / 2 - 32px), 180px);
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  color: #0d0d0d;
}
.bay-village img { display: block; width: 100%; height: auto; }
.bay-village figcaption {
  margin-top: 6px;
  font: 400 18px/1.15 "Times New Roman", Times, serif;
  white-space: nowrap;
}
.bay-village__copyright {
  display: block;
  margin-bottom: 3px;
  font-size: 16px;
}
@media (max-width: 1199px) {
  .bay-village { display: none; }
}

/* ── Shared type ──────────────────────────────────────────── */

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.eyebrow--dim { color: var(--muted); }

.page-title {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.page-note {
  max-width: 46ch;
  margin: var(--s3) 0 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
}

.page-head { padding: var(--s5) 0 var(--s6); }

.section { padding-bottom: var(--s6); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  justify-content: space-between;
  align-items: baseline;
  padding: var(--s3) 0 var(--s4);
  border-top: 1px solid var(--rule);
}

/* ── Top bar ──────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
}
.shell .masthead .mark { padding: 0; text-align: left; flex: none; }
.shell .masthead .mark__word { font-size: clamp(1.6rem, 3vw, 2.2rem); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 0 auto;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: linear-gradient(var(--toolbar-top), var(--toolbar-bottom));
  box-shadow: inset 0 1px 0 var(--bg), 0 1px 1px var(--tint);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 0;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 30px;
  padding: 0.35rem 0.75rem;
  border-right: 1px solid var(--rule);
  font: 500 11px/1 var(--font-ui);
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  text-shadow: 0 1px var(--bg);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav__icon {
  width: 14px;
  height: 14px;
  flex: none;
  fill: currentColor;
}

.nav a:hover { color: var(--fg); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--fg); background: var(--tint); box-shadow: inset 0 1px 2px var(--rule); }

/* ── Theme toggle ─────────────────────────────────────────── */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 30px;
  padding: 0 0.6rem;
  border: 0;
  border-right: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  flex: none;
  transition: border-color 0.3s ease;
}

.theme-toggle:hover { background: var(--tint); }

/* Everything in the icon moves on one curve over one duration, so the
   sun and the moon read as a single object turning over. */
.theme-toggle__icon,
.theme-toggle__disc,
.theme-toggle__bite,
.theme-toggle__rays line {
  transition: transform 0.5s var(--ease-toggle);
  transform-origin: 12px 12px;
}

.theme-toggle__icon {
  width: 16px;
  height: 16px;
  overflow: visible;
  flex: none;
}

.theme-toggle__disc { fill: var(--fg); }

/* Parked outside the disc in sun state, so nothing is bitten out of it. */
.theme-toggle__bite { transform: translate(9px, -9px); }

.theme-toggle__rays line {
  stroke: var(--fg);
  stroke-width: 1.8;
  stroke-linecap: round;
  transition: transform 0.5s var(--ease-toggle), opacity 0.3s var(--ease-toggle);
}

[data-theme="dark"] .theme-toggle__icon { transform: rotate(-40deg); }
[data-theme="dark"] .theme-toggle__disc { transform: scale(1.75); }
[data-theme="dark"] .theme-toggle__bite { transform: translate(0, 0); }
[data-theme="dark"] .theme-toggle__rays line { transform: scale(0.3); opacity: 0; }

.theme-toggle__label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: none;
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: max-width 0.45s var(--ease-out), opacity 0.3s ease;
}

.theme-toggle__label::after { content: attr(data-label-light); }
[data-theme="dark"] .theme-toggle__label::after { content: attr(data-label-dark); }

.theme-toggle:hover .theme-toggle__label,
.theme-toggle:focus-visible .theme-toggle__label {
  max-width: 0;
}

/* ── Wordmark ─────────────────────────────────────────────── */

/* A small neon wordmark with a warm, diffuse halation. */
.mark {
  text-align: center;
  padding: 1.125rem 0;
}
.mark__word {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.86vw, 3.33rem);
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}
.mark__link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  text-shadow: 0 0 2px color-mix(in srgb, var(--accent) 65%, transparent),
               0 0 9px color-mix(in srgb, var(--accent) 38%, transparent),
               0 0 24px color-mix(in srgb, var(--accent) 22%, transparent);
}
.is-ready .mark__link { animation: neon-flicker 4.8s linear both; }
@keyframes neon-flicker {
  0%, 12%, 22%, 39%, 49%, 100% { opacity: 1; }
  13%, 18% { opacity: 0.48; }
  40%, 45% { opacity: 0.68; }
}
@media (prefers-reduced-motion: reduce) {
  .is-ready .mark__link { animation: none; }
}

.lede {
  max-width: 34ch;
  margin: var(--s3) auto 0;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 300;
  line-height: 1.32;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.lede .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  filter: blur(8px);
}

.is-ready .lede .w {
  animation: wordIn 1s var(--ease-out) forwards;
  animation-delay: calc(1.05s + var(--i) * 0.05s);
}

@keyframes wordIn {
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* "here" — the one coloured word; its rule draws in left to right. */
.here {
  position: relative;
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.here:hover { opacity: 0.7; }

.here__line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.12em;
  width: auto;
  height: 0.12em;
  overflow: visible;
}

.here__line path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.is-ready .here__line path {
  animation: draw 1s var(--ease-in-out) 1.9s forwards;
}

@keyframes draw {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

/* ── Player ───────────────────────────────────────────────── */

.player { margin: 0; }

.player__frame {
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  padding: 8px;
  background: var(--bg);
  transition: border-color 0.7s var(--ease-wipe), background-color 0.7s var(--ease-wipe);
}

.player__gate {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  /* Safari needs its own nudge to clip a transformed child to the radius. */
  -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
}

.player__video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  cursor: pointer;
}

.player__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s1) var(--s3);
  padding-top: var(--s3);
}

.player__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: none;
}

.player__role {
  flex: 1 1 18ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

/* Reveals */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

[data-service-arrival] [data-reveal] { opacity: 1; transform: none; transition: none; }
[data-service-arrival] .is-ready .mark__link { animation: none; }

/* The frame appears first, then the image drops into it like a shutter.
   The clip sits on the video, not on the observed figure — clipping the
   observed element to nothing stops IntersectionObserver from firing. */
.player[data-reveal] .player__video {
  clip-path: inset(0 0 100% 0);
  transform: scale(1.05);
  transition: clip-path 1.1s var(--ease-in-out), transform 1.4s var(--ease-out);
}

.player[data-reveal].is-in .player__video {
  clip-path: inset(0 0 0 0);
  transform: none;
}

/* Held in a custom property so the reveal and the playing state can both
   hide the button without one out-specifying the other. */
.player[data-reveal]:not(.is-in) { --pp: 0; }

.player__poster-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: var(--pp, 1);
  transition: opacity 0.45s var(--ease-out) 0.35s;
}

.player__poster-play svg {
  width: 68px;
  height: 68px;
  fill: currentColor;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  padding: 2px;
  background: rgba(0, 0, 0, 0.22);
  transition: transform 0.5s var(--ease-out), background-color 0.3s ease;
}

.player__poster-play:hover svg {
  transform: scale(1.09);
  background: rgba(0, 0, 0, 0.42);
}

.player.is-started { --pp: 0; }
.player.is-started .player__poster-play { pointer-events: none; }

.player__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 2.5rem 0.75rem 0.7rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  opacity: 0;
  transform: translateY(9px);
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
}

.player:hover .player__bar,
.player.is-paused .player__bar,
.player.is-scrubbing .player__bar,
.player:focus-within .player__bar {
  opacity: 1;
  transform: none;
}

.pbtn {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.86;
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}

.pbtn:hover { opacity: 1; transform: scale(1.12); }
.pbtn svg { width: 18px; height: 18px; fill: currentColor; }

.pbtn__pause, .player.is-playing .pbtn__play { display: none; }
.player.is-playing .pbtn__pause { display: block; }

.pbtn__off, .player.is-muted .pbtn__on { display: none; }
.player.is-muted .pbtn__off { display: block; }

.scrub {
  position: relative;
  flex: 1 1 auto;
  height: 22px;
  cursor: pointer;
  touch-action: none;
}

.scrub__track, .scrub__buffer, .scrub__played {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  margin-top: -1px;
  transform-origin: left;
  border-radius: 2px;
}

.scrub__track  { right: 0; background: rgba(255, 255, 255, 0.28); }
.scrub__buffer { width: 100%; background: rgba(255, 255, 255, 0.4); transform: scaleX(0); }
.scrub__played { width: 100%; background: #fff; transform: scaleX(0); }

.scrub__knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.25s var(--ease-out);
}

.scrub:hover .scrub__knob,
.player.is-scrubbing .scrub__knob,
.scrub:focus-visible .scrub__knob { transform: scale(1); }

.ptime {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.ptime__sep { opacity: 0.5; padding: 0 0.3em; }

/* ── Links and buttons ────────────────────────────────────── */

.link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 0.1em;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease-in-out);
}

.link:hover {
  background-size: 0 1px;
  background-position: 100% 100%;
}

.link__arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease-out);
}

.link:hover .link__arrow { transform: translateX(0.25em); }

.btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--fg);
  border-radius: 2px;
  background: transparent;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.35s var(--ease-in-out);
}

.btn__text { position: relative; z-index: 1; }

.btn__fill {
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-in-out);
}

.btn:hover { color: var(--bg); }
.btn:hover .btn__fill { transform: scaleY(1); }

/* ── Home: reel + what I do ───────────────────────────────── */

.reel { padding-bottom: var(--s6); }

/* The home page has to open inside a laptop screen, so everything on it
   is dialled down: a smaller wordmark, a smaller statement, and a reel
   capped by what is left of the viewport. The chrome constant is
   everything above and below the video on that first screen. */
.home { --hero-chrome: 340px; }

.home .mark {
  padding: 1.125rem 0 0.75rem;
}

.home .mark__word { font-size: clamp(2.1rem, 4.86vw, 3.33rem); }

.home .lede {
  max-width: 42ch;
  margin-top: var(--s2);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.home .reel { padding-bottom: var(--s4); }

.home .player__frame {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.home .player__video {
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - var(--hero-chrome));
  margin-inline: auto;
}

.home .player__caption { padding-top: var(--s2); }
.home .player__role { font-size: 0.85rem; }

/* Pushed to the end of the caption row rather than a line of its own. */
.player__more {
  margin-left: auto;
  font-size: 0.88rem;
  white-space: nowrap;
}

/* Below the fold, on the same diet. */
.home .section { padding-bottom: var(--s4); }
.home .section__head { padding: var(--s2) 0 var(--s3); }

.offer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
  padding-bottom: var(--s4);
}

.offer__item {
  padding: var(--s2) var(--s3);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.offer__item:hover { border-color: var(--fg); background: var(--tint); }

.offer__name {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.offer__desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

/* ── Home: contact call ───────────────────────────────────── */

.call { padding-bottom: var(--s6); }

.home .call { padding-bottom: var(--s4); }
.home .call__line { font-size: clamp(1.1rem, 2.2vw, 1.55rem); }

.call__line {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.call__line + .call__line { margin-top: var(--s2); }

.call__mail { white-space: nowrap; }

/* ── Scroll cue ───────────────────────────────────────────── */

/* Same pill as the theme toggle, at the other end of the screen: the
   arrow is always there, the word arrives on hover. */
.cue {
  position: fixed;
  left: 50%;
  bottom: clamp(0.5rem, 1.6vh, 1rem);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 30px;
  padding: 0 .65rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: linear-gradient(var(--toolbar-top), var(--toolbar-bottom));
  box-shadow: inset 0 1px 0 var(--bg), 0 1px 1px var(--tint);
  color: var(--muted);
  cursor: pointer;
  transform: translateX(-50%);
  text-shadow: 0 1px var(--bg);
  transition: none;
}

.cue:hover, .cue:focus-visible { color: var(--fg); animation: cueButtonRegistration .18s steps(1, end) 1; }
.cue:hover .cue__arrow, .cue:focus-visible .cue__arrow { animation: cueRegistration .24s steps(1, end) 1; }
.cue:active { transform: translate(-50%, 1px); box-shadow: inset 0 1px 2px var(--rule); }

.cue__arrow svg {
  display: block;
  width: 14px;
  height: 14px;
}

@keyframes cueRegistration {
  0%, 100% { transform: translate(0, 0); }
  24% { transform: translate(1px, 1px); }
  46% { transform: translate(-1px, 0); }
  70% { transform: translate(0, 2px); }
}
@keyframes cueButtonRegistration {
  0%, 100% { transform: translate(-50%, 0); }
  25% { transform: translate(calc(-50% + 1px), 0); }
  50% { transform: translate(calc(-50% - 1px), 1px); }
  75% { transform: translate(-50%, -1px); }
}

.cue__label {
  font: 500 11px/1 var(--font-ui);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

/* It only appears once the entrance has played. */
.cue { opacity: 0; }
.is-ready .cue { opacity: 1; }

/* Nothing left below: the cue gets out of the way. Written to outrank the
   entrance rule above, which shares its specificity. */
.cue.is-done,
.is-ready .cue.is-done {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .cue:hover, .cue:focus-visible { animation: none; }
  .cue:hover .cue__arrow, .cue:focus-visible .cue__arrow { animation: none; }
}

/* ── Footer ───────────────────────────────────────────────── */

.foot {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) 0 var(--s4);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: none;
  color: var(--muted);
}

/* ── Work: filters + grid ─────────────────────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  padding-bottom: var(--s4);
}

.chip {
  padding: 0.5rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: none;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.chip:hover { color: var(--fg); border-color: var(--fg); }

.chip[aria-pressed="true"] {
  color: var(--bg);
  background: var(--fg);
  border-color: var(--fg);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: var(--s4);
  padding-bottom: var(--s6);
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Filtering out collapses the card rather than leaving a hole. */
.card.is-hidden { display: none; }

.card__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #000;
  transition: border-color 0.3s ease, transform 0.5s var(--ease-out);
}

.card:hover .card__frame,
.card:focus-visible .card__frame {
  border-color: var(--fg);
  transform: translateY(-3px);
}

.card__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__badge {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}

.card__title {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  transition: color 0.25s ease;
}

.card:hover .card__title { color: var(--accent); }

.card__client,
.card__kind {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: none;
  color: var(--muted);
}

.card__kind::before { content: "· "; }

.card__desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.empty {
  padding: var(--s5) 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ── Lightbox ─────────────────────────────────────────────── */

.lightbox {
  --content-width: min(90vw, var(--measure));
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background-color: #fff;
  background-image: linear-gradient(rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.88));
  background-size: var(--content-width) 100%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}

.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__inner {
  width: min(100%, 1100px);
  transform: scale(0.97);
  transition: transform 0.45s var(--ease-out);
}

.lightbox.is-open .lightbox__inner { transform: none; }

.lightbox .player__frame {
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
}

.lightbox__caption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding-top: var(--s2);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: none;
}

.lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: calc((100vw - var(--content-width)) / 2 + .75rem);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.3s var(--ease-out);
}

.lightbox__close:hover { background: rgba(255, 255, 255, 0.14); transform: rotate(90deg); }

/* ── Panel / form ─────────────────────────────────────────── */

.panel {
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: clamp(1rem, 2vw, 1.25rem);
  transition: border-color 0.45s var(--ease-in-out);
}

.panel__head { margin: 0 0 var(--s4); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding-bottom: var(--s6);
}

.split--wide { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

.field { margin-bottom: 1rem; }

.field label {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
}

/* Underlines rather than boxes — the panel is already the box. */
.field input,
.field textarea {
  width: 100%;
  padding: 0.4rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.98rem;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: 0.75; }

.field input:hover,
.field textarea:hover { border-bottom-color: var(--muted); }

.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--accent); }

.field.is-bad input,
.field.is-bad textarea { border-bottom-color: var(--accent); }

/* Bots fill this in; people never see it. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__note {
  margin: var(--s2) 0 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.6;
  color: var(--muted);
}

.form__note.is-alert { color: var(--accent); }

.contact__label {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: none;
  color: var(--muted);
}

.copy {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.copy__value {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  transition: color 0.25s ease;
}

.copy:hover .copy__value { color: var(--accent); }

.copy__hint {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: none;
  color: var(--muted);
}

.contact__or {
  margin: var(--s3) 0 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Direct contact: a small directory window in the centre of the page. */
.contact { display: flex; flex-direction: column; }
.contact .masthead { flex: none; }
.contact-stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2rem 0 8rem;
}
.direct-contact {
  width: 100%;
  max-width: 410px;
  padding: 0;
  border-radius: 1px;
  box-shadow: 2px 2px 0 var(--tint), inset 0 0 0 2px var(--bg), inset 0 0 0 3px var(--hairline);
}
.direct-contact__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 3px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(var(--toolbar-top), var(--toolbar-bottom));
  box-shadow: inset 0 1px 0 var(--bg);
}
.direct-contact__icon { width: 13px; height: 13px; flex: none; }
.direct-contact__title { margin: 0; font: 500 11px/1.5 var(--font-ui); }
.direct-contact__pixels { display: flex; gap: 3px; margin-left: auto; }
.direct-contact__pixels i { width: 4px; height: 4px; background: #ac5443; }
.direct-contact__pixels i:nth-child(2) { background: #6d8064; }
.direct-contact__pixels i:nth-child(3) { background: #ac944c; }
.direct-contact__body { padding: 6px 20px; }
.direct-contact__row { padding: 18px 0 20px; }
.direct-contact__row + .direct-contact__row { border-top: 1px dotted var(--rule); }
.direct-contact .contact__label { font-size: 10px; letter-spacing: .04em; margin-bottom: 8px; }
.direct-contact__address { display: flex; align-items: center; gap: 12px; }
.direct-contact__mail { min-width: 0; font-size: 12px; overflow-wrap: anywhere; text-decoration: none; }
.direct-contact__mail:hover { text-decoration: underline; text-underline-offset: 3px; }
.direct-contact .copy {
  flex: none;
  width: auto;
  min-width: 60px;
  justify-content: center;
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 1px;
  background: linear-gradient(var(--toolbar-top), var(--toolbar-bottom));
  box-shadow: inset 0 1px 0 var(--bg), 0 1px 0 var(--tint);
}
.direct-contact .copy__hint { font-size: 9px; letter-spacing: 0; color: var(--fg); }
.direct-contact .copy:hover { border-color: var(--muted); }
.direct-contact .copy:active { transform: translateY(1px); box-shadow: inset 0 1px 2px var(--rule); }
.direct-contact .contact__or { margin: 0 0 8px; font-size: 11px; }
.direct-contact__instagram { display: inline-flex; gap: 6px; color: var(--accent); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.direct-contact__instagram span { font-size: 13px; text-decoration: none; }

/* ── Services ─────────────────────────────────────────────── */

.rate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s2) var(--s4);
  align-items: baseline;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--rule);
}

.rate:first-of-type { border-top: 1px solid var(--fg); }

.rate__name {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.rate__price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--accent);
}

.rate__desc {
  grid-column: 1 / -1;
  max-width: 62ch;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.packs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--s3);
  padding-bottom: var(--s4);
}

.pack {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s3);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.pack:hover { border-color: var(--fg); background: var(--tint); }

.pack__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.pack__price {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.pack__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--muted);
}

.pack__list li::before {
  content: "—";
  padding-right: 0.5em;
  opacity: 0.5;
}

.fineprint {
  max-width: 62ch;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ── Copy toast ───────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  z-index: 120;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: none;
  opacity: 0;
  transform: translate(-50%, 260%);
  transition: transform 0.55s var(--ease-out), opacity 0.35s ease;
}

.toast.is-up { opacity: 1; transform: translate(-50%, 0); }

/* ── Flickering checkerboard theme transition ─────────────── */

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) {
  z-index: 2;
  mask-size: 96px 96px;
  mask-repeat: repeat;
  animation: theme-checker-flicker .8s steps(1, end) both;
}
@keyframes theme-checker-flicker {
  0% { mask-image: repeating-conic-gradient(#000 0% 25%, transparent 0% 50%); mask-position: 0 0; opacity: 0; }
  16% { opacity: 1; }
  30% { opacity: .55; }
  44% { mask-position: 48px 0; opacity: 1; }
  58% { opacity: .65; }
  72% { mask-position: 0 0; opacity: 1; }
  88%, 100% { mask-image: none; opacity: 1; }
}

/* The same short checkerboard reveal for browsers without View Transitions. */
.theme-checker {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: repeat(var(--checker-columns), 1fr);
  pointer-events: none;
  overflow: hidden;
}
.theme-checker__tile {
  background: var(--tile-color);
  animation: theme-tile-flicker .65s steps(1, end) both;
  animation-delay: var(--tile-delay);
}
@keyframes theme-tile-flicker {
  0%, 25% { opacity: 1; }
  26%, 47% { opacity: 0; }
  48%, 64% { opacity: .7; }
  65%, 100% { opacity: 0; }
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 900px) {
  .split,
  .split--wide { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .offer { grid-template-columns: minmax(0, 1fr); }
  /* Stacked, the reel goes back to being width-driven: a height cap here
     would make the frame wider than the screen. */
  .home .player__frame { width: auto; }
  .home .player__video { width: 100%; height: auto; max-height: none; }
}

@media (max-width: 620px) {
  .shell { width: calc(100% - 1.5rem); padding-inline: 0.75rem; }
  .lightbox { --content-width: calc(100vw - 1.5rem); }
  .masthead { flex-wrap: wrap; gap: .5rem; }
  .shell .masthead .mark__word { font-size: 1.5rem; }
  .player__bar { gap: 0.45rem; padding: 2rem 0.6rem 0.6rem; }
  .ptime { font-size: 0.62rem; }
  .player__poster-play svg { width: 56px; height: 56px; }
  .foot { flex-direction: column; gap: 0.4rem; }
  .rate { grid-template-columns: minmax(0, 1fr); }
}

/* ── Reduced motion ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(root) { animation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
  .lede .w { opacity: 1; transform: none; filter: none; }
  .here__line path { stroke-dashoffset: 0; }
  [data-reveal] { opacity: 1; transform: none; }
  .player[data-reveal] .player__video { clip-path: none; transform: none; }
  .cue__arrow svg { animation: none; }
}

/* Home: intro and services beside the featured film. */
.home-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
  padding: .25rem 0 2rem;
}
.home-feature > *, .home-feature__copy { min-width: 0; }
.home .home-feature .reel { max-width: 420px; }
.home .home-feature .reel,
.home .home-feature .section { padding-bottom: 0; }
.home .home-feature .player__frame { width: 100%; }
.home .home-feature .player__video { width: 100%; max-height: none; }
.home-feature__copy.panel {
  padding: 3px;
  border-radius: 1px;
  background: transparent;
  box-shadow: 2px 2px 0 var(--tint), inset 0 0 0 1px var(--bg), inset 0 0 0 2px var(--hairline);
}
.home .home-feature .lede {
  margin: 0;
  max-width: none;
  padding: 15px 13px 17px;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(var(--tint), transparent);
  font-size: 12px;
  line-height: 1.85;
}
.home-feature .home-services { padding: 0 12px 12px; }
.home-feature .offer {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding-bottom: 0;
  border-top: 0;
}
.home-feature .offer__item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px dotted var(--rule);
  border-radius: 0;
}
.home-feature .offer__item:last-child { border-bottom: 0; }
.home-feature .offer__item:hover { background: transparent; }
.home-feature .offer__name { margin: 0; font-size: 12px; line-height: 1.5; letter-spacing: 0; }
.offer__icon { width: 15px; height: 15px; color: var(--muted); }
.home-services__rates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid var(--rule);
  border-radius: 1px;
  background: linear-gradient(var(--toolbar-top), var(--toolbar-bottom));
  background-size: auto;
  box-shadow: inset 0 1px 0 var(--bg), 0 1px 0 var(--tint);
  font: 500 11px/1.5 var(--font-ui);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.home-services__rates:hover { background-size: auto; border-color: var(--muted); }
.home-services__rates:active { box-shadow: inset 0 1px 2px var(--rule); }
.home-services__rates .link__arrow { color: var(--fg); transition: none; }
.home-services__rates:hover .link__arrow { transform: translateX(1px); }
/* The decorative frame leaves quietly while the existing rows exit individually. */
.flow-outgoing .home-feature__copy { animation: directory-frame-out .26s linear both; }
@keyframes directory-frame-out { to { border-color: transparent; box-shadow: none; } }
.home-feature .player__caption { justify-content: space-between; }
.home-feature .player__more { margin-left: 0; }
@media (max-width: 760px) {
  .home-feature { grid-template-columns: minmax(0, 1fr); }
}

/* Poster lettering, framed film and one short analogue startup. */
@font-face {
  font-family: "Tektur";
  src: url("../fonts/Tektur-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}
.mark__word { font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.035em; }
.player--framed .player__frame {
  border: clamp(20px, 3.2vw, 34px) solid transparent;
  border-image: url("../media/painting-frame.svg") 92 91 88 94 / 1 / 0 stretch;
  border-radius: 0;
  padding: 0;
  background: #15110d;
}
.player--framed .player__gate { border-radius: 0; }
.home-feature .player--framed .player__caption { justify-content: center; }
.watch-link {
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-decoration: none;
  padding: 0.35rem 0;
}
.watch-link:hover { color: var(--accent); }
.watch-link span { margin-left: 0.25rem; }
.preview-next {
  position: absolute;
  right: .35rem;
  bottom: .35rem;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: .85;
  filter: drop-shadow(0 1px 3px #000);
  transition: opacity .15s ease;
}
.preview-next svg { width: 18px; height: 18px; }
.preview-next:hover, .preview-next:focus-visible { opacity: 1; }
.preview-next:focus-visible { outline: 1px solid #fff; outline-offset: -3px; }
.player--previews .player__bar { padding-right: 3rem; }
.preview-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.home-contact {
  margin-top: 0;
  padding: 12px 13px;
  border-top: 1px solid var(--rule);
  background: var(--tint);
  font-size: 10px;
  line-height: 1.6;
}
.home-contact p { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 6px; margin: 0; }
.home-contact p + p { margin-top: 4px; }
.home-contact p > span { color: var(--muted); }
.home-contact a { text-decoration: none; overflow-wrap: anywhere; }
.home-contact a:hover { text-decoration: underline; }
.tv-static {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(0deg, #fff8 0 1px, #0009 1px 3px, transparent 3px 5px),
              repeating-radial-gradient(ellipse at 23% 41%, #ddd 0 1px, #222 1px 2px, #777 2px 3px);
  background-size: 100% 5px, 7px 9px;
}
.is-ready .player--framed .player__video { animation: tv-on 1.4s ease-out both; }
.is-ready .tv-static { animation: tv-dissolve 1.4s steps(8) both; }
@keyframes tv-on {
  0% { clip-path: inset(49.5% 30%); filter: brightness(2) grayscale(1); }
  20% { clip-path: inset(48% 0); filter: brightness(1.7) grayscale(1); }
  55% { clip-path: inset(0); filter: brightness(1.25) grayscale(0.6); }
  100% { clip-path: inset(0); filter: none; }
}
@keyframes tv-dissolve {
  0% { opacity: 0.7; clip-path: inset(49.5% 30%); }
  20% { opacity: 0.6; clip-path: inset(48% 0); background-position: 0 10px, 4px -7px; }
  55% { opacity: 0.35; clip-path: inset(0); background-position: 0 -20px, -11px 13px; }
  100% { opacity: 0; clip-path: inset(0); background-position: 0 15px, 7px -9px; }
}
@media (prefers-reduced-motion: reduce) {
  .is-ready .player--framed .player__video,
  .is-ready .tv-static { animation: none; }
}

/* Compact language choice, aligned with the navigation. */
.language-switch { display: flex; align-items: center; justify-content: center; gap: .2rem; padding: 0 .55rem; min-height: 30px; font: 10px var(--font-ui); }
.language-switch button { border: 0; background: none; color: var(--muted); font: inherit; padding: .4rem .15rem; cursor: pointer; }
.language-switch button[aria-pressed="true"] { color: var(--fg); text-decoration: underline; text-underline-offset: .3em; }
.language-switch button:hover { color: var(--accent); }
.language-switch button:focus-visible, .quote-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.quote-link { width: fit-content; color: var(--accent); font-size: .85rem; text-decoration: underline; text-underline-offset: .25em; }
.rate > .quote-link { grid-column: 1 / -1; }
.pack > .quote-link { margin-top: auto; padding-top: .75rem; }
@media (max-width: 480px) {
  .topbar { display: grid; grid-template-columns: 1fr 1fr; }
  .nav { grid-column: 1 / -1; grid-row: 1; border-bottom: 1px solid var(--rule); }
  .nav a { flex: 1; gap: .3rem; padding-inline: .4rem; font-size: 10px; }
  .nav__icon { width: 12px; height: 12px; }
  .nav a:last-child { border-right: 0; }
  .theme-toggle { justify-content: center; }
  .language-switch { min-height: 28px; }
}

/* Framed portfolio thumbnails retain each film's original aspect ratio. */
.work .card__frame {
  display: block;
  border: clamp(18px, 2.7vw, 34px) solid transparent;
  border-image: url("../media/painting-frame.svg") 92 91 88 94 / 1 / 0 stretch;
  border-radius: 0;
  background: #15110d;
}
.card__screen { display: block; position: relative; overflow: hidden; }
.lightbox .player--framed .player__frame { border-width: clamp(18px, 3vw, 38px); }

/* Leave room for the frame, caption and close button on short screens. */
.lightbox__inner {
  width: min(100%, calc(var(--content-width) - 3rem), calc((100dvh - 190px) * var(--film-ratio, 1.7778)));
}

/* Compact captions and open space between the films. */
.work .grid {
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  padding-bottom: 1.25rem;
}
.work .card { gap: .5rem; }
.work .card__meta { justify-content: center; gap: .25rem .5rem; line-height: 1.3; }
.work .card__client { font: 10px var(--font-ui); letter-spacing: 0; }
.work .card__badge { font-size: 9px; padding: .2rem .35rem; border-radius: 2px; }
@media (max-width: 760px) {
  .work .grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
}

/* Compact, grain-textured pedestrian signals. */
.project-crossing { margin: .5rem 0 1.5rem; }
.project-crossing__link {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 3rem 1rem;
  color: var(--fg);
  text-decoration: none;
}
.project-crossing__signals {
  position: absolute;
  left: 50%; top: 50%;
  width: min(350px, 72%);
  display: flex;
  gap: 5px;
  transform: translate(-50%, -55%) rotate(-6deg);
  pointer-events: none;
  z-index: -1;
}
.project-crossing__signal {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 241 / 400;
  color: var(--signal);
  opacity: .52;
  filter: drop-shadow(0 0 2px currentColor) drop-shadow(0 0 6px color-mix(in srgb, currentColor 45%, transparent));
  animation: crossing-exposure 9s steps(1, end) infinite;
  animation-delay: var(--delay);
}
.project-crossing__signal::before {
  content: "";
  display: block;
  width: 100%; height: 100%;
  background: url("../media/film-grain.svg"), currentColor;
  background-size: 90px 90px;
  background-blend-mode: multiply;
  -webkit-mask: url("../media/russian-crosswalk.svg?v=film2") center / contain no-repeat;
  mask: url("../media/russian-crosswalk.svg?v=film2") center / contain no-repeat;
  animation: crossing-grain .37s steps(1, end) infinite;
}
.project-crossing__signal--red { --signal: #d84931; --delay: -1.4s; }
.project-crossing__signal--green { --signal: #8caa70; --delay: -4.2s; }
.project-crossing__signal--yellow { --signal: #d7ac53; --delay: -6.3s; }
.project-crossing__link:focus-visible { outline: none; }
@keyframes crossing-exposure {
  0%, 100% { opacity: .52; }
  23% { opacity: .46; }
  24% { opacity: .54; }
  51% { opacity: .49; }
  69% { opacity: .25; }
  71% { opacity: .5; }
  72% { opacity: .34; }
  74% { opacity: .52; }
}
@keyframes crossing-grain {
  0%, 100% { background-position: 0 0; }
  25% { background-position: 19px -11px; }
  50% { background-position: -27px 8px; }
  75% { background-position: 11px 23px; }
}
@media (max-width: 600px) {
  .project-crossing { margin-top: 0; }
  .project-crossing__link { min-height: 242px; padding: 3rem .5rem; }
  .project-crossing__signals { width: 68%; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-crossing__signal, .project-crossing__signal::before { animation: none; }
}

/* Minimal interface motion; the footage stays untouched. */
.work .card__frame { transition: transform .18s ease-out; }
.work .lightbox .player__video {
  animation: none;
  filter: none;
  clip-path: none;
  transform: none;
}
.work .card:hover .card__frame,
.work .card:focus-visible .card__frame { transform: translateY(-1px); }
.work .card:focus-visible { outline: none; }
.work .card:focus-visible .card__title { text-decoration: underline; text-underline-offset: .18em; }
.work .lightbox { transition: opacity .16s ease-out, visibility .16s; }
.work .lightbox__inner,
.work .lightbox.is-open .lightbox__inner { transform: none; transition: none; animation: none; }
@media (prefers-reduced-motion: reduce) {
  .work .card__frame, .work .lightbox { transition: none; }
  .work .card:hover .card__frame,
  .work .card:focus-visible .card__frame { transform: none; }
}
