/* Imparis Solutions - Elite Design System v4.0
    Organizado para escalabilidade e performance.
*/

body {
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Lenis Core Engine - Required CSS */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* Glassmorphism Dinâmico */
.glass-nav {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001; /* Acima do noise-overlay (99) e progress bar (1000) */
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: 70px;
}

.dark .glass-nav {
    background: rgba(6, 10, 18, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Estado quando o usuário rola a página */
/* Header agora é estático via .glass-nav principal */

/* 0. Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0f4c92, transparent);
    background-size: 200% 100%;
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1000;
}

/* Ambient Glows Dinâmicos */
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(15, 76, 146, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.dark .glow-bg {
    background: radial-gradient(circle, rgba(47, 110, 184, 0.28) 0%, transparent 70%);
}

/* Bento Grid Premium Hover Dinâmico */
.bento-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px -10px rgba(0, 0, 0, 0.05);
    perspective: 1000px;
}

.dark .bento-card {
    background: linear-gradient(145deg, rgba(16, 24, 38, 0.92) 0%, rgba(8, 15, 27, 0.72) 100%);
    border: 1px solid rgba(126, 169, 223, 0.08);
    box-shadow: none;
}

.bento-card:hover {
    border-color: rgba(15, 76, 146, 0.4);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(145deg, rgba(20, 30, 45, 0.95) 0%, rgba(10, 20, 35, 0.8) 100%);
}

/* Spotlight Effect Otimizado */
.spotlight {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(circle 300px at var(--x) var(--y), rgba(15, 76, 146, 0.15) 0%, transparent 60%);
    z-index: 1;
}

.bento-card:hover .spotlight {
    opacity: 1;
}

/* Individual Carousel Box Styles (O Redesenho) */

/* 1. Scaling Card: Grid Pattern */
.box-scaling {
    background-image:
        radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}

/* 2. Tech Card: Metallic Border & Scanline */
.box-tech {
    border: 1px solid rgba(15, 76, 146, 0.4) !important;
}

.box-tech::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: scanline 4s linear infinite;
}

/* 3. Strategy Card: Soft Aurora */
.box-strategy {
    background: linear-gradient(145deg, #101826 0%, #060a12 100%);
}

.box-strategy .inner-glow {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: brand-500;
    filter: blur(60px);
    opacity: 0.1;
}

/* 4. Experience Card: Noise Texture */
.box-experience {
    background-color: #060a12;
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(255,255,255,0.01) 1px, transparent 0);
    background-size: 40px 40px;
}

/* Custom Utilities for Services Overhaul */
.sticky-column {
    position: sticky;
    top: 150px;
}

@media (max-width: 1024px) {
    .sticky-column {
        position: relative;
        top: 0;
    }
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    transition: all 0.5s cubic-bezier(0.2, 0, 0, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
}

.spotlight {
    position: fixed;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(15, 76, 146, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 1.5s ease;
    filter: blur(80px);
}

.body-scrolling .spotlight {
    opacity: 1;
}

.section-indicator {
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

.indicator-dot {
    width: 2px;
    height: 2px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.indicator-dot.active {
    height: 40px;
    background: rgba(15, 76, 146, 0.9);
    color: #fff;
    box-shadow: 0 0 20px rgba(15, 76, 146, 0.3);
}

::selection {
    background: rgba(15, 76, 146, 0.9);
    color: #fff;
}

@keyframes grid-move {
    0% { background-position: 0 0; }
    100% { background-position: 32px 32px; }
}

.animated-grid {
    animation: grid-move 20s linear infinite;
}

.text-glow {
    text-shadow: 0 0 30px rgba(15, 76, 146, 0.3);
}

.border-beam {
    position: relative;
}

.border-beam::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(90deg, transparent, rgba(15, 76, 146, 0.4), transparent);
    background-size: 200% 100%;
    animation: beam 4s linear infinite;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 1s;
}

.group:hover .border-beam::after {
    opacity: 1;
}

@keyframes beam {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.box-experience::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.1;
    filter: brightness(1.5);
}

/* Animations */
@keyframes scanline {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(320px);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.shadow-glow {
    box-shadow: 0 0 20px -5px rgba(15, 76, 146, 0.4);
}

.cta-btn {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.4);
    transition: all 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 45px rgba(124, 58, 237, 0.6);
}