/* 
   RetroZona · Estilos Base
   Estética de "transmisión analógica nocturna" con colores vintage y efectos CRT.
*/

:root {
  /* Paleta de colores RetroZona */
  --bg:      oklch(15% 0.02 240);  /* Fondo azul profundo/carbón analógico */
  --surface: oklch(22% 0.03 240);  /* Superficies de tarjetas, un poco más claro que el fondo */
  --fg:      oklch(95% 0.01 240);  /* Texto blanco fosforado (off-white) */
  --muted:   oklch(65% 0.03 240);  /* Texto secundario atenuado */
  --border:  oklch(30% 0.04 240);  /* Divisores sutiles */
  --accent:  oklch(80% 0.16 85);   /* Dorado vintage (color de acento principal) */

  /* Colores mezclados para efectos sutiles */
  --accent-soft: color-mix(in oklch, var(--accent) 14%, transparent);
  --fg-soft:     color-mix(in oklch, var(--fg) 6%, transparent);

  /* Tipografías */
  --font-display: 'Iowan Old Style', 'Charter', Georgia, 'Times New Roman', serif; /* Para títulos elegantes */
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; /* Para legibilidad */
  --font-mono:    ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace; /* Para metadatos y estilo retro */

  /* Escala de fuentes responsiva */
  --fs-h1: clamp(44px, 6vw, 76px);
  --fs-h2: clamp(32px, 4vw, 48px);
  --fs-h3: 22px;
  --fs-lead: 19px;
  --fs-body: 16px;
  --fs-meta: 13px;

  /* Espaciado (Gaps) */
  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;
  --gap-xl: 56px;
  --gap-2xl: 96px;
  --container: 1120px;
  --gutter: 32px;

  /* Bordes redondeados */
  --radius: 4px; /* Bordes cortos para una estética ochentera más rígida */
  --radius-lg: 8px;
}

/* Reseteo básico y comportamiento global */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;

  /* Efecto de líneas de escaneo CRT (Nostalgia pura) */
  background-image: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 3px 100%;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }

/* Utilidades de Layout */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(48px, 8vw, var(--gap-2xl)); }
.section + .section { border-top: 1px solid var(--border); }

.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--gap-md); }

.row { display: flex; align-items: center; gap: var(--gap-md); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-md); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-md); }

/* Adaptación para móviles (Mobile-first) */
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Tipografía específica */
.h1, h1 { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -0.02em; margin: 0; }
.h2, h2 { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.015em; margin: 0; }
.h3, h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; margin: 0; }
.lead   { font-size: var(--fs-lead); line-height: 1.55; color: var(--muted); max-width: 60ch; margin: 0; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--gap-md); }
.meta { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--muted); }
.num  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Navegación Superior */
.topnav { position: sticky; top: 0; z-index: 100; background: color-mix(in oklch, var(--bg) 95%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topnav-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.topnav .logo { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--accent); text-shadow: 0 0 10px var(--accent-soft); }
.topnav nav { display: flex; gap: var(--gap-lg); }
.topnav nav a { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; transition: color 0.2s; }
.topnav nav a:hover { color: var(--accent); }

@media (max-width: 768px) { .topnav nav { display: none; } }

/* Pie de Página */
.pagefoot { padding-block: var(--gap-xl); color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); background: var(--surface); }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: var(--radius); border: 1px solid transparent; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; transition: all 0.2s; text-align: center; justify-content: center; }
.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); box-shadow: 0 4px 0 oklch(60% 0.12 85); }
.btn-primary:hover { background: oklch(85% 0.18 85); transform: translateY(-1px); box-shadow: 0 6px 0 oklch(60% 0.12 85); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Tarjetas y Componentes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: inset 0 0 20px rgba(0,0,0,0.2); }

.feature .feature-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 4px; color: var(--accent); margin-bottom: var(--gap-md); box-shadow: 0 0 10px var(--accent-soft); }
.feature h3 { margin-bottom: 8px; color: var(--fg); }
.feature p  { margin: 0; color: var(--muted); font-size: 15px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); border-radius: 2px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }

/* Formulario */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.input, .textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: oklch(10% 0.01 240); color: var(--fg); font: inherit; font-size: 15px; border-left: 3px solid var(--accent); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 10px var(--accent-soft); }

/* Grilla de Videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap-lg); }
.video-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.3s; }
.video-card:hover { transform: scale(1.02); border-color: var(--accent); }
.video-thumb { aspect-ratio: 16 / 9; background: #000; position: relative; }
.video-thumb iframe { width: 100%; height: 100%; border: 0; }
.video-info { padding: 16px; }
.video-info h4 { margin: 0 0 4px; font-size: 16px; color: var(--fg); }
.video-info p { margin: 0; font-size: 13px; color: var(--muted); }

/* Comentarios */
.comment-item { padding: 16px; border-left: 2px solid var(--accent); background: var(--fg-soft); border-radius: 0 4px 4px 0; margin-bottom: 16px; }
.comment-meta { font-size: 12px; color: var(--accent); margin-bottom: 4px; font-family: var(--font-mono); }
.comment-text { font-size: 14px; font-style: italic; margin: 0; }

/* Marcadores de posición de imagen (Placeholders) */
.ph-img { background: linear-gradient(135deg, var(--accent-soft), var(--fg-soft)), var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); aspect-ratio: 16 / 10; display: grid; place-items: center; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

/* Hero Específico con Slider */
.hero { position: relative; overflow: hidden; min-height: 80vh; display: flex; align-items: center; }

/* Contenedor del Slider */
.hero-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}

/* Imágenes individuales del slider */
.hero-slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

/* Clase activa para mostrar la imagen actual */
.hero-slide.active {
  opacity: 1;
}

/* Overlay para mejorar legibilidad y añadir tono retro */
.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, 
    color-mix(in oklch, var(--bg) 60%, transparent), 
    var(--bg)
  );
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}
