/* Hindsight × Frank — 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; }

/* ---------- gallery: 3 / 2 / 1 columns ---------- */
.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; }
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; }
}

/* ---------- 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; }

/* ---------- buttons: white outline, fills white on hover ---------- */
.btn {
  display: inline-block; padding: 8px 14px; border: 1px solid #fff; background: transparent; color: #fff; cursor: pointer;
  font: 400 12px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease;
}
.btn:hover, .btn:focus-visible, .btn[aria-selected="true"] { background: #fff; color: #000; }
.btn:disabled { opacity: 0.3; cursor: default; background: transparent; color: #fff; }
.btn-lg { padding: 14px 22px; font-size: 14px; }

/* ---------- hero message ---------- */
.pitch { margin: 4vh 0 0; max-width: 18ch; font: 700 clamp(34px, 6vw, 96px)/1.02 var(--loos-x); text-transform: uppercase; text-wrap: balance; }
.pitch-note { margin-top: clamp(24px, 5vh, 56px); max-width: 62ch; font-size: clamp(15px, 1.25vw, 18px); }
.pitch-note p { margin: 0 0 1em; }
.pitch-note a { border-bottom: 1px solid #fff; }

/* ---------- logos ---------- */
.logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; margin: 0; aspect-ratio: 4 / 3; display: grid; place-items: center; background: #000; border: 1px solid var(--line); }
.tile.light { background: #fff; color: #000; }
/* out of flow: an SVG with only a viewBox has no size of its own and would otherwise stretch its tile */
.tile img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); object-fit: contain; }   /* width and height are set per logo by work.js */
.tile figcaption, .cap { position: absolute; left: 12px; bottom: 10px; font-size: 10px; opacity: 0.6; }
@media (max-width: 1100px) { .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- logos in motion ---------- */
.motion { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.clip { position: relative; margin: 0; background: #0a0a0a; }
/* contain, not cover: a logo is never cropped, whatever shape the clip is */
.clip video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.clip .cap { opacity: 1; padding: 3px 8px; background: rgba(0, 0, 0, 0.6); }
@media (max-width: 900px) { .motion { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .motion { grid-template-columns: 1fr; } }

/* ---------- brand guide viewer: one page per swipe ---------- */
.deck-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
/* the guide you are not looking at is the loud one (WES green), so it is obvious there is another to open */
.deck-tabs .btn[aria-selected="false"] { background: #61e891; border-color: #61e891; color: #000; }
.deck-tabs .btn[aria-selected="false"]:hover, .deck-tabs .btn[aria-selected="false"]:focus-visible { background: #fff; border-color: #fff; }
/* as wide as fits, but never taller than the screen (--ar is the page's width / height) */
.deck-wrap { --ar: 1.7778; width: min(100%, calc((100svh - var(--nav-h) - 240px) * var(--ar))); margin: 0 auto; }
.deck {
  display: flex; aspect-ratio: var(--ar); background: #0a0a0a;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }
.deck:focus-visible { outline-offset: -1px; }
.slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.deck-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; }
.deck-ctrl { display: flex; align-items: center; gap: 12px; flex: none; }
.deck-count { min-width: 8ch; white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; }
.deck-progress { height: 1px; margin-top: 14px; background: var(--line); }
.deck-progress i { display: block; height: 1px; width: 0; background: #fff; transition: width 200ms ease; }

/* ---------- websites ---------- */
.sites { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
.site { display: block; }
.site img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: #0a0a0a; border: 1px solid var(--line); }
.site-meta { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; }
.site:hover .site-url, .site:focus-visible .site-url { color: #fff; }
@media (max-width: 900px) { .sites { grid-template-columns: 1fr; } }

/* ---------- cover artwork: square tiles ---------- */
.art { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.art figure { position: relative; margin: 0; background: #0a0a0a; }
.art img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.art .cap { opacity: 1; padding: 3px 8px; background: rgba(0, 0, 0, 0.6); }
@media (max-width: 900px) { .art { grid-template-columns: repeat(2, 1fr); } }

/* ---------- flyers: 4:5 tiles, stills and clips alike; contain, so an odd-shaped poster is never cropped ---------- */
.flyers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.flyers figure { position: relative; margin: 0; background: #0a0a0a; }
.flyers img, .flyers video { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: contain; }
.flyers .cap { opacity: 1; padding: 3px 8px; background: rgba(0, 0, 0, 0.6); }
@media (max-width: 900px) { .flyers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- brand extensions ---------- */
/* a wide shot sets its row's height from its own shape; the 4:3 shots beside it stretch to match */
.ext figure { position: relative; margin: 0; overflow: hidden; }
.ext figure:not(.wide)::before { content: ""; display: block; padding-top: 75%; }
.ext figure:not(.wide) img { position: absolute; inset: 0; aspect-ratio: auto; }
.ext figure.wide { grid-column: span 2; }
.ext figure.wide img { aspect-ratio: auto; }
.ext .cap { opacity: 1; padding: 3px 8px; background: rgba(0, 0, 0, 0.6); }
@media (max-width: 900px) { .ext figure.wide img { aspect-ratio: 16 / 9; } }
@media (max-width: 600px) { .ext figure.wide { grid-column: auto; } .ext figure.wide img { aspect-ratio: 4 / 3; } }

#contact { padding-bottom: clamp(72px, 14vh, 160px); }
#contact .about-copy { margin-bottom: 32px; }
.contact-note { margin: 0; max-width: 62ch; font-size: clamp(15px, 1.25vw, 18px); }

/* ---------- 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 { gap: 12px; }
  .nav-links { gap: 0; font-size: 11px; }
  .nav-links .hud { padding: 6px 7px; }
  .nav-links [data-for="logos"] { display: none; }
  .deck-wrap { width: 100%; }
  .label-row { flex-direction: column; gap: 4px; }
}

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