:root {
  --bg: #f3f2ef;
  --ink: #161616;
  --muted: #77736d;
  --rule: #d9d6d0;
  --accent: #b5532f;
  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: clamp(18px, 3.2vw, 44px);
  --gap: 8px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.site-header.over-hero { background: transparent; color: #fff; border-color: transparent; }
.site-header.over-hero.menu-open { background: var(--bg); color: var(--ink); border-color: var(--rule); }
.nav-link {
  font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.wordmark { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.wm-name {
  font-family: var(--display); font-stretch: 125%; font-weight: 700;
  font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
}
.wm-sub {
  font-size: 9.5px; font-weight: 500; letter-spacing: .42em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; opacity: .7;
}
.wm-sub::before { content: ""; width: 18px; height: 1px; background: var(--accent); }
.primary-nav { display: flex; gap: clamp(18px, 3vw, 36px); }
.nav-link { position: relative; padding: 6px 0; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-link.active::after { background: var(--accent); }
.nav-link:hover::after, .nav-link.active::after, .nav-link[aria-expanded="true"]::after { transform: scaleX(1); }

/* Work menu */
.menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 25;
  background: var(--bg); overflow-y: auto;
  animation: fade .25s var(--ease);
}
.menu-inner { padding: clamp(28px, 5vw, 64px) var(--pad); }
.menu-label { margin: 0 0 20px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.menu-list { list-style: none; margin: 0; padding: 0; columns: 2 320px; column-gap: var(--pad); }
.menu-list li { break-inside: avoid; border-top: 1px solid var(--rule); }
.menu-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 16px 0; font-family: var(--display); font-stretch: 125%; font-size: clamp(18px, 2.1vw, 28px); font-weight: 600; text-transform: uppercase; line-height: 1.15;
  transition: color .2s;
}
.menu-list a:hover { color: var(--accent); }
.menu-list .count { font-size: 13px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

main { min-height: 100vh; }
.page { padding-top: var(--header-h); animation: fade .4s var(--ease); }

/* Hero */
.hero { position: relative; height: 100svh; min-height: 520px; background: #111; overflow: hidden; color: #fff; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.hero-slide.on { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 7s linear; }
.hero-slide.on img { transform: scale(1); }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 22%, transparent 62%, rgba(0,0,0,.5));
}
.hero-meta {
  position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: clamp(22px, 4vw, 44px);
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
}
.hero-heading { margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: clamp(30px, 5.6vw, 88px); letter-spacing: .02em; text-transform: uppercase; line-height: .95; }
.hero-rule { display: block; width: 56px; height: 2px; background: var(--accent); margin: 18px 0 0; }
.hero-sub { margin: 16px 0 0; letter-spacing: .02em; font-size: 14px; max-width: 34ch; opacity: .85; }
.hero-controls { display: flex; align-items: center; gap: 18px; font-size: 13px; font-variant-numeric: tabular-nums; }
.hero-caption { display: block; text-align: right; margin-bottom: 8px; opacity: .85; }
.hero-controls button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.55); transition: background .2s, color .2s; }
.hero-controls button:hover { background: #fff; color: #111; }
.hero-controls svg, .lb-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }

/* Section headings */
.section { padding: clamp(48px, 8vw, 110px) var(--pad); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding-bottom: 18px; margin-bottom: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--rule);
}
.section-head h2 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.section-head span { font-size: 13px; color: var(--muted); }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(28px, 3vw, 44px) clamp(14px, 1.6vw, 22px); }
.cat-card { display: block; }
.cat-card figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #e4e2dd; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), opacity .5s; }
.cat-card:hover img { transform: scale(1.035); }
.cat-card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; }
.cat-card-meta h3 { margin: 0; font-family: var(--display); font-stretch: 125%; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; transition: color .2s; }
.cat-card:hover h3 { color: var(--accent); }
.cat-card-meta span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Category page */
.cat-head { padding: clamp(40px, 7vw, 96px) var(--pad) 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 32px; }
.cat-head h1 { margin: 0; font-family: var(--display); font-stretch: 125%; font-size: clamp(30px, 5.4vw, 76px); font-weight: 600; letter-spacing: -.01em; text-transform: uppercase; line-height: .98; }
.cat-head p { margin: 0; color: var(--muted); max-width: 40ch; }
.cat-head .cat-index { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }

.subnav {
  position: sticky; top: var(--header-h); z-index: 20;
  margin-top: clamp(28px, 4vw, 48px);
  background: var(--bg); border-bottom: 1px solid var(--rule);
}
.subnav ul {
  list-style: none; margin: 0; padding: 0 var(--pad);
  display: flex; gap: clamp(18px, 2.4vw, 30px); overflow-x: auto; scrollbar-width: none;
}
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a {
  display: block; padding: 14px 0 13px; white-space: nowrap; font-size: 13px; color: var(--muted);
  border-bottom: 1px solid transparent; margin-bottom: -1px; transition: color .2s;
}
.subnav a:hover { color: var(--ink); }
.subnav a.active { color: var(--ink); border-color: var(--accent); }

.gallery { padding: clamp(20px, 3vw, 36px) var(--pad) 0; }
.row { display: flex; gap: var(--gap); margin-bottom: var(--gap); }
.tile { position: relative; flex: none; overflow: hidden; background: #e4e2dd; cursor: zoom-in; padding: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease), transform .9s var(--ease); }
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.02); }

.next-cat { display: block; margin: clamp(56px, 8vw, 110px) var(--pad) 0; padding: 24px 0 clamp(40px, 6vw, 72px); border-top: 1px solid var(--rule); }
.next-cat small { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.next-cat strong { font-family: var(--display); font-stretch: 125%; font-size: clamp(26px, 4.4vw, 56px); font-weight: 600; text-transform: uppercase; line-height: 1; transition: color .2s; }
.next-cat:hover strong { color: var(--accent); }

/* About / Contact */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 80px); padding: clamp(40px, 7vw, 96px) var(--pad); align-items: start; }
.split figure { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: #e4e2dd; }
.split figure img { width: 100%; height: 100%; object-fit: cover; }
.prose h1 { margin: 0 0 28px; font-family: var(--display); font-stretch: 125%; font-size: clamp(30px, 5vw, 68px); font-weight: 600; text-transform: uppercase; line-height: .98; }
.prose p { margin: 0 0 18px; font-size: clamp(16px, 1.3vw, 19px); max-width: 46ch; }
.prose .muted { color: var(--muted); }
.facts { list-style: none; margin: 36px 0 0; padding: 0; max-width: 560px; }
.facts li { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.facts li span:first-child { color: var(--muted); font-size: 13px; padding-top: 1px; }
.facts a { border-bottom: 1px solid var(--rule); transition: border-color .2s; }
.facts a:hover { border-color: var(--ink); }

.site-footer { padding: clamp(40px, 6vw, 80px) var(--pad) 22px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.footer-mark {
  display: block; color: var(--ink); font-family: var(--display); font-stretch: 125%; font-weight: 700;
  text-transform: uppercase; font-size: clamp(26px, 7.4vw, 124px); letter-spacing: .01em; line-height: .9;
  white-space: nowrap; margin-bottom: clamp(24px, 3vw, 40px);
}
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; }
.site-footer a:hover { color: var(--ink); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: #0d0d0d; color: #eee; display: grid; grid-template-rows: auto 1fr; animation: fade .25s var(--ease); }
.lb-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--header-h); padding: 0 var(--pad); font-size: 13px; }
.lb-title { font-family: var(--display); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
.lb-count { font-variant-numeric: tabular-nums; color: #999; }
.lb-close { justify-self: end; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; padding: 8px 0; }
.lb-stage { position: relative; display: grid; place-items: center; padding: 0 clamp(12px, 7vw, 96px) clamp(12px, 3vw, 36px); min-height: 0; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: calc(100svh - var(--header-h) - clamp(12px, 3vw, 36px)); object-fit: contain; transition: opacity .3s var(--ease); user-select: none; -webkit-user-drag: none; }
.lb-stage img.swap { opacity: 0; }
.lb-nav { position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -28px; display: grid; place-items: center; color: #bbb; transition: color .2s; }
.lb-nav:hover { color: #fff; }
.lb-prev { left: max(4px, calc(var(--pad) - 18px)); }
.lb-next { right: max(4px, calc(var(--pad) - 18px)); }
.lb-nav svg { width: 26px; height: 26px; stroke-width: 1.2; }

@media (max-width: 760px) {
  :root { --header-h: 56px; --gap: 6px; }
  .primary-nav { gap: 16px; }
  .wm-name { font-size: 12px; letter-spacing: .1em; }
  .wm-sub { font-size: 8px; letter-spacing: .34em; }
  .wm-sub::before { width: 10px; }
  .nav-link { font-size: 11.5px; }
  .hero-meta { flex-direction: column; align-items: start; }
  .hero-caption { text-align: left; }
  .cat-head { grid-template-columns: 1fr; }
  .cat-head .cat-index { text-align: left; }
  .split { grid-template-columns: 1fr; }
  .facts li { grid-template-columns: 100px 1fr; }
  .lb-nav { display: none; }
  .lb-stage { padding: 0 0 12px; }
}

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