/* ==========================================================================
   MBG — Mosóczi Bálint Gusztáv
   Static, no cookies, self-hosted fonts.
   ========================================================================== */

@font-face {
  font-family: 'Archivo Black';
  src: url('/assets/fonts/archivo-black-def-400.woff2') format('woff2');
  font-weight: 400;
  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;
}
@font-face {
  font-family: 'Archivo Black';
  src: url('/assets/fonts/archivo-black-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-def-400_700.woff2') format('woff2');
  font-weight: 400 700;
  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;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin-400_700.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #070708;
  --ink-2: #0e0e11;
  --ink-3: #16161a;
  --paper: #f4efe5;
  --muted: #aaa49b;
  --red: #ff2b2b;
  --yellow: #ffe600;
  --pink: #ff2b2b;
  --pink-deep: #c41414;
  --line: rgba(244, 239, 229, 0.16);
  --line-soft: rgba(244, 239, 229, 0.08);
  --display: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  --body: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --head-h: 72px;
  --pad: clamp(20px, 4vw, 64px);
  --gap: clamp(20px, 3vw, 48px);
  /* motion tokens */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);       /* expo-out: entrances, hovers */
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);   /* quick exits, header, page-out */
  --ease-wipe: cubic-bezier(0.83, 0, 0.17, 1);     /* hard in-out for clip-path wipes */
  --ease: var(--ease-out);
  --dur-fast: 0.25s;
  --dur: 0.6s;
  --dur-slow: 1.1s;
  --max: 1560px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--ink);
  color: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.55;
  font-weight: 400;
  background: var(--ink);
  color: var(--paper);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
  opacity: 0.045;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
.media { position: relative; }
.media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection { background: var(--yellow); color: var(--ink); }

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

[hidden] { display: none !important; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #2a2a30; border: 3px solid var(--ink); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.tiny { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 69, 85, 0.16);
  flex: none;
  animation: pulse 3.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 69, 85, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(255, 69, 85, 0.02); }
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn svg { width: 14px; height: 14px; }
.btn:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--red); }
.btn--pink { background: var(--red); border-color: var(--red); color: var(--ink); box-shadow: 4px 4px 0 var(--yellow); }
.btn--pink:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); box-shadow: 4px 4px 0 var(--red); }
.btn--small { padding: 11px 16px; font-size: 10px; }
.btn:active { transform: translateY(0) scale(0.99); box-shadow: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--red);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.link-arrow svg { width: 13px; height: 13px; transition: transform 0.25s var(--ease); }
.link-arrow:hover { color: var(--yellow); }
.link-arrow:hover svg { transform: translate(3px, -3px); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  padding: 6px 10px;
  border: 1px solid currentColor;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--red);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip:focus { transform: translateY(0); color: var(--ink); }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding-inline: var(--pad);
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid transparent;
  view-transition-name: site-head;
  transition: transform 0.55s var(--ease-out), background 0.3s, border-color 0.3s;
}
.site-head.is-scrolled { border-bottom-color: var(--line); background: rgba(8, 8, 10, 0.92); }
.site-head.is-hidden { transform: translateY(-101%); transition-duration: 0.4s, 0.3s, 0.3s; transition-timing-function: var(--ease-in-out), ease, ease; }

.brand { display: flex; align-items: center; gap: 14px; flex: none; color: var(--paper); }
.brand:hover { color: var(--paper); }
.brand__mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 38px;
  padding: 0 8px;
  background: var(--red);
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.04em;
  line-height: 1;
  box-shadow: 4px 4px 0 var(--yellow);
}
.brand__mark svg { position: absolute; top: 2px; right: 3px; width: 9px; height: 9px; color: var(--yellow); }
.brand__name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  max-width: 190px;
  line-height: 1.3;
}

.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a {
  position: relative;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.nav a:hover::after, .nav a[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current='page'] { color: var(--yellow); }
.nav__contact {
  padding: 11px 16px;
  background: var(--red);
  color: var(--ink) !important;
  border: 1px solid var(--red);
  box-shadow: 3px 3px 0 var(--yellow);
}
.nav__contact::after { display: none; }
.nav__contact:hover { background: var(--yellow); border-color: var(--yellow); box-shadow: 3px 3px 0 var(--red); }

.menu-btn { display: none; align-items: center; gap: 10px; margin-left: auto; }
.menu-btn__lines { display: grid; gap: 5px; width: 22px; }
.menu-btn__lines i { display: block; height: 2px; background: var(--paper); transition: transform 0.3s var(--ease), opacity 0.3s; }
.menu-btn__label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.menu-btn[aria-expanded='true'] .menu-btn__lines i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded='true'] .menu-btn__lines i:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: var(--head-h) 0 0 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px var(--pad) 40px;
  background: var(--ink);
  overflow-y: auto;
  /* closed state: wiped away upwards, quick */
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.32s var(--ease-in-out);
}
.menu.is-open { clip-path: inset(0); transition: clip-path 0.7s var(--ease-wipe); }
.menu nav a, .menu__socials, .menu__note {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 0.2s, transform 0.2s;
}
.menu.is-open nav a, .menu.is-open .menu__socials, .menu.is-open .menu__note {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur) var(--ease-out) calc(0.2s + var(--i, 0) * 0.06s), transform 0.9s var(--ease-out) calc(0.2s + var(--i, 0) * 0.06s);
}
.menu nav { display: grid; gap: 6px; }
.menu nav a {
  font-family: var(--display);
  font-size: clamp(2.4rem, 10vw, 4.4rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}
.menu nav a:last-child { color: var(--red); }
.menu__socials { display: grid; gap: 2px; margin-top: 40px; }
.menu__socials .social { font-size: 13px; padding: 12px 0; border-top: 1px solid var(--line); }
.menu__note { margin-top: 24px; color: var(--muted); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

.social { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.06em; }
.social__icon { display: inline-flex; width: 16px; height: 16px; }
.social__icon svg { width: 100%; height: 100%; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--head-h);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.06);
  animation: heroDrift 32s ease-in-out infinite alternate;
  filter: saturate(1.05) contrast(1.03);
}
/* subtle scroll parallax, CSS only; the box is oversized so the shift never exposes an edge */
@supports (animation-timeline: scroll()) {
  .hero__bg {
    inset: -14% 0 0 0;
    animation: heroParallax linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 90svh;
  }
}
@keyframes heroParallax { to { transform: translate3d(0, 11%, 0); } }
@keyframes heroDrift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.13) translate3d(-1.2%, -1.4%, 0); }
}
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 60% at 8% 100%, rgba(255, 43, 43, 0.26), transparent 65%),
    radial-gradient(46% 48% at 94% 14%, rgba(255, 230, 0, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(7, 7, 8, 0.62) 0%, rgba(7, 7, 8, 0.18) 32%, rgba(7, 7, 8, 0.55) 72%, rgba(7, 7, 8, 0.96) 100%);
}
.hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: 40px var(--pad) clamp(34px, 6vh, 64px);
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 4vh, 40px);
}
.hero__top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero__top .eyebrow { color: var(--paper); }

.hero__title {
  font-family: var(--display);
  font-size: clamp(3.2rem, 12.4vw, 12rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  font-weight: 400;
}
.hero__line { display: block; }
/* line mask: padded so accents (Ó, Á) and the outline stroke are never clipped; margins cancel the padding */
.hero__mask {
  display: block;
  overflow: hidden;
  padding: 0.3em 0.15em 0.18em;
  margin: -0.3em -0.15em -0.18em;
}
.hero__word {
  display: block;
  transform-origin: 0 100%;
  animation: heroRise 1.2s var(--ease-out) calc(0.15s + var(--i, 0) * 0.11s) backwards;
}
@keyframes heroRise {
  from { transform: translateY(calc(100% + 0.5em)) skewY(5deg); }
}
.hero__line--outline {
  margin-left: 0.14em;
  color: transparent;
  -webkit-text-stroke: 2px var(--paper);
  text-stroke: 2px var(--paper);
}
.hero__line--last .hero__word { display: flex; align-items: flex-start; gap: 0.06em; }
.hero__line--last em {
  font-style: normal;
  color: var(--yellow);
  font-size: 0.42em;
  line-height: 0.8;
  transform: translateY(0.12em);
}
.hero__line[data-text] { position: relative; isolation: isolate; }
.hero__line[data-text]::before,
.hero__line[data-text]::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}
/* name glitch: one brief burst every ~10.5s (first one ~5s after load, other line offset), plus one on hover.
   --s mirrors the offset direction for the red (-1) and yellow (+1) ghost. */
.hero__line[data-text]::before {
  --s: -1;
  color: var(--red);
  transform: translate(-0.02em, 0.006em);
  animation: glitch 10.5s steps(1) -4.8s infinite;
}
.hero__line[data-text]::after {
  --s: 1;
  color: var(--yellow);
  transform: translate(0.02em, -0.006em);
  animation: glitch 10.5s steps(1) -4.7s infinite;
}
.hero__line--last[data-text]::before { animation-delay: -0.5s; }
.hero__line--last[data-text]::after { animation-delay: -0.4s; }
@keyframes glitch {
  0%, 93%, 97%, 100% { opacity: 0; translate: 0 0; }
  93.1% { opacity: 0.95; translate: calc(var(--s) * 0.12em) -0.01em; }
  94.2% { opacity: 0.9; translate: calc(var(--s) * -0.14em) 0.008em; }
  95.2% { opacity: 0.95; translate: calc(var(--s) * 0.18em) 0; }
  96.2% { opacity: 0.8; translate: calc(var(--s) * -0.08em) 0.006em; }
}
@keyframes glitchHover {
  0% { opacity: 0.95; translate: calc(var(--s) * 0.12em) -0.01em; }
  22% { opacity: 0.9; translate: calc(var(--s) * -0.14em) 0.008em; }
  44% { opacity: 0.95; translate: calc(var(--s) * 0.18em) 0; }
  68% { opacity: 0.8; translate: calc(var(--s) * -0.08em) 0.006em; }
  90%, 100% { opacity: 0; translate: 0 0; }
}
@media (hover: hover) {
  .hero__line[data-text]:hover::before,
  .hero__line[data-text]:hover::after { animation: glitchHover 0.5s steps(1) 0s 1; }
}
.hero__foot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 22px;
}
.hero__foot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(243, 239, 231, 0.28);
  transform-origin: left;
  animation: heroLine 1.4s var(--ease-wipe) 0.55s backwards;
}
@keyframes heroLine { from { transform: scaleX(0); } }

/* hero load-in: name rises (above), then meta, lede, buttons and badge follow */
@keyframes heroFade { from { opacity: 0; transform: translateY(14px); } }
.hero__top { animation: heroFade 0.9s var(--ease-out) 0.6s backwards; }
.hero__lede { animation: heroFade 1s var(--ease-out) 0.85s backwards; }
.hero__actions .btn { animation: heroFade 1s var(--ease-out) 1s backwards; }
.hero__actions .btn + .btn { animation-delay: 1.08s; }
.hero__lede {
  max-width: 34ch;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.35;
  font-weight: 500;
}
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero__badge {
  position: absolute;
  top: calc(var(--head-h) + 28px);
  right: var(--pad);
  width: 116px;
  height: 116px;
  z-index: 2;
  animation: badgeIn 1.2s var(--ease-out) 1.15s backwards;
}
@keyframes badgeIn { from { opacity: 0; transform: scale(0.72) rotate(-35deg); } }
.hero__badge svg { width: 100%; height: 100%; animation: spin 40s linear infinite; }
.hero__badge text {
  fill: var(--paper);
  font-family: var(--body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero__badge-star {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--yellow);
}
.hero__badge-star svg { width: 22px; height: 22px; animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ticker */
.ticker {
  background: var(--yellow);
  color: var(--ink);
  border-block: 2px solid var(--ink);
  overflow: hidden;
  padding: 9px 0;
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  padding-right: 22px; /* = gap, so one copy is exactly width/6 and the loop is seamless */
  animation: marquee 34s linear infinite;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker__track i { font-style: normal; font-size: 13px; color: var(--red); }
@media (hover: hover) {
  .ticker:hover .ticker__track { animation-play-state: paused; }
}
/* six identical copies; one copy = 1/6 of the track */
@keyframes marquee { to { transform: translateX(calc(-100% / 6)); } }

/* ==========================================================================
   Sections
   ========================================================================== */

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.55fr);
  gap: 20px 40px;
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.section-head .eyebrow { grid-column: 1 / -1; }
.section-head--row { grid-template-columns: minmax(0, 1fr) minmax(0, 0.42fr); }
.section-title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: 400;
  text-shadow: 3px 0 0 rgba(255, 43, 43, 0.22), -3px 0 0 rgba(255, 230, 0, 0.16);
}
.section-count { font-size: 0.32em; color: var(--red); letter-spacing: 0; vertical-align: top; }
.section-intro { align-self: end; justify-self: end; max-width: 38ch; color: var(--muted); font-size: 15px; }

.work { padding-block: clamp(64px, 9vw, 130px) clamp(50px, 7vw, 100px); }
#work, #game, #open-source, #services { scroll-margin-top: calc(var(--head-h) + 24px); }
.about-teaser, .services, .clients-strip, .github-teaser { padding-block: clamp(56px, 8vw, 120px); border-top: 1px solid var(--line); }

/* filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(26px, 3vw, 44px);
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all 0.22s var(--ease);
}
.filter span { font-size: 9px; color: var(--muted); }
.filter:hover { border-color: var(--paper); color: var(--paper); }
.filter.is-active { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.filter.is-active span { color: rgba(7, 7, 8, 0.82); }

/* feed + cards */
.feed {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(26px, 3.4vw, 58px) clamp(18px, 2.4vw, 36px);
  align-items: start;
}
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card--xl { grid-column: span 12; }
.card--lg { grid-column: span 7; }
.card--md { grid-column: span 5; }
.card--half { grid-column: span 6; }

.card__media {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  background-image: var(--lqip);
  background-size: cover;
  background-position: center;
}
.card__media::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--lqip);
  background-size: cover;
  background-position: center;
  filter: blur(14px);
  transform: scale(1.06);
}
.card__media img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  clip-path: inset(0 0);
  transition: transform 0.6s var(--ease-out), clip-path 0.5s var(--ease-out), filter 0.3s;
}
.media__ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-out);
}
.media__ghost--red {
  filter: grayscale(1) sepia(1) saturate(7) hue-rotate(-35deg) brightness(1.1) contrast(1.05);
  transform: translate(-6px, 0);
}
.media__ghost--yellow {
  filter: grayscale(1) sepia(1) saturate(7) hue-rotate(15deg) brightness(1.25) contrast(1.05);
  transform: translate(6px, 0);
}
.card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 8, 10, 0.55));
  opacity: 0;
  transition: opacity 0.35s;
}
.card:focus-visible .card__media img { transform: scale(1.022); clip-path: inset(0 1%); filter: none; }
.card:focus-visible .media__ghost { opacity: 0.9; }
.card:focus-visible .media__ghost--red { transform: translate(-10px, 0); }
.card:focus-visible .media__ghost--yellow { transform: translate(10px, 0); }
@media (hover: hover) {
  .card:hover .card__media img { transform: scale(1.022); clip-path: inset(0 1%); filter: none; }
  .card:hover .media__ghost { opacity: 0.9; }
  .card:hover .media__ghost--red { transform: translate(-10px, 0); }
  .card:hover .media__ghost--yellow { transform: translate(10px, 0); }
}

.card__num {
  position: absolute;
  top: 10px;
  left: 14px;
  z-index: 3;
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 46px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-shadow: 3px 3px 0 rgba(255, 43, 43, 0.55), -2px -2px 0 rgba(255, 230, 0, 0.25);
}
.card__award {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--red);
}
.card__award svg { width: 11px; height: 11px; color: var(--red); }
.card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 18px;
  padding-top: 14px;
  border-top: 1px solid transparent;
  transition: border-color 0.3s;
}
.card__meta {
  grid-column: 1 / -1;
  display: flex;
  gap: 14px;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.card__meta span + span::before { content: '— '; opacity: 0.5; }
.card__title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-weight: 400;
  transition: color 0.25s;
}
.card:focus-visible .card__title { color: var(--yellow); }
@media (hover: hover) { .card:hover .card__title { color: var(--yellow); } }
.card__artist { font-size: 14px; color: var(--muted); }
.card__roles {
  grid-column: 1 / -1;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.card__go {
  grid-row: 2 / span 2;
  grid-column: 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  overflow: hidden;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
/* two arrows share one cell: on hover the first leaves top-right while the second enters from bottom-left */
.card__go svg { grid-area: 1 / 1; width: 15px; height: 15px; transition: transform 0.5s var(--ease-out); }
.card__go svg + svg { transform: translate(-170%, 170%); }
.card:focus-visible .card__go { background: var(--yellow); border-color: var(--yellow); color: var(--ink); box-shadow: 3px 3px 0 var(--red); }
.card:focus-visible .card__go svg:first-child { transform: translate(170%, -170%); }
.card:focus-visible .card__go svg + svg { transform: none; }
@media (hover: hover) {
  .card:hover .card__go { background: var(--yellow); border-color: var(--yellow); color: var(--ink); box-shadow: 3px 3px 0 var(--red); }
  .card:hover .card__go svg:first-child { transform: translate(170%, -170%); }
  .card:hover .card__go svg + svg { transform: none; }
}

.card--xl .card__title { font-size: clamp(1.8rem, 3.6vw, 3.6rem); }
.card--xl .card__body { padding-top: 18px; }

.card__media--type {
  display: grid;
  place-items: center;
  background: var(--ink-3);
  border: 1px solid var(--line);
}
.card__media--type span {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 3.4rem);
  text-transform: uppercase;
  color: var(--line);
  padding: 20px;
  text-align: center;
}

.feed__empty { padding: 60px 0; color: var(--muted); font-size: 14px; }

/* more credits */
.more-credits { padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.more-credits__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.more-credits__list { border-top: 1px solid var(--line); }
.more-credits__list li {
  display: grid;
  grid-template-columns: 62px minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 6px 20px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.more-credits__list span { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.more-credits__list strong {
  font-family: var(--display);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-weight: 400;
}
.more-credits__list em { font-style: normal; font-size: 13px; color: var(--muted); }

.h2, .page-title, .case__title, .game-title, .game-feature__title, .notfound__title {
  text-shadow: 3px 0 0 rgba(255, 43, 43, 0.22), -3px 0 0 rgba(255, 230, 0, 0.16);
}
.page-title span,
.game-title span,
.game-feature__title span,
.notfound__title span { text-shadow: none; }
.h2, .section-title, .page-title, .case__title, .contact-block h2 { text-wrap: balance; }

/* about teaser */.about-teaser__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}
.about-teaser__media { grid-column: span 5; position: relative; }
.about-teaser__frame,
.about-hero__media .media { position: relative; isolation: isolate; }
.about-teaser__frame .media { overflow: hidden; }
.about-teaser__frame::after,
.about-hero__media .media::after {
  content: '';
  position: absolute;
  inset: 16px -16px -16px 16px;
  border: 1px solid var(--red);
  z-index: -1;
  pointer-events: none;
}
.about-teaser__media figcaption {
  margin-top: 28px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-teaser__text { grid-column: span 6; padding-top: clamp(0px, 3vw, 40px); }
.about-teaser__text .h2 { margin: 14px 0 20px; }
.about-teaser__text p { color: var(--muted); max-width: 52ch; margin-bottom: 14px; }
.about-teaser__text .link-arrow { margin-top: 12px; }
.stats {
  grid-column: 7 / span 6;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(20px, 3vw, 40px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stats dt {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--red);
}
.stats div:nth-child(even) dt { color: var(--yellow); }
.stats dd { font-size: 11px; line-height: 1.35; color: var(--muted); margin-top: 8px; max-width: 14ch; }

.h2, .section-title { font-weight: 400; }
.h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.h2 em { font-style: normal; color: var(--red); }

/* services */
.service-list { border-top: 1px solid var(--line); }
.service {
  display: grid;
  grid-template-columns: 60px minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 0.6fr);
  gap: 18px;
  align-items: center;
  padding: 26px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), color 0.3s, padding-left 0.3s;
}
.service:hover { background: var(--yellow); color: var(--ink); padding-left: 28px; }
.service__num { font-size: 10px; letter-spacing: 0.14em; color: var(--muted); }
.service:hover .service__num { color: var(--red); }
.service h3 {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.1vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-weight: 400;
}
.service p { font-size: 14px; color: var(--muted); max-width: 52ch; }
.service:hover p { color: rgba(7, 7, 8, 0.8); }
.service__tag { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: right; }
.service:hover .service__tag { color: rgba(7, 7, 8, 0.65); }

/* game teaser */
.game-teaser {
  background: var(--red);
  color: var(--ink);
  padding-block: clamp(56px, 8vw, 110px);
  border-block: 1px solid var(--ink);
}
.game-teaser__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}
.game-teaser .eyebrow { color: rgba(8, 8, 10, 0.82); }
.game-teaser .eyebrow .dot { background: var(--ink); box-shadow: none; animation: none; }
.game-title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 5.6vw, 5rem);
  line-height: 0.82;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  margin: 16px 0 22px;
  overflow-wrap: anywhere;
}
.game-title span { -webkit-text-stroke: 2px var(--ink); color: transparent; }
.game-teaser__text p { max-width: 42ch; margin-bottom: 18px; }
.game-teaser .tags span { border-color: rgba(8, 8, 10, 0.4); opacity: 1; }
.game-teaser .btn { margin-top: 22px; background: var(--ink); border-color: var(--ink); color: var(--paper); }
.game-teaser .btn:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); box-shadow: 4px 4px 0 var(--paper); }
.game-teaser__shot { display: block; border: 2px solid var(--ink); position: relative; }
.game-teaser__shot .media { background: var(--ink); }
.game-teaser__shot img { transition: transform 0.9s var(--ease); }
.game-teaser__shot:hover img { transform: scale(1.03); }
.game-teaser__shot:focus-visible img { transform: scale(1.03); }

/* clients */
.client-list { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 22px; }
.client-list li {
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.2vw, 1.9rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 26px;
  transition: color 0.2s;
}
.client-list li::after { content: '✳'; font-size: 0.4em; color: var(--red); }
.client-list li:last-child::after { display: none; }
.client-list li:hover { color: var(--yellow); }

/* github teaser */
.github-teaser__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--gap); align-items: start; }
.github-teaser__grid p { color: var(--muted); max-width: 44ch; margin: 18px 0 22px; }
.repo-mini { display: grid; gap: 12px; }
.repo-mini a {
  display: grid;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  transition: border-color 0.25s, background 0.25s;
}
.repo-mini a:hover { border-color: var(--yellow); background: var(--ink-2); }
.repo-mini__name { font-family: var(--display); font-size: 18px; letter-spacing: -0.01em; text-transform: uppercase; }
.repo-mini__desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.repo-mini__meta { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-foot {
  position: relative;
  border-top: 4px solid transparent; /* the red rule is ::before (scroll-drawn where supported) */
  padding: clamp(50px, 7vw, 100px) var(--pad) 28px;
  background: var(--ink);
}
.site-foot::before { content: ""; position: absolute; top: -4px; left: 0; right: 0; height: 4px; background: var(--red); transform-origin: left; }
.site-foot > * { max-width: var(--max); margin-inline: auto; }
.foot__cta { border-bottom: 1px solid var(--line); padding-bottom: clamp(34px, 5vw, 60px); }
.foot__mail {
  display: block;
  margin: 18px 0 14px;
  font-family: var(--display);
  font-size: clamp(1rem, 4.5vw, 3.9rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  overflow-wrap: normal;
  transition: color 0.25s;
}
.foot__mail span { white-space: nowrap; }
.foot__mail:hover { color: var(--yellow); }
.foot__pitch { color: var(--muted); font-size: 14px; }
.foot__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-block: 40px;
}
.foot__col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.foot__col h2 { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.foot__col a, .foot__col button { font-size: 13px; color: var(--paper); display: inline-flex; align-items: center; gap: 8px; }
.foot__col a:hover, .foot__col button:hover { color: var(--yellow); }
.foot__top svg { width: 12px; height: 12px; transform: rotate(180deg); }
.foot__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot__badge { display: inline-flex; align-items: center; gap: 8px; }
.foot__badge .dot { animation: none; box-shadow: none; width: 5px; height: 5px; }

/* ==========================================================================
   Case / project page
   ========================================================================== */

.case { padding-top: var(--head-h); }
.case__head { padding-top: clamp(30px, 5vw, 64px); }
.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(26px, 4vw, 52px);
}
.back svg { width: 12px; height: 12px; transform: rotate(180deg); }
.back:hover { color: var(--paper); }
.case__kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.case__kicker span:first-child { color: var(--red); }
.case__title {
  font-family: var(--display);
  font-size: clamp(2rem, 9.6vw, 10rem);
  line-height: 0.84;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin: 14px 0 10px;
  overflow-wrap: anywhere;
}
.case__artist { font-size: clamp(18px, 2.2vw, 30px); color: var(--red); font-weight: 500; }
.case__roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.case__roles li {
  padding: 8px 12px;
  border: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.case__award {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 8px 14px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--red);
}
.case__award svg { width: 12px; height: 12px; color: var(--red); }
.case__series {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.25s var(--ease), color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.case__series span { color: var(--red); }
.case__series strong {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper);
}
.case__series svg { width: 12px; height: 12px; }
.case__series:hover,
.case__series:focus-visible {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--red);
}
.case__series:hover span,
.case__series:hover strong,
.case__series:focus-visible span,
.case__series:focus-visible strong { color: var(--ink); }

.case__hero {
  margin: clamp(30px, 5vw, 64px) 0 0;
  position: relative;
  background: var(--ink-2);
}
.case__hero .media { width: 100%; }
.case__hero img { width: 100%; height: 100%; object-fit: cover; }
.case__hero .media { max-height: 86svh; overflow: hidden; }
.case__hero--portrait .media { max-width: 760px; margin-inline: auto; }
.case__hero--contained .media { max-width: min(900px, 100%); margin-inline: auto; }
.case__caption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px var(--pad);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.case__hero-type { display: grid; place-items: center; min-height: 40vh; }
.case__hero-type span { font-family: var(--display); font-size: clamp(2rem, 8vw, 7rem); text-transform: uppercase; color: var(--line); }

.case__main {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 760px);
  justify-content: space-between;
  gap: clamp(28px, 6vw, 90px);
  padding-block: clamp(45px, 7vw, 100px);
}
.case__side { position: sticky; top: calc(var(--head-h) + 30px); align-self: start; }
.case-meta { display: grid; gap: 16px; }
.case-meta div { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.case-meta dt { font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.case-meta dd { font-size: 13px; line-height: 1.4; }
.case__links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 24px; }

.case__text { min-width: 0; }
.what { border-left: 3px solid var(--red); padding-left: clamp(18px, 2.4vw, 32px); margin-bottom: clamp(34px, 5vw, 56px); }
.what__text { font-size: clamp(18px, 1.9vw, 24px); line-height: 1.4; margin-top: 12px; }
.prose { color: rgba(243, 239, 231, 0.86); }
.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--paper); border-bottom: 1px solid var(--red); }
.prose a:hover { color: var(--red); }
.prose strong { color: var(--paper); }
.prose h2, .prose h3 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 1.6em 0 0.6em;
}
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 2.2rem); }
.prose h3 { font-size: clamp(1.2rem, 1.8vw, 1.6rem); }
.prose ul { list-style: none; margin: 1em 0; }
.prose ul li { position: relative; padding-left: 18px; margin-bottom: 0.4em; }
.prose ul li::before { content: '✳'; position: absolute; left: 0; top: 0; color: var(--red); font-size: 10px; line-height: 1.9; }
.prose blockquote { border-left: 2px solid var(--red); padding-left: 20px; color: var(--muted); }
.prose--large { font-size: 17px; }

.credits { margin-top: clamp(40px, 6vw, 70px); padding-top: 26px; border-top: 1px solid var(--line); }
.credits h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin-bottom: 22px;
}
.credits dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.credits dl > div { display: grid; grid-template-columns: minmax(90px, 0.6fr) minmax(0, 1fr); gap: 14px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.credits dt { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.credits dd { font-size: 13px; line-height: 1.45; }

/* series */
.case-series { padding-block: clamp(30px, 5vw, 70px); border-top: 1px solid var(--line); }
.case-series__head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.series-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); align-items: start; }
.series-card { display: flex; flex-direction: column; min-width: 0; }
.series-card__media {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  background-image: var(--lqip);
  background-size: cover;
  background-position: center;
}
.series-card__media img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  clip-path: inset(0 0);
  transition: transform 0.6s var(--ease-out), clip-path 0.5s var(--ease-out);
}
.series-card:focus-visible .series-card__media img { transform: scale(1.022); clip-path: inset(0 1%); }
.series-card:focus-visible .media__ghost { opacity: 0.9; }
.series-card:focus-visible .media__ghost--red { transform: translate(-10px, 0); }
.series-card:focus-visible .media__ghost--yellow { transform: translate(10px, 0); }
@media (hover: hover) {
  .series-card:hover .series-card__media img { transform: scale(1.022); clip-path: inset(0 1%); }
  .series-card:hover .media__ghost { opacity: 0.9; }
  .series-card:hover .media__ghost--red { transform: translate(-10px, 0); }
  .series-card:hover .media__ghost--yellow { transform: translate(10px, 0); }
}
.series-card__media--type { display: grid; place-items: center; border: 1px solid var(--line); background: repeating-linear-gradient(45deg, rgba(255, 43, 43, 0.07) 0 1px, transparent 1px 12px), var(--ink-3); }
.series-card__media--type span { font-family: var(--display); text-transform: uppercase; font-size: 1rem; color: var(--muted); }
.series-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.series-card__num { font-size: 10px; letter-spacing: 0.14em; color: var(--red); }
.series-card h3 {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.6vw, 1.55rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-weight: 400;
  transition: color 0.25s var(--ease);
}
.series-card p { font-size: 12px; line-height: 1.45; color: var(--muted); }
.series-card .link-arrow { margin-top: auto; padding-top: 12px; font-size: 10px; }
.series-card:hover h3, .series-card:focus-visible h3 { color: var(--yellow); }

/* gallery */
.case-gallery { padding-block: clamp(30px, 5vw, 70px); border-top: 1px solid var(--line); }
.case-gallery__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gallery__item {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  background: var(--ink-2);
  aspect-ratio: 16 / 10;
}
.gallery__item--wide { grid-column: span 2; aspect-ratio: 21 / 9; }
.gallery--portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery--portrait .gallery__item { aspect-ratio: 4 / 5; }
.gallery__item .media { width: 100%; height: 100%; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease), opacity 0.3s; }
.gallery__item:hover img { transform: scale(1.035); }
.gallery__item:focus-visible img { transform: scale(1.035); }
.gallery__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s var(--ease);
}
.gallery__zoom svg { width: 13px; height: 13px; }
.gallery__item:hover .gallery__zoom { opacity: 1; transform: none; }

/* lightbox */
.lightbox {
  width: min(94vw, 1500px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  overflow: visible;
  /* closed state = exit: quick fade/settle. display + overlay keep the dialog rendered while it animates out */
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.22s var(--ease-in-out), transform 0.22s var(--ease-in-out), display 0.22s allow-discrete, overlay 0.22s allow-discrete;
}
.lightbox[open] {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s var(--ease-out), transform 0.7s var(--ease-out), display 0.45s allow-discrete, overlay 0.45s allow-discrete;
}
@starting-style {
  .lightbox[open] { opacity: 0; transform: translateY(18px) scale(0.97); }
}
.lightbox::backdrop {
  background: rgba(4, 4, 6, 0.94);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.22s var(--ease-in-out), display 0.22s allow-discrete, overlay 0.22s allow-discrete;
}
.lightbox[open]::backdrop { opacity: 1; transition: opacity 0.4s var(--ease-out), display 0.4s allow-discrete, overlay 0.4s allow-discrete; }
@starting-style {
  .lightbox[open]::backdrop { opacity: 0; }
}
.lightbox__inner { position: relative; display: grid; gap: 10px; justify-items: center; }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; height: auto; object-fit: contain; view-transition-name: lightbox-img; }
.lightbox__bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; width: 100%; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lightbox__close, .lightbox__prev, .lightbox__next {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: var(--red); color: var(--ink); border-color: var(--red); }
.lightbox__close svg, .lightbox__prev svg, .lightbox__next svg { width: 16px; height: 16px; }
.lightbox__controls { display: flex; gap: 8px; }
.lightbox__prev svg { transform: rotate(180deg); }

/* video embeds */
.case-videos { padding-block: clamp(30px, 5vw, 70px); border-top: 1px solid var(--line); }
.case-videos__head { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; margin-bottom: 20px; flex-wrap: wrap; }
.embed-list { display: grid; gap: 22px; width: 100%; }
.embed { position: relative; }
.embed__btn { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; background: var(--ink-2); }
.embed__btn .media { width: 100%; }
.embed__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease), filter 0.4s; }
.embed__btn:hover img { transform: scale(1.02); filter: brightness(0.8); }
.embed__btn:focus-visible img { transform: scale(1.02); filter: brightness(0.8); }
.embed__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.7);
}
.embed__play svg {
  width: 64px;
  height: 64px;
  padding: 18px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--red);
  transition: transform 0.3s var(--ease);
}
.embed__btn:hover .embed__play svg { transform: scale(1.08); }
.embed__note { margin-top: 8px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.embed iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }

/* next */
.case-next { border-top: 1px solid var(--line); }
.case-next > a {
  display: grid;
  grid-template-columns: 1fr auto minmax(160px, 240px) 54px;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(28px, 5vw, 56px) var(--pad);
  max-width: var(--max);
  margin-inline: auto;
  transition: background 0.3s, color 0.3s;
}
.case-next > a:hover { background: var(--yellow); color: var(--ink); }
.case-next .eyebrow { grid-column: 1 / -1; }
.case-next__title {
  grid-column: 1;
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 4.4rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.case-next__artist { grid-column: 2; justify-self: end; font-size: 13px; color: var(--muted); max-width: 18ch; text-align: right; }
.case-next > a:hover .case-next__artist { color: rgba(7, 7, 8, 0.7); }
.case-next__media { grid-column: 3; width: 100%; }
.case-next__arrow { grid-column: 4; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 1px solid currentColor; }
.case-next__arrow svg { width: 18px; height: 18px; }
.case-next > a:hover .case-next__arrow { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ==========================================================================
   Generic page hero
   ========================================================================== */

.page-hero { padding-top: calc(var(--head-h) + clamp(40px, 7vw, 90px)); padding-bottom: clamp(34px, 5vw, 60px); }
.page-hero .wrap { display: grid; gap: 18px; }
.page-title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 9.5vw, 9rem);
  line-height: 0.84;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  font-weight: 400;
}
.page-title span { color: transparent; -webkit-text-stroke: 2px var(--paper); }
/* one block per title line (flow-root: the mask margins stay inside the line) */
.tl { display: flow-root; font-style: normal; }
.page-lead { max-width: 62ch; font-size: clamp(16px, 1.7vw, 21px); color: var(--muted); line-height: 1.45; }
.page-hero__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.page-hero__meta span {
  padding: 7px 11px;
  border: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-hero--small { padding-top: calc(var(--head-h) + 40px); padding-bottom: 20px; }

.prose--intro { padding-bottom: clamp(20px, 4vw, 40px); max-width: 780px; font-size: 17px; }
.legal { max-width: 760px; padding-bottom: 80px; }
.legal .prose h2 { font-size: clamp(1.2rem, 1.7vw, 1.55rem); margin-top: 2.4em; }
.legal .prose h2:first-child { margin-top: 0; }
.legal__note { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ==========================================================================
   Misc page
   ========================================================================== */

.game-feature { border-top: 1px solid var(--line); padding-block: clamp(50px, 7vw, 100px); }
.game-feature__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 70px); align-items: start; }
.game-feature__title {
  font-family: var(--display);
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.84;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin: 14px 0 16px;
}
.game-feature__title span { color: transparent; -webkit-text-stroke: 2px var(--paper); }
.game-feature__tag { font-size: clamp(16px, 1.7vw, 20px); line-height: 1.4; color: var(--muted); margin-bottom: 18px; }
.game-feature__text .prose { margin-top: 22px; }
.game-feature__text .case__links { flex-direction: row; flex-wrap: wrap; }
.game-feature__shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.game-feature__shots--logo { display: block; }
.game-logo { border: 1px solid var(--line); background: #08060f; overflow: hidden; }
.game-shot { padding: 0; overflow: hidden; background: var(--ink-2); aspect-ratio: 16 / 9; display: block; position: relative; }
.game-shot .media { width: 100%; height: 100%; }
.game-shot--wide { grid-column: span 2; aspect-ratio: 16 / 9; }
.game-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.game-shot:hover img { transform: scale(1.025); }
.game-feature__text .link-arrow { margin-top: 18px; }

.misc-grid-section { border-top: 1px solid var(--line); padding-block: clamp(50px, 7vw, 100px); }
.misc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 3vw, 40px); }
.misc-card { display: flex; flex-direction: column; }
.misc-card .media { width: 100%; overflow: hidden; }
.misc-card img { transition: transform 0.9s var(--ease); }
.misc-card:hover img { transform: scale(1.03); }
.misc-card:focus-visible img { transform: scale(1.03); }
.misc-card__type { display: grid; place-items: center; aspect-ratio: 16 / 9; background: repeating-linear-gradient(45deg, rgba(255, 69, 85, 0.07) 0 1px, transparent 1px 14px), var(--ink-3); border: 1px solid var(--line); }
.misc-card__type span { font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.6rem); color: transparent; -webkit-text-stroke: 1px var(--muted); text-transform: uppercase; text-align: center; padding: 16px; }
.misc-card__body { padding-top: 16px; }
.misc-card__body h3 {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.4vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-weight: 400;
  margin: 10px 0 8px;
}
.misc-card:hover h3 { color: var(--yellow); }
.misc-card__body p { color: var(--muted); font-size: 14px; max-width: 44ch; margin-bottom: 14px; }

.open-source { border-top: 1px solid var(--line); padding-block: clamp(50px, 7vw, 100px); }
.repos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.repo {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.repo:hover { border-color: var(--yellow); background: var(--ink-2); transform: translateY(-3px); }
.repo__top { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.repo__name { font-family: var(--display); font-size: clamp(1.1rem, 1.8vw, 1.5rem); letter-spacing: -0.01em; text-transform: uppercase; overflow-wrap: anywhere; }
.repo__arrow { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; flex: none; }
.repo__arrow svg { width: 13px; height: 13px; }
.repo:hover .repo__arrow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.repo__desc { font-size: 13px; line-height: 1.45; color: var(--muted); }
.repo__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.repo__lang { display: inline-flex; align-items: center; gap: 6px; }
.repo__lang i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.repo__topics { display: flex; flex-wrap: wrap; gap: 6px; }
.repo__topics span { font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 3px 6px; }

.stack { border-top: 1px solid var(--line); padding-block: clamp(36px, 5vw, 60px); }
.stack__list { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; }
.stack__list li { font-family: var(--display); font-size: clamp(1rem, 2vw, 1.7rem); text-transform: uppercase; color: var(--muted); }
.stack__list li::after { content: '✳'; font-size: 0.45em; color: var(--red); margin-left: 28px; vertical-align: middle; }
.stack__list li:nth-child(even)::after { color: var(--yellow); }
.stack__list li:last-child::after { display: none; }

/* ==========================================================================
   Film diary
   ========================================================================== */

.film-hero { padding-top: calc(var(--head-h) + clamp(30px, 6vw, 70px)); padding-bottom: clamp(24px, 4vw, 44px); }
.film-hero .page-lead { max-width: 26ch; }
.film-hero__meta { display: flex; align-items: center; gap: 16px 32px; flex-wrap: wrap; margin-top: 22px; }
.film-count { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.film-count strong { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 400; color: var(--yellow); letter-spacing: -0.02em; margin-right: 7px; }
.film-favorites { border-top: 1px solid var(--line); padding-block: clamp(36px, 5vw, 64px); }
.film-favorites__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.film-favorite { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.film-favorite__poster { background: var(--ink-2); overflow: hidden; }
.film-favorite__poster img { transition: transform 0.9s var(--ease); }
.film-favorite:hover .film-favorite__poster img,
.film-favorite:focus-visible .film-favorite__poster img { transform: scale(1.035); }
.film-favorite__poster--empty { display: grid; place-items: center; aspect-ratio: 2 / 3; border: 1px solid var(--line); background: repeating-linear-gradient(45deg, rgba(255, 43, 43, 0.07) 0 1px, transparent 1px 12px), var(--ink-3); }
.film-favorite__poster--empty span { font-family: var(--display); text-transform: uppercase; font-size: clamp(0.8rem, 1.2vw, 1rem); color: var(--muted); text-align: center; padding: 12px; }
.film-favorite__body { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 10px; }
.film-favorite__body span { font-size: 10px; letter-spacing: 0.14em; color: var(--red); }
.film-favorite__body h3 { font-family: var(--display); font-size: clamp(1rem, 1.7vw, 1.45rem); line-height: 1.05; letter-spacing: -0.01em; text-transform: uppercase; font-weight: 400; margin-top: 4px; }
.film-favorite__body p { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.film-recent { border-top: 1px solid var(--line); padding-block: clamp(40px, 6vw, 80px); }
.film-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(22px, 3vw, 36px) clamp(12px, 1.6vw, 20px); }
.film-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; height: 100%; }
.film-card__poster { position: relative; background: var(--ink-2); overflow: hidden; }
.film-card__poster img { transition: transform 0.9s var(--ease); }
.film-card:hover .film-card__poster img { transform: scale(1.035); }
.film-card:focus-visible .film-card__poster img { transform: scale(1.035); }
.film-card__poster--empty { display: grid; place-items: center; aspect-ratio: 2 / 3; border: 1px solid var(--line); background: repeating-linear-gradient(45deg, rgba(255, 43, 43, 0.07) 0 1px, transparent 1px 12px), var(--ink-3); }
.film-card__poster--empty span { font-family: var(--display); text-transform: uppercase; font-size: clamp(0.8rem, 1.2vw, 1rem); color: var(--muted); text-align: center; padding: 12px; }
.film-card__body { display: flex; flex: 1; flex-direction: column; gap: 4px; }
.film-card__body h3 { font-family: var(--display); font-size: clamp(0.95rem, 1.15vw, 1.15rem); line-height: 1.1; letter-spacing: -0.01em; text-transform: uppercase; font-weight: 400; transition: color 0.2s; }
.film-card:hover .film-card__body h3 { color: var(--yellow); }
.film-card:focus-visible .film-card__body h3 { color: var(--yellow); }
.film-card__meta { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.film-card__rating { color: var(--yellow); letter-spacing: 0.04em; white-space: nowrap; }
.film-card__date { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.film-note { margin-top: clamp(24px, 4vw, 40px); padding-top: 16px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ==========================================================================
   About page
   ========================================================================== */

.about-hero { padding-top: calc(var(--head-h) + clamp(30px, 6vw, 70px)); }
.about-hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 70px); align-items: end; }
.about-hero__grid .wrap { display: grid; }
.about-hero .page-lead { margin-top: 24px; max-width: 46ch; }
.about-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.about-hero__media { position: relative; }
.about-hero__media figcaption { margin-top: 28px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.about-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.5fr); gap: clamp(28px, 6vw, 90px); padding-block: clamp(50px, 7vw, 90px); border-top: 1px solid var(--line); margin-top: clamp(40px, 6vw, 80px); }
.about-layout__side { display: grid; gap: 26px; align-content: start; }
.about-side { border-top: 1px solid var(--line); padding-top: 14px; }
.about-side h2 { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.about-side li, .about-side p { font-size: 13px; line-height: 1.6; }

.clients-section { border-top: 1px solid var(--line); padding-block: clamp(50px, 7vw, 100px); }
.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.client-grid li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--display);
  font-size: clamp(0.9rem, 1.5vw, 1.25rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.client-grid li:nth-child(3n + 1) { border-right: 1px solid var(--line-soft); padding-right: 16px; }
.client-grid li:nth-child(3n + 2) { border-right: 1px solid var(--line-soft); padding-inline: 16px; }
.client-grid li:nth-child(3n) { padding-left: 16px; }
.client-grid li:hover { color: var(--yellow); }
.client-grid a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.client-grid a span { font-size: 0.6em; color: var(--red); transition: color 0.2s, transform 0.2s; }
.client-grid a:hover { color: var(--yellow); border-bottom-color: var(--yellow); }
.client-grid a:hover span { color: var(--yellow); transform: translate(2px, -2px); }

.award { background: var(--yellow); color: var(--ink); border-block: 2px solid var(--ink); padding-block: clamp(44px, 6vw, 80px); }
.award__inner { display: grid; gap: 10px; }
.award .eyebrow { color: rgba(7, 7, 8, 0.68); }
.award__title { font-family: var(--display); font-size: clamp(2.6rem, 7vw, 6rem); line-height: 0.85; letter-spacing: -0.04em; text-transform: uppercase; }
.award__meta { font-size: clamp(15px, 1.6vw, 19px); }
.award .link-arrow { justify-self: start; margin-top: 12px; border-color: var(--ink); color: var(--ink); }
.award .link-arrow:hover { color: var(--red); border-color: var(--red); }

.contact-block { padding-block: clamp(60px, 9vw, 130px); text-align: center; }
.contact-block__inner { display: grid; justify-items: center; gap: 16px; }
.contact-block h2 { font-family: var(--display); font-size: clamp(2rem, 5.2vw, 4.6rem); line-height: 0.9; letter-spacing: -0.04em; text-transform: uppercase; max-width: 16ch; }
.contact-block__mail { font-family: var(--display); font-size: clamp(1rem, 4.5vw, 3.6rem); line-height: 1; letter-spacing: -0.03em; border-bottom: 2px solid var(--red); padding-bottom: 6px; overflow-wrap: normal; }
.contact-block__mail span { white-space: nowrap; }
.contact-block__mail:hover { color: var(--yellow); }
.contact-block__socials { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: center; margin-top: 16px; }

/* ==========================================================================
   Lightbox, 404
   ========================================================================== */

.notfound { padding-top: calc(var(--head-h) + clamp(60px, 12vh, 140px)); padding-bottom: 120px; }
.notfound__title { font-family: var(--display); font-size: clamp(4rem, 16vw, 15rem); line-height: 0.78; letter-spacing: -0.06em; text-transform: uppercase; margin: 20px 0 30px; }
.notfound__title span { color: transparent; -webkit-text-stroke: 2px var(--yellow); }
.notfound__text { max-width: 46ch; color: var(--muted); font-size: 17px; }
.notfound__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ==========================================================================
   Reveal
   ========================================================================== */

/* Hidden start states exist only under .js (set in <head>), so content is always visible without JS.
   main.js adds .is-in per element (delay via --rd, set from the element's rank among siblings entering
   together), then drops the data-reveal attribute once finished so hover transitions are untouched.
   Transitions live on the .is-in state because the destination style decides the transition used. */

/* default: short fade-up for small text and rows */
.js [data-reveal=''] { opacity: 0; transform: translateY(18px); }
.js [data-reveal=''].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease-out) var(--rd, 0ms), transform 1s var(--ease-out) var(--rd, 0ms);
}

/* mask: headings rise out of a line mask (markup: <i class="mk"><i class="mk__in">…) */
.mk {
  display: block;
  overflow: hidden;
  padding: 0.3em 0.15em 0.2em;
  margin: -0.3em -0.15em -0.2em;
  font-style: normal;
}
.mk__in { display: block; font-style: normal; }
.js [data-reveal='mask'] .mk__in { transform: translateY(calc(100% + 0.5em)); }
.js [data-reveal='mask'].is-in .mk__in { transform: none; transition: transform 1.1s var(--ease-out) var(--rd, 0ms); }

/* wipe: images/cards. Cover is revealed by a clip-path wipe while it settles from 1.06; text parts fade up after */
.js [data-reveal='wipe'] :is(.media, .card__media--type, .series-card__media--type, .misc-card__type) {
  clip-path: inset(0 100% 0 0);
  transform: scale(1.06);
}
.js [data-reveal='wipe'].is-in :is(.media, .card__media--type, .series-card__media--type, .misc-card__type) {
  clip-path: inset(-24px);
  transform: none;
  transition: clip-path 1.1s var(--ease-wipe) var(--rd, 0ms), transform 1.6s var(--ease-out) var(--rd, 0ms);
}
.js [data-reveal='wipe'] .about-teaser__frame::after { opacity: 0; }
.js [data-reveal='wipe'].is-in .about-teaser__frame::after { opacity: 1; transition: opacity 0.6s var(--ease-out) calc(var(--rd, 0ms) + 0.7s); }
.js [data-reveal='wipe'] :is(.card__body, .card__num, .card__award, .series-card__body, .misc-card__body, .film-card__body, .film-favorite__body, figcaption) {
  opacity: 0;
  transform: translateY(12px);
}
.js [data-reveal='wipe'].is-in :is(.card__body, .card__num, .card__award, .series-card__body, .misc-card__body, .film-card__body, .film-favorite__body, figcaption) {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out) calc(var(--rd, 0ms) + 0.35s), transform 0.9s var(--ease-out) calc(var(--rd, 0ms) + 0.35s);
}

/* ==========================================================================
   View transitions (cross-document; progressive enhancement)
   ========================================================================== */

@view-transition { navigation: auto; }

/* default page change: short crossfade with a slight vertical shift */
::view-transition-old(root) { animation: vtPageOut 0.22s var(--ease-in-out) both; mix-blend-mode: normal; }
::view-transition-new(root) { animation: vtPageIn 0.34s var(--ease-out) 0.06s both; mix-blend-mode: normal; }
@keyframes vtPageOut { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vtPageIn { from { opacity: 0; transform: translateY(16px); } }

/* header stays put */
::view-transition-group(site-head) { animation-duration: 0.3s; animation-timing-function: var(--ease-out); }

/* project cover (card / thumb) morphs into the project hero; the name is set from main.js on exactly one element per page */
::view-transition-group(project-cover) { animation-duration: 0.7s; animation-timing-function: var(--ease-wipe); z-index: 2; }
::view-transition-old(project-cover),
::view-transition-new(project-cover) { height: 100%; object-fit: cover; overflow: clip; mix-blend-mode: normal; }

/* same-document transitions (work filter, lightbox stepping): keep the page itself still */
html.vt-filter::view-transition-old(root),
html.vt-lightbox::view-transition-old(root) { display: none; }
html.vt-filter::view-transition-new(root),
html.vt-lightbox::view-transition-new(root) { animation: none; }
html.vt-filter [data-reveal],
html.vt-filter [data-reveal] * { transition: none !important; }
html.vt-filter::view-transition-group(*) { animation-duration: 0.6s; animation-timing-function: var(--ease-out); }
html.vt-filter::view-transition-old(*),
html.vt-filter::view-transition-new(*) { animation-duration: 0.35s; animation-timing-function: var(--ease-out); mix-blend-mode: normal; }
html.vt-lightbox::view-transition-group(lightbox-img) { animation-duration: 0.5s; animation-timing-function: var(--ease-out); }
html.vt-lightbox::view-transition-old(lightbox-img),
html.vt-lightbox::view-transition-new(lightbox-img) { height: 100%; object-fit: contain; mix-blend-mode: normal; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
  .hero__title { font-size: clamp(3rem, 12vw, 9rem); }
  .case-next__artist { display: none; }
  .case-next > a { grid-template-columns: 1fr minmax(140px, 220px) 54px; }
  .case-next__media { grid-column: 2; }
  .case-next__arrow { grid-column: 3; }
}

@media (max-width: 980px) {
  :root { --head-h: 64px; }
  .nav { display: none; }
  .menu-btn { display: flex; }
  .brand__name { font-size: 9px; max-width: 150px; }
  .brand__mark { min-width: 50px; height: 34px; font-size: 17px; }

  .hero__title { font-size: clamp(2.8rem, 14vw, 7.6rem); }
  .hero__badge { width: 88px; height: 88px; }
  .hero__foot { flex-direction: column; align-items: flex-start; }

  .section-head, .section-head--row { grid-template-columns: 1fr; }
  .section-intro { justify-self: start; }

  .card--xl, .card--lg, .card--md, .card--half { grid-column: span 12; }
  .card__title { font-size: clamp(1.5rem, 5vw, 2.2rem); }
  .card__num { font-size: 30px; }
  .more-credits__list li { grid-template-columns: 54px minmax(0, 1fr); }
  .more-credits__list em { grid-column: 2; }

  .about-teaser__media, .about-teaser__text { grid-column: span 12; }
  .about-teaser__media { max-width: 520px; }
  .about-teaser__frame::after { inset: 12px -12px -12px 12px; }
  .stats { grid-column: span 12; }

  .service { grid-template-columns: 40px 1fr; gap: 8px 16px; }
  .service p { grid-column: 2; }
  .service__tag { grid-column: 2; text-align: left; }

  .game-teaser__inner { grid-template-columns: 1fr; }
  .github-teaser__grid { grid-template-columns: 1fr; }

  .case__main { grid-template-columns: 1fr; }
  .case__side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .case__links { margin-top: 0; }
  .case__title { font-size: clamp(2rem, 9.6vw, 6rem); }

  .about-hero__grid { grid-template-columns: 1fr; }
  .about-hero__media { max-width: 480px; order: -1; }
  .about-layout { grid-template-columns: 1fr; }
  .about-layout__side { grid-template-columns: 1fr 1fr; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-grid li:nth-child(3n + 1), .client-grid li:nth-child(3n + 2), .client-grid li:nth-child(3n) { border-right: 0; padding-inline: 0; }
  .client-grid li:nth-child(odd) { border-right: 1px solid var(--line-soft); padding-right: 16px; }
  .client-grid li:nth-child(even) { padding-left: 16px; }

  .misc-grid, .repos { grid-template-columns: 1fr; }
  .game-feature__grid { grid-template-columns: 1fr; }
  .series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .film-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .film-favorites__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__bar { flex-direction: column; align-items: flex-start; }

  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery__item--wide { grid-column: span 2; }
  .gallery--portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credits dl { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .brand__name { display: none; }
  .brand__mark { min-width: 52px; }
}

@media (max-width: 620px) {
  .hero__title { font-size: clamp(2.5rem, 16vw, 5rem); }
  .hero__badge { display: none; }
  .hero__line--outline { -webkit-text-stroke-width: 1.4px; }
  .hero__inner { padding-top: 24px; }
  .filters { flex-wrap: wrap; padding-bottom: 0; margin-inline: 0; padding-inline: 0; }
  .filter { flex: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .about-teaser__frame::after { inset: 10px -10px -10px 10px; }
  .game-teaser .game-title { font-size: clamp(2.4rem, 9vw, 3.4rem); }
  .case__side { grid-template-columns: 1fr; }
  .case__caption { flex-direction: column; gap: 4px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery__item--wide { grid-column: span 1; }
  .gallery__item { aspect-ratio: 16 / 10; }
  .gallery--portrait { grid-template-columns: 1fr; }
  .gallery--portrait .gallery__item { aspect-ratio: 4 / 5; }
  .series-grid { grid-template-columns: 1fr; }
  .series-card p { font-size: 13px; }
  .case-next > a { grid-template-columns: 1fr 44px; }
  .case-next__media { display: none; }
  .case-next__arrow { grid-column: 2; width: 44px; height: 44px; }
  .about-layout__side { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: 1fr; }
  .client-grid li:nth-child(odd) { border-right: 0; padding-right: 0; }
  .client-grid li:nth-child(even) { padding-left: 0; }
  .game-feature__shots { grid-template-columns: 1fr; }
  .game-shot--wide { grid-column: span 1; }
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .film-favorites__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .film-hero__meta { align-items: flex-start; flex-direction: column; }
  .film-count { margin-top: 4px; }
  .foot__grid { grid-template-columns: 1fr; }
  .foot__mail { font-size: clamp(0.95rem, 4.4vw, 1.6rem); }
  .embed__play svg { width: 52px; height: 52px; padding: 15px; }
  .page-title { font-size: clamp(2.2rem, 10.5vw, 5.4rem); }
  .notfound__title { font-size: clamp(3.4rem, 17vw, 7rem); }
}

/* ==========================================================================
   Scroll-linked motion
   CSS scroll-driven animations (view() / scroll()), progressive enhancement:
   unsupported browsers and reduced-motion users keep the static layout. Only
   translate / scale / opacity are animated, always through the individual
   properties so they compose with the reveal and hover transforms, and never
   on an element that carries a view-transition-name.
   ========================================================================== */

/* marquee nudge: main.js writes --tk (px); the CSS crawl stays on the inner track */
.ticker__shift { width: max-content; translate: var(--tk, 0px) 0; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    :root {
      --sd-px: 5%;          /* image drift (of frame height) */
      --sd-ps: 1.14;        /* image oversize so no frame edge shows */
      --sd-drift: min(2.4vw, calc(var(--pad) * 0.7)); /* heading drift, never more than the page gutter */
      --sd-split: 5vw;      /* hero name lines */
      --sd-slow: 28px;      /* project title lag */
      --sd-dim: 0.4;        /* resting dim of the light-up rows */
    }
    @media (max-width: 620px) {
      :root { --sd-px: 3%; --sd-ps: 1.08; --sd-drift: min(2vw, calc(var(--pad) * 0.6)); --sd-split: 2.5vw; --sd-slow: 14px; --sd-dim: 0.55; }
    }

    /* 1. image parallax inside frames (frame = named timeline, image + hover ghosts drift) */
    :is(.card__media, .series-card__media, .misc-card .media, .about-teaser__frame .media, .gallery__item .media) { view-timeline: --frame block; }
    :is(.card__media, .series-card__media, .misc-card .media, .about-teaser__frame .media, .gallery__item .media) > :is(img, .media__ghost) {
      scale: var(--sd-ps);
      animation: sdFrame linear both;
      animation-timeline: --frame;
      animation-range: cover 0% cover 100%;
    }
    @keyframes sdFrame {
      from { translate: 0 calc(var(--sd-px) * -1); }
      to { translate: 0 var(--sd-px); }
    }
    /* big card numeral floats a little against its image */
    .card__num { animation: sdNum linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    @keyframes sdNum { from { translate: 0 14px; } to { translate: 0 -8px; } }

    /* 2. hero exit: name lines slide apart, content dims (bg parallax lives with the hero rules) */
    .hero__line { animation: sdSplit linear both; animation-timeline: scroll(root block); animation-range: 0 85svh; }
    .hero__line--outline { --sd-dir: 1; }
    @keyframes sdSplit { to { translate: calc(var(--sd-dir, -1) * var(--sd-split)) 0; } }
    .hero__inner { animation: sdFadeOut linear both; animation-timeline: scroll(root block); animation-range: 12svh 80svh; }
    .hero__badge-star { animation: sdFadeOut linear both; animation-timeline: scroll(root block); animation-range: 0 60svh; }
    .hero__badge > svg { animation: spin 40s linear infinite, sdFadeOut linear both; animation-timeline: auto, scroll(root block); animation-range: normal, 0 60svh; }
    @keyframes sdFadeOut { to { opacity: 0.2; } }

    /* 4. headings drift across their pass; page titles start at rest and drift as they leave.
       two-line titles (.page-title--split) move their lines in opposite directions */
    :is(.section-title, .h2, .game-title, .game-feature__title, .award__title, .contact-block h2) {
      animation: sdDrift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%;
    }
    @keyframes sdDrift {
      from { translate: calc(var(--sd-dir, 1) * var(--sd-drift)) 0; }
      to { translate: calc(var(--sd-dir, 1) * var(--sd-drift) * -1) 0; }
    }
    .page-title:not(.page-title--split), .page-title--split .tl {
      animation: sdDriftOut linear both; animation-timeline: view(); animation-range: exit 0% exit 100%;
    }
    .tl--b { --sd-dir: -1; }
    @keyframes sdDriftOut { to { translate: calc(var(--sd-dir, 1) * var(--sd-drift) * -1) 0; } }

    /* 5. project page: cover settles from a slight zoom (on the image, never on the named .media);
       the title block lags the page */
    .case__hero { view-timeline: --hero block; }
    .case__hero .media > img { animation: sdSettle linear both; animation-timeline: --hero; animation-range: cover 0% cover 55%; }
    @keyframes sdSettle { from { scale: 1.14; } to { scale: 1; } }
    .case__head { animation: sdSlow linear both; animation-timeline: scroll(root block); animation-range: 0 55svh; }
    @keyframes sdSlow { to { translate: 0 var(--sd-slow); } }

    /* 6. rows light up while crossing the middle band (cells, so the rows' own reveal opacity is untouched) */
    :is(.service, .more-credits__list li) { view-timeline: --row block; }
    :is(.service, .more-credits__list li) > * { animation: sdLight linear both; animation-timeline: --row; animation-range: cover 0% cover 100%; }
    .client-list li { animation: sdLight linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    @keyframes sdLight {
      0%, 100% { opacity: var(--sd-dim); }
      36%, 64% { opacity: 1; }
    }

    /* 7. footer: red rule draws in, contact line rises and scales into place */
    .site-foot::before { animation: sdRule linear both; animation-timeline: view(); animation-range: cover 0% cover 30%; }
    @keyframes sdRule { from { transform: scaleX(0); } }
    .foot__cta { view-timeline: --cta block; }
    .foot__mail { transform-origin: 0 100%; animation: sdMail linear both; animation-timeline: --cta; animation-range: entry 0% entry 90%; }
    @keyframes sdMail { from { scale: 0.86; translate: 0 14px; } }
  }
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  /* Gentle mode: nothing slides, zooms, wipes, loops or parallaxes, but things
     still fade. Many people switch OS animations off for speed, not because
     fades bother them, so opacity and colour changes are kept. */
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    /* only fades transition; transform / clip-path / translate / scale jump */
    transition-property: opacity, color, background-color, border-color, box-shadow, display, overlay !important;
    scroll-behavior: auto !important;
  }
  /* reveals: every variant becomes a plain fade in place */
  .js [data-reveal]:not(.is-in) { opacity: 0 !important; }
  .js [data-reveal] { transform: none !important; }
  .js [data-reveal] .mk__in,
  .js [data-reveal] :is(.media, .card__media--type, .series-card__media--type, .misc-card__type, .card__body, .card__num, .card__award, .series-card__body, .misc-card__body, .film-card__body, .film-favorite__body, figcaption) {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  /* page changes: short crossfade, nothing travels */
  ::view-transition-old(root) { animation: rmOut 0.18s ease both !important; }
  ::view-transition-new(root) { animation: rmIn 0.28s ease both !important; }
  ::view-transition-group(*) { animation-duration: 0.001ms !important; }
  /* hero: fades in, no rise, no looping decoration */
  .hero__word, .hero__top, .hero__lede, .hero__actions .btn, .hero__badge { animation: rmIn 0.8s ease both !important; }
  .hero__foot::before { animation: none !important; }
  .hero__bg, .hero__bg img { animation: none !important; transform: none; }
  .hero__bg img { transform: scale(1.06); }
  .hero__badge svg, .ticker__track, .dot { animation: none !important; }
  .ticker__shift { translate: none; }
  /* the glitch is a signature of the site, so it stays in gentle mode */
  .hero__line[data-text]::before { animation: glitch 10.5s steps(1) -4.8s infinite !important; }
  .hero__line[data-text]::after { animation: glitch 10.5s steps(1) -4.7s infinite !important; }
  .hero__line--last[data-text]::before { animation-delay: -0.5s !important; }
  .hero__line--last[data-text]::after { animation-delay: -0.4s !important; }
  .hero__line[data-text]:hover::before, .hero__line[data-text]:hover::after,
  [data-gl].is-glitch::before, [data-gl].is-glitch::after,
  [data-gl]:hover::before, [data-gl]:hover::after,
  .card:hover .card__title[data-gl]::before, .card:hover .card__title[data-gl]::after { animation: glitchHover 0.5s steps(1) 0s 1 !important; }
  :is(.card__media, .series-card__media).is-glitch .media__ghost { animation: glitchImg 0.5s steps(1) 0s 1 !important; }
  /* chrome */
  .site-head.is-hidden { transform: none; }
  .card__go svg + svg { display: none; }
  .card:hover .card__go svg:first-child, .card:focus-visible .card__go svg:first-child { transform: none; }
}

@keyframes rmIn { from { opacity: 0; } }
@keyframes rmOut { to { opacity: 0; } }

/* Gentle mode keeps the one scroll effect with no movement: list rows light up. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: reduce) {
    :is(.service, .more-credits__list li) { view-timeline: --row block; }
    :is(.service, .more-credits__list li) > * { animation: rmLight linear both !important; animation-timeline: --row !important; animation-range: cover 0% cover 100%; }
    .client-list li { animation: rmLight linear both !important; animation-timeline: view() !important; animation-range: cover 0% cover 100%; }
    @keyframes rmLight {
      0%, 100% { opacity: 0.55; }
      35%, 65% { opacity: 1; }
    }
  }
}

/* ------------------------------------------------------------ glitch, everywhere
   The hero name's RGB-split burst, reused. main.js copies the text into data-gl
   and adds .is-glitch for a moment (on reveal, and at random while on screen). */
[data-gl] { position: relative; }
[data-gl]::before,
[data-gl]::after {
  content: attr(data-gl);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}
[data-gl]::before { --s: -1; color: var(--red); }
[data-gl]::after { --s: 1; color: var(--yellow); }
[data-gl].is-glitch::before,
[data-gl].is-glitch::after { animation: glitchHover 0.5s steps(1) 0s 1; }
@media (hover: hover) {
  [data-gl]:hover::before,
  [data-gl]:hover::after,
  .card:hover .card__title[data-gl]::before,
  .card:hover .card__title[data-gl]::after { animation: glitchHover 0.5s steps(1) 0s 1; }
}
/* card images: the red / yellow ghosts flick sideways for a few frames */
:is(.card__media, .series-card__media).is-glitch .media__ghost { animation: glitchImg 0.5s steps(1) 0s 1; }
:is(.card__media, .series-card__media).is-glitch .media__ghost--red { --s: -1; }
:is(.card__media, .series-card__media).is-glitch .media__ghost--yellow { --s: 1; }
@keyframes glitchImg {
  0% { opacity: 0.9; transform: translate(calc(var(--s) * 14px), 0); }
  22% { opacity: 0.7; transform: translate(calc(var(--s) * -8px), 2px); }
  44% { opacity: 0.9; transform: translate(calc(var(--s) * 20px), 0); }
  68% { opacity: 0.6; transform: translate(calc(var(--s) * -6px), -2px); }
  90%, 100% { opacity: 0; transform: none; }
}
