/* ===== BANNER HERO — v2 moderno, impactante, con parallax ===== */
.banner-section {
    --bn-primary: #1a5f9e;
    --bn-accent: #d01341;

    position: relative;
    height: 98vh;
    min-height: 100px;
    overflow: hidden;
    isolation: isolate;
}

/* ── media + parallax ── */
.bn-media {
    position: absolute;
    inset: -8% 0 0 0;
    /* margen extra para el desplazamiento del parallax */
    height: 116%;
    z-index: 0;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.68) saturate(1.05);
    will-change: transform;
    transition: transform 0.1s linear;
}

.bn-grain {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.35;
    mix-blend-mode: overlay;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
}

/* ── overlay ── */
.banner-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(150deg, rgba(10, 24, 48, 0.82) 0%, rgba(26, 95, 158, 0.5) 55%, rgba(10, 24, 48, 0.75) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* partículas flotantes sutiles */
.bn-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.bn-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgb(255, 255, 255);
    animation: bnParticleFloat linear infinite;
}

.bn-particles span:nth-child(1) {
    left: 10%;
    top: 80%;
    animation-duration: 14s;
    animation-delay: 0s;
}

.bn-particles span:nth-child(2) {
    left: 25%;
    top: 90%;
    animation-duration: 18s;
    animation-delay: 2s;
}

.bn-particles span:nth-child(3) {
    left: 45%;
    top: 85%;
    animation-duration: 16s;
    animation-delay: 4s;
}

.bn-particles span:nth-child(4) {
    left: 65%;
    top: 92%;
    animation-duration: 20s;
    animation-delay: 1s;
}

.bn-particles span:nth-child(5) {
    left: 80%;
    top: 78%;
    animation-duration: 15s;
    animation-delay: 3s;
}

.bn-particles span:nth-child(6) {
    left: 92%;
    top: 88%;
    animation-duration: 17s;
    animation-delay: 5s;
}

@keyframes bnParticleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-100vh) scale(0.3);
        opacity: 0;
    }
}

/* ── content ── */
.banner-content {
    position: relative;
    z-index: 4;
    text-align: center;
    color: white;
    max-width: 820px;
    padding: 0 24px;
}

.banner-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0;
    color: rgba(255, 255, 255, 0.85);
    transform: translateY(16px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.banner-subtitle.is-in {
    opacity: 1;
    transform: translateY(0);
}

.bn-subtitle-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #811111;
    box-shadow: 0 0 0 4px rgba(208, 19, 28, 0.679);
    animation: bnPulse 2.2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes bnPulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(208, 19, 65, 0.25);
    }

    50% {
        box-shadow: 0 0 0 9px rgba(208, 19, 65, 0.06);
    }
}

.banner-title {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: 700;
    margin-bottom: 26px;
    line-height: 1.18;
    letter-spacing: -0.01em;
}

.bn-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(28px) rotateX(-40deg);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom center;
}

.bn-word.is-in {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

.bn-word--accent {
    background: #d8b776;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.banner-description {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    margin-bottom: 38px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.banner-description.is-in {
    opacity: 1;
    transform: translateY(0);
}

.banner-buttons {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.banner-buttons.is-in {
    opacity: 1;
    transform: translateY(0);
}

/* ── botones magnéticos ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 34px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

.bn-btn-icon {
    width: 15px;
    transition: transform 0.25s ease;
}

.btn-primary {
    background: #d1173c;
    color: var(--bn-primary);
    box-shadow: 0 10px 30px rgb(0, 0, 0);
}

.btn-primary:hover {
    background: #f5f5f5;
    color: #f5f5f5;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: var(--bn-accent);
    border-color: var(--bn-accent);
}

.btn-secondary:hover .bn-btn-icon {
    transform: translateX(3px);
}

/* ── scroll indicator con progreso ── */
.banner-scroll-indicator {
    position: absolute;
    bottom: 108px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 1.1rem;
    opacity: 0.85;
}

.bn-scroll-track {
    width: 2px;
    height: 34px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    overflow: hidden;
}

.bn-scroll-fill {
    display: block;
    width: 100%;
    height: 40%;
    background: linear-gradient(180deg, var(--bn-accent), transparent);
    animation: bnScrollSlide 1.8s ease-in-out infinite;
}

@keyframes bnScrollSlide {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(250%);
    }
}

/* ── stats bar ── */
.banner-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    background: #1d468d;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 26px 0;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    border-top: 1px solid rgb(255, 255, 255);
}

.stat-item {
    text-align: center;
    padding: 0 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--bn-stat-delay, 0ms), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--bn-stat-delay, 0ms);
}

.stat-item.is-in {
    opacity: 1;
    transform: translateY(0);
}

.stat-number {
    font-size: 1.9rem;
    font-weight: 800;
    color: white;
    display: block;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.6rem;
    color: #d8b776;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 400;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .banner-section {
        height: 100vh;
        min-height: 560px;
    }

    .banner-buttons {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .btn {
        width: 240px;
        justify-content: center;
    }

    .banner-scroll-indicator {
        bottom: 150px;
    }

    .banner-stats {
        padding: 18px 0;
        gap: 24px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.68rem;
    }
}

@media (max-width: 480px) {

    /* antes se ocultaba por completo; ahora se adapta en vez de desaparecer */
    .banner-section {
        height: auto;
        min-height: 100svh;
    }

    .banner-content {
        padding: 0 20px;
    }

    .banner-title {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }

    .banner-description {
        font-size: 0.95rem;
    }

    .banner-stats {
        flex-wrap: wrap;
        row-gap: 50px;
        column-gap: 20px;
        padding: 20px 16px;
    }

    .stat-item {
        flex: 0 0 40%;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .banner-scroll-indicator {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    .bn-particles span,
    .bn-subtitle-dot,
    .bn-scroll-fill {
        animation: none;
    }

    .banner-subtitle,
    .bn-word,
    .banner-description,
    .banner-buttons,
    .stat-item {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .banner-image {
        transition: none;
    }
}

/* ===== BANNER HERO — capa tech/pulso adicional (aditivo, no rompe nada existente) ===== */

/* ── grid técnico escaneando ── */
.bn-tech-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 30%, transparent 100%);
    animation: bnGridDrift 22s linear infinite;
}

@keyframes bnGridDrift {
    0% {
        background-position: 0 0, 0 0;
    }

    100% {
        background-position: 46px 46px, 46px 46px;
    }
}

/* ── línea de escaneo horizontal, tipo sensor médico ── */
.bn-scanline {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 0%, rgba(216, 183, 118, 0.55) 20%, rgba(208, 19, 65, 0.75) 50%, rgba(216, 183, 118, 0.55) 80%, transparent 100%);
    box-shadow: 0 0 16px rgba(208, 19, 65, 0.5);
    animation: bnScanMove 5.5s ease-in-out infinite;
    opacity: 0.55;
}

@keyframes bnScanMove {
    0% {
        top: 12%;
        opacity: 0;
    }

    10% {
        opacity: 0.55;
    }

    50% {
        top: 88%;
        opacity: 0.55;
    }

    90% {
        opacity: 0;
    }

    100% {
        top: 88%;
        opacity: 0;
    }
}

/* ── corner brackets tipo HUD/interfaz técnica ── */
.bn-hud-corner {
    position: absolute;
    z-index: 4;
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(216, 183, 118, 0.55);
    opacity: 0;
    transition: opacity 1s ease 0.6s;
}

.bn-hud-corner--tl {
    top: 32px;
    left: 32px;
    border-right: none;
    border-bottom: none;
}

.bn-hud-corner--tr {
    top: 32px;
    right: 32px;
    border-left: none;
    border-bottom: none;
}

.bn-hud-corner--bl {
    bottom: 108px;
    left: 32px;
    border-right: none;
    border-top: none;
}

.bn-hud-corner--br {
    bottom: 108px;
    right: 32px;
    border-left: none;
    border-top: none;
}

.banner-section.bn-is-ready .bn-hud-corner {
    opacity: 0.7;
}

/* ── dot del subtítulo: pulso más presente, doble anillo tipo radar médico ── */
.bn-subtitle-dot {
    position: relative;
}

.bn-subtitle-dot::before,
.bn-subtitle-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid var(--bn-accent);
    animation: bnRadarRing 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}

.bn-subtitle-dot::after {
    animation-delay: 1.2s;
}

@keyframes bnRadarRing {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(3.2);
        opacity: 0;
    }
}

/* ── línea de brillo animada bajo el título ── */
.bn-title-glow-line {
    display: block;
    width: 90px;
    height: 2px;
    margin: 0 auto 34px;
    background: linear-gradient(90deg, transparent, var(--bn-accent), #d8b776, transparent);
    background-size: 200% 100%;
    border-radius: 4px;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: opacity 0.7s ease 0.9s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.9s;
    animation: bnGlowSlide 3s linear infinite;
}

.banner-section.bn-is-ready .bn-title-glow-line {
    opacity: 1;
    transform: scaleX(1);
}

@keyframes bnGlowSlide {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── stat numbers: leve pulso de glow al aparecer, refuerza sensación "tech/vital" ── */
.stat-number {
    position: relative;
}

.stat-item.is-in .stat-number {
    animation: bnStatGlow 1.6s ease-out;
}

@keyframes bnStatGlow {
    0% {
        text-shadow: 0 0 0 rgba(216, 183, 118, 0);
    }

    35% {
        text-shadow: 0 0 18px rgba(216, 183, 118, 0.5);
    }

    100% {
        text-shadow: 0 0 0 rgba(216, 183, 118, 0);
    }
}

/* ── botones: borde con brillo recorriendo, refuerza look tecnológico ── */
.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.btn-secondary:hover::before {
    transform: translateX(120%);
}

/* ── RESPONSIVE: ocultar detalles HUD en pantallas chicas para no saturar ── */
@media (max-width: 768px) {
    .bn-hud-corner {
        width: 24px;
        height: 24px;
    }

    .bn-hud-corner--tl,
    .bn-hud-corner--tr {
        top: 20px;
    }

    .bn-hud-corner--bl,
    .bn-hud-corner--br {
        bottom: 150px;
    }
}

@media (max-width: 480px) {

    .bn-hud-corner,
    .bn-scanline,
    .bn-tech-grid {
        display: none;
        /* limpieza visual en móviles muy pequeños, evita saturar */
    }
}

@media (prefers-reduced-motion: reduce) {

    .bn-tech-grid,
    .bn-scanline,
    .bn-subtitle-dot::before,
    .bn-subtitle-dot::after,
    .bn-title-glow-line,
    .stat-item.is-in .stat-number {
        animation: none;
    }

    .bn-hud-corner,
    .bn-title-glow-line {
        opacity: 0.7;
        transform: none;
        transition: none;
    }
}