/* ============================================
   SECTIONS 
   - HERO      : .hero-section        primera pantalla, imagen de fondo completa
   - STORY     : .story-section       "La Historia", imagen + texto
   - GALLERY   : .gallery-section, .gallery-lightbox   carrusel + ver imagen en grande
   - GAMEPLAY  : .gameplay-section    las 3 tarjetas de gameplay
   - TRAILER   : .trailer-section     sección del tráiler de YouTube
   - WISHLIST  : .wishlist-section    botón de wishlist + plataformas + widget de Steam
       (.demo-section comparte estas mismas reglas — es la sección
       "Demo", oculta con .is-hidden hasta que haya demo jugable)
   - PRESSKIT  : .presskit-section    franja discreta de prensa (oculta con .is-hidden)
   - TEAM      : .team-section        sección roja del equipo
   ============================================ */
section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ================== HERO ==================*/
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 72px 80px;
  overflow: hidden;

  /* PLACEHOLDER: imagen actual de la muñeca como fondo provisional */
  background-image: url('../img/screenshots/LS_paquitaCabeza1.0086-escalado.jpeg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}

/* Capa oscura encima de la imagen para que el texto sea legible. */
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(7,7,10,0.95) 0%, rgba(7,7,10,0.5) 40%, rgba(7,7,10,0.2) 100%),
    linear-gradient(to right, rgba(7,7,10,0.7) 0%, transparent 60%);
  z-index: 0;
}

/* Todo el contenido visible (título, texto, botones) va encima de la capa */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px; /* texto limitado a la izquierda, no ocupa todo el ancho */
  margin-left: auto; 
  margin-right: auto; 
}

/* El título "PORCELANA" grande. */
.game-title {
  font-family: var(--font-title);
  font-size: clamp(52px, 8vw, 100px);
  font-weight: 500;
  line-height: 1;
  color: var(--cream);
  position: relative;
}

/* ================== STORY ==================*/
.story-section {
  position: relative;
  font-family: var(--font-ui);
  background-color: var(--surface);
  background-image: url('../img/wallpaper/Wallpaper_8_Color.png');
  background-repeat: repeat;
  background-size: 500px;
  background-blend-mode: screen;
  background-attachment: fixed;
}
.story-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--vignette); 
  z-index: 0;
}

.story-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vh, 80px);
  align-items: center;
}
.story-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border);
  display: block;
}
.story-text {
  background: var(--surface-alpha);
  border: 1px solid var(--border);
  padding: clamp(20px, 4vh, 35px);
}
.story-desc { color: var(--muted); margin-bottom: 16px; font-size: 20px; }

/* Pantallas bajas de altura (notebooks a 100% de zoom, celular en horizontal)*/
@media (max-height: 820px) {
  .story-image { aspect-ratio: 4/3; }
}

/* ================== GALLERY ================== */
.gallery-section { overflow: hidden; padding-bottom: 60px; }
.gallery-inner { width: 100%; max-width: var(--content-width); margin: 0 auto; }
.gallery-header { margin-bottom: 40px; }

/* Carrusel: track con scroll-snap (un slide grande a la vez) + flechas
   a los costados que simplemente mueven el scroll un slide completo. */
.gallery-carousel {
  display: flex; align-items: center; gap: 16px;
}
.gallery-track {
  display: flex; gap: 20px;
  overflow: hidden; scroll-snap-type: x mandatory;
}
.gallery-card {
  flex: 0 0 100%; aspect-ratio: 16/9;
  scroll-snap-align: center;
  overflow: hidden;
  cursor: pointer; position: relative;
}
.gallery-arrow {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.gallery-arrow:hover { border-color: var(--gold); color: var(--cream); }
.gallery-card img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  filter: brightness(0.85);
  transition: transform 0.5s ease, filter 0.3s ease;
}
.gallery-card:hover img { transform: scale(1.08); filter: brightness(1.0); }
.gallery-caption {
  position: absolute; 
  bottom: 0; 
  left: 0; 
  right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  font-family: var(--font-ui); 
  font-size: 10px; 
  letter-spacing: 2px;
  color: var(--gold-dim);
  opacity: 0; 
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
}
.gallery-card:hover .gallery-caption { opacity: 1; transform: translateY(0); }

/* Lightbox de la galería: ver una imagen en grande a pantalla completa. */
.gallery-lightbox {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(5,4,8,0.96);
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--lightbox-fade) ease, visibility 0s linear var(--lightbox-fade);
}
/* .open hace la transición inversa (visibility pasa a "visible" de
   inmediato, sin el delay) para que el fade de entrada se note. */
.gallery-lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--lightbox-fade) ease, visibility 0s linear 0s;
}
.gallery-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.96);
  transition: transform var(--lightbox-fade) ease, opacity var(--lightbox-fade) ease;
}
.gallery-lightbox.open .gallery-lightbox-img { transform: scale(1); }

.gallery-lightbox-img.switching { opacity: 0; transform: scale(0.98); }
.gallery-lightbox-close,
.gallery-lightbox-arrow {
  position: absolute;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.gallery-lightbox-close:hover,
.gallery-lightbox-arrow:hover { border-color: var(--gold); color: var(--cream); }
.gallery-lightbox-close {
  top: 24px;
  right: 24px;
  width: 44px; height: 44px;
  font-size: 18px;
}
.gallery-lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  font-size: 20px;
}
.gallery-lightbox-prev { left: 24px; }
.gallery-lightbox-next { right: 24px; }

@media (max-width: 768px) {
  .gallery-lightbox-arrow { width: 44px; height: 44px; }
  .gallery-lightbox-prev { left: 12px; }
  .gallery-lightbox-next { right: 12px; }
  .gallery-lightbox-close { top: 12px; right: 12px; }
}

/* ================== GAMEPLAY ================== */
.gameplay-inner { width: 100%; max-width: var(--content-width); margin: 0 auto; }
.gameplay-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 2px; margin-top: 60px;
}
.gameplay-card {
  background: var(--surface-alpha); padding: 0 0 48px 0;
  border-top: 2px solid transparent;
  transition: border-color 0.3s;
  overflow: hidden;
}
.gameplay-card:hover { border-color: var(--red); }

/* Imagen pequeña arriba de cada tarjeta */
.card-img-wrap {
  width: 100%; aspect-ratio: 16/9;
  overflow: hidden; margin-bottom: 32px;
}
.card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.6) saturate(0.7);
  transition: filter 0.3s;
}
.gameplay-card:hover .card-img { filter: brightness(0.8) saturate(0.9); }

/* Numeral romano grande semitransparente */
.card-number {
  font-family: var(--font-ui); 
  font-size: 36px; 
  font-weight: 900;
  color: var(--red-logo); 
  line-height: 1;
  margin: 0 36px 16px;
}
.card-title {
  font-family: var(--font-title); 
  font-size: 24px; 
  letter-spacing: 1px;
  color: var(--text); 
  margin: 0 36px 12px; 
  font-weight: 500;
}
.card-desc { 
  font-family: var(--font-ui);
  font-size: 20px; 
  color: var(--muted); 
  line-height: 1.7; 
  margin: 0 36px; }

.gameplay-section {
  position: relative;
  background-color: #050508;
  background-image: url('../img/wallpaper/T_wall02_BaseColor.PNG');
  background-repeat: repeat;
  background-size: 500px;
  background-blend-mode: screen;
  background-attachment: fixed;
}
.gameplay-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--vignette); 
  z-index: 0;
}
.gameplay-section .gameplay-inner {
  position: relative;
  z-index: 1;
}

/* ================== TRAILER ==================*/
.trailer-section { background: var(--bg); }
.trailer-inner {
  width: 100%;
  max-width: clamp(1100px, 80vw, 1500px);
  margin: 0 auto; }

/* El contenedor del video mantiene proporción 16:9 */
.trailer-wrap {
  margin-top: 48px;
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--border);
}
.trailer-wrap iframe {
  position: absolute; 
  inset: 0;
  width: 100%; 
  height: 100%;
  border: none;
}

/* ================== WISHLIST ================== */
.wishlist-section,
.demo-section {
  position: relative;
  text-align: center;
  padding: 120px 24px;
  overflow: hidden;

  background-image: url('../img/wallpaper/Wallpaper_4_2_Color.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
/* Capa oscura encima de la foto para que el texto siga siendo legible,
   igual que en Hero/Story/Gameplay. */
.wishlist-section::before,
.demo-section::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Viñeteado: centro transparente (se ve la foto de fondo con
     claridad) y se oscurece hacia los bordes. */
  background: radial-gradient(ellipse 50% 70% at 50% 50%, transparent 0%, rgba(5,4,8,0.98) 100%);
  z-index: 0;
}
/* Todo el contenido (texto, plataformas, widget de Steam) va encima
   de la capa oscura — son hijos directos de la sección, no hay un
   wrapper "-inner" como en otras secciones. */
.wishlist-section > *,
.demo-section > * {
  position: relative;
  z-index: 1;
}
.wishlist-section .section-title,
.demo-section .section-title { margin-bottom: 12px; }
/* Tarjeta que agrupa descripción + plataformas (+ widget de Steam en
   Wishlist), igual estilo que .gameplay-card / .story-text (fondo
   --surface + borde), para que destaque sobre la foto de fondo. */
.wishlist-card,
.demo-card {
  background: var(--surface-alpha);
  border: 1px solid var(--border);
  max-width: 700px;
  margin: 0 auto;
  padding: 48px;
}
.wishlist-desc,
.demo-desc {
  font-family: var(--font-ui);
  font-size: 20px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
/* Logos de plataformas debajo del botón */
.platforms { margin-top: 56px; }
.platforms-label {
  font-family: var(--font-ui); 
  font-size: 10px; 
  letter-spacing: 4px;
  color: var(--muted); 
  text-transform: uppercase; 
  margin-bottom: 28px;
}
.platforms-list {
  display: flex; 
  justify-content: center; 
  align-items: center;
  gap: 56px; 
  flex-wrap: wrap;
}
.platform-item {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 10px;
  color: var(--muted); 
  text-decoration: none;
  transition: color 0.2s, 
  transform 0.2s;
}
.platform-item:hover { color: var(--gold); transform: translateY(-3px); }
.platform-icon { font-size: 36px; width: auto; height: auto; }
.platform-item span {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 2px;
}

/* El widget de Steam dentro de la tarjeta de Wishlist. */
.steam-widget-wrap {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.steam-widget {
  max-width: 100%;
  border: 1px solid var(--border);
}

/* ================== PRESSKIT ==================*/
.presskit-section {
  min-height: auto; 
  background: #0b0b0e;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 48px;
}
.presskit-inner {
  width: 100%;
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.presskit-text { flex: 1 1 420px; min-width: 0; }
.presskit-title {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--cream);
  margin-bottom: 8px;
}
.presskit-desc { 
  font-family: var(--font-ui); 
  font-size: 20px; 
  letter-spacing: 1px;
  color: var(--muted); 
  max-width: 520px; 
}
.presskit-btn { 
  font-family: var(--font-title); 
  font-size: 22px; 
  white-space: nowrap; 
  flex: 0 0 auto;
}

/* ================== TEAM ================== */
.team-section {
  position: relative;
  background: #AA0000;
  text-align: center; padding: 100px 24px;
  overflow: hidden;
}
/* Capa oscura encima del rojo plano */
.team-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--vignette);
  z-index: 0;
}
.team-section > * {
  position: relative;
  z-index: 1;
}
/* Dos columnas: a la izquierda el logo del estudio + intro + redes,
   a la derecha las tarjetas del equipo. En mobile se apilan (ver
   media query más abajo). */
.team-inner {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  text-align: center;
}
.team-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.team-section .section-label { color: rgba(200,176,138,0.7); }
.team-section .section-title { color: #fff; margin-bottom: 16px; }
.team-intro {
  font-family: var(--font-ui);
  margin-bottom: 32px;
  font-size: 21px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
}
.team-logo {
  height: clamp(180px, 20vw, 260px);
  width: auto;
  max-width: 100%;
  margin-bottom: 40px;
}
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px;
  max-width: 502px;
  margin: 0 auto;
}
.team-member { flex: 0 0 150px; text-align: center; }
/* Círculo con la imagen placeholder (img/team/Cabeza.png) —
   reemplazar el src por la foto real de cada miembro cuando esté lista. */
.team-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  margin: 0 auto 20px;
  background: rgba(0,0,0,0.4);
  overflow: hidden;
}
.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-name {
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}
.team-role {
  font-family: var(--font-ui);
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}
.team-studio-btn {
  font-family: var(--font-ui);
  font-size: 20px;
  letter-spacing: 3px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 12px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  display: inline-block;
  margin-bottom: 24px;
}
.team-studio-btn:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.team-socials { display: flex; justify-content: center; gap: 16px; }
.social-btn {
  width: 40px; 
  height: 40px; 
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; 
  align-items: center; 
  justify-content: center;
  text-decoration: none; 
  color: #fff; 
  font-size: 14px;
  transition: background 0.2s;
}
.social-btn:hover { background: rgba(255,255,255,0.25); }

/* ================== RESPONSIVE MOBILE ================== */
@media (max-width: 768px) {
  .hero-section { padding: 0 24px 60px; }
  .hero-inner { max-width: 100%; }
  .story-inner { grid-template-columns: 1fr; gap: 40px; }
  .gameplay-grid { grid-template-columns: 1fr; gap: 2px; }
  .presskit-section { padding: 32px 24px; }
  .presskit-inner { flex-direction: column; align-items: flex-start; }
  .presskit-text { flex: 0 0 auto; width: 100%; }
  .presskit-title { font-size: 21px; }
  .presskit-desc { font-size: 17px; }
  .presskit-btn {
    font-size: 15px;
    letter-spacing: 2px;
    padding: 12px 20px;
    width: 100%;
    justify-content: center;
  }
  .team-inner { grid-template-columns: 1fr; }
  .team-grid { gap: 32px; max-width: 100%; }
  .team-member { flex: 0 0 calc(50% - 16px); }
  .platforms-list { gap: 32px; }

  /* iOS Safari renderiza mal (o de plano no soporta bien)
     background-attachment:fixed - se desactiva en mobile. */
  .hero-section,
  .story-section,
  .gameplay-section,
  .wishlist-section,
  .demo-section { background-attachment: scroll; }
}

/* ================== ACCESIBILIDAD ==================
   Para usuarios con "reducir movimiento" activado en su sistema,
   se apagan todas las animaciones. No necesitan tocarlo. */
@media (prefers-reduced-motion: reduce) {
  .gallery-card img { transition: none; }
}

