/* ---------- fonts (self-hosted, SIL OFL) ---------- */
@font-face { font-family: 'Anton'; src: url('fonts/anton-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/archivo-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/archivo-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/archivo-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --bg: #0B0B0B;
  --ink: #F5F2EA;
  --muted: rgba(245, 242, 234, 0.62);
  --line: rgba(245, 242, 234, 0.18);
  --accent: #FF4D2E;
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, p, dl, dd, figure { margin: 0; }
::selection { background: var(--accent); color: var(--bg); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; font-family: var(--mono); font-size: 13px; }
.skip:focus { left: 8px; }

.label, .site-header, .credits, .caption, .arrow-link, .card-meta, .facts dt, .back, .site-footer .footer-meta, .clients, .contact-links {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.label { color: var(--muted); }

.arrow-link { display: inline-flex; gap: 8px; white-space: nowrap; border-bottom: 1px solid var(--accent); padding-bottom: 5px; transition: color .2s; }
.arrow-link:hover { color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: relative; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px;
  padding: 26px var(--gutter);
}
.site-header nav { display: flex; gap: clamp(18px, 3vw, 32px); }
.site-header a { padding: 6px 0; transition: color .2s; }
.site-header a:hover, .site-header a[aria-current="page"] { color: var(--accent); }

main { position: relative; z-index: 1; }

/* ---------- home ---------- */
.hover-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.hover-bg img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .5s var(--ease);
}
.hover-bg img.on { opacity: 1; }
.hover-bg::after { content: ''; position: absolute; inset: 0; background: rgba(8, 8, 8, 0.55); opacity: 0; transition: opacity .5s var(--ease); }
.hover-bg.active::after { opacity: 1; }

.hero {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 40px;
  padding: clamp(72px, 13vw, 200px) var(--gutter) clamp(64px, 8vw, 120px);
}
.hero h1 {
  flex: 1 1 640px;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(64px, 12.5vw, 200px);
  line-height: 0.86; letter-spacing: -0.005em; text-transform: uppercase;
  text-wrap: balance;
}
.hl { color: var(--accent); }
.hero-line {
  flex-basis: 100%;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero-line .bar { color: var(--accent); }

.selected { padding: 0 var(--gutter) clamp(96px, 12vw, 160px); }
.selected .label { margin-bottom: 24px; }
.wall {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 6.4vw, 100px);
  line-height: 1.06; text-transform: uppercase;
}
.wall-item { transition: color .2s, opacity .3s; }
.wall-item sup {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  vertical-align: top; position: relative; top: 0.55em; margin-left: 4px;
}
.wall .sep { color: var(--accent); opacity: 0.8; }
.wall.has-active .wall-item { opacity: 0.3; }
.wall.has-active .wall-item.active { opacity: 1; color: var(--accent); }
.selected-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.caption { color: var(--accent); min-height: 1.5em; }

/* ---------- work grid ---------- */
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px;
  padding: clamp(48px, 8vw, 120px) var(--gutter) clamp(32px, 4vw, 56px);
}
.page-head h1, .project-head h1, .about h1, .contact h1 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 0.88;
}
.page-head h1 { font-size: clamp(72px, 14vw, 220px); }

.grid {
  list-style: none; margin: 0; padding: 0 var(--gutter) clamp(96px, 12vw, 160px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(16px, 2vw, 28px);
}
.card { display: block; }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: #1a1a1a; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; filter: saturate(0.85); }
.card:hover .card-media img, .card:focus-visible .card-media img { transform: scale(1.04); filter: saturate(1.05); }
.card-title {
  margin-top: 16px; font-family: var(--display); font-weight: 400;
  font-size: clamp(26px, 2.4vw, 36px); line-height: 1; text-transform: uppercase; transition: color .2s;
}
.card:hover .card-title { color: var(--accent); }
.card-meta { margin-top: 8px; color: var(--muted); }

/* ---------- project ---------- */
.project { padding: clamp(24px, 4vw, 48px) var(--gutter) 0; }
.back { display: inline-flex; gap: 8px; color: var(--muted); transition: color .2s; }
.back:hover { color: var(--accent); }
.project-head { padding: clamp(40px, 7vw, 100px) 0 clamp(32px, 4vw, 56px); }
.project-head h1 { font-size: clamp(56px, 11vw, 180px); }
.subtitle { margin-top: 14px; font-size: clamp(20px, 2.2vw, 30px); color: var(--muted); }
.video, .lead-image { position: relative; aspect-ratio: 16 / 9; background: #151515; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lead-image img { width: 100%; height: 100%; object-fit: cover; }

.project-info {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px);
  padding: clamp(40px, 6vw, 80px) 0;
  border-bottom: 1px solid var(--line);
}
.facts { display: grid; gap: 18px; align-content: start; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); padding-top: 3px; }
.facts dd { font-size: 17px; }
.about-project p { font-size: clamp(20px, 2vw, 28px); line-height: 1.35; max-width: 32ch; }
.about-project .arrow-link { margin-top: 28px; }

.stills { columns: 2; column-gap: clamp(12px, 1.6vw, 24px); padding-top: clamp(40px, 6vw, 80px); }
.stills figure { break-inside: avoid; margin-bottom: clamp(12px, 1.6vw, 24px); background: #151515; }

.pager {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  margin-top: clamp(56px, 8vw, 120px); padding: clamp(32px, 4vw, 56px) 0;
  border-top: 1px solid var(--line);
}
.pager a { flex: 0 1 48%; display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.pager .next { text-align: right; align-items: flex-end; }
.pager-title { font-family: var(--display); font-size: clamp(32px, 5vw, 80px); line-height: 0.95; text-transform: uppercase; transition: color .2s; }
.pager a:hover .pager-title { color: var(--accent); }

/* ---------- about ---------- */
.about {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start;
  padding: clamp(40px, 7vw, 110px) var(--gutter) clamp(96px, 12vw, 160px);
}
.about-photo { position: sticky; top: 24px; aspect-ratio: 4 / 5; overflow: hidden; background: #151515; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.about h1 { font-size: clamp(56px, 8.5vw, 140px); margin-bottom: clamp(28px, 4vw, 48px); }
.about-text > p:not(.label) { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55; max-width: 36em; margin-bottom: 1.1em; }
.about-text .label { margin-top: clamp(32px, 4vw, 56px); margin-bottom: 14px; }
.clients { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 0; }
.clients li:not(:last-child)::after { content: '/'; color: var(--accent); margin: 0 12px; }

/* ---------- contact / 404 ---------- */
.contact { padding: clamp(72px, 13vw, 200px) var(--gutter) clamp(80px, 10vw, 140px); min-height: 70vh; }
.contact h1 { font-size: clamp(64px, 13vw, 210px); max-width: 9ch; }
.contact-line { margin-top: 28px; font-size: clamp(18px, 1.8vw, 24px); color: var(--muted); }
.contact-mail {
  display: inline-block; margin-top: clamp(40px, 6vw, 72px);
  font-family: var(--display); font-size: clamp(30px, 5.4vw, 84px); line-height: 1; text-transform: uppercase;
  border-bottom: 3px solid var(--accent); padding-bottom: 8px; transition: color .2s; overflow-wrap: anywhere;
}
.contact-mail:hover { color: var(--accent); }
.contact-links { list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 40px; }
.contact-links a:hover { color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 1; padding: clamp(72px, 9vw, 120px) var(--gutter) 36px; border-top: 1px solid var(--line); background: var(--bg); }
.footer-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.footer-title { font-family: var(--display); font-size: clamp(48px, 8vw, 128px); line-height: 0.9; text-transform: uppercase; }
.mail { font-family: var(--mono); font-size: 16px; letter-spacing: 0.02em; border-bottom: 1px solid var(--accent); padding-bottom: 6px; transition: color .2s; }
.mail:hover { color: var(--accent); }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: clamp(64px, 8vw, 110px); color: var(--muted); }
.socials { display: flex; gap: 24px; }
.socials a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .project-info { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-photo { position: static; aspect-ratio: 4 / 3; }
  .stills { columns: 1; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 88px 1fr; }
  .pager-title { font-size: 30px; }
  .site-header { font-size: 12px; }
  .site-header nav { gap: 16px; }
}

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