/* ==========================================================
   ✨ GLOBAL PATTERN ENGINE — global-pattern.css
   - Architecture: Layered Depth & Procedural Textures
   - Performance: 100% GPU-Accelerated (No Image Downloads)
   - Quality: High-Fidelity Micro-Interactions
========================================================== */

/* 1. PROCEDURAL FILM GRAIN (THE LUXURY TEXTURE)
   - Uses a CSS-native SVG filter to avoid external assets.
   - Makes flat colors look like high-end print material.
---------------------------------------------------------- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    /* Static-free fractal noise */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay; /* Blends with your specific site colors */
}

/* 2. MESH GRADIENT AMBIENCE
   - Mimics a "Travel Map" glow.
   - Positioned to lead the eye toward call-to-action areas.
---------------------------------------------------------- */
.bg-mesh-glow {
    position: relative;
    isolation: isolate; /* Creates a new stacking context */
}

.bg-mesh-glow::after {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    aspect-ratio: 1;
    background: radial-gradient(
        circle at center, 
        var(--primary-soft, rgba(255, 87, 34, 0.15)) 0%, 
        transparent 70%
    );
    filter: blur(80px);
    z-index: -1;
    animation: glowPulse 10s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from { transform: scale(1) translate(0, 0); opacity: 0.4; }
    to { transform: scale(1.2) translate(-5%, 5%); opacity: 0.7; }
}

/* 3. TACTILE DOT GRID (CARTOGRAPHY STYLE)
   - Evokes the feel of a travel planner or atlas.
---------------------------------------------------------- */
.bg-dot-grid {
    background-image: radial-gradient(
        var(--gray-300, #cbd5e1) 0.8px, 
        transparent 0.8px
    );
    background-size: clamp(20px, 4vw, 32px) clamp(20px, 4vw, 32px);
    background-attachment: local; /* Better scroll performance */
}

/* 4. THE "ELITE BORDER" (DYNAMIC CARD SHINE)
   - Uses mask-compositing for a true "etched in glass" look.
---------------------------------------------------------- */
.card-premium {
    position: relative;
    background: var(--white, #fff);
    border-radius: var(--radius-xl, 24px);
    transition: var(--form-transition, all 0.4s cubic-bezier(0.4, 0, 0.2, 1));
}

.card-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px; /* The "Golden" thin border */
    background: linear-gradient(
        135deg, 
        rgba(255,255,255,0.8) 0%, 
        transparent 40%, 
        rgba(255,255,255,0.3) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}

/* 5. FROSTED GLASS 2.0 (MODERN CONCIERGE)
   - Optimized for mobile Safari (Webkit blur fix)
---------------------------------------------------------- */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
}

/* 6. SUBTLE MICRO-GRADIENT SECTIONS
   - Transitions that feel natural, not abrupt.
---------------------------------------------------------- */
.bg-soft-gradient {
    background: linear-gradient(
        180deg, 
        var(--white, #fff) 0%, 
        var(--gray-50, #f8fafc) 100%
    );
}

/* 7. HIGH-FIDELITY HOVER (KINETIC ENERGY)
   - Uses 'will-change' to tell the browser to pre-render GPU layers.
---------------------------------------------------------- */
.hover-reveal {
    will-change: transform, box-shadow;
    transition: 
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease;
}

.hover-reveal:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
}

/* 8. SKEUOMORPHIC ICON DEPTH
   - Makes SVG icons pop off the page.
---------------------------------------------------------- */
.icon-depth {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    transition: filter 0.3s ease;
}

.hover-reveal:hover .icon-depth {
    filter: drop-shadow(0 12px 12px rgba(var(--primary-rgb, 255, 87, 34), 0.2));
}

/* 9. THE "OLED SAFE" DARK PATTERN
   - Prevents smearing on premium phone screens.
---------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    .bg-dot-grid {
        background-image: radial-gradient(
            rgba(255, 255, 255, 0.05) 0.8px, 
            transparent 0.8px
        );
    }
    
    .glass-effect {
        background: rgba(15, 23, 42, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}