/* ===== GALERÍA (página independiente) =====
   Reutiliza css/base.css (reset, tipografía, --accent). Todo lo demás
   vive acá porque esta página ya no depende del sistema de overlays
   de index.html. Sin lightbox: cada foto es un link directo a su
   página de caso en casos/. */

.gl-body {
  background: #0b0d0c;
}

/* ===== NAV ===== */
.gl-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 14px 28px;
  border-radius: 100px;
  background: rgba(17, 17, 17, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.gl-nav__brand {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: #ffffff;
  flex-shrink: 0;
}

.gl-nav__links {
  display: flex;
  gap: 22px;
}

.gl-nav__links a {
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.68);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.gl-nav__links a:hover,
.gl-nav__links a.is-active {
  color: #ffffff;
}

@media (max-width: 640px) {
  .gl-nav {
    gap: 18px;
    padding: 10px 18px;
    top: 14px;
  }
  .gl-nav__links {
    gap: 14px;
  }
  .gl-nav__links a {
    font-size: 0.76rem;
  }
}

/* ===== HERO ===== */
.gl-hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.gl-hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gl-hero__gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9, 12, 10, 0.15) 0%, rgba(9, 12, 10, 0.35) 55%, rgba(9, 12, 10, 0.82) 100%);
}

.gl-hero__eyebrow {
  position: absolute;
  left: 40px;
  bottom: 260px;
  z-index: 2;
  max-width: 320px;
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
}

.gl-hero__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.08em;
  z-index: 2;
  text-align: center;
  font-size: clamp(3.6rem, 15vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.85;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: none;
}

.gl-letter {
  display: inline-block;
  will-change: transform, opacity;
}

.gl-hero__scroll {
  position: absolute;
  right: 40px;
  bottom: 48px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.gl-hero__scroll span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.gl-hero__scroll i {
  display: block;
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.gl-hero__scroll i::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  animation: gl-scroll-cue 1.8s ease-in-out infinite;
}

@keyframes gl-scroll-cue {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

@media (max-width: 640px) {
  .gl-hero__eyebrow {
    left: 24px;
    bottom: 200px;
    font-size: 1rem;
    max-width: 260px;
  }
  .gl-hero__scroll {
    right: 24px;
    bottom: 32px;
  }
}

/* ===== SHOWCASE: foto de fondo + pinned horizontal scroll ===== */
.gl-showcase {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #0b0d0c;
}

.gl-showcase__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  filter: saturate(0.85) brightness(0.75);
  transform: scale(1.05);
}

.gl-showcase__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9, 12, 10, 0.35) 0%, rgba(9, 12, 10, 0.78) 100%);
}

.gl-showcase__intro {
  position: absolute;
  top: 96px;
  left: 40px;
  z-index: 3;
  max-width: 420px;
}

.gl-showcase__eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.gl-showcase__heading {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.gl-showcase__track {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
  padding: 0 8vw;
  will-change: transform;
}

.gl-slide {
  display: block;
  flex: 0 0 auto;
  width: min(58vw, 600px);
  height: 60vh;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #1a1c1a;
}

.gl-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gl-slide:hover img {
  transform: scale(1.045);
}

.gl-slide__grad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(0deg, rgba(9, 12, 10, 0.72) 0%, rgba(9, 12, 10, 0) 100%);
  pointer-events: none;
}

.gl-slide__label {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gl-showcase__progress {
  position: absolute;
  right: 40px;
  bottom: 60px;
  z-index: 3;
  width: 160px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.gl-showcase__progress-bar {
  height: 100%;
  width: 0%;
  background: #ffffff;
}

@media (max-width: 900px) {
  .gl-showcase__intro {
    top: 120px;
    left: 24px;
    max-width: 280px;
  }
  .gl-slide {
    width: 78vw;
    height: 50vh;
  }
  .gl-showcase__progress {
    display: none;
  }
}

/* Sin animación (accesibilidad): el track se vuelve un scroll horizontal
   nativo en vez de depender del pin + scrub de GSAP. */
.no-motion .gl-showcase {
  height: auto;
  padding: 120px 0;
}

.no-motion .gl-showcase__track {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  height: auto;
  padding: 0 8vw 24px;
}

.no-motion .gl-slide {
  height: 56vh;
}

/* ===== CTA final — vuelve al tono claro del resto del sitio ===== */
.gl-cta {
  position: relative;
  z-index: 2;
  background: #ffffff;
  text-align: center;
  padding: 140px 40px;
}

.gl-cta__eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
}

.gl-cta__heading {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 700;
  color: #111111;
  letter-spacing: -0.01em;
  max-width: 640px;
  margin: 0 auto 36px;
}

.gl-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 100px;
  background: #111111;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.98rem;
  transition: background 0.25s ease;
}

.gl-cta__btn:hover {
  background: var(--accent);
}

.gl-cta__nav {
  max-width: 720px;
  margin: 72px auto 0;
  padding: 0;
  text-align: left;
}

@media (max-width: 440px) {
  .gl-nav { width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px 12px; }
  .gl-nav__links { width: 100%; justify-content: space-between; gap: 8px; }
  .gl-nav__links a { padding: 5px 0; }
}

/* Controles discretos, disponibles también en pantallas táctiles. */
.gl-controls:not([hidden]) {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 4; display: flex; align-items: center; gap: 16px;
  padding: 8px; border: 1px solid #ffffff30; border-radius: 100px;
  background: #111b; color: white; backdrop-filter: blur(10px);
}
.gl-controls button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff40;
  background: transparent; color: inherit; font-size: 1.3rem; cursor: pointer;
}
.gl-controls button:hover:not(:disabled) { background: #ffffff25; }
.gl-controls button:disabled { opacity: .3; cursor: default; }
.gl-controls__counter { font-size: .85rem; font-variant-numeric: tabular-nums; min-width: 60px; text-align: center; }
.no-motion .gl-showcase { padding-top: 240px; padding-bottom: 120px; }
.gl-slide__label { white-space: normal; }
@media (max-height: 600px) {
  .gl-showcase__intro { top: 90px; }
  .gl-showcase__heading { font-size: 1.1rem; }
  .gl-showcase__track { padding-top: 110px; padding-bottom: 90px; }
  .gl-slide { height: 42vh; }
  .gl-controls:not([hidden]) { bottom: 10px; }
}
@media (min-width: 901px) and (min-height: 601px) {
  body:not(.no-motion) .gl-showcase__track { padding-top: 64px; }
}
.gl-body { overflow-x: clip; }
