:root {
  --bg: #12161c;        /* screening-room slate */
  --panel: #1b2129;
  --line: #2c343f;
  --text: #ece7dc;      /* warm projector white */
  --muted: #98a0ac;
  --tungsten: #f2b84b;  /* the one warm light in the room */
  --tungsten-ink: #221703;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Manrope", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--tungsten); color: var(--tungsten-ink); padding: 8px 14px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--tungsten); color: var(--tungsten-ink);
  font-weight: 700; text-decoration: none;
  padding: .8em 1.3em; border-radius: 999px;
  transition: background-color .2s, transform .2s;
}
.btn:hover { background: #ffd07a; }
.btn:active { transform: scale(.97); }
.btn-small { padding: .5em 1em; font-size: .9375rem; }
.link {
  color: var(--text); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: .3em; text-decoration-thickness: 2px;
  transition: text-decoration-color .2s;
}
.link:hover { text-decoration-color: var(--tungsten); }

/* ---------- header ---------- */
/* The bar sits at the top of the page and scrolls away with it, fading as it goes. */
.top {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
}
@supports (animation-timeline: scroll()) {
  .top {
    animation: bar-fade linear both;
    animation-timeline: scroll(root);
    animation-range: 0 120px;
  }
  @keyframes bar-fade { to { opacity: 0; } }
}
.mark {
  font-family: var(--display); font-weight: 800; font-size: 1.5rem;
  text-decoration: none; letter-spacing: .01em;
}
.top nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); }
.top nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; transition: color .2s; }
.top nav a:not(.btn):hover { color: var(--text); }
.mark, .top nav a, .sound { white-space: nowrap; }
@media (max-width: 900px) { .top nav a:not(.btn) { display: none; } }

/* ---------- hero ---------- */
.hero { padding-top: clamp(24px, 5vw, 64px); }
.hero-text {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: auto minmax(0, 30rem);
  align-items: end; justify-content: space-between; gap: 24px 48px;
}
.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(5.5rem, 17vw, 16rem);
  line-height: .8; letter-spacing: -.01em;
  text-transform: none;
}
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }

/* The wall: every piece of work running at once, in its own shape. */
.wall {
  --h: clamp(200px, 38vh, 380px);
  margin-top: clamp(40px, 6vw, 72px);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.wall-track {
  display: flex; gap: 12px; width: max-content;
  animation: drift 90s linear infinite;
}
.wall:hover .wall-track, .wall:focus-within .wall-track { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(calc(-50% - 6px)); } }
.screen {
  position: relative; height: var(--h); flex: none;
  padding: 0; border: 0; background: var(--panel); cursor: pointer;
  border-radius: 6px; overflow: hidden;
}
.screen video, .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen video { opacity: 0; transition: opacity .4s; }
.screen video.on { opacity: 1; }
.screen::after {
  content: attr(data-title);
  position: absolute; inset: auto 0 0 0; padding: 32px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff; font: 700 .9375rem/1.3 var(--body); text-align: left;
  opacity: 0; transition: opacity .25s;
}
.screen:hover::after, .screen:focus-visible::after { opacity: 1; }

/* ---------- sections ---------- */
section { scroll-margin-top: 24px; }
.work, .camera, .web, .process, .about, .contact {
  max-width: var(--max); margin: 0 auto; padding: clamp(80px, 10vw, 140px) var(--gutter) 0;
}
h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.5rem); line-height: .9;
}
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; }
.section-lede { max-width: 38rem; margin-top: 20px; color: var(--muted); font-size: 1.125rem; }
.note { margin-top: 16px; color: var(--muted); font-size: .9375rem; max-width: 40rem; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font: 500 .9375rem var(--body); color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: .45em 1em; cursor: pointer; transition: color .2s, border-color .2s, background-color .2s;
}
.filters button span { opacity: .6; margin-left: .15em; }
.filters button:hover { color: var(--text); border-color: var(--muted); }
.filters button[aria-pressed="true"] { color: var(--tungsten-ink); background: var(--text); border-color: var(--text); }

/* Justified grid: each card is as wide as its shape, so every row shares one height. */
.grid {
  --row: clamp(220px, 30vw, 420px);
  list-style: none; margin: 36px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 36px 16px;
}
.grid::after { content: ""; flex: 999 1 0; }
.card { flex: var(--r) 1 calc(var(--r) * var(--row)); min-width: 0; }
.card[hidden] { display: none; }
.card button {
  all: unset; display: block; width: 100%; cursor: pointer;
}
.card-media { display: block;
  position: relative; aspect-ratio: var(--r); border-radius: 6px; overflow: hidden; background: var(--panel);
}
.card-media img, .card-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.card-media video { opacity: 0; transition: opacity .3s; }
.card.playing .card-media video { opacity: 1; }
.card-media .runtime {
  position: absolute; right: 10px; bottom: 10px; z-index: 1;
  background: rgba(0,0,0,.6); color: #fff; font-size: .8125rem; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; font-variant-numeric: tabular-nums;
}
.card h3 { margin-top: 14px; font: 700 1.125rem/1.3 var(--body); transition: color .2s; }
.card button:hover h3, .card button:focus-visible h3 { color: var(--tungsten); }
.card button:focus-visible .card-media { outline: 2px solid var(--tungsten); outline-offset: 3px; }
.card .meta { margin-top: 2px; color: var(--muted); font-size: .9375rem; }
.tag {
  display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 4px;
  border: 1px solid var(--line); color: var(--text); font-size: .8125rem; font-weight: 500;
}

/* ---------- camera work ---------- */
.camera .grid, .web .grid { margin-top: 44px; }
.grid-web { --row: clamp(220px, 34vw, 480px); }
.grid-web .card { flex-grow: 0; max-width: 880px; }
.sub-head {
  margin-top: clamp(64px, 8vw, 104px);
  font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); line-height: 1;
}
/* Photos keep their own shape: a masonry of columns. */
.photos {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.photos button { all: unset; display: block; cursor: zoom-in; border-radius: 6px; overflow: hidden; }
.photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.photos button:hover img { transform: scale(1.03); }
.photos button:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 3px; }

/* ---------- process ---------- */
.steps {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0;
  counter-reset: step;
  border-top: 1px solid var(--line);
}
.steps li { counter-increment: step; padding: 24px 24px 0 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 18px;
  font: 800 3.5rem/1 var(--display); color: var(--tungsten);
}
.steps h3 { font: 700 1.125rem/1.3 var(--body); }
.steps p { margin-top: 8px; color: var(--muted); font-size: .9688rem; }

/* ---------- about ---------- */
.about-cols {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 48px clamp(40px, 6vw, 96px); margin-top: 40px;
}
.about-body { max-width: 40rem; }
.about-body p + p { margin-top: 1.1em; color: #cfd3da; }
.about-body .big {
  font-size: clamp(1.375rem, 2.3vw, 1.875rem); line-height: 1.35; font-weight: 500;
  margin-bottom: 1.4em; color: var(--text);
}
.portrait {
  width: 100%; max-width: 280px; height: auto; aspect-ratio: 1000 / 1184; object-fit: cover;
  border-radius: 6px; margin-bottom: 32px; filter: grayscale(.15);
}
.facts h3 { font: 700 .9375rem var(--body); color: var(--muted); }
.facts h3:not(:first-child) { margin-top: 32px; }
.timeline { margin: 12px 0 0; }
.timeline div {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.timeline dt { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.timeline dd { margin: 0; }
.clients { margin-top: 10px; line-height: 1.7; }
/* Tools sit in one row of columns under About, so the page doesn't run long. */
.toolkit { margin-top: clamp(48px, 6vw, 72px); }
.toolkit h3 { font: 700 .9375rem var(--body); color: var(--muted); }
.tools {
  margin: 14px 0 0; display: grid; gap: 0 24px;
  grid-template-columns: 2.2fr 1.8fr 1.2fr 1fr 1fr;
  border-top: 1px solid var(--line);
}
.tools div { padding-top: 14px; }
.tools dt { color: var(--muted); font-size: .875rem; }
.tools dd { margin: 4px 0 0; line-height: 1.6; }
@media (max-width: 960px) {
  .tools { grid-template-columns: 1fr 1fr; gap: 20px 24px; }
}

/* ---------- contact ---------- */
.contact { padding-bottom: 48px; }
.contact h2 { font-size: clamp(3.5rem, 11vw, 9rem); }
.contact > p:first-of-type { margin-top: 20px; max-width: 34rem; font-size: 1.1875rem; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 32px; }
.contact .btn { font-size: 1.125rem; }
.fine { margin-top: clamp(64px, 10vw, 120px); padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }

/* ---------- player ---------- */
.player {
  width: min(1200px, 100vw - 32px); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 10px; background: var(--panel); color: var(--text);
  overflow: auto;
}
.player::backdrop { background: rgba(6, 8, 11, .88); }
.player[open] { animation: open .25s ease-out; }
@keyframes open { from { opacity: 0; transform: scale(.98); } }
.player-frame { background: #000; display: flex; justify-content: center; }
.player-frame video, .player-frame img { max-height: 62dvh; width: auto; max-width: 100%; }
.player.is-photo .player-frame img { max-height: 76dvh; }
.player.is-photo .player-info { padding-top: 14px; padding-bottom: 16px; }
.player.is-photo .player-info h2 { font-size: 1.5rem; }
.player-info {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 16px 32px;
  padding: 20px 24px 24px;
}
.player-info h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1; margin-top: 4px; }
.player-brand { color: var(--muted); font-size: .9375rem; }
.player-about { margin-top: 10px; max-width: 42rem; color: #cfd3da; }
.player-nav { display: flex; gap: 8px; }
.btn-ghost {
  font: 500 .9375rem var(--body); color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: .5em 1em; cursor: pointer;
  transition: border-color .2s;
}
.btn-ghost:hover { border-color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .hero-text { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps li, .steps li + li {
    padding: 20px 0 20px 72px; border-left: 0; border-top: 1px solid var(--line); position: relative;
  }
  .steps li::before { position: absolute; left: 0; top: 18px; margin: 0; font-size: 2.75rem; }
  .about-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .top nav a:not(.btn) { display: none; }
  .grid { --row: 118px; gap: 24px 10px; }
  .card h3 { font-size: .9375rem; margin-top: 10px; }
  .card .meta { font-size: .8125rem; }
  .card-media .runtime { right: 6px; bottom: 6px; font-size: .75rem; padding: 1px 6px; }
  .tag { font-size: .75rem; padding: 0 5px; }
  .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wall { --h: 220px; }
  .player-info { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wall-track { animation: none; }
  .wall { overflow-x: auto; }
  .player[open] { animation: none; }
}

/* ---------- film grain over everything (a nod to shot-on-film work) ---------- */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 100; pointer-events: none;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .07; mix-blend-mode: overlay;
  animation: grain 1s steps(4) infinite;
}
@keyframes grain {
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -1%); }
}

/* ---------- scroll unblur: things come into focus as they enter the screen ---------- */
.hero h1 { animation: focus-in 1.4s cubic-bezier(.2, .7, .2, 1) both; }
.hero-side { animation: focus-in 1.4s .25s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes focus-in {
  from { filter: blur(18px); opacity: 0; transform: scale(1.04); }
  to { filter: none; opacity: 1; transform: none; }
}
@supports (animation-timeline: view()) {
  .reveal {
    animation: focus-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 70%;
  }
}
@supports not (animation-timeline: view()) {
  .reveal { transition: filter .9s ease-out, opacity .9s ease-out, transform .9s ease-out; }
  .reveal:not(.in) { filter: blur(18px); opacity: 0; transform: scale(1.04); }
}

/* ---------- background music toggle ---------- */
.sound {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 .9375rem var(--body); color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: .45em .9em; cursor: pointer; transition: color .2s, border-color .2s;
}
.sound:hover { color: var(--text); border-color: var(--muted); }
.sound[aria-pressed="true"] { color: var(--text); }
.bars { display: inline-flex; align-items: end; gap: 2px; height: 12px; }
.bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height .2s; }
.sound[aria-pressed="true"] .bars i { animation: eq .9s ease-in-out infinite alternate; }
.sound[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
/* Phones: skip the moving grain, which costs smoothness while scrolling. */
@media (max-width: 900px), (hover: none) {
  body::after { display: none; }
}
@media (max-width: 600px) {
  .sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sound { padding: .6em .8em; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .hero h1, .hero-side, .reveal { animation: none; transition: none; filter: none; opacity: 1; transform: none; }
  .sound[aria-pressed="true"] .bars i { animation: none; height: 8px; }
}
