/* ===========================
   CSS Variables
   =========================== */
:root {
    --primary: #0f172a;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --surface: #f8fafc;
    --text: #1e293b;
    --text-muted: #64748b;
}

/* ===========================
   Base Styles
   =========================== */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.font-display {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.02em;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Gradient Text
   =========================== */
.gradient-text {
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   Hero Gradient Background
   =========================== */
.hero-gradient {
    background: radial-gradient(ellipse at top, #f0f9ff 0%, #ffffff 50%, #f8fafc 100%);
}

/* ===========================
   Glass Panel Effect
   =========================== */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ===========================
   Feature Cards
   =========================== */
.feature-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Comparison Table Rows
   =========================== */
.comparison-row {
    transition: background-color 0.2s ease;
}

.comparison-row:hover {
    background-color: #f8fafc;
}

/* ===========================
   Navigation Links
   =========================== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ===========================
   Tech Badge
   =========================== */
.tech-badge {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

/* ===========================
   Noise Background
   =========================== */
.noise-bg {
    position: relative;
}

.noise-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.4;
}

/* ===========================
   Scroll Indicator Animation
   =========================== */
.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===========================
   Reveal Animation
   =========================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* ===========================
   Ecosystem Cards
   =========================== */
.ecosystem-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
}

/* ===========================
   Image Slider Styles
   =========================== */
.slider-container {
    position: relative;
    overflow: hidden;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slider-slide.active {
    opacity: 1;
    position: relative;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===========================
   Slide Indicators
   =========================== */
.slide-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.slide-indicator.active {
    width: 24px;
    border-radius: 4px;
    background-color: #ffffff;
}

/* ===========================
   Gallery Grid
   =========================== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ===========================
   Before/After Comparison Slider
   =========================== */
.comparison-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    user-select: none;
}

.comparison-before,
.comparison-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.comparison-before img,
.comparison-after img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.comparison-after {
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.comparison-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: #ffffff;
    cursor: ew-resize;
    transform: translateX(-50%);
    z-index: 10;
}

.comparison-slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.comparison-slider::after {
    content: '⟷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1e293b;
    font-size: 20px;
    font-weight: bold;
    pointer-events: none;
}

.comparison-label {
    position: absolute;
    top: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    pointer-events: none;
    z-index: 5;
}

.comparison-label.before {
    left: 1rem;
}

.comparison-label.after {
    right: 1rem;
}

/* ===========================
   Modal Styles
   =========================== */
#imageModal,
#contactModal {
    display: none;
}

#imageModal.active,
#contactModal.active {
    display: flex;
}

/* ===========================
   Responsive Typography
   =========================== */
@media (max-width: 768px) {
    .font-display {
        letter-spacing: -0.01em;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* ===========================
   Smooth Transitions
   =========================== */
button,
a,
.feature-card,
.gallery-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Focus States
   =========================== */
button:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ===========================
   Loading State
   =========================== */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ===========================
   Backdrop Blur Support
   =========================== */
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
    .glass-panel {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .no-print,
    nav,
    footer,
    button {
        display: none !important;
    }
}

/* ===========================
   Utility Classes
   =========================== */
.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-photo {
    aspect-ratio: 4 / 3;
}

/* ===========================
   Custom Scrollbar
   =========================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===========================
   Selection
   =========================== */
::selection {
    background-color: #3b82f6;
    color: #ffffff;
}

::-moz-selection {
    background-color: #3b82f6;
    color: #ffffff;
}

/*=====================*/
/* ===========================
   Infinite Partners Marquee
   =========================== */
.marquee-content {
    flex-shrink: 0;
    min-width: 100%;
    animation: scrollX 25s linear infinite;
}

/* Pauses the animation when a user hovers over the section */
.group:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes scrollX {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}