/* ===== Tokens ===== */
:root {
  --bg: #0b0b0b;
  --fg: #f2efe9;
  --muted: #8c8a85;
  --line: #262626;
  --tile: #161616;
  --accent: #f2efe9;
  --pad: clamp(16px, 3vw, 40px);
  --gap: clamp(6px, 0.8vw, 12px);
  --bar-h: 52px;
  --font: "Inter Tight", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
video { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.locked { overflow: hidden; }

/* ===== Slim top bar (hidden until scroll) ===== */
.bar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar-h); z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--pad);
  background: rgba(11, 11, 11, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%); transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.bar.is-visible { transform: none; }
.bar.is-fixed { transition: none; }
.bar__name { grid-column: 2; font-weight: 800; letter-spacing: -0.01em; font-size: 15px; text-transform: uppercase; white-space: nowrap; }
.bar__menu { grid-column: 3; justify-self: end; display: flex; gap: 22px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.bar__menu a, .hero__nav a { opacity: .7; transition: opacity .2s; }
.bar__menu a:hover, .bar__menu a.is-active, .hero__nav a:hover { opacity: 1; }
.bar__toggle { display: none; }

/* ===== Hero ===== */
.hero { padding: calc(var(--pad) * 0.6) var(--pad) var(--pad); }
.display {
  margin: 0; font-weight: 900; text-transform: uppercase; line-height: .82;
  letter-spacing: -0.045em; white-space: nowrap;
  font-size: 11.6vw; /* JS refines this so the text fills the width exactly */
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: baseline;
  margin: clamp(12px, 1.6vw, 22px) 0 clamp(14px, 2vw, 28px);
  font-size: clamp(13px, 1.1vw, 16px); font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.hero__nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--fg); }
.hero__reel { display: block; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; position: relative; margin: 0; background: var(--tile); aspect-ratio: 16 / 9; max-height: 86vh; width: 100%; overflow: hidden; }
.hero__reel video { width: 100%; height: 100%; object-fit: cover; }
.hero__play {
  position: absolute; left: 16px; bottom: 16px;
  font: 500 13px/1 var(--font); letter-spacing: .04em; text-transform: uppercase;
  color: var(--fg); background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.25);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 11px 14px; border-radius: 999px; cursor: pointer;
}
.hero__play:hover { background: rgba(0,0,0,.7); }

/* ===== Section labels ===== */
.label {
  margin: 0 0 clamp(16px, 2vw, 28px); font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
  display: flex; align-items: center; gap: 14px;
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ===== Work grid =====
   Columns: 4 on desktop, 2 on phones. JS (main.js → layout()) places each tile
   with explicit grid-column / grid-row so nothing overlaps and there are no
   holes. Horizontal = 2 cols × 2 rows, vertical = 1 col × 3 rows,
   square / 4:5 = 1 col × 2 rows. A row is 9/32 of a column's width, so a
   2-col horizontal tile is exactly 16:9. */
.work { padding: clamp(40px, 6vw, 96px) var(--pad) 0; }
.grid {
  --cols: 4;
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: var(--row, 120px);
  grid-auto-flow: row dense; /* fallback if JS layout hasn't run */
}
.tile {
  position: relative; overflow: hidden; background: var(--tile); cursor: pointer;
  border: 0; padding: 0; margin: 0; color: inherit; font: inherit; text-align: left;
}
.tile[data-shape="h"] { grid-column: span 2; grid-row: span 2; }
.tile[data-shape="v"] { grid-row: span 3; }
.tile[data-shape="s"] { grid-row: span 2; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .4s; }
.tile__info {
  position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  display: flex; flex-direction: column; gap: 1px;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.tile__client { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.tile__title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.tile:hover video, .tile:focus-visible video { transform: scale(1.03); }
.tile:hover .tile__info, .tile:focus-visible .tile__info { opacity: 1; transform: none; }
.tile:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
@media (hover: none) { .tile__info { opacity: 1; transform: none; padding-top: 28px; } .tile__title { font-size: 14px; } }

/* ===== About ===== */
.about { padding: clamp(72px, 10vw, 160px) var(--pad) 0; }
.about__lead {
  margin: 0; max-width: 18ch; font-weight: 600; letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(34px, 5.6vw, 92px);
}
.about__body {
  margin-top: clamp(28px, 4vw, 56px); margin-left: auto; max-width: 620px;
  font-size: clamp(17px, 1.4vw, 21px); color: #cfccc5; display: grid; gap: 1em;
}
.about__body p { margin: 0; }

/* ===== Clients marquee ===== */
.clients { padding: clamp(72px, 10vw, 160px) 0 0; }
.clients .label { padding: 0 var(--pad); }
.marquee { overflow: hidden; border-block: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track {
  list-style: none; margin: 0; padding: clamp(22px, 3vw, 40px) 0;
  display: flex; width: max-content; gap: clamp(40px, 6vw, 96px);
  animation: marquee 40s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track li {
  font-size: clamp(22px, 2.6vw, 40px); font-weight: 800; letter-spacing: -0.03em;
  text-transform: uppercase; white-space: nowrap; color: #d9d6cf; opacity: .85;
}
.marquee__track li img { height: clamp(22px, 2.6vw, 40px); width: auto; display: block; filter: grayscale(1) brightness(1.6); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Contact ===== */
.contact { padding: clamp(72px, 10vw, 160px) var(--pad) clamp(56px, 8vw, 120px); }
.contact__intro { margin: 0 0 12px; font-size: clamp(17px, 1.4vw, 21px); color: #cfccc5; }
.contact__email {
  display: inline-block; font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  font-size: clamp(30px, 7.2vw, 128px); overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .4s; padding-bottom: .06em;
}
.contact__email:hover { background-size: 100% 2px; }

.foot { display: flex; justify-content: space-between; gap: 16px; padding: 20px var(--pad) calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ===== Viewer ===== */
.viewer {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 72px;
}
.viewer[hidden] { display: none; }
.viewer video { max-width: 100%; max-height: 100%; width: auto; height: auto; background: #000; }
.viewer__caption {
  position: absolute; left: 20px; right: 80px; top: 18px; display: flex; gap: 14px; align-items: baseline;
  font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.65);
}
#viewerTitle { color: #fff; font-weight: 600; }
#viewerCount { margin-left: auto; font-variant-numeric: tabular-nums; }
.viewer__btn {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font: 300 44px/1 var(--font); width: 56px; height: 56px; opacity: .7; transition: opacity .2s;
  display: grid; place-items: center;
}
.viewer__btn:hover { opacity: 1; }
.viewer__close { top: 4px; right: 8px; font-size: 40px; }
.viewer__prev { left: 8px; top: 50%; transform: translateY(-50%); font-size: 64px; }
.viewer__next { right: 8px; top: 50%; transform: translateY(-50%); font-size: 64px; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  :root { --bar-h: 48px; }
  .grid { --cols: 2; }
  .hero__nav { display: none; }
  .hero__meta { gap: 4px 16px; }
  .hero__reel { aspect-ratio: 4 / 5; }
  .bar { grid-template-columns: 44px 1fr 44px; }
  .bar__name { text-align: center; }
  .bar__toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    grid-column: 3; justify-self: end; width: 44px; height: 44px; padding: 0 10px;
    background: none; border: 0; cursor: pointer;
  }
  .bar__toggle span:not(.sr-only) { display: block; height: 1.5px; background: var(--fg); transition: transform .25s; }
  .bar__toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(3.75px) rotate(45deg); }
  .bar__toggle[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-3.75px) rotate(-45deg); }
  .bar__menu {
    position: fixed; top: var(--bar-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(11,11,11,.97); border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 16px; font-size: 22px; font-weight: 600;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .bar__menu a { padding: 10px 0; opacity: 1; }
  .bar.is-open .bar__menu { opacity: 1; transform: none; pointer-events: auto; }
  .viewer { padding: 52px 0; }
  .viewer__prev, .viewer__next { top: auto; bottom: 0; transform: none; font-size: 48px; }
  .viewer__caption { right: 64px; flex-wrap: wrap; gap: 2px 10px; }
  #viewerCount { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; padding-inline: var(--pad); }
  .marquee__track li[aria-hidden] { display: none; }
}

/* ===== Reel: click anywhere for the full reel with sound ===== */
.hero__cue {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.96);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px 14px 16px; border-radius: 999px;
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.3);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font: 600 14px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: #fff;
  opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
}
.hero__cue-icon {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: #000; font-size: 13px; padding-left: 2px;
}
.hero__reel:hover .hero__cue, .hero__reel:focus-visible .hero__cue { opacity: 1; transform: translate(-50%, -50%); }
.hero__reel:hover .hero__play { opacity: 0; }
.hero__play { pointer-events: none; transition: opacity .3s; }
.hero__reel:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
@media (hover: none) { .hero__cue { display: none; } }

/* ===== Sub pages (Documentary, Experiential) ===== */
.page { padding-top: var(--bar-h); }
.page-head { padding: clamp(28px, 5vw, 64px) var(--pad) 0; }
.page-intro {
  margin: clamp(16px, 2vw, 28px) 0 0; max-width: 46ch;
  font-size: clamp(18px, 1.6vw, 24px); line-height: 1.35; color: #cfccc5; letter-spacing: -0.01em;
}
.work--page { padding-top: clamp(32px, 4vw, 56px); }

/* ===== Links to the other pages ===== */
.more { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: var(--gap); }
.more__link {
  display: flex; flex-direction: column; gap: 6px; padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--line); transition: background .25s, border-color .25s;
}
.more__link:hover { background: #141414; border-color: #3a3a3a; }
.more__kicker { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.more__title { font-size: clamp(24px, 3.4vw, 52px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }

/* ===== Photos ===== */
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.03); }
.viewer img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.viewer video[hidden], .viewer img[hidden], .viewer__btn[hidden] { display: none; }

/* Six menu items: switch to the menu button a little earlier */
@media (max-width: 1100px) {
  .bar { grid-template-columns: 44px 1fr 44px; }
  .bar__name { text-align: center; }
  .bar__toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    grid-column: 3; justify-self: end; width: 44px; height: 44px; padding: 0 10px;
    background: none; border: 0; cursor: pointer;
  }
  .bar__toggle span:not(.sr-only) { display: block; height: 1.5px; background: var(--fg); transition: transform .25s; }
  .bar__toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(3.75px) rotate(45deg); }
  .bar__toggle[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-3.75px) rotate(-45deg); }
  .bar__menu {
    position: fixed; top: var(--bar-h); left: calc(-1 * var(--pad)); right: calc(-1 * var(--pad)); justify-self: stretch; width: auto; grid-column: 1 / -1; flex-direction: column; gap: 0;
    background: rgba(11,11,11,.97); border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 16px; font-size: 22px; font-weight: 600;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .bar__menu a { padding: 10px 0; opacity: 1; }
  .bar.is-open .bar__menu { opacity: 1; transform: none; pointer-events: auto; }
}
@media (max-width: 760px) {
  .more { grid-template-columns: 1fr; }
}

/* Documentary / Experiential: fewer, bigger tiles (2 columns, wide work runs full width) */
.work--page .grid { --cols: 2; }

/* Experiential: the photos are about 1000 px wide, so cap the grid near their real size
   instead of stretching them across the whole page */
.work--narrow .grid { max-width: 960px; margin-inline: auto; }


/* ===== About: small contact-style portrait with an analog film look (grain, dust, leak, date stamp) ===== */
.about__grid {
  display: grid; grid-template-columns: clamp(200px, 22vw, 300px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 88px); align-items: start;
}
.about__text .about__lead { max-width: 16ch; font-size: clamp(32px, 4.2vw, 76px); }
.about__text .about__body { margin-left: 0; max-width: 560px; }
.portrait { margin: 0; }


/* the photo */
.portrait__frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #1a1a1a; border-radius: 5px;
}
.portrait__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(.94) sepia(.08);
}

/* vignette + soft burned edges */
.portrait__frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,0,0,.55) 100%);
  box-shadow: inset 0 0 22px rgba(0,0,0,.65);
}

/* heavy film grain: two noise layers, jittered */
.portrait__grain {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; opacity: .42;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.45' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)' opacity='.6'/%3E%3C/svg%3E");
}

/* dust specks and a couple of hairline scratches that drift */
.portrait__dust {
  position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: screen;
  background:
    linear-gradient(90deg, transparent calc(23% - .5px), rgba(255,255,255,.35) 23%, transparent calc(23% + .5px)),
    linear-gradient(90deg, transparent calc(71% - .5px), rgba(255,255,255,.22) 71%, transparent calc(71% + .5px)),
    radial-gradient(1.5px 1.5px at 18% 30%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 64% 22%, rgba(255,255,255,.7), transparent),
    radial-gradient(2px 1.2px at 80% 68%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 2px at 36% 82%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.2px 1.2px at 52% 55%, rgba(0,0,0,.7), transparent);
}

/* faint warm light leak on one edge */
.portrait__leak {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(60% 45% at 100% 8%, rgba(255, 120, 40, .28), transparent 70%),
              linear-gradient(to left, rgba(255, 170, 80, .12), transparent 18%);
}

/* orange LCD date stamp, like a point-and-shoot */
.portrait__date {
  position: absolute; right: 12px; bottom: 11px; z-index: 1;
  font: 700 12px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em;
  color: #ff9a3c; text-shadow: 0 0 6px rgba(255, 120, 30, .8), 0 0 1px #ffb46b; opacity: .92;
}


@media (max-width: 760px) {
  .about__grid { grid-template-columns: 1fr; }
  .portrait { max-width: 220px; }
  .portrait__date { font-size: 11px; right: 9px; bottom: 9px; }
}
.portrait__cap {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.portrait__cap { font-size: 11px; margin-top: 10px; }

/* Reel button: short label on phones */
.hero__play-short { display: none; }
@media (max-width: 760px) {
  .hero__play-long { display: none; }
  .hero__play-short { display: inline; }
  .hero__play { padding: 11px 18px; }
}
