:root {
    /* Refined Palette - Softer & Cleaner */
    --primary: #2563eb;
    --primary-soft: #eff6ff;   /* Light blue background for inputs */
    --primary-dark: #1d4ed8;
    --accent: #38bdf8;
    
    --dark: #0f172a;
    --text: #334155;
    --text-light: #94a3b8;
    --white: #ffffff;
    
    /* Spacing & Geometry */
    --container: 1200px;
    --header-height: 90px;
    --radius: 24px;            
    --btn-radius: 50px;
    
    /* Neater Shadows */
    --shadow: 0 10px 40px -10px rgba(0,0,0,0.08);
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    overflow-x: hidden; /* Strict horizontal scroll prevention */
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f8fafc;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Utilities */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section-pad { padding: 100px 0; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 36px;
    background: var(--primary);
    color: white;
    border-radius: var(--btn-radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Forms */
input, select, textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: var(--primary-soft);
    font-family: inherit;
    font-size: 1rem;
    color: var(--dark);
    transition: all 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
    margin-left: 5px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}
header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
}
.nav-flex { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo img { height: 80px; width: auto; }

/* Desktop Nav */
.main-nav ul { display: flex; gap: 40px; }
.main-nav a { font-weight: 500; color: var(--text); font-size: 0.95rem; position: relative; }
.main-nav a:hover { color: var(--primary); }

/* Mobile Toggle (Hidden on Desktop) */
.mobile-toggle { display: none; font-size: 1.8rem; cursor: pointer; color: var(--dark); user-select: none; }

/* Hero */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
    padding: 140px 0 100px;
    text-align: center;
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

/* Decorative blobs — top-right and bottom-left */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    pointer-events: none;
}
.hero::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #60a5fa, transparent);
    top: -150px;
    right: -100px;
}
.hero::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #818cf8, transparent);
    bottom: -100px;
    left: -80px;
}

.hero h1 { font-size: 3.2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; position: relative; line-height: 1.1; }
.hero p { font-size: 1.2rem; opacity: 0.8; max-width: 600px; margin: 0 auto; position: relative; }

/* Grid & Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    align-items: center;
}
.card {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.12); }

/* Blog Cards */
.blog-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: 0.3s; }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.blog-img { height: 220px; width: 100%; object-fit: cover; }
.blog-content { padding: 32px; }
.blog-meta { font-size: 0.8rem; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 12px; letter-spacing: 0.05em; }
.blog-title { font-size: 1.35rem; font-weight: 700; color: var(--dark); line-height: 1.3; display: block; margin-bottom: 12px; }

/* Logo Slider */
.logo-slider-container {
    width: 100%;
    overflow-x: hidden; /* Hide scrollbar but allow JS scroll */
    white-space: nowrap;
    padding: 20px 0;
    cursor: grab;
    user-select: none;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}
.logo-slider-container:active {
    cursor: grabbing;
}
.logo-track {
    display: inline-flex;
    align-items: center;
    gap: 60px;
    padding: 0 40px;
}
.logo-item {
    flex-shrink: 0;
    opacity: 0.5;
    transition: 0.3s;
}
.logo-item:hover {
    opacity: 1;
    transform: scale(1.05);
}
.logo-item img {
    height: 80px; /* Uniform height */
    width: auto;
    filter: grayscale(0%);
    transition: 0.3s;
}
.logo-item:hover img {
    filter: grayscale(0%);
}


/* Footer - Columns */
footer { 
    background: var(--dark); 
    color: white; 
    padding: 80px 0 30px; 
    border-radius: 0; 
    margin-top: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}
.footer h4 { margin-bottom: 20px; font-size: 1.1rem; color: white; font-weight: 700; }
.footer ul li { margin-bottom: 12px; opacity: 0.7; font-size: 0.95rem; }
.footer a:hover { opacity: 1; text-decoration: underline; color: var(--accent); }

.copyright { 
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 30px; 
    text-align: center; 
    opacity: 0.8; 
    font-size: 0.9rem; 
}

/* --- ANIMATIONS & JS CLASSES --- */

/* ─── Scroll Progress Bar ──────────────────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), #60a5fa, var(--accent));
    z-index: 99998;
    box-shadow: 0 0 10px rgba(37,99,235,0.7), 0 0 20px rgba(96,165,250,0.4);
    transition: width 0.1s linear;
}

/* ─── Hero Animated Gradient ───────────────────────────────────── */
.hero {
    background: linear-gradient(-45deg, #0f172a, #1e3a8a, #1e40af, #0d1b45) !important;
    background-size: 400% 400% !important;
    animation: hero-gradient 14s ease infinite;
}
@keyframes hero-gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hero orb blobs — pulse & breathe */
@keyframes blob-pulse {
    0%, 100% { transform: scale(1);    opacity: 0.12; }
    50%       { transform: scale(1.25); opacity: 0.20; }
}
.hero::before { animation: blob-pulse  9s ease-in-out infinite; }
.hero::after  { animation: blob-pulse  9s ease-in-out infinite; animation-delay: -4.5s; }

/* Hero content — staggered fade-up on load */
@keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero .container > * {
    animation: hero-fade-up 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.hero .container > *:nth-child(1) { animation-delay: 0.1s; }
.hero .container > *:nth-child(2) { animation-delay: 0.25s; }
.hero .container > *:nth-child(3) { animation-delay: 0.42s; }
.hero .container > *:nth-child(4) { animation-delay: 0.58s; }

/* Hero canvas (particles) */
#hero-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

/* ─── Floating animation for hero badges ───────────────────────── */
@keyframes float-y {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}
.float-badge       { animation: float-y 4.5s ease-in-out infinite; }
.float-badge-delay { animation: float-y 4.5s ease-in-out infinite; animation-delay: -2.25s; }

/* ─── Buttons — shimmer, ripple, magnetic ──────────────────────── */
.btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.35s ease;
}
/* Shimmer sweep */
.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 65%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-20deg);
    transition: left 0.55s ease;
    pointer-events: none;
}
.btn:hover::after { left: 150%; }
/* Ripple element (injected by JS) */
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: scale(0);
    animation: ripple-anim 0.65s linear forwards;
    pointer-events: none;
}
@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* ─── Nav link underline slide ─────────────────────────────────── */
.main-nav a {
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.32s cubic-bezier(0.4,0,0.2,1);
}
.main-nav a:hover::after { width: 100%; }

/* ─── Scroll Reveal variants ───────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.75s cubic-bezier(0.5,0,0,1),
                transform 0.75s cubic-bezier(0.5,0,0,1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-44px);
    transition: opacity 0.75s cubic-bezier(0.5,0,0,1),
                transform 0.75s cubic-bezier(0.5,0,0,1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(44px);
    transition: opacity 0.75s cubic-bezier(0.5,0,0,1),
                transform 0.75s cubic-bezier(0.5,0,0,1);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.75s cubic-bezier(0.34,1.56,0.64,1),
                transform 0.75s cubic-bezier(0.34,1.56,0.64,1);
}

.reveal.active       { opacity: 1; transform: translateY(0); }
.reveal-left.active  { opacity: 1; transform: translateX(0); }
.reveal-right.active { opacity: 1; transform: translateX(0); }
.reveal-scale.active { opacity: 1; transform: scale(1); }

/* ─── Stagger delays ───────────────────────────────────────────── */
.delay-100 { transition-delay: 0.10s; }
.delay-200 { transition-delay: 0.20s; }
.delay-300 { transition-delay: 0.30s; }
.delay-400 { transition-delay: 0.40s; }
.delay-500 { transition-delay: 0.50s; }

/* ─── Card 3D tilt prep ────────────────────────────────────────── */
.card {
    transform-style: preserve-3d;
    will-change: transform;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.card:hover {
    box-shadow: 0 28px 60px -10px rgba(37,99,235,0.18);
}

/* ─── Blog card image zoom ─────────────────────────────────────── */
.blog-card {
    transform-style: preserve-3d;
    will-change: transform;
}
.blog-card:hover {
    box-shadow: 0 28px 60px -10px rgba(37,99,235,0.18);
}
.blog-img {
    transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94);
    overflow: hidden;
}
.blog-card:hover .blog-img {
    transform: scale(1.06);
}

/* ─── Section image hover zoom ─────────────────────────────────── */
.img-zoom-wrap {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: block;
}
.img-zoom-wrap img {
    transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
    width: 100%;
}
.img-zoom-wrap:hover img {
    transform: scale(1.05);
}

/* ─── Animated gradient section labels ─────────────────────────── */
@keyframes label-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.section-label {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary), #60a5fa, var(--primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: label-shimmer 3s linear infinite;
}

/* --- RESPONSIVE MEDIA QUERIES --- */

@media (max-width: 992px) {
    /* Mobile Navigation */
    .mobile-toggle { display: block; z-index: 1001; }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden by default */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        padding: 100px 40px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }
    
    .main-nav.active { right: 0; }
    
    .main-nav ul {
        flex-direction: column;
        gap: 30px;
    }
    
    .main-nav a {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--dark);
    }

    /* Mobile Overlay */
    .nav-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(15, 23, 42, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: 0.3s;
        z-index: 998;
        backdrop-filter: blur(2px);
    }
    .nav-overlay.active { opacity: 1; pointer-events: auto; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .section-pad { padding: 60px 0; }
    
    .hero {
        padding: 110px 0 60px;
        border-radius: 0 0 24px 24px;
    }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    
    .grid-2 { grid-template-columns: 1fr; gap: 30px; }
    .grid-3 { grid-template-columns: 1fr; gap: 20px; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: left; }
    
    /* Order adjustments for mobile stacking */
    .grid-2 > div:nth-child(2) { order: -1; } /* Images often look better on top on mobile */
    
    .btn { padding: 14px 28px; width: 100%; text-align: center; }
    .hero .btn { width: auto; margin-bottom: 10px; margin-left: 0 !important; }
}