/* ============================================================
   Bytex — Hero home fullscreen
   File: assets/css/hero-home.css

   Fondo: imagen completa (desktop/mobile) via custom properties
   inyectadas inline desde PHP. El nav aparece al salir del hero.

   Tamaños de texto desde la escala global (--bytex-fs-*).
   ============================================================ */

/* ------------------------------------------------------------
   Sección
   ------------------------------------------------------------ */
.bytex-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    background-color: #05060a; /* base mientras carga el JPG */
    background-image: var(--bytex-hero-bg);
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    overflow: hidden;
}


/* ------------------------------------------------------------
   Snap: el hero pasa completo con un gesto de scroll
   ------------------------------------------------------------ */
html {
    scroll-snap-type: y proximity;
}
.bytex-hero {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* ------------------------------------------------------------
   Header oculto hasta salir del hero
   (estas reglas solo cargan en páginas con [bytex_hero_home])

   Animación de entrada coreografiada:
   - La barra del header hace fade in.
   - El logo entra desde la izquierda.
   - El CTA entra desde la derecha.
   - El nav (centro) hace fade + leve descenso.
   ------------------------------------------------------------ */
#bytex-header {
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease,
                background .2s ease;
    will-change: opacity;
}
#bytex-header.bytex-nav-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Estado oculto de cada zona */
#bytex-header .bytex-header__logo {
    transform: translateX(-28px);
    opacity: 0;
    transition: transform .55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity .45s ease;
}
#bytex-header .bytex-header__nav {
    transform: translateY(-10px);
    opacity: 0;
    transition: transform .55s cubic-bezier(0.22, 1, 0.36, 1) .08s,
                opacity .45s ease .08s;
}
#bytex-header .bytex-header__cta {
    transform: translateX(28px);
    opacity: 0;
    transition: transform .55s cubic-bezier(0.22, 1, 0.36, 1) .04s,
                opacity .45s ease .04s;
}

/* Estado visible: las tres zonas convergen a su posición */
#bytex-header.bytex-nav-visible .bytex-header__logo,
#bytex-header.bytex-nav-visible .bytex-header__nav,
#bytex-header.bytex-nav-visible .bytex-header__cta {
    transform: none;
    opacity: 1;
}

/* Accesibilidad: sin desplazamientos si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
    #bytex-header,
    #bytex-header .bytex-header__logo,
    #bytex-header .bytex-header__nav,
    #bytex-header .bytex-header__cta {
        transition: opacity .3s ease;
        transform: none;
    }
}

/* ------------------------------------------------------------
   Layout interno
   ------------------------------------------------------------ */
.bytex-hero__inner {
    width: 100%;
    max-width: var(--bytex-container);
    margin: 0 auto;
    padding: clamp(32px, 5vh, 64px) var(--bytex-container-padding) clamp(72px, 10vh, 110px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* ------------------------------------------------------------
   Logo grande
   ------------------------------------------------------------ */
.bytex-hero__logo {
    display: inline-block;
    margin-bottom: clamp(28px, 5vh, 56px);
    align-self: flex-start;
    line-height: 0;
}
.bytex-hero__logo-img {
    width: clamp(220px, 26vw, 420px);
    height: auto;
    display: block;
}

/* ------------------------------------------------------------
   Contenido
   ------------------------------------------------------------ */
.bytex-hero__content {
    max-width: 640px;
}

.bytex-hero__title {
    font-family: var(--bytex-font-heading);
    font-weight: 800;
    font-size: var(--bytex-fs-h1);
    line-height: 1.08;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--bytex-text);
    margin: 0 0 20px;
}

.bytex-hero__title-accent {
    color: var(--bytex-accent);
    white-space: nowrap;
}

/* Cursor del typewriter */
.bytex-hero__type-cursor {
    display: inline-block;
    width: 3px;
    height: 0.9em;
    background: var(--bytex-accent);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: bytex-cursor-blink 0.9s steps(1) infinite;
}
@keyframes bytex-cursor-blink {
    0%, 49%  { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.bytex-hero__sub {
    font-family: var(--bytex-font-body);
    font-size: var(--bytex-fs-body);
    line-height: 1.65;
    color: var(--bytex-text-2);
    margin: 0 0 32px;
    max-width: 540px;
}

.bytex-hero__ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------
   Indicador de scroll
   ------------------------------------------------------------ */
.bytex-hero__scroll-cue {
    position: absolute;
    left: 50%;
    bottom: clamp(20px, 4vh, 40px);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    color: var(--bytex-text-2);
    transition: color .2s ease;
    z-index: 2;
}
.bytex-hero__scroll-cue:hover {
    color: var(--bytex-text);
}

/* Ícono de mouse */
.bytex-hero__scroll-cue-mouse {
    display: block;
    width: 22px;
    height: 34px;
    border: 1.5px solid currentColor;
    border-radius: 12px;
    position: relative;
}

/* Ruedita que baja y se desvanece */
.bytex-hero__scroll-cue-wheel {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 3px;
    height: 7px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: currentColor;
    animation: bytex-cue-wheel 1.8s ease-in-out infinite;
}
@keyframes bytex-cue-wheel {
    0%   { transform: translateY(0);   opacity: 1; }
    60%  { transform: translateY(9px); opacity: 0; }
    100% { transform: translateY(0);   opacity: 0; }
}

.bytex-hero__scroll-cue-chevron {
    width: 18px;
    height: 18px;
    animation: bytex-cue-bounce 1.8s ease-in-out infinite;
}
@keyframes bytex-cue-bounce {
    0%, 100% { transform: translateY(0);   opacity: .7; }
    50%      { transform: translateY(7px); opacity: 1; }
}

/* Accesibilidad: sin animaciones si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
    .bytex-hero__scroll-cue-chevron,
    .bytex-hero__type-cursor {
        animation: none;
    }
}

/* ------------------------------------------------------------
   Circuito decorativo
   El estilo base y la animación viven en bytex-circuit.css.
   Acá solo se ajusta la posición dentro del hero: el header está
   oculto en esta pantalla, así que el circuito va pegado arriba.
   La opacidad baja porque el fondo es una foto y no queremos competir.
   ------------------------------------------------------------ */
.bytex-hero .bytex-hero__circuit {
    top: -40px;
    left: -40px;
    opacity: .45;
    z-index: 0;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 767px) {

    /* La imagen CEL (nueva) trae la camioneta abajo:
       el fondo se ancla al bottom y el contenido se centra
       en el espacio superior. */
    .bytex-hero {
        background-image: var(--bytex-hero-bg-mobile);
        background-position: center bottom;
    }

    .bytex-hero__inner {
        justify-content: center;
        /* Reservar la franja inferior para el visual de la imagen:
           el contenido se centra en lo que queda arriba. */
        padding-top: clamp(24px, 5vh, 48px);
        padding-bottom: 42vh;
    }

    .bytex-hero__logo {
        margin-bottom: clamp(20px, 4vh, 36px);
    }

    .bytex-hero__logo-img {
        width: clamp(180px, 55vw, 260px);
    }

    .bytex-hero__sub {
        font-size: var(--bytex-fs-sm);
    }

    .bytex-hero__ctas .bytex-btn {
        flex: 1 1 auto;
        justufy-content: center;
        justify-content: center;
    }

    /* En mobile el fondo (camioneta abajo) ya carga bastante la parte
       inferior: el circuito queda arriba, chico y muy sutil. */
    .bytex-hero .bytex-hero__circuit {
        opacity: .28;
    }
}