/* ── Design system v1 (2026-07-12) ─────────────────────────────────────── */
:root {
  --paper:      #ffffff;
  --ink:        #111111;
  --idle:       #f0f0f0;
  --muted:      #999999;
  --line:       #e6e6e6;
  --accent:     #ff00a8;   /* SINGLE swappable site accent — unified fuchsia (grid hover + icons), 2026-07-12 */
  --accent-ink: #ffffff;
  --fuchsia:    #ff00a8;   /* icon hover/focus (see accent-coherence note in report) */

  --t-identity: clamp(1.25rem, 4vw, 2rem);
  --t-display:  clamp(2.4rem, 11vw, 5rem);   /* primary landing identity (Futura) */
  --t-title:    1.1rem;
  --t-label:    11px;
  --t-meta:     10px;
  --t-body:     0.9375rem;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 16px; --sp-4: 24px;
  --sp-6: 48px; --sp-8: 72px; --sp-12: 96px;

  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  /* Display face: local Futura Condensed first (ships on Apple), free Saira
     Condensed fallback for everyone else. To go pixel-perfect everywhere,
     license Futura PT Condensed and add ONE @font-face with a src: url(...). */
  --font-display: "FuturaCondDisplay", "Saira Condensed", "Futura", sans-serif;
}

/* Resolves to a local Futura Condensed cut on Apple devices; if none are
   installed the family fails to load and the stack falls through to Saira. */
@font-face {
  font-family: "FuturaCondDisplay";
  src: local("Futura-CondensedExtraBold"),
       local("Futura Condensed ExtraBold"),
       local("Futura Condensed Medium");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }

.label {
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.meta {
  font-size: var(--t-meta);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Fade-in on view load (≤200ms), disabled for reduced motion */
.view { opacity: 0; animation: fade 180ms ease forwards; }
@keyframes fade { to { opacity: 1; } }

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

/* ── Landing ───────────────────────────────────────────────────────────── */
.landing {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-6);
  text-align: center;
}
.landing .identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}
/* Primary identity — The Negative Club, Futura Condensed, BOLD + upright.
   font-synthesis: none keeps rendering identical across platforms (no
   synthesized bold/oblique from the Saira Condensed fallback). */
.landing .studio-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-synthesis: none;
  font-size: var(--t-display);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
/* Secondary — the person, quiet */
.landing .person {
  margin: 0;
}
.landing .divider {
  width: min(220px, 60vw);
  height: 1px;
  background: var(--ink);
}

/* Icon nav */
.icon-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--sp-6);
  justify-content: center;
}
.icon-nav a {
  display: inline-flex;
  color: var(--ink);
  padding: var(--sp-2);            /* ≥44px tap target with the 22px icon */
  transition: color 120ms ease;
}
.icon-nav svg {
  width: 22px;
  height: 22px;
  display: block;
}
.icon-nav a:hover,
.icon-nav a:focus-visible { color: var(--fuchsia); }
.icon-nav a:focus-visible { outline: 2px solid var(--fuchsia); outline-offset: 4px; }

/* ── Photo landing (v4) — full-bleed hero + scrim ──────────────────────── */
.landing.photo { position: relative; overflow: hidden; color: #fff; }
.landing.photo .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;            /* full-bleed cover — see crop note in report */
  object-position: center;
  z-index: 0;
}
/* Scrim: even darkening + a calmer, darker pool behind the centered identity.
   The photo is busy, so this runs heavier than Zamiri's 0.12. */
.landing.photo .scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 65% 55% at 50% 48%, rgba(0,0,0,0.60), rgba(0,0,0,0.28) 72%),
    linear-gradient(rgba(0,0,0,0.30), rgba(0,0,0,0.42));
}
.landing.photo .identity,
.landing.photo .divider,
.landing.photo nav { position: relative; z-index: 2; }

.landing.photo .studio-name { color: #fff; text-shadow: 0 1px 16px rgba(0,0,0,0.45); }
.landing.photo .person { color: rgba(255,255,255,0.72); text-shadow: 0 1px 10px rgba(0,0,0,0.4); }
.landing.photo .divider { background: rgba(255,255,255,0.6); }

/* Icons: fuchsia at rest, white on hover/focus */
.landing.photo .icon-nav a { color: var(--fuchsia); }
.landing.photo .icon-nav a:hover,
.landing.photo .icon-nav a:focus-visible { color: #fff; }
.landing.photo .icon-nav a:focus-visible { outline-color: #fff; }

/* ── Dark variant (dark.html) — RETIRED 2026-07-12 (archived, not served) ─ */
body.dark { background: var(--ink); color: var(--paper); }
body.dark .landing .divider { background: var(--paper); }
body.dark .landing .person { color: #8a8a8a; }
body.dark .icon-nav a { color: var(--paper); }
body.dark .icon-nav a:hover,
body.dark .icon-nav a:focus-visible { color: var(--fuchsia); }

/* ── Grid header (work + detail) ───────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--line);
}
.topbar a.home { letter-spacing: -0.01em; font-size: 1rem; }
.topbar a.home:hover { color: var(--accent); }
.topbar .back { transition: color 120ms ease; }
.topbar .back:hover, .topbar .back:focus-visible { color: var(--accent); }

/* ── Spreadsheet grid ──────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--ink);           /* gaps read as hairlines */
  border-bottom: 2px solid var(--ink);
}
.cell {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--idle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--sp-3);
  min-height: 44px;
  transition: background 120ms ease, color 120ms ease;
}
.cell .idx { color: var(--muted); }
.cell .name { align-self: flex-start; }
.cell:hover, .cell:focus-visible {
  background: var(--accent);
  color: var(--accent-ink);
}
.cell:hover .idx, .cell:focus-visible .idx { color: var(--accent-ink); }

/* Touch / no-hover devices have no hover to reveal the accent, so show the
   colored state by default — the grid reads alive on phones. Desktop unchanged. */
@media (hover: none), (pointer: coarse) {
  .cell {
    background: var(--accent);
    color: var(--accent-ink);
  }
  .cell .idx { color: var(--accent-ink); }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .topbar { padding: var(--sp-4); }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .landing { padding: var(--sp-4); }
}

/* ── Project detail ────────────────────────────────────────────────────── */
.detail { padding: var(--sp-6); max-width: 1100px; margin: 0 auto; }
.detail .headrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.detail h1 { font-size: var(--t-title); font-weight: 500; margin: 0 0 var(--sp-1); letter-spacing: -0.01em; }
.detail .credits { margin-top: var(--sp-4); display: flex; gap: var(--sp-6); flex-wrap: wrap; }
.detail .credits .k { display: block; margin-bottom: var(--sp-1); }
.detail .desc { margin-top: var(--sp-4); max-width: 60ch; }
.detail .blurb {
  margin-top: var(--sp-4);
  max-width: 60ch;
  color: var(--muted);
  font-size: var(--t-body);
  line-height: 1.6;
}

/* Cover grid — two-up on desktop, single column on phones. Each cover keeps
   its natural aspect ratio (square + the one 4:3 landscape sit together
   without cropping); captions read under each in --t-meta. */
.media {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
.media figure { margin: 0; }
.media img { width: 100%; height: auto; display: block; }

/* Section heading — full-width typographic divider between photo groups.
   Hairline above, small tracked caps; forces the next photos onto a new row. */
.media .section-heading {
  grid-column: 1 / -1;
  margin: var(--sp-6) 0 var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 500;
}
.media .section-heading:first-child { margin-top: 0; }
.media figcaption { margin-top: var(--sp-2); }

/* File link (e.g. treatment PDF) — full-width typographic text link.
   Accent underline, inverts to accent color on hover/focus. */
.media .media-link {
  grid-column: 1 / -1;
  margin: var(--sp-4) 0 0;
}
.media .media-link a {
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color 120ms ease;
}
.media .media-link a:hover,
.media .media-link a:focus-visible { color: var(--accent); }

/* Section credit line — full-width, left-aligned, sits under a section's
   photos (distinct from the centered per-media credits used on video/embeds).
   Element+class selector beats the later, equal-specificity .credits-list base. */
.media ul.section-credits {
  grid-column: 1 / -1;
  justify-self: start;
  width: 100%;
  max-width: none;
  margin: var(--sp-2) 0;
  text-align: left;
}

/* Social & brand direction — body copy, delivered line, feed capture, embed row.
   All span full width; the sub-case reads as one vertical block. */
.media .media-text {
  grid-column: 1 / -1;
  margin: var(--sp-4) 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: var(--t-body);
  line-height: 1.6;
}
.media .media-text .lead { color: var(--ink); font-style: italic; }

.media .media-delivered {
  grid-column: 1 / -1;
  margin: var(--sp-3) 0 0;
  max-width: 60ch;
  font-size: var(--t-meta);
  line-height: 1.6;
}
.media .media-delivered .dk {
  color: var(--muted);
  margin-right: var(--sp-2);
}
.media .media-delivered .dv { color: var(--ink); }

/* Feed capture — natural phone-screenshot width, centered, hairline frame.
   Never full-bleed; capped so it reads as a phone screen on desktop. */
.media figure.media-feed {
  grid-column: 1 / -1;
  margin: var(--sp-6) 0 0;
  text-align: center;
}
.media figure.media-feed img {
  width: auto;
  max-width: 100%;
  height: auto;            /* full portrait composite, never clipped */
  margin: 0 auto;
  border: 1px solid var(--line);
}
@media (min-width: 641px) {
  .media figure.media-feed img { max-width: 460px; }
}
.media figure.media-feed figcaption { margin-top: var(--sp-3); }

/* Instagram embed row — three posts across on desktop, stacked on phones. */
.media .media-embeds {
  grid-column: 1 / -1;
  margin: var(--sp-4) 0 var(--sp-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
}
.media .media-embeds .instagram-media {
  margin: 0 !important;
  min-width: 0 !important;
  width: 326px !important;
  max-width: 100% !important;
  flex: 0 1 326px;
}

/* Low-resolution source images (from low-def PDF exports): never upscale.
   Render at native width, capped to the column so they downscale but never
   stretch soft. On mobile the column caps them anyway. */
.media figure.media-image--small img { width: auto; max-width: 100%; height: auto; }
@media (max-width: 640px) {
  .media { grid-template-columns: 1fr; gap: var(--sp-6); }
}

/* Motion media (embeds + self-hosted video) span the full width and center,
   presented as a reel. Hairline frame, no radius — consistent with covers. */
.media figure.media-embed,
.media figure.media-video { grid-column: 1 / -1; text-align: center; }
.media .frame {
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--ink);
  line-height: 0;
}
.media .frame.landscape { max-width: 900px; }
.media .frame.portrait  { max-width: 340px; }
.media .frame.embed {
  position: relative;
  max-width: 900px;
  aspect-ratio: 16 / 9;
}
.media .frame.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.media .frame video { width: 100%; height: auto; display: block; }
.media figure.media-embed figcaption,
.media figure.media-video figcaption { margin-top: var(--sp-3); }

/* Per-media credit block — typographic, --t-meta, one line per role */
.media .credits-list {
  list-style: none;
  margin: var(--sp-3) auto 0;
  padding: 0;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.media .credits-list .ck { color: var(--muted); }
.media .credits-list .cv { color: var(--ink); }
.media .placeholder {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  background: var(--idle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .view { opacity: 1; }
}
