/* Typography and Icons */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* Base Styles */
html.lenis {
    height: auto;
}
.lenis.lenis-smooth {
    scroll-behavior: auto;
}
.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis.lenis-stopped {
    overflow: hidden;
}

/* Glassmorphism */
.bg-glass {
    background: rgba(252, 250, 247, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Editorial Depth & Shadows */
.editorial-shadow {
    box-shadow: 0 20px 40px rgba(46, 47, 45, 0.04);
}
.hero-image-shadow {
    filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.15));
}

.ghost-border {
    border: 1px solid rgba(173, 173, 171, 0.15); /* outline-variant at 15% */
}

/* Hide scrollbar for clean aesthetic */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}

/* Custom Modal Animation */
.modal-active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.modal-content {
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-active .modal-content {
    transform: translateY(0) scale(1);
}

/* Focus styling */
input:focus, textarea:focus {
    outline: none;
    border-bottom-color: #F26D21 !important;
}

/* Text Selection */
::selection {
    background-color: #ff8c4f;
    color: white;
}

/* Gradient Background */
.signature-gradient {
    background: linear-gradient(135deg, #F26D21 0%, #ff8c4f 100%);
}

/* Utilities */
.text-balance {
    text-wrap: balance;
}

/* Custom Interactive Cursor */
@media (pointer: fine) {
    /* Only apply custom cursor on non-touch devices and completely hide system cursor */
    * {
        cursor: none !important;
    }

    #cursor-dot {
        position: fixed;
        top: 0; left: 0;
        width: 6px; height: 6px;
        background-color: #F26D21; /* Primary Orange */
        border-radius: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 10000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    #cursor-glow {
        position: fixed;
        top: 0; left: 0;
        width: 80px; height: 80px;
        background: radial-gradient(circle, rgba(242, 109, 33, 0.4) 0%, rgba(242, 109, 33, 0) 70%);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 9999;
        opacity: 0;
        mix-blend-mode: multiply; /* Looks elegant on light backgrounds */
        transition: opacity 0.3s ease;
        will-change: transform;
    }
    
    /* When body has 'is-hovering' class for actionable elements */
    body.is-hovering #cursor-glow {
        transform: translate(-50%, -50%) scale(1.5);
        background: radial-gradient(circle, rgba(242, 109, 33, 0.6) 0%, rgba(242, 109, 33, 0) 70%);
    }

    body.is-hovering #cursor-dot {
        transform: translate(-50%, -50%) scale(0); /* Hide dot when hovering to let glow lead */
    }
}

/* Tech-Zen 3D Satin Glass Blobs */
.tech-zen-blob {
    pointer-events: none;
    z-index: 0;
    /* Satin glass texture with subtle brand orange */
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(242, 109, 33, 0.08) 60%, transparent);
    /* 3D volume via inner shadow */
    box-shadow: inset 20px 20px 60px rgba(255, 255, 255, 0.5),
                inset -20px -20px 60px rgba(242, 109, 33, 0.05);
    /* Glass refraction */
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    /* Organic shape */
    border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%;
    animation: blobMorph 18s infinite alternate ease-in-out;
    opacity: 0.8;
}

.blob-orb2 {
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.4), rgba(242, 109, 33, 0.1) 70%, transparent);
    animation: blobMorph 24s infinite alternate-reverse ease-in-out;
}

@keyframes blobMorph {
    0% {
        border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%;
        transform: rotate(0deg) scale(1) translateY(0);
    }
    100% {
        border-radius: 65% 35% 55% 45% / 45% 65% 35% 55%;
        transform: rotate(35deg) scale(1.05) translateY(-40px);
    }
}

/* Fluid Organic Wave Transitions */
.fluid-divider {
    position: absolute;
    bottom: -1px; /* Overlap slightly to prevent tiny pixel lines */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 10;
}

.wave-svg {
    position: relative;
    display: block;
    width: 200%;
    height: 50px;
}

@media (min-width: 768px) {
    .wave-svg {
        height: 100px;
    }
}

.wave-path {
    animation: flowWave 15s linear infinite;
}

.wave-path-reverse {
    animation: flowWave 20s linear infinite reverse;
}

@keyframes flowWave {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); } /* Shifts exactly 1 cycle */
}

/* Glass Tilt Cards */
.perspect-1000 {
    perspective: 1000px;
}
.glass-tilt-card {
    transition: transform 0.1s ease-out, background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    transform-style: preserve-3d;
    will-change: transform;
}
.glass-tilt-card:not(:hover) {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Cinematic Film Grain Overlay */
body::after {
    content: "";
    position: fixed;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    animation: grainAnimation 8s steps(10) infinite;
}

@keyframes grainAnimation {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

/* Escáner de Intención láser en Botones */
.open-modal-btn {
    position: relative;
    overflow: hidden;
}
.open-modal-btn * {
    position: relative;
    z-index: 2;
}
.open-modal-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -20px;
    width: 2px;
    height: 100%;
    background: #ffffff;
    box-shadow: 0 0 10px 4px var(--primary), 0 0 20px 8px var(--primary);
    z-index: 10;
    opacity: 0;
    mix-blend-mode: overlay;
}
.open-modal-btn:hover::after {
    animation: scanLaser 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes scanLaser {
    0% { left: -20%; opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: 120%; opacity: 0; }
}

/* Micro-Animaciones 'Geometría Sagrada' para Iconos */
.icon-sacred-pulse {
    animation: sacredPulse 3s ease-in-out infinite;
}
@keyframes sacredPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0px var(--primary)); }
    50% { transform: scale(1.12); filter: drop-shadow(0 0 8px var(--primary)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--primary)); }
}

.icon-sacred-spin {
    animation: sacredSpin 12s linear infinite;
}
@keyframes sacredSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.icon-sacred-float {
    animation: sacredFloat 4s ease-in-out infinite;
}
@keyframes sacredFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
