/* ════════════════════════════════════════════════
   cuandosalegta6.com — estética oficial GTA VI
   Atardecer de Leonida: púrpura → rosa → naranja → ámbar
   ════════════════════════════════════════════════ */

:root {
  --bg: #120821;
  --bg-deep: #0b0414;
  --ink: #f3eaff;
  --ink-dim: #b9a8d4;
  --pink: #f652b6;
  --magenta: #e043e8;
  --orange: #ff8a4c;
  --amber: #ffd36e;
  --violet: #7a3df0;
  --sunset: linear-gradient(100deg, var(--amber) 0%, var(--orange) 32%, var(--pink) 68%, var(--magenta) 100%);
  --sunset-v: linear-gradient(180deg, var(--amber) 0%, var(--orange) 45%, var(--pink) 100%);
  --font: "Archivo", system-ui, sans-serif;
  --rail-w: 160px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--pink); color: #fff; }

img { max-width: 100%; display: block; }

/* ── Grano de película ── */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9000;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0) } 10% { transform: translate(-5%,-10%) }
  20% { transform: translate(-15%,5%) } 30% { transform: translate(7%,-25%) }
  40% { transform: translate(-5%,25%) } 50% { transform: translate(-15%,10%) }
  60% { transform: translate(15%,0%) } 70% { transform: translate(0%,15%) }
  80% { transform: translate(3%,35%) } 90% { transform: translate(-10%,10%) }
}

/* ════════════ HERO ════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.25rem 5rem;
  isolation: isolate;
}

.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("../img/hero-bg.jpg") center 30% / cover no-repeat;
}

.hero-fade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(246, 82, 182, .28), transparent 55%),
    linear-gradient(180deg, rgba(11, 4, 20, .68) 0%, rgba(18, 8, 33, .55) 45%, var(--bg) 100%);
}

.hero-content { max-width: 920px; animation: heroIn 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(26px) } to { opacity: 1; transform: none } }

.hero-kicker {
  font-size: clamp(.72rem, 1.6vw, .9rem);
  font-weight: 600;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
  text-shadow: 0 2px 18px rgba(0,0,0,.6);
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4.2rem);
  font-weight: 800;
  font-stretch: 115%;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.05;
  text-shadow: 0 4px 30px rgba(0,0,0,.55);
}

.hero-title .gta6 {
  background: var(--sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(246, 82, 182, .45));
}

.hero-logo {
  width: clamp(120px, 18vw, 200px);
  height: auto;
  margin: 2rem auto 2.4rem;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,.6));
}

/* ── Contador ── */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(.4rem, 2vw, 1.4rem);
}

.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: clamp(58px, 12vw, 150px); }

.cd-num {
  font-size: clamp(2.6rem, 9.5vw, 6.8rem);
  font-weight: 850;
  font-stretch: 110%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--sunset-v);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 138, 76, .35)) drop-shadow(0 4px 14px rgba(0,0,0,.5));
}

.cd-sep {
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ink-dim);
  opacity: .55;
  padding-top: .1em;
}

.cd-label {
  margin-top: .55rem;
  font-size: clamp(.62rem, 1.4vw, .82rem);
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.countdown.released .cd-num { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { filter: drop-shadow(0 0 40px rgba(246,82,182,.8)) } }

.hero-date {
  margin-top: 2.4rem;
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.hero-platforms {
  margin-top: .6rem;
  font-size: clamp(.7rem, 1.6vw, .85rem);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ── Indicador de scroll ── */
.scroll-hint {
  position: absolute;
  bottom: 1.6rem; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 44px;
  border: 2px solid rgba(243, 234, 255, .4);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute; top: 7px; left: 50%;
  width: 4px; height: 9px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--amber);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(16px); opacity: 0 } 100% { opacity: 0 } }

/* ════════════ SECCIONES ════════════ */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) 1.25rem 0;
}
.section-wide { max-width: 1200px; }

.section-head { text-align: center; margin-bottom: clamp(1.8rem, 4vw, 3rem); }

.section-roman {
  display: inline-block;
  font-size: .85rem;
  font-weight: 800;
  font-stretch: 120%;
  letter-spacing: .3em;
  padding: .3rem .9rem .3rem 1.2rem;
  border: 1px solid rgba(246, 82, 182, .45);
  border-radius: 999px;
  color: var(--pink);
  margin-bottom: 1.1rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 4.4vw, 2.8rem);
  font-weight: 800;
  font-stretch: 115%;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: var(--sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
  margin: 0 auto;
}

.section-sub {
  margin-top: .7rem;
  color: var(--ink-dim);
  font-size: clamp(.9rem, 2vw, 1.02rem);
  max-width: 620px;
  margin-inline: auto;
}

/* ── Vídeos ── */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-deep);
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, .85), 0 0 0 1px rgba(246, 82, 182, .18);
  transition: box-shadow .35s ease, transform .35s ease;
}
.video-frame:hover { transform: translateY(-3px); box-shadow: 0 30px 80px -16px rgba(0,0,0,.9), 0 0 0 1px rgba(246, 82, 182, .5), 0 0 50px -8px rgba(246, 82, 182, .35); }
.video-frame img { width: 100%; height: 100%; object-fit: cover; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.play-btn {
  position: absolute; inset: 0;
  margin: auto;
  width: clamp(64px, 9vw, 88px); height: clamp(64px, 9vw, 88px);
  border: 0; border-radius: 50%;
  background: var(--sunset);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(246, 82, 182, .55);
  transition: transform .25s ease;
}
.video-frame:hover .play-btn { transform: scale(1.1); }
.play-btn svg { width: 44%; height: 44%; fill: #fff; margin-left: 6%; }

/* ── Galerías ── */
.filter-bar { display: flex; justify-content: center; gap: .6rem; margin-bottom: 2rem; flex-wrap: wrap; }

.filter-btn {
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid rgba(185, 168, 212, .3);
  border-radius: 999px;
  padding: .55rem 1.4rem;
  cursor: pointer;
  transition: all .25s ease;
}
.filter-btn:hover { color: var(--ink); border-color: var(--pink); }
.filter-btn.active {
  color: #fff;
  background: var(--sunset);
  border-color: transparent;
  box-shadow: 0 6px 24px -6px rgba(246, 82, 182, .6);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 14px;
}

.g-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 16 / 9;
  background: var(--bg-deep);
  transition: transform .3s ease, box-shadow .3s ease;
}
.g-item:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 16px 44px -10px rgba(0,0,0,.8), 0 0 0 1px rgba(246, 82, 182, .4); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.g-item:hover img { transform: scale(1.06); }

.g-item figcaption {
  position: absolute; inset: auto 0 0;
  padding: 1.6rem .8rem .6rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(11, 4, 20, .85));
  opacity: 0;
  transition: opacity .3s ease;
}
.g-item:hover figcaption { opacity: 1; }
.g-item.hidden { display: none; }
.g-item.page-hidden { display: none; }

/* Animación al cambiar de página */
.gallery-grid.page-anim { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: .15; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ── Paginador (solo escritorio) ── */
.gallery-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.7rem;
}

.pager-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(185, 168, 212, .3);
  background: transparent;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  padding-bottom: 4px;
  transition: background .25s ease, border-color .25s ease, opacity .25s ease;
}
.pager-btn:hover:not(:disabled) {
  background: var(--sunset);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 22px -6px rgba(246, 82, 182, .6);
}
.pager-btn:disabled { opacity: .25; cursor: default; }

.pager-count {
  min-width: 76px;
  text-align: center;
  font-size: .95rem;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: .18em;
  font-variant-numeric: tabular-nums;
  background: var(--sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Móvil: las galerías se convierten en carrusel horizontal con swipe ── */
@media (max-width: 700px) {
  .gallery-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    margin-inline: -1.25rem;
    padding: 0 1.25rem .8rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .gallery-grid::-webkit-scrollbar { display: none; }

  .g-item {
    flex: 0 0 80%;
    scroll-snap-align: center;
  }
  /* el caption siempre visible en táctil (no hay hover) */
  .g-item figcaption { opacity: 1; }

  .gallery-pager { display: none; }
}

/* ── Reveal al hacer scroll ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

/* ════════════ PUBLICIDAD ════════════ */
.ad-box {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(185, 168, 212, .25);
  border-radius: 8px;
  color: rgba(185, 168, 212, .45);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.8;
}

.ad-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: none;
}
.ad-rail-left { left: 14px; }
.ad-rail-right { right: 14px; }
.ad-160x600 { width: 160px; height: 600px; }

.ad-strip {
  display: flex;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem 0;
}
.ad-728x90 { width: min(728px, 100%); height: 90px; }

/* Los raíles solo aparecen cuando hay sitio de sobra */
@media (min-width: 1560px) {
  .ad-rail { display: block; }
}

/* ════════════ FOOTER ════════════ */
.footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 0 1.25rem clamp(2rem, 5vw, 3rem);
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(122, 61, 240, .08));
}

.footer-disclaimer {
  max-width: 720px;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  font-size: .78rem;
  color: var(--ink-dim);
  opacity: .8;
}

.footer-link { margin-top: 1rem; }
.footer-link a {
  color: var(--pink);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
}
.footer-link a:hover { color: var(--amber); }

/* ════════════ FAQ ════════════ */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  border: 1px solid rgba(185, 168, 212, .18);
  border-radius: 12px;
  background: rgba(122, 61, 240, .06);
  overflow: hidden;
  transition: border-color .25s ease;
}
.faq-item[open] { border-color: rgba(246, 82, 182, .5); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 3rem 1.05rem 1.3rem;
  font-weight: 700;
  font-stretch: 108%;
  font-size: clamp(.95rem, 2.2vw, 1.08rem);
  position: relative;
  transition: color .2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--amber); }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 300;
  background: var(--sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform .25s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-answer { padding: 0 1.3rem 1.2rem; color: var(--ink-dim); font-size: .95rem; }
.faq-answer strong { color: var(--ink); }

/* ════════════ AVISO DE COOKIES ════════════ */
.cookie-banner {
  position: fixed;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  z-index: 9400;
  width: min(680px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.2rem;
  background: rgba(18, 8, 33, .96);
  border: 1px solid rgba(246, 82, 182, .35);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: .78rem; color: var(--ink-dim); line-height: 1.5; }
.cookie-banner a { color: var(--pink); }
.cookie-banner button {
  flex-shrink: 0;
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--sunset);
  border: 0;
  border-radius: 999px;
  padding: .6rem 1.3rem;
  cursor: pointer;
}
.cookie-banner button:hover { filter: brightness(1.1); }

@media (max-width: 540px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ════════════ PÁGINA LEGAL ════════════ */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 1.25rem 4rem;
}
.legal-page h1 {
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  font-weight: 800;
  font-stretch: 115%;
  text-transform: uppercase;
  background: var(--sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: .4rem;
}
.legal-updated { font-size: .8rem; color: var(--ink-dim); margin-bottom: 2.2rem; }
.legal-page h2 {
  font-size: 1.05rem;
  font-weight: 700;
  font-stretch: 110%;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--amber);
  margin: 2rem 0 .6rem;
}
.legal-page p, .legal-page li { color: var(--ink-dim); font-size: .92rem; }
.legal-page p strong, .legal-page li strong { color: var(--ink); }
.legal-page ul { padding-left: 1.3rem; margin: .6rem 0; display: flex; flex-direction: column; gap: .6rem; }
.legal-page a { color: var(--pink); }
.legal-page a:hover { color: var(--amber); }
.legal-back, .legal-back-bottom a {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 2rem;
}
.legal-back-bottom { margin-top: 3rem; }

.footer-sep { margin: 0 .6rem; color: var(--ink-dim); }
.footer-link a { display: inline-block; }

/* ════════════ LIGHTBOX ════════════ */
.lightbox {
  position: fixed; inset: 0;
  z-index: 9500;
  background: rgba(11, 4, 20, .94);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox figure {
  max-width: min(92vw, 1500px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
}
.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0,0,0,.9);
}
.lightbox figcaption {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  z-index: 9600;
  border: 0;
  background: rgba(243, 234, 255, .08);
  color: var(--ink);
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s ease, color .2s ease;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--pink); color: #fff; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .lb-prev, .lb-next { width: 40px; height: 40px; bottom: 14px; top: auto; transform: none; }
  .lb-prev { left: calc(50% - 52px); }
  .lb-next { right: calc(50% - 52px); }
}

/* Accesibilidad: respetar reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
