/* ===================== HALFTONE HERO ===================== */
.halftone-hero {
  position: relative;
  height: 82vh;
  min-height: 680px;
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 90px;
  overflow: hidden;
  cursor: crosshair;
  border-bottom: 1px solid var(--line);
}
.halftone-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(241, 236, 226, 0.16) 1.4px,
    transparent 1.4px
  );
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(
    ellipse 70% 70% at 50% 50%,
    #000 40%,
    transparent 90%
  );
  mask-image: radial-gradient(
    ellipse 70% 70% at 50% 50%,
    #000 40%,
    transparent 90%
  );
}
.halftone-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 5vw;
  pointer-events: none;
}
.halftone-copy h1 {
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 18px;
}
.halftone-sub {
  margin: 22px auto 0;
  max-width: 520px;
  color: var(--bone-dim);
  font-size: 1rem;
}
.mobile-only {
  display: none;
}
.fall-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.fall-item {
  position: absolute;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fallFade 2s ease forwards;
  will-change: transform, opacity;
}
.fall-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes fallFade {
  0% {
    opacity: 0;
    transform: translateY(-16px) rotate(var(--rot, 0deg)) scale(0.92);
  }
  12% {
    opacity: 1;
    transform: translateY(0) rotate(var(--rot, 0deg)) scale(1);
  }
  78% {
    opacity: 1;
    transform: translateY(18px) rotate(var(--rot, 0deg)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(34px) rotate(var(--rot, 0deg)) scale(0.96);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fall-item {
    animation: none;
    opacity: 0;
  }
}

@media (max-width: 820px) {
  .halftone-hero {
    height: 62vh;
    min-height: 380px;
  }
  .mobile-only {
    display: inline;
  }
}

/* ===================== GALLERY SECTION ===================== */
.gallery-section {
  padding: 60px 5vw 120px;
  max-width: var(--container);
  margin: 0 auto;
}

/* ---- chips ---- */
.chip-row-wrap {
  max-width: 1100px;
  margin: 0 auto 48px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chip-row-wrap::-webkit-scrollbar {
  display: none;
}
.chip-row {
  display: flex;
  gap: 10px;
  width: max-content;
  padding: 4px 2px;
}
.chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--bone-dim);
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.chip:hover,
.chip:focus-visible {
  border-color: var(--gold);
  color: var(--bone);
  outline: none;
}
.chip.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 500;
}

/* ---- masonry grid ---- */
.masonry-grid {
  max-width: 1200px;
  margin: 0 auto;
  columns: 4 260px;
  column-gap: 20px;
  opacity: 1 !important;
  transform: none !important;
}
@media (max-width: 1100px) {
  .masonry-grid {
    columns: 3 220px;
  }
}
@media (max-width: 720px) {
  .masonry-grid {
    columns: 2 160px;
    column-gap: 12px;
  }
}
@media (max-width: 440px) {
  .masonry-grid {
    columns: 1;
  }
}

.g-card {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-soft);
  opacity: 0;
  transform: translateY(14px);
  animation: cardIn 0.5s ease forwards;
  transition: border-color 0.25s ease;
}
.g-card:hover {
  border-color: var(--gold);
}
@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.g-card.hidden {
  display: none;
}
.g-card img {
  display: block;
  width: 100%;
  height: auto;
}
.g-card .g-body {
  padding: 14px 16px 16px;
}
.g-card .g-cat {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
}
.g-card .g-title {
  font-size: 0.92rem;
  margin-top: 6px;
  color: var(--bone);
}

/* ---- empty / placeholder card ---- */
.g-card.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: repeating-linear-gradient(
    135deg,
    var(--ink-soft),
    var(--ink-soft) 10px,
    var(--ink) 10px,
    var(--ink) 20px
  );
  border-style: dashed;
}
.g-card.placeholder .g-body {
  text-align: center;
  padding: 24px 18px;
}
.g-card.placeholder .g-cat {
  color: var(--gold);
}
.g-card.placeholder .g-title {
  color: var(--bone-dim);
  font-size: 0.84rem;
  margin-top: 8px;
}

/* ===================== IMAGE LIGHTBOX ===================== */

.g-card:not(.placeholder) {
  cursor: zoom-in;
}

/* Overlay */
.lightbox {
  position: fixed;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 40px;

  background: rgba(0, 0, 0, 0.92);

  opacity: 0;
  visibility: hidden;

  z-index: 9999;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

/* Full image */
.lightbox img {
  display: block;

  max-width: 90vw;
  max-height: 80vh;

  width: auto;
  height: auto;

  object-fit: contain;

  border-radius: 8px;

  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);

  transform: scale(0.95);

  transition: transform 0.3s ease;
}

.lightbox.open img {
  transform: scale(1);
}

/* Image title */
#lightboxTitle {
  max-width: 800px;

  margin-top: 18px;

  text-align: center;

  color: var(--bone);
  font-size: 0.9rem;
}

/* Close button */
.lightbox-close {
  position: absolute;

  top: 24px;
  right: 30px;

  width: 48px;
  height: 48px;

  border: 1px solid var(--line);
  border-radius: 50%;

  background: var(--ink-soft);

  color: var(--bone);

  font-size: 2rem;
  line-height: 1;

  cursor: pointer;

  transition: 0.2s ease;
}

.lightbox-close:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

@media (max-width: 720px) {
  .lightbox {
    padding: 20px;
  }

  .lightbox img {
    max-width: 95vw;
    max-height: 80vh;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
  }
}