@import url("./ax-colors.css");

/* =========================================================
   HERO HOME
   ========================================================= */

.ch-hero {
    position: relative;
    width: 100vw;
    min-height: calc(115svh - var(--ch-header-h, 90px));
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    background: var(--ax-color-bg-dark);
    color: var(--ax-white);
}


/* =========================================================
   MASAS DE COLOR — GRANDES Y VISIBLES DESDE EL CENTRO
   ========================================================= */

.ch-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    filter: blur(70px) saturate(150%);
    pointer-events: none;
}

.ch-blob {
    position: absolute;
    width: clamp(900px, 75vw, 1650px);
    height: clamp(900px, 75vw, 1650px);
    border-radius: 50%;
    opacity: 1;
    will-change: transform;
}

/* Verde desde arriba a la izquierda */
.ch-blob--left {
    top: -72%;
    left: -24%;
    background: radial-gradient(
        ellipse at center,
        var(--ax-green) 0%,
        var(--ax-green) 18%,
        color-mix(in srgb, var(--ax-green) 67%, var(--ax-black)) 41%,
        color-mix(in srgb, color-mix(in srgb, var(--ax-green) 46.8%, var(--ax-black)) 73%, transparent) 60%,
        color-mix(in srgb, color-mix(in srgb, var(--ax-green) 26%, var(--ax-black)) 42%, transparent) 73%, transparent 86%);
}

/* Verde desde abajo a la derecha */
.ch-blob--right {
    right: -24%;
    bottom: -72%;

    background: radial-gradient(
        ellipse at center,
        var(--ax-green) 0%,
        var(--ax-green) 17%,
        color-mix(in srgb, var(--ax-green) 67%, var(--ax-black)) 41%,
        color-mix(in srgb, color-mix(in srgb, var(--ax-green) 46.8%, var(--ax-black)) 82%, transparent) 59%,
        color-mix(in srgb, color-mix(in srgb, var(--ax-green) 26%, var(--ax-black)) 42%, transparent) 72%,
        transparent 86%
    );
}


/* =========================================================
   RETÍCULA DE PUNTOS
   ========================================================= */

/*.ch-hero__dots {
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 0.92;
    pointer-events: none;
    background-image: radial-gradient(circle, rgb(255 255 255 / 95%) 0 1.6px, transparent 1.9px);
    background-size: clamp(110px, 14.5vw, 235px) clamp(105px, 16.5vh, 180px);
    background-position: center;
}*/
#top .ch-hero__dots {
    position: absolute;
    left: 0;
    opacity: 0.92;
    z-index: 1;
    /* background-color: #ffffff; */
    background-image: radial-gradient(circle, color-mix(in srgb, var(--ax-white) 81.96%, transparent) .7px, transparent 2.2px);
    background-size: 274px 274px;
    background-position: 86px 100px;
    background-repeat: repeat;
    background-attachment: fixed !important;
    z-index: 10000;
    top: 0;
    width: 100%;
    height: 100%;
}
/*
 * Algunos puntos adoptan ligeramente el verde o violeta del
 * fondo gracias al modo de mezcla.
 */
.ch-hero__dots {
    mix-blend-mode: screen;
}


/* =========================================================
   CONTENIDO CENTRAL
   ========================================================= */

.ch-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: calc(100svh - var(--ch-header-h, 90px));
    align-items: center;
    justify-content: center;
    padding: 70px 30px 155px;
    text-align: center;
}

#top .ch-hero,
#top .ch-hero__title,
#top .ch-hero__title span {
    color: var(--ax-white) !important;
}

#top .ch-hero__title {
    width: min(100%, 760px);
    margin: 0;
    font-size: clamp(48px, 4.4vw, 76px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.ch-hero__title span {
    display: block;
}

/* Más peso visual en la primera línea */
#top .ch-hero__title span:first-child {
    font-weight: 650;
}


/* =========================================================
   TEXTO INFERIOR Y FLECHA
   ========================================================= */

.ch-hero__footer {
    position: absolute;
    bottom: 31px;
    left: 50%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    text-align: center;
}

#top .ch-hero__footer p {
    margin: 0 0 15px;
    color: var(--ax-white);
    font-size: clamp(16px, 1.25vw, 21px);
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
}

.ch-hero__scroll {
    position: relative;
    display: flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ax-white) 20%, transparent);
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.ch-hero__scroll span {
    width: 8px;
    height: 8px;
    margin-top: -3px;
    border-right: 2px solid var(--ax-white);
    border-bottom: 2px solid var(--ax-white);
    transform: rotate(45deg);
}

.ch-hero__scroll:hover {
    background: var(--ax-green);
    transform: translateY(3px);
}


/* =========================================================
   CURSOR TIPO LUPA
   ========================================================= */

.ch-hero,
.ch-hero a,
.ch-hero button,
.ch-hero [data-cursor-text] {
    cursor: none;
}

.ch-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147483647;
    width: 108px;
    height: 108px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--ax-white) 75%, transparent);
    border-radius: 50%;
    background: transparent;
    box-shadow:
        0 8px 30px color-mix(in srgb, var(--ax-black) 18%, transparent),
        inset 0 0 0 1px color-mix(in srgb, var(--ax-white) 12%, transparent);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    /* Evita invertir los colores */
    mix-blend-mode: normal;

    transform:
        translate3d(-200px, -200px, 0)
        translate3d(-50%, -50%, 0);

    transition:
        width 0.25s ease,
        height 0.25s ease,
        opacity 0.15s ease,
        visibility 0.15s ease,
        border-color 0.25s ease;

    will-change: transform, width, height;
}

.ch-cursor.is-visible {
    opacity: 1;
    visibility: visible;
}

.ch-cursor.is-active {
    width: 124px;
    height: 124px;
    border-color: color-mix(in srgb, var(--ax-white) 95%, transparent);
    background: transparent;
}


/* Contenedor que recorta la copia ampliada */
.ch-cursor__zoom {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}


/* Copia sincronizada del hero */
.ch-cursor__scene {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    transform-origin: 0 0;
    will-change: transform;
}


/* Impide interacción con la copia */
.ch-cursor__scene *,
.ch-cursor__scene a,
.ch-cursor__scene button {
    pointer-events: none !important;
}


/* El texto queda sobre la ampliación si se utiliza */
.ch-cursor__label {
    position: relative;
    z-index: 2;
    color: var(--ax-white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    opacity: 0;
    text-shadow: 0 1px 5px color-mix(in srgb, var(--ax-black) 70%, transparent);
    text-transform: uppercase;
    transform: scale(0.85);
    transition:
        opacity 0.2s ease,
        transform 0.25s ease;
    white-space: nowrap;
}

.ch-cursor.is-active .ch-cursor__label {
    opacity: 1;
    transform: scale(1);
}

.ch-cursor__label {
    color: var(--ax-white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    opacity: 0;
    text-transform: uppercase;
    transform: scale(0.85);
    transition:
        opacity 0.2s ease,
        transform 0.25s ease;
    white-space: nowrap;
}

.ch-cursor.is-active .ch-cursor__label {
    opacity: 1;
    transform: scale(1.2);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (pointer: coarse) {
    .ch-hero,
    .ch-hero a,
    .ch-hero button,
    .ch-hero [data-cursor-text] {
        cursor: auto;
    }

    .ch-cursor {
        display: none;
    }
}

@media (max-width: 782px) {
    .ch-hero__content {
        padding: 60px 22px 0px;
    }

    #top .ch-hero__title {
        font-size: clamp(42px, 12vw, 64px);
        line-height: 1.04;
    }

    .ch-hero__dots {
        opacity: 0.65;
        background-size: 105px 125px;
    }

    .ch-blob {
        width: 680px;
        height: 680px;
    }

    .ch-blob--left {
        top: -30%;
        left: -80%;
    }

    .ch-blob--right {
        right: -95%;
        bottom: -33%;
    }

    #top .ch-hero__footer p {
        max-width: calc(100vw - 40px);
        font-size: 16px;
        white-space: normal;
    }
    #top .ch-hero__dots {
        opacity: 0.7;
        z-index: 1;
        background-image: radial-gradient(circle, 
    color-mix(in srgb, #ffffff 81.96%, transparent) .7px, transparent 2.2px);
        background-size: 100px 100px;
        background-position: 86px 100px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ch-blob {
        transform: none !important;
    }
}