/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/anton-latin.woff2) format('woff2');
  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: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/anton-latin-ext.woff2) format('woff2');
  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: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../fonts/space-grotesk-latin.woff2) format('woff2');
  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: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../fonts/space-grotesk-latin-ext.woff2) format('woff2');
  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;
}

/* Gozaru Demo: personal-use licence only, see fonts/gozaru-LICENSE-personal-use.txt. Used for the red ink titles. */
@font-face {
  font-family: 'Gozaru';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/gozaru-demo.ttf) format('truetype');
}

/* ---------- Tokens ---------- */
:root {
  --bg: #050505;
  --bg-raised: #0c0c0c;
  --fg: #f1f1f1;
  --fg-2: rgb(241 241 241 / 0.78);
  --fg-3: rgb(241 241 241 / 0.52);
  --line: rgb(241 241 241 / 0.2);
  --line-strong: rgb(241 241 241 / 0.75);
  --danger: #ff6b5e;

  --font-display: 'Anton', 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --font-text: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;

  --label-size: 11px;
  --label-track: 0.28em;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.25s;
  --dur: 0.6s;
  --dur-slow: 1.2s;

  --pad-x: clamp(20px, 2.4vw, 40px);
  --gutter: clamp(10px, 1vw, 16px);
}

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.5s; animation-timing-function: var(--ease-in-out); }
::view-transition-group(project-media) { animation-duration: 0.7s; animation-timing-function: var(--ease-out); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }
::selection { background: var(--fg); color: var(--bg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 10px 14px; background: var(--fg); color: var(--bg);
  font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase;
  transform: translateY(-160%); transition: transform var(--dur-fast) var(--ease-out);
}
.skip:focus { transform: none; }

.label {
  font-size: var(--label-size);
  font-weight: 500;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  line-height: 1.4;
}
.label i { font-style: normal; margin: 0 0.9em; }

/* Film grain */
body::after {
  content: '';
  position: fixed;
  inset: -8%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Media + placeholders ---------- */
.media {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 68% 38%, #2b2b2b 0%, #191919 52%, #0f0f0f 100%);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: grayscale(1) contrast(1.06);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur-slow) var(--ease-out), filter 0.9s var(--ease-out);
}
.media.is-loaded img { opacity: 1; }
.media.is-missing::after {
  content: attr(data-label);
  position: absolute;
  right: 14px;
  bottom: 12px;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgb(241 241 241 / 0.32);
  text-transform: none;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 68px;
  padding: 0 var(--pad-x);
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-solid {
  background: rgb(5 5 5 / 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.logo {
  justify-self: start;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.34em;
  margin-right: -0.34em;
  text-transform: uppercase;
}
.site-header__roles { justify-self: center; color: var(--fg); font-size: 10px; letter-spacing: 0.22em; }
.site-header__roles i { margin: 0 0.9em; }
.site-header__end { justify-self: end; display: flex; align-items: center; gap: clamp(20px, 2.4vw, 40px); }
.site-nav { display: flex; gap: clamp(20px, 1.7vw, 28px); }
.site-nav a,
.lang-switch button {
  position: relative;
  font-size: var(--label-size);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 0;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0.2em; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease-out);
}
.site-nav a { opacity: 0.78; transition: opacity var(--dur-fast); }
.site-nav a:hover,
.site-nav a[aria-current='page'] { opacity: 1; }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.burger {
  position: relative;
  width: 32px;
  height: 24px;
  display: grid;
  align-content: center;
  gap: 6px;
}
.burger span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform var(--dur) var(--ease-out), width var(--dur) var(--ease-out);
}
.burger span:last-child { width: 100%; }
.burger:hover span:last-child { width: 62%; }
.burger[aria-expanded='true'] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded='true'] span:last-child { width: 100%; transform: translateY(-3.5px) rotate(-45deg); }

.lang-switch { display: flex; align-items: center; gap: 12px; font-size: var(--label-size); color: var(--fg-3); }
.lang-switch button { color: var(--fg-3); transition: color var(--dur-fast); }
.lang-switch button:hover,
.lang-switch button[aria-pressed='true'] { color: var(--fg); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 110px var(--pad-x) 32px;
  background: var(--bg);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.8s var(--ease-in-out), visibility 0s linear 0.8s;
}
.menu.is-open { clip-path: inset(0); visibility: visible; transition: clip-path 0.8s var(--ease-in-out), visibility 0s; }
.menu__list { list-style: none; margin: 0; padding: 0; align-self: center; }
.menu__list li { overflow: hidden; }
.menu__list a {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--font-display);
  font-size: clamp(64px, 13vw, 190px);
  line-height: 0.92;
  text-transform: uppercase;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease-out), color var(--dur-fast);
}
.menu__list a small { font-family: var(--font-text); font-size: var(--label-size); letter-spacing: var(--label-track); color: var(--fg-3); }
.menu.is-open .menu__list a { transform: none; transition-delay: calc(0.25s + var(--i) * 0.07s); }
.menu__list:hover a { color: var(--fg-3); }
.menu__list a:hover { color: var(--fg); }
.menu__foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; opacity: 0; transition: opacity var(--dur) var(--ease-out); }
.menu.is-open .menu__foot { opacity: 1; transition-delay: 0.5s; }
body.menu-open { overflow: hidden; }

/* ---------- Socials ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 8px clamp(20px, 2.5vw, 38px); list-style: none; margin: 0; padding: 0; }
.socials a { color: var(--fg-2); transition: color var(--dur-fast); }
.socials a:hover { color: var(--fg); }
.rights { color: var(--fg-2); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 0.08s);
}
.reveal.is-in { opacity: 1; transform: none; }

.lines .line { display: block; overflow: hidden; padding: 0.04em 0 0.06em; margin: -0.04em 0 -0.06em; }
.lines .line > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); transition-delay: calc(0.15s + var(--i, 0) * 0.09s); }
.is-ready .lines .line > span { transform: none; }

.fade-up { opacity: 0; transform: translateY(14px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--d, 0s); }
.is-ready .fade-up { opacity: 1; transform: none; }

/* =========================================================
   HOME (one page, no scroll)
   ========================================================= */
:root:has(.page-home) { overflow: hidden; }
.page-home {
  --pad-x: clamp(20px, 4.9vw, 78px);
  --card-w: clamp(240px, 24.3vw, 440px);
  --card-h: clamp(150px, 23.5svh, 320px);
  height: 100svh;
  overflow: hidden;
}
.page-home .site-header { padding-right: clamp(20px, 3vw, 48px); }

.home {
  position: relative;
  height: 100svh;
  touch-action: pinch-zoom;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  isolation: isolate;
}
/* Big ink mark: the HK logo, melting into the name of the centred project. */
.hero__mark {
  --mark: #9b0000;
  position: absolute;
  z-index: -1;
  top: 76px;
  right: var(--pad-x);
  left: 40%;
  height: calc(var(--strip-top, 70svh) - 76px - var(--card-h) * 0.12);
  color: var(--mark);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out) 0.2s;
}
.is-ready .hero__mark { opacity: 0.92; }
.hero__mark-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.hero__mark-layer svg { height: 72%; width: auto; max-width: 72%; display: block; }
.hero__mark-layer svg path { fill: currentColor; }
.hero__mark-gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__mark.is-gl .hero__mark-layer { visibility: hidden; }

.hero {
  min-height: 0;
  display: flex;
  align-items: center;
  padding: clamp(92px, 21svh, 230px) var(--pad-x) 0;
}
.hero__kicker { color: var(--fg); margin-bottom: 10px; font-size: 10px; letter-spacing: 0.25em; }
.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, min(5.55vw, 9.4svh), 120px);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.002em;
}
.hero__roles { margin-top: 14px; color: var(--fg); font-size: 10px; letter-spacing: 0.25em; }
.hero__kicker i, .hero__roles i { margin: 0 0.8em; }
.label i.dash { display: inline-block; width: 1.15em; height: 1px; margin: 0 1.1em; background: currentColor; vertical-align: 0.32em; }
.showreel-btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  font-size: var(--label-size);
  font-weight: 500;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
}
.showreel-btn__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.showreel-btn__icon::after {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  opacity: 0;
  animation: pulse 2.8s var(--ease-out) infinite 1.6s;
}
@keyframes pulse {
  0% { opacity: 0.6; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.6); }
}
.showreel-btn svg { width: 10px; height: 12px; margin-left: 2px; }
.showreel-btn:hover .showreel-btn__icon { background: var(--fg); color: var(--bg); transform: scale(1.08); }

/* Work carousel */
.work {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(0px, 6svh - 16px, 64px);
  min-width: 0;
  min-height: 0;
}
.work__gl { position: absolute; left: 0; width: 100%; z-index: 0; pointer-events: none; }
.work__viewport, .work__gl { opacity: 0; transition: opacity 0.9s var(--ease-out) 0.35s; }
.is-ready .work__viewport, .is-ready .work__gl { opacity: 1; }
.work__viewport {
  position: relative;
  z-index: 1;
  overflow: hidden;
  overflow-x: clip;
  overflow-y: visible;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.work__viewport.is-dragging { cursor: grabbing; }
.work__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--gutter);
  width: max-content;
  position: relative;
  will-change: transform;
}
.work__bar {
  display: flex;
  align-items: center;
  gap: 18px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(14px, 2.6svh, 30px);
  z-index: 2;
  padding: 0 clamp(12px, 1.5vw, 24px);
  color: var(--fg-2);
}
.work__bar .label { font-size: 9.5px; letter-spacing: 0.3em; white-space: nowrap; }
.work__progress { position: relative; flex: 1; height: 1px; background: var(--line); overflow: hidden; }
.work__progress i { position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(0); will-change: transform; }
.work__count { font-variant-numeric: tabular-nums; color: var(--fg); }

.card {
  position: relative;
  flex: 0 0 var(--card-w);
}
.card__link {
  position: relative;
  display: block;
  height: var(--card-h);
  overflow: hidden;
  isolation: isolate;
  -webkit-user-drag: none;
}
.card__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.card__media.is-gl { background: none; }
.card__media.is-gl img,
.card__media.is-gl::before,
.card__link:has(.is-gl)::after { visibility: hidden; }
.card__link:has(.is-gl) { overflow: visible; }
.card__media img {
  -webkit-user-drag: none;
  pointer-events: none;
  filter: grayscale(1) brightness(0.82) contrast(1.06);
}
.card__media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgb(5 5 5 / 0.25) 0%, rgb(5 5 5 / 0) 30%, rgb(5 5 5 / 0) 50%, rgb(5 5 5 / 0.85) 100%);
}
.card__media.is-missing::after { z-index: 2; top: 18px; bottom: auto; max-width: 70%; }
.card__num {
  position: absolute;
  top: 20px;
  left: 19px;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--fg-2);
}
.card__body {
  position: absolute;
  left: 19px;
  right: 80px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.card__title {
  font-size: clamp(12px, 0.87vw, 15px);
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.25;
}
.card__cat {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.card__arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 36px;
  height: 12px;
  color: var(--fg-2);
  transition: translate var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--fg);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
  pointer-events: none;
}
.card__link:hover .card__media img,
.card__link:focus-visible .card__media img { filter: grayscale(0) brightness(1) contrast(1.04); }
.card__link:hover .card__arrow,
.card__link:focus-visible .card__arrow { translate: 8px 0; color: var(--fg); }
.card__link:hover::after { opacity: 0.35; }
.card__link:focus-visible { outline-offset: -3px; }
.work__viewport.is-dragging .card__link { pointer-events: none; }

.drag-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 0;
  height: 0;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast);
  will-change: transform;
}
.drag-cursor.is-visible { opacity: 1; }
.drag-cursor b {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transition: transform 0.35s var(--ease-out);
}
.drag-cursor i { flex: none; display: block; will-change: transform; }
.drag-cursor svg { display: block; width: 7px; height: 12px; transition: transform 0.35s var(--ease-out); }
.drag-cursor.is-pressed b { transform: scale(0.5); }
.drag-cursor.is-pressed .drag-cursor__l svg { transform: translateX(4px); }
.drag-cursor.is-pressed .drag-cursor__r svg { transform: translateX(-4px); }
.drag-cursor small {
  position: absolute;
  top: 16px;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  margin-right: -0.32em;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .work__viewport, .work__viewport.is-dragging, .work__viewport a { cursor: none; }
}
@media (hover: none), (pointer: coarse) { .drag-cursor { display: none; } }

/* Showreel dialog */
.reel {
  width: min(1280px, 92vw);
  max-height: 92svh;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  overflow: visible;
}
.reel::backdrop { background: rgb(5 5 5 / 0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.reel[open] { animation: reel-in 0.7s var(--ease-out); }
.reel[open]::backdrop { animation: fade-in 0.5s var(--ease-out); }
@keyframes reel-in { from { opacity: 0; transform: scale(0.96) translateY(16px); } }
@keyframes fade-in { from { opacity: 0; } }
.reel__frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.reel__frame video { width: 100%; height: 100%; display: block; }
.reel__missing { position: absolute; inset: 0; display: none; place-items: center; text-align: center; gap: 8px; color: var(--fg-2); }
.reel__missing small { display: block; margin-top: 10px; font-size: 10px; letter-spacing: 0.14em; color: var(--fg-3); text-transform: none; }
.reel.is-missing .reel__missing { display: grid; }
.reel.is-missing video { visibility: hidden; }
.reel__close {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  display: flex;
  align-items: center;
  gap: 14px;
}

.close svg { width: 20px; height: 20px; transition: transform var(--dur) var(--ease-out); }
.close:hover svg { transform: rotate(90deg); }
.close {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  font-size: var(--label-size);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color var(--dur-fast);
}
.close:hover { color: var(--fg); }

/* =========================================================
   PROJECT
   ========================================================= */
.page-project { overflow: hidden; }
.page-project .site-header { grid-template-columns: 1fr auto; }
.page-project .close { justify-self: end; }
.project {
  height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}
.project__stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
}
.project__slides { position: absolute; inset: 0; z-index: -1; view-transition-name: project-media; }
.project__slide {
  position: absolute;
  inset: 0;
  clip-path: inset(0);
  transition: clip-path 1s var(--ease-in-out);
}
.project__slide.is-entering-next { clip-path: inset(0 0 0 100%); }
.project__slide.is-entering-prev { clip-path: inset(0 100% 0 0); }
.project__slide img { filter: none; transform: scale(1.06); transition: opacity var(--dur) var(--ease-out), transform 1.6s var(--ease-out); }
.project__slide.is-current img { transform: scale(1); }
.project__slides::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgb(5 5 5 / 0.45) 0%, rgb(5 5 5 / 0) 50%),
    linear-gradient(180deg, rgb(5 5 5 / 0.45) 0%, rgb(5 5 5 / 0) 18%, rgb(5 5 5 / 0) 82%, var(--bg) 100%);
}
.project__slide.is-missing::after { bottom: 34px; right: 76px; z-index: 4; }

.project__title {
  position: absolute;
  left: 5.7vw;
  top: 50%;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--title-size, 15.4vw);
  line-height: 0.95;
  text-transform: uppercase;
  transform: translateY(-50%);
  pointer-events: none;
  white-space: nowrap;
}
.project__title .line > span { width: max-content; }
.project__title .line > span { transition-duration: 1.3s; }

.project__nav {
  position: absolute;
  top: 54.5%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 88px;
  margin-top: -44px;
  color: var(--fg);
}
.project__nav svg { width: 18px; height: 34px; transition: transform var(--dur) var(--ease-out); }
.project.is-single .project__nav,
.project.is-single .project__thumbs { visibility: hidden; }
.project__nav--prev { left: clamp(6px, 1vw, 16px); }
.project__nav--next { right: clamp(6px, 1vw, 16px); }
.project__nav--prev:hover svg { transform: translateX(-6px); }
.project__nav--next:hover svg { transform: translateX(6px); }

.project__thumbs {
  --thumb-w: clamp(108px, 9.9vw, 170px);
  display: flex;
  gap: 10px;
  padding: 22px var(--pad-x) 26px;
  overflow-x: auto;
  scroll-padding-inline: var(--pad-x);
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.project__thumbs::-webkit-scrollbar { display: none; }
.thumb {
  position: relative;
  flex: 0 0 var(--thumb-w);
  aspect-ratio: 152 / 104;
  scroll-snap-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(0.4s + var(--i) * 0.05s);
}
.is-ready .thumb { opacity: 1; transform: none; }
.thumb .media { position: absolute; inset: 0; }
.thumb .media img { filter: brightness(0.6); }
.thumb:hover .media img { filter: brightness(0.9); }
.thumb .media.is-missing::after { content: attr(data-num); right: 8px; bottom: 6px; }
.thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--fg);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}
.thumb[aria-current='true']::after { opacity: 1; }
.thumb[aria-current='true'] .media img,
.thumb[aria-current='true']:hover .media img { filter: none; }

/* =========================================================
   CONTACT
   ========================================================= */
.page-contact .site-header { --pad-x: clamp(20px, 2.4vw, 39px); }
.contact {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 36.6vw);
  padding-right: clamp(20px, 2.5vw, 39px);
}
.contact__media {
  position: absolute;
  inset: 0 auto 0 0;
  width: 61vw;
  z-index: 0;
  background: radial-gradient(90% 80% at 40% 55%, #262626 0%, #141414 55%, #0a0a0a 100%);
}
.contact__media img { transform: scale(1.06); }
.is-ready .contact__media img { transform: scale(1); transition: opacity 1.4s var(--ease-out), transform 2.4s var(--ease-out); }
.contact__media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgb(5 5 5 / 0) 55%, rgb(5 5 5 / 0.7) 82%, var(--bg) 100%),
    linear-gradient(180deg, rgb(5 5 5 / 0.5) 0%, rgb(5 5 5 / 0) 16%, rgb(5 5 5 / 0) 80%, rgb(5 5 5 / 0.75) 100%);
}
.contact__media.is-missing::after { z-index: 2; bottom: 64px; left: 38px; right: auto; }
.contact__panel {
  grid-column: 2;
  position: relative;
  z-index: 1;
  padding: 122px 0 84px;
}
.contact__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.contact__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(88px, 9.95vw, 190px);
  line-height: 0.9;
  text-transform: uppercase;
  margin-left: -0.01em;
}
.contact__index { margin-top: 12px; font-size: 9.5px; letter-spacing: 0.3em; color: var(--fg-2); white-space: nowrap; }
.contact__bio {
  margin-top: 38px;
  display: grid;
  gap: 23px;
  font-size: clamp(14px, 1.01vw, 17px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.55;
  color: var(--fg);
  scroll-margin-top: 100px;
}
.contact__rule { width: 44px; height: 1px; margin: 38px 0 34px; border: 0; background: var(--line-strong); }

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.field { grid-column: 1 / -1; display: grid; gap: 6px; position: relative; }
.field--half { grid-column: span 1; }
.field label {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgb(5 5 5 / 0.6);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.01em;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--dur-fast), background-color var(--dur-fast);
}
.field textarea { min-height: 105px; resize: vertical; padding-top: 14px; }
.field ::placeholder { color: var(--fg-3); }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgb(241 241 241 / 0.4); }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--fg); background: rgb(20 20 20 / 0.8); }
.select { position: relative; }
.select select { padding-right: 44px; cursor: pointer; }
.select select:invalid { color: var(--fg-3); }
.select select option { color: var(--fg); background: var(--bg-raised); }
.select svg { position: absolute; right: 18px; top: 50%; width: 10px; height: 6px; margin-top: -3px; pointer-events: none; color: var(--fg-2); }
.field__error { min-height: 0; font-size: 11px; letter-spacing: 0.04em; color: var(--danger); }
.field__error:empty { display: none; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--danger); }

.btn {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 47px;
  margin-top: 2px;
  border: 1px solid var(--line-strong);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fg);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--dur) var(--ease-out);
}
.btn svg { width: 12px; height: 10px; transition: transform var(--dur) var(--ease-out); }
.btn:hover,
.btn:focus-visible { color: var(--bg); border-color: var(--fg); }
.btn:hover::before,
.btn:focus-visible::before { transform: scaleY(1); }
.btn:hover svg { transform: translateX(5px); }
.btn[aria-busy='true'] { pointer-events: none; color: var(--fg-2); }
.form-status { grid-column: 1 / -1; font-size: 13px; color: var(--fg); min-height: 1.5em; }
.form-status:empty { display: none; }

.contact__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding: 0 clamp(20px, 2.5vw, 39px) 30px clamp(20px, 2.4vw, 38px);
  font-size: 9.5px;
}
.contact__footer .label { font-size: 9.5px; letter-spacing: 0.3em; }

/* =========================================================
   Responsive
   ========================================================= */
.only-mobile { display: none; }

@media (max-width: 1100px) {
  .site-header__roles { display: none; }
  .page-home .site-header { grid-template-columns: 1fr auto; }
  .page-home { --card-w: clamp(240px, 36vw, 400px); }
  .card__title { font-size: 13px; }

  .contact { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .contact__media { width: 55vw; }
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-header__end { gap: 24px; }
  .only-mobile { display: grid; }
  .page-contact .site-header { grid-template-columns: 1fr auto; }

  .hero { padding-top: clamp(84px, 16svh, 160px); }
  .hero__mark { left: var(--pad-x); top: 64px; }
  .is-ready .hero__mark { opacity: 0.38; }
  .hero__title { font-size: clamp(50px, min(16vw, 8.4svh), 110px); line-height: 0.95; }
  .hero__roles { font-size: 10px; letter-spacing: 0.22em; }
  .hero__roles i { margin: 0 0.5em; }

  .project__title { left: var(--pad-x); font-size: var(--title-size, 27vw); }
  .project__nav { top: auto; bottom: 8px; margin-top: 0; width: 44px; height: 56px; }
  .project__nav svg { width: 14px; height: 26px; }

  .contact {
    display: block;
    padding: 0;
  }
  .contact__media { position: relative; width: 100%; height: 62svh; min-height: 360px; }
  .contact__media::before {
    background: linear-gradient(180deg, rgb(5 5 5 / 0.6) 0%, rgb(5 5 5 / 0) 22%, rgb(5 5 5 / 0) 55%, var(--bg) 100%);
  }
  .contact__media.is-missing::after { bottom: 110px; left: auto; right: 16px; }
  .contact__panel { margin-top: -96px; padding: 0 var(--pad-x) 40px; }
  .contact__title { font-size: clamp(84px, 27vw, 180px); }
  .contact__footer { position: static; padding: 8px var(--pad-x) 32px; }
}

@media (max-width: 600px) {
  :root { --label-size: 10px; }
  .page-home { --card-w: 74vw; --card-h: clamp(140px, 25svh, 260px); }
  .hero__roles { line-height: 1.9; }
  .contact__bio br { display: none; }
  .contact__index { display: none; }
  .hero__roles { font-size: 9px; letter-spacing: 0.17em; }
  .hero__roles i { margin: 0 0.35em; }
  .contact-form { grid-template-columns: 1fr; }
  .field--half { grid-column: 1 / -1; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .project__thumbs { padding-top: 14px; padding-bottom: 18px; }
}

@media (hover: none) {
  .card__arrow { color: var(--fg); }
}

/* Reduced motion: fades and user-driven movement stay; transforms, loops and wipes go. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after,
  .showreel-btn__icon::after,
  .scroll-cue i::after { animation: none; }
  .lines .line > span { transform: none; opacity: 0; transition: opacity 0.8s var(--ease-out); }
  .is-ready .lines .line > span { opacity: 1; }
  .fade-up,
  .reveal,
  .thumb { transform: none; }
  .contact__media img,
  .is-ready .contact__media img,
  .project__slide img,
  .card__link:hover .card__media img { transform: none; }
  .project__slide,
  .project__slide.is-entering-next,
  .project__slide.is-entering-prev { clip-path: none; transition: none; }
  .menu { transition: visibility 0s linear 0.3s, opacity 0.3s; clip-path: none; opacity: 0; }
  .menu.is-open { opacity: 1; transition: opacity 0.3s; }
  .menu__list a { transform: none; }
  .reel[open], .reel[open]::backdrop { animation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
}
