/* ============================================================
   ADAM O'REGAN — adamoregan.com
   Typographic system
   ------------------------------------------------------------
   Two families. Helvetica carries display — headlines, page
   titles, index and table titles. Sometype Mono carries
   everything that is read or listed — body copy, metadata,
   every table, the nav and the wordmark. To move display to a
   licensed face (e.g. Neue Haas Grotesk, Söhne, Founders
   Grotesk), swap --font-display only.
   ============================================================ */

:root {
  color-scheme: light;
  /* Stone ground, oxblood ink.
     #e4e1d9 is deliberately deeper and greyer than Room Tone's #f2f0ec — the
     studio and the person should not share a ground. The ink is the cyclorama
     red from the hero photograph, dropped to #a8101e so body copy clears
     5.8:1 on stone. Two colours; hierarchy is size, weight and tracking. */
  --ink: #a8101e;
  --ink-soft: #a8101e;
  --ink-faint: #a8101e;
  --ink-display: #a8101e;
  --ground: #e4e1d9;
  --ground-raised: rgba(168, 16, 30, 0.07);
  --line: rgba(168, 16, 30, 0.26);
  --line-strong: #a8101e;
  --accent: #a8101e;
  --font-display: "Helvetica Neue", Helvetica, "Arial Nova", Arial, sans-serif;
  --font-mono: "Sometype Mono", ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  --measure: 34em;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

/* Sometype Mono — SIL OFL, self-hosted. Two weights, ~20KB total.
   The mono is now the site's primary voice — body copy, every table, all
   metadata, the nav and the wordmark — so leaving it to the system stack meant
   SF Mono on a Mac, Consolas on Windows and DejaVu on Linux: three different
   sites. This pins it. The system monos stay as the fallback chain. */
@font-face {
  font-family: "Sometype Mono";
  src: url("../fonts/sometype-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sometype Mono";
  src: url("../fonts/sometype-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}



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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  background: var(--ground);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

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

/* ---------- utilities ---------- */

.mono {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.soft { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

/* ---------- header ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: var(--pad);
  border-bottom: 1px solid var(--line);
}

/* The wordmark is the site's own mono, set caps-and-lowercase.
   Every other mono on the page — nav, metadata, tables — is uppercase and
   tracked. Breaking case is what keeps the name from reading as the first
   item in the menu; size and weight do the rest. */
.site-header .wordmark {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
}

.site-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.site-nav a { color: var(--ink-soft); }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

/* ---------- intro ---------- */

.intro {
  padding: calc(var(--pad) * 1.5) var(--pad);
  border-bottom: 1px solid var(--line);
}

.intro h1 {
  color: var(--ink-display);
  font-size: clamp(2.5rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 700;
  text-transform: uppercase;
  max-width: 12ch;
}

.intro h1.has-icon {
  max-width: none;
  display: flex;
  align-items: center;      /* optical centre of the cap height */
  gap: 0.32em;
}

.title-icon {
  height: 0.44em;
  width: auto;
  flex: none;
  fill: currentColor;
  stroke: none;
  color: var(--ink-display);
}

/* clickable headline words */
.headline a {
  color: inherit;
  transition: color 120ms ease;
}
.headline a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.03em;   /* tight line-height — keep it tucked under the word */
}

.intro .role-line { margin-top: 1.25rem; color: var(--ink-soft); }

.intro .lede {
  margin-top: 2rem;
  max-width: var(--measure);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 1fr);
  gap: calc(var(--pad) * 1.25);
  align-items: center;          /* no dead space above the headline */
  padding-top: var(--pad);
  padding-bottom: var(--pad);
}
.intro-grid h1 { font-size: clamp(2.2rem, 5.4vw, 4.6rem); }
.intro-portrait { margin: 0; }
.intro-portrait img {
  width: 100%;
  /* scales with viewport height so the index always breaks the fold */
  height: clamp(300px, 50vh, 600px);
  object-fit: cover;
  object-position: 50% 20%;
  border: 1px solid var(--line-strong);
}
.intro-portrait figcaption {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  line-height: 1.8;
  font-size: 0.625rem;
}
.intro-portrait figcaption .credit { display: block; }
.intro-portrait figcaption .cap-link {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.05rem;
}
.intro-portrait figcaption .cap-link:hover { border-bottom-color: var(--accent); }
@media (max-width: 56rem) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-portrait { max-width: 22rem; }
  .intro-portrait img { height: auto; aspect-ratio: 4 / 5; }
}

.about-portrait { margin: 0 0 1.5rem; }
.about-portrait img { width: 100%; border: 1px solid var(--line-strong); }

/* ---------- index list (homepage) ---------- */

.index-head {
  display: grid;
  grid-template-columns: 3rem 1fr 1fr 8rem 4rem;
  gap: 1rem;
  padding: 0.75rem var(--pad);
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
}

.index-row {
  display: grid;
  grid-template-columns: 3rem 1fr 1fr 8rem 4rem;
  gap: 1rem;
  align-items: baseline;
  padding: 1.1rem var(--pad);
  border-bottom: 1px solid var(--line);
  transition: background 120ms ease;
}

.index-row:hover { background: var(--ground-raised); }
.index-row:hover .index-title { color: var(--accent); }

.index-num { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-faint); }

.index-more {
  padding: 1.5rem var(--pad) 0;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.index-more a { color: var(--ink-soft); }
.index-more a:hover { color: var(--ink); }

.index-title {
  color: var(--ink-display);
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.index-artist { color: var(--ink-soft); }
.index-disc, .index-year { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); text-align: left; }
.index-year { text-align: right; }

@media (max-width: 44rem) {
  .index-head { display: none; }
  .index-row { grid-template-columns: 2rem 1fr; grid-template-rows: auto auto; }
  .index-artist { grid-column: 2; }
  .index-disc { grid-column: 2; }
  .index-year { display: none; }
}

/* floating hover preview (homepage) — imagery without breaking the ledger */
.hover-preview {
  position: fixed;
  top: 0; left: 0;
  width: clamp(220px, 24vw, 340px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
  z-index: 10;
}
.hover-preview.on { opacity: 1; }
.hover-preview img,
.hover-preview video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line-strong); background: #000; display: block; }
/* the clip sits over the still, so the still covers the first frame while it loads */
.hover-preview video { position: absolute; inset: 0; opacity: 0; transition: opacity 220ms ease; }
.hover-preview.has-clip video { opacity: 1; }

/* ---------- section label ---------- */

.section-label {
  padding: 2.5rem var(--pad) 0.75rem;
  color: var(--ink-faint);
}

/* ---------- project page ---------- */

.project-hero { padding: var(--pad); border-bottom: 1px solid var(--line); }

.project-hero .kicker { color: var(--ink-faint); margin-bottom: 1rem; }

.project-hero h1 {
  color: var(--ink-display);
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 700;
  text-transform: uppercase;
  max-width: 16ch;
}

.media-frame { border-bottom: 1px solid var(--line); }

.media-embed { position: relative; padding-top: 56.25%; background: #000; }
.media-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.media-caption { padding: 0.6rem var(--pad); color: var(--ink-faint); border-top: 1px solid var(--line); }

/* elegant placeholder — replaces missing masters, never a scraped thumbnail */
.media-placeholder {
  position: relative;
  padding-top: 56.25%;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent 0 14px,
      var(--line) 14px 15px
    );
}
.media-placeholder .plate {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.4rem;
}
.media-placeholder .plate .mono { color: var(--ink-soft); background: var(--ground); padding: 0.5rem 0.9rem; border: 1px solid var(--line); }

.project-body {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  gap: var(--pad);
  padding: var(--pad);
}

@media (max-width: 50rem) { .project-body { grid-template-columns: 1fr; } }

.meta-table { border-top: 1px solid var(--line-strong); }
.meta-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.meta-row dt { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); padding-top: 0.15rem; }
.meta-row dd { font-size: 0.9375rem; }

.project-summary { max-width: var(--measure); font-size: 1.125rem; line-height: 1.55; color: var(--ink-soft); }
.project-summary p + p { margin-top: 1em; }

.credit-note { margin-top: 1.5rem; max-width: var(--measure); color: var(--ink-faint); font-size: 0.875rem; line-height: 1.5; }

.accolade {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line-strong);
}

/* laurel */
.laurel-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: 0.08em;
}
.laurel-inline svg { height: 1.7em; width: auto; flex: none; }
.laurel-inline > span { white-space: nowrap; }
@media (max-width: 30rem) {
  .laurel-inline { flex-wrap: wrap; gap: 0.3rem 0.4rem; }
  .laurel-inline > span { white-space: normal; }
}
.index-row:hover .laurel-inline { color: var(--accent); }
.laurel-lockup { display: inline-flex; align-items: center; gap: 0.9rem; margin-top: 1.75rem; color: var(--ink); }
.laurel-lockup svg { height: 3.4rem; width: auto; flex: none; }
.laurel-text { display: flex; flex-direction: column; gap: 0.3rem; text-align: center; }
.laurel-text span:first-child { color: var(--ink-soft); }

.project-links { margin-top: 2rem; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.project-links a { border-bottom: 1px solid var(--line-strong); padding-bottom: 0.15rem; }

.pagination {
  display: flex;
  justify-content: space-between;
  padding: var(--pad);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

/* ---------- filmography table ---------- */

.film-table { width: 100%; border-collapse: collapse; }
.film-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink-faint);
  padding: 0.75rem var(--pad);
  border-bottom: 1px solid var(--line);
}
.film-table td { padding: 0.9rem var(--pad); border-bottom: 1px solid var(--line); vertical-align: baseline; }
.film-table td.t { font-weight: 700; letter-spacing: -0.01em; }
.film-table td.m { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.film-table tr:hover td { background: var(--ground-raised); }

/* compact index pages — long lists should read in one screen where possible */
.intro.compact { padding: calc(var(--pad) * 0.85) var(--pad) calc(var(--pad) * 0.6); }
.intro.compact h1 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); }
.intro.compact .lede { margin-top: 0.7rem; font-size: 0.9375rem; line-height: 1.45; }

.film-table.film-cols, .film-table.disc-table { table-layout: fixed; }
.compact-table th { padding: 0.4rem 0; }
/* single-column tables: page margin on the outer cells, a gutter between the rest */
.edge-pad th, .edge-pad td { padding-right: 1.4rem; }
.edge-pad th:first-child, .edge-pad td:first-child { padding-left: var(--pad); }
.edge-pad th:last-child, .edge-pad td:last-child { padding-right: var(--pad); }
/* the one long artist name wraps rather than truncating — credits stay complete */
.disc-table td.m:nth-child(2) { white-space: normal; overflow: visible; }
.compact-table td { padding: 0.34rem 0; line-height: 1.25; }
.compact-table td.t { font-size: 0.9375rem; }
.compact-table td.m { white-space: normal; }
.compact-table td.m.act { white-space: nowrap; }
.compact-table .film-note { margin-top: 0.1rem; font-size: 0.625rem; }
.compact-table .listen { padding: 0.22rem 0.55rem; }
/* format tag — shown only when a work isn't a standard music video */
.fmt {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  font-weight: 400;
  vertical-align: 0.1em;
}
.film-note { margin-top: 0.35rem; font-weight: 400; color: var(--ink-faint); text-transform: none; letter-spacing: 0.02em; }

/* ---------- photography ---------- */

.photo-section { border-bottom: 1px solid var(--line); padding-bottom: calc(var(--pad) * 1.1); }
.photo-section:last-of-type { border-bottom: 0; }

.photo-grid {
  padding: 0 var(--pad);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
/* each figure takes width proportional to its aspect ratio so rows stay even-height */
.shot {
  margin: 0;
  flex: var(--ar) 1 calc(var(--ar) * 17rem);
  min-width: 12rem;
  max-width: 66%;          /* stops a lone last-row image ballooning */
}
.shot.feature { max-width: 100%; flex-basis: 100%; }   /* deliberate full-width moment */
.shot-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--ground-raised);
  cursor: zoom-in;
  overflow: hidden;
}
.shot-btn img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 160ms ease;
}
.shot-btn:hover img { opacity: 0.82; }
.shot figcaption { margin-top: 0.45rem; color: var(--ink-faint); }

@media (max-width: 40rem) {
  .photo-grid { display: block; }
  .shot { margin-bottom: 0.75rem; }
}

/* lightbox */
.lightbox[hidden] { display: none !important; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 10, 9, 0.94);
  display: grid;
  grid-template-columns: 4rem 1fr 4rem;
  align-items: center;
  justify-items: center;
  padding: 3.5rem 1rem 3rem;
}
.lightbox img {
  grid-column: 2;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  object-fit: contain;
}
.lightbox button {
  background: transparent;
  border: 0;
  color: #f2f0ec;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  padding: 1rem;
  opacity: 0.65;
}
.lightbox button:hover { opacity: 1; }
.lb-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.6875rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-cap {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  color: #a3a09a;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- discography players ---------- */

.film-table td.act { text-align: right; white-space: nowrap; }

.listen {
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 0.32rem 0.7rem;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.listen:hover { background: var(--line-strong); color: var(--ground); }
.listen[aria-expanded="true"] { background: var(--line-strong); color: var(--ground); }

.player-row td { padding: 0 var(--pad) 1rem; background: var(--ground-raised); }
.player-slot iframe { display: block; width: 100%; height: 152px; border: 1px solid var(--line); }

/* ---------- music ---------- */

.music-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.1rem var(--pad);
  border-bottom: 1px solid var(--line);
}
.music-row:hover { background: var(--ground-raised); }
.music-title { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
@media (max-width: 44rem) { .music-row { grid-template-columns: 1fr; gap: 0.35rem; } }

/* ---------- about ---------- */

.about-body { padding: var(--pad); display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: var(--pad); }
@media (max-width: 50rem) { .about-body { grid-template-columns: 1fr; } }
.about-copy { max-width: var(--measure); font-size: 1.125rem; line-height: 1.55; }
.about-copy p + p { margin-top: 1.25em; }

/* ---------- capabilities (about) ---------- */

.cap-list { border-top: 1px solid var(--line-strong); margin: 0 var(--pad) calc(var(--pad) * 1.5); }
.cap-row {
  display: grid;
  grid-template-columns: minmax(14rem, 20rem) 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.cap-row dt { font-weight: 700; letter-spacing: -0.01em; font-size: 1.05rem; }
.cap-row dd { color: var(--ink-soft); max-width: var(--measure); line-height: 1.5; }
@media (max-width: 50rem) { .cap-row { grid-template-columns: 1fr; gap: 0.3rem; } }

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  /* the rule is the footer's top border, so the air above it has to come from
     the footer's own margin — padding would only push the text down */
  margin-top: calc(var(--pad) * 2.2);
  padding: calc(var(--pad) * 1.25) var(--pad);
  border-top: 1px solid var(--line-strong);
  color: var(--ink-soft);
}
.site-footer .cols { display: flex; gap: 2rem; flex-wrap: wrap; }
.site-footer a { border-bottom: 1px solid var(--line); padding-bottom: 0.1rem; }

/* mobile: the 6-column discography table scrolls rather than truncating */
@media (max-width: 48rem) {
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-scroll .disc-table { table-layout: auto; min-width: 46rem; }
  .table-scroll .disc-table td.m { white-space: nowrap; }
}

/* One line per row only where it demonstrably fits; otherwise credits wrap.
   Nothing is ever ellipsised — a truncated credit is worse than a taller page. */
@media (min-width: 90rem) {
  .compact-table td.m { white-space: nowrap; }
  .disc-table td.m:nth-child(2) { white-space: normal; }
}

/* ---------- custom cursor ----------
   Native SVG cursors, not a JS-positioned element: nothing to fail to paint,
   and the OS cursor is never hidden. Each mark carries a white halo so it stays
   visible on cream, on black and over photographs. */
body { cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iNSIgZmlsbD0iI2E4MTAxZSIgc3Ryb2tlPSIjZTRlMWQ5IiBzdHJva2Utd2lkdGg9IjEuOCIvPjwvc3ZnPg==") 12 12, auto; }
a, button, summary, .shot-btn, .index-row, .listen, tr[data-poster], .headline a {
  cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTIuMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTRlMWQ5IiBzdHJva2Utd2lkdGg9IjMuNCIvPjxjaXJjbGUgY3g9IjE2IiBjeT0iMTYiIHI9IjEyLjIiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2E4MTAxZSIgc3Ryb2tlLXdpZHRoPSIxLjciLz48Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxLjciIGZpbGw9IiNhODEwMWUiLz48L3N2Zz4=") 16 16, pointer;
}

/* ============================================================
   CASE STUDY
   Long-form project page. Section behaviour follows the brief
   in each project's own folder.
   ============================================================ */

.cs-hero { padding: calc(var(--pad) * 1.6) var(--pad) calc(var(--pad) * 1.1); }
.cs-hero .kicker { color: var(--ink-faint); margin-bottom: 1.1rem; }
.cs-hero h1 {
  font-size: clamp(2.2rem, 6.4vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-transform: uppercase;
  max-width: 16ch;
}
.cs-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
  margin-top: 1.6rem;
  list-style: none;
  color: var(--ink-soft);
}
.cs-roles li { position: relative; }
.cs-roles li + li::before {
  content: "·";
  position: absolute;
  left: -0.85rem;
  color: var(--ink-faint);
}

/* film — full width, muted autoplay */
.cs-film { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #000; }
.cs-film-frame { position: relative; padding-top: 56.25%; }
.cs-film-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* sections */
.cs-section { padding: calc(var(--pad) * 1.8) 0; border-bottom: 1px solid var(--line); }
.cs-section:last-of-type { border-bottom: 0; }
.cs-label { padding: 0 var(--pad); color: var(--ink-faint); margin-bottom: 1.6rem; }

.cs-copy { padding: 0 var(--pad); max-width: var(--measure); }
.cs-copy p { color: var(--ink-soft); line-height: 1.6; }
.cs-copy p + p, .cs-body p + p { margin-top: 1em; }

/* On a saturated ground, a single narrow column leaves a large unbroken field
   beside it — the colour reads as pressure rather than air. Above 62rem the
   lead and the body sit side by side so the band is filled, not flooded. */
@media (min-width: 62rem) {
  .cs-section > .cs-copy {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: calc(var(--pad) * 1.5);
    align-items: start;
  }
  .cs-section > .cs-copy > .cs-lead { margin-bottom: 0; }
  .cs-section > .cs-copy > .cs-body > p:first-child { margin-top: 0.35rem; }
  /* sections with no lead keep a single measured column */
  .cs-section > .cs-copy > .cs-body:only-child { max-width: var(--measure); }
}
.cs-lead {
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink) !important;
  margin-bottom: 1.4rem;
}

.cs-grid {
  margin-top: calc(var(--pad) * 1.2);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.cs-grid figure { margin: 0; }
.cs-grid img { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
@media (max-width: 52rem) { .cs-grid { grid-template-columns: 1fr; } }

/* full-bleed + sequence */
.cs-bleed figure { margin: 0 0 0.75rem; }
.cs-bleed img.wide { width: 100%; height: auto; display: block; }
.cs-aside {
  padding: 0.9rem var(--pad) 0;
  max-width: var(--measure);
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.cs-sequence figure + figure { margin-top: 0; }

/* artwork — centred, generous space, gentle zoom */
.cs-artwork { background: var(--ground-raised); }
.cs-centred {
  padding: calc(var(--pad) * 0.6) var(--pad) 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--pad) * 1.2);
  justify-items: center;
  align-items: center;
}
.cs-centred figure { margin: 0; max-width: 30rem; overflow: hidden; }
.cs-centred figure:only-child { grid-column: 1 / -1; max-width: 44rem; }
.cs-centred img { width: 100%; height: auto; display: block; transition: transform 500ms cubic-bezier(.2,.6,.2,1); }
@media (hover: hover) { .zoomable:hover img { transform: scale(1.03); } }
@media (max-width: 52rem) { .cs-centred { grid-template-columns: 1fr; } }

/* hero image — occupies the slot the film embed uses on film case studies */
.cs-hero-image { border-bottom: 1px solid var(--line); }
.cs-hero-image img {
  width: 100%;
  height: clamp(17rem, 44vw, 33rem);
  object-fit: cover;
  display: block;
}
.cs-hero-image .media-caption { padding: 0.7rem var(--pad) 0.9rem; }

/* colour system — swatches in the site's own type */
.swatches {
  padding: calc(var(--pad) * 0.4) var(--pad) 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--pad) * 0.7);
}
.swatches figure { margin: 0; }
.swatch-chip {
  aspect-ratio: 5 / 3;
  border: 1px solid var(--line);
  display: block;
}
.swatch figcaption { display: block; padding-top: 0.6rem; }
.swatch-name { display: block; font-weight: 700; letter-spacing: -0.01em; }
.swatch-hex { display: block; font-size: 0.6875rem; letter-spacing: 0.08em; color: var(--ink-faint); padding-top: 0.15rem; }
.swatch-role { display: block; font-size: 0.875rem; color: var(--ink-soft); padding-top: 0.35rem; max-width: 24rem; }
@media (max-width: 52rem) { .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .swatches { grid-template-columns: 1fr; } }

/* system diagram — drawn in CSS, not baked into an image */
.sysdiagram {
  padding: calc(var(--pad) * 0.5) var(--pad) 0;
  display: grid;
  gap: 0;
}
.sysdiagram .tier { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
.sysdiagram .tier-split { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sysdiagram .tier-rule {
  width: 1px;
  height: 1.6rem;
  background: var(--line);
  justify-self: center;
  margin: 0.1rem 0;
}
.sysdiagram .node {
  border: 1px solid var(--line);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 3.9rem;
  justify-content: center;
  text-align: center;
}
.sysdiagram .node-title { font-weight: 700; letter-spacing: -0.01em; }
.sysdiagram .node-note { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.sysdiagram .node-ghost { border-style: dashed; color: var(--ink-soft); }
.sysdiagram .node-wide { background: var(--ground-raised); }
@media (max-width: 42rem) { .sysdiagram .tier-split { grid-template-columns: 1fr; } }

/* credits — factual, institutional */
.cs-credits { padding: calc(var(--pad) * 1.8) 0 calc(var(--pad) * 2); border-top: 1px solid var(--line-strong); }
.credits-head { padding: 0 var(--pad); color: var(--ink-soft); max-width: var(--measure); }
.credits-head p + p { margin-top: 0.2rem; }

.credit-core {
  margin: calc(var(--pad) * 1.2) var(--pad) 0;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  max-width: 46rem;
}
.credit-core h3 { color: var(--ink-faint); font-weight: 400; margin-bottom: 0.5rem; }
.credit-core p { font-size: 1.15rem; letter-spacing: -0.01em; }

.credit-cols {
  margin-top: calc(var(--pad) * 1.4);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: calc(var(--pad) * 1.1) 2.5rem;
}
.credit-group h3 { color: var(--ink-faint); font-weight: 400; margin-bottom: 0.7rem; }
.credit-group dl > div { display: grid; grid-template-columns: 1fr; padding: 0.28rem 0; border-bottom: 1px solid var(--line); }
.credit-group dt { font-size: 0.9375rem; }
.credit-group dd { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-top: 0.12rem; }

.orchestra { margin-top: calc(var(--pad) * 1.6); padding: 0 var(--pad); }
.orchestra h3 { color: var(--ink-faint); font-weight: 400; }
.orchestra > p { margin-bottom: 1.1rem; }
.orch-list { border-top: 1px solid var(--line); }
.orch-list > div {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.orch-list dt { color: var(--ink-faint); padding-top: 0.15rem; }
.orch-list dd { font-size: 0.875rem; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 44rem) { .orch-list > div { grid-template-columns: 1fr; gap: 0.15rem; } }

.memoriam { margin-top: calc(var(--pad) * 1.6); padding: 0 var(--pad); color: var(--ink-soft); }
.memoriam h3 { color: var(--ink-faint); font-weight: 400; margin-bottom: 0.6rem; }
.cs-credits .project-links { padding: 0 var(--pad); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* title card hero — the project's own lockup carries the title */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.project-hero .cs-roles { margin-top: 1.5rem; color: var(--ink-soft); }

/* Mux-delivered film */
.cs-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.cs-sound {
  position: absolute;
  right: var(--pad);
  bottom: var(--pad);
  z-index: 2;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f2f0ec;
  background: rgba(10, 10, 9, 0.42);
  border: 1px solid rgba(242, 240, 236, 0.55);
  padding: 0.4rem 0.8rem;
  backdrop-filter: blur(6px);
  transition: background 140ms ease, color 140ms ease;
}
.cs-sound:hover { background: #f2f0ec; color: #141414; border-color: #f2f0ec; }

/* full-bleed stills are often 3:2 — cap their height so a sequence doesn't
   turn the page into a mile of scroll */
.cs-bleed img.wide { max-height: 78vh; object-fit: cover; }

/* ---------- case-study grid: one container ratio so rows stay level ---------- */
.cs-grid img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  height: auto;
}
.cs-centred img { aspect-ratio: auto; }   /* artwork keeps its own proportions */

/* ---------- screenplay ---------- */
.cs-screenplay .script {
  margin: calc(var(--pad) * 0.9) var(--pad) 0;
  max-width: 42rem;
  padding: 1.6rem 0 0;
  border-top: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink);
}
.script p + p { margin-top: 0.9em; }
.script .s-slug { text-transform: uppercase; letter-spacing: 0.06em; }
.script .s-action { color: var(--ink-soft); }
.script .s-transition { text-align: right; color: var(--ink-faint); letter-spacing: 0.08em; }
.script .s-character {
  margin-left: 38%;
  margin-top: 1.4em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.script .s-dialogue { margin-left: 22%; margin-right: 18%; margin-top: 0.2em; }
@media (max-width: 40rem) {
  .script .s-character { margin-left: 20%; }
  .script .s-dialogue { margin-left: 8%; margin-right: 0; }
}
.script-doc { padding: 1.4rem var(--pad) 0; }
.script-doc a { border-bottom: 1px solid var(--line-strong); padding-bottom: 0.15rem; }

/* projects whose case study lives on another site */
.index-title .ext {
  display: inline-block;
  margin-left: 0.45rem;
  color: var(--ink-faint);
  font-weight: 400;
  font-size: 0.62em;
  vertical-align: 0.28em;
}
.index-row:hover .ext { color: var(--accent); }

:root[data-theme="dark"] {
  color-scheme: dark;
  /* the same two colours, inverted: stone type on near-black, red as accent */
  --ground: #141310;
  --ground-raised: #1e1d18;
  --ink: #e4e1d9;
  --ink-soft: #a7a29a;
  --ink-faint: #837e75;
  --ink-display: #e4e1d9;
  --line: #302e28;
  --line-strong: #e4e1d9;
  --accent: #f0455a;
}

/* ---------- mode toggle ---------- */
.theme-toggle {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin-left: 0.35rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  cursor: inherit;
  transition: color 120ms ease, transform 220ms cubic-bezier(.2,.6,.2,1);
}
.theme-toggle svg { width: 0.86rem; height: 0.86rem; display: block; }
.theme-toggle:hover { color: var(--ink); }
:root[data-theme="dark"] .theme-toggle { transform: rotate(180deg); }

/* cursors follow the register — red dot on black, black dot on red */
:root[data-theme="dark"] body { cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iNSIgZmlsbD0iI2U0ZTFkOSIgc3Ryb2tlPSIjMTQxMzEwIiBzdHJva2Utd2lkdGg9IjEuOCIvPjwvc3ZnPg==") 12 12, auto; }
:root[data-theme="dark"] a, :root[data-theme="dark"] button, :root[data-theme="dark"] .zoomable { cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTIuMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTQxMzEwIiBzdHJva2Utd2lkdGg9IjMuNCIvPjxjaXJjbGUgY3g9IjE2IiBjeT0iMTYiIHI9IjEyLjIiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2U0ZTFkOSIgc3Ryb2tlLXdpZHRoPSIxLjciLz48Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxLjciIGZpbGw9IiNlNGUxZDkiLz48L3N2Zz4=") 16 16, pointer; }

/* ---------- body copy is set in the mono ----------
   The metadata was already mono; running the prose in it too makes the whole
   site read as one ledger rather than a document with labels stuck on. Set a
   notch smaller than the grotesque was, with more leading, and no tracking —
   mono is already wide enough. Display type, leads and index titles stay in
   the grotesque so the contrast between the two is what carries hierarchy. */
.intro .lede,
.about-copy p,
.cs-body p,
.cs-copy p:not(.cs-lead),
.credits-head p,
.memoriam p {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.68;
  letter-spacing: 0;
  text-transform: none;
}
.intro .lede { font-size: 0.9375rem; line-height: 1.64; }
.intro.compact .lede { font-size: 0.8125rem; line-height: 1.6; }
.about-copy { font-size: 1rem; }
.about-copy p { font-size: 0.875rem; }
@media (max-width: 34rem) {
  .intro .lede, .about-copy p, .cs-body p, .cs-copy p:not(.cs-lead) { font-size: 0.8125rem; }
}

/* ── Homepage still grid ───────────────────────────────────────────────
   Full-bleed, no gutters, one aspect ratio throughout. The uniformity is
   the point: a grid asserts a body of work where a single image asserts a
   moment. Drops to 2-up on narrow screens so faces stay legible. */
.still-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.grid-cell {
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
.still-grid img {
  width: 100%;
  /* height:auto is load-bearing — the width/height attributes on the img map to
     a presentational height that would otherwise beat aspect-ratio. */
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 420ms cubic-bezier(.2,.7,.3,1), filter 420ms ease;
}
/* Titles stay hidden until intent: the band reads as one field of work, and
   only names a frame once you go looking. Bottom-anchored gradient so mono
   type holds up over any of the eight, light or dark. */
.grid-label {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 2.4rem 0.85rem 0.7rem;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f4f1e9;
  background: linear-gradient(to top, rgba(0,0,0,0.82), rgba(0,0,0,0.34) 52%, transparent);
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 260ms ease, transform 260ms ease;
  pointer-events: none;
}
.gl-artist { color: rgba(244,241,233,0.68); }
.grid-cell:hover img,
.grid-cell:focus-visible img { transform: scale(1.028); }
.grid-cell:hover .grid-label,
.grid-cell:focus-visible .grid-label { opacity: 1; transform: none; }
.grid-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
/* Touch and reduced-motion: no hover to reveal, so the label just stays put. */
@media (hover: none) {
  .grid-label { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .still-grid img, .grid-label { transition: none; }
  .grid-cell:hover img { transform: none; }
}
@media (max-width: 44rem) {
  .still-grid { grid-template-columns: repeat(2, 1fr); }
}
