/* Dynamite Technology - Premium UI Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary-glow: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  --accent-glow: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}

/* ─── Enhanced Text Rendering ─── */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ─── Smooth Page Load Animation ─── */
@keyframes pageLoad {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
body {
    animation: pageLoad 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
.dark ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.15);
    border-radius: 9999px;
    border: 2px solid #020617;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.3);
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 9999px;
    border: 2px solid #ffffff;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* ─── Premium Typography ─── */
.font-display {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
}
.font-sans-premium {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

/* ─── Glassmorphism System ─── */
.glass-card {
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 10px 30px -10px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.dark .glass-card {
    background: rgba(15, 23, 42, 0.50);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 10px 30px -10px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.03);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.dark .glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* ─── Mouse-Tracking Border Glow ─── */
.glow-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
}
.glow-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: radial-gradient(
        400px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
        rgba(37, 99, 235, 0.35),
        rgba(139, 92, 246, 0.15) 40%,
        transparent 70%
    );
    -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;
}
.glow-card-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        350px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
        rgba(37, 99, 235, 0.06),
        rgba(139, 92, 246, 0.03) 45%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

/* ─── Animated Gradient Border Shimmer ─── */
@keyframes borderShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.shimmer-border {
    position: relative;
}
.shimmer-border::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(
        90deg,
        rgba(37, 99, 235, 0.3),
        rgba(139, 92, 246, 0.3),
        rgba(37, 99, 235, 0.3),
        rgba(139, 92, 246, 0.3)
    );
    background-size: 300% 100%;
    animation: borderShimmer 4s ease infinite;
    -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;
}

/* ─── Card Shine Hover Effect ─── */
.card-shine {
    position: relative;
    overflow: hidden;
}
.card-shine::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(255, 255, 255, 0.05) 45%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.05) 55%,
        transparent 60%
    );
    transform: translateX(-100%) translateY(-100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 3;
}
.card-shine:hover::after {
    transform: translateX(30%) translateY(30%);
}

/* ─── Section Divider ─── */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(37, 99, 235, 0.2), rgba(139, 92, 246, 0.2), transparent);
}
.dark .section-divider {
    background: linear-gradient(to right, transparent, rgba(37, 99, 235, 0.15), rgba(139, 92, 246, 0.15), transparent);
}

/* ─── Page Background Meshes ─── */
.dark-grid-mesh {
    background-image: 
        radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 10% 60%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
}
.light-grid-mesh {
    background-image: 
        radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.05) 0%, transparent 60%),
        radial-gradient(circle at 10% 60%, rgba(139, 92, 246, 0.03) 0%, transparent 50%),
        linear-gradient(rgba(15, 23, 42, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
}

/* ─── Scroll Reveal System ─── */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children inside reveal containers */
.reveal-on-scroll [data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal-on-scroll [data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal-on-scroll [data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal-on-scroll [data-reveal-delay="4"] { transition-delay: 0.4s; }

/* ─── Floating Animation ─── */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-24px) scale(1.06);
    }
}
.animate-float {
    animation: float 8s ease-in-out infinite;
}

/* ─── Premium Hover Transitions ─── */
.premium-hover {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.premium-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -15px rgba(37, 99, 235, 0.12);
}
.dark .premium-hover:hover {
    box-shadow: 0 20px 40px -15px rgba(139, 92, 246, 0.18);
}

/* ─── Logo Dark Mode Glow ─── */
.logo-glow {
    transition: filter 0.3s ease;
}
.dark .logo-glow {
    filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.3)) drop-shadow(0 0 20px rgba(37, 99, 235, 0.1));
}

/* ─── Client Logo Dark Mode Visibility ─── */
.dark .client-logo {
    filter: grayscale(100%) invert(1) brightness(1.8);
    opacity: 0.5;
}
.dark .client-logo:hover {
    filter: grayscale(0%) invert(1) brightness(1.5);
    opacity: 0.9;
}

/* ─── Text Glow ─── */
.text-glow {
    text-shadow: 0 0 40px rgba(37, 99, 235, 0.25);
}

/* ─── Perspective ─── */
.perspective-1000 {
    perspective: 1000px;
}
.rotate-y-left {
    transform: rotateY(-10deg) rotateX(5deg);
}

/* ─── Data Flow SVG Dash Animations ─── */
@keyframes dash {
  to {
    stroke-dashoffset: -40;
  }
}
.flow-line {
  stroke-dasharray: 8 4;
  animation: dash 1.5s linear infinite;
}

/* ─── Gradient Backgrounds ─── */
.mesh-gradient-hero-dark {
    background-color: #020617;
}
.mesh-gradient-hero-light {
    background-color: #f8fafc;
}

/* ─── Signature Sandbox ─── */
.signature-canvas {
    cursor: crosshair;
    background: transparent;
    touch-action: none;
}
.signature-btn {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.signature-btn:hover {
    transform: translateY(-1px);
}

/* ─── Premium Button Glow ─── */
.btn-glow {
    position: relative;
    overflow: hidden;
}
.btn-glow::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.4), rgba(139, 92, 246, 0.4));
    filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}
.btn-glow:hover::before {
    opacity: 1;
}

/* ─── Focus Ring Upgrades ─── */
:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── Gradient Accent Line ─── */
.gradient-accent-line {
    position: relative;
}
.gradient-accent-line::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, #2563eb, #8b5cf6, #2563eb);
    border-radius: 1px;
}
