/* ==========================================================
   THE 2026 AESTHETIC LEAP (DEL CÓDIGO ESTÁTICO A LA INTERFAZ SINTÉTICA)
   Vanguard Design Architecture - AI MAXIMUS
   ========================================================== */

/* 1. Atmospheric Lighting & Analog Film Grain (El "Detalle Sorpresa" Orgánico) */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.035; /* Subtly breaks the artificial perfection */
    pointer-events: none;
    z-index: 9999;
    transform: translateZ(0);
    will-change: transform;
}

/* Base Mesh Gradient that breathes (Profundidad Atmosférica) */
body {
    background: radial-gradient(circle at 50% 0%, rgba(50, 118, 242, 0.04) 0%, transparent 70%), 
                radial-gradient(circle at 100% 50%, rgba(33, 197, 140, 0.03) 0%, transparent 50%),
                var(--c-bg-1) !important;
    background-attachment: fixed !important;
    animation: breathingBackground 20s ease-in-out infinite alternate;
    overflow-x: hidden;
}

@keyframes breathingBackground {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* 2. Bento Grids Orgánicos (Squircle Approximation) & Spatial UI */
.bento-card {
    border-radius: 28px !important; /* Curvatura suavizada */
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.08), 
        0 30px 60px -15px rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(28px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(140%) !important;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                border-color 0.6s ease !important;
    transform-origin: center center;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.bento-card:hover {
    transform: translateY(-8px) scale(1.01) !important;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.15), 
        0 40px 80px rgba(50, 118, 242, 0.12) !important;
    border-color: rgba(255,255,255,0.12) !important;
}

/* 3. Rim Lighting on Buttons (Iluminación de Borde Física) */
.btn {
    border-radius: 14px !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.btn-primary, .btn-accent {
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.4), /* Upper rim light */
        inset 0 -1px 1px rgba(0, 0, 0, 0.2),      /* Lower dim shadow */
        0 8px 25px rgba(50, 118, 242, 0.4) !important;
}

.btn:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.15);
}

/* 4. Tipografía como Arte (Metal Pulido Gradient) & Kerning */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em !important;
}

.section-title, .display-4, .display-6, h1, h2.fw-bold {
    background: linear-gradient(135deg, #ffffff 0%, #b8c0d0 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
}

/* 5. Custom Smart Cursor (Hardware Accelerated) */
/* El cursor por defecto de Windows se mantiene para máxima precisión operativa */
/* Se elimina el 'cursor: none' para evitar mareos o confusión táctica */

.smart-cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 6px; height: 6px;
    background: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    mix-blend-mode: exclusion;
    transition: transform 0.05s linear;
}

.smart-cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 0px; height: 0px;
    border: 1px solid rgba(50, 118, 242, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                background 0.3s ease, border-color 0.3s ease;
}

/* State: Hover over interactive element */
.smart-cursor-ring.active {
    width: 45px; height: 45px;
    background: rgba(50, 118, 242, 0.08);
    border-color: rgba(50, 118, 242, 0.4);
    mix-blend-mode: screen;
}

/* State: Typing */
.smart-cursor-ring.typing {
    width: 0; height: 0;
    border-color: transparent;
    background: transparent;
}

/* 6. Spring Physics Scroll Reveal (Initial hidden state) */
.spring-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.8s ease-out, transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.spring-reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 7. Detalles Estrella "Nivel Nobel" (Reading Progress & Magnetic UI) */
.scroll-progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, #21C58C, #3276F2, #ffffff);
    z-index: 10005;
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 12px rgba(50, 118, 242, 0.8);
}

.btn-accent, .btn-primary {
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease, box-shadow 0.25s ease !important;
    will-change: transform;
}
