/* =========================================================
   SOUTHSTART 2026 Gallery
   Pixieset-inspired clean editorial layout
   ========================================================= */

:root {
  --c-bg: #ffffff;
  --c-fg: #1a1a1a;
  --c-muted: #6b6b6b;
  --c-line: #e8e8e8;
  --c-overlay: rgba(0, 0, 0, 0.55);
  --c-tile-overlay: rgba(0, 0, 0, 0.0);
  --c-tile-overlay-hover: rgba(0, 0, 0, 0.35);
  --c-accent: #1a1a1a;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max: 1440px;
  --gutter: 28px;
  --gutter-sm: 16px;
  --transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--c-bg);
  color: var(--c-fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }

/* ===== Password gate ===== */
.gate {
  position: fixed; inset: 0;
  background: var(--c-bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 40px 20px;
}
.gate-card { max-width: 420px; width: 100%; text-align: center; }
.gate-title { font-family: var(--serif); font-weight: 400; font-size: 42px; letter-spacing: 0.04em; margin: 0 0 6px; }
.gate-sub { font-family: var(--sans); font-weight: 300; letter-spacing: 0.18em; text-transform: uppercase; font-size: 11px; color: var(--c-muted); margin: 0 0 36px; }
.gate-prompt { color: var(--c-muted); font-size: 14px; margin: 0 0 20px; }
.gate-form { display: flex; flex-direction: column; gap: 12px; }
.gate-form input {
  padding: 14px 16px;
  border: 1px solid var(--c-line);
  border-radius: 0;
  font-family: var(--sans); font-size: 14px;
  background: transparent;
  color: var(--c-fg);
  outline: none;
  transition: border-color var(--transition);
}
.gate-form input:focus { border-color: var(--c-fg); }
.gate-form button {
  padding: 14px 16px;
  background: var(--c-fg); color: #fff;
  border: none; border-radius: 0;
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  transition: background var(--transition);
}
.gate-form button:hover { background: #000; }
.gate-error { color: #c54343; font-size: 13px; margin-top: 14px; }

/* ===== Top nav ===== */
.topnav {
  position: sticky; top: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--c-line);
  z-index: 50;
}
.topnav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; flex-direction: column; align-items: flex-start;
  line-height: 1;
}
.brand-mark { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: 0.18em; }
.brand-year { font-family: var(--sans); font-weight: 300; font-size: 10px; letter-spacing: 0.32em; color: var(--c-muted); margin-top: 4px; }
.nav-links { display: flex; gap: 28px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-muted); }
.nav-links a { transition: color var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--c-fg); }

/* ===== Breadcrumb ===== */
.crumbs {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter) 0;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--c-muted);
}
.crumbs a { color: var(--c-muted); transition: color var(--transition); }
.crumbs a:hover { color: var(--c-fg); }
.crumbs .sep { margin: 0 12px; opacity: 0.5; }
.crumbs .current { color: var(--c-fg); }

/* ===== Page sections ===== */
main { min-height: 60vh; }

.section { max-width: var(--max); margin: 0 auto; padding: 60px var(--gutter); }
.section-narrow { max-width: 880px; margin: 0 auto; padding: 60px var(--gutter); text-align: center; }

.eyebrow { font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--c-muted); margin-bottom: 14px; }
.h-display { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 6vw, 76px); line-height: 1.05; margin: 0 0 20px; letter-spacing: -0.005em; }
.h-section { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; margin: 0 0 12px; }
.h-album { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3vw, 38px); margin: 0 0 8px; }
.subline { color: var(--c-muted); font-size: 14px; max-width: 620px; margin: 0 auto; }

/* ===== Hero (homepage) ===== */
.hero {
  position: relative;
  width: 100%;
  height: clamp(420px, 70vh, 760px);
  overflow: hidden;
  background: #111;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.0) 35%, rgba(0,0,0,0.55) 100%); }
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 60px var(--gutter);
  color: #fff;
  text-align: center;
}
.hero-eyebrow { font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; opacity: 0.85; margin-bottom: 14px; }
.hero-title { font-family: var(--serif); font-weight: 300; font-size: clamp(46px, 8vw, 96px); line-height: 1; margin: 0; letter-spacing: 0.02em; }
.hero-sub { margin-top: 18px; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.85; }

/* ===== Date / album tile grid ===== */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1a1a1a;
}
.tile-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms ease, opacity 600ms ease;
  opacity: 0;
}
.tile-img.loaded { opacity: 1; }
.tile:hover .tile-img { transform: scale(1.04); }
.tile-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 50%, rgba(0,0,0,0.55) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px 24px;
  color: #fff;
  transition: background var(--transition);
}
.tile:hover .tile-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.0) 30%, rgba(0,0,0,0.7) 100%); }
.tile-title { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 4px; }
.tile-meta { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.9; }

/* Larger date-level tiles */
.tile-grid.dates { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 32px; }
.tile-grid.dates .tile { aspect-ratio: 3 / 2; }
.tile-grid.dates .tile-title { font-size: 32px; }

/* ===== Photo masonry grid ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  grid-auto-rows: 1px;
  grid-auto-flow: dense;
}
.photo-cell {
  position: relative;
  background: #ededed;
  cursor: pointer;
  overflow: hidden;
  break-inside: avoid;
}
.photo-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 350ms ease, transform 600ms ease;
  opacity: 0;
}
.photo-cell img.loaded { opacity: 1; }
.photo-cell:hover img { transform: scale(1.03); }

@media (max-width: 700px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px; }
  .tile-grid { gap: 16px; }
  .tile-grid.dates { gap: 18px; }
  .crumbs { padding-top: 14px; font-size: 10px; }
  .nav-links { gap: 16px; font-size: 11px; }
}

/* ===== Loading & empty states ===== */
.loading { text-align: center; padding: 80px 20px; color: var(--c-muted); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.empty { text-align: center; padding: 80px 20px; color: var(--c-muted); }

/* ===== Footer ===== */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--c-line);
  padding: 40px 0;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.footer-brand { font-family: var(--serif); font-weight: 400; font-size: 17px; letter-spacing: 0.16em; margin-right: 16px; }
.footer-meta, .footer-credit { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-muted); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 15, 15, 0.97);
  z-index: 200;
  display: flex; flex-direction: column;
}
.lightbox[hidden] { display: none; }
.lb-stage {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 80px 24px;
  overflow: hidden;
}
.lb-stage img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: opacity var(--transition);
  opacity: 0.72;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close {
  top: 18px; right: 22px;
  font-size: 38px; line-height: 1;
  width: 44px; height: 44px;
}
.lb-prev, .lb-next {
  top: 50%; transform: translateY(-50%);
  font-size: 56px; line-height: 1;
  width: 60px; height: 60px;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px 24px;
  color: rgba(255,255,255,0.85);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
}
.lb-counter { font-feature-settings: "tnum"; }
.lb-actions { display: flex; gap: 16px; }
.lb-btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.4);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: #fff;
  transition: all var(--transition);
  cursor: pointer;
}
.lb-btn:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

@media (max-width: 700px) {
  .lb-stage { padding: 36px 12px 12px; }
  .lb-prev, .lb-next { font-size: 40px; width: 44px; height: 44px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-bar { padding: 12px 16px 18px; font-size: 10px; letter-spacing: 0.14em; }
  .lb-btn { padding: 8px 14px; font-size: 10px; }
}

/* ===== Page enter animation ===== */
.fade-in { animation: fadeIn 360ms ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
