/* =========================================================
   Portada (index.html) — sigue la maqueta "Landing de logística
   inteligente NEXU Express": hero azul con ola, aliados, tres
   herramientas, tres pasos, la app y la franja final.
   Lo compartido con las demás páginas (navbar, footer, .btn,
   .phone, colores) vive en style.css.
   ========================================================= */

.t-red { color: var(--primary); }
.t-blue { color: var(--secondary); }

/* ---------- Navbar: tarjeta blanca flotante sobre el azul ---------- */
.home .navbar {
    top: 1rem;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
}

.home .navbar .container {
    max-width: calc(1200px + 4rem);
    padding: 0.7rem 0.8rem 0.7rem 1.75rem;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 40px -22px rgba(20, 18, 110, 0.55);
}

.home .navbar.scrolled {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.home .navbar .container,
.home .navbar.scrolled .container {
    margin-inline: max(1rem, calc((100% - 1200px - 4rem) / 2));
}

.home .brand-logo {
    height: 50px;
}

.home .nav-links {
    gap: 2.25rem;
}

.home .nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
}

.home .nav-links .nav-login {
    margin-left: 1.5rem;
    color: var(--secondary);
    font-weight: 600;
}

.home .nav-links .btn {
    padding: 0.7rem 1.4rem;
    border-radius: 14px;
}

/* ========================================================= */
/* Hero                                                      */
/* ========================================================= */
.h-hero {
    position: relative;
    overflow: hidden;
    padding: 9.5rem 0 11rem;
    color: #fff;
    background: radial-gradient(110% 90% at 0% 0%, var(--secondary-light) 0%, var(--secondary) 45%, var(--azul-hondo) 100%);
}

.h-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}

.h-hero .brand-stripes {
    margin-bottom: 1.1rem;
}

.h-kicker {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
}

.h-hero h1 {
    margin: 0;
    font-size: clamp(2.35rem, 4vw, 3.5rem);
    line-height: 1.12;
    text-wrap: balance;
}

.h-hero h1 .pill-red {
    margin-top: 0.18em;
    white-space: nowrap;
}

.h-lead {
    margin: 1.5rem 0 0;
    max-width: 34rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.h-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.h-actions .btn {
    border-radius: 16px;
}

.h-btn-outline {
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    background: transparent;
    color: #fff;
}

.h-btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

.h-hero a:focus-visible {
    outline-color: #fff;
}

.h-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.25rem 0 0;
    padding: 0.55rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    font-weight: 500;
}

.h-chip svg {
    flex-shrink: 0;
}

.h-badges {
    margin-top: 1.5rem;
}

/* --- Teléfonos del hero --- */
.h-hero-visual {
    position: relative;
    min-height: 34rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.h-hero-visual .phone {
    animation: none;
}

.h-phone-front {
    width: 280px;
    transform: translateX(3.5rem) rotate(4deg);
    z-index: 2;
}

.h-phone-back {
    position: absolute;
    width: 240px;
    transform: translateX(-7.5rem) translateY(1.5rem) rotate(-7deg);
    z-index: 1;
    filter: saturate(0.95);
}

.h-float {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    color: var(--foreground);
    box-shadow: 0 24px 40px -22px rgba(15, 23, 42, 0.5);
    animation: floatY 5s ease-in-out infinite;
}

.h-float strong {
    display: block;
    font-size: 0.875rem;
    line-height: 1.3;
}

.h-float small {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
}

.h-float-1 {
    left: 0;
    bottom: 12%;
}

.h-float-2 {
    right: -1rem;
    top: 14%;
    animation-delay: 1.4s;
}

.h-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    flex-shrink: 0;
}

.is-green { background: #dcfce7; color: #15803d; }
.h-float-icon.is-red { background: var(--primary-soft); color: var(--primary); }

/* --- Ola y franjas --- */
.h-wave {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 140px;
}

.h-swoosh {
    position: absolute;
    z-index: 1;
    bottom: -1px;
    height: 110px;
}

.h-swoosh-left {
    left: 0;
    width: 38%;
}

.h-swoosh-right {
    right: 0;
    width: 30%;
    height: 150px;
}

/* ========================================================= */
/* Aliados                                                   */
/* ========================================================= */
.h-aliados {
    padding: 2.5rem 0 3.5rem;
}

.h-aliados-grid {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.h-aliados-text {
    flex-shrink: 0;
    padding-right: 2rem;
    border-right: 1px solid var(--border);
}

.h-aliados-text h2 {
    margin: 0;
    font-size: 1.5rem;
}

.h-aliados-text p {
    margin: 0.35rem 0 0;
    max-width: 14rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--muted);
}

.h-aliados-lista {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.h-aliado {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 0 1 auto;
    min-width: 0;
    justify-content: center;
    height: 4.25rem;
    padding: 0 0.8rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.45);
}

.h-aliado img {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.h-aliado img.is-boxed {
    border-radius: 6px;
}

.h-aliado img.is-wordmark {
    width: auto;
    height: 1.5rem;
    max-width: 6.75rem;
}

.h-aliado span {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    white-space: nowrap;
}

.h-aliado strong {
    font-size: 0.85rem;
}

.h-aliado small {
    font-size: 0.7rem;
    color: var(--muted);
}

.h-aliado-placa {
    flex-direction: row !important;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 10px;
}

.h-aliado-placa img {
    width: auto;
    height: 1.6rem;
}

/* ========================================================= */
/* Encabezados de sección                                    */
/* ========================================================= */
.h-section-head {
    max-width: 44rem;
    margin: 0 auto 3rem;
    text-align: center;
}

.h-section-head h2 {
    margin: 0;
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    line-height: 1.2;
    text-wrap: balance;
}

.h-section-head p {
    margin: 0.9rem auto 0;
    max-width: 36rem;
    font-size: 1.1rem;
    color: var(--muted);
    text-wrap: balance;
}

/* ========================================================= */
/* Herramientas                                              */
/* ========================================================= */
.h-features {
    padding: 4rem 0 5.5rem;
}

.h-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.h-feature {
    position: relative;
    display: block;
    padding: 1.75rem 1.75rem 4.5rem;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    color: var(--foreground);
    text-decoration: none;
    box-shadow: 0 14px 34px -26px rgba(15, 23, 42, 0.5);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.h-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 44px -26px rgba(15, 23, 42, 0.5);
}

.h-feature.is-tinted {
    background: linear-gradient(180deg, #f3f3ff 0%, #fff 100%);
    border-color: rgba(51, 49, 200, 0.18);
}

.h-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 14px;
}

.h-feature-icon.is-red,
.h-feature-arrow.is-red { background: var(--primary-soft); color: var(--primary); }
.h-feature-icon.is-blue,
.h-feature-arrow.is-blue { background: var(--secondary-soft); color: var(--secondary); }

.h-feature h3 {
    margin: 1.25rem 0 0.5rem;
    font-size: 1.4rem;
}

.h-feature p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.h-feature-arrow {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    transition: transform 0.25s ease;
}

.h-feature:hover .h-feature-arrow {
    transform: translateX(3px);
}

/* ========================================================= */
/* Tres pasos                                                */
/* ========================================================= */
.h-steps {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0 5rem;
    background: linear-gradient(180deg, #eef0fc 0%, #f5f6fe 100%);
}

.h-steps-ruta {
    position: absolute;
    pointer-events: none;
}

.h-steps-ruta-izq {
    left: 0;
    top: 2rem;
    width: 16rem;
}

.h-steps-ruta-der {
    right: 2rem;
    top: 1.5rem;
    width: 17rem;
}

.h-steps .h-section-head {
    position: relative;
    margin-bottom: 3.5rem;
}

.h-steps-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Conector punteado entre tarjetas */
.h-steps-grid::before {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    border-top: 2px dashed rgba(51, 49, 200, 0.3);
}

.h-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 2rem 1.75rem 1.75rem;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 36px -26px rgba(20, 18, 110, 0.5);
}

.h-step-num {
    position: absolute;
    top: -1rem;
    left: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 8px 16px -6px rgba(225, 29, 42, 0.6);
}

.h-step-icon {
    flex-shrink: 0;
    color: var(--secondary);
}

.h-step h3 {
    margin: 0;
    font-size: 1.15rem;
}

.h-step p {
    margin: 0.3rem 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #475569;
}

/* ========================================================= */
/* La app                                                    */
/* ========================================================= */
.h-app {
    padding: 5.5rem 0;
}

.h-app-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    justify-items: center;
}

.h-app-item {
    margin: 0;
    text-align: center;
}

.h-app-item .phone {
    width: 220px;
    animation: none;
}

.h-app-item figcaption {
    margin-top: 1.5rem;
    max-width: 15rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--muted);
}

.h-app-item figcaption strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.15rem;
    color: var(--foreground);
}

.h-app-badges {
    justify-content: center;
    margin-top: 3rem;
}

/* ========================================================= */
/* Preguntas frecuentes                                      */
/* ========================================================= */
.h-faq {
    padding: 2rem 0 5.5rem;
}

.h-faq .faq-container {
    margin-top: 0;
}

/* ========================================================= */
/* Franja final                                              */
/* ========================================================= */
.h-cta {
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0 4.5rem;
    color: #fff;
    background: radial-gradient(110% 140% at 0% 0%, var(--secondary-light) 0%, var(--secondary) 45%, var(--azul-hondo) 100%);
}

.h-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.h-cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 5rem;
    height: 5rem;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
}

.h-cta-text {
    flex: 1;
    padding-left: 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.h-cta-text h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.h-cta-text p {
    margin: 0.4rem 0 0;
    max-width: 34rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.88);
}

.h-cta-btn {
    border-radius: 16px;
}

.h-cta a:focus-visible {
    outline-color: #fff;
}

.h-cta-swoosh {
    position: absolute;
    right: 0;
    bottom: -1px;
    width: 32%;
    height: 90px;
    pointer-events: none;
}

/* ========================================================= */
/* Responsive                                                */
/* ========================================================= */
@media (max-width: 1080px) {
    .h-app-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3rem 2rem;
    }

    .h-aliados-grid {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .h-aliados-text {
        padding-right: 0;
        border-right: 0;
    }

    .h-aliados-lista {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 968px) {
    .home .navbar .container {
        padding-left: 1.25rem;
    }

    .home .nav-links {
        top: 5.5rem;
        left: 1rem;
        right: 1rem;
        gap: 1.25rem;
        border-radius: 20px;
    }

    .home .nav-links .nav-login {
        margin-left: 0;
    }

    .h-hero {
        padding: 8rem 0 9rem;
    }

    .h-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .h-hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .h-lead {
        margin-inline: auto;
    }

    .h-actions,
    .h-badges {
        justify-content: center;
    }

    .h-hero-visual {
        min-height: 28rem;
    }

    .h-phone-front {
        width: 230px;
        transform: translateX(2.5rem) rotate(4deg);
    }

    .h-phone-back {
        width: 195px;
        transform: translateX(-5.5rem) translateY(1rem) rotate(-7deg);
    }

    .h-feature-grid,
    .h-steps-grid {
        grid-template-columns: 1fr;
    }

    .h-steps-grid {
        gap: 2.25rem;
    }

    .h-steps-grid::before {
        display: none;
    }

    .h-steps-ruta {
        display: none;
    }

    .h-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .h-cta-text {
        padding-left: 0;
        border-left: 0;
    }

    .h-cta-text p {
        margin-inline: auto;
    }
}

@media (max-width: 640px) {
    .home .brand-logo {
        height: 42px;
    }

    .h-hero h1 {
        font-size: 2.35rem;
    }

    .h-actions .btn {
        width: 100%;
    }

    .h-float {
        display: none;
    }

    .h-hero-visual {
        min-height: 24rem;
    }

    .h-phone-front {
        width: 200px;
        transform: translateX(2rem) rotate(4deg);
    }

    .h-phone-back {
        width: 170px;
        transform: translateX(-4.5rem) translateY(1rem) rotate(-7deg);
    }

    .h-swoosh-left {
        width: 70%;
        height: 70px;
    }

    .h-swoosh-right {
        display: none;
    }

    .h-wave {
        height: 80px;
    }

    .h-aliados-lista {
        gap: 0.75rem;
    }

    .h-aliado {
        height: 3.75rem;
        padding: 0 0.85rem;
    }

    .h-app-grid {
        grid-template-columns: 1fr;
    }

    .h-cta-swoosh {
        width: 60%;
        height: 60px;
    }
}
