:root {
  --bg: #0F1011;
  --surface: #1A1B1D;
  --text: #E9E7E2;
  --muted: #B8B6B0;
  --label: #9A9891;
  --rule: #2A2B2E;
  --field: #3A3B3E;
  --accent: #D4B483;
  --gutter: clamp(16px, 3vw, 40px);
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--text); }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap { max-width: 1600px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-narrow { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  margin: 0;
}
.label-13 { font-size: 13px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: var(--bg); padding: 8px 12px; z-index: 10;
}
.skip:focus { left: 8px; }

/* Header */
.site-header {
  padding-top: 24px; padding-bottom: 24px;
  display: flex; flex-wrap: wrap; gap: 12px 40px;
  align-items: baseline; justify-content: space-between;
}
.brand { font-weight: 600; font-size: 18px; letter-spacing: 0.02em; text-decoration: none; }
.site-nav {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
}
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); }
.header-email {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  text-decoration: none; color: var(--label);
}

/* Intro */
.intro { padding-top: 32px; padding-bottom: 32px; }
.intro-lead { margin: 0; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.25; letter-spacing: -0.01em; max-width: 36ch; }
.intro-sub { margin: 12px 0 0; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.45; color: var(--muted); max-width: 52ch; }

/* Work tiles */
.work { padding-top: 40px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 72px; }
.work-video { padding-top: 24px; }
.section-rule { border-top: 1px solid var(--rule); padding-top: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 48px 16px; }
.row-wide { gap: 72px 32px; }
.tile { display: flex; flex-direction: column; gap: 14px; text-decoration: none; min-width: 0; }
.tile-1 { flex: 1 1 260px; }
.tile-2 { flex: 2 1 320px; }
.tile-3 { flex: 3 1 480px; }
.tile-half { flex: 1 1 480px; }
.frame { position: relative; overflow: hidden; background: var(--surface); }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease, opacity 0.4s ease; }
.tile:hover .frame img { transform: scale(1.02); }
.ar-scope { aspect-ratio: 2.39 / 1; }
.ar-16x9 { aspect-ratio: 16 / 9; }
.ar-4x5 { aspect-ratio: 4 / 5; }
.ar-tall { height: clamp(280px, 32vw, 580px); }
.frame-empty {
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #8C8A84;
}
.tile-meta { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: baseline; justify-content: space-between; }
.tile-title { font-size: 24px; font-weight: 500; }
.tile-title-sm { font-size: 20px; font-weight: 500; }

.big-links { display: flex; flex-wrap: wrap; gap: 16px; }
.big-link {
  flex: 1 1 320px; min-width: 0; display: flex; align-items: baseline; justify-content: flex-start; gap: 0.35em;
  border-top: 1px solid var(--rule); padding-top: 24px; text-decoration: none;
  font-size: clamp(28px, 3.6vw, 48px); font-weight: 500; letter-spacing: -0.02em;
}
.big-link .arrow { color: var(--accent); font-weight: 400; }

/* About teaser */
.about-teaser { padding-bottom: 112px; }
.about-teaser-inner {
  border-top: 1px solid var(--rule); padding-top: 40px;
  display: flex; flex-wrap: wrap; gap: 40px 72px; align-items: center;
}
.portrait { flex: 1 1 280px; min-width: 0; max-width: 440px; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 36% 40%; }
.about-teaser-text { flex: 999 1 420px; min-width: 0; max-width: 620px; display: flex; flex-direction: column; gap: 20px; }
.lede { margin: 0; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.25; letter-spacing: -0.01em; }
.body-muted { margin: 0; color: var(--muted); }
.text-link {
  align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--accent);
}
.text-link:hover { color: var(--text); }

/* Contact strip */
.contact-strip { padding-bottom: 72px; }
.contact-strip-inner {
  border-top: 1px solid var(--rule); padding-top: 40px;
  display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: baseline; justify-content: space-between;
}
.contact-big { font-size: clamp(28px, 4vw, 56px); font-weight: 500; letter-spacing: -0.02em; text-decoration: none; overflow-wrap: anywhere; }

/* Footer */
.site-footer {
  padding-top: 24px; padding-bottom: 40px;
  display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--label);
}
.site-footer a { color: var(--label); }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* Photography gallery */
.gallery { padding-top: 8px; }
.stage {
  position: relative; background: var(--bg);
  aspect-ratio: 3 / 2; max-height: calc(100vh - 220px); width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.stage img { width: 100%; height: 100%; object-fit: contain; opacity: 1; transition: opacity 0.25s ease; }
.stage img.is-loading { opacity: 0; }
.stage-hit {
  position: absolute; top: 0; bottom: 0; width: 30%; background: transparent; border: 0; padding: 0; cursor: pointer;
}
.stage-hit.prev { left: 0; cursor: w-resize; }
.stage-hit.next { right: 0; cursor: e-resize; }
.gallery-bar {
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding: 16px 0;
}
.gallery-controls {
  display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.ctl {
  min-height: 44px; padding: 0 12px; background: transparent; border: 0; color: var(--text);
  font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
}
.ctl:hover { color: var(--accent); }
.ctl-muted { color: var(--label); }
.counter { color: var(--label); min-width: 64px; text-align: center; }
.thumbs { padding-top: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.thumbs[hidden] { display: none; }
.thumb {
  aspect-ratio: 3 / 2; padding: 0; border: 1px solid transparent; background: var(--surface); cursor: pointer; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: opacity 0.2s ease; }
.thumb:hover img, .thumb[aria-current="true"] img { opacity: 1; }
.thumb[aria-current="true"] { border-color: var(--accent); }

/* About page */
.about-main { padding-top: 48px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 48px 72px; align-items: flex-start; }
.about-main .portrait { flex: 1 1 320px; max-width: 560px; }
.about-copy { flex: 999 1 440px; min-width: 0; max-width: 680px; display: flex; flex-direction: column; gap: 20px; line-height: 1.55; }
.page-h1 { margin: 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.15; font-weight: 500; letter-spacing: -0.015em; }
.services { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.service-list { border-top: 1px solid var(--rule); margin: 0; padding: 0; list-style: none; }
.service-list li {
  padding: 14px 0; border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between;
}
.service-list strong { font-weight: 500; }
.service-list span { color: var(--label); }

.contact { padding-bottom: 72px; scroll-margin-top: 24px; }
.contact-inner { border-top: 1px solid var(--rule); padding-top: 40px; display: flex; flex-wrap: wrap; gap: 32px 72px; }
.contact-text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-h2 { margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.08; font-weight: 500; letter-spacing: -0.02em; }
.contact-details { display: flex; flex-direction: column; gap: 6px; font-size: 18px; }
.enquiry { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field input, .field textarea {
  min-height: 48px; background: transparent; border: 0; border-bottom: 1px solid var(--field);
  color: var(--text); font: inherit; padding: 0; border-radius: 0;
}
.field textarea { padding: 8px 0; resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent); outline: none; }
.btn {
  align-self: flex-start; min-height: 48px; padding: 0 28px; background: var(--accent); color: var(--bg);
  border: 0; font: inherit; font-weight: 500; cursor: pointer;
}
.btn:hover { background: var(--text); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.form-status { margin: 0; color: var(--muted); min-height: 1.5em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Case study */
.cs-head { padding-top: 48px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 24px; }
.cs-back { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); text-decoration: none; align-self: flex-start; }
.cs-h1 { margin: 0; font-size: clamp(44px, 7vw, 96px); line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.cs-line { margin: 0; font-size: clamp(20px, 2.2vw, 28px); line-height: 1.3; color: var(--muted); max-width: 34ch; }
.player { position: relative; aspect-ratio: 16 / 9; background: var(--surface); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facts { padding-top: 32px; }
.facts-inner { display: flex; flex-wrap: wrap; gap: 0 40px; border-top: 1px solid var(--rule); }
.fact { flex: 1 1 200px; min-width: 0; padding: 16px 0; display: flex; flex-direction: column; gap: 4px; }
.stills { padding-top: 64px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 24px; }
.stills-row { display: flex; flex-wrap: wrap; gap: 24px; }
.still { flex: 1 1 400px; min-width: 0; overflow: hidden; background: var(--surface); }
.still-sm { flex: 1 1 260px; }
.still img { width: 100%; height: 100%; object-fit: cover; }
.credits { padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 32px 64px; }
.credits h2 { flex: 1 1 240px; }
.credit-list { flex: 999 1 480px; min-width: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.credit-list li {
  padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px;
  display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between;
}
.credit-list span:first-child { color: var(--label); }
.next { padding-bottom: 96px; }
.next a {
  display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: baseline; justify-content: space-between;
  border-top: 1px solid var(--rule); padding-top: 24px; text-decoration: none;
}
.next-title { font-size: clamp(28px, 4vw, 52px); font-weight: 500; letter-spacing: -0.02em; }
.cs-footer { border-top: 1px solid var(--rule); }

/* 404 */
.notfound { padding-top: 96px; padding-bottom: 160px; display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 700px) {
  .thumbs { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
}

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

/* Video players */
.players { display: flex; flex-direction: column; gap: 24px; }
.player { width: 100%; }
.player-vertical { width: min(100%, calc((100vh - 160px) * 9 / 16), 480px); margin: 0 auto; }
.players-row { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.players-row .player-vertical { flex: 1 1 280px; max-width: 420px; width: auto; margin: 0; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 40px 16px; }
.vgrid .tile-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
.ar-9x16 { aspect-ratio: 9 / 16; }
.fact-wide { flex-basis: 100%; }

/* Home section headings */
.section-head { border-top: 1px solid var(--rule); padding-top: 24px; }
.section-title { margin: 0; font-size: clamp(32px, 4.4vw, 60px); font-weight: 500; letter-spacing: -0.025em; line-height: 1; }
.work-photo { padding-top: 0; }

/* Photography grid */
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.pg-grid.is-masonry { display: flex; align-items: flex-start; }
.pg-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pg-item { margin: 0; scroll-margin-top: 24px; background: var(--surface); }
.pg-item a { display: block; cursor: zoom-in; }
.pg-item img { width: 100%; height: auto; transition: opacity 0.3s ease; }
.pg-item a:hover img { opacity: 0.85; }
.pg-item.is-target { outline: 1px solid var(--accent); outline-offset: 4px; animation: pg-fade 2.4s ease 1s forwards; }
@keyframes pg-fade { to { outline-color: transparent; } }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(15, 16, 17, 0.97); color: var(--text); overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.lightbox #lb-img {
  position: absolute; top: 64px; bottom: 64px; left: 80px; right: 80px;
  width: calc(100% - 160px); height: calc(100% - 128px); object-fit: contain;
}
.lb-btn {
  position: absolute; min-height: 44px; min-width: 44px; padding: 0 12px; background: transparent; border: 0;
  color: var(--text); cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.lb-btn:hover { color: var(--accent); }
.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--label);
}
@media (max-width: 700px) {
  .lightbox #lb-img { left: 8px; right: 8px; width: calc(100% - 16px); top: 56px; bottom: 72px; height: calc(100% - 128px); }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }
}

/* Video frames on project pages */
.frames-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.frame-still { aspect-ratio: 9 / 16; overflow: hidden; background: var(--surface); }
.frame-still img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .frames-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* Video tiles */
.play-badge {
  position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 16, 17, 0.55); color: var(--text); border: 1px solid rgba(233, 231, 226, 0.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.play-badge svg { margin-left: 3px; }
.tile:hover .play-badge { background: var(--accent); color: var(--bg); border-color: var(--accent); transform: translate(-50%, -50%) scale(1.06); }
.preview-video {
  position: absolute; top: 50%; left: 50%; width: 100%; height: auto; border: 0;
  transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity 0.8s ease;
}
.preview-video.is-playing { opacity: 1; }

@media (max-width: 700px) { .play-badge { width: 56px; height: 56px; } .play-badge svg { width: 20px; height: 20px; } }
.preview-video.fit-h { width: auto; height: 100%; }
.tile:hover .frame .preview-video.is-playing ~ .play-badge { opacity: 0; }
.play-badge { transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, opacity 0.3s ease; }

/* On phones, show wide and tall tiles uncropped at the image's own shape */
@media (max-width: 700px) {
  .frame.ar-tall, .frame.ar-scope { height: auto; aspect-ratio: auto; }
  .frame.ar-tall > img, .frame.ar-scope > img { height: auto; }
}
