:root {
  --bg: #0b0b0a;
  --bg-2: #141412;
  --fg: #ecebe6;
  --muted: #8d8b84;
  --line: rgba(236, 235, 230, 0.12);
  --accent: #ff5a36;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

img { display: block; max-width: 100%; }

em { font-family: var(--serif); font-style: italic; font-weight: 400; }

::selection { background: var(--accent); color: #000; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.eyebrow {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Nav */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--gutter);
  transition: background 0.4s, border-color 0.4s, padding 0.4s;
  border-bottom: 1px solid transparent;
}

.nav--solid {
  background: rgba(11, 11, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--line);
  padding-block: 14px;
}

.nav__logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav__links { display: flex; gap: clamp(16px, 3vw, 36px); font-size: 14px; }

.nav__links a { opacity: 0.75; transition: opacity 0.2s; }
.nav__links a:hover { opacity: 1; }

/* Hero */

/* Laid out like a film poster: a small title bottom left, a billing block along the bottom */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 110px var(--gutter) clamp(26px, 4.5vh, 44px);
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; z-index: 0; }   /* own stacking context: the film layers stay behind the text */

.hero__still,
.hero__clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The YouTube player is drawn 1.5x oversize and scaled down, so YouTube serves a sharper stream.
   It can't be clicked and stays invisible until the film is actually playing. */
.hero__yt {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero__yt.is-playing { opacity: 1; }

/* Opening animation (html.intro, removed by main.js): the film plays darkened behind the big title;
   then the title settles into place and everything else fades in. */
.hero__shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 10, 0.6);
  opacity: 0;
  transition: opacity 1.6s ease;
}

.hero__kicker, .hero__billing { transition: opacity 1s ease 0.5s; }

html.intro .hero__shade::after { opacity: 1; }
html.intro .hero__kicker,
html.intro .hero__billing,
html.intro .hero__title { opacity: 0; }

.hero__yt iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(max(100vw, 177.78svh) * 1.5);
  height: calc(max(56.25vw, 100svh) * 1.5);
  transform: translate(-50%, -50%) scale(0.6667);
  border: 0;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: 3;   /* above both film layers (z 1-2) */
  background:
    linear-gradient(to bottom, rgba(11, 11, 10, 0.55) 0%, rgba(11, 11, 10, 0.12) 34%, rgba(11, 11, 10, 0) 55%, rgba(11, 11, 10, 0.25) 78%, rgba(11, 11, 10, 0.88) 100%),
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.35) 100%);
}

.hero__content { position: relative; align-self: end; max-width: 900px; margin-bottom: clamp(26px, 4.5vh, 44px); }

.hero__kicker {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(236, 235, 230, 0.85);
}

.hero__title {
  margin: 0;
  font-size: clamp(36px, 5.4vw, 80px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.25);
}

.hero__title em { letter-spacing: -0.005em; }

/* Billing block: thin rule, small credits either side, the showreel button in the middle */
.hero__billing {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(236, 235, 230, 0.28);
}

.hero__credit {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(236, 235, 230, 0.78);
}

.hero__credit em {
  font-size: 1.35em;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--fg);
}

.hero__billing-start { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Sound button: speaker icon, and little moving bars while the sound is on */
.sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(236, 235, 230, 0.32);
  border-radius: 999px;
  background: rgba(11, 11, 10, 0.25);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 235, 230, 0.82);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.sound-btn:hover { color: var(--fg); border-color: rgba(236, 235, 230, 0.6); }

.sound-btn__icon { width: 15px; height: 15px; flex: none; }

.sound-btn__bars { display: none; align-items: flex-end; gap: 2px; height: 11px; }
.sound-btn__bars i { width: 2px; height: 100%; background: var(--accent); border-radius: 1px; transform-origin: bottom; animation: eq 0.9s ease-in-out infinite; }
.sound-btn__bars i:nth-child(2) { animation-delay: -0.3s; }
.sound-btn__bars i:nth-child(3) { animation-delay: -0.6s; }

@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.sound-btn[aria-pressed="true"] { color: var(--fg); border-color: rgba(236, 235, 230, 0.6); }
.sound-btn[aria-pressed="true"] .sound-btn__bars { display: inline-flex; }

.hero__credit--end { justify-self: end; transition: color 0.2s; }
.hero__credit--end:hover { color: var(--fg); }

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 18px 7px 7px;
  border: 1px solid rgba(236, 235, 230, 0.35);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(11, 11, 10, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.play-btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.play-btn__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  flex: none;
}

.play-btn__icon::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 10px;
  border-left: 9px solid #000;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.play-btn__time { color: var(--muted); font-variant-numeric: tabular-nums; }
.play-btn:hover .play-btn__time { color: inherit; opacity: 0.6; }

/* Work */

.work { padding: clamp(80px, 12vw, 160px) var(--gutter) 0; }

.row + .row { margin-top: clamp(56px, 7vw, 96px); }

.row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.row__head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* Small-thumbnail grid: 4 across on a computer, 3 on a tablet, 2 on a phone */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 2.4vw, 34px) clamp(12px, 1.4vw, 20px);
}

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
}

.card {
  display: block;
  text-align: left;
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.card.is-visible { opacity: 1; transform: none; }

.card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-2);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), filter 0.6s;
  filter: saturate(0.9);
}

.card:hover .card__media img,
.card:focus-visible .card__media img { transform: scale(1.045); filter: saturate(1.05); }

/* 9:16 videos: the frame sits upright on a blurred copy of itself */
.card--vertical .card__media .card__img {
  position: relative;
  object-fit: contain;
}

.card--vertical .card__media .card__bg,
.card--vertical:hover .card__media .card__bg {
  position: absolute;
  inset: 0;
  transform: scale(1.3);
  filter: blur(28px) brightness(0.55);
}

.card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition: opacity 0.35s, transform 0.5s var(--ease);
}

.card__play::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 15px;
  border-left: 13px solid #000;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.card:hover .card__play,
.card:focus-visible .card__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.card__time {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 9px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
}

.card__meta {
  display: block;
  padding-top: 12px;
}

.card__title {
  display: block;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.card__sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.work__cta {
  margin: clamp(40px, 5vw, 64px) 0 0;
  color: var(--muted);
  font-size: 16px;
}

.work__cta a { color: var(--accent); font-weight: 500; }
.work__cta a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* About */

.about { padding: clamp(100px, 14vw, 200px) var(--gutter) 0; }

.about__inner { max-width: 1100px; }

.about__lead {
  margin: 0 0 clamp(48px, 7vw, 88px);
  font-size: clamp(26px, 3.6vw, 48px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.about__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.about__cols h3 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.about__cols ul { list-style: none; margin: 0; padding: 0; }
.about__cols li { padding: 4px 0; font-size: 17px; }

/* Contact */

.contact {
  padding: clamp(100px, 14vw, 200px) var(--gutter) clamp(80px, 10vw, 140px);
  text-align: center;
}

.contact__title {
  margin: 0 0 32px;
  font-size: clamp(40px, 7vw, 104px);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.contact__email {
  display: inline-block;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent);
  overflow-wrap: anywhere;
  transition: color 0.2s;
}

.contact__email:hover { color: var(--accent); }

.contact__links { margin-top: 28px; display: flex; justify-content: center; gap: 24px; color: var(--muted); font-size: 15px; }
.contact__links a:hover { color: var(--fg); }

/* Footer */

.footer {
  display: flex;
  justify-content: space-between;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.footer a:hover { color: var(--fg); }

/* Lightbox */

.lightbox {
  width: min(1280px, 100vw - 2 * var(--gutter));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox[open] { animation: pop 0.45s var(--ease); }

@keyframes pop { from { opacity: 0; transform: scale(0.97); } }

.lightbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 14px;
}

.lightbox__title { color: var(--muted); }

.lightbox__close { font-size: 14px; opacity: 0.75; }
.lightbox__close:hover { opacity: 1; }

.lightbox__frame {
  aspect-ratio: 16 / 9;
  max-height: calc(100svh - 120px);
  margin: 0 auto;
  background: #000;
}

.lightbox__frame.is-vertical {
  aspect-ratio: 9 / 16;
  width: auto;
  height: min(calc(100svh - 120px), 1000px);
  max-width: 100%;
}

.lightbox__frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Series: the parts stand side by side, each as tall as the screen allows */
.lightbox__frame.is-series {
  display: flex;
  justify-content: center;
  gap: 16px;
  aspect-ratio: auto;
  max-height: none;
  background: transparent;
}

.lightbox__part {
  flex: 0 1 calc((100svh - 170px) * 9 / 16);
  min-width: 0;
  margin: 0;
}

.lightbox__frame .lightbox__part iframe {
  height: auto;
  aspect-ratio: 9 / 16;
  background: #000;
}

.lightbox__part figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.lightbox:has(.is-series) { max-height: calc(100svh - 24px); overflow-y: auto; }

/* Small screens */

@media (max-width: 700px) {
  .about__cols { grid-template-columns: 1fr 1fr; }
  .hero__billing { grid-template-columns: 1fr auto; row-gap: 14px; }
  .hero__billing .play-btn { grid-column: 1 / -1; grid-row: 1; justify-self: start; }
  .nav__logo { font-size: 13px; }
  .nav__links { font-size: 13px; }
  .lightbox__frame.is-series { flex-direction: column; align-items: center; }
  .lightbox__part { flex: none; width: min(100%, 78vw); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { opacity: 1; transform: none; }
}
