:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #8a8a8a;
  --line: #e6e6e6;
  --gutter: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter);
  mix-blend-mode: difference;
  color: #fff;
  pointer-events: none;
}
.header > * { pointer-events: auto; }
body.menu-open .header { mix-blend-mode: normal; }

.logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.burger {
  width: 40px;
  height: 40px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
  color: inherit;
  margin-right: -8px;
}
.burger span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.6s var(--ease), top 0.6s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 24px; }
body.menu-open .burger span:nth-child(1) { top: 19.5px; transform: rotate(45deg); }
body.menu-open .burger span:nth-child(2) { top: 19.5px; transform: rotate(-45deg); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--fg);
  color: #fff;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 120px var(--gutter) 32px;
  visibility: hidden;
}
body.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; }
.menu.closing { visibility: visible; }

.menu nav ul { list-style: none; }
.menu nav li { overflow: hidden; }
.menu nav a {
  display: inline-block;
  font-size: clamp(56px, 11vw, 160px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  padding-bottom: 0.06em;
  transform: translateY(105%);
  transition: transform 0.8s var(--ease-out), opacity 0.3s;
}
body.menu-open .menu nav a { transform: translateY(0); }
body.menu-open .menu nav li:nth-child(1) a { transition-delay: 0.25s; }
body.menu-open .menu nav li:nth-child(2) a { transition-delay: 0.32s; }
body.menu-open .menu nav li:nth-child(3) a { transition-delay: 0.39s; }
.menu nav ul:hover a { opacity: 0.35; }
.menu nav ul a:hover { opacity: 1; }

.menu-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
  color: #9a9a9a;
  opacity: 0;
  transition: opacity 0.5s;
}
body.menu-open .menu-foot { opacity: 1; transition-delay: 0.5s; }
.menu-foot a:hover { color: #fff; }

/* ---------- Layout ---------- */
main { padding: 0 var(--gutter); }

.intro {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px 0 56px;
}
.intro h1 {
  font-size: clamp(48px, 9.5vw, 168px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.92;
}
.intro h1 sup {
  font-size: 0.22em;
  letter-spacing: 0;
  vertical-align: top;
  margin-left: 0.15em;
  font-weight: 400;
  color: var(--muted);
}

.section-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  padding: 14px 0 20px;
  scroll-margin-top: 80px;
}

/* ---------- Work grid ---------- */
/* full-bleed: break out of main's gutter, no gaps, no borders */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0 calc(-1 * var(--gutter));
}

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  color: #fff;
}

.tile-media {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 100vh;
  width: 100%;
  background: #111;
}
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 1.4s var(--ease-out);
}
.tile:hover .tile-media img { transform: scale(1.03); }

/* title sits on the image */
.tile-meta {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 120px var(--gutter) clamp(20px, 3vw, 40px);
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  pointer-events: none;
}
.tile-meta .client {
  display: block;
  font-size: clamp(36px, 6.4vw, 104px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.tile-meta .title {
  display: block;
  margin-top: 10px;
  font-size: clamp(14px, 1.3vw, 18px);
  opacity: 0.8;
}
/* leave a little room under the fixed menu bar (bar ≈ 84px tall) */
.grid#work { padding-top: 96px; scroll-margin-top: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Project page ---------- */
.project-head {
  padding: 140px 0 48px;
  display: grid;
  gap: 18px;
}
.project-head .back {
  font-size: 13px;
  color: var(--muted);
  width: fit-content;
}
.project-head .back:hover { color: var(--fg); }
.project-head .client { font-size: 15px; font-weight: 500; }
.project-head h1 {
  font-size: clamp(40px, 7.5vw, 128px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.95;
  max-width: 14ch;
}

/* full-bleed media: break out of main's gutter */
.project-video,
.stitch { margin: 0 calc(-1 * var(--gutter)); }

.project-video { background: #000; }
.project-video video { width: 100%; height: auto; max-height: 100vh; margin: 0 auto; }

.stitch img { width: 100%; height: auto; } /* no gaps: continuous scroll */

.empty {
  padding: 48px 0 120px;
  color: var(--muted);
}

.next {
  display: block;
  margin-top: 120px;
  padding: 18px 0 120px;
}
.next small { display: block; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.next span {
  font-size: clamp(36px, 6vw, 96px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  transition: opacity 0.3s;
}
.next:hover span { opacity: 0.5; }

/* ---------- More page: galleries ---------- */
.more { padding-top: 84px; }

.gallery-label {
  font-size: 13px;
  color: var(--muted);
  padding: 28px 0 12px;
  scroll-margin-top: 84px;
}

/* shared full-bleed + button reset */
.photo-grid, .video-list, .music-list { margin: 0 calc(-1 * var(--gutter)); }
.photo-tile, .video-cover, .track-toggle {
  appearance: none; border: 0; padding: 0; margin: 0;
  background: none; color: #fff; font: inherit; text-align: left; cursor: pointer;
}

.play-btn {
  flex: none;
  width: clamp(44px, 4.4vw, 64px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  position: relative;
  transition: background 0.3s, color 0.3s;
}
.play-btn::before { /* play triangle */
  content: "";
  position: absolute;
  left: 54%; top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent currentColor;
}
.playing .play-btn::before { /* pause bars */
  left: 50%;
  width: 12px; height: 14px;
  border: 0;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}

/* Photography: full-bleed horizontal strip, photos uncropped at one height */
.photo-strip-wrap { margin: 0 calc(-1 * var(--gutter)); }
.photo-strip {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
  outline: none;
}
.photo-strip::-webkit-scrollbar { display: none; }
.photo-strip.dragging { cursor: grabbing; scroll-snap-type: none; }
.photo-strip.dragging .photo-tile { pointer-events: none; }
.photo-tile {
  position: relative;
  flex: none;
  height: min(78vh, 820px);
  overflow: hidden;
  background: #f2f2f2;
  scroll-snap-align: start;
  cursor: inherit;
}
.photo-tile img {
  height: 100%;
  width: auto;
  max-width: none;
  user-select: none;
  transition: transform 1.4s var(--ease-out);
}
.photo-tile:hover img { transform: scale(1.025); }
.photo-tile:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; }

.strip-ui {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--gutter) 0;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.strip-arrows { display: flex; gap: 6px; }
.strip-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  color: var(--fg);
  font: inherit; font-size: 15px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, opacity 0.3s;
}
.strip-btn:hover:not(:disabled) { background: var(--fg); color: #fff; }
.strip-btn:disabled { opacity: 0.3; cursor: default; }
.photo-title {
  position: absolute; left: var(--gutter); bottom: 20px;
  font-size: 15px; font-weight: 500;
}

/* Videography */
.video-tile { position: relative; background: #000; }
.video-tile video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 100vh;
  object-fit: contain;
  background: #000;
}
.video-cover { position: absolute; inset: 0; width: 100%; }
.video-cover:hover .play-btn, .track-toggle:hover .play-btn { background: #fff; color: #000; }
.video-tile.playing .video-cover { display: none; }

/* Music */
.track {
  position: relative;
  background: #111;
  color: #fff;
}
.track + .track { border-top: 1px solid #222; }
.track-toggle {
  display: block;
  position: relative;
  width: 100%;
  height: clamp(220px, 30vw, 380px);
}
.track .tile-meta { background: none; padding-top: 0; }
.track-progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 6px;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
}
.track-progress span {
  position: absolute; inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,10,10,0.96);
  display: flex; align-items: center; justify-content: center;
  padding: 64px var(--gutter);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 22px; right: var(--gutter);
  background: none; border: 0; color: #fff; font: inherit; font-size: 14px; cursor: pointer;
}

/* ---------- Contact / footer ---------- */
.contact {
  background: var(--fg);
  color: #fff;
  padding: 96px var(--gutter) 32px;
  scroll-margin-top: 0;
}
.contact .label { font-size: 13px; color: #8a8a8a; margin-bottom: 28px; }
.contact-links { display: grid; gap: 4px; }
.contact-links a {
  font-size: clamp(32px, 6.4vw, 104px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
  width: fit-content;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.6s var(--ease-out);
}
.contact-links a:hover { background-size: 100% 2px; }
.contact-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 120px;
  font-size: 13px;
  color: #8a8a8a;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .tile-media { aspect-ratio: 4 / 5; }
  .tile-meta { padding-top: 80px; }
  .photo-tile { height: 62vh; }
  .strip-arrows { display: none; }
  .intro { min-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
