/* ============================================================
   seo.css — PORTADA DE ENTRADA v17.0
   ------------------------------------------------------------
   Dos cometidos que van de la mano:

   1. INTRO PREMIUM. Refina la pantalla de bienvenida con una
      entrada escalonada, retícula anatómica de fondo, sellos de
      garantía y una jerarquía tipográfica seria. Todo apoyado
      sobre las reglas .splash-* que ya existen en style.css:
      aquí sólo se añade y se matiza, no se duplica.

   2. CONTENIDO INDEXABLE. La aplicación vive tras
      `.app { display: none }`, así que sin texto real en la
      portada los buscadores no verían más que un logotipo y un
      botón. Esta hoja da forma a ese contenido.
   ============================================================ */

/* ============================================================
   1 · LIENZO DE LA PORTADA
   ============================================================ */

/* La portada pasa a ser desplazable para alojar el texto.
   `align-items: flex-start` evita que el contenido se recorte
   por arriba cuando es más alto que la ventana. */
/* `.splash` es un contenedor flex en style.css. Al añadir el
   artículo indexable pasó a tener DOS hijos, que se colocaban uno
   al lado del otro y desbordaban la pantalla en el móvil. Se apila
   en columna: presentación arriba, texto debajo. */
.splash {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Retícula sutil: evoca el plano de referencia anatómico sin
   competir con el contenido. Se difumina hacia los bordes. */
.splash-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 233, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 233, .055) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 78% 58% at 50% 32%, #000 35%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 78% 58% at 50% 32%, #000 35%, transparent 100%);
}

.splash-content {
    padding: clamp(2.2rem, 7vh, 4rem) 2rem 1.5rem;
    width: 100%;
    max-width: 460px;
    flex: 0 0 auto;   /* no se comprime ni se estira dentro de la columna */
}

/* Ningún hijo de la portada puede empujar el ancho de la ventana. */
.splash > * { min-width: 0; max-width: 100%; }

/* ============================================================
   2 · ENTRADA ESCALONADA
   ------------------------------------------------------------
   Los elementos aparecen en cascada. El retardo se declara
   elemento a elemento para que la lectura siga la jerarquía:
   emblema → categoría → título → promesa → cifras → acción.
   ============================================================ */
@keyframes splashRise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.splash-content > * {
    animation: splashRise .72s cubic-bezier(.22, .8, .28, 1) both;
}
.splash-logo-wrap    { animation-delay: .04s; }
.splash-eyebrow      { animation-delay: .13s; }
.splash-title        { animation-delay: .19s; }
.splash-subtitle     { animation-delay: .25s; }
.splash-claim        { animation-delay: .31s; }
.splash-stats        { animation-delay: .37s; }
.splash-badges       { animation-delay: .43s; }
.splash-btn          { animation-delay: .49s; }
.splash-credits      { animation-delay: .56s; }
.splash-lang-selector{ animation-delay: .62s; }
.seo-scroll-hint     { animation-delay: .70s; }

/* Halo tras el emblema: da profundidad al par de imanes */
.splash-logo-wrap {
    position: relative;
    margin-bottom: 1.6rem;
}
.splash-logo-wrap::before {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 260px; height: 260px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(129, 140, 248, .17) 0%, transparent 68%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================================
   3 · JERARQUÍA TIPOGRÁFICA
   ============================================================ */

/* Categoría de la obra: fija el registro profesional */
.splash-eyebrow {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 5px 15px;
    border-radius: 999px;
    border: 1px solid rgba(167, 139, 250, .3);
    background: rgba(129, 140, 248, .1);
    color: #C7D2FE;
    font-size: .69rem;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.splash-title {
    font-size: clamp(2.3rem, 9vw, 3rem);
    margin-bottom: .6rem;
}

/* La segunda línea del título hereda de style.css un tamaño
   menor; se refuerza para que el conjunto lea como una unidad. */
.splash-title .splash-title-accent {
    font-weight: 300;
    font-size: .62em;
    letter-spacing: .01em;
}

.splash-subtitle {
    margin-bottom: 1rem;
    font-size: .93rem;
}

/* Promesa concreta: es el argumento diferencial de la obra */
.splash-claim {
    max-width: 27em;
    margin: 0 auto 1.8rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .09);
    color: rgba(255, 255, 255, .72);
    font-size: .87rem;
    line-height: 1.62;
    font-weight: 300;
}

/* ============================================================
   4 · CIFRAS Y SELLOS
   ============================================================ */

/* Las cifras se leen mejor con ancho de dígito constante */
.splash-stat-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

.splash-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin: 0 0 1.9rem;
    padding: 0;
    list-style: none;
}

.splash-badges li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .045);
    color: rgba(255, 255, 255, .8);
    font-size: .73rem;
    font-weight: 500;
    letter-spacing: .01em;
    backdrop-filter: blur(12px);
}

.splash-badges i {
    font-size: .72rem;
    color: #A78BFA;
}

/* Botón principal: brillo que recorre la superficie al pasar */
.splash-btn {
    position: relative;
    overflow: hidden;
    padding: 15px 40px;
}

.splash-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 55%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .3), transparent);
    transition: left .6s ease;
}

.splash-btn:hover::after { left: 130%; }

.splash-btn i { transition: transform .25s ease; }
.splash-btn:hover i { transform: translateX(4px); }

/* ============================================================
   5 · INVITACIÓN A SEGUIR LEYENDO
   ============================================================ */
.seo-scroll-hint {
    display: block;
    width: fit-content;
    margin: 2rem auto .5rem;
    padding-bottom: 20px;
    color: rgba(255, 255, 255, .42);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .13em;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
}

.seo-scroll-hint:hover { color: rgba(255, 255, 255, .8); }

/* Punta de flecha dibujada en CSS, sin dependencia de iconos */
.seo-scroll-hint::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 4px;
    width: 7px; height: 7px;
    margin-left: -4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    animation: seoHintBob 2.1s ease-in-out infinite;
}

@keyframes seoHintBob {
    0%, 100% { transform: rotate(45deg) translate(0, 0);       opacity: .4; }
    50%      { transform: rotate(45deg) translate(3px, 3px);   opacity: 1;  }
}

/* ============================================================
   6 · CONTENIDO INDEXABLE
   ============================================================ */
.seo-landing {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
    padding: 2.5rem 1.6rem 4rem;
    text-align: left;
    color: rgba(255, 255, 255, .66);
    font-size: .9rem;
    line-height: 1.72;
    animation: splashRise .8s cubic-bezier(.22, .8, .28, 1) both;
    animation-delay: .78s;
}

/* Filete superior: separa la presentación del cuerpo de texto */
.seo-landing::before {
    content: '';
    display: block;
    width: 54px;
    height: 2px;
    margin: 0 0 2.2rem;
    border-radius: 2px;
    background: linear-gradient(90deg, #6366F1, #A78BFA);
}

.seo-landing h2 {
    margin: 2.2rem 0 .7rem;
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.01em;
    color: #F1F5F9;
}

.seo-landing h2:first-of-type { margin-top: 0; }

.seo-landing h3 {
    margin: 2rem 0 .6rem;
    font-size: 1.01rem;
    font-weight: 600;
    color: #E2E8F0;
}

.seo-landing p { margin: 0 0 .9rem; }

.seo-landing strong { color: #F1F5F9; font-weight: 600; }
.seo-landing em     { color: #C7D2FE; font-style: normal; }

/* ---------- Rejilla de características ---------- */
.seo-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
    gap: 10px;
    margin: 1.3rem 0 .5rem;
    padding: 0;
    list-style: none;
}

.seo-features li {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    font-size: .83rem;
    line-height: 1.58;
    backdrop-filter: blur(14px);
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.seo-features li:hover {
    border-color: rgba(167, 139, 250, .32);
    background: rgba(255, 255, 255, .065);
    transform: translateY(-2px);
}

.seo-features li b {
    display: block;
    margin-bottom: 4px;
    font-size: .88rem;
    font-weight: 650;
    color: #E9EDF7;
}

/* ---------- Cifras del corpus ---------- */
.seo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
    margin: 1.2rem 0 .5rem;
    padding: 0;
    list-style: none;
}

.seo-stats li {
    padding: 15px 8px;
    text-align: center;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    backdrop-filter: blur(14px);
}

.seo-stats b {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #818CF8, #C4B5FD);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.seo-stats span {
    display: block;
    margin-top: 3px;
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .48);
}

/* ---------- Nube de afecciones indexadas ---------- */
.seo-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: .8rem 0 .5rem;
    padding: 0;
    list-style: none;
}

.seo-terms li {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .035);
    color: rgba(255, 255, 255, .72);
    font-size: .765rem;
    white-space: nowrap;
}

/* ---------- Preguntas frecuentes (refleja el JSON-LD) ---------- */
.seo-faq { margin: .8rem 0 1.4rem; }

.seo-faq details {
    margin-bottom: 7px;
    padding: 12px 16px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    backdrop-filter: blur(14px);
    transition: border-color .2s ease;
}

.seo-faq details[open] { border-color: rgba(167, 139, 250, .3); }

.seo-faq summary {
    cursor: pointer;
    font-size: .87rem;
    font-weight: 600;
    color: #E2E8F0;
    list-style: none;
    padding-right: 22px;
    position: relative;
}

.seo-faq summary::-webkit-details-marker { display: none; }

/* Signo +/− dibujado con dos trazos: el vertical desaparece al abrir */
.seo-faq summary::before,
.seo-faq summary::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 50%;
    width: 11px; height: 1.5px;
    background: #A78BFA;
    border-radius: 2px;
    transition: transform .22s ease, opacity .22s ease;
}
.seo-faq summary::after { transform: rotate(90deg); }
.seo-faq details[open] summary::after { transform: rotate(90deg); opacity: 0; }

.seo-faq details > p {
    margin: .65rem 0 0;
    font-size: .845rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .62);
}

/* ---------- Aviso legal ---------- */
.seo-disclaimer {
    margin: 1.6rem 0 0;
    padding: 14px 16px;
    border-radius: 13px;
    border: 1px solid rgba(245, 158, 11, .26);
    background: rgba(245, 158, 11, .07);
    font-size: .81rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .72);
}

.seo-disclaimer strong { color: #FCD34D; }

.seo-landing a {
    color: #A78BFA;
    text-decoration: none;
    border-bottom: 1px solid rgba(167, 139, 250, .4);
}
.seo-landing a:hover { color: #C4B5FD; }

/* ============================================================
   7 · MÓVIL
   ============================================================ */
@media (max-width: 480px) {
    .splash-content { padding: 2rem 1.25rem 1rem; }
    .splash-eyebrow { font-size: .63rem; letter-spacing: .11em; padding: 5px 12px; }
    .splash-claim   { font-size: .84rem; margin-bottom: 1.5rem; }
    .splash-badges  { gap: 6px; margin-bottom: 1.6rem; }
    .splash-badges li { font-size: .69rem; padding: 5px 11px; }
    .splash-logo-wrap::before { width: 200px; height: 200px; }

    .seo-landing { padding: 2rem 1.25rem 3rem; font-size: .87rem; }
    .seo-landing h2 { font-size: 1.08rem; }
    .seo-features { grid-template-columns: 1fr; }
    .seo-stats { grid-template-columns: repeat(3, 1fr); }
    .seo-stats b { font-size: 1.3rem; }
}

/* Pantallas muy bajas: se recorta el aire vertical del emblema */
@media (max-height: 700px) {
    .splash-content { padding-top: 1.5rem; }
    .splash-logo-wrap { margin-bottom: 1.1rem; }
    .splash-claim { margin-bottom: 1.3rem; }
}

/* ============================================================
   8 · TEMA CLARO
   ------------------------------------------------------------
   La portada mantiene su fondo oscuro en ambos temas —es una
   pantalla de presentación—, así que sólo se ajusta el contraste
   de los elementos que podrían heredar variables claras.
   ============================================================ */
[data-theme="light"] .seo-landing,
[data-theme="light"] .seo-terms li,
[data-theme="light"] .seo-faq details > p {
    color: rgba(255, 255, 255, .68);
}

/* ============================================================
   9 · ACCESIBILIDAD
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .splash-content > *,
    .seo-landing { animation: none; }
    .seo-scroll-hint::after { animation: none; }
    .splash-btn::after { transition: none; }
    .splash { scroll-behavior: auto; }
}

/* Foco visible para navegación con teclado */
.seo-faq summary:focus-visible,
.seo-scroll-hint:focus-visible {
    outline: 2px solid #A78BFA;
    outline-offset: 3px;
    border-radius: 6px;
}

/* ============================================================
   10 · IMPRESIÓN
   ============================================================ */
@media print {
    .splash { position: static; background: #fff; }
    .splash-grid, .splash-orb, .seo-scroll-hint,
    .splash-btn, .splash-lang-selector { display: none !important; }
    .seo-landing { color: #000; max-width: none; }
    .seo-landing h2, .seo-landing h3, .seo-landing strong { color: #000; }
    .seo-faq details { border-color: #ccc; background: none; }
    .seo-faq details > p { color: #222; }
}
