:root {
  --ink: #100e0d;
  --ink-2: #1a1715;
  --line: #3a332d;
  --bone: #efe8dc;
  --bone-2: #d9d0c2;
  --mute: #b8afa2;
  --guinda: #8e1b22;
  --guinda-hi: #b3262f;
  --brass: #c8a260;
  --display: 'Bodoni Moda', Didot, 'Times New Roman', serif;
  --label: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.label {
  font-family: var(--label);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}
.em { font-style: italic; font-weight: 400; color: var(--brass); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--gutter);
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.solid { background: rgba(16, 14, 13, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 34px; height: auto; color: var(--brass); }
.brand span { font-family: var(--label); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; font-size: 15px; }
.nav ul { display: flex; gap: clamp(14px, 2.4vw, 32px); list-style: none; margin: 0; padding: 0; }
.nav ul a {
  font-family: var(--label); font-weight: 500; font-size: 15px; letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none; color: var(--bone-2); padding: 12px 0; display: inline-block;
}
.nav ul a:hover { color: var(--brass); }
@media (max-width: 640px) { .nav ul li.opt { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; background: var(--ink); }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding-bottom: 18vh; }
.hero-fallback svg { height: min(48vh, 70vw); width: auto; color: var(--brass); }
.hero.no-webgl #stage { display: none; }
.hero.no-webgl .hero-fallback { display: flex; }
.hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(to top, var(--ink) 4%, rgba(16, 14, 13, 0)); pointer-events: none;
}
.hero-copy {
  position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: clamp(28px, 6vh, 64px);
  display: flex; flex-direction: column; align-items: flex-start; gap: clamp(18px, 3vh, 30px);
  max-width: 560px;
}
.hero h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 0.88;
  font-size: clamp(56px, 8.6vw, 128px); margin-top: 12px;
}
.hero h1 .em { display: inline-block; }
.hero-side { max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.hero-side p { color: var(--bone-2); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  font-family: var(--label); font-weight: 600; font-size: 16px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--brass); color: var(--ink); background: var(--brass);
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.btn:hover { background: var(--bone); border-color: var(--bone); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brass); color: var(--brass); background: transparent; }
.btn svg { width: 20px; height: 20px; }

/* ---------- Sections ---------- */
section { padding: clamp(72px, 11vw, 160px) var(--gutter); }
.wrap { max-width: 1240px; margin: 0 auto; }
.sec-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: clamp(36px, 5vw, 72px); }
h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; line-height: 0.98; font-size: clamp(44px, 7vw, 104px); text-wrap: balance; }
h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; line-height: 1; font-size: clamp(34px, 4.4vw, 60px); }
.lead { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; color: var(--bone-2); max-width: 34em; text-wrap: pretty; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: clamp(28px, 5vw, 80px); align-items: center; }
.stack { display: flex; flex-direction: column; gap: 22px; }

.bone { background: var(--bone); color: #1a1614; }
.bone .label { color: var(--guinda); }
.bone .em { color: var(--guinda); }
.bone .lead, .bone p { color: #3b342f; }
.bone .project { border-color: #1a1614; }
.bone .project-num { color: var(--guinda); }
.bone figcaption { color: #5a514a; }

figure { overflow: hidden; position: relative; background: var(--ink-2); }
figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
figure:hover img { transform: scale(1.04); }
figcaption {
  font-family: var(--label); font-weight: 500; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--mute); padding-top: 10px;
}
.shot { display: flex; flex-direction: column; }
.shot figure { flex: 1; }

/* Projects */
.project { border-top: 1px solid var(--line); padding-top: 28px; margin-top: clamp(64px, 9vw, 130px); }
.project:first-of-type { margin-top: 0; }
.project-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px clamp(28px, 5vw, 80px); align-items: end; margin-bottom: 32px; }
.project-num { font-family: var(--label); font-weight: 600; letter-spacing: 0.22em; font-size: 14px; color: var(--brass); margin-bottom: 12px; text-transform: uppercase; }
.grid { display: grid; gap: 14px; }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.g-4 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 46%), 1fr)); }
.r-34 { aspect-ratio: 3 / 4; }
.r-45 { aspect-ratio: 4 / 5; }
.r-11 { aspect-ratio: 1 / 1; }
.r-32 { aspect-ratio: 3 / 2; }
.r-169 { aspect-ratio: 16 / 9; }
.r-219 { aspect-ratio: 21 / 9; }
@media (max-width: 640px) { .r-219 { aspect-ratio: 3 / 2; } }
.step { font-family: var(--label); font-weight: 600; font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; padding-top: 10px; }
.step b { color: var(--brass); font-weight: 600; margin-right: 6px; }
.bone .step b { color: var(--guinda); }

.quote { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(30px, 4.6vw, 64px); line-height: 1.12; text-wrap: balance; }

/* Contact */
.contact { text-align: left; }
.contact h2 { font-size: clamp(56px, 11vw, 168px); line-height: 0.9; }
.contact-list { margin-top: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); }
.contact-list a, .contact-list div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap;
  padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.contact-list .v { font-family: var(--display); font-size: clamp(26px, 3.4vw, 44px); line-height: 1.1; transition: color 0.25s; }
.contact-list a:hover .v { color: var(--brass); }
footer { padding: 32px var(--gutter) 44px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); }
footer svg { width: 44px; height: auto; color: var(--brass); }
footer p { font-family: var(--label); letter-spacing: 0.18em; text-transform: uppercase; font-size: 14px; color: var(--mute); }

/* Reveal */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  figure img, .btn { transition: none; }
}

@media (max-aspect-ratio: 115/100) {
  .hero::after { height: 58%; background: linear-gradient(to top, var(--ink) 55%, rgba(16, 14, 13, 0)); }
}

/* Floating WhatsApp */
.fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 25;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brass); color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 0.3s, transform 0.3s, background 0.25s;
}
.fab.show { opacity: 1; transform: none; pointer-events: auto; }
.fab:hover { background: var(--bone); }
.fab svg { width: 28px; height: 28px; }

/* Lightbox */
.js figure img { cursor: zoom-in; }
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(10, 9, 8, 0.94); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(10, 9, 8, 0.94); }
.lightbox img { max-width: 94vw; max-height: 90vh; max-height: 90dvh; width: auto; height: auto; object-fit: contain; cursor: zoom-out; }
.lightbox button {
  position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; border: 1px solid var(--line); background: transparent;
  color: var(--bone); font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox button:hover { border-color: var(--brass); color: var(--brass); }

/* 404 */
.lost { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 120px var(--gutter) 72px; position: relative; overflow: hidden; }
.lost-num {
  position: absolute; right: 0.02em; bottom: -0.24em; font-family: var(--display); font-weight: 800; line-height: 0.8; letter-spacing: -0.04em;
  font-size: clamp(200px, 36vw, 560px); color: transparent; -webkit-text-stroke: 1px rgba(200, 162, 96, 0.28); pointer-events: none; user-select: none;
}
.lost > :not(.lost-num) { position: relative; }
.lost h1 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 0.92; font-size: clamp(48px, 8vw, 120px); max-width: 11em; text-wrap: balance; }
.lost svg.mark { width: clamp(64px, 8vw, 104px); height: auto; color: var(--guinda-hi); }
@media (prefers-reduced-motion: reduce) { .fab { transition: none; } }

/* Photo/video + quote */
.said { margin: clamp(36px, 5vw, 72px) 0; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.said:last-child { margin-bottom: 0; }
.clip { aspect-ratio: 9 / 16; }
figure video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) { .said { grid-template-columns: 1fr; } .clip { max-width: 300px; } }

/* Landscape + portrait pair with equal heights */
.pair { grid-template-columns: minmax(0, 1.778fr) minmax(0, 0.75fr); }
.pair > .shot:last-child figure { aspect-ratio: 3 / 4; flex: none; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }

/* Sound toggle on clips that have audio */
.sound {
  position: absolute; right: 10px; bottom: 10px; min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--label); font-weight: 600; font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bone); background: rgba(16, 14, 13, 0.78); border: 1px solid var(--line); cursor: pointer;
}
.sound:hover, .sound[aria-pressed="true"] { border-color: var(--brass); color: var(--brass); }
.pair.rev { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.395fr); }
.pair.rev > .shot:first-child figure { aspect-ratio: 3 / 4; flex: none; }
.pair.rev > .shot:last-child figure { aspect-ratio: 720 / 516; flex: none; }
@media (max-width: 640px) { .pair.rev { grid-template-columns: 1fr; } }

/* Bodoni Moda: at big sizes its automatic optical size thins the hairlines until a "t" reads as an "l".
   Pin a sturdier cut so crossbars and commas stay visible. */
h1, h2, h3, .quote, .contact-list .v, .lost-num { font-optical-sizing: none; font-variation-settings: 'opsz' 20; }
