/* ============================================================
   MONK ARCHITECTURE — main.css
   Palette: "Gallery Paper" (warm off-white + ink) with dark
   inversion for menu overlay & footer.
   Type: Archivo throughout. Scale, weight and spacing create hierarchy.
   ============================================================ */

/* ---------- Fonts (self-hosted, latin subsets) ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('../assets/fonts/archivo-normal-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../assets/fonts/archivo-italic-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* color — light */
  --bg: #F4F1EC;
  --bg-alt: #ECE8E1;
  --ink: #1A1A1A;
  --ink-2: #6B6862;
  --line: #DAD5CC;
  --accent: #A45C40;

  /* color — dark inversion */
  --dark: #141414;
  --dark-2: #1E1D1B;
  --dark-ink: #EDEAE4;
  --dark-ink-2: #8F8C86;
  --dark-line: #2E2C29;

  /* type */
  --font-heading: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Archivo', 'Helvetica Neue', Arial, sans-serif;

  --text-xs: 0.6875rem;                                 /* 11px micro-labels */
  --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.9375rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.25rem, 1.05rem + 1vw, 2rem);
  --text-xl: clamp(1.75rem, 1.3rem + 2vw, 3rem);
  --text-2xl: clamp(2.25rem, 1.4rem + 4.2vw, 5.25rem);
  --text-hero: clamp(2.75rem, 1.2rem + 7.8vw, 8.5rem);

  /* layout */
  --margin: clamp(1.25rem, 4vw, 5rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --max-w: 1800px;
  --section: clamp(6rem, 12vw, 14rem);
  --section-sm: clamp(4rem, 7vw, 8rem);

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.9s;
  --dur-fast: 0.35s;

  --nav-h: 4.5rem;
}

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

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

body {
  background: var(--bg) url('../assets/img/grain.png') repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100svh;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
em { font-family: inherit; font-style: normal; font-weight: inherit; }

::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* MPA cross-fade (progressive enhancement) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: 0.45s;
}

/* ---------- Utilities ---------- */
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--margin);
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex;
  align-items: baseline;
  gap: 1em;
}
.eyebrow::before {
  content: '';
  width: 2.5rem;
  height: 1px;
  background: var(--ink-2);
  align-self: center;
  flex: none;
}

.caption {
  font-size: var(--text-sm);
  color: var(--ink-2);
  padding-top: 0.75em;
}

/* animated hairline underline */
.u-link {
  position: relative;
  display: inline-block;
}
.u-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.u-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.u-link--active::after { transform: scaleX(1); }

/* arrow link */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.arrow-link .arrow { transition: transform 0.5s var(--ease); }
.arrow-link:hover .arrow { transform: translateX(0.5em); }

/* ---------- Grain (noise tile baked into surfaces) ---------- */
.grain { display: none; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--dark) url('../assets/img/grain.png') repeat;
  color: var(--dark-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.9s var(--ease);
}
.preloader.is-done { transform: translateY(-101%); }
.preloader-mark {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  overflow: hidden;
}
.preloader-mark span {
  display: inline-block;
  transform: translateY(120%);
  animation: pre-up 0.9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 70ms + 100ms);
}
@keyframes pre-up { to { transform: translateY(0); } }
body.is-loading { overflow: hidden; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  mix-blend-mode: difference;
  color: #fff;
  transition: transform 0.6s var(--ease);
}
.site-header.is-hidden { transform: translateY(-110%); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: none;
}
.brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.brand sup {
  font-size: 0.5em;
  letter-spacing: 0;
  vertical-align: super;
  margin-left: 0.15em;
}
.site-nav {
  display: flex;
  gap: clamp(1.5rem, 3vw, 3rem);
}
.site-nav a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.menu-btn {
  display: none;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  align-items: center;
  gap: 0.6em;
}
.menu-btn .menu-ic {
  width: 1.4rem;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}
.menu-btn .menu-ic i {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform var(--dur-fast) var(--ease);
}

@media (max-width: 760px) {
  .site-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .site-header {
    mix-blend-mode: normal;
    color: var(--ink);
    background: var(--bg);
  }
}

/* ---------- Menu overlay (dark) ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: var(--dark) url('../assets/img/grain.png') repeat;
  color: var(--dark-ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 2rem) var(--margin) 2rem;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.8s var(--ease), visibility 0s 0.8s;
}
.menu-overlay.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.8s var(--ease), visibility 0s;
}
.menu-overlay-close {
  position: absolute;
  top: 0; right: 0;
  height: var(--nav-h);
  padding-inline: var(--margin);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.menu-list { display: grid; gap: 0.25em; }
.menu-list a {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow: hidden;
}
.menu-list a > span {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.9s var(--ease);
}
.menu-overlay.is-open .menu-list a > span {
  transform: translateY(0);
  transition-delay: calc(var(--i) * 70ms + 150ms);
}
.menu-list a:hover { color: var(--dark-ink-2); }
.menu-list .mono { color: var(--dark-ink-2); }
.menu-foot {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--dark-ink-2);
  font-size: var(--text-sm);
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: var(--nav-h);
  padding-bottom: clamp(2rem, 4vh, 4rem);
}
.hero--image {
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}
.hero-bg {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}
.hero-shade {
  background: linear-gradient(90deg, rgba(13, 12, 10, 0.52) 0%, rgba(13, 12, 10, 0.19) 58%, rgba(13, 12, 10, 0.34) 100%), linear-gradient(0deg, rgba(13, 12, 10, 0.48) 0%, rgba(13, 12, 10, 0.04) 57%);
  z-index: -1;
}
.hero--image .eyebrow,
.hero--image .hero-foot .lede,
.hero--image .hero-foot .mono,
.hero--image .scroll-cue { color: rgba(255, 255, 255, 0.82); }
.hero--image .eyebrow::before,
.hero--image .hero-foot { border-color: rgba(255, 255, 255, 0.45); }
.hero--image .eyebrow::before { background: currentColor; }
.hero .eyebrow { margin-bottom: clamp(2rem, 5vh, 4rem); }
.hero-title {
  font-family: var(--font-heading);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: none;
  margin-bottom: clamp(2.5rem, 6vh, 5rem);
}
.hero-title em { font-size: 0.98em; letter-spacing: -0.01em; }
.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.hero-foot .lede {
  max-width: 34ch;
  color: var(--ink-2);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.hero-foot .mono { color: var(--ink-2); }
.scroll-cue {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
}
.scroll-cue::after {
  content: '↓';
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(0.35em); }
}

/* ---------- Full-bleed figure ---------- */
.bleed-figure {
  position: relative;
  overflow: hidden;
  height: min(92svh, 60rem);
}
.bleed-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bleed-figure .caption {
  position: absolute;
  left: var(--margin);
  bottom: 1.25rem;
  color: #fff;
  mix-blend-mode: difference;
  padding: 0;
}

/* ---------- Reveal primitives ---------- */
.line { display: block; overflow: hidden; }
.line-inner {
  display: block;
  transform: translateY(115%);
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.is-inview .line-inner { transform: translateY(0); }

[data-reveal] {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
[data-reveal].is-inview { opacity: 1; transform: none; }

[data-reveal-img] {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.2s var(--ease);
}
[data-reveal-img] img {
  transform: scale(1.14);
  transition: transform 1.6s var(--ease);
}
[data-reveal-img].is-inview { clip-path: inset(0 0 0 0); }
[data-reveal-img].is-inview img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .line-inner, [data-reveal], [data-reveal-img], [data-reveal-img] img {
    transform: none !important;
    opacity: 1 !important;
    clip-path: none !important;
  }
}

/* ---------- Scroll-driven ink reveal ----------
   Words materialise from faint to full ink as the block scrolls
   through the reading band. JS drives per-word opacity. */
[data-scroll-ink] { color: var(--ink); }
.ink-word { display: inline-block; opacity: 0.14; will-change: opacity; }
.ink-word em { font-style: italic; }
@media (prefers-reduced-motion: reduce) {
  .ink-word { opacity: 1 !important; }
}

/* ---------- Magnetic work cards (whisper) ---------- */
@media (pointer: fine) {
  .work-card { transition: transform 0.4s var(--ease); will-change: transform; }
}

/* ---------- Section scaffolding ---------- */
.section { padding-block: var(--section); }
.section--sm { padding-block: var(--section-sm); }
.section--alt { background: var(--bg-alt); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(3rem, 6vw, 6rem);
}
.section-head .eyebrow { color: var(--ink-2); }

/* ---------- Manifesto ---------- */
.manifesto .container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}
.manifesto .eyebrow { grid-column: 1 / 4; align-self: start; }
.manifesto-body { grid-column: 5 / 12; }
.manifesto-body .manifesto-text { grid-column: auto; }
.manifesto-text {
  grid-column: 5 / 12;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.manifesto-text + .arrow-link { grid-column: 5 / 12; margin-top: 3rem; }
.manifesto .prose { grid-column: 5 / 12; }
@media (max-width: 900px) {
  .manifesto .eyebrow { grid-column: 1 / -1; margin-bottom: 2rem; }
  .manifesto-text, .manifesto-text + .arrow-link, .manifesto .prose, .manifesto-body { grid-column: 1 / -1; }
}

/* ---------- Work grid (home, editorial) ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(3.5rem, 7vw, 7rem) var(--gutter);
}
.work-card { display: block; }
.work-card .work-media {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
}
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.work-card:hover img { transform: scale(1.045); }
.work-info {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 1.25rem;
}
.work-num { color: var(--ink-2); flex: none; }
.work-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.work-meta {
  margin-left: auto;
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  flex: none;
}

/* editorial placement on home */
.work-grid .w-1 { grid-column: 1 / 9; }
.work-grid .w-1 .work-media { aspect-ratio: 16 / 10; }
.work-grid .w-2 { grid-column: 10 / 13; align-self: end; }
.work-grid .w-2 .work-media { aspect-ratio: 3 / 4; }
.work-grid .w-3 { grid-column: 1 / 6; }
.work-grid .w-3 .work-media { aspect-ratio: 4 / 5; }
.work-grid .w-4 { grid-column: 7 / 13; margin-top: clamp(3rem, 8vw, 8rem); }
.work-grid .w-4 .work-media { aspect-ratio: 16 / 11; }
.work-grid .w-5 { grid-column: 1 / 8; }
.work-grid .w-5 .work-media { aspect-ratio: 16 / 10; }
.work-grid .w-6 { grid-column: 9 / 13; align-self: center; }
.work-grid .w-6 .work-media { aspect-ratio: 3 / 4; }

@media (max-width: 900px) {
  .work-grid > * { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .work-meta { display: none; }
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
  border-top: 1px solid var(--line);
}
.stat {
  padding-top: 1.5rem;
  border-top: 1px solid transparent;
}
.stat-num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-label {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 3rem; }
}

/* ---------- Studio strip ---------- */
.studio-strip .container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  align-items: center;
}
.studio-strip .studio-media {
  grid-column: 1 / 7;
  overflow: hidden;
}
.studio-strip .studio-media img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.studio-strip .studio-body { grid-column: 8 / 13; }
.studio-strip h2 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 1.5rem 0 1.5rem;
}
.studio-strip p { color: var(--ink-2); max-width: 44ch; }
.studio-strip .arrow-link { margin-top: 2.5rem; }
@media (max-width: 900px) {
  .studio-strip .studio-media, .studio-strip .studio-body { grid-column: 1 / -1; }
  .studio-strip .studio-body { margin-top: 2.5rem; }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 1.1rem;
}
.marquee-track {
  display: flex;
  gap: 4rem;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4rem;
}
.marquee-track span::after { content: '·'; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- Journal list ---------- */
.journal-list { border-top: 1px solid var(--line); }
.journal-row {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  gap: var(--gutter);
  align-items: baseline;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
  transition: opacity var(--dur-fast) ease;
}
.journal-list:hover .journal-row:not(:hover) { opacity: 0.35; }
.journal-row .mono { color: var(--ink-2); }
.journal-row h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.journal-row .tag { color: var(--ink-2); }
@media (max-width: 760px) {
  .journal-row { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(3rem, 9vh, 7rem));
  padding-bottom: clamp(2.5rem, 6vh, 5rem);
}
.page-hero .eyebrow { margin-bottom: clamp(1.5rem, 4vh, 3rem); }
.page-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.page-hero .page-sub {
  margin-top: 2rem;
  max-width: 52ch;
  color: var(--ink-2);
}

/* ---------- Projects index: toolbar ---------- */
.work-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  border-block: 1px solid var(--line);
  padding-block: 1rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.filters { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.filters button {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color var(--dur-fast) ease;
}
.filters button sup { margin-left: 0.35em; font-size: 0.8em; }
.filters button:hover, .filters button.is-active { color: var(--ink); }
.view-toggle { display: flex; gap: 1.5rem; }
.view-toggle button {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.view-toggle button.is-active { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Projects index: grid view ---------- */
.index-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(3rem, 6vw, 6rem) var(--gutter);
}
.index-grid .work-card { grid-column: span 6; }
.index-grid .work-card:nth-child(4n+1) .work-media { aspect-ratio: 16 / 11; }
.index-grid .work-card:nth-child(4n+2) .work-media { aspect-ratio: 4 / 5; }
.index-grid .work-card:nth-child(4n+3) .work-media { aspect-ratio: 4 / 5; }
.index-grid .work-card:nth-child(4n+4) .work-media { aspect-ratio: 16 / 11; }
.index-grid .work-card.is-filtered { display: none; }
@media (max-width: 760px) {
  .index-grid .work-card { grid-column: 1 / -1; }
}

/* ---------- Projects index: list view ---------- */
.index-list { border-top: 1px solid var(--line); }
.index-row {
  display: grid;
  grid-template-columns: 4rem 1fr 12rem 14rem 5rem;
  gap: var(--gutter);
  align-items: baseline;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--line);
  transition: opacity var(--dur-fast) ease, padding-left 0.5s var(--ease);
}
.index-list:hover .index-row:not(:hover) { opacity: 0.3; }
.index-row:hover { padding-left: 1rem; }
.index-row.is-filtered { display: none; }
.index-row .mono { color: var(--ink-2); }
.index-row h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.index-row .cell { color: var(--ink-2); font-size: var(--text-sm); }
@media (max-width: 900px) {
  .index-row { grid-template-columns: 3rem 1fr 5rem; }
  .index-row .cell--typology, .index-row .cell--location { display: none; }
}

/* floating image preview on list hover (desktop only) */
.float-preview {
  position: fixed;
  z-index: 800;
  width: min(22vw, 22rem);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.float-preview.is-on { opacity: 1; transform: scale(1); }
.float-preview img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.float-preview img.is-current { opacity: 1; }

/* ---------- Project detail ---------- */
.project-hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}
.fact-table {
  width: 100%;
  border-top: 1px solid var(--line);
  margin-top: clamp(2rem, 5vh, 4rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: var(--gutter);
}
.fact {
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.fact dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.fact dd { font-size: var(--text-sm); text-align: right; }
@media (max-width: 900px) {
  .fact-table { grid-template-columns: 1fr; }
}

.prose {
  max-width: 62ch;
  color: var(--ink-2);
  display: grid;
  gap: 1.25em;
}
.prose strong { color: var(--ink); font-weight: 500; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2.5rem, 5vw, 5rem) var(--gutter);
}
.media-grid .m-full { grid-column: 1 / -1; }
.media-grid .m-left { grid-column: 1 / 8; }
.media-grid .m-right { grid-column: 6 / 13; }
.media-grid .m-half-l { grid-column: 1 / 7; }
.media-grid .m-half-r { grid-column: 7 / 13; }
.media-grid .m-narrow { grid-column: 4 / 10; }
.media-grid figure { overflow: hidden; }
.media-grid img { width: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .media-grid > figure { grid-column: 1 / -1 !important; }
}

.pull-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-xl);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 26ch;
  margin-inline: auto;
  text-align: center;
}
.pull-quote cite {
  display: block;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* next project */
.next-project {
  display: block;
  position: relative;
  overflow: hidden;
}
.next-project img {
  width: 100%;
  height: min(75svh, 46rem);
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.next-project:hover img { transform: scale(1.04); }
.next-project .np-body {
  position: absolute;
  inset: 0;
  background: rgba(15, 13, 11, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  color: #fff;
  text-align: center;
  padding: var(--margin);
}
.next-project .np-body .mono { opacity: 0.75; }
.next-project .np-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ---------- Studio page ---------- */
.values-list { border-top: 1px solid var(--line); }
.value-row {
  display: grid;
  grid-template-columns: 6rem 1fr 2fr;
  gap: var(--gutter);
  padding-block: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.value-row .mono { color: var(--ink-2); }
.value-row h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.value-row p { color: var(--ink-2); max-width: 52ch; }
.practice-link {
  color: inherit;
  transition: background-color var(--dur-fast) ease, padding-left var(--dur-fast) var(--ease);
}
.practice-link:hover,
.practice-link:focus-visible {
  background: var(--bg-alt);
  padding-left: clamp(0.75rem, 2vw, 2rem);
}
.practice-link p { transition: color var(--dur-fast) ease; }
.practice-link:hover p,
.practice-link:focus-visible p { color: var(--ink); }
.practice-link .practice-arrow {
  display: inline-block;
  margin-left: 0.5em;
  transition: transform var(--dur-fast) var(--ease);
}
.practice-link:hover .practice-arrow,
.practice-link:focus-visible .practice-arrow { transform: translateX(0.4em); }
@media (max-width: 900px) {
  .value-row { grid-template-columns: 4rem 1fr; }
  .value-row p { grid-column: 2; margin-top: 0.75rem; }
}

.team-list { border-top: 1px solid var(--line); }
.team-row {
  display: grid;
  grid-template-columns: 4rem 1fr 1fr;
  gap: var(--gutter);
  align-items: baseline;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.team-row .mono { color: var(--ink-2); }
.team-row h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.team-row .role { color: var(--ink-2); font-size: var(--text-sm); }
@media (max-width: 760px) {
  .team-row { grid-template-columns: 3rem 1fr; }
  .team-row .role { grid-column: 2; }
}

.two-col {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}
.two-col .col-l { grid-column: 1 / 4; }
.two-col .col-r { grid-column: 5 / 12; }
@media (max-width: 900px) {
  .two-col .col-l, .two-col .col-r { grid-column: 1 / -1; }
  .two-col .col-l { margin-bottom: 2rem; }
}

.plain-list li {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: baseline;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}
.plain-list li:first-child { border-top: 1px solid var(--line); }
.plain-list .mono { color: var(--ink-2); flex: none; }

/* ---------- Contact ---------- */
.contact-hero {
  min-height: 72svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: clamp(3rem, 7vh, 6rem);
}
.contact-mail {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 0.5rem + 5.2vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  display: inline-block;
  margin-top: 2rem;
}
.contact-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(2rem, 4vw, 4rem) var(--gutter);
}
.contact-col .mono { color: var(--ink-2); display: block; margin-bottom: 1.25rem; }
.contact-col p, .contact-col a { font-size: var(--text-sm); line-height: 1.7; color: var(--ink); }
.contact-col a { display: inline-block; }
@media (max-width: 900px) {
  .contact-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .contact-cols { grid-template-columns: 1fr; }
}

/* ---------- CTA band ---------- */
.cta-band { text-align: left; }
.cta-band .cta-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  max-width: 18ch;
}
.cta-band .arrow-link { margin-top: 3rem; }

/* ---------- Footer (dark inversion) ---------- */
.site-footer {
  background: var(--dark) url('../assets/img/grain.png') repeat;
  color: var(--dark-ink);
  padding-top: var(--section-sm);
  overflow: hidden;
}
.footer-top {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3rem var(--gutter);
  padding-bottom: var(--section-sm);
}
.footer-cta { grid-column: 1 / 7; }
.footer-cta .mono { color: var(--dark-ink-2); display: block; margin-bottom: 1.5rem; }
.footer-cta a.mail {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.footer-col { grid-column: span 2; }
.footer-col:first-of-type { grid-column: 7 / 9; }
.footer-col .mono { color: var(--dark-ink-2); display: block; margin-bottom: 1.25rem; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a, .footer-col p {
  font-size: var(--text-sm);
  color: var(--dark-ink);
  line-height: 1.6;
}
.footer-col p { color: var(--dark-ink-2); }
.footer-legal {
  border-top: 1px solid var(--dark-line);
  padding-block: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark-ink-2);
}
.footer-mark {
  display: block;
  width: 100%;
  overflow: hidden;
}
.footer-mark span {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 31.5vw;
  line-height: 0.74;
  letter-spacing: 0.015em;
  white-space: nowrap;
  color: var(--dark-2);
  margin-left: -0.03em;
  transform: translateY(0.05em);
}
@media (max-width: 900px) {
  .footer-cta { grid-column: 1 / -1; }
  .footer-col, .footer-col:first-of-type { grid-column: span 4; }
}
@media (max-width: 560px) {
  .footer-col, .footer-col:first-of-type { grid-column: 1 / -1; }
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-pill {
  position: fixed;
  top: 0; left: 0;
  z-index: 9500;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink);
  mix-blend-mode: difference;
  background: #fff;
}
.cursor-pill {
  padding: 0.55em 1.1em;
  border-radius: 99px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  scale: 0.6;
  transition: opacity 0.3s var(--ease), scale 0.3s var(--ease);
  box-shadow: 0 2px 24px rgba(20, 18, 16, 0.18);
}
.cursor-pill.is-on { opacity: 1; scale: 1; }
@media (pointer: coarse) {
  .cursor-dot, .cursor-pill { display: none; }
}

/* ---------- Editorial gallery ---------- */
.pgal {
  max-width: var(--max-w);
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  padding-inline: var(--margin);
}
.pgal-row + .pgal-row { margin-top: clamp(4rem, 8vw, 9rem); }

.pgal-fig {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-alt);
}
.pgal-fig > img { width: 100%; height: auto; display: block; }

.pgal-num {
  position: absolute;
  left: clamp(0.75rem, 1.5vw, 1.25rem);
  bottom: clamp(0.6rem, 1.4vw, 1rem);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: #fff;
  mix-blend-mode: difference;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.pgal-fig:hover .pgal-num { opacity: 0.9; transform: none; }

/* single lead image, contained */
.pgal-row.is-full .pgal-fig { max-width: 1180px; margin-inline: auto; }
/* single portrait / square, held tighter */
.pgal-row.is-solo .pgal-fig { max-width: min(660px, 100%); margin-inline: auto; }

/* two-up, vertically offset for editorial tension */
.pgal-row.is-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 3rem);
  max-width: 1180px;
  margin-inline: auto;
  align-items: start;
}
.pgal-row.is-duo.offset-a .pgal-fig:last-child { margin-top: clamp(2.5rem, 7vw, 7rem); }
.pgal-row.is-duo.offset-b .pgal-fig:first-child { margin-top: clamp(2.5rem, 7vw, 7rem); }

/* full-bleed chapter break */
.pgal-row.is-bleed { margin-inline: calc(var(--margin) * -1); }
.pgal-row.is-bleed .pgal-fig { height: min(84svh, 52rem); }
.pgal-row.is-bleed .pgal-fig > img { height: 100%; object-fit: cover; }

@media (max-width: 700px) {
  .pgal-row + .pgal-row { margin-top: clamp(2.5rem, 9vw, 4rem); }
  .pgal-row.is-duo { grid-template-columns: 1fr; gap: clamp(2.5rem, 9vw, 4rem); }
  .pgal-row.is-duo .pgal-fig { margin-top: 0 !important; }
  .pgal-row.is-bleed .pgal-fig { height: 62svh; }
  .pgal-num { opacity: 0.85; transform: none; }
}

/* ---------- Cinematic lightbox ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 9800;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0s 0.5s;
}
.lb.is-open { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease); }
.lb-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(14, 12, 10, 0.97);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1rem, 3vh, 1.75rem) clamp(1rem, 3vw, 2.5rem);
}
.lb-title { color: var(--dark-ink-2); }
.lb-close {
  color: var(--dark-ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}
.lb-close:hover { opacity: 1; }

.lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 clamp(1rem, 6vw, 5rem);
  overflow: hidden;
}
.lb-figure { margin: 0; display: flex; max-width: min(90vw, 1500px); max-height: 100%; }
.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  cursor: zoom-in;
  touch-action: none;
}
.lb-img.is-ready { opacity: 1; transform: none; }
.lb-img.is-zoomed { cursor: zoom-out; transition: opacity 0.4s var(--ease); box-shadow: none; }

.lb-nav {
  position: absolute;
  top: 0;
  height: 100%;
  width: clamp(3rem, 10vw, 8rem);
  display: flex;
  align-items: center;
  color: var(--dark-ink);
  font-size: 1.4rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  z-index: 2;
  user-select: none;
}
.lb-nav:hover { opacity: 1; }
.lb-prev { left: 0; justify-content: flex-start; padding-left: clamp(0.75rem, 2vw, 1.5rem); }
.lb-next { right: 0; justify-content: flex-end; padding-right: clamp(0.75rem, 2vw, 1.5rem); }

.lb-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: clamp(0.75rem, 2vh, 1.25rem) clamp(1rem, 3vw, 2.5rem) clamp(1rem, 3vh, 1.75rem);
}
.lb-count { color: var(--dark-ink-2); }
.lb-strip {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.lb-strip::-webkit-scrollbar { display: none; }
.lb-thumb {
  flex: 0 0 auto;
  width: 66px;
  height: 46px;
  position: relative;
  overflow: hidden;
  opacity: 0.38;
  transition: opacity 0.3s ease;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-thumb:hover { opacity: 0.7; }
.lb-thumb.is-active { opacity: 1; }
.lb-thumb.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--dark-ink);
}

body.lb-open .cursor-dot,
body.lb-open .cursor-pill { opacity: 0 !important; }

@media (max-width: 700px) {
  .lb-strip { display: none; }
  .lb-figure { max-width: 96vw; }
  .lb-stage { padding: 0 clamp(0.5rem, 3vw, 1.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .lb { transition: opacity 0.2s ease; }
  .lb-img { transition: opacity 0.2s ease; transform: none !important; }
}
