/* ══════════════════════════════════════════
   Mark Lee Photography — Shared Styles
   ══════════════════════════════════════════ */

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

/* ── VARIABLES ── */
:root {
  --bg: #080807;
  --surface: #0f0f0e;
  --text: #ddd8cf;
  --text-dim: #8a8580;
  --accent: #b89a6a;
  --border: rgba(255,255,255,0.07);
}

/* ── BASE ── */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Karla', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(8,8,7,0.95) 0%, transparent 100%);
}

.nav-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s ease, gap 0.3s ease;
}

.nav-back::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.nav-back:hover {
  color: var(--text);
  gap: 16px;
}

.nav-back:hover::before {
  width: 32px;
}

.nav-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── SERIES HEADER (gallery pages hero) ── */
.series-header {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 48px 80px;
  position: relative;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.series-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,7,0.88) 0%, rgba(8,8,7,0.3) 45%, rgba(8,8,7,0.5) 100%);
  pointer-events: none;
}

.series-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.1s forwards;
  position: relative;
  z-index: 1;
}

.series-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.25s forwards;
  position: relative;
  z-index: 1;
}

.series-meta {
  display: flex;
  gap: 48px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.45s forwards;
  position: relative;
  z-index: 1;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-label {
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.meta-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--text);
}

/* ── GALLERY ── */
.gallery {
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr));
  gap: 4px;
  opacity: 0;
  animation: fadeIn 1s ease 0.6s forwards;
}

.photo {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 3/2;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.6s ease;
  filter: brightness(0.9) saturate(0.85);
}

.photo:hover img {
  transform: scale(1.04);
  filter: brightness(1) saturate(0.95);
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(221,216,207,0.7);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.photo:hover .photo-caption {
  opacity: 1;
}

/* ── FOOTER ── */
footer {
  padding: 60px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer-copy {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  opacity: 0.5;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── GALLERY CLICKABLE ── */
.gallery .photo {
  cursor: pointer;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0.4s;
}

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

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 7, 0.94);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 80px 80px 120px;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  display: block;
  filter: none;
  transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox-img.is-transitioning {
  opacity: 0;
  transform: scale(0.97);
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 40px;
  z-index: 3;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.lightbox-close:hover {
  color: var(--text);
  transform: scale(1.15);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px;
  color: var(--text-dim);
  transition: color 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--accent);
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 20px;
  height: 36px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev.is-hidden,
.lightbox-next.is-hidden {
  display: none;
}

.lightbox-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 28px 48px;
  pointer-events: none;
}

.lightbox-caption {
  font-family: 'Karla', sans-serif;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.lightbox-counter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 24px 28px; }
  footer {
    padding: 44px 28px;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .lightbox-content { padding: 72px 60px 110px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-footer { padding: 24px 28px; }
}

@media (max-width: 700px) {
  nav { padding: 24px 24px; }
  .series-header { min-height: 100vh; padding: 0 24px 60px; }
  .gallery { grid-template-columns: 1fr; }
  footer { padding: 44px 24px; }
  .lightbox-content { padding: 60px 16px 100px; }
  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 58px;
    transform: none;
  }
  .lightbox-prev { left: 24px; }
  .lightbox-next { right: 24px; }
  .lightbox-close { top: 20px; right: 20px; }
  .lightbox-footer { padding: 20px 24px; }
  .lightbox-img { max-height: calc(100vh - 180px); }
}
