/* Light-table contact sheet: cool backlit white, film-rebate frames. */

:root {
  --table: #e8eceb;     /* light table */
  --sheet: #f5f7f6;     /* paper */
  --ink: #1d2326;
  --graphite: #5f696e;
  --rebate: #23292c;    /* film border */
  --unexposed: #3a4246;
  --marker: #d12a2a;    /* china marker */
  --line: #cfd6d5;

  --font: "Archivo", system-ui, sans-serif;  --gutter: clamp(16px, 4vw, 48px);
  --max: 1680px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--table);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { display: block; max-width: 100%; }

a { color: inherit; }

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

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

/* ---------- header (sits over the hero video) ---------- */

.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px; /* full width: logo hugs the left edge, menu the right */
  margin: 0 auto;
  padding: 22px var(--gutter) 22px 16px; /* logo tight to the left edge */
  color: #fff;
}
.top__name { align-self: center; }
.top__name img {
  width: auto;
  height: clamp(44px, 6vw, 64px);
  filter: invert(1); /* black logo file, shown white over the hero video */
}
.top nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.top nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
}
.top nav a:hover { color: #fff; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--rebate);
  color: #fff;
}
.hero__video {
  pointer-events: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__still {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
}
/* YouTube background: the 16:9 player is sized so the film's own picture
   (--film-ratio, wider for letterboxed films) covers the hero like object-fit */
.hero__yt {
  --film-ratio: 16 / 9;
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 100svh * var(--film-ratio));
  max-width: none;
  height: auto;
  aspect-ratio: 16 / 9;
  translate: -50% -50%;
  border: 0;
  opacity: 0; /* shown once YouTube's start-up buttons have gone (main.js) */
}
.hero__yt.is-on { opacity: 1; }
/* keeps the type readable over any footage */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(18, 22, 24, 0.82) 0%, rgba(18, 22, 24, 0.25) 45%, rgba(18, 22, 24, 0) 70%),
    linear-gradient(to bottom, rgba(18, 22, 24, 0.45) 0%, rgba(18, 22, 24, 0) 18%),
    rgba(18, 22, 24, 0.28);
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  /* full width, lined up with the logo at the left edge */
  padding: 120px var(--gutter) clamp(40px, 7vh, 80px) 16px;
}
.hero__name {
  margin: 0;
  /* one line: in caps the name is ~8.7× its font size wide, so 10vw always fits */
  font-size: clamp(2rem, 10vw, 11rem);
  white-space: nowrap;
  text-transform: uppercase;
  line-height: 0.88;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.045em;
}
.hero__role {
  margin: 0.6em 0 0;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-stretch: 75%;
  font-weight: 500;
}
/* wide screens: name on the left, role beside it, sitting on the same line as the name */
@media (min-width: 900px) {
  .hero__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 24rem);
    justify-content: start;
    align-items: last baseline;
    column-gap: clamp(24px, 3vw, 56px);
  }
  /* sized to leave room for the 24rem description column */
  .hero__name { font-size: clamp(2rem, calc((100vw - 32rem) / 8.8), 11rem); }
  .hero__role { margin-top: 0; }
}
.hero :focus-visible, .top :focus-visible { outline-color: #fff; }

@media (max-width: 640px) {
  .hero__video { object-position: 38% center; }
}
@media (max-width: 480px) {
  .top nav { gap: 12px; font-size: 0.92rem; }
}

/* ---------- shared picture / placeholder ---------- */

.pic {
  position: relative;
  overflow: hidden;
  background: var(--unexposed);
}
.pic img, .pic video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pic__multi {
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.pic:has(.pic__overlay) { container-type: inline-size; }
.pic__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 6%;
  color: #fff;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.5)); /* darkens the edges for a thriller mood */
  font-family: "Special Elite", var(--font); /* worn typewriter, thriller feel */
  font-size: 16cqw; /* scales with the thumbnail's width */
  font-weight: 400;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); /* hard shadow, no blur, keeps the edges crisp */
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
}
.pic__multi svg { display: block; width: 18px; height: 18px; }
.pic--empty {
  background:
    linear-gradient(135deg, #3d464a 0%, #2c3336 60%, #353d41 100%);
}
.pic--empty::after {
  content: "";
  position: absolute;
  inset: 22%;
  border: 1px dashed rgba(232, 236, 235, 0.18);
}

/* ---------- sections ---------- */

.work, .services, .about, .clients, .contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) var(--gutter);
}
.work, .services, .about, .clients { max-width: none; } /* these sections use the whole screen width */
.services, .clients { overflow-x: clip; } /* the dark strips poke 1px past the screen edges; hide that */

h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  font-weight: 750;
  font-stretch: 115%;
  letter-spacing: -0.03em;
}

/* section titles (not Contact): centred, all caps, as heavy as the font goes */
#work-title, #services-title, #about-title, #clients-title, #other-title {
  text-align: center;
  text-transform: uppercase;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  -webkit-text-stroke: 0.03em currentColor; /* thickens the letters past the font's heaviest weight */
}

.section-head {
  display: flex;
  flex-direction: column; /* title centred */
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

/* contact sheet grid */
.sheet {
  list-style: none;
  margin: 0;
  padding: clamp(14px, 2vw, 24px);
  background: var(--sheet);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(29, 35, 38, 0.45);
}
.sheet[data-empty]::before {
  content: "Nothing here yet.";
  color: var(--graphite);
}
/* one row per category (Brands, Events…): title running up the left edge, projects across */
.sheet__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
  align-items: start;
  padding: clamp(18px, 2vw, 28px) 0;
  border-top: 1px solid var(--line);
}
.sheet__row:first-child { padding-top: 0; border-top: 0; }
.sheet__row:last-child { padding-bottom: 0; }
.sheet__head {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  writing-mode: vertical-rl;
  rotate: 180deg; /* reads bottom to top, like a book spine */
}
.sheet__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column; /* every row's projects share the full width */
  grid-auto-columns: minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 28px) clamp(14px, 1.6vw, 22px);
}
@media (max-width: 1100px) { .sheet__list { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .sheet__row { grid-template-columns: 1fr; }
  .sheet__head { writing-mode: horizontal-tb; rotate: none; } /* phones: title above, across */
  .sheet__list { grid-template-columns: 1fr; }
}
.shot { margin: 0; }
.shot[hidden] { display: none; }

.shot__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.shot__btn .pic { aspect-ratio: 16 / 9; }
.shot__btn .pic img { transition: transform 0.5s ease; }
.shot__btn:hover .pic img { transform: scale(1.03); }

.shot__meta { padding-top: 10px; }
.shot__title {
  margin: 0;
  font-weight: 650;
  font-size: 1.02rem;
  line-height: 1.3;
}
.shot__client {
  margin: 2px 0 0;
  color: var(--graphite);
  font-size: 0.92rem;
}

/* ---------- services ---------- */

.services[hidden] { display: none; }
/* a grid of outlined boxes, same as the "Names I've worked with" logos */
.services__list {
  list-style: none;
  margin: clamp(28px, 4vw, 44px) calc(-1 * var(--gutter) - 1px) 0; /* edge to edge; 1px extra each side pushes the outer lines off screen */
  padding: 1px 0 0 1px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 40%), 1fr));
  background: var(--ink);
  /* dark paint spills past both sides so no page colour shows at the screen edges;
     the clip trims the top and bottom box lines but lets that spill through */
  box-shadow: 0 0 0 100vmax var(--ink);
  clip-path: inset(1px -100vmax);
}
.services__item {
  display: grid;
  place-items: center;
  min-height: clamp(116px, 10vw, 200px);
  padding: 8%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin: -1px 0 0 -1px; /* neighbouring boxes share one line */
  background: var(--ink); /* dark strip, light text */
  color: var(--sheet);
  container-type: inline-size;
  font-weight: 800;
  font-stretch: 105%;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}
@media (max-width: 640px) { .services__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* phones: always 2 side by side */
/* shrinks so the longest word (PHOTOGRAPHY, ~8.6em) always fits its box */
.services__item span { font-size: min(1.5rem, 9.5cqw); }

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.about[hidden] { display: none; }
.about > h2 { grid-column: 1 / -1; } /* title across the top, above photo and text */
.about__frame {
  max-width: 680px; /* grows with the screen, up to this */
}
.about__pic { aspect-ratio: 4 / 5; border-radius: 10px; }
.about__pic img { object-position: 34% center; } /* landscape photo: keep Ben and the camera in frame */
.pic--slides img + img { object-position: center; } /* the extra photos; each can set its own in content.js */
.pic--slides img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2s ease;
}
.pic--slides img.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .pic--slides img { transition: none; } }
.about__text p {
  max-width: 40em;
  margin: 1em 0 0;
  font-size: clamp(1.0625rem, 1.5vw, 1.5rem);
}
.about__text p + p { color: var(--graphite); }

@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; }
  .about__frame { max-width: 300px; }
}

/* ---------- clients ---------- */

.logos {
  list-style: none;
  margin: clamp(28px, 4vw, 44px) calc(-1 * var(--gutter) - 1px) 0; /* dark strip, edge to edge like What I shoot */
  background: var(--ink);
  box-shadow: 0 0 0 100vmax var(--ink); /* same edge-to-edge fill as What I shoot */
  clip-path: inset(1px -100vmax);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 40%), 1fr)); /* fit: logos stretch to fill the row; 2 across on phones */
  padding: 1px 0 0 1px;
}
.logos li {
  display: grid;
  place-items: center;
  min-height: clamp(116px, 10vw, 200px);
  padding: clamp(22px, 2.4vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin: -1px 0 0 -1px;
}
.logos img {
  max-height: clamp(72px, 6.5vw, 130px); /* room for squarish logos; wide ones hit max-width first */
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) invert(1); /* dark logos turn white */
  opacity: 0.85;
  mix-blend-mode: screen; /* their (now black) backgrounds melt into the strip */
}
.logos .wordmark {
  font-weight: 700;
  font-stretch: 85%;
  font-size: 1.05rem;
  color: var(--graphite);
  text-align: center;
}

/* ---------- contact ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* heading, text and form on one half; Other work photos on the other */
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.contact__main { display: grid; gap: clamp(28px, 3vw, 40px); }
.contact__other[hidden] { display: none; }
.contact__other-frame { margin-top: clamp(24px, 3vw, 36px); }
.contact__other-pic { aspect-ratio: 4 / 5; border-radius: 10px; }
.contact__other-pic--slow img { transition-duration: 3s; } /* slower, gentler fade than the About photos */
/* each photo's title, on a soft dark band along the bottom */
.contact__other-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 40px 18px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.contact__other-caption.is-on { opacity: 1; }
/* side by side: the photo frame stretches to end level with the bottom of the form */
@media (min-width: 821px) {
  .contact { align-items: stretch; }
  .contact__other { display: flex; flex-direction: column; }
  .contact__other-frame { flex: 1; min-height: 0; display: flex; }
  .contact__other-pic { aspect-ratio: auto; flex: 1; }
}
.contact__lede { container-type: inline-size; }
/* "Let's Collaborate!" (~11em wide) shrinks to stay on one line inside its half */
.contact__lede h2 { font-size: min(clamp(2rem, 5vw, 3.5rem), 8.8cqw); white-space: nowrap; }
.contact__lede p { max-width: 30em; color: var(--graphite); }
.contact__lede p:first-of-type { margin-top: 1em; }
.contact__direct a { color: var(--ink); font-weight: 600; }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  background: var(--sheet);
  padding: clamp(20px, 3vw, 36px);
}
.form label { display: grid; gap: 6px; }
.form label > span { font-size: 0.9rem; font-weight: 600; }
.form__wide { grid-column: 1 / -1; }

.form input, .form select, .form textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0;
  border-color: var(--ink);
}
.form [aria-invalid="true"] { border-color: var(--marker); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

.form__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.btn {
  font: inherit;
  font-weight: 650;
  padding: 13px 26px;
  border: 0;
  border-radius: 4px;
  background: var(--ink);
  color: var(--sheet);
  cursor: pointer;
}
.btn:hover { background: #000; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.form__status { margin: 0; font-size: 0.95rem; }
.form__status[data-state="error"] { color: var(--marker); }

@media (max-width: 820px) {
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .form { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */

/* dark band across the full width, like the What I shoot and logo strips */
.foot {
  padding: 28px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  background: var(--ink);
  color: #a9b3b4;
  font-size: 0.92rem;
}
/* social icons: by the contact form, and on the right of the footer */
.socials {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  gap: 8px;
}
.socials[hidden] { display: none; }
.socials a, .socials__nolink {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.2s, color 0.2s;
}
.socials a:hover { background: var(--ink); color: var(--sheet); }
.socials--foot { margin: 0 0 0 auto; }
.socials--foot a, .socials--foot .socials__nolink { width: 34px; height: 34px; border: 0; color: #c3cbca; }
.socials--foot a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.socials--foot svg { width: 18px; height: 18px; }

/* ---------- viewer ---------- */

.viewer {
  width: min(1200px, 100vw - 32px);
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sheet);
  overflow: visible;
}
.viewer::backdrop { background: rgba(20, 24, 26, 0.92); }
.viewer__media img {
  max-height: calc(100vh - 150px);
  margin: 0 auto;
  width: auto;
}
.viewer__media .frame16 {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.viewer__media iframe, .viewer__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.viewer__media .frame16--link {
  display: block;
  color: var(--sheet);
  text-decoration: none;
}
.viewer__media .frame16--link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  opacity: 0.55;
}
.frame16--link span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 650;
}
.frame16--link:hover span { text-decoration: underline; }
.viewer__empty {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: var(--unexposed);
  color: #c3cbca;
  text-align: center;
  padding: 24px;
}
.viewer__caption { margin: 12px 0 0; font-size: 0.95rem; }
.viewer__caption span { color: #a9b3b4; }
.viewer__close {
  margin: 0 0 8px auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 24, 26, 0.7);
  color: var(--sheet);
  cursor: pointer;
}

/* gallery: near full-screen grid, then one photo at a time */
.viewer--gallery {
  width: calc(100vw - 32px);
  max-width: none;
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.viewer--gallery .viewer__close {
  position: sticky;
  top: 0;
  z-index: 2;
}
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}
/* bigger previews on wide screens: 2 across on tablets, 3 across on desktops */
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1100px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--unexposed);
  cursor: zoom-in;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery__thumb:hover img { transform: scale(1.03); }
.gallery__stage {
  position: relative;
  height: calc(100vh - 140px);
  height: calc(100dvh - 140px);
  display: grid;
  place-items: center;
}
.viewer__media .gallery__stage img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.gallery__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 24, 26, 0.6);
  color: var(--sheet);
  cursor: pointer;
}
.gallery__nav:hover { background: rgba(20, 24, 26, 0.85); }
.gallery__nav--prev { left: 8px; }
.gallery__nav--next { right: 8px; }
.gallery__back {
  padding: 0;
  border: 0;
  background: none;
  color: var(--sheet);
  font: inherit;
  cursor: pointer;
  margin-right: 12px;
}
.gallery__back:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .gallery__thumb img { transition: none; }
  html { scroll-behavior: auto; }
  .shot__btn .pic img { transition: none; }
}
