@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;500;700;800&display=swap');

:root {
    /* Professional Tech Palette */
    --primary: #1e40af; /* Deep Blue */
    --primary-light: #3b82f6; /* Bright Blue */
    --secondary: #0f172a; /* Slate Dark */
    --accent: #0ea5e9; /* Sky Blue */
    
    --dark: #0f172a;
    --light: #f8fafc;
    --gray-light: #e2e8f0;

    /* Fonts */
    --font-main: 'Outfit', sans-serif; /* Keeping Outfit as main to avoid jarring change */
    --font-header: 'Syne', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

body {
    font-family: var(--font-main);
    background-color: var(--light);
    color: var(--dark);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--primary); /* Deep blue handle */
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

/* Parallax & Motion Helpers */
.parallax-container {
    position: relative;
    overflow: hidden;
}

.reveal-text {
    opacity: 0;
    transform: translateY(30px);
}

/* Three.js Canvas Container */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    /* Added gradient overlay in CSS instead of canvas opacity to control contrast better */
    opacity: 1; 
}

/* Hero Background Gradient Wrapper */
.hero-wrapper {
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(224, 242, 254, 0.3) 0%, rgba(248, 250, 252, 1) 100%);
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.85); /* Slightly more opaque for professional look */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Text Gradients */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Marquee / Testimonials */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    padding: 20px 0;
    position: relative;
    z-index: 10;
}

.marquee-content {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll-left 40s linear infinite; /* Slower for better readability */
}

.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes scroll-left {
    to {
        transform: translateX(-50%);
    }
}

.testimonial-card {
    width: 400px;
    flex-shrink: 0;
    padding: 40px;
    border-radius: 20px;
    white-space: normal;
    /* Apply glass styles primarily here if not using partial class */
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .testimonial-card {
        width: 300px;
        padding: 25px;
    }
}

/* CTA / Contact Section from Reference */
.cta-section {
    min-height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: #050505;
    color: #fff;
    border-radius: 40px 40px 0 0;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    z-index: 20;
    margin-top: 50px; /* Separation from previous section */
}

.cta-section h2 {
    font-family: var(--font-header);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 20px;
}

.btn-grad {
    margin-top: 20px;
    padding: 20px 50px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-grad:hover {
    background: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
}

/* Form in CTA adaptation */
.cta-form-container {
    width: 100%;
    max-width: 600px;
    margin-top: 40px;
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.cta-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    font-family: var(--font-mono);
}

.cta-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255,255,255,0.1);
}

/* Bento Grid Styles */
/* Bento Grid Styles */
/* Mobile: Horizontal Carousel */
/* Mobile: Horizontal Carousel */
.bento-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px; /* Reduced gap */
    padding: 0 24px 24px 24px; /* Add horizontal padding for snap start alignment */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.bento-grid::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .bento-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        overflow-x: visible;
        padding: 0 0 0 0;
    }
}

.bento-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Was space-between, causing gaps */
    gap: 20px; /* Consistent spacing between image, icon, text */
    
    /* Mobile Carousel Properties */
    width: 75vw; /* Fixed width, smaller than viewport */
    min-width: 260px; /* Minimum safety width */
    max-width: 340px; /* Maximum safety width on mobile */
    scroll-snap-align: start; /* Align to start (left) with container padding */
    flex-shrink: 0;
}

/* Image inside card on mobile */
@media (max-width: 768px) {
    .bento-card img {
        height: 140px !important; /* Smaller image height */
        width: 100%;
        object-fit: cover;
    }
}

@media (min-width: 768px) {
    .bento-card {
        width: auto; /* Reset */
        min-width: auto; 
        max-width: none;
        padding: 30px;
        justify-content: space-between; /* Restore for balanced grid layout */
    }
}

/* Mobile-Only Images */
.mobile-only-img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 0; /* Handled by flex gap */
}

@media (min-width: 768px) {
    .mobile-only-img {
        display: none !important;
    }
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
    border-color: var(--primary-light);
}

/* Specific Spans for Bento Effect */
.bento-span-2 {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .bento-col-span-2 {
        grid-column: span 2;
    }
    .bento-row-span-2 {
        grid-row: span 2;
    }
}

.bento-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0; /* Handled by flex gap */
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent icon shrinking */
}

.bento-card:hover .bento-icon {
    background: var(--primary);
    color: white;
}

.bento-title {
    font-family: var(--font-header); /* Will fallback to Outfit if Syne not loaded or variable issue, which is fine */
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.bento-desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Specific Card Styles for Visual Variety */
.bento-dark {
    background: var(--secondary);
    color: white;
    border: none;
}

.bento-dark .bento-title {
    color: white;
}

.bento-dark .bento-desc {
    color: #94a3b8;
}

.bento-dark .bento-icon {
    background: rgba(255,255,255,0.1);
    color: white;
}
