/**
 * ConlineWeb — Tipografía global unificada (títulos + párrafos)
 * Carga al final del footer en todas las páginas públicas.
 * Complementa typography-safe (clip), home-ui (home) y cw-ds (secundarias).
 */

/* ——— H1 / hero ——— */
:is(
    .hero-title,
    h1.hero-title,
    .hero-section .hero-title,
    .blog-hero .hero-title,
    .mx-directory-hero .hero-title,
    .mx-hub-hero-wrap .hero-title,
    .demos-hub-hero__title,
    .blog-article-title,
    .terms-hero h1,
    .policy-hero h1,
    .container .header h1
) {
    font-family: 'Poiret One', sans-serif !important;
    font-size: var(--cw-title-hero) !important;
    font-weight: 400 !important;
    line-height: 1.32 !important;
    letter-spacing: 0.5px !important;
    color: var(--stardust, #fff) !important;
    text-wrap: balance;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

/* Legal hub/docs: tipografía legible (no Poiret hero) */
body.legal-page .legal-hero h1 {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    font-size: clamp(1.5rem, 3.5vw, 2.1rem) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
    color: #fff !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: none !important;
    text-wrap: wrap !important;
}

body.legal-page .legal-hub-section-title {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    line-height: 1.4 !important;
    color: rgba(255, 255, 255, 0.5) !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.5) !important;
    text-wrap: wrap !important;
}

body.legal-page .legal-hub-card h2 {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.35 !important;
    color: #fff !important;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #fff !important;
    text-wrap: wrap !important;
}

/* ——— H2 / secciones (gradiente) ——— */
:is(
    .section-title,
    .faq-title,
    .ia-title,
    .integrations-title,
    .services-text h2,
    .faq-section > h2,
    .mx-svc-faq > h2,
    .sw-section-title,
    .demos-hub-section-title,
    .portfolio-header h2,
    .mx-hub-heading,
    .mx-directory .section-title,
    .mx-svc-related-title,
    .mx-svc-geo-title,
    .content-section > h2,
    .sw-section > h2,
    .prose-blog h2,
    .doc-prose h2,
    .seo-content > h2,
    .checkout-section > h2,
    .transfer-panel > h2,
    .home-benefits__title,
    .home-why__title,
    .cw-home-deliver__title,
    .home-demos-section__title,
    .reviews-title,
    .neon-title:not(.swal2-title),
    .site-directory-section-title,
    .mx-hub-block-head h2
) {
    font-family: 'Poiret One', sans-serif !important;
    font-size: var(--cw-title-section) !important;
    font-weight: 400 !important;
    line-height: 1.38 !important;
    letter-spacing: 2px !important;
    background: linear-gradient(
        135deg,
        var(--neon-blue, #00f3ff),
        var(--neon-purple, #b967ff),
        var(--matrix-green, #00ff9d)
    ) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    text-shadow: none !important;
}

/* ——— H2/H3 en tarjetas (legal, términos, módulos) ——— */
:is(
    .legal-card h2,
    .terms-card .card-header h2,
    .policy-card .card-header h2,
    .card-content h3,
    .cards-grid-balanced .card h3,
    .sw-signals-title,
    .blog-toc-title,
    .blog-sidebar-cta h3,
    .blog-inline-cta h3,
    .prose-blog h3,
    .doc-prose h3,
    .terms-card h3,
    .legal-card-body h3,
    .seo-content h3,
    .container .body .section > h2
) {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    font-size: var(--cw-title-card) !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    color: var(--stardust, #fff) !important;
}

/* ——— H3 módulos CTA ——— */
:is(
    .personal-consult-module h3,
    .cta-module h3,
    .contact-band__title
) {
    font-family: 'Poiret One', sans-serif !important;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem) !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    letter-spacing: 1px !important;
    color: var(--stardust, #fff) !important;
}

/* ——— Subtítulos / lead ——— */
:is(
    .hero-subtitle,
    .section-subtitle,
    .ia-subtitle,
    .integrations-subtitle,
    .sw-section-lead,
    .faq-section > .section-subtitle,
    .faq-section > .section-label,
    .section-label,
    .mx-directory-subtitle,
    .mx-geo-services .section-subtitle,
    .mx-geo-solutions .section-subtitle,
    .mx-geo-related .section-subtitle,
    .demos-hub-hero__lead,
    .legal-hero p,
    .terms-hero p,
    .policy-hero p,
    .blog-article-lead,
    .faq-subtitle,
    .container .header p,
    .home-benefits__lead,
    .home-why__lead,
    .cw-home-deliver__lead,
    .cw-home-deliver__tagline,
    .home-demos-section__lead,
    .reviews-lead,
    .hero-intro,
    .hero-intro p
) {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    font-size: var(--cw-text-lg) !important;
    line-height: 1.62 !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.72) !important;
}

:is(.hero-subtitle, .hero-intro > .hero-subtitle, .asesoria-hero-intro .hero-subtitle) {
    font-size: var(--cw-text-hero-sub, clamp(0.95rem, 1.05vw, 1.05rem)) !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.72) !important;
}

/* ——— Párrafos de contenido ——— */
:is(
    .content-section p,
    .services-text p,
    .services-section p,
    .ia-module p,
    .integrations-section p,
    .card-content p,
    .feature p,
    .mx-directory-body p,
    .mx-svc-links-body span,
    .blog-article-body p,
    .prose-blog p,
    .doc-prose p,
    .legal-content p,
    .legal-card-body p,
    .legal-card-body li,
    .terms-card p,
    .terms-card li,
    .policy-card p,
    .policy-card li,
    .main-content p,
    .main-content li,
    .sw-section p,
    .sw-section li,
    .faq-section .accordion-content p,
    .personal-consult-module > p,
    .cta-module > p,
    .checkout-section p,
    .transfer-panel p,
    .container .body .section p,
    .seo-content p,
    .seo-content li
) {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    font-size: var(--cw-text-base) !important;
    line-height: 1.65 !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.78) !important;
}

.mx-svc-links-body strong {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    font-size: var(--cw-text-sm) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--stardust, #fff) !important;
}

/* ——— Móvil (≤968px): escala unificada sitio ——— */
@media (max-width: 968px) {
    :is(
        .hero-title,
        h1.hero-title,
        .main-title,
        .hero-section .main-title,
        .hero-section .hero-title,
        .blog-hero .hero-title,
        .blog-article-title,
        .mx-directory-hero .hero-title,
        .mx-hub-hero-wrap .hero-title,
        .demos-hub-hero__title,
        .legal-hero h1,
        .terms-hero h1,
        .policy-hero h1,
        .container .header h1,
        .asesoria-hero-intro .hero-title
    ) {
        font-size: var(--cw-title-hero) !important;
        line-height: 1.32 !important;
        letter-spacing: 0.2px !important;
    }

    :is(
        .section-title,
        .faq-title,
        .ia-title,
        .integrations-title,
        .services-text h2,
        .faq-section > h2,
        .mx-svc-faq > h2,
        .sw-section-title,
        .demos-hub-section-title,
        .portfolio-header h2,
        .mx-hub-heading,
        .mx-directory .section-title,
        .mx-svc-related-title,
        .mx-svc-geo-title,
        .content-section > h2,
        .sw-section > h2,
        .prose-blog h2,
        .doc-prose h2,
        .seo-content > h2,
        .checkout-section > h2,
        .transfer-panel > h2,
        .centro-politicas-hero h2,
        .cw-home-deliver__title,
        .home-benefits__title,
        .home-why__title,
        .home-demos-section__title,
        .reviews-title
    ) {
        font-size: var(--cw-title-section) !important;
        line-height: 1.35 !important;
        letter-spacing: 1px !important;
    }

    :is(
        .personal-consult-module h3,
        .cta-module h3,
        .contact-band__title,
        .hero-pillars-label
    ) {
        font-size: var(--cw-title-section) !important;
        line-height: 1.35 !important;
        letter-spacing: 1px !important;
    }

    :is(
        .legal-card h2,
        .terms-card .card-header h2,
        .policy-card .card-header h2,
        .card-content h3,
        .cards-grid-balanced .card h3,
        .sw-signals-title,
        .blog-toc-title,
        .blog-sidebar-cta h3,
        .blog-inline-cta h3,
        .prose-blog h3,
        .doc-prose h3,
        .terms-card h3,
        .legal-card-body h3,
        .seo-content h3,
        .container .body .section > h2,
        .feature-text h3,
        .card h3,
        .highlight h3,
        .sw-section h3,
        .ia-highlight h4,
        .home-benefits__card-title,
        .home-why__item-title,
        .cw-home-deliver__title-row h3
    ) {
        font-size: var(--cw-title-card) !important;
        line-height: 1.32 !important;
    }

    :is(.hero-subtitle, .section-subtitle, .blog-article-lead, .legal-hero p, .container .header p) {
        font-size: var(--cw-text-base) !important;
        line-height: 1.55 !important;
    }

    body.mx-mexico .container.mx-directory-hero .hero-title,
    body.mx-mexico .container.mx-hub-hero-wrap .hero-title {
        font-size: var(--cw-title-hero) !important;
        line-height: 1.32 !important;
    }

    :is(.content-section p, .services-text p, .card-content p, .prose-blog p, .legal-card-body p, .terms-card p, .seo-content p) {
        font-size: var(--cw-text-sm) !important;
        line-height: 1.6 !important;
    }

    /* Títulos de sección con gradiente (no blancos): prioridad sobre CSS de página/home */
    body.page-home .home-flow :is(
        .section-title,
        .faq-title,
        .ia-title,
        .integrations-title,
        .services-text h2,
        .home-demos-section__title,
        .reviews-title
    ),
    body.page-home :is(
        .home-benefits__title,
        .home-why__title,
        .cw-home-deliver__title
    ),
    body.page-home .cards-section--solutions .section-title,
    body.page-home .cards-section--bridge .section-title,
    body:not(.page-home) :is(
        .section-title,
        .sw-section-title,
        .faq-title,
        .ia-title,
        .integrations-title,
        .services-text h2,
        .faq-section > h2,
        .mx-svc-faq > h2,
        .demos-hub-section-title,
        .portfolio-header h2,
        .mx-hub-heading,
        .mx-directory .section-title,
        .mx-svc-related-title,
        .mx-svc-geo-title,
        .content-section > h2,
        .sw-section > h2,
        .seo-content > h2
    ) {
        font-size: var(--cw-title-section) !important;
        line-height: 1.35 !important;
        letter-spacing: 1px !important;
    }
}
