/* Mobile first: base styles are for phones, wider screens layer on top. */
:root {
  --bg: #0d0d0d;
  --bg-raised: #171717;
  --text: #edece8;
  --soft: #c9c7c1;
  --muted: #8f8d87;
  --line: #262626;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --gutter: 16px;
  --row: 190px;
  --gap: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

.label {
  font: 500 11px/1.2 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  background: linear-gradient(rgba(13,13,13,.8), rgba(13,13,13,0));
  transition: background .3s;
}
.nav.solid { background: rgba(13,13,13,.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.brand { display: none; font: 500 20px/1 var(--serif); letter-spacing: .04em; text-decoration: none; white-space: nowrap; }
.nav nav { display: flex; justify-content: space-between; flex: 1; gap: 12px; }
.nav nav a { font: 500 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--soft); white-space: nowrap; padding: 6px 0; }
.nav nav a:hover { color: var(--text); }

/* Hero */
.hero { position: relative; height: 100svh; min-height: 480px; overflow: hidden; background: #000; }
.hero > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focus, 72% 30%);
  animation: fade 1.4s ease-out both;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,13,13,.95) 0%, rgba(13,13,13,.4) 45%, rgba(13,13,13,0) 75%);
}
.hero-text {
  position: absolute; z-index: 1; left: var(--gutter); right: var(--gutter);
  bottom: max(48px, calc(env(safe-area-inset-bottom) + 36px));
  animation: fade 1.2s .3s ease-out both;
}
.hero h1 { font: 400 clamp(52px, 13vw, 132px)/.92 var(--serif); letter-spacing: -.005em; }
.hero-text p { font-size: 17px; color: var(--soft); margin: 14px 0 26px; max-width: 30ch; }
.hero-caption { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-block; padding: 14px 22px; border: 1px solid var(--text);
  background: var(--text); color: var(--bg); text-decoration: none;
  font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: transparent; color: var(--text); }
.btn.ghost { background: transparent; color: var(--text); border-color: rgba(237,236,232,.4); }
.btn.ghost:hover { border-color: var(--text); }

/* Credits strip */
.strip { padding: 28px var(--gutter); border-bottom: 1px solid var(--line); }
.strip h2 { margin-bottom: 12px; }
.strip ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.strip li { font: 500 16px/1.5 var(--serif); letter-spacing: .06em; color: var(--soft); }

/* Sections */
.section { padding: 80px var(--gutter) 0; }
.section-head { margin-bottom: 32px; }
.section-head h2 { font: 400 44px/1 var(--serif); }
.section-head p { margin: 16px 0 0; color: var(--soft); max-width: 62ch; }

/* Work cards: one cover per production, gallery opens in the lightbox */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card { position: relative; display: block; overflow: hidden; background: var(--bg-raised); aspect-ratio: 3 / 2; cursor: zoom-in; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, opacity .4s; }
.card img.top { object-position: 50% 20%; }
.card-info {
  position: absolute; inset: auto 0 0; padding: 40px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,0));
  display: grid; gap: 4px;
}
.card-title { font: 500 24px/1.1 var(--serif); }
.card-sub, .count { font: 500 10.5px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.count { color: var(--muted); }

.campaign { margin-top: 64px; }
.campaign .note { color: var(--muted); font-size: 14px; margin: 8px 0 20px; }
.campaign .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 8px; align-items: start; }
.campaign .rows::after { content: none; }
.more-work { margin-top: 64px; }
.more-work .note { color: var(--muted); font-size: 14px; margin: 8px 0 20px; }
.cards.small { grid-template-columns: 1fr 1fr; gap: 8px; }
.cards.small .card-title { font-size: 19px; }
.cards.small .card-info { padding: 28px 10px 10px; }

/* Justified rows: each tile grows in proportion to its aspect ratio */
.rows { display: flex; flex-wrap: wrap; gap: var(--gap); }
.rows::after { content: ""; flex-grow: 999; }
.tile { margin: 0; flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--row)); min-width: 0; }
.tile a { display: block; overflow: hidden; background: var(--bg-raised); cursor: zoom-in; }
.tile img { width: 100%; }
.tile figcaption { font-size: 12px; color: var(--muted); padding-top: 6px; }

/* Production cards with video clips span the full Work grid */
.cards { grid-auto-flow: dense; }
.feature { grid-column: 1 / -1; padding: 20px 0 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 12px 0; }
.feature header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.feature h3 { font: 500 30px/1.1 var(--serif); }
.feature-intro { color: var(--soft); margin: 10px 0 20px; max-width: 60ch; }

/* Clip tiles: a local thumbnail and a play button; the platform loads on click */
.clip-grid { display: grid; grid-template-columns: 1fr; gap: 20px 12px; }
/* Cap tall formats so a 9:16 tile never outgrows the screen; wide ones fill the column. */
.clip { margin: 0; width: min(100%, calc(min(620px, 72svh) * var(--ar, 9 / 16))); }
.clip-play {
  position: relative; display: block; width: 100%; aspect-ratio: var(--ar, 9 / 16);
  padding: 0; border: 0; overflow: hidden; background: var(--bg-raised); color: var(--text); cursor: pointer;
}
.clip-play img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, opacity .3s; }
.clip-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  padding: 18px; text-align: left;
  background: radial-gradient(120% 80% at 50% 30%, #222 0%, var(--bg-raised) 60%, #101010 100%);
}
.clip-ph span:first-child { font: 500 24px/1.1 var(--serif); }
.clip-ph span:last-child { font: 500 10.5px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.play {
  position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px;
  border: 1px solid rgba(237,236,232,.7); border-radius: 50%; background: rgba(13,13,13,.35);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: background .25s, transform .25s;
}
.play::after {
  content: ""; position: absolute; top: 50%; left: 50%; margin: -8px 0 0 -4px;
  border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--text);
}
.clip-platform { position: absolute; top: 10px; left: 10px; padding: 5px 7px; background: rgba(13,13,13,.55); font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.clip-play:hover img { transform: scale(1.03); }
.clip-play:hover .play, .clip-play:focus-visible .play { background: rgba(13,13,13,.6); transform: scale(1.06); }
.clip-play:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.clip-credit { margin: 8px 0 0; font-size: 12px; line-height: 1.5; font-style: italic; color: var(--muted); }

.recent { margin-top: 40px; max-width: 720px; }
.recent h3 { margin-bottom: 8px; }
.recent li { padding: 12px 0; border-top: 1px solid var(--line); color: var(--soft); font-size: 15px; }

/* Credits */
.credits section { margin-bottom: 36px; }
.credits h3 { margin-bottom: 10px; }
.credits li { padding: 9px 0; border-top: 1px solid var(--line); font: 500 20px/1.3 var(--serif); }

.section-head .about { font: 400 24px/1.45 var(--serif); color: var(--text); max-width: 40ch; margin-top: 24px; }

/* Contact */
.contact { text-align: center; padding-bottom: 96px; }
.contact h2 { font: 400 40px/1.08 var(--serif); max-width: 14ch; margin: 0 auto 28px; }
.contact .actions { justify-content: center; flex-direction: column; align-items: stretch; max-width: 340px; margin: 0 auto; }
.contact .btn { text-transform: none; letter-spacing: .02em; font-size: 15px; padding: 16px 22px; }
.contact .note { color: var(--muted); font-size: 13px; margin-top: 24px; }

.footer { padding: 24px var(--gutter) max(24px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer p { margin: 0; font-size: 12px; color: var(--muted); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,5,5,.98); touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; width: 100%; }
.lightbox img { max-height: calc(100svh - 120px); width: auto; max-width: 100%; margin: 0 auto; user-select: none; -webkit-user-drag: none; }
.lightbox figcaption { display: grid; justify-items: center; gap: 4px; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .08em; padding: 14px var(--gutter) 0; }
.lb-credit { font-style: italic; letter-spacing: 0; max-width: 60ch; }
.lb-credit:empty { display: none; }
.lb-source { color: var(--soft); letter-spacing: .12em; text-transform: uppercase; font-size: 10.5px; text-decoration: none; margin-top: 2px; }
.lb-source:hover { color: var(--text); }
.lb-embed {
  --h: calc(100svh - 190px);
  width: min(100% - 2 * var(--gutter), 480px);
  max-height: var(--h); margin: 0 auto; overflow-y: auto; overscroll-behavior: contain;
}
.lb-embed[hidden] { display: none; }
.lb-embed[data-platform="youtube"] { position: relative; aspect-ratio: var(--ar); width: min(100% - 2 * var(--gutter), var(--h) * var(--ar)); overflow: hidden; }
.lb-embed[data-platform="youtube"] iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lb-embed .instagram-media, .lb-embed .twitter-tweet { margin: 0 auto !important; min-width: 0 !important; max-width: 100% !important; }
.lb-fallback { display: grid; justify-items: center; gap: 16px; margin: 0; padding: 48px 16px; color: var(--soft); text-align: center; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--text); cursor: pointer;
  font: 300 40px/1 var(--sans); padding: 14px 18px; opacity: .75;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: max(4px, env(safe-area-inset-top)); right: 4px; }
.lb-prev, .lb-next { bottom: max(4px, env(safe-area-inset-bottom)); }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }

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

/* Hover only reveals card text where hover exists; phones always see it. */
@media (hover: hover) {
  .card-info { opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
  .card:hover .card-info, .card:focus-visible .card-info { opacity: 1; transform: none; }
  .card:hover img { transform: scale(1.03); }
}

@media (min-width: 640px) {
  :root { --gutter: 32px; --row: 240px; --gap: 8px; }
  .brand { display: block; }
  .nav nav { flex: 0 1 auto; gap: 28px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards.small { grid-template-columns: repeat(3, 1fr); }
  .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign .rows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact .actions { flex-direction: row; max-width: none; align-items: center; }
  .credits { columns: 2; column-gap: 48px; }
  .credits section { break-inside: avoid; }
}

@media (min-width: 1100px) {
  :root { --gutter: 56px; --row: 280px; }
  .hero-text p { font-size: 20px; }
  .hero-caption { display: block; position: absolute; z-index: 1; right: var(--gutter); bottom: 24px; margin: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
  .section { padding-top: 140px; }
  .section-head { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: baseline; margin-bottom: 48px; }
  .section-head h2 { font-size: 64px; }
  .section-head p { margin: 0; font-size: 17px; }
  .section-head .about { font-size: 30px; margin: 0; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .cards.small { grid-template-columns: repeat(3, 1fr); }
  .clip-grid { grid-template-columns: repeat(2, minmax(0, 460px)); gap: 28px 20px; }
  .campaign .rows { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .credits { columns: 3; }
  .contact h2 { font-size: 72px; }
  .lb-prev, .lb-next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox figure { max-width: calc(100vw - 160px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
