/* ============================================================
   Onnix — Responsive (mobile-first, §19)
   Base = móvil. Los siguientes bloques ESCALAN hacia arriba.
   ============================================================ */

/* ---------- ≥ 576px ---------- */
@media (max-width: 575.98px) {
    .brand__logo {
        height: 34px;
        max-width: 155px;
    }

    .header__inner {
        gap: 0.8rem;
    }

    .header__actions {
        display: none !important;
    }

    .btn {
        white-space: normal;
        text-align: center;
    }

    .btn--lg {
        width: 100%;
        padding-inline: 1rem;
        font-size: 1rem;
    }

    .hero__actions,
    .cta-final__actions,
    .section-cta {
        width: 100%;
    }

    .hero__actions .btn,
    .cta-final__actions .btn,
    .section-cta .btn,
    .featured-service .btn {
        width: 100%;
    }

    .page-hero__title,
    .hero__title,
    .section__title,
    .cta-final__title {
        max-width: 100%;
    }

    .featured-service__card {
        padding: 1.35rem;
        border-radius: var(--radius-md);
    }

    .featured-service__capabilities {
        display: grid;
        grid-template-columns: 1fr;
    }

    .chip {
        width: 100%;
        text-align: center;
    }

    .whatsapp-widget {
        gap: 0.5rem;
    }

    .whatsapp-widget__label {
        min-height: 44px;
        padding-inline: 0.9rem;
        font-size: 0.82rem;
    }

    .whatsapp-widget__close {
        width: 20px;
        height: 20px;
        left: -0.45rem;
    }

    .whatsapp-float {
        width: 58px;
        height: 58px;
    }

    .whatsapp-float svg {
        width: 29px;
        height: 29px;
    }
}

@media (max-width: 420px) {
    .whatsapp-widget__label,
    .whatsapp-widget__close {
        display: none;
    }

    .whatsapp-widget {
        right: 0.9rem;
        bottom: 0.9rem;
    }

    .whatsapp-float {
        width: 54px;
        height: 54px;
    }
}

@media (min-width: 576px) {
    .form__row--2 {
        grid-template-columns: 1fr 1fr;
    }

    .clients__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- ≥ 768px (tablet) ---------- */
@media (min-width: 768px) {
    .grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-strip__list {
        grid-template-columns: repeat(2, 1fr);
    }

    .origin__inner {
        grid-template-columns: 1.05fr 0.95fr;
    }

    .contact__inner {
        grid-template-columns: 0.85fr 1.15fr;
    }

    .contact__channels--grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-hero-card,
    .contact-band__inner {
        grid-template-columns: 1fr auto;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .clients__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .needs-results {
        grid-template-columns: 1fr 1fr;
    }

    .legal-layout {
        grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
    }

    .legal-toc {
        position: sticky;
        top: calc(var(--header-height-scrolled) + 1.25rem);
        max-height: calc(100vh - var(--header-height-scrolled) - 2.5rem);
        overflow-y: auto;
    }
}

/* ---------- ≥ 992px (desktop: aparece la navegación completa) ---------- */
@media (min-width: 992px) {
    .nav {
        display: block;
    }

    .header__actions {
        display: flex;
    }

    .hamburger {
        display: none;
    }

    .mobile-menu {
        display: none;
    }

    /* Navegación compacta para que 7 ítems + CTA quepan en pantallas medianas */
    .nav__list {
        gap: 0.1rem;
    }

    .nav__link {
        padding: 0.5rem 0.6rem;
        font-size: 0.9rem;
    }

    .header__actions .btn {
        padding: 0.7rem 1.15rem;
        font-size: 0.9rem;
    }

    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .featured-service__card {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: center;
    }

    .trust-strip__list {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }

    .clients__grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .footer__grid {
        grid-template-columns: 1.6fr 1fr 1fr 1fr;
        gap: 3rem;
    }

    .footer__bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (max-width: 1199.98px) {
    .header__actions {
        display: none !important;
    }
}

/* ---------- ≥ 1200px (navegación con tamaño cómodo) ---------- */
@media (min-width: 1200px) {
    .nav__list {
        gap: 0.3rem;
    }

    .nav__link {
        padding: 0.55rem 0.85rem;
        font-size: var(--fs-small);
    }

    .header__actions .btn {
        padding: 0.8rem 1.5rem;
        font-size: var(--fs-body);
    }

    .grid--soluciones {
        grid-template-columns: repeat(3, 1fr);
    }

    .tech-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ---------- ≥ 1440px ---------- */
@media (min-width: 1440px) {
    :root {
        --header-height: 92px;
    }
}

/* ---------- Preferencia de contraste alto ---------- */
@media (prefers-contrast: more) {
    :root {
        --color-text-muted: #d4dae5;
        --color-border: rgba(255, 255, 255, 0.22);
    }
}

/* ---------- Impresión ---------- */
@media print {
    .header,
    .mobile-menu,
    .hero__grid-bg,
    .whatsapp-widget {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}
