/* variables y reset */
:root {
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Cormorant Garamond', serif;
  --bg-dark: #07161b;
  --bg-card: #0f4258;
  --text-light: #e8f4f8;
  --text-muted: #a3c3d9;
  --primary: #1282a2;
  --primary-light: #00a8cc;
  --radius-lg: 8px;
  --radius-sm: 4px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --maxw: 1600px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-light);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background-color: #000;
}

.hero__bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(to bottom, rgba(7, 22, 27, 0.45) 0%, rgba(7, 22, 27, 0.3) 40%, var(--bg-dark) 100%), url('../images/full/2.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.85;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero__kicker {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--primary-light);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-style: italic;
  color: var(--text-muted);
}

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 30px;
  height: 50px;
  border: 2px solid var(--text-muted);
  border-radius: 15px;
}
.hero__scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background-color: var(--text-light);
  border-radius: 50%;
  animation: scrollAnim 2s infinite;
}

@keyframes scrollAnim {
  0% { opacity: 0; transform: translateY(0); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(20px); }
}

/* Story Section */
.story {
  padding: clamp(4rem, 10vw, 8rem) 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.story__inner {
  max-width: 800px;
  margin: 0 auto;
}

.story__eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.story__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 2rem;
  font-weight: 500;
}

.story__body p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-align: justify;
}
.story__body strong {
  color: var(--text-light);
}

/* Gallery Section */
.gallery-section {
  padding: 0 0 6rem;
}

.gallery-section__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
}

.gallery-section__hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
  font-family: var(--font-serif);
}

/* MASONRY: Ladrillos en la pared (CSS Columns) */
.gallery {
  column-count: 4;
  column-gap: 1.25rem;
  padding: 0 1.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.gallery-item {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 1.25rem;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

.gallery-item:hover {
  box-shadow: 0 12px 35px rgba(0,0,0,0.55);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Footer */
.footer {
  padding: 4rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(163, 195, 217, 0.1);
  background-color: #040c0f;
}
.footer p {
  color: var(--text-muted);
}
.footer__small {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  opacity: 0.6;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(7, 22, 27, 0.98);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

.lightbox__close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1010;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(4px);
}
.lightbox__close:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg);
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  border-radius: 50%;
  backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.2s;
}
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox__nav--prev { left: 1.5rem; }
.lightbox__nav--next { right: 1.5rem; }
.lightbox__nav--prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox__nav--next:hover { transform: translateY(-50%) translateX(3px); }

.lightbox__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 5rem 5rem;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 100px rgba(0,0,0,0.7);
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__img.loaded {
  opacity: 1;
}

.lightbox__caption {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  text-align: center;
  width: 90%;
  max-width: 800px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.85);
  pointer-events: none;
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox__caption.loaded {
  opacity: 1;
}

.lightbox__bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  font-feature-settings: "tnum";
  backdrop-filter: blur(4px);
  z-index: 1001;
}
.lightbox__counter {
  font-size: 0.85rem;
  color: #fff;
}

/* Ajustes Responsive */
@media (max-width: 1200px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .gallery {
    column-count: 2;
    column-gap: 0.75rem;
    padding: 0 1rem;
  }
  .gallery-item {
    margin-bottom: 0.75rem;
  }
  .lightbox__stage {
    padding: 3rem 1rem 4rem;
  }
  .lightbox__nav {
    display: none;
  }
  .lightbox__close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .lightbox__bar {
    bottom: 1rem;
    padding: 0.4rem 1rem;
  }
  .lightbox__caption {
    bottom: 4.5rem;
    font-size: 0.95rem;
    width: 85%;
  }
}

@media (max-width: 480px) {
  .gallery {
    column-count: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
