/*
 * ============================================================================
 *  ZAPPIZ — Estilos Globales + Guía de Marca Completa
 *  Archivo: /css/styles.css
 *  Propósito: Estilos compartidos por todas las páginas y quizzes de Zappiz.
 * ============================================================================
 *
 *  ██████╗ ██████╗  █████╗ ███╗   ██╝██████╗  ██████╗  █████╗ ██╗
 * ╚════██║██╔══██╗██╔══██╗████╗  ██║██╔══██╗██╔══██╗██╔══██╗██║
 *  █████╔╝███████║███████║██╔██╗ ██║██║  ██║███████║███████║██║
 *  ╚═══██╗██╔══██║██╔══██║██║╚██╗██║██║  ██║██╔══██║██╔══██║╚═╝
 * ██████╔╝██║  ██║██║  ██║██║ ╚████║██████╔╝██║  ██║██║  ██║██╗
 * ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝
 *
 * ============================================================================
 *  GUÍA DE MARCA / BRAND GUIDE — ZAPPIZ
 * ============================================================================
 *
 *  NOMBRE:    Zappiz
 *  TAGLINE:   "Descubre lo que hay en tu mente"
 *  SUBTAG:    "¿Te atreves a conocerte de verdad?"
 *  TONO:      Cercano · Energético · Moderno · Divertido · Curioso
 *
 *  ┌─────────────────────────────────────────────────────────────────────┐
 *  │  NOMBRES ALTERNATIVOS EVALUADOS                                     │
 *  │  1. Zappiz   ← ELEGIDO — Corto, energético, único, .io disponible  │
 *  │  2. MentePop — "Mente" en español + Pop, muy español-friendly       │
 *  │  3. Quizta   — Minimalista, distintivo, como "fiesta" en español    │
 *  └─────────────────────────────────────────────────────────────────────┘
 *
 *  PALETA DE COLORES PRINCIPAL:
 *  ┌────────────────────┬─────────┬────────────────────────────────────┐
 *  │ Token              │ Valor   │ Uso                                │
 *  ├────────────────────┼─────────┼────────────────────────────────────┤
 *  │ --brand-primary    │ #FF6B35 │ Naranja coral — energía, acciones  │
 *  │ --brand-secondary  │ #1A1A2E │ Azul marino — profundidad, marca   │
 *  │ --brand-accent     │ #C8FF57 │ Lima eléctrico — CTAs, highlights  │
 *  │ --brand-dark       │ #0D0D1A │ Casi negro — fondos profundos      │
 *  │ --brand-light      │ #FFF8F3 │ Blanco cálido — texto e inv.       │
 *  │ --brand-mid        │ #16213E │ Azul medio — tarjetas, paneles     │
 *  └────────────────────┴─────────┴────────────────────────────────────┘
 *
 *  GRADIENTE PRINCIPAL:
 *  --brand-gradient: linear-gradient(135deg, #0D0D1A 0%, #1A1A2E 55%, #0F3460 100%)
 *
 *  COLORES POR QUIZ (sobrescribir --quiz-color en el HTML del quiz):
 *  • Personalidad:          --quiz-color: #FF6B35  (naranja, = brand-primary)
 *  • Inteligencia Emocional: --quiz-color: #4ECDC4 (turquesa)
 *  • Liderazgo:             --quiz-color: #C8FF57  (lima, = brand-accent)
 *  • Cultura General:       --quiz-color: #A259FF  (violeta)
 *
 *  TIPOGRAFÍA:
 *  • Display:  'Outfit' — Google Fonts, peso 600/700/800
 *              Geométrica pero muy legible, moderna sin ser genérica.
 *              Uso: Títulos, logo, números grandes, botones CTA
 *  • Body:     'Plus Jakarta Sans' — Google Fonts, peso 400/500/600
 *              Uso: Texto corrido, opciones, descripciones, UI
 *
 *  FORMAS Y BORDES:
 *  • --radius-sm:   8px   → Badges, etiquetas, elementos pequeños
 *  • --radius-md:   16px  → Botones, inputs, tarjetas secundarias
 *  • --radius-lg:   24px  → Tarjetas principales
 *  • --radius-xl:   32px  → Tarjetas hero, modales
 *  • --radius-full: 9999px → Pills, avatares, barras
 *
 *  SOMBRAS:
 *  • --shadow-card:         0 8px 32px rgba(0,0,0,0.4)
 *  • --shadow-hover:        0 16px 48px rgba(0,0,0,0.6)
 *  • --shadow-glow:         0 0 30px rgba(255,107,53,0.25)
 *  • --shadow-accent-glow:  0 0 20px rgba(200,255,87,0.3)
 *
 *  ESPACIADO BASE: múltiplos de 8px
 *  ANIMACIONES: preferir easing cubic-bezier(0.4, 0, 0.2, 1) — Material easing
 * ============================================================================
 */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

/* ── Variables CSS ────────────────────────────────────────────────────────── */
:root {
  /* Colores de marca */
  --brand-primary:    #FF6B35;
  --brand-secondary:  #1A1A2E;
  --brand-accent:     #C8FF57;
  --brand-dark:       #0D0D1A;
  --brand-light:      #FFF8F3;
  --brand-mid:        #16213E;
  --brand-muted:      rgba(255, 248, 243, 0.5);

  /* Gradiente principal */
  --brand-gradient: linear-gradient(135deg, #0D0D1A 0%, #1A1A2E 55%, #0F3460 100%);

  /* Color temático del quiz actual (se sobrescribe por quiz) */
  --quiz-color: var(--brand-primary);

  /* Tipografía */
  --font-display: 'Outfit', 'DM Sans', sans-serif;
  --font-body:    'Plus Jakarta Sans', 'Segoe UI', sans-serif;

  /* Border radius */
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-card:        0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover:       0 20px 56px rgba(0, 0, 0, 0.65);
  --shadow-glow:        0 0 30px rgba(255, 107, 53, 0.25);
  --shadow-accent-glow: 0 0 24px rgba(200, 255, 87, 0.3);

  /* Espaciado */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;
  --sp-4xl: 96px;

  /* Transiciones */
  --ease-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-normal: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow:   450ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--brand-light);
  background: var(--brand-gradient);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Textura de puntos: crea profundidad atmosférica */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Resplandor radial central: da calidez al fondo oscuro */
body::after {
  content: '';
  position: fixed;
  top: -25%;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 90vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(ellipse, rgba(255, 107, 53, 0.055) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

/* Asegurar que el contenido quede sobre los pseudo-elementos */
header, main, footer, .container, section, nav {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--brand-accent);
  text-decoration: none;
  transition: opacity var(--ease-fast);
}
a:hover { opacity: 0.78; }

button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
ul, ol { list-style: none; }

/* ── Tipografía ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5.5vw, 3.8rem); }
h2 { font-size: clamp(1.5rem, 4vw,  2.6rem); }
h3 { font-size: clamp(1.2rem, 3vw,  1.9rem); }
h4 { font-size: clamp(1rem,  2.5vw, 1.3rem); }

p {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255, 248, 243, 0.72);
}

.text-accent  { color: var(--brand-accent);  }
.text-primary { color: var(--brand-primary); }
.text-muted   { color: var(--brand-muted);   }
.text-light   { color: var(--brand-light);   }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}
.container--narrow  { max-width: 680px;  }
.container--wide    { max-width: 1300px; }

/* ── Header / Navegación ──────────────────────────────────────────────────── */
.site-header {
  padding: var(--sp-lg) 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  text-decoration: none;
  transition: opacity var(--ease-normal);
}
.brand-logo:hover { opacity: 0.82; }
.brand-logo svg   { height: 44px; width: auto; }
.brand-logo--sm svg { height: 32px; }

/* Texto del logo — renderizado como HTML para usar Google Fonts correctamente */
.brand-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  color: var(--brand-light);
  text-transform: uppercase;
  line-height: 1;
}
/* En la versión compacta del footer, ocultar el texto */
.brand-logo--sm .brand-logo-text { display: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}
.site-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-muted);
  transition: color var(--ease-fast);
}
.site-nav a:hover { color: var(--brand-light); opacity: 1; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: rgba(13, 13, 26, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--sp-2xl) 0 var(--sp-xl);
  margin-top: var(--sp-4xl);
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-xs);
}
.footer-brand .brand-logo svg { height: 32px; }
.footer-tagline {
  font-size: 0.82rem;
  color: var(--brand-muted);
  font-style: italic;
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md) var(--sp-xl);
  justify-content: center;
}
.footer-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 248, 243, 0.45);
  transition: color var(--ease-fast);
}
.footer-links a:hover { color: var(--brand-accent); opacity: 1; }

.footer-social {
  display: flex;
  gap: var(--sp-sm);
}
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-muted);
  font-size: 0.9rem;
  transition: all var(--ease-normal);
}
.footer-social a:hover {
  background: rgba(255, 107, 53, 0.14);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  opacity: 1;
  transform: translateY(-2px);
}

.footer-bottom {
  font-size: 0.78rem;
  color: rgba(255, 248, 243, 0.25);
  text-align: center;
}

/* ── Card Base ────────────────────────────────────────────────────────────── */
.card {
  background: rgba(22, 33, 62, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--ease-slow), box-shadow var(--ease-slow);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Etiqueta de categoría en la esquina superior */
.card-category {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 4px 10px;
  background: rgba(255, 107, 53, 0.14);
  border: 1px solid rgba(255, 107, 53, 0.28);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* Variantes de categoría */
.card-category--teal   { background: rgba(78,205,196,0.12); border-color: rgba(78,205,196,0.28); color: #4ECDC4; }
.card-category--lime   { background: rgba(200,255,87,0.12); border-color: rgba(200,255,87,0.28); color: var(--brand-accent); }
.card-category--violet { background: rgba(162,89,255,0.12); border-color: rgba(162,89,255,0.28); color: #A259FF; }
.card-category--gold   { background: rgba(247,220,111,0.12); border-color: rgba(247,220,111,0.28); color: #F7DC6F; }

/* ── Quiz Cards (Home & Results) ──────────────────────────────────────────── */
.quiz-card {
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
/* Línea de acento superior */
.quiz-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--quiz-color, var(--brand-primary)), transparent);
  opacity: 0;
  transition: opacity var(--ease-normal);
}
.quiz-card:hover { opacity: 1; color: inherit; }
.quiz-card:hover::before { opacity: 1; }

.quiz-card-emoji { font-size: 2.6rem; line-height: 1; }
.quiz-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brand-light);
  line-height: 1.3;
}
.quiz-card-desc {
  font-size: 0.88rem;
  color: var(--brand-muted);
  line-height: 1.55;
}
.quiz-card-meta {
  font-size: 0.78rem;
  color: rgba(255, 248, 243, 0.32);
  font-weight: 500;
  margin-top: auto;
}
.quiz-card-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 7px 14px;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.22);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-primary);
  transition: all var(--ease-normal);
  width: fit-content;
}
.quiz-card:hover .quiz-card-cta {
  background: rgba(255, 107, 53, 0.22);
  border-color: var(--brand-primary);
}

/* Tarjeta bloqueada (próximamente) */
.quiz-card--locked {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}
.quiz-card--locked::after {
  content: '🔒';
  position: absolute;
  top: var(--sp-md);
  right: var(--sp-md);
  font-size: 1.1rem;
}

/* ── Botones ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 13px var(--sp-xl);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.93rem;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: all var(--ease-normal);
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2.5px solid var(--brand-accent); outline-offset: 3px; }

.btn-primary {
  background: var(--brand-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.38);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(255, 107, 53, 0.55); color: white; opacity: 1; }

.btn-accent {
  background: var(--brand-accent);
  color: var(--brand-dark);
  box-shadow: 0 4px 20px rgba(200, 255, 87, 0.28);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(200, 255, 87, 0.45); color: var(--brand-dark); opacity: 1; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: var(--brand-light);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22); color: var(--brand-light); opacity: 1; }

.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-sm { padding: 8px 18px; font-size: 0.82rem; }

/* ── Badge de marca ───────────────────────────────────────────────────────── */
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 6px 14px;
  background: rgba(200, 255, 87, 0.07);
  border: 1px solid rgba(200, 255, 87, 0.18);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-accent);
  letter-spacing: 0.02em;
}
.brand-badge .badge-icon { font-size: 0.85rem; }

/* ── Barra de progreso ────────────────────────────────────────────────────── */
.progress-container { width: 100%; margin-bottom: var(--sp-xl); }

.progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-sm);
  font-size: 0.78rem;
  color: var(--brand-muted);
  font-weight: 500;
}
.progress-text .progress-step {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--brand-primary);
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  border-radius: var(--radius-full);
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 14px rgba(255, 107, 53, 0.55);
  width: 0%;
}

/* ── Interfaz del quiz ────────────────────────────────────────────────────── */
.quiz-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.quiz-main {
  flex: 1;
  padding: var(--sp-xl) 0 var(--sp-3xl);
}

.quiz-header {
  margin-bottom: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.quiz-header h1 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: var(--brand-light);
}

/* Tarjeta de pregunta */
.question-card {
  background: rgba(22, 33, 62, 0.78);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-xl);
  padding: var(--sp-2xl);
  box-shadow: var(--shadow-card), 0 0 70px rgba(0, 0, 0, 0.25);
}

.question-number {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  margin-bottom: var(--sp-md);
}
.question-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  color: var(--brand-light);
  margin-bottom: var(--sp-xl);
  line-height: 1.3;
}

/* Botones de respuesta */
.answers-grid { display: grid; gap: var(--sp-sm); }

.answer-btn {
  width: 100%;
  padding: 14px var(--sp-lg);
  background: rgba(255, 255, 255, 0.038);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 248, 243, 0.82);
  text-align: left;
  cursor: pointer;
  transition: all var(--ease-normal);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.answer-btn-letter {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--brand-muted);
  transition: all var(--ease-normal);
}

.answer-btn:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: rgba(255, 107, 53, 0.38);
  color: var(--brand-light);
  transform: translateX(5px);
}
.answer-btn:hover .answer-btn-letter {
  background: rgba(255, 107, 53, 0.2);
  border-color: rgba(255, 107, 53, 0.45);
  color: var(--brand-primary);
}
.answer-btn:focus-visible { outline: 2.5px solid var(--brand-accent); outline-offset: 2px; }

/* Estado seleccionado */
.answer-btn.selected {
  background: rgba(255, 107, 53, 0.17);
  border-color: var(--brand-primary);
  color: var(--brand-light);
  transform: translateX(7px);
  animation: pulse-select 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.answer-btn.selected .answer-btn-letter {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
}
@keyframes pulse-select {
  0%   { box-shadow: 0 0 0   rgba(255, 107, 53, 0); }
  40%  { box-shadow: 0 0 30px rgba(255, 107, 53, 0.45); }
  100% { box-shadow: 0 0 18px rgba(255, 107, 53, 0.2); }
}

/* Deshabilitado después de seleccionar */
.answer-btn:disabled { cursor: not-allowed; pointer-events: none; }
.answer-btn:disabled:not(.selected) { opacity: 0.36; }

/* ── Transiciones entre preguntas ─────────────────────────────────────────── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-26px); }
}
.question-card.entering { animation: fadeSlideIn 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.question-card.exiting  { animation: fadeSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* ── Pantalla de resultados ───────────────────────────────────────────────── */
.results-screen { display: none; }
.results-screen.visible {
  display: block;
  animation: fadeSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.results-header { text-align: center; margin-bottom: var(--sp-2xl); }

.results-emoji {
  font-size: 5.5rem;
  line-height: 1;
  display: block;
  margin-bottom: var(--sp-md);
  animation: bounceIn 0.65s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
}
@keyframes bounceIn {
  from  { opacity: 0; transform: scale(0.45); }
  65%   { transform: scale(1.18); }
  to    { opacity: 1; transform: scale(1); }
}

.results-type-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--brand-primary);
  margin-bottom: var(--sp-sm);
}
.results-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--brand-light);
  margin-bottom: var(--sp-md);
}
.results-description {
  font-size: 1rem;
  color: rgba(255, 248, 243, 0.72);
  line-height: 1.82;
  max-width: 530px;
  margin: 0 auto var(--sp-lg);
}

/* Barras de compatibilidad */
.compat-section { margin-bottom: var(--sp-xl); }
.compat-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-muted);
  margin-bottom: var(--sp-md);
  text-align: left;
}
.compat-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: 10px;
}
.compat-bar-label {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--brand-light);
  width: 170px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compat-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.compat-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}
/* Colores por tipo */
.compat-bar-fill.type-lider    { background: linear-gradient(90deg, #FF6B35, #FF9A6C); }
.compat-bar-fill.type-creativo { background: linear-gradient(90deg, #A259FF, #C799FF); }
.compat-bar-fill.type-pensador { background: linear-gradient(90deg, #4ECDC4, #8EEDE8); }
.compat-bar-fill.type-conector { background: linear-gradient(90deg, #F7DC6F, #FAE892); }

.compat-bar-percent {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--brand-muted);
  width: 38px;
  text-align: right;
  flex-shrink: 0;
}

/* Acciones de resultado */
.results-actions {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-xl);
}

/* Más quizzes */
.more-quizzes { margin-top: var(--sp-3xl); }
.more-quizzes-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--brand-light);
  margin-bottom: var(--sp-lg);
  text-align: center;
}
.quiz-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-lg);
}

/* ── Home — Hero ──────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: var(--sp-3xl) 0 var(--sp-2xl);
}
.hero-logo { margin-bottom: var(--sp-xl); display: flex; justify-content: center; }
.hero-logo svg { height: 64px; width: auto; }

.hero-eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brand-primary);
  margin-bottom: var(--sp-md);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  color: var(--brand-light);
  margin-bottom: var(--sp-md);
  line-height: 1.02;
}
.hero-title span { color: var(--brand-accent); }
.hero-subtitle {
  font-size: 1.08rem;
  color: rgba(255, 248, 243, 0.62);
  max-width: 460px;
  margin: 0 auto var(--sp-xl);
  line-height: 1.65;
}

/* ── Sección headers ──────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--sp-xl);
}
.section-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-muted);
}
.section-title { font-family: var(--font-display); font-weight: 800; color: var(--brand-light); }

/* ── Zonas de anuncios ────────────────────────────────────────────────────── */
/* Estas clases definen el espacio visual de los anuncios de Google AdSense.
   En producción, el contenedor .ad-zone tendrá el código del anuncio en su interior.
   Puedes ocultar el fondo y borde en producción con: .ad-zone { background: none; border: none; }
*/
.ad-zone {
  width: 100%;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.018);
  border: 1px dashed rgba(255, 255, 255, 0.055);
  border-radius: var(--radius-md);
  margin: var(--sp-xl) 0;
  color: rgba(255, 255, 255, 0.13);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-body);
}
.ad-zone--medium   { min-height: 250px; }
.ad-zone--sidebar  { min-height: 600px; }
.ad-zone--leaderboard { min-height: 90px; }

/* ── Páginas legales ──────────────────────────────────────────────────────── */
.legal-page {
  max-width: 740px;
  margin: 0 auto;
  padding: var(--sp-2xl) 0;
}
.legal-page h1 { font-size: 2.2rem; margin-bottom: var(--sp-lg); }
.legal-page h2 { font-size: 1.25rem; margin: var(--sp-xl) 0 var(--sp-md); color: var(--brand-light); font-weight: 700; }
.legal-page p, .legal-page li {
  font-size: 0.94rem;
  line-height: 1.82;
  color: rgba(255, 248, 243, 0.68);
  margin-bottom: var(--sp-md);
}
.legal-page ul, .legal-page ol { padding-left: var(--sp-xl); }
.legal-page ul { list-style: disc; }
.legal-page ol { list-style: decimal; }
.legal-page a  { color: var(--brand-primary); }

/* Formulario de contacto */
.contact-form { display: flex; flex-direction: column; gap: var(--sp-md); }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: rgba(255, 248, 243, 0.68); }
.form-group input,
.form-group textarea,
.form-group select {
  padding: 13px var(--sp-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--brand-light);
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.14);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255, 248, 243, 0.28); }
.form-group textarea { min-height: 145px; resize: vertical; }
.form-group select option { background: var(--brand-secondary); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .question-card { padding: var(--sp-lg); }
  .results-actions { flex-direction: column; align-items: center; }
  .results-actions .btn { width: 100%; max-width: 320px; }
  .compat-bar-label { width: 115px; font-size: 0.78rem; }
  .quiz-cards-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; gap: var(--sp-sm); }
  .site-nav { display: none; }
  .compat-bar-percent { width: 34px; font-size: 0.78rem; }
}

@media (max-width: 480px) {
  :root {
    --sp-xl:  24px;
    --sp-2xl: 36px;
    --sp-3xl: 52px;
    --sp-4xl: 72px;
  }
  .hero-title { font-size: 2.3rem; }
  .answer-btn { padding: 12px var(--sp-md); font-size: 0.9rem; }
  .results-emoji { font-size: 4.5rem; }
  .results-title { font-size: 2rem; }
}

/* ── Accesibilidad ────────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2.5px solid var(--brand-accent);
  outline-offset: 3px;
}

/* Respetar preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Utilidades ───────────────────────────────────────────────────────────── */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
