:root {
  color-scheme: dark;
  --bg: #0d0d0d;
  --text: #ece9e4;
  --muted: #8c877f;
  --line: #262524;
  --accent: #e8a33d; /* golden hour: interactive moments only */
  --accent-ink: #0d0d0d; /* text on accent */
  --error: #ef7b70;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display-tracking: -0.04em;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll, body.nav-open { overflow: hidden; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Blur lives on a background layer: a backdrop-filter on the header itself would
   trap the full-screen mobile menu inside the header bar. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Three columns: name | centred logo | menu. The equal outer columns keep the logo dead centre. */
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  height: 88px;
}

.brand {
  grid-column: 1;
  justify-self: start;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: var(--display-tracking);
}

.brand-logo { grid-column: 2; display: block; transition: opacity 0.2s; }
.brand-logo:hover { opacity: 0.75; }
.brand-logo img { height: 40px; width: auto; display: block; }

/* Right side of the header: social icons + menu button */
.header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 28px;
}
.header-social { gap: 18px; }

/* Name, logo and actions stay visible above the open menu */
.brand, .brand-logo, .header-actions { position: relative; z-index: 60; }

.nav-toggle { display: block; width: 28px; height: 20px; position: relative; }
.nav-toggle span {
  position: absolute; left: 0; right: 0; height: 1.5px; background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle span:nth-child(1) { top: 3px; }
.nav-toggle span:nth-child(2) { bottom: 3px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

/* Full-screen menu (all screen sizes) */
.nav {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 4px;
  background: var(--bg);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.nav-open .nav { opacity: 1; pointer-events: auto; }

.nav > a {
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 700;
  letter-spacing: var(--display-tracking);
  line-height: 1.1;
  color: var(--muted);
  opacity: 0;
  transform: translateY(14px);
  transition: color 0.2s, opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.nav > a[aria-current="page"] { color: var(--text); }
.nav > a:hover { color: var(--accent); }
.nav-open .nav > a { opacity: 1; transform: none; }
.nav-open .nav > a:nth-child(2) { transition-delay: 0.04s; }
.nav-open .nav > a:nth-child(3) { transition-delay: 0.08s; }
.nav-open .nav > a:nth-child(4) { transition-delay: 0.12s; }

@media (max-width: 720px) {
  .header-inner { height: 68px; gap: 12px; }
  .header-actions { gap: 18px; }
  .header-social { gap: 14px; }
  .brand { font-size: 19px; }
  .brand-logo img { height: 30px; }
}

@media (max-width: 380px) {
  .brand { font-size: 17px; }
  .brand-logo img { height: 28px; }
}

/* ---------- Section headings ---------- */

.section { padding: 24px 0 96px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.section-head h2, .page-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 46px);
  letter-spacing: var(--display-tracking);
  line-height: 1.05;
}

.section-head p { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Work tiles ---------- */

.work-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.work-grid.vertical {
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 800px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

@media (max-width: 900px) {
  .work-grid.vertical { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}

@media (max-width: 600px) {
  .work-grid { grid-template-columns: 1fr; }
}

.work-tile { display: block; width: 100%; text-align: left; }

.work-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--line);
}

.vertical .work-media { aspect-ratio: 9 / 16; }

.work-media img, .work-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), opacity 0.4s, filter 0.5s var(--ease);
}

.work-media video { opacity: 0; }
.work-media video.is-playing { opacity: 1; }
/* Reveal state: hover on desktop, first tap on touch screens (.is-revealed, set in main.js).
   Hover rules sit behind (hover: hover) so phones don't get "stuck" hover after a tap. */
@media (hover: hover) {
  .work-tile:hover .work-media img { transform: scale(1.03); }
  .work-tile:hover .work-media img,
  .work-tile:hover .work-media video { filter: grayscale(1); }
  .work-tile:hover .work-media::after { background: rgba(0, 0, 0, 0.45); }
  .work-tile:hover .work-meta { opacity: 1; transform: none; }
}
.work-tile.is-revealed .work-media img,
.work-tile.is-revealed .work-media video,
.work-tile:focus-visible .work-media img { filter: grayscale(1); }

.work-media::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.4s;
}
.work-tile.is-revealed .work-media::after,
.work-tile:focus-visible .work-media::after { background: rgba(0, 0, 0, 0.45); }

/* Title sits on the thumbnail and fades in on hover */
.work-meta {
  position: absolute; inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.work-tile.is-revealed .work-meta,
.work-tile:focus-visible .work-meta { opacity: 1; transform: none; }

/* Client on top, title underneath — same uppercase style, title smaller and lighter */
.work-client, .work-title { text-transform: uppercase; letter-spacing: 0.16em; line-height: 1.3; }
.work-client { font-size: clamp(14px, 1.2vw, 18px); font-weight: 500; }
.work-title { font-size: 12px; font-weight: 400; color: rgba(255, 255, 255, 0.72); }

.vertical .work-client { font-size: clamp(13px, 1.1vw, 16px); }
.vertical .work-title { font-size: 10px; }

.work-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Photo page ---------- */

.page-intro { padding: 40px 0 8px; }

.tabs {
  position: sticky;
  top: 84px;
  z-index: 40;
  display: flex;
  gap: 32px;
  padding: 18px 0;
  margin-bottom: 32px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

@media (max-width: 720px) { .tabs { top: 68px; gap: 24px; } }

.tab {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 4px;
  white-space: nowrap;
  transition: color 0.2s;
}

.tab::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.tab:hover, .tab.is-active { color: var(--text); }
.tab.is-active::after { transform: scaleX(1); }

.photo-grid {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.photo-grid.is-visible { opacity: 1; transform: none; }

.photo-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.photo-item {
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--line);
}

.photo-item img { width: 100%; height: auto; transition: transform 1s var(--ease), opacity 0.3s; }
.photo-item:hover img { transform: scale(1.02); opacity: 0.92; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px var(--gutter) 48px;
  background: rgba(14, 14, 14, 0.96);
  color: #f2f0ec;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }

.lightbox-stage {
  width: min(1200px, 100%);
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 140px);
  display: flex; align-items: center; justify-content: center;
}

.lightbox-stage.is-vertical { width: auto; height: min(80vh, 900px); aspect-ratio: 9 / 16; }

.lightbox-stage iframe { width: 100%; height: 100%; border: 0; }

.has-gallery .lightbox-stage { aspect-ratio: auto; width: 100%; height: calc(100vh - 140px); }
.lightbox-stage > img { max-width: 100%; max-height: 100%; object-fit: contain; }

.lightbox-placeholder { position: relative; width: 100%; height: 100%; }
.lightbox-placeholder img { width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.lightbox-placeholder span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; letter-spacing: var(--display-tracking); font-size: clamp(22px, 3vw, 34px);
}

.lightbox-caption { margin-top: 18px; font-size: 13px; letter-spacing: 0.08em; color: #b9b5ae; min-height: 1em; }

.lightbox-close {
  position: absolute; top: 18px; right: var(--gutter);
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #f2f0ec;
}

.lightbox-prev, .lightbox-next {
  display: none;
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  font-size: 28px; color: #f2f0ec; opacity: 0.7;
}
.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.has-gallery .lightbox-prev, .has-gallery .lightbox-next { display: block; }

/* ---------- Vertical reels viewer ---------- */

/* While the viewer is open, everything behind and around it is black
   (including the strips under the phone's status bar and home bar). */
html.reels-open, html.reels-open body { background: #000; }

.reels {
  position: fixed; inset: 0; z-index: 110;
  background: #000;
  color: #fff;
}

.reels[hidden] { display: none; }

.reels-track {
  position: absolute; inset: 0;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.reels-track::-webkit-scrollbar { display: none; }

.reel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}
.reel {
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.reel-frame {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  container-type: size;
}

.reel-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Taps on a slide pause/play; swipes scroll the feed */
.reel-tap { position: absolute; inset: 0; z-index: 2; cursor: pointer; }

/* Each reel's player fades in over its poster once it starts */
.reel-player { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s; }
.reel.is-playing .reel-player { opacity: 1; }
.reel-player iframe, .reel-player video {
  position: absolute;
  top: 50%; left: 50%;
  /* cover the frame with a 9:16 player, whatever the screen shape */
  width: max(100cqw, 100cqh * 9 / 16);
  height: max(100cqh, 100cqw * 16 / 9);
  transform: translate(-50%, -50%);
  border: 0;
  background: #000;
  object-fit: cover;
  pointer-events: none; /* touches always go to the feed (iOS swiping) */
}

.reel-paused-icon {
  position: absolute; top: 50%; left: 50%; z-index: 3;
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.reel.is-paused .reel-paused-icon { opacity: 1; transform: translate(-50%, -50%); }

.reel-meta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; flex-direction: column; gap: 4px;
  padding: 64px 20px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  pointer-events: none;
}
.reel-client { font-size: 15px; font-weight: 500; }
.reel-title { font-size: 11px; color: rgba(255, 255, 255, 0.72); }

.reels-counter {
  position: absolute; top: calc(30px + env(safe-area-inset-top)); left: 24px; z-index: 120;
  font-size: 12px; letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.7);
}

.reels-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  transition: background 0.2s;
}
.reels-btn:hover { background: rgba(255, 255, 255, 0.24); }
.reels-btn:focus:not(:focus-visible) { outline: none; }

.reels-close, .reels-mute { position: absolute; top: calc(18px + env(safe-area-inset-top)); z-index: 120; }
.reels-close { right: 18px; }
.reels-mute { right: 72px; }

.reels-mute .icon-muted, .reels-mute.is-muted .icon-sound { display: none; }
.reels-mute.is-muted .icon-muted { display: block; }

.reels-nav {
  position: absolute; right: 24px; top: 50%; z-index: 120;
  display: flex; flex-direction: column; gap: 10px;
  transform: translateY(-50%);
}

/* Phones: edge-to-edge like a reels app, swipe instead of arrow buttons */
@media (max-width: 600px) {
  .reel { padding: 0; }
  .reel-frame { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
  .reel-meta { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}

@media (hover: none) { .reels-nav { display: none; } }

/* ---------- Contact form ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 64px;
  padding: 40px 0 96px;
}

@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; gap: 32px; } }

.contact-aside p { color: var(--muted); max-width: 34ch; }
.contact-aside a { border-bottom: 1px solid var(--line); }
.contact-aside a:hover { color: var(--accent); border-color: var(--accent); }

.question {
  border: 0;
  margin: 0 0 40px;
  padding: 0;
}

.question legend, .field label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.question legend .req, .field .req { color: var(--muted); }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice span {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.choice span:hover { border-color: var(--accent); }
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.question.is-missing legend { color: var(--error); }
.question.is-missing .choice span { border-color: color-mix(in srgb, var(--error) 45%, var(--line)); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 32px; }

.field input, .field textarea {
  width: 100%;
  padding: 10px 0;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 120px; resize: vertical; }

.divider { border: 0; border-top: 1px solid var(--line); margin: 8px 0 40px; }

.submit {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.submit:hover { opacity: 0.85; }
.submit:disabled { opacity: 0.5; cursor: default; }

.form-status { margin-top: 16px; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.form-status.is-error { color: var(--error); }

.form-success h2 { font-family: var(--display); font-weight: 700; letter-spacing: var(--display-tracking); font-size: 40px; margin: 0 0 8px; }
.form-success p { color: var(--muted); }

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

/* ---------- About ---------- */

.about-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding: 40px 0 96px;
}

@media (max-width: 900px) { .about-layout { grid-template-columns: 1fr; gap: 32px; } }

.about-photo { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; max-width: 300px; background: var(--line); }

.about-copy p { font-size: 17px; max-width: 58ch; }
.about-copy .lede { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.25; margin-top: 0; }

.details { margin-top: 40px; display: grid; gap: 20px; }
.details dt { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.details dd { margin: 4px 0 0; }
.details a { border-bottom: 1px solid var(--line); }
.details a:hover { color: var(--accent); border-color: var(--accent); }

.button-link {
  display: inline-block;
  margin-top: 40px;
  padding: 14px 36px;
  border: 1px solid var(--text);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.button-link:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- 404 ---------- */

.not-found { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 64px 0; }
.not-found p { color: var(--muted); margin: 16px 0 0; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 32px;
  padding-bottom: 40px;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner a:hover { color: var(--accent); }
.footer-links { display: flex; align-items: center; gap: 24px; }

/* ---------- Social icons ---------- */

.social { display: inline-flex; align-items: center; gap: 16px; }
.social a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); transition: color 0.2s; }
.social a:hover { color: var(--accent); }
.social svg { display: block; }
.social-label { display: none; }
.social-labeled { gap: 24px; }
.social-labeled a { color: var(--text); }
.social-labeled .social-label { display: inline; }

.nav-social { margin-top: 36px; gap: 28px; }
.nav-social svg { width: 22px; height: 22px; }
