/* Studio 604 — full gallery page (shared look with homepage) */
:root {
  --bg-deep: #0a0a0a;
  --bg-card: #111111;
  --text-primary: #f5f0eb;
  --text-secondary: #a09890;
  --text-muted: #6b6560;
  --accent: #c8a87c;
  --accent-light: #e8d5b8;
  --border: rgba(200,168,124,0.12);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Outfit', sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --header-height: 72px;
  --radius: 4px;
  --shadow-soft: 0 4px 30px rgba(0,0,0,0.4);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body.gallery-page {
  font-family: var(--sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
}

/* Nav */
.gallery-page .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 60px);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-brand span { color: var(--accent); font-weight: 500; }

.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent); }

.nav-links a.nav-current { color: var(--accent); }

.nav-cta {
  padding: 10px 28px !important;
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.2em !important;
  text-decoration: none;
  text-transform: uppercase;
  transition: all var(--transition) !important;
}
.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--bg-deep) !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}
.hamburger span {
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    justify-content: center;
    padding: 60px 40px;
    transition: right 0.5s ease;
    border-left: 1px solid var(--border);
  }
  .nav-links.open { right: 0; }
}

/* Main */
.gallery-page-main {
  padding: clamp(48px, 8vw, 88px) clamp(24px, 5vw, 48px) clamp(80px, 12vw, 120px);
}

.page-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.page-header .section-tag {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 16px;
}

.page-header h1 em {
  font-style: italic;
  color: var(--accent);
}

.page-header p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.65;
}

.page-header a {
  color: var(--accent);
  text-decoration: none;
}
.page-header a:hover { text-decoration: underline; }

.divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 20px auto 0;
}

/* Grid — same cell style as homepage */
.full-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto;
  --gal-aspect: 4 / 5;
  --gal-fit: cover;
  --gal-pos: center center;
}

@media (min-width: 560px) {
  .full-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 880px) {
  .full-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (min-width: 1200px) {
  .full-gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-item {
  position: relative;
  aspect-ratio: var(--gal-aspect, 4 / 5);
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: var(--gal-fit, cover);
  object-position: var(--gal-pos, center center);
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img { transform: scale(1.03); }

.gallery-caption {
  position: absolute;
  inset: 0;
  top: auto;
  padding: 28px 16px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 35%, rgba(0,0,0,0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.gallery-caption h4 {
  font-family: var(--serif);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.gallery-caption p {
  font-size: 0.65rem;
  color: var(--accent-light);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.9;
}

.gallery-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 420px;
  margin: 48px auto;
  line-height: 1.7;
}

.gallery-count {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Footer */
.gallery-footer {
  padding: 40px clamp(24px, 5vw, 48px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.gallery-footer-brand {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.1em;
}
.gallery-footer-brand span { color: var(--accent); }

.gallery-footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item img { transition: none; }
  .gallery-item:hover img { transform: none; }
}

/* Lightbox (full gallery page) */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(6, 6, 6, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-inner {
  position: relative;
  width: 100%;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lightbox-inner img {
  max-width: 100%;
  max-height: calc(92vh - 120px);
  max-height: calc(92dvh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.65);
}
.lightbox-caption {
  margin-top: 16px;
  text-align: center;
  max-width: 640px;
}
.lightbox-caption h4 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-primary);
}
.lightbox-caption p {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-top: 6px;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--accent);
  color: var(--bg-deep);
}
.lightbox-close {
  top: -8px;
  right: 0;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .lightbox-nav { width: 38px; height: 38px; font-size: 1.2rem; }
  .lightbox-prev { left: -4px; }
  .lightbox-next { right: -4px; }
}
