/* =========================================================
   COMPONENTS
   ========================================================= */

/* ===== NAV: TIENDAS =====
   App Store y Google Play con el mismo formato: antes eran un chip de App Store
   y un boton blanco de «Descargar» que no decia a donde llevaba. */
.nav-store {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 100px;
    font-size: 0.6rem; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase;
    color: #cdeffb; text-decoration: none;
    border: 1px solid rgba(45, 212, 255, 0.35);
    background: rgba(45, 212, 255, 0.08);
    transition: all 0.3s var(--ease-out);
}
.nav-store:hover { background: rgba(45, 212, 255, 0.18); }
.nav-store:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }

/* ===== NAV: MENÚ DEL MÓVIL ===== */
.nav-menu {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.nav-menu:hover,
.nav-menu[aria-expanded="true"] { background: rgba(45, 212, 255, 0.10); border-color: rgba(45, 212, 255, 0.35); }
.nav-menu:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }
.nav-menu__close { display: none; }
.nav-menu[aria-expanded="true"] .nav-menu__open { display: none; }
.nav-menu[aria-expanded="true"] .nav-menu__close { display: block; }

.mobile-menu {
    display: flex;
    flex-direction: column;
    padding: 0.25rem 1.5rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    /* La barra es translúcida: sin fondo propio, el titular se leía detrás. */
    background: rgba(12, 27, 42, 0.92);
    animation: menu-in 0.28s var(--ease-out);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__link {
    padding: 1rem 0;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #889DB6;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-menu__link:last-child { border-bottom: 0; }
.mobile-menu__link.is-current { color: var(--primary); }
.mobile-menu__link:active { color: #fff; }
@keyframes menu-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .mobile-menu { animation: none; } }

/* ===== HERO HOLO CARD CONTAINER ===== */
#3d-cube-container {
    width: 100%;
    max-width: 450px;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 145, 166, 0.05);
    border-radius: 3rem;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
#3d-cube-container:hover {
    background: rgba(56, 145, 166, 0.1);
    transform: scale(1.02);
}
#3d-cube-container canvas {
    max-width: 100%;
    height: auto !important;
}

/* ===== FEATURE CARDS (3D) ===== */
.feature-card-v3 {
    position: relative;
    /* Con cuatro columnas a 1024px la tarjeta mide 217px y 2.5rem de padding por
       lado dejaban 137px utiles: el titular a 1.75rem se partia en tres lineas. */
    padding: clamp(1.6rem, 2.2vw, 2.5rem);
    border-radius: clamp(1.5rem, 2vw, 2.5rem);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    perspective: 1000px;
    height: 100%;
    cursor: pointer;
}
.feature-card-v3:hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px var(--shadow-color);
}
.card-glow {
    position: absolute;
    inset: 0;
    /* Degradado con paradas suaves en vez de `filter: blur(40px)`. Aunque estaba
       a `opacity: 0`, el filtro obligaba a mantener ocho capas compuestas. */
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        var(--card-color) 0%,
        color-mix(in srgb, var(--card-color) 45%, transparent) 38%,
        transparent 72%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 0;
}
.feature-card-v3:hover .card-glow { opacity: 0.15; }
.icon-wrapper {
    width: clamp(54px, 4.4vw, 70px);
    height: clamp(54px, 4.4vw, 70px);
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--card-color), rgba(255, 255, 255, 0.1));
    border-radius: clamp(1rem, 1.4vw, 1.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(1.25rem, 2vw, 2rem);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    color: white;
}
.feature-card-v3 h4 {
    font-size: clamp(1.2rem, 1.35vw + 0.4rem, 1.75rem);
    line-height: 1.15;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}
.feature-card-v3 p {
    color: #889DB6;
    font-size: clamp(0.9rem, 0.4vw + 0.75rem, 1rem);
    line-height: 1.6;
    margin-bottom: clamp(1.25rem, 2vw, 2rem);
}
.card-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--card-color);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.feature-card-v3:hover .card-progress-bar { width: 100%; }

/* ===== iOS BETA PILL ===== */
.beta-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 16px;
    border-radius: 100px;
    background: rgba(45, 212, 255, 0.08);
    border: 1px solid rgba(45, 212, 255, 0.3);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #cdeffb;
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
    backdrop-filter: blur(8px);
    /* En el hero es hijo de un flex en columna: sin esto se estiraba a todo el
       ancho de la columna. */
    align-self: center;
    max-width: 100%;
}
.beta-pill:hover { background: rgba(45, 212, 255, 0.16); transform: translateY(-2px); }
.beta-pill .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #2DD4FF; box-shadow: 0 0 10px #2DD4FF;
    animation: betapulse 1.6s ease-in-out infinite;
}
.beta-pill .go {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(45, 212, 255, 0.2);
}
@keyframes betapulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(45, 212, 255, 0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(45, 212, 255, 0); }
}

/* ===== iOS BETA ANNOUNCEMENT ===== */
.beta-section {
    position: relative;
    border-radius: 4rem;
    padding: 5rem 3rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 0%, rgba(45, 212, 255, 0.18), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(156, 39, 176, 0.18), transparent 55%),
        #0a1622;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.beta-section::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 4rem;
    padding: 1px;
    background: linear-gradient(120deg, rgba(45, 212, 255, 0.6), rgba(156, 39, 176, 0.4), rgba(255, 152, 0, 0.4));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
}
@media (max-width: 639px) {
    .beta-section { padding: 3.25rem 1.5rem; border-radius: 2.25rem; }
    .beta-section::before { border-radius: 2.25rem; }
}
.beta-grid-glow {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
    pointer-events: none;
}
/* ===== STORE BADGES =====
   Un solo componente para todos los botones de descarga (hero, anuncio de iOS,
   CTA final): mismo alto, misma tipografia, mismo hover. Antes habia tres
   estilos distintos y el hero solo ofrecia Google Play. */
.store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
@media (min-width: 768px) {
    .store-badges:not(.store-badges--center) { justify-content: flex-start; }
}
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 186px;
    height: 60px;
    padding: 0 22px 0 18px;
    border-radius: 16px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    text-decoration: none;
    transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.store-badge:hover {
    transform: translateY(-2px);
    border-color: rgba(45, 212, 255, 0.55);
    box-shadow: 0 16px 40px -12px rgba(45, 212, 255, 0.35);
}
.store-badge:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }
.store-badge__icon { width: 26px; height: 26px; flex: none; object-fit: contain; }
.store-badge__text { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.store-badge__text small {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 4px;
}
.store-badge__text strong {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.store-badge--lg { height: 68px; min-width: 210px; }

/* En movil (y en la columna estrecha del hero en tablet) los dos caben en una
   fila: 186px fijos cada uno se salian de los ~320px utiles y se apilaban. */
@media (max-width: 479px), (min-width: 768px) and (max-width: 1023px) {
    .store-badges { flex-wrap: nowrap; gap: 10px; width: 100%; }
    .store-badges .store-badge {
        flex: 1 1 0;
        min-width: 0;
        max-width: 200px;
        height: 54px;
        padding: 0 12px;
        gap: 9px;
        justify-content: center;
    }
    .store-badges .store-badge__icon { width: 22px; height: 22px; }
    .store-badges .store-badge__text small { font-size: 0.55rem; margin-bottom: 3px; }
    .store-badges .store-badge__text strong { font-size: 1.02rem; white-space: nowrap; }
}
.store-badge--lg .store-badge__text strong { font-size: 1.5rem; }

/* ===== DONATION CTA (kept + amplified) ===== */
.donate-wrap { position: relative; }
.donate-glow {
    position: absolute;
    inset: -8%;
    background: radial-gradient(circle at 50% 45%, rgba(255, 152, 0, 0.28), rgba(156, 39, 176, 0.16) 45%, transparent 70%);
    filter: blur(55px);
    z-index: 0;
    pointer-events: none;
    animation: donateGlow 4s ease-in-out infinite;
}
@keyframes donateGlow {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}
.donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 100px;
    font-weight: 900;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(120deg, #FF9800, #9C27B0);
    background-size: 200% auto;
    box-shadow: 0 12px 30px rgba(255, 152, 0, 0.32);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background-position 0.5s var(--ease-out);
    animation: donatePulse 2.6s ease-in-out infinite;
    white-space: nowrap;
}
.donate-btn:hover {
    transform: translateY(-2px) scale(1.04);
    background-position: right center;
    box-shadow: 0 18px 44px rgba(156, 39, 176, 0.45);
}
@keyframes donatePulse {
    0%, 100% { box-shadow: 0 12px 30px rgba(255, 152, 0, 0.30); }
    50% { box-shadow: 0 14px 46px rgba(255, 152, 0, 0.55); }
}

/* ===== STICKY MOBILE INSTALL BAR ===== */
.mobile-cta {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 80;
    display: flex;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(7, 17, 28, 0.92);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.35s var(--ease-out);
}
.mobile-cta__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.16);
    text-decoration: none;
}
@media (min-width: 768px) { .mobile-cta { display: none; } }
/* Que la barra fija no tape el final de la pagina en movil. */
@media (max-width: 767px) { body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); } }
