:root {
  --bg: #fbfaf8;
  --ink: #1c1a17;
  --muted: #6d675f;
  --line: #e4e0d9;
  --bar: #17150f;
  --max: 1240px;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --slow: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Top bar: transparent over the hero, solid once you scroll ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 34px;
  flex-wrap: wrap;
  color: #fff;
  background: transparent;
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.topbar.solid {
  background: rgba(23, 21, 15, 0.93);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  padding: 13px 34px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
}
.brand {
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: letter-spacing 0.5s var(--ease);
}
.topbar.solid .brand { letter-spacing: 0.18em; }

.nav {
  display: flex;
  gap: 30px;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav a {
  position: relative;
  text-decoration: none;
  opacity: 0.78;
  padding-bottom: 4px;
  transition: opacity 0.3s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #2a2621;
  text-align: center;
  padding: 90px 24px;
}
/* Two layers so the slow drift animation and the scroll parallax do not
   fight over the same transform property. Outer = parallax, inner = drift. */
.hero-bg {
  position: absolute;
  inset: -8% -4%;
  will-change: transform;
}
.hero-img {
  position: absolute;
  inset: 0;
  background: #2a2621 center/cover no-repeat;
  transform: scale(1.06);
  animation: drift 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.15) translate3d(-1.5%, -1.2%, 0); }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 72% 58% at 50% 48%, rgba(16, 14, 11, 0.6), rgba(16, 14, 11, 0) 72%),
    linear-gradient(rgba(16, 14, 11, 0.5), rgba(16, 14, 11, 0.12) 30%, rgba(16, 14, 11, 0.45));
}
.hero-overlay { position: relative; z-index: 1; color: #fff; }

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 6.4vw, 74px);
  font-weight: 200;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.45);
}
.medium {
  margin: 16px 0 0;
  font-size: clamp(18px, 2.5vw, 27px);
  font-weight: 300;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.place {
  margin: 18px 0 0;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.82;
}

/* Staggered entrance: each line rises out of a clipping mask */
.hero h1, .medium, .place { overflow: hidden; }
.rise {
  display: inline-block;
  transform: translateY(115%);
  opacity: 0;
  transition: transform 1.15s var(--slow), opacity 1.15s var(--slow);
}
body.ready .hero h1 .rise { transform: translateY(0); opacity: 1; transition-delay: 0.15s; }
body.ready .medium .rise { transform: translateY(0); opacity: 1; transition-delay: 0.34s; }
body.ready .place .rise  { transform: translateY(0); opacity: 1; transition-delay: 0.5s; }

/* Scroll cue */
.cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 24px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 13px;
  opacity: 0;
  transition: opacity 0.9s var(--ease) 1s;
}
body.ready .cue { opacity: 1; }
.cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #fff;
  animation: cue 1.9s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: 1; }
  75% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ---------- Sections ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 34px; }
section { padding: 84px 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  position: relative;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 26px;
  padding-left: 44px;
}
h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 30px;
  height: 1px;
  background: var(--muted);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--slow) 0.1s;
}
h2.in::before { transform: scaleX(1); }

/* Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--slow), transform 0.9s var(--slow);
}
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Collection grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 52px 38px;
}
.card {
  display: block;
  text-align: left;
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.card-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: #f2efe9;
  aspect-ratio: 4 / 3;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: transform 1.1s var(--slow), opacity 0.9s var(--ease), filter 0.7s var(--ease);
}
.card img.loaded { opacity: 1; transform: scale(1); }
.card-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(16, 14, 11, 0) 55%, rgba(16, 14, 11, 0.5));
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.view {
  position: absolute;
  left: 22px;
  bottom: 18px;
  z-index: 2;
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.55s var(--slow);
}
@media (hover: hover) {
  .card:hover img.loaded { transform: scale(1.055); }
  .card:hover .card-frame::after { opacity: 1; }
  .card:hover .view { opacity: 1; transform: none; }
  .card:hover h3 { color: var(--muted); }
}
.card h3 {
  margin: 18px 0 3px;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.35s var(--ease);
}
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Swap between the grid and one collection */
.pane { transition: opacity 0.32s var(--ease), transform 0.32s var(--ease); }
.pane.out { opacity: 0; transform: translateY(10px); }

/* ---------- Inside a collection ---------- */
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 22px;
  transition: color 0.3s var(--ease);
}
.crumb .arrow { display: inline-block; transition: transform 0.4s var(--slow); }
.crumb:hover { color: var(--ink); }
.crumb:hover .arrow { transform: translateX(-5px); }

.collection-head { margin-bottom: 34px; }
.collection-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  text-transform: none;
  letter-spacing: 0.005em;
  color: var(--ink);
  font-weight: 300;
  margin-bottom: 8px;
  padding-left: 0;
}
.collection-head h2::before { display: none; }
.collection-head p { margin: 0; color: var(--muted); }
.hint { font-size: 13.5px; color: var(--muted); font-style: italic; margin: 0 0 26px; }

.works { columns: 3 320px; column-gap: 34px; }
.work {
  position: relative;
  break-inside: avoid;
  margin: 0 0 34px;
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s var(--slow), transform 0.85s var(--slow);
}
.work.in { opacity: 1; transform: none; }
.work .shot { position: relative; overflow: hidden; background: #f2efe9; }
.work img { width: 100%; transition: transform 1.1s var(--slow), filter 0.6s var(--ease); }
.work .shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(16, 14, 11, 0.16);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
@media (hover: hover) {
  .work:hover img { transform: scale(1.045); }
  .work:hover .shot::after { opacity: 1; }
}
.work figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.work figcaption strong { display: block; color: var(--ink); font-weight: 500; }
.empty { color: var(--muted); font-style: italic; }

/* ---------- Statement, contact, footer ---------- */
.statement div { max-width: 68ch; }
.statement p {
  margin: 0 0 18px;
  font-size: 18px;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--slow), transform 0.9s var(--slow);
}
.statement p.in { opacity: 1; transform: none; }
.statement p:last-child { margin-bottom: 0; }

.contact p { max-width: 62ch; margin: 0; }
.contact a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.45s var(--ease);
  padding-bottom: 2px;
}
.contact a:hover { background-size: 100% 1px; }
.gallery-line { margin-top: 12px !important; color: var(--muted); font-size: 15px; }

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 34px 70px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(14, 13, 11, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 60px 74px;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.lightbox.open { opacity: 1; }
.lightbox[hidden] { display: none; }

.lb-figure { margin: 0; text-align: center; max-height: 100%; }
.lb-figure img {
  max-height: 80vh;
  max-width: 100%;
  margin: 0 auto;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--slow);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.lb-figure img.shown { opacity: 1; transform: none; }
.lb-figure figcaption {
  color: #d8d3cb;
  font-size: 14px;
  margin-top: 18px;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.5s var(--ease) 0.12s;
}
.lb-figure img.shown + figcaption { opacity: 1; }

.lb-count {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  letter-spacing: 0.24em;
}
.lb-close, .lb-nav {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  opacity: 0.55;
  line-height: 1;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.lb-close { top: 22px; right: 26px; font-size: 34px; }
.lb-nav { top: 50%; margin-top: -32px; font-size: 50px; padding: 8px 18px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-close:hover, .lb-nav:hover { opacity: 1; }
.lb-prev:hover { transform: translateX(-5px); }
.lb-next:hover { transform: translateX(5px); }
.lb-close:hover { transform: rotate(90deg); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  main { padding: 0 22px; }
  section { padding: 60px 0; }
  .topbar { padding: 16px 22px; justify-content: center; text-align: center; }
  .topbar.solid { padding: 11px 22px; }
  .nav { gap: 20px; font-size: 11.5px; }
  .hero { min-height: 86svh; }
  .works { column-gap: 22px; }
  .lightbox { padding: 70px 14px; }
  .lb-nav { font-size: 38px; padding: 8px 8px; }
  .foot { padding: 28px 22px 56px; }
}

/* ---------- Motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .rise, [data-reveal], .work, .statement p { opacity: 1 !important; transform: none !important; }
  .card img { opacity: 1; transform: none; }
}
