/* ============ ÜBER® — one page, one system ============ */

:root {
  --bg: #0a0a0b;
  --ink: #f2f0eb;
  --ink-dim: #93908a;
  --ink-soft: #b8b5ad;
  --line: rgba(242, 240, 235, 0.14);
  --rec: #ff453a;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Archivo", sans-serif;
  --display: "Archivo Black", "Archivo", sans-serif;
  --pad: clamp(18px, 3vw, 44px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.playing { overflow: hidden; }
body.picking { cursor: pointer; }

/* Experience mode: the page is a viewport, not a document. Input flies the
   camera; sections are stations that fade in at their depth. */
/* The gesture belongs to the camera, not to the browser. Without this the phone
   claims the vertical swipe for panning and delivers only the first few pixels —
   a full-screen swipe moved the camera two metres down an 1800-metre building. */
html.gl, html.gl body, html.gl #room {
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}
/* dvh, not vh: on iOS 100vh is the LARGE viewport (toolbars retracted) and a
   page with touch-action:none never retracts them, so vh stayed taller than
   innerHeight for the whole visit. Every hit-test in js/site.js divides by
   innerHeight, so the two have to describe the same box. vh first as the
   fallback for browsers without dvh. */
html.gl body { overflow: hidden; height: 100vh; height: 100dvh; }
html.gl .station {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--pad);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 5;
}
html.gl .station a, html.gl .station button { pointer-events: auto; }
/* js/site.js measures each station on arrival and adds .scrolls when its content
   is taller than the screen. Only those capture the touch: on a phone the lower
   third of CONTACT was unreachable, because the whole station was
   pointer-events:none and every swipe over the text flew the camera instead. */
@media (pointer: coarse) {
  html.gl .station.scrolls {
    pointer-events: auto;
    overflow-y: auto;
    touch-action: pan-y;
    overscroll-behavior: contain;
  }
}
/* Copy floats over a live aurora, and where a curtain crosses behind a headline
   the type has nothing to sit against. Every station carries its own scrim: a
   soft pool of dark anchored to the corner the text starts from, fading out long
   before the edge so the room still reads as one space. */
html.gl .station {
  background: radial-gradient(118% 78% at 6% 34%,
              rgba(3, 3, 4, 0.80) 0%, rgba(3, 3, 4, 0.46) 42%, rgba(3, 3, 4, 0) 74%);
}
html.gl .hero.station {
  background: radial-gradient(120% 66% at 8% 82%,
              rgba(3, 3, 4, 0.78) 0%, rgba(3, 3, 4, 0.42) 46%, rgba(3, 3, 4, 0) 76%);
}
html.gl .hero.station { justify-content: flex-end; padding-bottom: clamp(90px, 14vh, 150px); }
html.gl .footer.station { overflow: hidden; justify-content: center; border-top: none; }
/* The room replaces the list visually, but `display: none` also removes it from
   the accessibility tree, and the canvas is aria-hidden. That left the entire
   archive invisible to a screen reader. Hide it from sight only. */
html.gl .work {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* a keyboard user tabbing into it gets it back, full size */
html.gl .work:focus-within {
  position: static;
  width: auto; height: auto;
  margin: 0; padding: clamp(90px, 17vh, 190px) var(--pad);
  overflow: visible;
  clip-path: none;
  white-space: normal;
  background: rgba(8, 8, 10, 0.97);
  z-index: 40;
}
html.gl .statement.station, html.gl .services.station { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

.mono { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; line-height: 1.6; }
.display { font-family: var(--display); text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.92; }
.kicker { color: var(--ink-dim); }
::selection { background: var(--ink); color: var(--bg); }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--rec); outline-offset: 3px; }

/* ---------- intro: the mark resolves into the wordmark ---------- */

#intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #08080a;
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#intro.done { opacity: 0; visibility: hidden; pointer-events: none; }
/* Verhon nostaa js/site.js 2,4 sekunnissa. Jos moduuli ei koskaan lataudu —
   verkko katkeaa, import kaatuu — kävijä jäi tuijottamaan mustaa ruutua ilman
   mitään keinoa päästä eteenpäin. Tämä nostaa sen joka tapauksessa 3,6
   sekunnissa, eli vasta kun JS on jo saanut oman vuoronsa. */
#intro { animation: introExpiry 0.6s ease 3.6s forwards; }
@keyframes introExpiry {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.intro-mark { position: relative; display: grid; place-items: center; }
.intro-mark img {
  display: block;
  width: auto;
  filter: drop-shadow(0 0 40px rgba(242, 240, 235, 0.14));
}
.intro-owl {
  height: clamp(64px, 11vh, 104px);
  animation: introOwl 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.intro-word {
  position: absolute;
  height: clamp(30px, 5.2vh, 52px);
  opacity: 0;
  animation: introWord 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
/* Hard cut, never a crossfade: the wordmark's first glyph is the owl, so showing
   both at once reads as a doubled mark rather than a transition. */
@keyframes introOwl {
  0%    { opacity: 0; transform: scale(0.88); }
  16%   { opacity: 1; transform: scale(1); }
  60%   { opacity: 1; transform: scale(1); }
  60.1% { opacity: 0; }
  100%  { opacity: 0; }
}
@keyframes introWord {
  0%, 60%  { opacity: 0; transform: scale(1.04); }
  60.1%    { opacity: 1; transform: scale(1); }
  100%     { opacity: 1; transform: scale(1); }
}
#introSkip {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  background: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 16px;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
#introSkip:hover { color: var(--ink); border-color: var(--ink); }
/* no motion, no gate: the mark is already the favicon and the header */
@media (prefers-reduced-motion: reduce) {
  #intro { display: none; }
}

/* ---------- the room ---------- */

#room {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  z-index: 0;
  background: var(--bg);
}
/* without WebGL the page still reads — it just loses the room */
html.no-gl #room { display: none; }

main, .chrome, .hud, .footer { position: relative; z-index: 2; }

/* ---------- chrome ---------- */

.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px var(--pad);
  pointer-events: none;
}
/* One soft scrim across the top holds the header legible over a bright aurora.
   Per-glyph shadows were doing this job and read as a smudge behind every word. */
.chrome::before {
  content: "";
  position: absolute;
  inset: -10px 0 auto 0;
  height: 132px;
  background: linear-gradient(to bottom, rgba(6, 7, 9, 0.62), rgba(6, 7, 9, 0));
  pointer-events: none;
  z-index: -1;
}
.chrome a { pointer-events: auto; }
.brand img { display: block; height: 22px; width: auto; }

.nav { display: flex; gap: clamp(14px, 2vw, 30px); }
.nav a { color: var(--ink); text-decoration: none; opacity: 0.62; transition: opacity 0.25s; }
.nav a:hover { opacity: 1; }

/* A forced-colours / high-contrast environment paints an opaque backplate behind
   text drawn over imagery. Over the room that shows up as a grey box under every
   word in the header — opt the chrome out so it stays clean. */
@media (forced-colors: active) {
  .chrome, .chrome * { forced-color-adjust: none; }
  .nav a, .brand img { background: none; }
}

/* The left section index is gone: the top nav says where you can go and the
   right rail says where you are, and a third list of the same destinations was
   one more thing between the visitor and the room. Its gutter goes with it, so
   the stations and the hero reclaim ~104px on the left. */
@media (min-width: 1280px) {
  html.gl .rail-cats { display: flex; }
  /* must out-specify `html.gl .station`, which sets the shorthand */
  html.gl .station {
    padding-left: var(--pad);
    padding-right: calc(var(--pad) + 172px);   /* room shortcuts + flight rail */
  }
  /* the right gutter still takes ~172px, so the display line stays trimmed a
     little or the last glyph is clipped by .hero .line's overflow */
  html.gl .hero h1 { font-size: clamp(44px, 8.1vw, 130px); }
}

.hud {
  position: fixed;
  left: var(--pad); right: var(--pad);
  bottom: 18px;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--ink-dim);
  pointer-events: none;
}
.hud button { pointer-events: auto; }
.rec-dot { color: var(--rec); animation: recblink 1s steps(2) infinite; }
@keyframes recblink { 50% { opacity: 0.25; } }

#sndBtn {
  position: fixed;
  right: var(--pad);
  bottom: 18px;
  z-index: 31;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink);
  background: rgba(10, 10, 11, 0.5);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 14px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.25s, color 0.25s;
}
#sndBtn:hover { background: var(--ink); color: var(--bg); }
/* The room is the only thing that makes sound, so the toggle is opt-in: it
   appears when the experience is running, and never over the plain document —
   including when scripts fail entirely and no class gets added at all. */
#sndBtn { display: none; }
html.gl #sndBtn { display: block; }

/* flight rail — where you are in the room */
.rail {
  position: fixed;
  right: calc(var(--pad) * 0.55);
  top: 50%;
  transform: translateY(-50%);
  height: min(46vh, 420px);
  z-index: 30;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-dim);
}
html.gl .rail { display: flex; }
/* The chrome earned a scrim for exactly this reason; the rail reads over the
   same sky. A soft pool behind the column keeps the rows and the vertical
   label legible when a bright panel or an aurora core passes behind them. */
.rail::before {
  content: "";
  position: absolute;
  inset: -48px -22px -48px -64px;
  background: radial-gradient(ellipse 62% 54% at 60% 50%, rgba(6, 7, 9, 0.6), rgba(6, 7, 9, 0) 100%);
  z-index: -1;
  pointer-events: none;
}
.rail-body { flex: 1; display: flex; align-items: stretch; gap: 11px; }
.rail-track { position: relative; width: 1px; background: var(--line); }

/* every room, one click away — and marked when it is in the building */
.rail-cats {
  display: none;                 /* narrow screens keep the bare progress track */
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0;                        /* no dead gaps between rows: every pixel belongs
                                    to a row, so a near miss still hits the room
                                    you were aiming at rather than nothing */
}
/* The rail is the index now — the menu station is gone, so these rows are the
   one place the archive is enumerated: the count in the hall's own light, the
   name, a filled tick. Everything is always in the building; red = you are
   there. */
.rail-cats button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  background: none;
  border: 0;
  /* the row, not the glyphs, is the target: ~26px tall and the full column wide */
  padding: 7px 6px 7px 10px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.17em;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
}
/* show the hit area on approach, so the target is where it looks */
.rail-cats button:hover { background: rgba(242, 240, 235, 0.07); }
.rail-cats button b {
  order: -1;
  min-width: 18px;
  font-weight: 400;
  color: var(--hall, currentColor);
  opacity: 0.9;
  text-align: right;
}
.rail-cats button::after {
  content: "";
  width: 4px; height: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: currentColor;
}
.rail-cats button.ai { color: var(--rec); }
.rail-cats button.here { color: var(--rec); opacity: 1; }
.rail-cats button.here b { color: currentColor; }
.rail-cats button:hover { opacity: 1; color: var(--ink); }
.rail-ai { position: absolute; left: 0; width: 1px; background: var(--rec); opacity: 0.75; }
.rail-dot {
  position: absolute;
  left: 50%;
  width: 7px; height: 7px;
  transform: translate(-50%, -50%);
  background: var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(242, 240, 235, 0.6);
}
.rail-label { font-size: 8px; letter-spacing: 0.22em; writing-mode: vertical-rl; }
.rail-label-b { color: var(--rec); }

/* hovered work, follows the cursor */

/* ---------- shared section rhythm ---------- */

section { padding: clamp(90px, 17vh, 190px) var(--pad); }

/* The room is brightest at the mouth (the hero) and veils behind everything the
   visitor has to read, so type never competes with a passing panel. */
.statement, .work, .services {
  background: rgba(10, 10, 11, 0.80);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(90px, 14vh, 150px);
}
.hero h1 { font-size: clamp(44px, 9vw, 152px); }
.hero .line { display: block; overflow: hidden; line-height: 0.96; }
.hero .line > span { display: inline-block; }
.hero-sub { margin-top: 28px; color: var(--ink-soft); font-size: 11px; letter-spacing: 0.17em; }
.hero-contact {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px clamp(14px, 2vw, 26px);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
}
.hero-contact a { color: var(--ink); text-decoration: none; position: relative; }
.hero-contact a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-contact a:hover::after { transform: scaleX(1); }
.hero-scroll { margin-top: 14px; color: var(--ink-dim); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
/* a wheel scrolls, a thumb swipes: one hint, told in the visitor's own verb */
.if-coarse { display: none; }
@media (pointer: coarse) {
  .if-fine { display: none; }
  .if-coarse { display: inline; }
}

/* ---------- statement ---------- */

.statement-text {
  margin-top: 26px;
  font-size: clamp(26px, 4.2vw, 68px);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.1;
  max-width: 26ch;
  text-wrap: balance;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  margin-top: clamp(46px, 8vh, 90px);
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 760px;
}
.stats > div {
  background: var(--bg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stats dt { color: var(--ink-dim); }
.stats dd { font-family: var(--display); font-size: clamp(26px, 3.4vw, 44px); letter-spacing: -0.02em; }

/* ---------- work ---------- */

.work-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  background: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 13px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.filters button:hover { color: var(--ink); border-color: var(--ink-dim); }
.filters button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.work-list { list-style: none; }
/* Rivi on nyt linkki oikealle sivulle, ei pelkka painike. Ilman sita 82
   filmisivua jai vain /work/-hubin varaan, eika hakukone paassyt niihin
   etusivulta lainkaan. Asettelu siirtyi <li>:sta linkkiin, jotta ruudukko
   pysyy samana ja koko rivi on klikattava. */
.work-row { border-bottom: 1px solid var(--line); }
.w-link {
  display: grid;
  grid-template-columns: 44px minmax(90px, 0.7fr) minmax(0, 2.2fr) minmax(120px, 0.9fr);
  align-items: baseline;
  gap: 18px;
  padding: clamp(13px, 1.8vh, 20px) 0;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: background 0.25s, padding-left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.w-link:hover { background: rgba(242, 240, 235, 0.045); padding-left: 12px; }
.w-idx { color: var(--ink-dim); }
.w-client { color: var(--rec); }
.w-title { font-size: clamp(17px, 2.1vw, 30px); }
.w-meta { color: var(--ink-dim); text-align: right; }
.tag-ai {
  background: var(--rec);
  color: #fff;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.12em;
}
.work-note { margin-top: 22px; color: var(--ink-dim); }

/* ---------- services ---------- */

.service-list { list-style: none; margin-top: 26px; border-top: 1px solid var(--line); }
.service-list li {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: clamp(14px, 2.2vh, 26px) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-list li:hover { padding-left: 12px; }
.s-num { color: var(--rec); }
.service-list h3 { font-size: clamp(22px, 3.6vw, 52px); }
.service-list em { font-style: normal; font-size: 0.4em; color: var(--ink-dim); vertical-align: 0.6em; margin-left: 0.5em; }
.services-line { margin-top: clamp(50px, 9vh, 100px); font-size: clamp(26px, 4.2vw, 64px); }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: clamp(70px, 12vh, 140px) var(--pad) 24px;
  overflow: hidden;
}
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(22px, 4vw, 60px);
  margin-top: 20px;
}
.contact-card { display: flex; flex-direction: column; gap: 6px; }
.c-role { color: var(--rec); }
.c-name { font-size: clamp(18px, 2vw, 28px); color: var(--ink-soft); }
.c-mail {
  font-size: clamp(24px, 3.4vw, 54px);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: letter-spacing 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.c-mail:hover { letter-spacing: 0.005em; }
.c-tel { color: var(--ink-dim); text-decoration: none; }
.c-tel:hover { color: var(--ink); }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 24px;
  margin: clamp(40px, 7vh, 74px) 0 0;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  color: var(--ink-dim);
}
.footer-grid > div { display: flex; flex-direction: column; gap: 9px; font-size: 12px; }
.footer-grid a { text-decoration: none; padding: 2px 0; transition: color 0.25s; }
.footer-grid a:hover { color: var(--ink); }
.f-label { font-family: var(--display); font-size: 14px; letter-spacing: 0.02em; color: var(--ink); margin-bottom: 6px; }

.footer-mark {
  display: block;
  width: clamp(56px, 7vw, 96px);
  height: auto;
  margin: clamp(24px, 4vh, 44px) auto 0;
  opacity: 0.18;
}
.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 16px;
  color: var(--ink-dim);
}

/* ---------- player ---------- */

#player {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 6, 7, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}
#player[hidden] { display: none; }
.player-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px var(--pad);
  color: var(--ink-dim);
}
.player-id { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
/* one line of what the film is, under its name, only when it has one */
#playerDesc { font-size: 11px; letter-spacing: 0.04em; color: var(--ink-dim); }
#playerClose {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 16px;
  cursor: pointer;
}
#playerClose:hover { background: var(--ink); color: var(--bg); }
.player-nav { display: flex; align-items: center; gap: 10px; }
#playerCount {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  min-width: 7ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
#playerPrev, #playerNext {
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  /* a fingertip needs more than the glyph */
  width: 44px; height: 44px;
  display: grid; place-items: center;
  cursor: pointer;
}
#playerPrev:hover, #playerNext:hover { background: var(--ink); color: var(--bg); }
#playerPrev[disabled], #playerNext[disabled] { opacity: 0.28; cursor: default; }
#playerPrev[disabled]:hover, #playerNext[disabled]:hover { background: none; color: var(--ink); }
@media (max-width: 760px) {
  .player-bar { padding: 12px var(--pad); }
  #playerTitle { font-size: 10px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #playerCount { display: none; }
}
.player-stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 0 var(--pad) var(--pad);
}
.player-stage img {
  max-width: 100%;
  max-height: calc(100dvh - 140px);
  width: auto;
  height: auto;
  display: block;
}
.player-stage iframe, .player-stage video {
  width: min(100%, calc((100dvh - 140px) * 16 / 9));
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  background: #000;
  display: block;
}

/* ---------- custom cursor ---------- */

html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor .w-link { cursor: none; }
.cur-dot {
  position: fixed; top: 0; left: 0;
  width: 7px; height: 7px;
  background: var(--rec);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  box-shadow: 0 0 10px rgba(255, 69, 58, 0.55);
  transition: width 0.22s cubic-bezier(0.22,1,0.36,1),
              height 0.22s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.22s;
}
/* over anything clickable the dot swells; no ring, no label */
.cur-dot.on {
  width: 14px; height: 14px;
  box-shadow: 0 0 20px rgba(255, 69, 58, 0.85);
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .mono { font-size: 11px; }
  .brand img { height: 18px; }
  .nav { gap: 0; }
  .nav a { font-size: 10px; padding: 12px 5px; opacity: 0.85; }
  .rail { right: 6px; }
  .hud { bottom: 12px; }
  .hero-contact { font-size: 10px; gap: 6px 14px; }
  .hero h1 { font-size: clamp(28px, 9.4vw, 64px); }
  .w-link {
    grid-template-columns: 34px 1fr;
    grid-template-areas: "idx client" "idx title" "idx meta";
    gap: 4px 14px;
    row-gap: 3px;
  }
  .w-idx { grid-area: idx; }
  .w-client { grid-area: client; }
  .w-title { grid-area: title; }
  .w-meta { grid-area: meta; text-align: left; }
  .service-list li { gap: 14px; }
  .footer-base { flex-direction: column; }
  .player-stage { padding: 0 0 var(--pad); }
}

/* ---------- static / reduced motion ---------- */

html.static, html.static *, html.static *::before, html.static *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- about / leadership / ai vision stations ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
  gap: clamp(26px, 5vw, 80px);
  align-items: start;
  margin-top: 26px;
}
.about-lead { display: flex; flex-direction: column; gap: 18px; }
.about-body {
  font-size: clamp(14px, 1.35vw, 19px);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 62ch;
}
.about-body.small { font-size: clamp(13px, 1.1vw, 15px); }
.about-body.em { color: var(--ink); }
.about-body b { color: var(--ink); font-weight: 600; }
.about-aside {
  color: var(--ink-dim);
  border-left: 2px solid var(--rec);
  padding-left: 16px;
  line-height: 1.9;
}
.about-side { display: flex; flex-direction: column; gap: 14px; }
.about-grid .stats { grid-template-columns: repeat(2, 1fr); margin-top: 0; max-width: none; }
.side-label { color: var(--rec); }
/* The roster is a two-column ledger, not a dot-chained sentence: each name on
   its own slot, the second tier dimmer below. */
.clients {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 1px 26px;
  color: var(--ink);
  line-height: 1.9;
  font-size: 11px;
}
.clients-b { color: var(--ink-dim); }

.people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(24px, 4vw, 64px);
  margin-top: 24px;
}
.person { display: flex; flex-direction: column; gap: 8px; border-top: 2px solid var(--ink); padding-top: 16px; }
.p-role { color: var(--rec); }
.person h3 { font-size: clamp(22px, 2.6vw, 40px); }
.built { margin-top: clamp(22px, 4vh, 44px); max-width: 70ch; }

.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(22px, 4vw, 56px);
  margin: 24px 0;
}
.ai-vision .statement-text { max-width: 22ch; }
.ai-vision .kicker,
.ai-offer .kicker { color: var(--rec); }

/* The offer station carries a list on one side and a column of prose on the
   other. The list wants the width, so this grid is asymmetric where .ai-grid
   is even. It is explicit, so unlike .ai-grid it cannot collapse on its own —
   see the media query below. */
.ai-grid-wide {
  grid-template-columns: minmax(0, 1.35fr) minmax(min(280px, 100%), 0.85fr);
}
.ai-list { margin-top: 0; }
.ai-list h3 { font-size: clamp(19px, 2.6vw, 38px); }
.ai-list li { padding: clamp(10px, 1.5vh, 18px) 0; }
.ai-offer .about-aside a { color: var(--ink); border-bottom: 1px solid var(--rec); }
.ai-offer .about-aside a:hover { color: var(--rec); }

/* What the film is for, in one line. The room dropped hover tooltips by
   design, so the line lives in the player bar (#playerDesc) and in the
   accessible list (.w-desc) — not on the cursor. */

/* the same line, for the accessible list and for search engines. It sits inside
   .w-title, which is uppercase display type — a 60-character sentence set in
   caps is a wall, so this one turns it off again. */
.w-desc {
  display: block;
  margin-top: 5px;
  text-transform: none;
  font-style: normal;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 56ch;
}

@media (max-width: 860px) {
  .ai-grid-wide { grid-template-columns: 1fr; gap: 26px; }
}

/* the brief button: the footer's one red pill, same family as ENTER */
.footer .brief-btn {
  display: inline-block;
  margin: 2px 0 30px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink);
  border: 1px solid var(--rec);
  border-radius: 99px;
  padding: 12px 26px;
  transition: background 0.25s, color 0.25s;
}
.footer .brief-btn:hover { background: var(--rec); color: #fff; }

/* ---------- latest work: one job, explained ----------
   A post is a story with evidence under it, so the copy is set like the about
   stations and the pictures below it are pairs: before on the left, after on
   the right, one hairline between them. Nothing is cropped square; these are
   photographs, and a photograph keeps its own shape. */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.post-title { max-width: 18ch; }
.post-body { max-width: 60ch; margin-top: 18px; }
.post-body p + p { margin-top: 14px; }
.post-credits { color: var(--ink-dim); margin-top: 20px; }

.pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(28px, 5vh, 56px);
}
/* Top-aligned, natural heights: these are photographs and they arrive in four
   different shapes. Forcing the pair into one box would crop somebody's frame
   to make a grid tidy, which is the one thing a studio's own site must not do
   to its own pictures. */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 2px;
}
.pair figure { margin: 0; }
.pair img {
  display: block;
  width: 100%;
  height: auto;
  background: #111114;
}
/* The state is the caption. It sits under the picture rather than on it,
   because a label printed over a photograph is a sticker, not a caption. */
.pair figcaption {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  padding-top: 7px;
}
.pair .after figcaption { color: var(--ink); }
.pair-name {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  padding-bottom: 8px;
}

/* the closed wing: one short station, set narrow like a classified memo */
.nda .about-body { max-width: 52ch; }
.nda .about-aside a { color: var(--ink); border-bottom: 1px solid var(--line); }
.nda .about-aside a:hover { color: var(--rec); border-color: var(--rec); }

/* which hall you are in */
.hall {
  position: fixed;
  left: var(--pad);
  bottom: 18px;
  z-index: 31;
  color: var(--ink);
  letter-spacing: 0.3em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s, transform 0.5s;
  display: none;
}
html.gl .hall { display: block; }

/* ---------- hall strip: the rail's job, done by a thumb ----------
   Hidden everywhere the rail exists. On a touch screen it takes the bottom of
   the frame and the hall readout steps aside, because the strip already says
   which hall you are in — in red, in the same place the readout was. */
.hallstrip { display: none; }
@media (pointer: coarse) {
  html.gl .hallstrip {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 31;
    display: flex;
    gap: 6px;
    padding: 9px var(--pad) calc(9px + env(safe-area-inset-bottom, 0px));
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    background: linear-gradient(to top, rgba(6, 7, 9, 0.92), rgba(6, 7, 9, 0));
  }
  html.gl .hallstrip::-webkit-scrollbar { display: none; }
  .hallstrip button {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-height: 34px;
    padding: 8px 14px;
    background: rgba(10, 10, 11, 0.55);
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    white-space: nowrap;
    cursor: pointer;
  }
  .hallstrip button b { font-weight: 400; color: var(--ink); }
  .hallstrip button.here { color: var(--rec); border-color: var(--rec); }
  .hallstrip button.here b { color: var(--rec); }
  .hallstrip button.ai { color: var(--rec); }
  /* the readout and the toggle step above the strip */
  html.gl .hall { display: none; }
  html.gl #sndBtn { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  /* and the hero's own bottom copy clears it */
  html.gl .hero.station { padding-bottom: clamp(112px, 17vh, 168px); }
}
.hall.on { opacity: 1; transform: none; }
.hall::before { content: "◉ "; color: var(--rec); }
/* the same treatment as the header: a pool of dark, never per-glyph shadows */
.hall::after {
  content: "";
  position: absolute;
  inset: -16px -48px -16px -22px;
  background: radial-gradient(ellipse at 30% 55%, rgba(3, 3, 4, 0.72), rgba(3, 3, 4, 0) 72%);
  z-index: -1;
  pointer-events: none;
}

/* grouped fallback list */
.work-group { list-style: none; margin-top: 34px; }
.work-group > h3 { font-size: clamp(18px, 2vw, 26px); color: var(--ink-dim); border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.work-group ol { list-style: none; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 22px; }
  .about-grid .stats { grid-template-columns: repeat(2, 1fr); }
  .about-body { font-size: 14px; }
  /* The header is fixed and its height follows the logo, so a hard number here
     is a guess that was wrong: at 402px the chrome ended at 80px and the copy
     started at 74px, putting the first line of every station under the wordmark.
     js/site.js measures the header and publishes --chrome-h. */
  html.gl .station,
  /* .footer.station carries three classes and so out-specifies the rule above.
     Left alone it kept `justify-content: center` and `overflow: hidden`, which on
     a phone centred a block taller than the screen and clipped its first two
     lines under the header. */
  html.gl .footer.station {
    overflow-y: auto;
    padding-top: calc(var(--chrome-h, 74px) + 20px);
    padding-bottom: 64px;
    justify-content: flex-start;
  }
  html.gl .hero.station { justify-content: flex-end; }
}

/* ---------- the archive menu ---------- */

/* The picking station is gone — the rail is the index. What follows are the
   rail rows' own styles; the old menu, its cards, its buttons and the compile
   readout went with the station. */

/* in the room the cards do the talking; the DOM grid is the fallback */
.gl-only { display: none; }
html.gl .gl-only { display: block; }
html.gl .no-gl-only { display: none; }
/* the archive copy keeps the upper-left; the cards own the lower half */
/* The copy block is a fixed height in pixels; the card rows sit at a fixed
   fraction of the window height. Below about 820px the two meet, and the hint is
   the paragraph that can go: the headline and the ENTER button both have work to
   do, and the cards say the same thing by being cards. */
@media (min-width: 861px) and (max-height: 820px) {
}
@media (max-width: 860px) {
  /* 22vh of a phone, on top of the header clearance, left a dead band across the
     top quarter and pushed the cards to the floor. The copy starts as high as
     the header allows and the cards take the room that frees up. */
}

/* The films that run inside the room are real <video> elements: the renderer
   copies each frame onto the panel. They are parked at one pixel, invisible,
   until a click hands one to the browser's own fullscreen. */
.gl-vid {
  position: fixed; inset: auto auto 0 0;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none; z-index: -1;
}
.gl-vid:fullscreen,
.gl-vid:-webkit-full-screen {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  opacity: 1; pointer-events: auto; z-index: 999;
  background: #000; object-fit: contain;
}

/* A phone on its side has 402px of height and 874 of width. Six cards will not
   run down that, so they become two columns of three on the right and the copy
   is held to the left of them. These rules sit at the end of the file on purpose:
   the archive menu's own `max-width: 46ch` is declared later than the mobile
   block and would otherwise win. */
@media (max-height: 540px) and (orientation: landscape) {
  html.gl .station {
    padding-top: calc(var(--chrome-h, 74px) + 8px);
    padding-bottom: 14px;
    /* the AI offer runs taller than a phone on its side; a station that cannot
       fit scrolls inside itself instead of clipping its last line */
    overflow-y: auto;
    justify-content: flex-start;
  }
}

/* Safari's address bar collapses as you move, and every `vh` jumps with it — the
   copy shifts under you mid-flight. `svh` is the height with the bar showing, so
   these stay put whichever state the bar is in. Behind @supports because the unit
   is recent enough that a fallback still matters. */
@supports (height: 1svh) {
  html.gl .hero.station { padding-bottom: clamp(90px, 14svh, 150px); }
  .footer { padding-top: clamp(70px, 12svh, 140px); }
  .built { margin-top: clamp(22px, 4svh, 44px); }
}

#panelLabels[hidden] { display: none; }
.panel-label {
  position: absolute;
  top: 0; left: 0;
  padding: 4px 0 0;
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 240, 235, 0.86);
  text-shadow: 0 1px 6px rgba(3, 3, 4, 0.95), 0 0 2px rgba(3, 3, 4, 0.9);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.panel-label[hidden] { display: none; }
@media (pointer: coarse) {
  .panel-label {
    font-size: 10px;
    letter-spacing: 0.04em;
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
