/* ── Variables ── */
:root {
  --background: #282922;
  --foreground: #93585e;
  --muted-foreground: #a9cc8b;
  --secondary: #f2cfcd;
  --font-heading: "Cormorant Garamond", serif;
  --font-body: "Montserrat", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── MAIN ── */
main {
  padding: 8rem 1.5rem 5rem;
}

@media (min-width: 768px) {
  main {
    padding: 10rem 3rem 5rem;
  }
}

/* ── SECTION HEADING ── */
.section-heading {
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-heading.in-view {
  opacity: 1;
  transform: translateY(0);
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1;
}

.section-heading p {
  max-width: 28rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted-foreground);
}

/* ── FILTER BUTTONS ── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--foreground);
  cursor: pointer;
  padding-bottom: 0.25rem;
  opacity: 0.4;
  transition:
    opacity 0.3s ease,
    border-color 0.3s ease;
}

.filter-btn:hover {
  opacity: 0.7;
}

.filter-btn.active {
  opacity: 1;
  border-bottom-color: var(--foreground);
}

/* ── GALLERY GRID ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    gap: 1rem;
  }
}

/* Grid span classes */
.span-6 {
  grid-column: span 6;
}
.span-12 {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .md-span-4 {
    grid-column: span 4;
  }
  .md-span-8 {
    grid-column: span 8;
  }
  .md-span-5 {
    grid-column: span 5;
  }
  .md-span-7 {
    grid-column: span 7;
  }
  .md-span-6 {
    grid-column: span 6;
  }
  .md-span-3 {
    grid-column: span 3;
  }
}

/* Gallery item */
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.gallery-item.in-view {
  opacity: 1;
  transform: scale(1);
}
.gallery-item.hidden {
  display: none;
}

.gallery-item__inner {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

@media (min-width: 768px) {
  .gallery-item__inner {
    aspect-ratio: unset;
    height: 45vh;
  }
}

@media (min-width: 1024px) {
  .gallery-item__inner {
    height: 55vh;
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition:
    filter 0.7s ease,
    transform 0.7s ease;
  display: block;
}

.gallery-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(240, 237, 232, 0);
  transition: background 0.5s ease;
}

.gallery-item:hover .gallery-item__overlay {
  background: rgba(240, 237, 232, 0.1);
}

.gallery-item__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gallery-item:hover .gallery-item__info {
  opacity: 1;
}

.gallery-item__title {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  font-size: 0.875rem;
  color: var(--background);
}

.gallery-item__cat {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(10, 10, 10, 0.6);
  margin-top: 0.25rem;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(240, 237, 232, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

@media (min-width: 768px) {
  .lightbox {
    padding: 3rem;
  }
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(10, 10, 10, 0.6);
  transition: color 0.2s ease;
  line-height: 0;
  padding: 0.25rem;
}

.lightbox__close:hover {
  color: var(--background);
}

.lightbox__close svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.lightbox__content {
  max-width: 64rem;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  transform: scale(0.9);
  opacity: 0;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

.lightbox.open .lightbox__content {
  transform: scale(1);
  opacity: 1;
}

.lightbox__img {
  max-height: 70vh;
  width: auto;
  object-fit: contain;
  display: block;
}

.lightbox__caption {
  margin-top: 2rem;
  text-align: center;
}

.lightbox__caption-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--background);
}

.lightbox__caption-cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(10, 10, 10, 0.4);
  margin-top: 0.5rem;
}

/* NAV (same behavior as About page) */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: all 0.5s ease;
}

.site-nav.scrolled {
  background: rgba(250, 249, 249, 0.021);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(253, 250, 245, 0.041);
}

.nav-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 24px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  opacity: 0.6;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
}

/* MOBILE NAV */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--foreground);
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--background);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 1100;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.site-footer {
  border-top: 1px solid rgba(240, 237, 232, 0.08);

  margin-top: 8rem;
  padding: 6rem 1.5rem 0rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-left: 10%;
  gap: 3rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 2rem;

  margin-bottom: 1rem;
}

.footer-text {
  color: var(--muted-foreground);
  max-width: 260px;
  line-height: 1.7;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-title {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;

  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(240, 237, 232, 0.05);

  margin-top: 5rem;
  padding: 2rem;

  display: flex;
  justify-content: space-between;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }
}
