/* ============================================
   EQUANDIA PREMIUM CSS - Mobile First
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    /* Colors */
    --primary: #10B981;
    --primary-100: #D1FAE5;
    --primary-200: #A7F3D0;
    --primary-300: #6EE7B7;
    --primary-400: #34D399;
    --primary-500: #10B981;
    --primary-600: #059669;
    --primary-700: #047857;
    --primary-800: #065F46;
    --primary-900: #064E3B;
    
    --accent: #F59E0B;
    --accent-glow: rgba(245, 158, 11, 0.3);
    
    /* Surfaces */
    --surface: #FFFFFF;
    --surface-dim: #F9FAFB;
    --surface-border: rgba(0, 0, 0, 0.08);
    
    /* Text */
    --text: #1F2937;
    --text-dim: #6B7280;
    /* AA fix 2026-07-10: antes #9CA3AF (2.8:1 sobre blanco) y se usaba en
       títulos de biomes/characters/mythology. Este gris pasa AA (7.5:1). */
    --text-light: #4B5563;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #064E3B 0%, #065F46 50%, #047857 100%);
    --gradient-cta: linear-gradient(135deg, #059669 0%, #10B981 100%);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography */
    --font-display: 'Cinzel', serif;
    --font-body: 'Lora', Georgia, serif;
    
    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ---------- 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);
    color: var(--text);
    background: var(--surface);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-xl);
    }
}

/* ---------- Typography Responsive ----------
   Escala fluida mobile-first (2026-07-10): títulos más generosos en móvil
   sin saltos por media query. clamp(min móvil, fluido, max desktop). */
h1 { font-size: clamp(2.25rem, 5vw + 1.1rem, 3rem); }
h2 { font-size: clamp(1.65rem, 3.2vw + 0.9rem, 2.5rem); }
h3 { font-size: clamp(1.3rem, 1.6vw + 0.9rem, 1.75rem); }

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    padding: var(--space-md) 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(6, 78, 59, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm) 0;
}

.navbar__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: white;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.navbar__name {
    display: none;
}

@media (min-width: 480px) {
    .navbar__name {
        display: inline;
    }
}

/* Logo Symbol */
.logo-symbol {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-base {
    font-size: 32px;
    background: linear-gradient(135deg, #34D399, #38BDF8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-accent {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 14px;
    color: #FBBF24;
}

/* Mobile Menu Toggle */
.navbar__toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(167, 243, 208, 0.22);
    border-radius: 14px;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(15, 11, 34, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: background var(--transition-fast), border-color var(--transition-fast),
                transform var(--transition-fast), box-shadow var(--transition-fast);
}

.navbar__toggle:hover {
    background: rgba(167, 243, 208, 0.14);
    border-color: rgba(167, 243, 208, 0.42);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(15, 11, 34, 0.45), 0 0 0 3px rgba(167, 243, 208, 0.08);
}

.navbar__toggle:active {
    transform: translateY(0) scale(0.95);
}

.navbar__toggle.active {
    background: rgba(16, 185, 129, 0.20);
    border-color: rgba(52, 211, 153, 0.52);
    box-shadow: 0 4px 14px rgba(15, 11, 34, 0.45), 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.navbar__toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #F0FDF4;
    transition: all var(--transition-fast);
}

/* Navigation Menu */
.navbar__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--primary-900);
    padding: 5rem var(--space-xl) var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    transition: right var(--transition-normal);
    box-shadow: var(--shadow-xl);
}

.navbar__menu.active {
    right: 0;
}

.navbar__link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color var(--transition-fast);
}

.navbar__link:hover,
.navbar__link.active {
    color: white;
}

/* Desktop Navigation */
@media (min-width: 1024px) {
    .navbar__toggle {
        display: none;
    }
    
    .navbar__menu {
        position: static;
        width: auto;
        /* Fix global (antes parchado inline en index.html): sin este
           max-width, el tope de 300px del drawer móvil sigue activo en
           desktop y el menú se desborda del viewport. */
        max-width: none;
        height: auto;
        background: transparent;
        padding: 0;
        flex-direction: row;
        align-items: center;
        gap: var(--space-md);
        box-shadow: none;
    }
    .navbar__link {
        font-size: 0.9rem;
        padding: var(--space-xs) var(--space-sm);
        border-bottom: none;
        border-radius: var(--radius-sm);
        white-space: nowrap;
    }
    .navbar__link:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* ---------- Navbar global 2026 (nav canónico de index.html) ---------- */
/* Chip blanco del logo: el navbar vive sobre fondos oscuros (hero o estado
   scrolled) y el wordmark del SVG es verde #065F46, así que va sobre un
   chip blanco para mantener contraste en ambos estados. */
.lv-brand-chip {
    display: inline-flex;
    align-items: center;
    background: rgb(15, 11, 34);
    border-radius: var(--radius-md);
    padding: 3px 6px;
    box-shadow: 0 2px 12px rgba(10, 6, 40, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.lv-brand-chip img {
    display: block;
    height: 38px;
    width: auto;
}

@media (min-width: 768px) {
    .lv-brand-chip img { height: 46px; }
}

/* Páginas con cabecera clara: el navbar arranca sólido (verde) para que
   los enlaces blancos siempre tengan contraste. Se activa con
   <body class="nav-solid">. */
body.nav-solid .navbar {
    background: rgba(6, 78, 59, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
}

/* Hamburguesa: se convierte en X cuando el drawer está abierto */
.navbar__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle.active span:nth-child(2) { opacity: 0; }
.navbar__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdown "El mundo" (en el drawer móvil funciona como acordeón) */
.navbar__dropdown {
    display: flex;
    flex-direction: column;
}

.navbar__dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.navbar__caret {
    display: inline-block;
    flex: none;
    width: 8px;
    height: 8px;
    margin-left: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform var(--transition-fast);
}

.navbar__dropdown.open > .navbar__dropdown-toggle .navbar__caret {
    transform: rotate(225deg);
}

.navbar__dropdown-menu {
    display: none;
    flex-direction: column;
    padding-left: var(--space-md);
}

.navbar__dropdown.open > .navbar__dropdown-menu {
    display: flex;
}

/* Mega-menú "El mundo" (2026-07-10): cada destino lleva miniatura,
   nombre y descripción de una línea. En el drawer móvil es lista
   con thumbs pequeños; en desktop, panel visual en grilla. */
.navbar__dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.navbar__dropdown-link:hover,
.navbar__dropdown-link.active {
    color: white;
}

.navbar__mega-thumb {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.navbar__mega-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.navbar__mega-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.navbar__mega-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    color: inherit;
}

.navbar__mega-desc {
    font-size: 0.74rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.58);
}

.navbar__dropdown-link:hover .navbar__mega-desc,
.navbar__dropdown-link.active .navbar__mega-desc {
    color: rgba(255, 255, 255, 0.78);
}

/* El destino actual se marca también en la miniatura */
.navbar__dropdown-link.active .navbar__mega-thumb {
    border-color: var(--primary-300);
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.35);
}

/* CTA destacado "Comprar" */
.navbar__link.navbar__cta {
    background: var(--accent);
    color: #1C1917;
    font-weight: 700;
    text-align: center;
    border-radius: var(--radius-full);
    border-bottom: none;
    padding: var(--space-sm) var(--space-lg);
    margin-top: var(--space-sm);
}

.navbar__link.navbar__cta:hover {
    background: #D97706;
    color: #1C1917;
}

@media (min-width: 1024px) {
    /* Dropdown en desktop: panel flotante con hover/focus (y click) */
    .navbar__dropdown {
        position: relative;
    }

    .navbar__dropdown-toggle {
        width: auto;
    }

    /* Panel visual del mega-menú: grilla de destinos con miniatura */
    .navbar__dropdown-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        position: absolute;
        top: 100%;
        left: 50%;
        width: min(560px, calc(100vw - 2rem));
        padding: var(--space-sm);
        background: rgba(5, 61, 46, 0.97);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-50%) translateY(8px);
        transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    }

    .navbar__dropdown:hover > .navbar__dropdown-menu,
    .navbar__dropdown:focus-within > .navbar__dropdown-menu,
    .navbar__dropdown.open > .navbar__dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    .navbar__dropdown-link {
        font-size: 0.9rem;
        padding: 8px 10px;
        border-bottom: none;
        border-radius: var(--radius-md);
        white-space: normal;
    }

    /* Primer destino (Vivir en Equandia) destacado a lo ancho */
    .navbar__dropdown-link:first-child {
        grid-column: 1 / -1;
    }

    .navbar__mega-thumb {
        width: 52px;
        height: 52px;
    }

    .navbar__dropdown-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .navbar__link.navbar__cta {
        padding: var(--space-xs) var(--space-lg);
        margin-top: 0;
    }

    .navbar__link.navbar__cta:hover {
        background: #D97706;
    }
}

/* ---------- Hero Section ---------- */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem var(--space-md) var(--space-2xl);
    background: var(--gradient-hero);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero__content {
    position: relative;
    z-index: 2;
}

.hero-medallion {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    animation: float 4s ease-in-out infinite;
}

@media (min-width: 768px) {
    .hero-medallion {
        width: 120px;
        height: 120px;
    }
}

/* ============================================================
   PILLS · sistema unificado (2026-07-10)
   Un solo molde para eyebrows, chips de elemento, filtros,
   badges de cards y etiquetas de formato en TODO el sitio.
   Base neutra + tamaños + versalitas + variantes semánticas:
   mundo (esmeralda), compra (ámbar), magia (violeta),
   agua (azul), fuego (rojo), tierra (ocre), luz (outline sobre
   fondo oscuro) y noche (vidrio oscuro sobre imagen).
   Regla de casa: hairline COMPLETO, nunca borde de acento lateral.
   ============================================================ */
.eq-pill,
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45em;
    min-height: 30px;
    padding: 4px 14px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-full);
    background: var(--surface-dim);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
}

.eq-pill .eq-icon,
.hero__eyebrow .eq-icon {
    width: 1.2em;
    height: 1.2em;
    flex: none;
}

.eq-pill i {
    font-size: 1em;
    flex: none;
}

/* Tamaños */
.eq-pill--sm {
    min-height: 24px;
    padding: 2px 10px;
    font-size: 0.72rem;
}

.eq-pill--lg {
    min-height: 44px;
    padding: 8px 20px;
    font-size: 0.95rem;
}

/* Versalitas de kicker/badge (los eyebrows siempre van así) */
.eq-pill--caps,
.hero__eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.eq-pill--caps.eq-pill--sm {
    font-size: 0.64rem;
    letter-spacing: 0.09em;
}

/* Luz: outline sobre fondos oscuros o con imagen (heros, CTAs) */
.eq-pill--luz,
.hero__eyebrow {
    background: rgba(2, 24, 18, 0.28);
    border-color: rgba(255, 255, 255, 0.38);
    color: rgba(255, 255, 255, 0.95);
}

/* El eyebrow conserva el aire inferior del molde original */
.hero__eyebrow {
    margin-bottom: var(--space-md);
}

/* Variantes semánticas: panel tintado + hairline + tinta AA */
.eq-pill--mundo  { background: #ECFDF5; border-color: rgba(5, 150, 105, 0.32);  color: #047857; }
.eq-pill--compra { background: #FFF7ED; border-color: rgba(180, 83, 9, 0.3);    color: #92400E; }
.eq-pill--magia  { background: #F5F3FF; border-color: rgba(124, 58, 237, 0.3);  color: #6D28D9; }
.eq-pill--agua   { background: #F0F9FF; border-color: rgba(2, 132, 199, 0.3);   color: #0369A1; }
.eq-pill--fuego  { background: #FEF2F2; border-color: rgba(220, 38, 38, 0.3);   color: #B91C1C; }
.eq-pill--tierra { background: #FFFBEB; border-color: rgba(180, 83, 9, 0.3);    color: #92400E; }

/* Noche: vidrio oscuro para badges SOBRE imagen (cards) */
.eq-pill--noche {
    background: rgba(2, 6, 23, 0.55);
    border-color: rgba(255, 255, 255, 0.24);
    color: #FFFFFF;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

/* Interactivas (enlaces y botones que son pills) */
a.eq-pill,
button.eq-pill {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--transition-fast), color var(--transition-fast),
        border-color var(--transition-fast), transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

a.eq-pill:not(.active):not(.is-active):hover,
button.eq-pill:not(.active):not(.is-active):hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    color: var(--primary-700);
    box-shadow: var(--shadow-sm);
}

a.eq-pill--mundo:not(.active):not(.is-active):hover,
button.eq-pill--mundo:not(.active):not(.is-active):hover {
    background: var(--primary-100);
    color: var(--primary-900);
}

a.eq-pill:active,
button.eq-pill:active {
    transform: scale(0.97);
}

/* Estado activo/seleccionado: relleno sólido esmeralda */
.eq-pill.active,
.eq-pill.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
}

.eq-pill.active .eq-icon,
.eq-pill.is-active .eq-icon {
    color: #FFFFFF;
}

/* Táctil: en punteros gruesos toda pill interactiva alcanza 44px */
@media (pointer: coarse) {
    a.eq-pill:not(.eq-pill--sm),
    button.eq-pill:not(.eq-pill--sm) {
        min-height: 44px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

.hero__title {
    /* Fluido mobile-first (antes 2rem fijo en móvil) */
    font-size: clamp(2.35rem, 5.5vw + 1.2rem, 3.5rem);
    margin-bottom: var(--space-md);
    color: white;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .hero__subtitle {
        font-size: 1.25rem;
        max-width: 600px;
    }
}

/* ============================================================
   PAGE-HERO · banda hero de página interior con imagen del
   mundo (2026-07-10). Patrón del hero de index: scrim de
   legibilidad -> imagen -> degradado de respaldo (si el JPG
   no existe aún, el degradado se ve solo y nada se rompe).
   Cada página define su imagen con --ph-img (inline en el
   <header>) y puede afinar --ph-pos (encuadre móvil).
   El título vive en el tercio superior calmado de la banda.
   GOTCHA (probado 2026-07-10): Chrome resuelve el url() de una
   custom property contra la HOJA que la consume (esta, en /css/),
   no contra el documento; Firefox/Safari contra donde se declara.
   Por eso las páginas declaran --ph-img con '../img/...':
   ambos comportamientos aterrizan en /img/ con el docroot estándar.
   ============================================================ */
.page-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    min-height: var(--ph-min, clamp(430px, 58vh, 560px));
    padding: 7.5rem var(--space-md) var(--space-2xl);
    color: white;
    background-color: #064E3B;
    background-image:
        /* viñeta suave DETRÁS del texto (centro-arriba): da legibilidad sin
           tapar el arte, se desvanece hacia los bordes y la parte baja */
        radial-gradient(ellipse 96% 66% at 50% 33%,
            rgba(2, 20, 16, 0.60) 0%,
            rgba(2, 20, 16, 0.30) 46%,
            rgba(2, 20, 16, 0.06) 70%,
            transparent 82%),
        linear-gradient(180deg,
            rgba(2, 24, 18, 0.46) 0%,
            rgba(2, 24, 18, 0.12) 32%,
            rgba(2, 24, 18, 0.12) 62%,
            rgba(2, 24, 18, 0.46) 100%),
        var(--ph-img, none),
        var(--gradient-hero);
    background-size: cover, cover, cover, cover;
    background-position: center, center, var(--ph-pos, center 38%), center;
    background-repeat: no-repeat;
}

/* Imágenes claras (p. ej. el mapa): scrim verde algo más fuerte para AA,
   pero sin tapar la ilustración (mantiene 4 capas alineadas con .page-hero) */
.page-hero--strong {
    background-image:
        radial-gradient(ellipse 98% 68% at 50% 33%,
            rgba(3, 30, 24, 0.72) 0%,
            rgba(3, 30, 24, 0.40) 46%,
            rgba(3, 30, 24, 0.12) 70%,
            transparent 84%),
        linear-gradient(180deg,
            rgba(3, 39, 30, 0.56) 0%,
            rgba(3, 39, 30, 0.24) 34%,
            rgba(3, 39, 30, 0.24) 62%,
            rgba(3, 39, 30, 0.56) 100%),
        var(--ph-img, none),
        var(--gradient-hero);
}

.page-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
}

.page-hero .hero__title {
    color: white;
    text-shadow: 0 2px 22px rgba(2, 24, 18, 0.55);
    margin-bottom: var(--space-md);
}

.page-hero .hero__subtitle {
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 1px 12px rgba(2, 24, 18, 0.5);
    max-width: 640px;
}

/* Medallón opcional dentro del hero (mythology, contact) */
.page-hero__medal {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto var(--space-lg);
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(2, 24, 18, 0.45);
}

@media (min-width: 768px) {
    .page-hero {
        padding-top: 9rem;
        /* En pantallas anchas el encuadre vuelve al centro de la imagen */
        background-position: center, center, var(--ph-pos-lg, center 30%), center;
    }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    min-height: 44px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    background: var(--primary-600);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--accent);
    color: #1C1917;
}

.btn-secondary:hover {
    background: #D97706;
    color: #1C1917;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Button responsive sizing */
@media (max-width: 480px) {
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
    }
}

/* ---------- Sections ---------- */
.section {
    padding: var(--space-2xl) 0;
    position: relative;
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-3xl) 0;
    }
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
    .section-title {
        margin-bottom: var(--space-2xl);
    }
}

.text-center {
    text-align: center;
}

/* ---------- Grid System ---------- */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

.grid-4 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .grid-5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ---------- Glass Cards ---------- */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Theme variants: hairline completo tintado (regla de casa: nada de
   border-left/right de acento) */
.glass-card.theme-terran {
    border: 1px solid rgba(16, 185, 129, 0.45);
    background: linear-gradient(rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.06)), rgba(255, 255, 255, 0.9);
}

.glass-card.theme-aquanis {
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: linear-gradient(rgba(56, 189, 248, 0.06), rgba(56, 189, 248, 0.06)), rgba(255, 255, 255, 0.9);
}

.glass-card.theme-ventus {
    border: 1px solid rgba(167, 139, 250, 0.45);
    background: linear-gradient(rgba(167, 139, 250, 0.06), rgba(167, 139, 250, 0.06)), rgba(255, 255, 255, 0.9);
}

.glass-card.theme-pyros {
    border: 1px solid rgba(245, 158, 11, 0.45);
    background: linear-gradient(rgba(245, 158, 11, 0.06), rgba(245, 158, 11, 0.06)), rgba(255, 255, 255, 0.9);
}

.glass-card.theme-vitalis {
    border: 1px solid rgba(52, 211, 153, 0.45);
    background: linear-gradient(rgba(52, 211, 153, 0.06), rgba(52, 211, 153, 0.06)), rgba(255, 255, 255, 0.9);
}

/* ---------- Medallion Frames ---------- */
.medallion-frame {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--primary-600);
}

@media (min-width: 768px) {
    .medallion-frame {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

/* ---------- Shape Dividers ---------- */
.shape-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.shape-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

@media (min-width: 768px) {
    .shape-divider svg {
        height: 100px;
    }
}

.shape-fill {
    fill: white;
}

/* ---------- CTA Section ---------- */
.section-cta {
    background: var(--gradient-cta);
    color: white;
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
}

@media (min-width: 768px) {
    .section-cta {
        padding: var(--space-3xl) var(--space-xl);
    }
}

.section-cta h2 {
    color: white;
    margin-bottom: var(--space-md);
}

.section-cta p {
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    opacity: 0.9;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--primary-900);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    gap: var(--space-xl);
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr);
    }
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
}

/* Ilustración superior de las tarjetas de protocolo de seguridad (learn.html) */
.protocolo-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    display: block;
}

/* Footer completo en móvil: en vez de apilar marca + 3 columnas de enlaces en
   una sola tira larguísima, la marca ocupa el ancho y los grupos de enlaces van
   en 2 columnas con interlínea ajustada. Reduce a la mitad el alto. */
@media (max-width: 639.98px) {
    .site-footer {
        padding: var(--space-xl) 0 var(--space-md);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg) var(--space-md);
    }

    .footer-brand {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .footer-brand p {
        font-size: 0.85rem;
        line-height: 1.55;
        margin-top: 0.35rem;
    }

    .footer-col h4 {
        margin-bottom: var(--space-sm);
        font-size: 0.95rem;
    }

    .footer-links li {
        margin-bottom: 6px;
        line-height: 1.3;
    }

    .footer-links a {
        font-size: 0.85rem;
    }
}

/* Footer mínimo (páginas utilitarias: contacto, privacidad, términos, sitemap):
   solo lleva .footer-bottom sin columnas. Sin este ajuste, el padding-top grande
   del footer + el margin-top del footer-bottom dejaban una banda verde vacía de ~70px. */
.site-footer:has(> .container > .footer-bottom:first-child) {
    padding-top: var(--space-lg);
}

.site-footer > .container > .footer-bottom:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* ---------- Particles Background ---------- */
/* Acotado al HERO (antes fixed a toda la página; decisión de Gabriel 2026-07-09):
   el contenedor #particles-js ahora vive DENTRO de .lv-hero. */
#particles-js {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#particles-js canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ---------- Animations ---------- */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Utility Classes ---------- */
.hidden-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hidden-mobile {
        display: block;
    }
    
    .hidden-desktop {
        display: none;
    }
}

.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Book/Season Articles ---------- */
article[style*="display: flex"] {
    flex-direction: column !important;
}

@media (min-width: 768px) {
    article[style*="display: flex"] {
        flex-direction: row !important;
    }
    
    article[style*="flex-wrap: wrap-reverse"] {
        flex-direction: row-reverse !important;
    }
}

/* Override inline min-width for mobile */
article [style*="min-width: 300px"] {
    min-width: 100% !important;
}

@media (min-width: 768px) {
    article [style*="min-width: 300px"] {
        min-width: 300px !important;
    }
}

/* Book cover placeholders */
article [style*="width: 250px"][style*="height: 375px"] {
    width: 200px !important;
    height: 300px !important;
}

@media (min-width: 768px) {
    article [style*="width: 250px"][style*="height: 375px"] {
        width: 250px !important;
        height: 375px !important;
    }
}

/* ---------- Explore Grid Override ---------- */
[style*="grid-template-columns: repeat(auto-fit, minmax(350px, 1fr))"] {
    grid-template-columns: 1fr !important;
}

@media (min-width: 768px) {
    [style*="grid-template-columns: repeat(auto-fit, minmax(350px, 1fr))"] {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)) !important;
    }
}

/* ---------- Character Grid Override ---------- */
[style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
    grid-template-columns: 1fr !important;
    gap: var(--space-lg) !important;
}

@media (min-width: 480px) {
    [style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    [style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    }
}

/* ---------- Reading Pages (Books) ---------- */
.book-content {
    padding: var(--space-md);
    max-width: 100%;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .book-content {
        padding: var(--space-xl);
        max-width: 800px;
        margin: 0 auto;
    }
}

.book-content h1 {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

.book-content h2 {
    font-size: 1.25rem;
    margin: var(--space-xl) 0 var(--space-md);
}

@media (min-width: 768px) {
    .book-content h1 {
        font-size: 2.5rem;
    }
    
    .book-content h2 {
        font-size: 1.75rem;
    }
}

.book-content p {
    margin-bottom: var(--space-md);
    text-align: left;
    hyphens: manual;
}

/* ---------- Legal Pages ---------- */
.legal-content {
    padding: 6rem var(--space-md) var(--space-2xl);
}

@media (min-width: 768px) {
    .legal-content {
        padding: 8rem var(--space-xl) var(--space-3xl);
        max-width: 800px;
        margin: 0 auto;
    }
}

/* ---------- 404 Page ---------- */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-xl);
}

.error-page h1 {
    font-size: 4rem;
    color: var(--primary);
}

@media (min-width: 768px) {
    .error-page h1 {
        font-size: 8rem;
    }
}

/* ---------- Contact Form ---------- */
.contact-form {
    max-width: 100%;
}

@media (min-width: 768px) {
    .contact-form {
        max-width: 600px;
        margin: 0 auto;
    }
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ---------- Sitemap Page ---------- */
.sitemap-list {
    list-style: none;
    padding-left: var(--space-md);
}

.sitemap-list li {
    margin-bottom: var(--space-sm);
}

.sitemap-list a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ---------- Print Styles ---------- */
@media print {
    .navbar,
    .site-footer,
    #particles-js,
    .btn {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: var(--space-xl);
    }
    
    body {
        font-size: 12pt;
        color: black;
    }
}

/* ============================================================
   Compat: clases legadas (2026-07-09)
   Definiciones sobrias para clases y variables que las páginas
   heredadas (about, learn, contact, biomes, mythology, characters,
   bestiary) usan y que ningún stylesheet del docroot definía.
   Mapeadas a los tokens del propio sistema. Sin bordes de acento.
   ============================================================ */

/* ---- Tokens legados -> tokens del sistema ---- */
:root {
    /* Alias de color (tema oscuro legado -> sistema claro) */
    --color-primary: var(--primary);
    --color-secondary: #7C3AED;
    --secondary: #7C3AED;
    --color-accent: var(--accent);
    --color-danger: #EF4444;
    --color-bg: var(--surface);
    --highlight: #8B5CF6;
    --primary-dark: var(--primary-700);

    /* Texto y líneas */
    --ink: var(--text);
    --muted: var(--text-dim);
    --line: rgba(0, 0, 0, 0.12);

    /* Tipografía */
    --font-heading: var(--font-display);
    --font-accent: 'Lora', Georgia, serif;

    /* Escala de espaciado numérica (estilo utility) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Otros */
    --transition-base: 300ms ease;
    --radius-2xl: 24px;
}

/* ---- Tarjetas genéricas (about, learn, bestiary) ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.card__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.card__text {
    color: var(--text-dim);
    line-height: 1.7;
}

.glow {
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.15);
}

/* ---- Cabeceras de sección (about, learn) ---- */
.section__header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-2xl);
}

.section__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-600);
    margin-bottom: var(--space-sm);
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.section__subtitle {
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

/* ---- Hero de subpágina (about, learn, bestiary) ---- */
.hero.hero--subpage {
    min-height: 0;
    padding-top: 9rem;
    padding-bottom: var(--space-2xl);
}

/* ---- Cabecera de personajes (characters) ---- */
.character-hero {
    text-align: center;
    padding: 10rem var(--space-md) var(--space-2xl);
}

/* ---- Tarjeta "mágica" legada (characters), versión clara ---- */
.magic-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

/* ---- Placeholder de arte pendiente (biomes) ---- */
.art-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: 220px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-dim);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
}

.art-placeholder i {
    font-size: 2rem;
}

.art-placeholder--landscape {
    width: 100%;
    aspect-ratio: 16 / 10;
}

/* ---- Animación de entrada legada (biomes, mythology, characters) ---- */
.fade-in-up {
    animation: fadeInUp 0.8s ease both;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-up {
        animation: none;
    }
}

/* ---- Legibilidad: eyebrow dentro de tarjeta clara ---- */
.glass-card .hero__eyebrow {
    background: var(--surface-dim);
    color: var(--text-dim);
    border-color: rgba(0, 0, 0, 0.15);
}

/* ============================================================
   CHROME 2026 · Iconos propios, bottom-nav móvil, view transitions
   y micro-interacciones (2026-07-10).
   Trabaja en pareja con js/nav.js:
   - nav.js inyecta el sprite img/iconos-equandia.svg inline
     (GOTCHA: Chrome no resuelve <use> hacia un sprite externo).
   - nav.js inyecta la bottom-nav (.eq-bottomnav) y añade
     body.has-bottomnav; aquí viven sus estilos canónicos.
   Regla de casa: NADA de border-left/right de acento.
   ============================================================ */

/* ---------- Iconos Equandia (sprite inline) ---------- */
.eq-icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.2em;
    flex: none;
}

.navbar__dropdown-toggle .eq-icon,
.navbar__cta .eq-icon {
    width: 1.1em;
    height: 1.1em;
    margin-right: 0.45em;
    vertical-align: -0.18em;
}

/* En el drawer móvil el toggle es flex space-between; con el icono nuevo
   el texto quedaba centrado. Se alinea a la izquierda y el caret va al borde. */
@media (max-width: 1023.98px) {
    .navbar__dropdown-toggle {
        justify-content: flex-start;
    }

    .navbar__dropdown-toggle .navbar__caret {
        margin-left: auto;
    }
}

/* ---------- Navbar: pulso suave de constelación (hover/active) ---------- */
.navbar__link {
    position: relative;
}

/* Estrellita que se enciende en hover/activo (excepto el CTA ámbar) */
.navbar__link:not(.navbar__cta)::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #FDE68A 0%, rgba(253, 230, 138, 0) 72%);
    opacity: 0;
    transform: scale(0.4);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    pointer-events: none;
}

.navbar__link:not(.navbar__cta):hover::after,
.navbar__link:not(.navbar__cta).active::after {
    opacity: 1;
    transform: scale(1);
}

@keyframes eq-twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.75); }
}

@keyframes eq-icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.14); }
}

@media (prefers-reduced-motion: no-preference) {
    .navbar__link:not(.navbar__cta):hover::after,
    .navbar__link:not(.navbar__cta).active::after {
        animation: eq-twinkle 2.4s ease-in-out infinite;
    }

    .navbar__link:hover .eq-icon,
    .navbar__link.active .eq-icon,
    .navbar__dropdown.open > .navbar__dropdown-toggle .eq-icon {
        animation: eq-icon-pulse 1.8s ease-in-out infinite;
        transform-origin: center;
    }
}

/* ---------- Bottom-nav móvil (<768px) ---------- */
.eq-bottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900; /* bajo el navbar (1000): el drawer debe taparla */
    display: flex;
    align-items: stretch;
    background: rgba(5, 46, 36, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 6px max(6px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right));
}

.eq-bottomnav__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px; /* thumb-friendly */
    padding: 4px 2px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body, inherit);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--transition-fast), background var(--transition-fast), transform 120ms ease;
}

.eq-bottomnav__ico {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 10px;
    border-radius: var(--radius-full);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.eq-bottomnav__item .eq-icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
}

.eq-bottomnav__item:hover,
.eq-bottomnav__item:focus-visible {
    color: #fff;
}

.eq-bottomnav__item:active {
    transform: scale(0.94); /* squish táctil */
}

/* Activo por página */
.eq-bottomnav__item.is-active {
    color: #fff;
}

.eq-bottomnav__item.is-active .eq-bottomnav__ico {
    background: rgba(16, 185, 129, 0.28);
    color: var(--primary-300);
}

/* CTA Comprar destacado en ámbar (icono sobre chip, texto ámbar claro) */
.eq-bottomnav__item--cta .eq-bottomnav__ico {
    background: var(--accent);
    color: #1C1917;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.45);
}

.eq-bottomnav__item--cta {
    color: #FCD34D;
}

.eq-bottomnav__item--cta:hover,
.eq-bottomnav__item--cta.is-active {
    color: #FDE68A;
}

.eq-bottomnav__item--cta.is-active .eq-bottomnav__ico {
    background: var(--accent);
    color: #1C1917;
}

/* La barra solo existe en móvil; el body le deja sitio */
@media (max-width: 767.98px) {
    body.has-bottomnav {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    /* En el drawer móvil los enlaces son full-width: la estrellita ::after,
       anclada a right:2px, quedaba como un punto suelto en el borde derecho.
       El indicador de sección en móvil ya lo da la bottom-nav. */
    .navbar__menu .navbar__link:not(.navbar__cta)::after {
        display: none;
    }
}

@media (min-width: 768px) {
    .eq-bottomnav {
        display: none;
    }
}

/* ---------- View Transitions entre páginas ---------- */
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }

    ::view-transition-old(root) {
        animation: eq-vt-out 180ms ease both;
    }

    ::view-transition-new(root) {
        animation: eq-vt-in 260ms ease 40ms both;
    }

    /* Fallback para navegadores sin View Transitions: fade-in del body */
    @supports not (view-transition-name: root) {
        body {
            animation: eq-page-in 320ms ease both;
        }
    }
}

@keyframes eq-vt-out {
    to { opacity: 0; transform: translateY(-8px); }
}

@keyframes eq-vt-in {
    from { opacity: 0; transform: translateY(10px); }
}

@keyframes eq-page-in {
    from { opacity: 0; }
}

/* ---------- Reveal-on-scroll (clase útil única; js/nav.js observa) ---------- */
.eq-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    will-change: opacity, transform;
}

.eq-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Cards: lift + glow esmeralda breve (tap y hover) ---------- */
.card,
.magic-card {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover,
.glass-card.touch-hover,
.card:hover,
.magic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(16, 185, 129, 0.22), 0 10px 32px rgba(16, 185, 129, 0.16);
}

.glass-card:active,
.card:active,
.magic-card:active {
    transform: translateY(-2px) scale(0.995);
}

/* ---------- Botones: squish suave al presionar ---------- */
.btn:active,
.navbar__link.navbar__cta:active {
    transform: scale(0.96);
}

.btn-primary:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

/* ---------- Divider de constelación (estrellitas CSS, sin gifs) ----------
   Se aplica solo a cabeceras de sección centradas y a .eq-divider suelto. */
.eq-divider,
.section-title::after,
.section__title::after,
.section .text-center > h2::after,
h2.text-center::after {
    content: "";
    display: block;
    width: 140px;
    height: 12px;
    margin: 0.65rem auto 0;
    background-image:
        radial-gradient(circle, #F59E0B 0 2.6px, rgba(245, 158, 11, 0) 3.4px),
        radial-gradient(circle, #34D399 0 2px, rgba(52, 211, 153, 0) 2.7px),
        radial-gradient(circle, #34D399 0 2px, rgba(52, 211, 153, 0) 2.7px),
        radial-gradient(circle, #6EE7B7 0 1.4px, rgba(110, 231, 183, 0) 2px),
        radial-gradient(circle, #6EE7B7 0 1.4px, rgba(110, 231, 183, 0) 2px),
        linear-gradient(90deg, rgba(16, 185, 129, 0), rgba(16, 185, 129, 0.35) 22%, rgba(16, 185, 129, 0.35) 78%, rgba(16, 185, 129, 0));
    background-size: 8px 8px, 6px 6px, 6px 6px, 5px 5px, 5px 5px, 100% 1px;
    background-position: center, calc(50% - 30px) center, calc(50% + 30px) center, calc(50% - 58px) center, calc(50% + 58px) center, center;
    background-repeat: no-repeat;
}

.eq-divider {
    margin: var(--space-lg) auto;
}

@keyframes eq-divider-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: no-preference) {
    .eq-divider,
    .section-title::after,
    .section__title::after,
    .section .text-center > h2::after,
    h2.text-center::after {
        animation: eq-divider-glow 4.5s ease-in-out infinite;
    }
}

/* ---------- Accesibilidad: foco visible y movimiento reducido ---------- */
:focus-visible {
    outline: 3px solid rgba(16, 185, 129, 0.65);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.navbar :focus-visible,
.eq-bottomnav :focus-visible,
.section-cta :focus-visible {
    outline-color: rgba(253, 230, 138, 0.95);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .eq-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-medallion {
        animation: none;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Print: la barra móvil no se imprime ---------- */
@media print {
    .eq-bottomnav {
        display: none !important;
    }
}

/* ---------- CIELO NOCTURNO EN EL MENÚ (decisión Gabriel 2026-07-10) ----------
   El nav y la bottom-nav llevan el cielo del lockup pintado (#0F0B22) con
   estrellitas sutiles para que el logo resalte; siempre sólido (ya no
   transparente sobre el hero). */
.navbar,
.navbar.scrolled,
body.nav-solid .navbar {
    background: radial-gradient(1px 1px at 12% 30%, rgba(255,255,255,0.5) 50%, transparent 51%),
                radial-gradient(1px 1px at 34% 68%, rgba(255,255,255,0.35) 50%, transparent 51%),
                radial-gradient(1.5px 1.5px at 57% 22%, rgba(167,243,208,0.5) 50%, transparent 51%),
                radial-gradient(1px 1px at 76% 55%, rgba(255,255,255,0.4) 50%, transparent 51%),
                radial-gradient(1px 1px at 91% 35%, rgba(251,191,36,0.4) 50%, transparent 51%),
                linear-gradient(180deg, #0F0B22 0%, #17102F 100%) !important;
    border-bottom: 1px solid rgba(167, 243, 208, 0.14);
}
.eq-bottomnav {
    background: linear-gradient(0deg, #0F0B22 0%, #17102F 100%) !important;
    border-top: 1px solid rgba(167, 243, 208, 0.16) !important;
}
.lv-brand-chip {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}
