/* ==========================================================================
   DINÁMICA PREMIUM (GSAP + LENIS) — ESTILOS DE APOYO
   ========================================================================== */

/* Lenis (scroll suave) */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* Cuando GSAP toma el control de los reveals, desactivar las transiciones CSS */
.gsap-on .reveal:not(.active),
.gsap-on .reveal-left:not(.active),
.gsap-on .reveal-right:not(.active) {
    transition: none;
}

/* ==========================================================================
   BARRA DE PROGRESO DE LECTURA
   ========================================================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 1003;
    pointer-events: none;
}

/* ==========================================================================
   HEADER INTELIGENTE (SE OCULTA AL BAJAR, REAPARECE AL SUBIR)
   ========================================================================== */
.gsap-on .main-header {
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.4s ease,
        height 0.4s ease,
        box-shadow 0.4s ease,
        border-color 0.4s ease;
}

.main-header.header-hidden {
    transform: translateY(-110%);
}

/* ==========================================================================
   CURSOR PERSONALIZADO (SOLO ESCRITORIO)
   ========================================================================== */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    border-radius: 50%;
    z-index: 10000;
}

.cursor-dot {
    width: 7px;
    height: 7px;
    margin: -3.5px 0 0 -3.5px;
    background: var(--color-accent);
}

.cursor-ring {
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border: 1.5px solid rgba(255, 122, 0, 0.55);
    transition:
        width 0.3s ease,
        height 0.3s ease,
        margin 0.3s ease,
        border-color 0.3s ease,
        background-color 0.3s ease;
}

.cursor-ring.is-hover {
    width: 62px;
    height: 62px;
    margin: -31px 0 0 -31px;
    background: rgba(255, 122, 0, 0.08);
    border-color: rgba(255, 122, 0, 0.9);
}

@media (hover: none), (pointer: coarse) {
    .cursor-dot,
    .cursor-ring {
        display: none;
    }
}

/* ==========================================================================
   TÍTULOS DIVIDIDOS (REVELADO PALABRA POR PALABRA)
   ========================================================================== */
.st-w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.14em;
    margin-bottom: -0.14em;
}

.st-i {
    display: inline-block;
    will-change: transform;
}

/* ==========================================================================
   CORTINA DE REVELADO SOBRE IMÁGENES
   ========================================================================== */
.img-cover {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
    z-index: 5;
    pointer-events: none;
}

/* ==========================================================================
   BOTONES MAGNÉTICOS
   ========================================================================== */
/* GSAP controla el transform: quitar el transform de la transición CSS */
.gsap-on .magnetic {
    transition-property: color, background-color, border-color, box-shadow;
    transition-duration: 0.35s;
}

/* ==========================================================================
   BRILLO AL PASAR SOBRE TARJETAS DE PROYECTOS
   ========================================================================== */
.project-card-img-box::after,
.portfolio-img-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: -85%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.8s ease;
    z-index: 3;
    pointer-events: none;
}

.project-slide-card:hover .project-card-img-box::after,
.portfolio-item:hover .portfolio-img-box::after {
    left: 135%;
}

/* Optimización de parallax */
.gsap-on .about-img,
.gsap-on .service-detail-img {
    will-change: transform;
}
