/* =========================================================================
   HERO DE LA PORTADA — ALTEC 2027 (bloque ax-hx)

   Texto a la izquierda y, a la derecha, el globo de Iberoamerica
   (js/altec-hero.js). Abajo, una franja de datos con la cuenta regresiva
   (js/sitio.js, seccion 6). Debajo de 900 px el globo pasa arriba del texto.

   Entrada: el titulo sube por lineas desde una mascara y el resto aparece
   en cascada. Con "reducir movimiento" queda solo el fundido.

   Se carga solo en index.php ($pagina['css']).
   ========================================================================= */

.ax-hx {
    --hx-globo: min(54vw, 780px, calc(100svh - 220px));
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column;
    min-height: max(660px, min(100svh, 1000px));
    padding-top: var(--ax-header-h);
    background: var(--ax-ink); color: var(--ax-on-dark-2);
}

/* Fondo: brillo detras del globo, rejilla de puntos que se desvanece y
   un toque de orquidea abajo a la izquierda */
.ax-hx__fondo {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(44% 58% at 76% 50%, rgba(21, 96, 130, .42) 0%, rgba(21, 96, 130, .12) 55%, transparent 75%),
        radial-gradient(40% 50% at 0% 100%, rgba(122, 16, 120, .16) 0%, transparent 70%),
        radial-gradient(60% 40% at 30% 0%, rgba(18, 76, 90, .35) 0%, transparent 70%);
}
.ax-hx__fondo::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(140, 205, 230, .16) 1px, transparent 1.4px);
    background-size: 30px 30px; background-position: center;
    -webkit-mask-image: radial-gradient(70% 80% at 60% 45%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 80%);
    mask-image: radial-gradient(70% 80% at 60% 45%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 80%);
}
/* Linea de horizonte sobre la franja de datos */
.ax-hx__fondo::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
    background: linear-gradient(0deg, rgba(7, 28, 38, .9) 0%, transparent 100%);
}

.ax-hx__in {
    position: relative; flex: 1;
    display: flex; align-items: center;
    padding-block: clamp(40px, 7vh, 96px);
}
.ax-hx__texto { position: relative; z-index: 2; max-width: 660px; }

/* Edicion: etiqueta dorada con una linea */
.ax-hx__edicion {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 22px;
    font-family: var(--ax-display); font-weight: 500;
    font-size: clamp(.95rem, .9rem + .3vw, 1.1rem); line-height: 1.3; letter-spacing: .01em;
    color: var(--ax-gold);
}
.ax-hx__edicion::before { content: ""; width: 34px; height: 1px; background: currentColor; flex: none; }

.ax-hx__h1 {
    margin: 0;
    font-family: var(--ax-display); font-weight: 300;
    font-size: clamp(2.25rem, 1.15rem + 3.2vw, 4rem); line-height: 1.04; letter-spacing: -0.03em;
    color: #fff;
}
.ax-hx__h1 strong { font-weight: 600; }
/* Cada linea del titulo es una mascara: el texto sube desde abajo */
.ax-hx__l { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.ax-hx__l > span { display: inline-block; }
.ax-hx__l--oro strong { color: var(--ax-gold); }

.ax-hx__lema {
    margin: 26px 0 0; max-width: 520px;
    font-size: clamp(1rem, .96rem + .25vw, 1.13rem); line-height: 1.6;
    color: var(--ax-on-dark-2);
}
.ax-hx .ax-botones { margin-top: 36px; }

/* Globo: caja cuadrada; el lienzo la desborda para dejar sitio a la
   atmosfera, el anillo y los arcos que suben por encima del borde */
/* Centro del globo: a un cuarto del ancho de la pantalla a la derecha del
   centro (no del contenedor), asi en pantallas anchas no se pega al titulo */
.ax-hx__globo {
    position: absolute; z-index: 1;
    top: 50%; left: calc(50% + 25vw - var(--hx-globo) / 2);
    width: var(--hx-globo); aspect-ratio: 1;
    transform: translateY(-50%);
    pointer-events: none;
}
.ax-hx__lienzo {
    position: absolute; inset: -22%; width: 144%; height: 144%;
    opacity: 0; transition: opacity 900ms ease;
}
.ax-hx.is-globo .ax-hx__lienzo { opacity: 1; }

/* Rotulo de San Jose (lo mueve el JS siguiendo el punto del globo) */
.ax-hx__chip {
    position: absolute; left: 0; top: 0;
    display: grid; gap: 2px;
    padding: 9px 14px 10px;
    border: 1px solid rgba(242, 176, 53, .35); border-radius: 10px;
    background: rgba(7, 28, 38, .62);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    font-family: var(--ax-display); font-size: 13px; line-height: 1.25; font-weight: 600;
    color: #fff; white-space: nowrap;
    opacity: 0; transition: opacity 400ms ease;
}
.ax-hx__chip small { font-size: 11.5px; font-weight: 500; color: var(--ax-sky); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ax-hx__chip.is-on { opacity: 1; }

/* Franja de datos */
.ax-hx__barra {
    position: relative; z-index: 2;
    border-top: 1px solid var(--ax-line-dark);
    background: rgba(7, 28, 38, .55);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.ax-hx__datos {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0; padding: 0;
}
.ax-hx__dato { padding: 16px 0; min-width: 0; }
.ax-hx__dato:nth-child(odd) { padding-right: 16px; }
.ax-hx__dato:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--ax-line-dark); }
.ax-hx__dato:nth-child(n+3) { border-top: 1px solid var(--ax-line-dark); }
.ax-hx__dato dt {
    margin: 0 0 4px;
    font-family: var(--ax-mono); font-weight: 500; font-size: 12.5px; line-height: 1.2;
    color: var(--ax-on-dark-3);
}
.ax-hx__dato dd { margin: 0; color: #fff; font-weight: 500; font-size: 15px; line-height: 1.35; }
.ax-hx__cd { font-variant-numeric: tabular-nums; }
.ax-hx__cd b { font-weight: 600; color: var(--ax-gold); }
.ax-hx__cd i { font-style: normal; color: var(--ax-on-dark-3); margin: 0 1px; }
.ax-hx__vivo {
    display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%;
    background: var(--ax-gold); vertical-align: 1px;
    box-shadow: 0 0 0 0 rgba(242, 176, 53, .6);
}

/* ---------------------------------------------------------------------
   Entrada (solo con JS: html.ax-js)
   --------------------------------------------------------------------- */
@keyframes hx-sube { from { opacity: 0; transform: translateY(16px); } }
@keyframes hx-linea { from { transform: translateY(108%); } }
@keyframes hx-funde { from { opacity: 0; } }
@keyframes hx-latido {
    0% { box-shadow: 0 0 0 0 rgba(242, 176, 53, .55); }
    70%, 100% { box-shadow: 0 0 0 9px rgba(242, 176, 53, 0); }
}

.ax-js .ax-hx [data-hx] {
    animation: hx-sube 900ms var(--ax-ease-out) both;
    animation-delay: calc(var(--hx-d, 0) * 1ms);
}
.ax-js .ax-hx .ax-hx__l > span {
    animation: hx-linea 1100ms cubic-bezier(.19, 1, .22, 1) both;
    animation-delay: calc(var(--hx-d, 0) * 1ms);
}
.ax-js .ax-hx .ax-hx__barra { animation: hx-funde 1000ms ease both; animation-delay: 700ms; }
.ax-hx__vivo { animation: hx-latido 2.4s ease-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .ax-js .ax-hx [data-hx], .ax-js .ax-hx .ax-hx__l > span { animation: hx-funde 300ms ease both; animation-delay: 0ms; }
    .ax-hx__vivo { animation: none; }
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
/* Franja en una fila: desde 1100 px (antes los textos se parten) */
@media (min-width: 1100px) {
    .ax-hx__datos { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.45fr) minmax(0, .8fr) minmax(0, 1fr); }
    .ax-hx__dato, .ax-hx__dato:nth-child(n) { padding: 22px 28px; border-top: 0; }
    .ax-hx__dato:first-child { padding-left: 0; }
    .ax-hx__dato + .ax-hx__dato { border-left: 1px solid var(--ax-line-dark); }
}

/* Debajo de 900 px: el globo arriba, el texto debajo */
@media (max-width: 899.98px) {
    .ax-hx { --hx-globo: min(78vw, 460px); min-height: 0; }
    .ax-hx__in { flex-direction: column; align-items: stretch; padding-top: 0; padding-bottom: 40px; }
    .ax-hx__globo {
        position: relative; top: auto; left: auto; transform: none;
        margin: 6px auto -2%;
        order: -1;
    }
    .ax-hx__fondo {
        background:
            radial-gradient(70% 34% at 50% 22%, rgba(21, 96, 130, .45) 0%, transparent 75%),
            radial-gradient(60% 40% at 0% 100%, rgba(122, 16, 120, .14) 0%, transparent 70%);
    }
}
@media (max-width: 639.98px) {
    .ax-hx__h1 { font-size: clamp(2rem, 1.3rem + 3.6vw, 2.6rem); }
    /* Globo chico: rotulo compacto, sin coordenadas */
    .ax-hx__chip { padding: 5px 9px 6px; border-radius: 8px; font-size: 11px; }
    .ax-hx__chip small { display: none; }
    .ax-hx .ax-botones { margin-top: 28px; }
}
