/* styles.css */
:root {
  --color-dark: #0a0a0a;
  --color-medium: #1a1a1a;
  --color-light: #f5f5f5;
  --color-accent: #ffffff; /* Gris/Blanco documental */
  --font-serif: 'NYT Cheltenham', 'Playfair Display', serif;
  --font-sans: 'Montserrat', sans-serif;
}


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

body {
  background-color: var(--color-dark);
  color: var(--color-light);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

/* Header & Progreso */
#main-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  padding: 1.5rem 2rem;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}
.logo {
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}
nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  transition: color 0.3s;
}
nav a:hover {
  color: var(--color-accent);
}
#progress-container {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 4px;
  z-index: 1001;
}
#progress-bar {
  height: 100%;
  background: var(--color-accent);
  width: 0%;
}

/* Fullscreen Parallax Panels */
.parallax-panel {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  padding: 4rem 0; /* Espacio para contenido extra si desborda */
}
.overlay-full {
  position: absolute; top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.5); z-index: 1;
}
.overlay-gradient-left {
  position: absolute; top:0; left:0; width:100%; height:100%;
  background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%); z-index: 1;
}
.overlay-gradient-right {
  position: absolute; top:0; left:0; width:100%; height:100%;
  background: linear-gradient(to left, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%); z-index: 1;
}

.transition-screen {
  background-color: #000;
  min-height: 100vh;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.transition-screen .text-box {
  max-width: 1200px;
}

/* Alineación de Contenido */
.align-left { justify-content: flex-start; }
.align-right { justify-content: flex-end; }
.align-center { justify-content: center; text-align: center; }

/* Text Boxes */
.text-box, .portada-content, .conclusion {
  position: relative;
  z-index: 2;
  padding: 3rem;
  max-width: 700px;
}
.align-left .text-box { margin-left: 5%; }
.align-right .text-box { margin-right: 5%; }

/* Tipografía */
.tag {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}
h1 { font-family: var(--font-serif); font-size: 5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
h2 { font-family: var(--font-serif); font-size: 3rem; font-weight: 700; margin-bottom: 1.5rem; color: var(--color-accent); }
h3 { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 700; margin-top: 2rem; margin-bottom: 1rem; }
p { font-size: 1.15rem; line-height: 1.8; color: #ddd; margin-bottom: 1.5rem; }
.subtitle { font-size: 1.5rem; font-family: var(--font-serif); font-weight: 700; opacity: 0.9; margin-bottom: 2rem;}

ul.stats-list li {
  font-size: 1.2rem; margin-bottom: 1rem; border-left: 3px solid var(--color-accent); padding-left: 1rem;
}

/* Botones */
.btn-primary {
  display: inline-block; padding: 1rem 2rem; background: var(--color-accent); color: #fff;
  text-decoration: none; text-transform: uppercase; font-weight: bold; letter-spacing: 1px;
  transition: transform 0.3s;
}
.btn-primary:hover { transform: translateY(-3px); }

/* Animación para el indicador de scroll */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(10px); }
  60% { transform: translateY(5px); }
}

/* Tarjetas Portada en Grande (Scroll) */
.big-cards-grid {
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  grid-template-rows: 60vh;
  width: 100vw; 
  height: 60vh;
  margin: 0; padding: 0;
}
.big-card {
  position: relative; 
  cursor: pointer; 
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.big-card-bg {
  position: absolute; top:0; left:0; width:100%; height:100%;
  background-size: cover; background-position: center; 
  opacity: 0.6; transition: opacity 0.5s, transform 3s ease;
  z-index: 1;
}
.big-card:hover .big-card-bg { 
  opacity: 0.3; 
  transform: scale(1.05);
}
.big-card-content {
  position: relative; z-index: 2; text-shadow: 2px 2px 5px #000;
  padding: 2rem;
  transition: transform 0.3s;
}
.big-card:hover .big-card-content {
  transform: scale(1.1);
}
.big-card h3 { font-size: 3rem; color: #fff; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 2px; }
.big-card p { font-size: 1.2rem; font-family: var(--font-serif); font-style: italic; margin-bottom: 0; }

/* Modales */
.modal {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.95); z-index: 9999; justify-content: center; align-items: center; padding: 2rem;
}
.modal.active { display: flex; }
.modal-content {
  background: var(--color-medium); padding: 3rem; max-width: 800px; width: 100%; position: relative; border-left: 5px solid var(--color-accent);
}
.close-modal {
  position: absolute; top: 1rem; right: 1.5rem; font-size: 2.5rem; cursor: pointer; color: #ccc;
}
.close-modal:hover { color: var(--color-accent); }
.modal-video-placeholder {
  width: 100%; height: 350px; background: #111; display: flex; align-items: center; justify-content: center; color: #777; font-style: italic; margin-bottom: 1.5rem; border: 1px solid #333;
}
.modal-quote {
  font-family: var(--font-serif); font-size: 1.2rem; font-style: italic; color: #fff; background: #000; padding: 1.5rem; margin-top: 2rem;
}

/* Sección Seprona */
.seprona-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 2rem;
  width: 100%;
  margin-top: 3rem;
}
.seprona-media-card {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.seprona-media-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  margin-bottom: 1rem;
}
.seprona-media-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}
.seprona-media-card audio {
  width: 100%;
}

/* Sección Luna */
.luna-media-wrap {
  width: 100%;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.luna-audio {
  width: min(100%, 720px);
}
.luna-image-chain {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.luna-image-chain img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Sección de contenido puro (Galería) */
.panel-content-only { padding: 5rem 10%; background: var(--color-medium); }
.gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem;
}
.gallery-item img {
  width: 100%; height: 250px; object-fit: cover; filter: grayscale(50%); transition: filter 0.3s;
}
.gallery-item:hover img { filter: grayscale(0%); }
.gallery-item h4 { margin-top: 1rem; font-size: 1.2rem; color: var(--color-accent); }

/* Animaciones */
.scroll-trigger { opacity: 0; transform: translateY(40px); transition: all 1s ease-out; }
.scroll-trigger.is-visible { opacity: 1; transform: translateY(0); }
.fade-in-up { animation: fadeInUp 1.5s ease-out forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Citas Cierre */
blockquote { font-family: var(--font-serif); font-size: 2.5rem; line-height: 1.4; font-style: italic; margin-bottom: 3rem;}

/* Responsive */
@media (max-width: 768px) {
  nav { display: none; }
  h1 { font-size: 3rem; }
  .big-cards-grid { grid-template-columns: 1fr; grid-template-rows: repeat(2, 30vh); }
  .big-card h3 { font-size: 2rem; }
  .parallax-panel.align-left .text-box, .parallax-panel.align-right .text-box { margin: 0; padding: 2rem; }
  .seprona-media-grid { grid-template-columns: 1fr; }
  .luna-image-chain { grid-template-columns: 1fr; }
}

/* Transcription tab & modal */
.transcript-tab {
  display: inline-block;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 8px;
  text-transform: none;
}
.transcript-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.transcript-modal.active { display: flex; }
.transcript-box {
  background: #0e0e0e;
  color: #fff;
  padding: 1.25rem 1.5rem;
  max-width: 780px;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  border-left: 4px solid rgba(255,255,255,0.06);
}
.transcript-box h4 { margin: 0 0 0.75rem 0; font-size: 1.05rem; }
.transcript-box p, .transcript-box pre { font-size: 0.95rem; line-height: 1.6; color: #ddd; }
.transcript-close {
  position: absolute; top: 1rem; right: 1.25rem; background: transparent; border: none; color: #fff; font-size: 1.6rem; cursor: pointer;
}

/* Fade-in on scroll: start hidden and translate slightly up; only fade in once (no fade out) */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
  will-change: opacity, transform;
}
.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility and responsive improvements */
.skip-link {
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; width: auto; height: auto; background: #000; color: #fff; padding: 0.5rem 0.75rem; z-index: 9999; border-radius: 4px; text-decoration: none;
}

/* Focus styles for keyboard users */
:focus {
  outline: 3px solid #ffbf47; outline-offset: 3px;
}

/* Transcript tab larger for touch and keyboard */
.transcript-tab {
  padding: 0.5rem 0.75rem; font-size: 0.95rem; border-radius: 4px; cursor: pointer; background: #222; color: #fff; border: none;
}
.transcript-tab:focus { box-shadow: 0 0 0 3px rgba(255,191,71,0.18); }

.transcript-modal .transcript-box { max-width: 720px; margin: 4rem auto; padding: 1.5rem; }

/* Responsive layout */
@media (max-width: 900px) {
  .big-cards-grid { display: block; }
  .big-card { width: 100%; margin-bottom: 1rem; }
  .seprona-media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .luna-image-chain img { width: 48%; margin-right: 2%; }
  .transcript-modal .transcript-box { margin: 2rem 1rem; width: auto; }
}
@media (max-width: 520px) {
  .seprona-media-grid { grid-template-columns: 1fr; }
  .subtitle { font-size: 1rem !important; }
  .transcript-tab { width: 100%; display: block; }
  .luna-image-chain img { width: 100%; margin: 0 0 0.5rem 0; }
  .transcript-modal .transcript-box { padding: 1rem; }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
