:root {
  --orange: #f39200;
  --ink: #f4f0e8;
  --stage: #0a0a0a;
  --font-display: "Bangers", Impact, sans-serif;
  --font-body: "Cabin", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body.gate {
  min-height: 100vh;
  background: var(--stage);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* Destino (esp/eng) detrás de las cortinas */
.gate-reveal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
body.gate-open .gate-reveal {
  opacity: 1;
}

.gate-stage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(3.5rem, 10vw, 5.5rem) 1.25rem 2.5rem;
}

/* Cortinas */
.gate-cort {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
  transition: transform 1.15s cubic-bezier(0.45, 0.05, 0.25, 1);
  will-change: transform;
}

.gate-cort-top {
  top: -12px;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 5;
}

.gate-cort-l,
.gate-cort-r {
  top: 0;
  bottom: 0;
  height: 100%;
  width: 50%;
  object-fit: cover;
  z-index: 4;
}
.gate-cort-l {
  left: 0;
  object-position: left center;
}
.gate-cort-r {
  right: 0;
  object-position: right center;
  transform: scaleX(-1);
}

body.gate-open {
  overflow: hidden;
  pointer-events: none;
}
body.gate-open .gate-cort-top {
  transform: translateY(-120%);
}
body.gate-open .gate-cort-l {
  transform: translateX(-105%);
}
body.gate-open .gate-cort-r {
  transform: translateX(105%) scaleX(-1);
}
/* Fila: Esp | cartelera | Eng */
.gate-main {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 2.25rem);
  width: min(100%, 920px);
  animation: gate-rise 0.9s ease both;
  will-change: transform, opacity;
}

/* Al abrir: suben juntos (animación propia; la de entrada bloqueaba el transform) */
body.gate-open .gate-main {
  animation: gate-fly-up 1.15s cubic-bezier(0.45, 0.05, 0.25, 1) forwards;
}

.gate-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  flex: 0 1 auto;
}

.gate-logo {
  width: min(110px, 28vw);
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
  z-index: 2;
}

/* Marquesina con luces + poster */
.gate-marquee {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(145deg, #1a1208 0%, #0e0e12 55%, #16100a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 211, 106, 0.25),
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(243, 146, 0, 0.12);
  animation: gateSpotlight 4.5s ease-in-out infinite;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.gate-marquee:hover,
.gate-marquee:focus-visible {
  filter: brightness(1.06);
  outline: none;
}
@keyframes gateSpotlight {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(255, 211, 106, 0.25), 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 70px rgba(243, 146, 0, 0.1);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(255, 211, 106, 0.45), 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 110px rgba(243, 146, 0, 0.22);
  }
}
.gate-bulbs {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  z-index: 2;
}
.gate-bulb {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8e0, #ffd36a 45%, #c47a00 100%);
  box-shadow: 0 0 6px 2px rgba(255, 200, 80, 0.55);
  animation: gateBlink 0.9s ease-in-out infinite;
}
@keyframes gateBlink {
  0%, 100% { opacity: 1; filter: brightness(1.15); }
  50% { opacity: 0.35; filter: brightness(0.7); }
}
.gate-marquee-inner {
  position: relative;
  z-index: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #10141b;
  border: 1px solid rgba(255, 211, 106, 0.12);
}
.gate-poster {
  display: block;
  width: min(220px, 42vw);
  height: auto;
  aspect-ratio: 868 / 1093;
  object-fit: cover;
}
@media (min-width: 860px) {
  .gate-poster {
    width: min(260px, 28vw);
  }
}

.gate-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 7.5rem;
  padding: 0.75rem 1.2rem;
  border: 2px solid var(--orange);
  border-radius: 2px;
  background: linear-gradient(180deg, #ffb347 0%, var(--orange) 55%, #e07800 100%);
  color: #111;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 0 4px 0 #9a5200, 0 10px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.gate-lang:hover,
.gate-lang:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
  outline: none;
}
.gate-lang:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #9a5200, 0 6px 14px rgba(0, 0, 0, 0.3);
}

@keyframes gate-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gate-fly-up {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-120vh); }
}

@media (max-width: 640px) {
  .gate-main {
    flex-direction: column;
    gap: 1rem;
  }
  .gate-lang {
    order: 2;
    min-width: 9rem;
  }
  .gate-center {
    order: 1;
  }
  .gate-main .gate-lang:last-of-type {
    order: 3;
  }
}
