/* ==========================================================================
   Hero premium — homepage (TASK-P0-001)
   Scoped to .hero-premium; no impact on .sub-banner .banner-section
   ========================================================================== */

.hero-premium,
section.hero-premium.banner-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    box-sizing: border-box;
    /* Compensa el padding-top de .content-wrapper y cubre todo el viewport */
    margin-top: calc(-1 * var(--header-offset, 89px));
    min-height: 100svh;
    padding-top: calc(var(--header-offset, 89px) + clamp(1rem, 3vh, 1.75rem)) !important;
    padding-bottom: clamp(1.25rem, 3vh, 2rem) !important;
    padding-left: clamp(1rem, 4vw, 2rem) !important;
    padding-right: clamp(1rem, 4vw, 2rem) !important;
    background: linear-gradient(145deg, #010f1c 0%, #042237 38%, #063a4a 72%, #02162d 100%) !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
}

.hero-premium__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-premium__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.55;
    animation: heroGlowDrift 14s ease-in-out infinite alternate;
}

.hero-premium__glow--a {
    width: min(55vw, 420px);
    height: min(55vw, 420px);
    top: -12%;
    right: -8%;
    background: radial-gradient(circle, rgba(43, 224, 247, 0.55) 0%, transparent 70%);
}

.hero-premium__glow--b {
    width: min(45vw, 360px);
    height: min(45vw, 360px);
    bottom: -18%;
    left: -10%;
    background: radial-gradient(circle, rgba(34, 147, 170, 0.45) 0%, transparent 72%);
    animation-delay: -4s;
}

.hero-premium__glow--c {
    width: min(35vw, 280px);
    height: min(35vw, 280px);
    top: 35%;
    left: 42%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, transparent 70%);
    animation-delay: -7s;
}

.hero-premium__mesh {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
    opacity: 0.28;
}

/* Red plexus (nodos + líneas) — denso a la derecha, desvanecido a la izquierda */
.hero-premium__plexus-wrap {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: min(82%, 920px);
    height: 100%;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 0, 0, 0.12) 22%,
        rgba(0, 0, 0, 0.55) 42%,
        #000 58%
    );
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 0, 0, 0.12) 22%,
        rgba(0, 0, 0, 0.55) 42%,
        #000 58%
    );
}

.hero-premium__plexus {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0.92;
}

@media (max-width: 991px) {
    .hero-premium__plexus-wrap {
        width: 100%;
        -webkit-mask-image: linear-gradient(
            180deg,
            transparent 0%,
            rgba(0, 0, 0, 0.2) 18%,
            rgba(0, 0, 0, 0.7) 45%,
            #000 70%
        );
        mask-image: linear-gradient(
            180deg,
            transparent 0%,
            rgba(0, 0, 0, 0.2) 18%,
            rgba(0, 0, 0, 0.7) 45%,
            #000 70%
        );
    }
}

.hero-premium__container {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    width: 100%;
    margin-inline: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-premium__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
}

.hero-premium__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 42rem;
    margin-inline: auto;
}

.hero-premium__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.hero-premium__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(43, 224, 247, 0.25);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.hero-premium__badge i {
    color: #2be0f7;
    font-size: 0.85rem;
}

.hero-premium__eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #2be0f7;
}

.hero-premium__title {
    margin: 0 0 1rem;
    padding: 0 !important;
    font-size: clamp(1.75rem, 5.2vw, 3.15rem) !important;
    line-height: 1.12 !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.hero-premium__audience {
    margin: 0 0 1rem;
    padding: 0 !important;
    max-width: 42ch;
    font-size: clamp(0.95rem, 2.2vw, 1.1rem) !important;
    line-height: 1.5 !important;
    color: rgba(255, 255, 255, 0.82) !important;
    font-weight: 500;
}

.hero-premium__lead {
    margin: 0 auto 1.75rem;
    padding: 0 !important;
    max-width: 38ch;
    font-size: clamp(1rem, 2.4vw, 1.2rem) !important;
    line-height: 1.55 !important;
    color: rgba(255, 255, 255, 0.88) !important;
}

.hero-premium__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.hero-premium__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 1rem 1.35rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-premium__cta--primary {
    color: #02162d !important;
    background: linear-gradient(135deg, #2be0f7 0%, #5ef0ff 50%, #2be0f7 100%);
    box-shadow:
        0 0 0 1px rgba(43, 224, 247, 0.4),
        0 12px 40px rgba(43, 224, 247, 0.35);
}

.hero-premium__cta--primary:hover {
    color: #02162d !important;
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(43, 224, 247, 0.55),
        0 18px 48px rgba(43, 224, 247, 0.45);
}

.hero-premium__cta--secondary {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.hero-premium__cta--secondary:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.hero-premium__cta--tertiary {
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.hero-premium__cta--tertiary:hover {
    color: #2be0f7 !important;
    background: rgba(43, 224, 247, 0.08);
    transform: none;
}

.hero-premium__metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.hero-premium__metric {
    padding: 0.85rem 1rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.hero-premium__metric-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(43, 224, 247, 0.95);
    margin-bottom: 0.2rem;
}

.hero-premium__metric-value {
    display: block;
    font-size: 0.92rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.9);
}

.hero-premium__metric-value strong {
    color: #fff;
    font-size: 1.05rem;
}

/* Visual stage */
.hero-premium__stage {
    position: relative;
    width: 100%;
    min-height: min(400px, 48vh);
    margin-inline: auto;
    max-width: min(100%, 720px);
}

.hero-premium__mockup {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
}

@media (prefers-reduced-motion: no-preference) {
    .hero-premium__mockup {
        animation: heroMockupFloat 6s ease-in-out infinite;
    }
}

.hero-premium__mockup-glass {
    padding: 1rem;
    border-radius: 20px;
    aspect-ratio: 700 / 651;
    min-height: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.hero-premium__mockup-glass picture,
.hero-premium__mockup-glass img,
.hero-premium__mockup-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 700 / 651;
    border-radius: 12px;
}

.hero-premium__float-card {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    max-width: 200px;
    padding: 0.75rem 0.9rem;
    margin: 0;
    background: rgba(4, 34, 55, 0.82);
    border: 1px solid rgba(43, 224, 247, 0.22);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    animation: heroCardFloat 5s ease-in-out infinite;
}

.hero-premium__float-card p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.72);
}

.hero-premium__float-title {
    margin: 0 0 0.15rem;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}

.hero-premium__float-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(43, 224, 247, 0.25), rgba(43, 224, 247, 0.05));
    color: #2be0f7;
    font-size: 1rem;
}

.hero-premium__float-card--whatsapp {
    top: 6%;
    left: -4%;
    animation-delay: 0s;
}

.hero-premium__float-card--crm {
    top: 42%;
    right: -6%;
    animation-delay: -1.5s;
}

.hero-premium__float-card--flow {
    bottom: 4%;
    left: 8%;
    animation-delay: -3s;
}

/* Neutralize legacy banner / robot rules on homepage hero */
.hero-premium.banner-section .banner_wrapper,
.hero-premium .banner_wrapper {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    text-align: center !important;
    animation: none !important;
}

.hero-premium .banner-image,
.hero-premium .banner_wrapper .banner-image {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
}

/* Anular AnimacionRobot.css / header-fix que encogen el robot en .banner-section */
.hero-premium.banner-section .banner_wrapper .banner-image img,
.hero-premium .hero-premium__mockup-img {
    max-width: 100% !important;
    width: 100% !important;
    transform: none !important;
    transform-origin: center center !important;
}

@keyframes heroGlowDrift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(12px, -8px) scale(1.05); }
}

@keyframes heroMockupFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes heroCardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (min-width: 576px) {
    .hero-premium__metrics {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-premium__metric {
        text-align: center;
    }
}

@media (min-width: 768px) {
    .hero-premium__actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-premium__cta {
        width: auto;
        min-width: 220px;
    }

    .hero-premium__cta--tertiary {
        min-width: 0;
    }
}

@media (min-width: 992px) {
    .hero-premium__layout {
        grid-template-columns: 0.92fr 1.08fr;
        gap: 2rem 2.5rem;
    }

    .hero-premium__content {
        text-align: left;
        margin-inline: 0;
        max-width: none;
    }

    .hero-premium__badges {
        justify-content: flex-start;
    }

    .hero-premium__audience,
    .hero-premium__lead {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-premium__actions {
        justify-content: flex-start;
    }

    .hero-premium__stage {
        max-width: none;
        min-height: min(560px, 62vh);
        width: 100%;
    }

    .hero-premium__mockup {
        max-width: none;
        width: 105%;
        margin-right: -3%;
    }

    .hero-premium__mockup-glass {
        padding: 1.15rem 1.25rem;
    }

    .hero-premium__float-card--whatsapp {
        left: 0;
    }

    .hero-premium__float-card--crm {
        right: 0;
    }
}

@media (min-width: 1200px) {
    .hero-premium__layout {
        grid-template-columns: 0.88fr 1.12fr;
    }

    .hero-premium__mockup {
        width: 112%;
        margin-right: -6%;
    }

    .hero-premium__stage {
        min-height: min(600px, 65vh);
    }
}

@media (max-width: 575px) {
    .hero-premium__stage {
        min-height: min(360px, 44vh);
        max-width: 100%;
    }

    .hero-premium__mockup {
        max-width: 100%;
    }

    .hero-premium__float-card {
        max-width: 170px;
        padding: 0.6rem 0.75rem;
    }

    .hero-premium__float-card--whatsapp {
        top: 0;
        left: 0;
    }

    .hero-premium__float-card--crm {
        top: auto;
        bottom: 28%;
        right: 0;
    }

    .hero-premium__float-card--flow {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-premium__glow,
    .hero-premium__mockup,
    .hero-premium__float-card {
        animation: none !important;
    }
}

/* Anular padding del tema legacy (.banner-section en style.css y responsive.css) */
section.hero-premium.banner-section.track-section#inicio {
    padding-left: clamp(1rem, 4vw, 2rem) !important;
    padding-right: clamp(1rem, 4vw, 2rem) !important;
}
