/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --off-white: #f7f7f7;
  --gray-light: #e8e8e8;
  --gray-mid: #999;
  --gold: #c9a84c;
  --text: #0a0a0a;
  --transition: 0.2s ease;
  --nav-height: 68px;
}

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

body {
  background: var(--white);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Nav ────────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 200;
  border-bottom: 1px solid var(--gray-light);
}

.nav-logo {
  height: 36px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-mid);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--black); }

.nav-links .nav-cta {
  color: var(--black);
  border-bottom: 1px solid var(--black);
  padding-bottom: 1px;
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 80px 60px;
  margin-top: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../mateo-bg.jpg') center 30% / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.4) 50%,
    rgba(0,0,0,0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
}

.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(56px, 9vw, 110px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  max-width: 340px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--white);
  color: var(--black);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.hero-btn:hover {
  background: var(--gold);
  color: var(--white);
}

/* ─── Section Shared ─────────────────────────────────────────────────────────── */
.section-header {
  padding: 72px 48px 40px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-link {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-mid);
  border-bottom: 1px solid var(--gray-light);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}

.section-link:hover {
  color: var(--black);
  border-color: var(--black);
}

/* ─── Events Grid (Home + Gallery) ──────────────────────────────────────────── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 0 2px;
}

.event-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--black);
}

.event-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.event-card:hover .event-card-bg {
  transform: scale(1.05);
}

.event-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.1) 55%,
    transparent 100%
  );
}

.event-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
}

.event-card-name {
  font-family: 'Anton', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.1;
}

.event-card-meta {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-top: 6px;
}

/* ─── Gate (email wall) ──────────────────────────────────────────────────────── */
.gate-section {
  min-height: calc(100vh - var(--nav-height));
  margin-top: var(--nav-height);
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.gate-inner {
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.gate-logo {
  height: 48px;
  width: auto;
  margin: 0 auto 32px;
}

.gate-title {
  font-family: 'Anton', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.gate-sub {
  font-size: 0.875rem;
  color: var(--gray-mid);
  line-height: 1.6;
  margin-bottom: 36px;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gate-input {
  width: 100%;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--gray-light);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.gate-input::placeholder { color: var(--gray-mid); }
.gate-input:focus { border-color: var(--black); }

.gate-btn {
  width: 100%;
  padding: 16px;
  background: var(--black);
  color: var(--white);
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition);
}

.gate-btn:hover:not(:disabled) { background: #333; }
.gate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.gate-status {
  font-size: 0.85rem;
  min-height: 20px;
  margin-top: 4px;
}

.gate-status.error { color: #c0392b; }

.gate-disclaimer {
  margin-top: 16px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--gray-mid);
}

/* ─── Gallery Page ───────────────────────────────────────────────────────────── */
.gallery-page {
  margin-top: var(--nav-height);
}

.gallery-page-hero {
  position: relative;
  height: 320px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 40px 48px;
}

.gallery-page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.55);
}

.gallery-page-hero-title {
  position: relative;
  z-index: 1;
  font-family: 'Anton', sans-serif;
  font-size: clamp(48px, 7vw, 88px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}

.gallery-events-section {
  padding: 0;
}

/* ─── Event Photo View ───────────────────────────────────────────────────────── */
.event-photo-view {
  display: none;
  margin-top: var(--nav-height);
}

.event-photo-view.active {
  display: block;
}

.event-photo-header {
  padding: 40px 48px 32px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  gap: 24px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-mid);
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--transition);
}

.back-btn:hover { color: var(--black); }

.back-btn::before {
  content: '←';
  font-size: 1rem;
}

.event-photo-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(20px, 3vw, 32px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-photo-sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-top: 4px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 3px;
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--gray-light);
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

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

.photo-actions {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity var(--transition);
}

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

.expand-btn,
.download-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
  border-radius: 0;
}

.expand-btn:hover,
.download-btn:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

/* ─── Lightbox ───────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.94);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
}

#lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lightbox-controls {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

#lightbox-caption {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

#lightbox-download {
  padding: 8px 24px;
  background: var(--white);
  color: var(--black);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background var(--transition);
}

#lightbox-download:hover { background: var(--gray-light); }

#lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
}

#lightbox-close:hover { color: var(--white); }

/* ─── Home CTA Strip ─────────────────────────────────────────────────────────── */
.cta-strip {
  background: var(--black);
  padding: 80px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-strip-text h2 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.1;
}

.cta-strip-text p {
  margin-top: 10px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

.cta-form {
  display: flex;
  gap: 0;
  flex-shrink: 0;
}

.cta-input {
  padding: 16px 20px;
  width: 280px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-right: none;
  color: var(--white);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.cta-input::placeholder { color: rgba(255,255,255,0.3); }
.cta-input:focus {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.12);
}

.cta-submit {
  padding: 16px 28px;
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.cta-submit:hover:not(:disabled) {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.cta-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.cta-status {
  font-size: 0.8rem;
  margin-top: 10px;
  min-height: 18px;
}

.cta-status.error { color: #f87171; }
.cta-status.success { color: #4ade80; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: 'Anton', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-links a {
  color: rgba(255,255,255,0.4);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--white); }

.footer-ig {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  transition: border-color var(--transition), color var(--transition);
  text-decoration: none;
}

.footer-ig:hover {
  border-color: var(--white);
  color: var(--white);
}

/* ─── Empty State ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--gray-mid);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  grid-column: 1 / -1;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 0 24px; }
  .nav-links { gap: 24px; }
  .hero { padding: 60px 24px; }
  .section-header { padding: 48px 24px 28px; }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-strip { flex-direction: column; align-items: flex-start; padding: 60px 24px; }
  .cta-input { width: 100%; }
  .event-photo-header { padding: 24px; flex-wrap: wrap; }
  footer { padding: 32px 24px; flex-wrap: wrap; gap: 16px; }
  .gallery-page-hero { padding: 32px 24px; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .events-grid { grid-template-columns: 1fr; gap: 2px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 52px; }
  .cta-form { flex-direction: column; }
  .cta-input { border-right: 1px solid rgba(255,255,255,0.2); border-bottom: none; }
}
