/* ==========================================================================
   NODO ESTUDIO - CUSTOM OPTIMIZED STYLES (FALLBACKS & SPECIAL INTERACTIVES)
   ========================================================================== */

/* Custom Smooth Scrolling for Browsers without full scroll-behavior support */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ==========================================================================
   SPLASH SCREEN / PRELOADER
   ========================================================================== */
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FFFFFF;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#splash-screen.splash-exit {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Logo SVG: stroke-draw animation */
.splash-logo {
    width: 80px;
    height: 80px;
    color: #1A1A1A;
    opacity: 0;
    animation: splashLogoIn 1s cubic-bezier(0.25, 1, 0.5, 1) 0.2s forwards;
}

.splash-logo line {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: splashStrokeDraw 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

/* Stagger each line slightly */
.splash-logo line:nth-child(1) { animation-delay: 0.3s; }
.splash-logo line:nth-child(2) { animation-delay: 0.4s; }
.splash-logo line:nth-child(3) { animation-delay: 0.45s; }
.splash-logo line:nth-child(4) { animation-delay: 0.5s; }
.splash-logo line:nth-child(5) { animation-delay: 0.55s; }
.splash-logo line:nth-child(6) { animation-delay: 0.65s; }
.splash-logo line:nth-child(7) { animation-delay: 0.7s; }
.splash-logo line:nth-child(8) { animation-delay: 0.75s; }

@keyframes splashStrokeDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes splashLogoIn {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Brand name text */
.splash-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transform: translateY(8px);
    animation: splashBrandIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) 1s forwards;
}

.splash-brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #1A1A1A;
}

.splash-brand-sub {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #02D4D5;
}

@keyframes splashBrandIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   (Pure CSS Transitions managed via a lightweight Intersection Observer)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Reveals & Image Expansion */
.reveal-blur {
    opacity: 0;
    filter: blur(15px);
    transform: translateY(40px) scale(0.9);
    transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal-blur.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

.image-expand-container {
    overflow: hidden;
}
.image-expand-container img {
    transform: scale(1.3);
    filter: brightness(1.2);
    transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1), filter 1.5s ease;
}
.image-expand-container.active img {
    transform: scale(1);
    filter: brightness(1);
}


/* ==========================================================================
   MOBILE MENU TOGGLE HAMBURGER SPAN TRANSFORMATIONS
   ========================================================================== */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ==========================================================================
   TIMELINE STEP BADGE ACTIVE STATES
   (Provides smooth transition state when hover/active triggers via JS)
   ========================================================================== */
.process-step.active .step-badge {
    background-color: #02D4D5 !important;
    border-color: #02D4D5 !important;
    color: #FFFFFF !important;
    box-shadow: 0 10px 25px rgba(2, 212, 213, 0.25) !important;
    transform: scale(1.05) !important;
}

/* Mobile nav-links sliding drawer behavior override */
.nav-links.active {
    left: 0 !important;
}

/* Base style resets not fully covered by simple resets */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Decorative Underline Draw Animation */
@keyframes drawUnderline {
    to {
        stroke-dashoffset: 0;
    }
}
.path-underline {
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
}
.reveal.active .path-underline {
    animation: drawUnderline 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.8s;
}

/* Hero Carousel transitions */
.carousel-slide {
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), 
                clip-path 1.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    clip-path: circle(0% at 50% 50%);
}
.carousel-slide:first-child {
    clip-path: circle(150% at 50% 50%);
}

/* ==========================================================================
   PREMIUM CUSTOM CURSOR STYLES
   ========================================================================== */
@media (min-width: 1024px) {
    /* Hide default cursor on desktop when custom cursor is active */
    body.custom-cursor-active {
        cursor: none !important;
    }
    body.custom-cursor-active a,
    body.custom-cursor-active button,
    body.custom-cursor-active .btn,
    body.custom-cursor-active input,
    body.custom-cursor-active textarea,
    body.custom-cursor-active [role="button"],
    body.custom-cursor-active .cursor-pointer,
    body.custom-cursor-active .carousel-dot,
    body.custom-cursor-active .process-step {
        cursor: none !important;
    }

    #custom-cursor-dot,
    #custom-cursor-ring {
        display: block !important;
    }
}

/* Cursor ring smooth hover transitions */
#custom-cursor-ring {
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                height 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                border-color 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.3s ease;
}

#custom-cursor-ring.hovering {
    width: 50px !important;
    height: 50px !important;
    background-color: rgba(2, 212, 213, 0.08) !important;
    border-color: #02D4D5 !important;
    box-shadow: 0 0 20px rgba(2, 212, 213, 0.25);
}

#custom-cursor-dot.hovering {
    transform: translate(-50%, -50%) scale(1.8) !important;
    background-color: #02D4D5 !important;
}

/* ==========================================================================
   PREMIUM WORD-BY-WORD REVEAL ANIMATION (HERO H1)
   ========================================================================== */
@keyframes wordEntrance {
    0% {
        opacity: 0;
        transform: translateY(22px) rotate(1.5deg) scale(0.97);
    }
    60% {
        transform: translateY(-2px) rotate(-0.3deg) scale(1.005); /* Soft overshoot float */
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

.hero-title .word-span,
.hero-title .word-span-special {
    display: inline-block;
    opacity: 0;
    will-change: transform, opacity;
    animation: wordEntrance 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    margin-right: 0.15em; /* Spacing between inline-block words */
}

/* Special styling for word wrapper with absolute SVG underline */
.hero-title .word-span-special {
    margin-right: 0.25em; /* Extra spacing for Playfair Display italic padding */
}

