/* ==========================================================================
   SPECTA MEDIA — specta.media
   Black, hairlines, monospace info rows. The italic wordmark leads.
   Display: Archivo (wide, italic) · Text: Geist · Labels: Geist Mono
   ========================================================================== */

:root {
  --bg: #000;
  --ink: #fff;
  --muted: #8b8b8b;
  --dim: #4a4a4a;
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.07);
  --panel: #0a0a0a;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 3.4vw, 44px);
  --max: 1440px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: #000; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
:focus:not(:focus-visible) { outline: none; }

/* --- Film grain ---------------------------------------------------------- */
.grain {
  position: fixed;
  inset: -100%;
  z-index: 100;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.8s steps(5) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -4%); }
  60%  { transform: translate(-4%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* --- Layout -------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.center { text-align: center; }
.section { padding-top: clamp(90px, 11vw, 160px); }

.mono {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.caption { color: var(--muted); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; }

/* info row: left · centre · right, like a print colophon */
.meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.meta > :last-child { text-align: right; }
.meta b { display: block; font-weight: 500; color: var(--ink); }

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: linear-gradient(var(--bg) 25%, transparent);
  transition: background 0.6s var(--ease);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: none;
  height: clamp(64px, 7.5vw, 88px);
}

.wordmark { display: block; }
.wordmark img { width: clamp(97px, 10.8vw, 151px); filter: invert(1); transition: filter 0.6s var(--ease); }

.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background 0.6s var(--ease), border-color 0.6s var(--ease);
}

.nav a {
  position: relative;
  z-index: 1;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.nav a:hover, .nav a.is-active { color: var(--ink); }

.nav-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: transform 0.55s var(--ease), width 0.55s var(--ease), opacity 0.3s var(--ease), background 0.6s var(--ease);
}

.nav-pill.ready { opacity: 1; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn:hover { background: var(--ink); color: #000; border-color: var(--ink); }
.btn-light { background: var(--ink); color: #000; border-color: var(--ink); }
.btn-light:hover { background: transparent; color: var(--ink); }
.header-cta { height: 34px; padding: 0 14px; font-size: 10px; }

.arrow { display: inline-block; transition: transform 0.35s var(--ease); }
.btn:hover .arrow, .card:hover .arrow { transform: translateX(3px); }

/* --- Display type -------------------------------------------------------- */
.headline {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-variation-settings: "wdth" 112;
  font-size: clamp(30px, 4.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  max-width: 17em;
  margin: 0 auto;
  text-wrap: balance;
}

.headline-xl { font-size: clamp(54px, 10vw, 150px); letter-spacing: -0.03em; }
.headline-sm { font-size: clamp(24px, 2.8vw, 40px); }

.quiet { color: #5f5f5f; }

.headline .btn {
  height: clamp(34px, 3vw, 44px);
  font-style: normal;
  vertical-align: middle;
  transform: translateY(-0.1em);
  margin: 0 0.1em;
}

.sub {
  max-width: 40em;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 17px);
}

/* word-by-word reveal: out of focus, then sharp */
[data-words] .w {
  display: inline-block;
  opacity: 0.08;
  filter: blur(6px);
  transform: translateY(0.08em);
  transition: opacity 0.9s var(--ease), filter 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 38ms);
}

[data-words].in .w { opacity: 1; filter: none; transform: none; }

/* --- Home hero ----------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center; /* equal padding top and bottom: the group lands dead centre */
  justify-items: center;
  padding-top: 96px;
  padding-bottom: 96px;
}

/* the film is the whole background — no still underneath it. Its poster frame
   is the video's own frame 0, so the first paint already shows the footage. */
.hero-media {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 0;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%); /* break out of the centred column: edge to edge */
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

/* the scrim, over the film and under the type */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 1;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.15) 26%, rgba(0, 0, 0, 0.45) 58%, rgba(0, 0, 0, 0.92) 88%, #000 100%);
}

.hero > div:first-of-type { position: relative; z-index: 2; }
.hero .hud, .hero .scroll-cue { z-index: 2; }
.hero-mark { position: relative; width: min(64.8vw, 792px); }

/* soft scrim so the white wordmark lifts off the photo instead of sinking into it */
.hero-mark::before {
  content: "";
  position: absolute;
  inset: -55% -14%;
  z-index: -1;
  background: radial-gradient(52% 52% at 50% 50%, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0) 72%);
  pointer-events: none;
}

.hero-mark img { width: 100%; filter: drop-shadow(0 12px 34px rgba(0, 0, 0, 0.72)); }


.hero-mark.reveal img { animation: markIn 1.5s var(--ease) 0.15s both; }

@keyframes markIn {
  from { opacity: 0; filter: blur(26px) drop-shadow(0 12px 34px rgba(0, 0, 0, 0.72)); transform: scaleX(1.05); }
  to   { opacity: 1; filter: blur(0) drop-shadow(0 12px 34px rgba(0, 0, 0, 0.72)); transform: none; }
}

.hero-line { margin-top: clamp(22px, 3vh, 36px); }
.hero-foot { margin-top: clamp(24px, 3.4vh, 40px); }

.hud {
  position: absolute;
  inset: clamp(76px, 8.5vw, 100px) var(--gutter) 22px;
  pointer-events: none;
  color: var(--muted);
}

.hud-row {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.hud-row.bottom { bottom: 0; padding-top: 10px; border-top: 1px solid var(--line-soft); }
@media (min-width: 901px) { .hud-row.bottom { padding-right: 200px; } } /* clear of the map */

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scroll-cue i { position: relative; display: block; width: 1px; height: 28px; overflow: hidden; background: var(--dim); }

.scroll-cue i::after {
  content: "";
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--ink);
  animation: cue 2.4s var(--ease) infinite;
}

@keyframes cue { 0% { top: -100%; } 60%, 100% { top: 100%; } }

/* --- Work ---------------------------------------------------------------- */
.section-intro { margin-bottom: clamp(36px, 5vw, 64px); }

/* work runs edge to edge: full viewport width, out of the centred column */
.grid-2, .stack {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 3.4vw, 48px) clamp(2px, 0.5vw, 8px);
  align-items: start;
}

.grid-2 > :nth-child(even) { margin-top: clamp(40px, 7vw, 110px); }
.stack { display: grid; gap: clamp(28px, 4vw, 56px); }

/* labels keep a small inset so they do not touch the screen edge */
.card-foot { padding-left: clamp(12px, 1.4vw, 20px); padding-right: clamp(12px, 1.4vw, 20px); }
.frame { border-left: 0; border-right: 0; }

.card { display: block; cursor: pointer; }

/* 2.39:1 still inside thin black letterbox bars */
.frame { background: #000; padding: 3.4% 0; border: 1px solid var(--line-soft); transition: border-color 0.4s var(--ease); }
.card:hover .frame { border-color: var(--line); }

.still { position: relative; aspect-ratio: 2.39 / 1; overflow: hidden; background: #0c0c0c; }

.still > img,
.still > .ph,
.still > iframe,
.still > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.still > img, .still > .ph { /* one clean placeholder treatment for every empty frame */
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #121212, #070707);
}

.ph::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.ph span { position: relative; color: rgba(255, 255, 255, 0.3); font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }

.card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  transition: border-color 0.4s var(--ease);
}

.card:hover .card-foot { border-color: var(--line); }

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--muted);
  overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.card-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.card-text .client { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 14px; letter-spacing: 0.01em; text-transform: uppercase; }
.card-text .mono { color: var(--muted); font-size: 10px; letter-spacing: 0.13em; }
.card-text .mono .idx { color: var(--ink); }

.tag {
  display: inline-block;
  padding: 1px 5px;
  margin-left: 6px;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--ink);
}

.card-foot .arrow { flex: none; color: var(--muted); font-size: 14px; }
.card:hover .card-foot .arrow { color: var(--ink); }

/* --- Home: work carousel -------------------------------------------------
   One frame centred, its neighbours cropped at the screen edges and dimmed.
   The track is three copies of the list wide, so it can run in either
   direction forever; main.js hops it back to the middle copy between slides. */
.carousel { position: relative; }

.carousel-name,
.carousel-desc { transition: opacity 0.17s var(--ease), transform 0.17s var(--ease); }

.carousel-name {
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(15px, 1.6vw, 21px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: clamp(14px, 1.7vw, 24px);
}

.carousel-desc {
  max-width: 48ch;
  margin: clamp(18px, 2vw, 28px) auto 0;
  text-align: center;
  color: var(--muted);
  font-size: clamp(13px, 1.05vw, 15px);
}

.carousel.is-swapping .carousel-name,
.carousel.is-swapping .carousel-desc { opacity: 0; transform: translateY(5px); }

.carousel-stage {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y; /* a sideways drag is ours, a vertical one is the page's */
}

/* edge arrows: hidden until the cursor reaches the outer fifth of the strip */
.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(38px, 3.4vw, 50px);
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.92);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.carousel-arrow.prev { left: clamp(14px, 2.4vw, 36px); }
.carousel-arrow.next { right: clamp(14px, 2.4vw, 36px); }
.carousel-arrow.on { opacity: 1; pointer-events: auto; transform: translateY(-50%) scale(1); }
.carousel-arrow:hover { background: rgba(0, 0, 0, 0.8); border-color: rgba(255, 255, 255, 0.34); }

.carousel-arrow svg {
  width: 42%;
  height: 42%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-stage.is-dragging { cursor: grabbing; }

.carousel-track {
  display: flex;
  column-gap: clamp(10px, 1.5vw, 24px);
  will-change: transform;
}

/* transform, filter and opacity are written every frame by the drift loop —
   no transitions here, or they would fight it */
.cslide {
  flex: 0 0 clamp(210px, 42vw, 680px); /* ~2.3 frames on screen: a clear centre, two peeking */
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  will-change: transform, filter, opacity;
  text-decoration: none;
  color: inherit;
}

.cslide img { -webkit-user-drag: none; user-select: none; }

.cslide .still {
  display: block;
  border: 1px solid var(--line);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.cslide.is-lifted .still {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.75);
}
.cslide img, .cslide video { pointer-events: none; } /* the drag belongs to the stage */

/* the client's name, over the foot of the frame, only while the cursor is on it */
.cslide { position: relative; }
.cslide-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(12px, 1.4vw, 20px);
  pointer-events: none;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(12px, 1.15vw, 16px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.cslide.is-lifted .cslide-label { opacity: 1; transform: none; }

@media (hover: none) { .cslide-label { display: none; } }

/* the section signs off with its own name, cropped by the edges of the screen */
.carousel-huge {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: clamp(34px, 4.5vw, 72px);
  font-size: clamp(104px, 20vw, 330px);
  height: 0.46em; /* shorter than the letters: the section edge cuts them off */
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.carousel-huge span {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: inherit;
  line-height: 1;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.42);
  transform: translateY(-0.17em); /* lifts the cap tops to the crop line */
}

/* --- Home: the film, fullscreen ------------------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #000; /* opaque: the header and map must not read through the film */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.lightbox.open { opacity: 1; visibility: visible; }

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(12px, 1.8vw, 22px) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.lightbox-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; }

.lightbox-name b {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(13px, 1.3vw, 17px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lightbox-name .quiet {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-stage {
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 44px) var(--gutter);
  min-height: 0;
}

.lightbox-stage > iframe,
.lightbox-stage > video,
.lightbox-stage > .ph {
  width: 100%;
  max-width: 1360px;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  border: 0;
  background: #000;
}

.lightbox-stage > .ph { position: relative; display: grid; place-items: center; }

/* --- Inverted panel (Clients) -------------------------------------------- */
.invert { /* full-bleed white band, never a strip with black sides */
  position: relative;
  background: #fff;
  color: #000;
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.invert::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.55) 0.9px, transparent 1px);
  background-size: 7px 7px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 8% 4%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 60% at 8% 4%, #000, transparent 72%);
  opacity: 0.5;
}

.invert > * { position: relative; z-index: 1; }
.invert .caption, .invert .quiet { color: #6a6a6a; }
.invert .btn { border-color: rgba(0, 0, 0, 0.2); color: #000; }
.invert .btn:hover { background: #000; color: #fff; }

/* logo wall */
.logos { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid rgba(0, 0, 0, 0.14); max-width: 1040px; margin: 0 auto; }

.logo {
  display: grid;
  place-items: center;
  gap: 8px;
  height: clamp(88px, 11vh, 118px);
  padding: 0 14px;
  border-right: 1px solid rgba(0, 0, 0, 0.14);
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  text-align: center;
  color: #000;
}

.logo .logo-ph {
  padding: 5px 12px;
  border: 1px dashed rgba(0, 0, 0, 0.28);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.logo .logo-name { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #333; }
.logo img { max-width: 124px; max-height: 38px; filter: grayscale(1) brightness(0); opacity: 0.72; }

/* stat counters, sharing the boxes the logo wall used */
.counter { gap: 10px; align-content: center; }

.counter-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #333;
}

.counter-value {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #000;
  font-variant-numeric: tabular-nums; /* fixed digit width: the row cannot jitter while counting */
}

/* quote + numbers */
.proof { display: grid; max-width: 1040px; margin: clamp(28px, 4vh, 48px) auto 0; text-align: left; border: 1px solid rgba(0, 0, 0, 0.14); }

.quote { padding: clamp(20px, 2.6vh, 30px) clamp(20px, 2.2vw, 30px); }
.quote-mark { display: block; height: 22px; font-family: var(--display); font-size: 54px; line-height: 0.9; color: rgba(0, 0, 0, 0.25); }
.quote blockquote { font-size: clamp(16px, 1.4vw, 20px); line-height: 1.4; letter-spacing: -0.01em; }
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.quote-photo { flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: rgba(0, 0, 0, 0.08); border: 1px solid rgba(0, 0, 0, 0.15); }
.quote-photo img { width: 100%; height: 100%; object-fit: cover; }
.quote-name { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.quote figcaption .mono { color: #6a6a6a; font-size: 9.5px; }


/* --- Page heads ---------------------------------------------------------- */
.page-head { padding-top: clamp(130px, 16vw, 210px); padding-bottom: clamp(40px, 6vw, 80px); }

/* --- About --------------------------------------------------------------- */
.services { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 900px; margin: 28px auto 0; list-style: none; }

.services li {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.services li:hover { background: var(--ink); color: #000; }

/* the founder block opens with the same headroom as a page head, so the
   headline clears the fixed nav instead of tucking under it */
.founder { padding-top: clamp(130px, 16vw, 210px); }

.portrait { max-width: 420px; margin: clamp(32px, 5vw, 64px) auto 0; }
.portrait .still { aspect-ratio: 4 / 5; }

/* the photo fills the box: no letterbox bars, no inner rule */
.portrait .frame { padding: 0; border: 0; background: none; }
.portrait .still > img { object-position: center top; background: none; }
.chip { display: none; }

/* --- Contact ------------------------------------------------------------- */
.panel { max-width: 780px; margin: 0 auto; border: 1px solid var(--line); padding: clamp(20px, 3vw, 36px); }
.form { display: grid; gap: 18px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  font-size: 16px;
  transition: border-color 0.3s var(--ease);
}

.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }

.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%238b8b8b' stroke-width='1.2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 2px center;
}

.field select:invalid { color: var(--dim); }
.field select option { background: #0a0a0a; color: var(--ink); }

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.form-status { color: var(--ink); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.form-status:empty { display: none; }
.direct { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.direct .btn .mono { color: var(--muted); margin-right: 6px; }

/* --- Project viewer ------------------------------------------------------ */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}

.viewer.open { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease); }
body.locked { overflow: hidden; }

.viewer-bar { position: sticky; top: 0; z-index: 2; background: linear-gradient(var(--bg) 55%, transparent); }
.viewer-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: none; height: clamp(64px, 7.5vw, 88px); color: var(--muted); }
.viewer-head { padding: clamp(28px, 4vw, 56px) 0 clamp(28px, 4vw, 48px); }
.viewer-head .mono { margin-top: 16px; color: var(--muted); }

.film .still { aspect-ratio: 16 / 9; }
.film .frame { padding: 2.2% 0; }

.photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 1.4vw, 18px); margin-top: clamp(10px, 1.4vw, 18px); }
.photos .card { cursor: default; }
.photos .still { aspect-ratio: 3 / 2; }
.photos .wide { grid-column: 1 / -1; }
.photos .wide .still { aspect-ratio: 2.39 / 1; }
.viewer-next { padding: clamp(70px, 9vw, 120px) 0; }
.viewer-next .caption { margin-bottom: 18px; }

/* --- Footer -------------------------------------------------------------- */
.site-footer { padding-top: clamp(100px, 12vw, 170px); padding-bottom: 26px; }
.footer-cta { padding-bottom: clamp(70px, 9vw, 120px); }

.footer-mark { width: 25%; margin: 0 auto 18px; } /* centred, ending the footer */
.footer-mark img { width: 100%; }                                     /* the wordmark is already white */

.signoff { display: none; }

/* --- Reveal -------------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* --- Light mode (while an inverted panel fills the screen) --------------- */
body.light .site-header { background: linear-gradient(#fff 25%, transparent); }
body.light .wordmark img { filter: none; }
body.light .nav { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.14); }
body.light .nav a { color: #6a6a6a; }
body.light .nav a.is-active { color: #000; }
body.light .nav-pill { background: rgba(0, 0, 0, 0.08); }
body.light .header-cta { background: #000; color: #fff; border-color: #000; }
body.light .grain { opacity: 0.035; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .logos { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .grid-2, .photos, .row-2, .proof { grid-template-columns: 1fr; }
  .grid-2 > :nth-child(even) { margin-top: 0; }
  .nav { position: relative; left: auto; transform: none; padding: 2px; }
  .nav a { padding: 6px 8px; font-size: 9.5px; letter-spacing: 0.1em; }
  .nav-pill { top: 2px; bottom: 2px; }
  .header-cta, .nav .hide-sm { display: none; }
  .hero-mark { width: min(77.4vw, 468px); }
  .cslide { flex-basis: 66.3vw; } /* a phone needs more of the film and less of the neighbours */
  .hud { inset: 70px 12px 14px; }
  .hud-row { font-size: 9px; }
  .hud .hide-sm { display: none; }
  .meta { grid-template-columns: 1fr; gap: 10px; text-align: left; }
  .meta > :last-child { text-align: left; }
  .scroll-cue { display: none; }
  .card-foot .arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], [data-words] .w { opacity: 1; transform: none; filter: none; }
  .hero-mark.reveal img { animation: none; opacity: 1; }
}

/* ==========================================================================
   Viewfinder frames · world map · minimap · letterbox cut
   ========================================================================== */

.vf {
  --c: rgba(255, 255, 255, 0.85);
  --l: 16px;
  position: absolute;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) top left / 1px var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) top right / 1px var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) bottom left / 1px var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) bottom right / 1px var(--l);
  background-repeat: no-repeat;
}

.vf::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(var(--c), var(--c)) center / 100% 1px no-repeat,
    linear-gradient(var(--c), var(--c)) center / 1px 100% no-repeat;
  opacity: 0.6;
}

.still > .vf { inset: 8% 4%; opacity: 0; transform: scale(1.1); transition: opacity 0.5s var(--ease), transform 0.8s var(--ease); z-index: 1; }
.card:hover .still > .vf { opacity: 1; transform: scale(1); }

/* --- Minimap ------------------------------------------------------------- */
.minimap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 168px;
  padding: 9px 9px 7px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background 0.6s var(--ease), border-color 0.6s var(--ease);
  animation: mapIn 0.8s var(--ease) 0.6s both;
}

@keyframes mapIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.minimap-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--muted); }
.minimap-head [data-map-label] { color: var(--ink); }
.minimap svg { display: block; width: 100%; height: auto; overflow: visible; }

.minimap svg { margin-top: 2px; }
.mp-panel { fill: rgba(255, 255, 255, 0.03); stroke: rgba(255, 255, 255, 0.2); cursor: pointer; transition: fill 0.3s var(--ease); }
.mp-panel:hover { fill: rgba(255, 255, 255, 0.1); }
.mp-panel.on { fill: rgba(255, 255, 255, 0.1); stroke: rgba(255, 255, 255, 0.5); }
.mp-path { fill: none; stroke: rgba(255, 255, 255, 0.3); stroke-dasharray: 2 3; }
.mp-cam { fill: rgba(229, 50, 45, 0.08); stroke: #e5322d; }
.mp-num { fill: #6f6f6f; font-family: var(--mono); pointer-events: none; }
.mp-name { fill: #9a9a9a; font-family: var(--mono); letter-spacing: 0.06em; pointer-events: none; transition: fill 0.3s var(--ease); }
.mp-name.on { fill: var(--ink); }

body.light .minimap { background: rgba(255, 255, 255, 0.72); border-color: rgba(0, 0, 0, 0.14); }
body.light .minimap-head { color: #6a6a6a; }
body.light .minimap-head [data-map-label] { color: #000; }
body.light .mp-panel { fill: rgba(0, 0, 0, 0.03); stroke: rgba(0, 0, 0, 0.22); }
body.light .mp-panel.on { fill: rgba(0, 0, 0, 0.08); stroke: rgba(0, 0, 0, 0.5); }
body.light .mp-path { stroke: rgba(0, 0, 0, 0.3); }
body.light .mp-num { fill: #8a8a8a; }
body.light .mp-name { fill: #555; }
body.light .mp-name.on { fill: #000; }

/* --- Letterbox cut between pages ----------------------------------------- */
.shutter i {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 200;
  height: 50.5vh;
  background: #000;
  pointer-events: none;
  animation: 0.75s cubic-bezier(0.7, 0, 0.2, 1) 0.05s both;
}

.shutter i:first-child { top: 0; animation-name: open-top; }
.shutter i:last-child { bottom: 0; animation-name: open-bottom; }
.shutter.close i { animation-duration: 0.45s; animation-delay: 0s; }
.shutter.close i:first-child { animation-name: close-top; }
.shutter.close i:last-child { animation-name: close-bottom; }

@keyframes open-top { from { transform: none; } to { transform: translateY(-100%); } }
@keyframes open-bottom { from { transform: none; } to { transform: translateY(100%); } }
@keyframes close-top { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes close-bottom { from { transform: translateY(100%); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) { .shutter { display: none; } }

/* --- Project album page (/work/<slug>) ------------------------------------ */
.album-page { padding-top: clamp(96px, 11vw, 150px); padding-bottom: clamp(70px, 9vw, 120px); }

.album-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.album-back:hover { color: var(--ink); }
.album-head { padding: clamp(40px, 7vw, 90px) 0 clamp(36px, 5vw, 64px); }
.album-head .sub { margin-top: 18px; }

/* one common tile shape, so the grid reads as a clean rectangle */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.4vw, 20px);
}

.album-shot {
  display: block;
  width: 100%;
  aspect-ratio: var(--tile-ar, 4 / 5);  /* set per album from its own photographs */
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0c0c0c;
  cursor: zoom-in;
}

.album-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.88;
  transition: opacity 0.4s var(--ease), transform 0.6s var(--ease);
}

.album-shot:hover img { opacity: 1; transform: scale(1.04); }
.album-empty { color: var(--muted); text-align: center; padding: 40px 0; }

@media (max-width: 900px) { .album-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .album-grid { grid-template-columns: 1fr; } }

/* --- Album viewer --------------------------------------------------------- */
.viewer-lb {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(0, 0, 0, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.viewer-lb.open { opacity: 1; visibility: visible; }
.viewer-lb img {
  /* min-*: auto is the grid-item default and would hold the photograph at its
     intrinsic size, overriding max-height — zero it so it scales to fit */
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-out;
}

.lb-close {
  position: absolute;
  top: clamp(14px, 2.4vw, 28px);
  right: clamp(14px, 2.4vw, 28px);
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.3s var(--ease);
}

.lb-close:hover { background: rgba(0, 0, 0, 0.85); }

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: clamp(40px, 3.4vw, 52px);
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.3s var(--ease);
}

.lb-arrow:hover { background: rgba(0, 0, 0, 0.85); }
.lb-arrow.prev { left: clamp(10px, 2vw, 26px); }
.lb-arrow.next { right: clamp(10px, 2vw, 26px); }
.lb-arrow svg { width: 42%; height: 42%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.lb-count {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 2.4vw, 26px);
  transform: translateX(-50%);
  color: var(--muted);
}
