/* ==========================================================================
   SPL WS — Portada
   Capa propia sobre Bootstrap 5.3. Todas las clases llevan el prefijo `hm-`
   (home) para no chocar nunca con las de Bootstrap.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens de marca
   -------------------------------------------------------------------------- */
:root {
    /* Colores corporativos */
    --spl-navy:        #033371;
    --spl-navy-dark:   #022451;
    --spl-blue:        #0066cc;
    --spl-green:       #23d160;

    /* Neutros */
    --spl-ink:         #1f2933;
    --spl-muted:       #5a6a7d;
    --spl-line:        #e4eaf2;
    --spl-surface:     #ffffff;

    /* Fondo de página y degradado de marca */
    --spl-canvas:      linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --spl-brand-grad:  linear-gradient(135deg, var(--spl-navy), var(--spl-blue));
    --spl-brand-grad-hover: linear-gradient(135deg, var(--spl-blue), #3d9bff);

    /* Formas */
    --spl-radius:      14px;
    --spl-radius-lg:   20px;
    --spl-shadow:      0 4px 20px rgba(3, 51, 113, .08);
    --spl-shadow-lift: 0 14px 34px rgba(3, 51, 113, .16);

    /* Tema de Bootstrap con los colores de la empresa */
    --bs-primary: #033371;
    --bs-primary-rgb: 3, 51, 113;
    --bs-link-color: #033371;
    --bs-link-color-rgb: 3, 51, 113;
    --bs-link-hover-color: #0066cc;
    --bs-link-hover-color-rgb: 0, 102, 204;
    --bs-body-color: #1f2933;
}

.btn-primary {
    --bs-btn-bg: var(--spl-navy);
    --bs-btn-border-color: var(--spl-navy);
    --bs-btn-hover-bg: var(--spl-blue);
    --bs-btn-hover-border-color: var(--spl-blue);
    --bs-btn-active-bg: var(--spl-navy-dark);
    --bs-btn-active-border-color: var(--spl-navy-dark);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

.hm-page {
    background: var(--spl-canvas);
    background-attachment: fixed;
    color: var(--spl-ink);
    min-height: 100vh;
}

.hm-page :focus-visible {
    outline: 2px solid var(--spl-blue);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Botones de la portada: icono y texto siempre alineados */
.hm-page .btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. Encabezado
   -------------------------------------------------------------------------- */
.hm-hero {
    position: relative;
    padding: clamp(3.5rem, 11vh, 7rem) 0 clamp(2rem, 5vh, 3.5rem);
    overflow: hidden;
}

/* Halo blanco suave detrás del contenido */
.hm-hero::before {
    content: "";
    position: absolute;
    inset: -20% 0 auto;
    height: 130%;
    background: radial-gradient(55% 55% at 50% 35%, rgba(255, 255, 255, .65), transparent 70%);
    pointer-events: none;
}

.hm-hero__inner {
    position: relative;
    text-align: center;
}

.hm-hero__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 104px;
    margin-bottom: 1.75rem;
    background: var(--spl-surface);
    border-radius: var(--spl-radius-lg);
    box-shadow: var(--spl-shadow);
}

.hm-hero__mark img {
    width: 64px;
    height: 64px;
    animation: hm-breathe 2.6s ease-in-out 2;
}

.hm-hero__title {
    color: var(--spl-navy);
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-bottom: .75rem;
}

.hm-hero__tagline {
    color: var(--spl-muted);
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    line-height: 1.6;
    max-width: 46ch;
    margin: 0 auto 1.75rem;
}

/* Distintivo de estado */
.hm-status {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    padding: .45rem 1.1rem;
    background: var(--spl-green);
    color: #fff;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(35, 209, 96, .35);
}

.hm-status__dot {
    width: .55rem;
    height: .55rem;
    background: currentColor;
    border-radius: 50%;
    animation: hm-blink 2s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   4. Franja de datos del servicio
   -------------------------------------------------------------------------- */
.hm-facts {
    padding-top: clamp(2rem, 5vh, 3.5rem);
    padding-bottom: clamp(4.5rem, 10vh, 7.5rem);
}

.hm-facts__panel {
    background: var(--spl-surface);
    border-radius: var(--spl-radius-lg);
    box-shadow: var(--spl-shadow);
    overflow: hidden;
}

.hm-fact {
    padding: 1.75rem 1rem;
    text-align: center;
}

.hm-fact__icon {
    color: var(--spl-blue);
    font-size: 1.4rem;
}

.hm-fact__value {
    display: block;
    margin: .6rem 0 .15rem;
    color: var(--spl-navy);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.hm-fact__value--long {
    font-size: 1.05rem;
    padding-top: .28rem;
    padding-bottom: .28rem;
}

.hm-fact__label {
    color: var(--spl-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Separadores: rejilla de 2 columnas en móvil, de 4 desde lg */
@media (max-width: 991.98px) {
    .hm-facts__panel .col-6:nth-child(even) .hm-fact { border-left: 1px solid var(--spl-line); }
    .hm-facts__panel .col-6:nth-child(n+3) .hm-fact { border-top: 1px solid var(--spl-line); }
}

@media (min-width: 992px) {
    .hm-facts__panel [class*="col-"] + [class*="col-"] .hm-fact {
        border-left: 1px solid var(--spl-line);
    }
}

/* --------------------------------------------------------------------------
   5. Bloques de contenido
   -------------------------------------------------------------------------- */
.hm-block {
    padding-bottom: clamp(3rem, 8vh, 5.5rem);
}

.hm-block--last {
    padding-bottom: clamp(3.5rem, 9vh, 6rem);
}

.hm-block__head {
    text-align: center;
    max-width: 52ch;
    margin: 0 auto clamp(2rem, 5vh, 3rem);
}

.hm-block__title {
    color: var(--spl-navy);
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -.01em;
    margin-bottom: .75rem;
}

.hm-block__lead {
    color: var(--spl-muted);
    font-size: 1rem;
    line-height: 1.65;
    margin: 0;
}

/* --------------------------------------------------------------------------
   6. Tarjetas de características
   -------------------------------------------------------------------------- */
.hm-feature {
    position: relative;
    height: 100%;
    padding: 2rem 1.75rem;
    background: var(--spl-surface);
    border-radius: var(--spl-radius);
    box-shadow: var(--spl-shadow);
    transition: transform .3s ease, box-shadow .3s ease;
}

.hm-feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--spl-shadow-lift);
}

/* Al pasar el mouse el ícono cambia de color */
.hm-feature:hover .hm-feature__icon {
    background: var(--spl-brand-grad-hover);
    box-shadow: 0 8px 20px rgba(0, 102, 204, .35);
}

.hm-feature__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 1.25rem;
    background: var(--spl-brand-grad);
    border-radius: var(--spl-radius);
    color: #fff;
    font-size: 1.4rem;
    box-shadow: 0 6px 16px rgba(3, 51, 113, .25);
    transition: background .3s ease, box-shadow .3s ease;
}

.hm-feature__title {
    color: var(--spl-navy);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.hm-feature__text {
    color: var(--spl-muted);
    font-size: .95rem;
    line-height: 1.6;
    margin: 0;
}

/* --------------------------------------------------------------------------
   7. Llamada a la acción
   -------------------------------------------------------------------------- */
.hm-cta {
    position: relative;
    padding: clamp(2.25rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
    background: var(--spl-brand-grad);
    border-radius: var(--spl-radius-lg);
    box-shadow: var(--spl-shadow-lift);
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.hm-cta::before {
    content: "";
    position: absolute;
    top: -55%;
    right: -12%;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(255, 255, 255, .13), transparent 62%);
    pointer-events: none;
}

.hm-cta__title,
.hm-cta__text,
.hm-cta__actions {
    position: relative;
}

.hm-cta__title {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    margin-bottom: .75rem;
}

.hm-cta__text {
    color: rgba(255, 255, 255, .88);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 52ch;
    margin: 0 auto 1.75rem;
}

.hm-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}

.hm-cta .btn-light {
    --bs-btn-color: var(--spl-navy);
    --bs-btn-hover-color: var(--spl-navy);
}

/* --------------------------------------------------------------------------
   8. Pie
   -------------------------------------------------------------------------- */
.hm-footer {
    background: var(--spl-surface);
    border-top: 1px solid var(--spl-line);
    padding: 2rem 0;
    text-align: center;
}

.hm-footer__brand {
    color: var(--spl-muted);
    margin-bottom: .35rem;
}

.hm-footer__brand strong { color: var(--spl-navy); }

.hm-footer__sep {
    color: var(--spl-line);
    margin: 0 .35rem;
}

.hm-footer__legal {
    color: #8b98a8;
    font-size: .8rem;
    margin: 0;
}

/* --------------------------------------------------------------------------
   9. Animaciones
   -------------------------------------------------------------------------- */
.hm-reveal {
    animation: hm-rise .55s ease-out both;
    animation-delay: calc(var(--hm-i, 0) * 70ms);
}

@keyframes hm-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

@keyframes hm-breathe {
    0%, 100% { transform: none; }
    50%      { transform: scale(1.07); }
}

@keyframes hm-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}

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

    .hm-reveal,
    .hm-hero__mark img,
    .hm-status__dot {
        animation: none;
    }

    .hm-feature:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   10. Pantallas chicas
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .hm-hero__mark {
        width: 88px;
        height: 88px;
        margin-bottom: 1.25rem;
    }

    .hm-hero__mark img {
        width: 52px;
        height: 52px;
    }

    .hm-fact { padding: 1.25rem .75rem; }
    .hm-fact__value { font-size: 1.35rem; }
    .hm-fact__value--long { font-size: .95rem; }

    .hm-feature { padding: 1.5rem 1.25rem; }

    .hm-feature__icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .hm-cta__actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Áreas de toque cómodas en pantallas táctiles */
@media (hover: none) {
    .hm-page .btn { min-height: 44px; }
    .hm-feature:hover { transform: none; box-shadow: var(--spl-shadow); }

    .hm-feature:hover .hm-feature__icon {
        background: var(--spl-brand-grad);
        box-shadow: 0 6px 16px rgba(3, 51, 113, .25);
    }
}
