/* Work index (/work) and film pages (/work/<slug>). Same near-black, ivory and one orange as the reel. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }

.w-page { min-height: 100vh; }
.w-page main { position: relative; z-index: 1; }
.u { border-bottom: 1px solid var(--accent); }

/* buttons shared with the home page */
.intro__btn { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 24px; background: var(--accent); color: #130c08; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; transition: transform .5s var(--ease), background .3s; }
.intro__btn:hover, .intro__btn:focus-visible { background: #ffb07a; transform: translateY(-2px); }
.hud__cta { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 4px; color: var(--ink); font-size: 10px; transition: background .3s, color .3s; }
.hud__cta:hover, .hud__cta:focus-visible { background: var(--accent); color: #130c08; }

/* the shutter opens on every page load, like a projector gate */
.shutter i { position: fixed; z-index: 260; inset-inline: 0; height: 50.5vh; background: #000; pointer-events: none; transform-origin: top; animation: shutter 1.05s var(--ease) .05s both; }
.shutter i:first-child { top: 0; }
.shutter i:last-child { bottom: 0; transform-origin: bottom; }
@keyframes shutter { from { transform: scaleY(1); } to { transform: scaleY(0); } }

/* lines that rise once the gate is open */
.w-line { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.w-line > span { display: inline-block; transform: translate3d(0, 105%, 0); transition: transform 1.4s var(--ease); }
.w-line + .w-line > span { transition-delay: .09s; }
.is-in .w-line > span { transform: none; transition-delay: .55s; }
.is-in .w-line + .w-line > span { transition-delay: .64s; }
[data-rise] { opacity: 0; transform: translate3d(0, 36px, 0); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
[data-rise].in { opacity: 1; transform: none; }

/* ---------- /work: hero ---------- */
.w-hero { padding: clamp(130px, 24vh, 240px) var(--g) clamp(48px, 9vh, 110px); }
.w-hero__title { margin: 22px 0 0; font: 800 clamp(72px, 15.5vw, 290px)/.8 var(--sans); font-stretch: 62%; letter-spacing: -.03em; text-transform: uppercase; }
.w-hero__title em { text-transform: none; color: var(--accent); font-size: 1.08em; letter-spacing: -.01em; }
.w-hero__lede { max-width: 44ch; margin: clamp(26px, 5vh, 48px) 0 0; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.55; color: #cfc8c0; }

/* ---------- /work: long film ---------- */
.w-feature { display: block; margin: 0 var(--g) clamp(70px, 12vh, 140px); }
.w-feature__frame { position: relative; display: block; aspect-ratio: 16 / 9; max-height: 86svh; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #000; }
.w-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) brightness(.82); }
.w-feature video { position: absolute; inset: 0; opacity: 0; transition: opacity .8s, transform 1.6s var(--ease), filter .8s; }
.w-feature video.is-on { opacity: 1; }
.w-feature video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); filter: saturate(.9) brightness(.82); }
.w-feature:hover video, .w-feature:focus-visible video { transform: scale(1.01); filter: saturate(1.05) brightness(.95); }
.w-feature__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,8,10,.88), rgba(7,8,10,.1) 55%), linear-gradient(90deg, rgba(7,8,10,.5), transparent 50%); }
.w-feature__text { position: absolute; inset: auto clamp(18px, 3vw, 44px) clamp(18px, 3vw, 40px); display: grid; gap: 10px; justify-items: start; }
.w-feature__text > .mono:first-child { color: var(--accent); }
.w-feature__text strong { font: 800 clamp(54px, 9vw, 170px)/.84 var(--sans); font-stretch: 62%; letter-spacing: -.02em; text-transform: uppercase; }
.w-feature__go { padding-bottom: 4px; border-bottom: 1px solid var(--accent); }

/* ---------- /work: the list ---------- */
.w-list { position: relative; padding: 0 var(--g) clamp(80px, 14vh, 160px); }
.w-list__head, .w-row a { display: grid; grid-template-columns: 64px minmax(0, 1.8fr) minmax(0, .9fr) minmax(0, .9fr) 60px 28px; gap: 18px; align-items: center; }
.w-list__head { padding: 0 0 14px; color: var(--muted); font-size: 10px; }
.w-list__rows { margin: 0; padding: 0; list-style: none; counter-reset: w; }
.w-row { border-top: 1px solid var(--line); }
.w-row:last-child { border-bottom: 1px solid var(--line); }
.w-row a { position: relative; padding: clamp(20px, 3.2vh, 34px) 0; transition: opacity .45s var(--ease); }
.w-row__n { color: var(--accent); }
.w-row__thumb { display: none; }
.w-row__title { font: 760 clamp(34px, 5.4vw, 96px)/.92 var(--sans); font-stretch: 66%; letter-spacing: -.015em; text-transform: uppercase; transition: font-stretch .7s var(--ease), color .35s, transform .7s var(--ease); }
.w-row__client, .w-row__kind, .w-row__dur { color: var(--muted); transition: color .35s; }
.w-row__dur { font-variant-numeric: tabular-nums; text-align: end; }
.w-row__go { font-size: 22px; color: var(--accent); opacity: 0; transform: translate3d(-10px, 10px, 0); transition: opacity .35s, transform .6s var(--ease); }
.w-list__rows:hover .w-row a { opacity: .32; }
.w-list__rows .w-row a:hover, .w-list__rows .w-row a:focus-visible { opacity: 1; }
.w-row a:hover .w-row__title, .w-row a:focus-visible .w-row__title { font-stretch: 92%; color: var(--accent); transform: translate3d(14px, 0, 0); }
.w-row a:hover .w-row__client, .w-row a:hover .w-row__kind, .w-row a:hover .w-row__dur { color: var(--ink); }
.w-row a:hover .w-row__go, .w-row a:focus-visible .w-row__go { opacity: 1; transform: none; }

/* the poster that follows the pointer over the list, then starts playing */
.w-float { position: fixed; z-index: 5; left: 0; top: 0; width: clamp(180px, 15vw, 260px); aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; pointer-events: none; background: #000;
  box-shadow: 0 40px 90px rgba(0,0,0,.7), 0 0 0 1px rgba(255,106,31,.5); opacity: 0; transform: translate3d(var(--fx, 0px), var(--fy, 0px), 0) translate(-50%, -50%) rotate(var(--fr, 0deg)) scale(.7);
  transition: opacity .35s, transform .6s var(--ease); will-change: transform; }
.w-float.is-on { opacity: 1; transform: translate3d(var(--fx, 0px), var(--fy, 0px), 0) translate(-50%, -50%) rotate(var(--fr, 0deg)) scale(1); }
.w-float img, .w-float video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.w-float video { opacity: 0; transition: opacity .4s; }
.w-float video.is-on { opacity: 1; }

/* ---------- film page ---------- */
.f-backdrop { position: fixed; inset: -10%; z-index: 0; background: var(--bg) center / cover no-repeat; background-image: var(--bg); filter: blur(70px) saturate(1.3) brightness(.4); opacity: .55; transform: scale(1.1); pointer-events: none; }
.f-backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 40%, transparent, var(--bg) 75%); }
.f-film { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 110px); align-items: center; min-height: 100svh; padding: clamp(110px, 16vh, 150px) var(--g) clamp(50px, 8vh, 90px); }
.f-film__info { display: grid; gap: clamp(16px, 2.6vh, 26px); justify-items: start; }
.f-crumbs { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); }
.f-crumbs a { color: var(--ink); border-bottom: 1px solid var(--accent); }
.f-film__client { margin: clamp(10px, 4vh, 40px) 0 0; color: var(--accent); }
.f-film__client span { color: var(--muted); }
.f-film__title { margin: 0; font: 800 clamp(58px, 8.2vw, 156px)/.84 var(--sans); font-stretch: 62%; letter-spacing: -.025em; text-transform: uppercase; overflow-wrap: anywhere; }
.f-film__title .w-line { display: block; }
.f-film__brief { max-width: 42ch; margin: 0; font-size: clamp(17px, 1.35vw, 21px); line-height: 1.55; color: #d4cdc5; }
.f-credits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; width: min(100%, 560px); margin: 0; }
.f-credits div { padding: 14px 0; border-top: 1px solid var(--line); }
.f-credits dt { color: var(--muted); font-size: 10px; }
.f-credits dd { margin: 6px 0 0; }
.f-film__cta { margin-top: 8px; }

.f-film__stage { display: grid; place-items: center; }
.f-player { position: relative; margin: 0; display: grid; justify-items: center; gap: 12px; }
.f-player video { display: block; width: auto; max-width: 100%; max-height: calc(100svh - 190px); border-radius: 8px; background: #000; border: 1px solid var(--line);
  box-shadow: 0 50px 140px rgba(0,0,0,.75), 0 0 0 1px rgba(255,106,31,.18); }
.f-player__play { position: absolute; left: 50%; top: 50%; translate: -50% -60%; display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 24px; border-radius: 40px; background: var(--accent); color: #130c08; font-weight: 700; transition: transform .5s var(--ease), opacity .3s; }
.f-player__play i { font-style: normal; }
.f-player__play:hover { transform: scale(1.06); }
.f-player.is-playing .f-player__play { opacity: 0; pointer-events: none; }
.f-player figcaption { color: var(--muted); font-size: 10px; text-align: center; }

.f-next { display: grid; gap: 18px; padding: clamp(40px, 8vh, 90px) var(--g) clamp(30px, 6vh, 70px); border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, var(--bg) 40%); }
.f-next__prev { color: var(--muted); }
.f-next__prev span { color: var(--accent); margin-inline-end: 10px; }
.f-next__main { position: relative; display: grid; gap: 10px; padding: clamp(20px, 4vh, 40px) 0; }
.f-next__main > .mono:first-child { color: var(--accent); }
.f-next__main strong { font: 800 clamp(60px, 12vw, 230px)/.82 var(--sans); font-stretch: 62%; letter-spacing: -.03em; text-transform: uppercase; transition: font-stretch .8s var(--ease), color .35s; max-width: 70%; }
.f-next__meta { color: var(--muted); }
.f-next__main img { position: absolute; right: 0; top: 50%; width: clamp(120px, 14vw, 230px); aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; transform: translateY(-50%) rotate(4deg) scale(.92); opacity: .6; filter: grayscale(.6); transition: transform .9s var(--ease), opacity .5s, filter .5s; }
.f-next__main:hover strong, .f-next__main:focus-visible strong { font-stretch: 85%; color: var(--accent); }
.f-next__main:hover img, .f-next__main:focus-visible img { transform: translateY(-50%) rotate(0) scale(1); opacity: 1; filter: none; }

/* ---------- shared call to action ---------- */
.w-cta { position: relative; padding: clamp(90px, 16vh, 190px) var(--g); border-top: 1px solid var(--line); background: var(--bg); }
.w-cta__title { margin: 20px 0 0; font: 800 clamp(56px, 9vw, 170px)/.84 var(--sans); font-stretch: 62%; letter-spacing: -.02em; text-transform: uppercase; max-width: 12ch; }
.w-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; margin-top: clamp(30px, 6vh, 60px); }
.w-cta__link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--line); transition: border-color .3s, color .3s; }
.w-cta__link:hover, .w-cta__link:focus-visible { border-color: var(--accent); color: var(--accent); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hud__cta { display: none; }
  .w-list__head { display: none; }
  .w-row a { grid-template-columns: 74px minmax(0, 1fr) auto; grid-template-areas: "thumb n go" "thumb title title" "thumb client client" "thumb kind dur"; gap: 4px 16px; padding: 16px 0; }
  .w-row__thumb { display: block; grid-area: thumb; width: 74px; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 4px; align-self: start; }
  .w-row__n { grid-area: n; font-size: 10px; }
  .w-row__title { grid-area: title; font-size: clamp(28px, 8vw, 44px); }
  .w-row__client { grid-area: client; font-size: 10px; }
  .w-row__kind { grid-area: kind; font-size: 10px; }
  .w-row__dur { grid-area: dur; font-size: 10px; }
  .w-row__go { grid-area: go; opacity: 1; transform: none; font-size: 18px; justify-self: end; }
  .w-list__rows:hover .w-row a { opacity: 1; }
  .w-float { display: none; }
  .w-feature__frame { aspect-ratio: 4 / 5; }
  .f-film { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding-top: 100px; gap: 20px; }
  .f-film__info { display: contents; }
  .f-film__info > * { justify-self: start; align-self: flex-start; }
  .f-crumbs { order: 0; } .f-film__client { order: 1; margin-top: 6px; } .f-film__title { order: 2; } .f-film__stage { order: 3; margin-block: 8px; }
  .f-film__brief { order: 4; } .f-credits { order: 5; width: 100%; } .f-film__cta { order: 6; align-self: stretch; justify-content: center; }
  .f-player video { max-height: 78svh; }
  .f-credits { grid-template-columns: 1fr 1fr; }
  .f-next__main strong { max-width: 64%; font-size: clamp(48px, 15vw, 90px); }
  .w-cta__actions { flex-direction: column; align-items: stretch; }
  .w-cta__actions .intro__btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .shutter { display: none; }
  .w-line > span, [data-rise] { transform: none !important; opacity: 1 !important; }
  .w-float { display: none; }
}
