@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,450;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #f7f1e7;
  --bg-elevated: #efe4d3;
  --ink: #362b22;
  --ink-on-dark: #f3ead9;
  --muted: #8a7660;
  --muted-on-dark: #cbb89e;
  --accent: #af7a44;
  --overlay: rgba(43, 32, 22, 0.92);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
}

a { color: inherit; }

/* ---------- Homepage ---------- */

.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.home h1 {
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.01em;
  margin: 0 0 40px;
}

.tabs {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  justify-content: center;
}

.tabs a {
  position: relative;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 6px;
  transition: color 0.2s ease;
}

.tabs a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.tabs a:hover,
.tabs a:focus-visible {
  color: var(--ink);
}

.tabs a:hover::after,
.tabs a:focus-visible::after {
  transform: scaleX(1);
}

/* ---------- Gallery grid ---------- */

.gallery-page {
  min-height: 100vh;
  padding: 56px 24px 80px;
}

.gallery-header {
  max-width: 1100px;
  margin: 0 auto 40px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.gallery-header h1 {
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin: 0;
}

.gallery-header a.back {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.gallery-header a.back:hover { color: var(--accent); }

.grid {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.grid-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 0;
  min-width: 0;
}

.grid button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(54, 43, 34, 0.14);
}

.grid img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
}

@media (max-width: 640px) {
  .grid { gap: 10px; }
  .grid-col { gap: 10px; }
}

.grid button:hover img,
.grid button:focus-visible img {
  transform: scale(1.035);
  filter: brightness(1.05);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 100;
  padding: 24px;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lb-stage {
  position: relative;
  max-width: min(1100px, 92vw);
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-stage img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.lb-stage img.show {
  opacity: 1;
  transform: scale(1);
}

.lb-info {
  max-width: 560px;
  text-align: center;
  margin-top: 22px;
}

.lb-location {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 4px;
}

.lb-date {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  margin: 0 0 16px;
}

.lb-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.lb-dots button {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(237, 235, 230, 0.28);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lb-dots button.active {
  background: var(--accent);
  transform: scale(1.3);
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: none;
  border: 0;
  color: var(--ink-on-dark);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover,
.lb-close:focus-visible,
.lb-prev:focus-visible,
.lb-next:focus-visible {
  opacity: 1;
}

.lb-close {
  top: 20px;
  right: 24px;
  font-size: 1.8rem;
  line-height: 1;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem;
  line-height: 1;
  padding: 8px 14px;
}

.lb-prev { left: 4px; }
.lb-next { right: 4px; }

@media (max-width: 640px) {
  .lb-prev, .lb-next { font-size: 1.8rem; padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
