/* ============================================================
   SOUTHSTART 2026 — Festival Photo Gallery
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --ink: #111111;
  --ink-soft: #4a4a4a;
  --ink-muted: #8a8a8a;
  --rule: #eaeaea;
  --hero-bg: #0a0a0a;
  --serif: "Cormorant Garamond", "Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --max-w: 1500px;
  --gap-sm: 4px;
  --gap: 12px;
  --pad-x: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--pad-x);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.18em;
}
.brand-year {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
  margin-top: 4px;
}

.site-nav {
  display: flex;
  gap: 36px;
}
.site-nav a {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  transition: color 0.18s ease;
}
.site-nav a:hover,
.site-nav a.active { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: clamp(420px, 75vh, 720px);
  background: var(--hero-bg) center/cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 0 var(--pad-x);
  max-width: 1200px;
}
.hero-kicker {
  font-size: 11px;
  letter-spacing: 0.32em;
  opacity: 0.85;
  margin-bottom: 22px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 9vw, 130px);
  line-height: 1;
  letter-spacing: 0.005em;
  margin: 0;
}
.hero-meta {
  margin-top: 26px;
  font-size: 12px;
  letter-spacing: 0.22em;
}
.hero-meta .dot { padding: 0 14px; opacity: 0.6; }

/* ---------- Section ---------- */
.section {
  padding: clamp(60px, 9vw, 110px) var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-head {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.section-kicker {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.05;
  margin: 0;
}
.section-lede {
  margin-top: 18px;
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Day tiles ---------- */
.day-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 900px) {
  .day-tiles { grid-template-columns: 1fr; }
}
.day-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--hero-bg) center/cover no-repeat;
  overflow: hidden;
  color: #fff;
  transition: transform 0.4s ease;
}
.day-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.85) 100%);
  transition: opacity 0.3s ease;
}
.day-tile:hover { transform: scale(1.005); }
.day-tile:hover::after { opacity: 0.92; }
.day-tile .day-tile-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 32px;
  z-index: 1;
}
.day-tile-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.1;
  margin: 0 0 8px 0;
}
.day-tile-count {
  font-size: 11px;
  letter-spacing: 0.28em;
  opacity: 0.85;
}

/* ---------- Sub-album tiles ---------- */
.sub-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.sub-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--hero-bg) center/cover no-repeat;
  overflow: hidden;
  color: #fff;
}
.sub-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
}
.sub-tile-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 22px 24px;
  z-index: 1;
}
.sub-tile-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.1;
  margin: 0 0 6px 0;
}
.sub-tile-count {
  font-size: 11px;
  letter-spacing: 0.26em;
  opacity: 0.85;
}

/* ---------- Breadcrumb / page head ---------- */
.crumbs {
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--ink-muted);
  margin-bottom: 22px;
}
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { padding: 0 10px; opacity: 0.5; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 5vw, 48px);
}
.page-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  margin: 0;
}
.page-sub {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* ---------- Photo grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gap);
}
@media (max-width: 640px) {
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap-sm);
  }
}
.photo-cell {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #f1f1f1;
  overflow: hidden;
  cursor: zoom-in;
}
.photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.4s ease;
  opacity: 0;
}
.photo-cell img.loaded { opacity: 1; }
.photo-cell:hover img { transform: scale(1.04); }

/* ---------- Loading / empty ---------- */
.loading, .empty {
  padding: 120px var(--pad-x);
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: 0.18em;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-left { display: flex; gap: 20px; align-items: center; }
.footer-brand {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.18em;
}
.footer-tag {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--ink-soft);
}
.footer-right {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.96);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.lightbox[hidden] { display: none; }
.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px 0;
  min-height: 0;
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px 22px;
  color: #ddd;
  font-size: 12px;
  letter-spacing: 0.18em;
  gap: 16px;
  flex-wrap: wrap;
}
.lb-counter { font-variant-numeric: tabular-nums; opacity: 0.7; min-width: 80px; }
.lb-name { opacity: 0.85; flex: 1; text-align: center; word-break: break-all; }
.lb-download {
  border: 1px solid #555;
  padding: 8px 14px;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.22em;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lb-download:hover { background: #fff; color: #000; border-color: #fff; }
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease, background 0.2s ease;
  border-radius: 50%;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  opacity: 1;
  background: rgba(255,255,255,0.08);
}
.lb-close { top: 14px; right: 18px; font-size: 32px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lb-stage { padding: 50px 12px 0; }
  .lb-prev, .lb-next { width: 44px; height: 44px; }
  .lb-meta { padding: 14px 14px 18px; font-size: 11px; }
  .lb-name { width: 100%; text-align: center; order: 3; }
}

/* Skeleton shimmer for empty tiles */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.photo-cell.skeleton {
  background: linear-gradient(90deg, #f1f1f1 0px, #f8f8f8 200px, #f1f1f1 400px);
  background-size: 800px 100%;
  animation: shimmer 1.6s linear infinite;
}
