/* Shared gallery styles — dark, photography-first, with lightbox + drawer */

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

:root {
  --bg: #080807;
  --bg-elevated: #12110f;
  --text: #efe9dd;
  --muted: #aea698;
  --ash: #777066;
  --line: rgba(239, 233, 221, 0.1);
  --line-strong: rgba(239, 233, 221, 0.2);
  --accent: #c1884d;
  --accent-bright: #e0aa72;
  --accent-soft: rgba(193, 136, 77, 0.18);
  --page-max: 1280px;
  --page-gutter: clamp(1.75rem, 6vw, 4rem);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-ui: "Archivo", "Avenir Next", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-ui);
  color: var(--text);
  line-height: 1.5;
  background:
    radial-gradient(900px 480px at 12% -8%, #1c1914 0%, transparent 55%),
    radial-gradient(700px 420px at 100% 0%, #151310 0%, transparent 50%),
    linear-gradient(180deg, #0e0d0b 0%, var(--bg) 40%, #050504 100%);
  -webkit-font-smoothing: antialiased;
}

body.gallery-lock {
  /* Scroll position is preserved via position:fixed + top offset in overlay.js.
     Do not rely on overflow:hidden alone — iOS Safari jumps to top.
     Pinch zoom stays available. */
  overflow: hidden;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #170f07;
  text-decoration: none;
  font-size: 0.85rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.page {
  max-width: var(--page-max);
  width: min(var(--page-max), calc(100% - (2 * var(--page-gutter))));
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.75rem) 0 5rem;
}

/* —— Home page shell —— */

.page-home {
  padding: 0;
}

.page-home .home-main.page {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-left: 0;
  padding-right: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 7, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--page-max);
  width: min(var(--page-max), calc(100% - (2 * var(--page-gutter))));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__brand {
  color: var(--text);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.35;
  max-width: min(58vw, 18rem);
}

.site-header__desktop {
  display: none;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  justify-content: flex-end;
  max-width: min(62%, 52rem);
}

.site-header__desktop a,
.site-header__mobile a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.site-header__desktop a[aria-current="page"],
.site-header__desktop a:hover,
.site-header__desktop a:focus-visible,
.site-header__mobile a[aria-current="page"],
.site-header__mobile a:hover,
.site-header__mobile a:focus-visible {
  color: var(--text);
  outline: none;
}

.site-header__toggle {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.site-header__toggle-bars,
.site-header__toggle-bars::before,
.site-header__toggle-bars::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-header__toggle-bars::before,
.site-header__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-header__toggle-bars::before { top: -6px; }
.site-header__toggle-bars::after { top: 6px; }

.site-header__toggle.is-open .site-header__toggle-bars {
  background: transparent;
}

.site-header__toggle.is-open .site-header__toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.site-header__toggle.is-open .site-header__toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-header__panel {
  border-top: 1px solid var(--line);
  background: #0c0c0b;
}

.site-header__mobile {
  max-width: var(--page-max);
  width: min(var(--page-max), calc(100% - (2 * var(--page-gutter))));
  margin: 0 auto;
  display: grid;
  gap: 0;
  padding: 0.35rem 0 0.85rem;
}

.site-header__mobile a {
  display: block;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.site-header__mobile a:last-child {
  border-bottom: 0;
}

body.site-menu-open {
  overflow: hidden;
}

.page-with-header {
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
}

@media (min-width: 901px) {
  .site-header__desktop {
    display: flex;
  }

  .site-header__toggle,
  .site-header__panel {
    display: none !important;
  }

  .site-header__brand {
    max-width: none;
    white-space: nowrap;
  }
}

.site-footer {
  margin-top: auto;
  background: #050504;
  border-top: 1px solid var(--line);
  padding-block: clamp(2.75rem, 6vw, 4.5rem) 1.75rem;
}

.site-footer__inner {
  max-width: var(--page-max);
  width: min(var(--page-max), calc(100% - (2 * var(--page-gutter))));
  margin: 0 auto;
}

.site-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
  padding-bottom: clamp(2rem, 5vw, 3.25rem);
}

.site-footer__brand {
  margin: 0;
  flex: 0 1 auto;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.55rem);
  color: var(--text);
  line-height: 1.2;
  max-width: none;
}

.site-footer__brand-name {
  display: block;
  white-space: nowrap;
}

.site-footer__brand-place {
  display: block;
  margin-top: 0.4em;
  font-size: 0.72em;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.site-footer__links {
  display: flex;
  flex: 1 1 22rem;
  flex-wrap: wrap;
  gap: 0.7rem 1.35rem;
  justify-content: flex-end;
  align-content: flex-start;
  max-width: min(100%, 46rem);
  min-width: min(100%, 18rem);
}

.site-footer__links a {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--text);
  outline: none;
}

@media (max-width: 520px) {
  .site-footer__brand-name {
    white-space: normal;
  }

  .site-footer__links {
    justify-content: flex-start;
    max-width: none;
  }
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
  color: var(--ash);
}

/* Full-bleed hero */
.home-hero {
  position: relative;
  min-height: min(86vh, 920px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.home-hero__media,
.home-hero__overlay {
  position: absolute;
  inset: 0;
}

.home-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  filter: saturate(0.92) brightness(0.72);
}

.home-hero__overlay {
  background:
    linear-gradient(90deg, rgba(5, 5, 4, 0.9), rgba(5, 5, 4, 0.35) 52%, rgba(5, 5, 4, 0.08)),
    linear-gradient(0deg, rgba(5, 5, 4, 0.96), transparent 58%);
}

.home-hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--page-max);
  width: min(var(--page-max), calc(100% - (2 * var(--page-gutter))));
  margin: 0 auto;
  padding:
    clamp(6rem, 14vw, 11rem)
    0
    clamp(3rem, 7vw, 5.5rem);
}

.home-hero__copy {
  max-width: min(46rem, 100%);
}

.home-hero__kicker {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.home-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.2vw, 4.35rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: none;
  color: #fff;
  text-transform: none;
}

.home-hero__name {
  display: block;
  white-space: nowrap;
}

.home-hero__photo {
  display: block;
}

.home-hero__lead {
  margin: 1.25rem 0 0;
  max-width: 38rem;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  color: rgba(243, 241, 236, 0.9);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.home-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  transition: background 160ms ease, border-color 160ms ease;
}

.home-hero__cta--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #170f07;
}

.home-hero__cta:hover,
.home-hero__cta:focus-visible {
  border-color: var(--accent-bright);
  outline: none;
}

.home-hero__cta--primary:hover,
.home-hero__cta--primary:focus-visible {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
}

.home-hero__note {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}

/* Media recognition */
.home-proof {
  max-width: var(--page-max);
  width: min(var(--page-max), calc(100% - (2 * var(--page-gutter))));
  margin: 0 auto;
  padding: 1.25rem 0 0;
}

.home-proof__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1.25rem clamp(1.15rem, 2.5vw, 1.75rem);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.home-proof__inner p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.home-proof__inner strong {
  color: var(--text);
}

.home-proof__tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.home-proof__tags li {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.home-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.25rem, 4vw, 3.5rem);
  align-items: end;
  margin-bottom: 1.5rem;
  scroll-margin-top: 5.5rem;
}

.home-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.home-section-copy {
  margin: 0;
  max-width: 40ch;
  justify-self: end;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Recommendation */
.home-recommend {
  max-width: var(--page-max);
  width: min(var(--page-max), calc(100% - (2 * var(--page-gutter))));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 0 5rem;
}

.home-recommend__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.75rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 18% 28%, rgba(193, 136, 77, 0.14), transparent 32%),
    linear-gradient(135deg, #15130f, #0b0b0a);
}

.home-recommend__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  max-width: 12ch;
}

.home-recommend__copy {
  margin: 0.9rem 0 0;
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.7;
}

.home-recommend__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: min(100%, 280px);
}

@media (max-width: 900px) {
  .home-proof__inner,
  .home-section-head,
  .home-recommend__inner {
    grid-template-columns: 1fr;
  }

  .home-proof__tags,
  .home-section-copy,
  .home-recommend__actions {
    justify-content: flex-start;
    justify-self: start;
  }
}

@media (max-width: 650px) {
  .home-hero {
    min-height: 78vh;
  }

  .home-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-hero__name {
    white-space: normal;
  }

  .site-header__brand {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
  }

  .home-proof__tags li {
    white-space: normal;
  }
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 600;
}

h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 38rem;
  font-size: 1.02rem;
  line-height: 1.7;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  margin: 0 0 2.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--accent);
  outline: none;
}

.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.status {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
}

.status.error {
  border-color: #5a4038;
  background: #2a201c;
  color: #e8cfc6;
}

button.retry {
  margin-top: 0.85rem;
  appearance: none;
  border: 1px solid var(--line-strong);
  background: #2a2a2a;
  color: var(--text);
  border-radius: 2px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font: inherit;
}

button.retry:hover,
button.retry:focus-visible {
  border-color: var(--accent);
  outline: none;
}

/* —— Masonry gallery (orientation-aware, curated order preserved) —— */

.gallery-grid {
  columns: 1;
  column-gap: clamp(1.1rem, 2.4vw, 1.85rem);
}

@media (min-width: 720px) {
  .gallery-grid {
    columns: 2;
  }
}

@media (min-width: 1100px) {
  .gallery-grid {
    columns: 3;
  }
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 clamp(1.6rem, 3.2vw, 2.75rem);
  animation: gallery-rise 480ms ease both;
}

.gallery-item:nth-child(1) { animation-delay: 40ms; }
.gallery-item:nth-child(2) { animation-delay: 90ms; }
.gallery-item:nth-child(3) { animation-delay: 140ms; }
.gallery-item:nth-child(4) { animation-delay: 190ms; }
.gallery-item:nth-child(5) { animation-delay: 240ms; }
.gallery-item:nth-child(6) { animation-delay: 290ms; }

@keyframes gallery-rise {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item { animation: none; }
  .gallery-drawer,
  .gallery-lightbox,
  .gallery-scrim { transition: none !important; }
}

.gallery-item__figure {
  position: relative;
  margin: 0;
  /* Warm placeholder. A near-black empty layer reads as a failed tile while an image decodes. */
  background: #1c1a16;
  overflow: hidden;
  /* Real catalogue ratio via --art-ratio; orientation fallbacks below. */
  aspect-ratio: var(--art-ratio, 4 / 5);
}

.gallery-item__open {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  color: inherit;
}

.gallery-item__open:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: -3px;
}

.gallery-item--landscape .gallery-item__figure {
  aspect-ratio: var(--art-ratio, 16 / 10);
}

.gallery-item--square .gallery-item__figure {
  aspect-ratio: var(--art-ratio, 1);
}

.gallery-item--portrait .gallery-item__figure {
  aspect-ratio: var(--art-ratio, 4 / 5);
}

/* Featured leads: slightly taller presence without breaking masonry flow */
.gallery-item--lead .gallery-item__figure {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}


.gallery-item__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1c1a16;
  /*
    Do not filter, scale, or translate this image.
    Those effects promote a composited layer inside CSS columns. WebKit and
    Chromium can then paint the layer black on hover, which hides the photograph.
  */
}

.gallery-item__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 5, 4, 0.72), transparent 58%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-item__overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover .gallery-item__figure::after,
  .gallery-item:focus-within .gallery-item__figure::after {
    opacity: 1;
  }

  .gallery-item:hover .gallery-item__overlay,
  .gallery-item:focus-within .gallery-item__overlay {
    opacity: 1;
  }
}

.gallery-item:focus-within .gallery-item__figure::after,
.gallery-item:focus-within .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__figure.is-image-failed .gallery-item__image {
  visibility: hidden;
}

.gallery-item__figure.is-image-failed::before {
  content: "Image unavailable";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--ash);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.gallery-item__badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
}

.gallery-item__discover {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(18, 17, 15, 0.9);
  color: var(--text);
  padding: 9px 12px;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

.gallery-item__discover:hover,
.gallery-item__discover:focus-visible {
  border-color: var(--accent-bright);
  outline: none;
}

.gallery-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 0.1rem;
}

.gallery-item__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.gallery-item__category {
  margin: 0;
  color: var(--ash);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

@media (max-width: 650px), (hover: none) {
  .gallery-item__overlay {
    opacity: 1;
  }
  .gallery-item__figure::after {
    opacity: 0.35;
  }
}

/* —— Buttons —— */

.gallery-btn {
  min-height: 49px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.gallery-btn:hover,
.gallery-btn:focus-visible {
  border-color: var(--accent-bright);
  outline: none;
}

.gallery-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #170f07;
}

.gallery-btn--primary:hover,
.gallery-btn--primary:focus-visible {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
}

/* —— Scrim + drawer —— */

.gallery-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 3, 2, 0.84);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-scrim.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery-drawer {
  position: fixed;
  right: 0;
  top: 0;
  width: min(620px, 100%);
  max-width: 100%;
  height: 100dvh;
  z-index: 70;
  background: #12110f;
  border-left: 1px solid var(--line-strong);
  transform: translateX(100%);
  transition: transform 0.45s var(--ease-out);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gallery-drawer.is-open {
  transform: none;
}

.gallery-drawer__close {
  position: absolute;
  right: max(10px, env(safe-area-inset-right));
  top: max(10px, env(safe-area-inset-top));
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 8, 7, 0.7);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.gallery-drawer__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.gallery-drawer__image {
  flex: 0 1 auto;
  height: clamp(160px, 32vh, 300px);
  min-height: 140px;
  background: #0a0a09;
}

.gallery-drawer__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-drawer__body {
  padding: 18px 22px 12px;
}

.gallery-drawer__eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-drawer__body h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.5vw, 2.45rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 6px 0 8px;
}

.gallery-drawer__story {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-drawer__info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  column-gap: 40px;
  align-items: start;
  margin: 14px 0 0;
  background: transparent;
}

.gallery-drawer__info-rule {
  width: 1px;
  align-self: stretch;
  background: var(--line);
}

.gallery-drawer__info-col {
  background: transparent;
  padding: 14px 0;
  min-width: 0;
}

.gallery-drawer__info span {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ash);
  margin-bottom: 4px;
}

.gallery-drawer__info strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
}

.gallery-drawer__actions {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 12px 22px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #12110f;
}

.gallery-drawer__actions .gallery-btn {
  min-height: 44px;
}

/* —— Lightbox —— */

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: rgba(3, 3, 2, 0.97);
  display: flex;
  flex-direction: column;
  padding:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    0
    max(12px, env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox__main {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 4px;
}

.gallery-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.gallery-lightbox__image {
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
}

.gallery-lightbox__nav {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 42px;
  cursor: pointer;
  line-height: 1;
  padding: 12px;
  align-self: center;
}

.gallery-lightbox__nav:hover,
.gallery-lightbox__nav:focus-visible {
  color: var(--text);
  outline: none;
}

.gallery-lightbox__close {
  position: absolute;
  right: max(10px, env(safe-area-inset-right));
  top: max(8px, env(safe-area-inset-top));
  z-index: 3;
  width: 44px;
  height: 44px;
  appearance: none;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 30px;
  cursor: pointer;
}

.gallery-lightbox__footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 12px calc(18px + env(safe-area-inset-bottom, 0px));
}

.gallery-lightbox__caption {
  text-align: center;
  width: min(92%, 760px);
}

.gallery-lightbox__caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 500;
}

.gallery-lightbox__caption span {
  display: block;
  color: var(--ash);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 4px;
}

.gallery-lightbox__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(100%, 720px);
}

.gallery-lightbox__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  background: rgba(18, 17, 15, 0.7);
  padding: 4px;
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  width: 100%;
}

.gallery-lightbox__tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 9px 11px;
  font: inherit;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.gallery-lightbox__tabs button.is-active {
  background: #191714;
  color: var(--text);
}

.gallery-lightbox__wall-tab {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: rgba(18, 17, 15, 0.7);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  font: inherit;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  width: 100%;
}

.gallery-lightbox__wall-tab:hover,
.gallery-lightbox__wall-tab:focus-visible {
  background: var(--accent);
  color: #170f07;
  outline: none;
}

@media (max-width: 650px) {
  .gallery-lightbox {
    padding: 10px 8px 0;
  }

  .gallery-lightbox__main {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .gallery-lightbox__nav {
    font-size: 32px;
    padding: 6px;
  }

  .gallery-lightbox__tabs button {
    padding: 9px 8px;
    font-size: 0.55rem;
  }

  .gallery-drawer__image {
    height: clamp(140px, 28vh, 240px);
  }

  .gallery-drawer__info {
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  }

  .gallery-drawer__story {
    -webkit-line-clamp: 5;
  }
}
