/* ================================================
   ESTHER JOHNSON — CONTEMPORARY PAINTER
   style.css v3 — cinematic exhibition rebuild
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Inter:wght@300;400&display=swap');

/* ─── TOKENS ──────────────────────────────────── */
:root {
  --ink:       #09090d;
  --ink-soft:  #1b1c24;
  --paper:     #f4f2ed;
  --warm:      #eceae3;
  --fog:       #8a877f;
  --mist:      #bbb8b0;
  --bronze:    #9e7d55;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;

  --nav-h:  62px;
  --pad:    clamp(1.5rem, 5vw, 5.5rem);

  --ease:   cubic-bezier(0.25, 0.1, 0.25, 1);
  --easeO:  cubic-bezier(0.0, 0.0, 0.2, 1);
  --t:      0.45s var(--ease);
  --tf:     0.2s  var(--ease);
}

/* ─── BASE ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img   { display: block; max-width: 100%; }
a     { text-decoration: none; color: inherit; }
button{ background: none; border: none; cursor: pointer; font-family: var(--sans); }
ul    { list-style: none; }

/* ─── UTILITY ─────────────────────────────────── */
.eyebrow {
  display: block;
  font-size: 0.59rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1.5rem;
}

/* ─── REVEAL (scroll animation) ──────────────── */
.r {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--easeO), transform 0.9s var(--easeO);
}
.r.vis { opacity: 1; transform: none; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.3s;  }

/* ─── NAV ─────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  height: var(--nav-h);
  /* Always readable: dark glass over hero image */
  background: rgba(9, 9, 13, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
}
/* Once past the hero: switch to light frosted glass */
.nav.lit {
  background: rgba(244, 242, 237, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(9, 9, 13, 0.08);
}

.nav__i {
  height: 100%;
  padding: 0 var(--pad);
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo — white on dark, ink on light */
.nav__logo {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
  transition: opacity var(--tf), color var(--tf);
}
.nav__logo:hover { opacity: 0.6; }
.nav.lit .nav__logo { color: var(--ink); }

/* Right-hand links */
.nav__r {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav__r .nav__a,
.nav__r .nav__gal-btn {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);   /* high-contrast white on dark nav */
  padding: 0;
  transition: color var(--tf), opacity var(--tf);
}
.nav__r .nav__a:hover,
.nav__r .nav__gal-btn:hover { color: #fff; }
.nav__r .nav__a:active,
.nav__r .nav__gal-btn:active { opacity: 0.6; }
.nav.lit .nav__r .nav__a,
.nav.lit .nav__r .nav__gal-btn { color: var(--fog); }
.nav.lit .nav__r .nav__a:hover,
.nav.lit .nav__r .nav__gal-btn:hover { color: var(--ink); }

/* Enquire CTA pill */
.nav__a--cta {
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 0.45rem 1.1rem;
  transition: border-color var(--tf), color var(--tf), background var(--tf);
}
.nav__a--cta:hover {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}
.nav__a--cta:active { opacity: 0.65; }
.nav.lit .nav__a--cta {
  border-color: rgba(9, 9, 13, 0.18);
  color: var(--fog);
}
.nav.lit .nav__a--cta:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 5px;
  transition: opacity var(--tf);
}
.nav__burger:active { opacity: 0.6; }
.nav__burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: rgba(255, 255, 255, 0.88);   /* always white on dark nav */
  transition: transform var(--tf), background var(--tf);
}
.nav.lit .nav__burger span { background: var(--ink); }
.nav__burger.open span:first-child { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:last-child  { transform: translateY(-7px) rotate(-45deg); }

/* Drawer */
.nav__drawer {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  z-index: 89;      /* just below nav bar itself (90) but above page content */
  background: var(--ink);
  padding: 2.5rem var(--pad) 3.5rem;
  transform: translateY(-108%);
  opacity: 0;
  transition: transform var(--t), opacity var(--t);
  pointer-events: none;
}
.nav__drawer.open {
  transform: none;
  opacity: 1;
  pointer-events: all;
}
.nav__drawer ul { display: flex; flex-direction: column; gap: 1.25rem; }
.nav__drawer a,
.nav__drawer button {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(244,242,237,0.75);
  transition: color var(--tf);
}
.nav__drawer a:hover,
.nav__drawer button:hover { color: var(--paper); }

/* ─── HERO ────────────────────────────────────── */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero__bg {
  position: absolute;
  inset: -15% 0;
  will-change: transform;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
  animation: heroZoom 16s var(--easeO) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.1); }
  to   { transform: scale(1.01); }
}

.hero__veil {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    /* Bottom: darken for name text */
    linear-gradient(to top,
      rgba(4, 4, 10, 0.92)  0%,
      rgba(4, 4, 10, 0.5)   38%,
      rgba(4, 4, 10, 0.08)  70%,
      transparent            100%),
    /* Top: subtle darkness behind nav — text always reads */
    linear-gradient(to bottom,
      rgba(4, 4, 10, 0.35)  0%,
      transparent            22%),
    /* Left feather */
    linear-gradient(to right,
      rgba(4, 4, 10, 0.18)  0%,
      transparent            55%);
}

.hero__body {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 var(--pad) clamp(3rem, 7vw, 6rem);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.hero__kicker {
  display: block;
  font-size: 0.57rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1.1rem;
  animation: fu 1s var(--easeO) 0.4s both;
}

.hero__name {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(5.5rem, 13vw, 15rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  color: #fff;
  animation: fu 1.1s var(--easeO) 0.6s both;
}

.hero__enter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.88);   /* visible by default — not 0.55 */
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-bottom: 0.3rem;
  animation: fu 1s var(--easeO) 1s both;
  transition: color var(--tf), opacity var(--tf), transform var(--tf);
}
.hero__enter:hover { color: #fff; }
.hero__enter:active { opacity: 0.6; transform: scale(0.98); }
.hero__enter svg {
  width: 0;
  overflow: hidden;
  transition: width 0.45s var(--ease);
}
.hero__enter:hover svg { width: 44px; }

.hero__down {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  animation: fi 0.8s ease 1.5s both;
}
.hero__down-line {
  display: block;
  width: 1px;
  height: 44px;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
.hero__down-line::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.4);
  animation: drip 2.8s ease 2s infinite;
}

@keyframes fu  { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
@keyframes fi  { from { opacity:0; } to { opacity:1; } }
@keyframes drip { from { top:-100%; } to { top:100%; } }

/* ─── GALLERY OVERLAY ─────────────────────────── */
.gal {
  position: fixed;
  inset: 0;
  z-index: 95;      /* above nav (90) and everything else */
  background: #080911;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* closed state */
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.5s var(--easeO), transform 0.5s var(--easeO);
}
.gal.open {
  opacity: 1;
  pointer-events: all;
  transform: none;
}

/* Gallery header bar */
.gal__head {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Desktop: single-row layout with close on far right */
.gal__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  height: 62px;
}

.gal__wordmark {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(244,242,237,0.55);
  white-space: nowrap;
}

/* On desktop: filters sit in a second row, centred */
.gal__filters {
  display: flex;
  gap: 0.15rem;
  justify-content: center;
  padding: 0.45rem var(--pad) 0.6rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.gf {
  font-size: 0.59rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(244, 242, 237, 0.35);
  padding: 0.38rem 0.9rem;
  border: 1px solid transparent;
  transition: color var(--tf), border-color var(--tf), opacity var(--tf);
}
.gf:hover  { color: rgba(244, 242, 237, 0.75); }
.gf:active { opacity: 0.55; }
.gf.active {
  color: rgba(244, 242, 237, 0.9);
  border-color: rgba(244, 242, 237, 0.25);
}
.gal__close {
  color: rgba(244, 242, 237, 0.45);
  padding: 10px;
  transition: color var(--tf), transform var(--tf), opacity var(--tf);
}
.gal__close:hover  { color: rgba(244, 242, 237, 0.95); transform: rotate(90deg); }
.gal__close:active { opacity: 0.55; }

/* Gallery scrollable body */
.gal__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: clamp(1.5rem, 3vw, 3rem) var(--pad) clamp(1.5rem, 3vw, 3rem);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
  cursor: default;
}
.gal__body::-webkit-scrollbar { width: 3px; }
.gal__body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); }

/* Masonry columns */
.gal__masonry {
  columns: 3;
  column-gap: 10px;
}
@media (max-width: 1000px) { .gal__masonry { columns: 2; } }
@media (max-width: 540px)  { .gal__masonry { columns: 1; } }

/* Full-width rows — sit between masonry chunks, no column-span needed */
.gi-pair,
.gi-wide {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  align-items: stretch;
}
.gi-pair .gi,
.gi-wide .gi {
  flex: 1;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}
.gi-pair .gi img,
.gi-wide .gi img {
  flex: 1;
  width: 100%;
  object-fit: cover;
  min-height: 0;
}

/* Gallery item */
.gi {
  break-inside: avoid;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
  background: #111218;  /* placeholder while image loads */

  /* stagger-in state */
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.65s var(--easeO),
    transform 0.65s var(--easeO);
}
.gi.in {
  opacity: 1;
  transform: none;
}


.gi img {
  width: 100%;
  display: block;
  transition: transform 0.85s var(--ease), filter 0.85s var(--ease);
  filter: brightness(0.9);
}
.gi:hover img {
  transform: scale(1.035);
  filter: brightness(1);
}
.gi:active img {
  transform: scale(0.99);
  filter: brightness(0.75);
  transition-duration: 0.1s;
}

.gi__over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem 1.1rem 1rem;
  background: linear-gradient(to top, rgba(4,4,10,0), rgba(4,4,10,0));
  transition: background 0.5s var(--ease);
}
.gi:hover .gi__over {
  background: linear-gradient(to top, rgba(4,4,10,0.55) 0%, transparent 55%);
}
.gi__info {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.gi:hover .gi__info { opacity: 1; transform: none; }
.gi__title {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1.3;
}
.gi__meta {
  display: block;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin-top: 0.2rem;
}

/* Gallery footer */
.gal__foot {
  flex-shrink: 0;
  padding: 1.25rem var(--pad);
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(244,242,237,0.2);
}
.gal__foot a {
  color: rgba(244,242,237,0.45);
  transition: color var(--tf);
}
.gal__foot a:hover { color: rgba(244,242,237,0.85); }

/* ─── ABOUT ───────────────────────────────────── */
.about {
  padding: clamp(6rem, 9vw, 11rem) 0;
  background: var(--ink);
  color: var(--paper);
}
.about__wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 38fr 62fr;
  gap: clamp(3rem, 7vw, 9rem);
  align-items: center;
}
.about__fig {
  overflow: hidden;
  max-width: 420px;
}
.about__fig img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 9s ease;
}
.about__fig:hover img { transform: scale(1.04); }

.about__txt .eyebrow { color: var(--bronze); }
.about__h {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 2rem;
}
.about__txt p {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(244,242,237,0.48);
  margin-bottom: 1rem;
}
.about__txt p:last-of-type { margin-bottom: 2.5rem; }

.btn-line {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 242, 237, 0.65);
  border-bottom: 1px solid rgba(244, 242, 237, 0.22);
  padding-bottom: 0.3rem;
  transition: color var(--tf), border-color var(--tf), opacity var(--tf);
}
.btn-line:hover  { color: var(--paper); border-color: rgba(244, 242, 237, 0.6); }
.btn-line:active { opacity: 0.55; }

/* ─── STATEMENT ───────────────────────────────── */
.stmt {
  padding: clamp(6rem, 10vw, 13rem) 0;
  background: var(--warm);
}
.stmt__wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--pad);
  text-align: center;
}
.stmt__wrap .eyebrow {
  color: var(--fog);
  margin-bottom: 3.5rem;
}
.stmt__q {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.6rem, 2.9vw, 2.5rem);
  line-height: 1.56;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 2.5rem;
}
.stmt__p {
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.95;
  color: var(--fog);
  max-width: 520px;
  margin: 0 auto;
}

/* ─── CONTACT ─────────────────────────────────── */
.contact {
  padding: clamp(6rem, 9vw, 11rem) 0;
  background: var(--paper);
}
.contact__wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3.5rem, 9vw, 11rem);
  align-items: start;
}
.contact__h {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 3.5vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.contact__p {
  font-size: 0.87rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--fog);
  margin-bottom: 2.5rem;
}
.contact__links {
  display: flex; flex-direction: column; gap: 0.65rem;
  margin-bottom: 2rem;
}
.contact__links a {
  font-size: 0.87rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid rgba(9,9,13,0.35);
  border-radius: 2px;
  padding: 0.55rem 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--tf), border-color var(--tf), background var(--tf);
}
.contact__links a:hover {
  color: var(--bronze);
  border-color: var(--bronze);
  background: rgba(9,9,13,0.03);
}
.contact__note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.87rem;
  color: var(--mist);
}

/* Form */
.contact__form { display: flex; flex-direction: column; gap: 1.65rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label {
  font-size: 0.57rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fog);
  transition: color var(--tf);
}
.field:focus-within label { color: var(--ink); }
.field input,
.field textarea,
.field select {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(9,9,13,0.1);
  padding: 0.65rem 0;
  outline: none;
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
  transition: border-color var(--tf);
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--ink); }
.field textarea { resize: none; line-height: 1.75; }
.field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a877f' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 1.5rem;
}
.btn-submit {
  align-self: flex-start;
  position: relative;
  overflow: hidden;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 0.9rem 2.25rem;
  transition: background var(--tf), opacity var(--tf), transform var(--tf);
}
.btn-submit:hover  { background: var(--ink-soft); }
.btn-submit:active { opacity: 0.65; transform: scale(0.98); }
.btn-submit__d {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #3b6b4e;
  transform: translateY(110%);
  transition: transform 0.4s var(--ease);
}
.btn-submit.sent .btn-submit__d { transform: none; }

/* ─── FOOTER ──────────────────────────────────── */
.footer {
  padding: clamp(3rem, 5vw, 5rem) var(--pad);
  background: var(--ink);
}
.footer__i {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}
.footer__name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 300;
  letter-spacing: 0.07em;
  color: var(--paper);
}
.footer__tag {
  font-size: 0.55rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244,242,237,0.18);
}
.footer__nav {
  display: flex;
  gap: 2.25rem;
  margin-top: 1.75rem;
}
.footer__nav a,
.footer__nav button {
  font-size: 0.57rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244,242,237,0.25);
  transition: color var(--tf);
}
.footer__nav a:hover,
.footer__nav button:hover { color: rgba(244,242,237,0.7); }
.footer__c {
  font-size: 0.54rem;
  color: rgba(244,242,237,0.1);
  margin-top: 2rem;
  letter-spacing: 0.05em;
}

/* ─── LIGHTBOX ────────────────────────────────── */
.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 3, 8, 0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s ease;
}
.lb.open {
  opacity: 1;
  pointer-events: all;
}
.lb__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5.5rem 6rem 1rem;
  width: 100%;
}
.lb__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.35s ease, transform 0.35s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.lb__img.in { opacity: 1; transform: none; }
.lb__cap {
  flex-shrink: 0;
  padding: 0 1rem 2.5rem;
  text-align: center;
}
.lb__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.1rem;
  color: rgba(244,242,237,0.8);
}
.lb__meta {
  font-size: 0.57rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,242,237,0.22);
  margin-top: 0.3rem;
}

.lb__x {
  position: fixed;
  top: 1.5rem; right: 1.75rem;
  color: rgba(255, 255, 255, 0.38);
  padding: 10px;
  transition: color var(--tf), transform var(--tf), opacity var(--tf);
}
.lb__x:hover  { color: rgba(255,255,255,0.9); transform: rotate(90deg); }
.lb__x:active { opacity: 0.5; }

.lb__prev,
.lb__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.28);
  padding: 1.25rem;
  transition: color var(--tf), transform var(--tf), opacity var(--tf);
}
.lb__prev { left: 1.25rem; }
.lb__next { right: 1.25rem; }
.lb__prev:hover  { color: rgba(255,255,255,0.75); transform: translateY(-50%) translateX(-4px); }
.lb__next:hover  { color: rgba(255,255,255,0.75); transform: translateY(-50%) translateX(4px); }
.lb__prev:active,
.lb__next:active { opacity: 0.45; }

/* ─── RESPONSIVE ──────────────────────────────── */
@media (max-width: 960px) {
  .nav__r { gap: 1.5rem; }
  .about__wrap { grid-template-columns: 1fr; gap: 3rem; }
  .about__fig { max-width: 320px; margin: 0 auto; }
  .contact__wrap { grid-template-columns: 1fr; gap: 3.5rem; }
}

@media (max-width: 768px) {
  .nav__r    { display: none; }
  .nav__burger { display: flex; }

  .hero__body { flex-direction: column; align-items: flex-start; gap: 2rem; }

  /* On mobile the gallery header stacks: wordmark + close on top row,
     filters on a second row below */
  .gal__head {
    height: auto;
    flex-wrap: wrap;
    row-gap: 0;
    padding: 0;
  }
  .gal__head-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad);
    height: 56px;
  }
  .gal__filters {
    /* Reset the absolute centering — become a full-width scroll row */
    position: static;
    transform: none;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.55rem var(--pad) 0.65rem;
    gap: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
  }
  .gal__filters::-webkit-scrollbar { display: none; }
  .gf { white-space: nowrap; flex-shrink: 0; }

  .lb__stage { padding: 5rem 2rem 1rem; }
  .lb__prev  { left: 0.25rem; }
  .lb__next  { right: 0.25rem; }
}

@media (max-width: 500px) {
  :root { --nav-h: 56px; --pad: 1.5rem; }
  .hero__name { font-size: clamp(4.5rem, 17vw, 6rem); }
  .footer__nav { gap: 1.25rem; }
}

/* ─── REDUCED MOTION ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .r { opacity: 1; transform: none; }
  .gi { opacity: 1; transform: none; }
}
