/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  --bg-0:       #080808;
  --bg-1:       #111111;
  --bg-2:       #1a1a1a;
  --bg-3:       #242424;
  --accent:     #c9a96e;
  --accent-dim: #9c7e4e;
  --text-1:     #f0f0f0;
  --text-2:     #a0a0a0;
  --text-3:     #5a5a5a;
  --border:     #222222;

  --radius-sm:  4px;
  --radius:     8px;
  --transition: 0.3s ease;
  --max-w:      1440px;
  --gap:        6px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity var(--transition);
}
.logo:hover { opacity: 0.8; }

.logo-icon {
  font-size: 20px;
  color: var(--accent);
  line-height: 1;
}

.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-1);
}

.main-nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color var(--transition);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-1);
  border-bottom-color: var(--accent);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 90vh;
  min-height: 500px;
  background: var(--bg-1) center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.25) 50%,
    rgba(0,0,0,0.75) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 48px 64px;
}

.hero-title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-1);
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 8px;
}

/* ── Main content ─────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 56px 24px;
}

/* ── Section header ───────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  font-size: 28px;
  color: var(--text-1);
}

.album-count {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.05em;
}

/* ── Albums grid ──────────────────────────────────────────────────────────── */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px;
}

.album-card {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  cursor: pointer;
}

.album-card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.album-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.album-card:hover .album-card-img {
  transform: scale(1.06);
}

.album-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity var(--transition);
}

.album-card:hover .album-card-overlay {
  opacity: 1;
}

.album-card-count {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.4);
  padding: 3px 8px;
  border-radius: 2px;
}

.album-card-info {
  padding: 16px 18px 20px;
  border-top: 1px solid var(--border);
  transition: background var(--transition);
}

.album-card:hover .album-card-info {
  background: var(--bg-2);
}

.album-card-title {
  font-size: 18px;
  color: var(--text-1);
  margin-bottom: 4px;
}

.album-card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Album page header ────────────────────────────────────────────────────── */
.album-header {
  position: relative;
  height: 42vh;
  min-height: 280px;
  background: var(--bg-1) center / cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.album-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.7) 100%
  );
}

.album-header-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 40px 36px;
}

.album-header-content h1 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.album-header-content p {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 6px;
}

.album-header-content span {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Breadcrumb ───────────────────────────────────────────────────────────── */
.breadcrumb {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a {
  color: var(--text-2);
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--accent); }

.breadcrumb-sep { color: var(--text-3); }

/* ── Photo grid (masonry) ─────────────────────────────────────────────────── */
.photo-grid {
  columns: 4 240px;
  column-gap: var(--gap);
}

.photo-item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-1);
  display: block;
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-item:hover img {
  transform: scale(1.04);
}

.photo-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  opacity: 0;
  transition: opacity var(--transition);
}

.photo-item:hover .photo-item-overlay {
  opacity: 1;
}

.photo-item-title {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-1);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

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

.lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  gap: 14px;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(90vh - 60px);
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 8px 60px rgba(0,0,0,0.8);
}

.lightbox-img.is-loaded { opacity: 1; }

.lightbox-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 4px;
}

.lightbox-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  color: var(--text-1);
  letter-spacing: 0.04em;
}

.lightbox-counter {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.08em;
}

/* Lightbox controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  z-index: 2;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-1);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  line-height: 1;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.14);
}

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

.lightbox-prev {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  font-size: 28px;
}
.lightbox-prev:hover { transform: translateY(-50%) scale(1.1); }

.lightbox-next {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  font-size: 28px;
}
.lightbox-next:hover { transform: translateY(-50%) scale(1.1); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}

/* ── Error state ──────────────────────────────────────────────────────────── */
.error-state {
  padding: 80px 24px;
  text-align: center;
  color: var(--text-2);
  font-size: 16px;
}
.error-state a { color: var(--accent); }
.error-state a:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .photo-grid { columns: 3 180px; }
  .albums-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .hero-content { padding: 0 24px 48px; }
}

@media (max-width: 600px) {
  .logo-text { font-size: 16px; }
  .main-nav { gap: 16px; }
  .hero { height: 70vh; }
  .hero-content { padding: 0 20px 36px; }
  .photo-grid { columns: 2 140px; }
  .albums-grid { grid-template-columns: 1fr 1fr; gap: 2px; }
  .main-content { padding: 32px 16px; }
  .album-header-content { padding: 0 20px 24px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (max-width: 400px) {
  .photo-grid { columns: 1; }
  .albums-grid { grid-template-columns: 1fr; }
}
