/* Hindsight × Untz — black and white only. No hue anywhere. */
:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.18);
  --mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
  --loos-x: "loos-extended", "Loos Extended", "Krona One", system-ui, sans-serif;
  --loos-w: "loos-wide", "Loos Wide", "Krona One", system-ui, sans-serif;
  --pad: clamp(20px, 4vw, 48px);
  --nav-h: calc(80px + env(safe-area-inset-top, 0px));
  --chamfer: 14px;
  --bracket: 12px;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { margin: 0; font: 400 15px/1.6 var(--mono); -webkit-font-smoothing: antialiased; }
body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
::selection { background: #fff; color: #000; }

/* ---------- background layers (content scrolls over them) ---------- */
#rd-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
#rd-canvas.off { display: none; }
.rd-gradient {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.9) 100%);
}
.nav, main, .foot { position: relative; z-index: 2; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 50; background: #000;
  display: grid; place-items: center;
  transition: opacity 600ms ease, clip-path 600ms cubic-bezier(0.7, 0, 0.3, 1);
  clip-path: inset(0 0 0 0);
}
#loader { overflow: hidden; }
#loader video { width: min(70vw, 900px); height: auto; filter: grayscale(1); }
/* phones: 3x, the frame is mostly black so the overflow crops nothing visible */
@media (max-width: 600px) {
  #loader video { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 210vw; max-width: none; }
}
#loader.out { opacity: 0; clip-path: inset(0 0 100% 0); }

/* ---------- type atoms ---------- */
.label { font: 400 12px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.label-row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }

/* 45° chamfer, top-right + bottom-left (Wes) */
.chamfer { clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer))); }

/* HUD corner brackets on hover / focus (Wes) */
.hud { position: relative; padding: 6px 10px; }
.hud::before, .hud::after {
  content: ""; position: absolute; width: 8px; height: 8px; opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}
.hud::before { left: 0; top: 0; border-left: 1px solid #fff; border-top: 1px solid #fff; transform: translate(4px, 4px); }
.hud::after { right: 0; bottom: 0; border-right: 1px solid #fff; border-bottom: 1px solid #fff; transform: translate(-4px, -4px); }
.hud:hover::before, .hud:focus-visible::before, .hud:hover::after, .hud:focus-visible::after { opacity: 1; transform: none; }
:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }
.hud:focus-visible { outline: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--nav-h);
  padding: env(safe-area-inset-top, 0px) var(--pad) 0;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(#000 0%, rgba(0, 0, 0, 0.7) 60%, rgba(0, 0, 0, 0) 100%);
}
.nav-mark img { height: 16px; width: auto; }
.nav-links { display: flex; gap: 8px; font: 400 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- sections ---------- */
main { padding: var(--nav-h) var(--pad) 0; max-width: 1680px; margin: 0 auto; }
.hero { min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center; padding-bottom: 6vh; }
.block { padding: clamp(72px, 12vh, 140px) 0 0; }

/* ---------- reels ---------- */
.reel { position: relative; margin: 0; background: #0a0a0a; cursor: pointer; aspect-ratio: 16 / 9; }
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel-hud { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 200ms ease; }
.reel-hud::before, .reel-hud::after, .reel-hud .reel-sound::before, .reel-hud .reel-sound::after { content: ""; position: absolute; width: 28px; height: 28px; }
.reel-hud::before { left: 18px; top: 18px; border-left: 1px solid #fff; border-top: 1px solid #fff; }
.reel-hud::after { right: 18px; bottom: 18px; border-right: 1px solid #fff; border-bottom: 1px solid #fff; }
.reel-sound {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 10px 16px; background: rgba(0, 0, 0, 0.6); border: 1px solid #fff; white-space: nowrap;
}
.reel:hover .reel-hud, .reel:focus-visible .reel-hud, .reel.needs-tap .reel-hud { opacity: 1; }
/* once sound is on, the label goes away for good; clicking still toggles */
.reel.sound-on:not(.needs-tap) .reel-sound { display: none; }
/* touch screens: keep a small sound chip visible, no hover there */
@media (hover: none) {
  .reel-hud { opacity: 1; }
  .reel-hud::before, .reel-hud::after { display: none; }
  .reel-sound { left: auto; top: auto; right: 12px; bottom: 12px; transform: none; padding: 6px 10px; font-size: 10px; }
}

/* ---------- gallery: 3 / 2 / 1 columns, two shots span two ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; gap: 8px; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #0a0a0a; }
.gallery img.wide { grid-column: span 2; aspect-ratio: auto; }
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery img.wide { grid-column: span 2; aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery img.wide { grid-column: auto; aspect-ratio: 4 / 3; }
}

/* ---------- about + list ---------- */
.two-col { display: grid; grid-template-columns: 1fr; }
.about-copy { margin: 0; max-width: 34ch; font: 700 clamp(22px, 2.6vw, 38px)/1.2 var(--loos-w); text-wrap: pretty; }
.clients {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.15em 0.55em;
  font: 700 clamp(26px, 4.2vw, 64px)/1.08 var(--loos-x); text-transform: uppercase;
}
#list { padding-bottom: clamp(72px, 14vh, 160px); }
.clients li:not(:last-child)::after { content: " /"; color: var(--muted); }

/* ---------- footer ---------- */
.foot { display: flex; justify-content: space-between; gap: 16px; padding: 24px var(--pad) calc(24px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }

@media (max-width: 600px) {
  :root { --nav-h: calc(64px + env(safe-area-inset-top, 0px)); --chamfer: 10px; }
  .nav-mark img { height: 12px; }
  .nav-links { gap: 0; font-size: 11px; }
  .label-row { flex-direction: column; gap: 4px; }
}

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

/* ---------- phones: rotate the playing reel to full screen ---------- */
.reel-rotate { display: none; }
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  html:not(.rotated-once) .reel.is-active .reel-rotate {
    display: block; position: absolute; left: 12px; top: 12px; z-index: 1; pointer-events: none;
    padding: 6px 10px; font-size: 10px; background: rgba(0, 0, 0, 0.6); border: 1px solid #fff;
  }
}
html.reel-full, html.reel-full body { overflow: hidden; }
html.reel-full .nav { display: none; }
html.reel-full .reel.is-active {
  position: fixed; inset: 0; z-index: 40; aspect-ratio: auto; clip-path: none; background: #000;
}
html.reel-full .reel.is-active video { object-fit: contain; }
