/**
 * Home — UI/UX system (desktop + mobile).
 * Jerarquía visual, tipografía fluida, cards 2×2, CTAs 50/50.
 */

body.page-home {
    --home-text-xs: clamp(0.78rem, 0.85vw, 0.88rem);
    --home-text-sm: clamp(0.88rem, 0.95vw, 1rem);
    --home-text-base: clamp(1rem, 1.05vw, 1.12rem);
    --home-text-lg: clamp(1.15rem, 1.25vw, 1.35rem);
    --home-title-section: clamp(2rem, 3.2vw, 2.85rem);
    --home-title-hero: clamp(2.4rem, 4.5vw, 3.75rem);
    --home-gap-section: clamp(1.75rem, 3vw, 2.75rem);
    --home-gap-card: clamp(0.85rem, 1.2vw, 1.35rem);
}

/* ——— Tipografía y jerarquía ——— */
body.page-home .hero-title {
    font-size: var(--home-title-hero) !important;
    line-height: 1.15 !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 0.65rem !important;
}

body.page-home .hero-subtitle {
    font-size: var(--home-text-lg) !important;
    line-height: 1.62 !important;
    color: rgba(255, 255, 255, 0.82) !important;
    margin-bottom: 1.5rem !important;
    max-width: 38ch;
}

body.page-home .badge {
    font-size: var(--home-text-xs) !important;
    padding: 0.55rem 1.1rem !important;
    margin-bottom: 0.75rem !important;
}

body.page-home .badge-mexico {
    font-size: var(--home-text-xs) !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

body.page-home .content-section {
    gap: 0;
}

body.page-home .cards-section--bridge {
    padding: var(--home-gap-section) clamp(1rem, 3vw, 2.5rem) !important;
}

body.page-home .cards-section--bridge .section-title {
    font-size: var(--home-title-section) !important;
    line-height: 1.18 !important;
    margin-bottom: 0.65rem !important;
    letter-spacing: 1px !important;
}

body.page-home .cards-section .section-subtitle {
    font-size: var(--home-text-base) !important;
    line-height: 1.58 !important;
    color: rgba(255, 255, 255, 0.62) !important;
    margin: 0 auto 1.75rem !important;
    max-width: 54ch;
}

body.page-home .cards-scroll-hint {
    display: none;
}

/* ——— Cards: grid 2×2 fijo (sin carrusel) ——— */
body.page-home .cards-container--rail {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--home-gap-card) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow: visible !important;
}

body.page-home .cards-container--rail > .card {
    min-height: auto !important;
    padding: clamp(1.25rem, 1.8vw, 1.75rem) clamp(1rem, 1.4vw, 1.4rem) !important;
    border-radius: 18px !important;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.025) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

body.page-home .cards-container--rail > .card:nth-child(4) {
    grid-column: auto;
}

body.page-home .cards-container--rail > .card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 243, 255, 0.35) !important;
    box-shadow: 0 16px 40px rgba(0, 243, 255, 0.12) !important;
}

body.page-home .cards-container--rail .card-icon-container {
    margin-bottom: 1rem !important;
}

body.page-home .cards-container--rail .card-icon {
    width: clamp(44px, 3.5vw, 52px) !important;
    height: clamp(44px, 3.5vw, 52px) !important;
    font-size: clamp(1.15rem, 1.4vw, 1.45rem) !important;
    border-radius: 14px !important;
}

body.page-home .cards-container--rail .card h3 {
    font-size: clamp(1.05rem, 1.15vw, 1.3rem) !important;
    line-height: 1.28 !important;
    margin-bottom: 0.65rem !important;
}

body.page-home .cards-container--rail .card p {
    font-size: var(--home-text-sm) !important;
    line-height: 1.58 !important;
    margin-bottom: 1.15rem !important;
    color: rgba(255, 255, 255, 0.78) !important;
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
}

body.page-home .cards-container--rail .card-button,
body.page-home .cards-container--rail .modern-button {
    font-size: clamp(0.78rem, 0.82vw, 0.88rem) !important;
    padding: 0.75rem 1rem !important;
    min-height: 44px !important;
    letter-spacing: 0.5px;
}

/* Pilares */
body.page-home .hero-pillars-band .hero-pillars-label {
    font-size: var(--home-text-xs);
    letter-spacing: 0.18em;
}

body.page-home .hero-pillars-band .feature-head h3,
body.page-home .hero-pillars-band .feature-text h3 {
    font-size: var(--home-text-base);
}

body.page-home .hero-pillars-band .feature-desc,
body.page-home .hero-pillars-band .feature-text p {
    font-size: var(--home-text-sm);
    line-height: 1.55;
}

/* IA highlights 33/33/33 */
body.page-home .ia-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: var(--home-gap-card) !important;
}

body.page-home .ia-highlight h4 {
    font-size: var(--home-text-base);
}

body.page-home .ia-highlight p {
    font-size: var(--home-text-sm);
    line-height: 1.55;
}

/* ——— Escritorio: balance hero ——— */
@media (min-width: 969px) {
    body.page-home .home-hero-zone {
        margin-top: 1.5rem;
    }

    body.page-home .content-section {
        padding: clamp(1.5rem, 2.5vw, 2.5rem) clamp(1.25rem, 3vw, 3rem);
        justify-content: center;
    }

    body.page-home .cards-section--bridge .section-title,
    body.page-home .cards-section .section-subtitle {
        text-align: center;
    }

    body.page-home .cards-section--bridge::after {
        display: none;
    }
}

/* ——— Tablet / móvil ——— */
@media (max-width: 968px) {
    body.page-home {
        padding-top: 4.85rem;
    }

    body.page-home .home-hero-zone {
        margin-top: 0.2rem;
    }

    body.page-home .home-intro-bridge {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    body.page-home .content-section {
        padding: 0.75rem 0.9rem 0.65rem;
        align-items: flex-start;
    }

    body.page-home .hero-subtitle {
        max-width: 100%;
        margin-bottom: 1.15rem !important;
    }

    body.page-home .hero-cta-stack,
    body.page-home .hero-trust,
    body.page-home .hero-proof-note {
        align-self: stretch;
        width: 100%;
        max-width: 100%;
    }

    body.page-home .visual-section {
        min-height: clamp(300px, 56vw, 400px) !important;
        max-height: none !important;
        border-radius: 20px;
        background:
            radial-gradient(ellipse 90% 80% at 50% 40%, rgba(0, 243, 255, 0.1) 0%, transparent 68%),
            radial-gradient(ellipse 60% 50% at 50% 55%, rgba(185, 103, 255, 0.07) 0%, transparent 70%);
    }

    body.page-home .cards-section--bridge .section-title,
    body.page-home .cards-section .section-subtitle {
        text-align: left;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: none;
    }

    body.page-home .cards-scroll-hint {
        display: none !important;
    }

    body.page-home .cards-section--bridge {
        position: relative;
        overflow: visible;
    }

    body.page-home .cards-section--bridge::after {
        display: none;
    }

    /* Cards: grid fijo 2×2 (sin carrusel) */
    body.page-home .cards-container--rail {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-flow: row !important;
        gap: 0.65rem !important;
        overflow: visible !important;
        scroll-snap-type: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body.page-home .cards-container--rail > .card {
        flex: unset !important;
        min-width: 0 !important;
        width: auto !important;
        scroll-snap-align: unset;
        grid-column: auto !important;
        padding: 1rem 0.85rem !important;
    }

    body.page-home .cards-container--rail > .card:nth-child(4) {
        grid-column: auto;
    }

    body.page-home .cards-container--rail .card-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.05rem !important;
    }

    body.page-home .cards-container--rail .card h3 {
        font-size: clamp(0.88rem, 3.2vw, 1rem) !important;
    }

    body.page-home .cards-container--rail .card p {
        font-size: clamp(0.78rem, 2.8vw, 0.88rem) !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden !important;
    }

    body.page-home .cards-container--rail .card-button,
    body.page-home .cards-container--rail .modern-button {
        font-size: clamp(0.62rem, 2vw, 0.72rem) !important;
        padding: 0.5rem 0.55rem !important;
        min-height: 36px !important;
    }

    body.page-home .hero-pillars-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    body.page-home .hero-pillars-row {
        grid-template-columns: 1fr;
    }

    body.page-home .home-hero-zone {
        margin-top: 0;
    }

    body.page-home .content-section {
        padding: 0.6rem 0.85rem 0.6rem;
    }

    body.page-home .badge {
        margin-bottom: 0.45rem !important;
    }

    body.page-home .badge-mexico {
        margin-bottom: 0.55rem !important;
    }

    body.page-home .ia-highlights {
        gap: 0.5rem !important;
    }

    body.page-home .ia-highlight {
        padding: 0.85rem 0.55rem !important;
    }
}
