/* ============================================
   UFreshCorp - Creative Stylesheet
   Modern dark theme with Glassmorphism & "Alive" effects
   ============================================ */

/* ============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
    /* Colors - Deep Space Theme */
    --color-bg-primary: #050508;
    --color-bg-secondary: #0a0a12;
    --color-bg-tertiary: #141420;

    /* Glassmorphism Colors */
    --glass-bg: rgba(20, 20, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Accent Colors - Neon Cyberpunk */
    --color-accent-cyan: #00f2ff;
    --color-accent-blue: #2d6aff;
    --color-accent-purple: #bc13fe;
    --color-accent-pink: #ff0055;
    --color-accent-gold: #ffd700;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-accent-cyan) 0%, var(--color-accent-blue) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(0, 242, 255, 0.2) 0%, rgba(45, 106, 255, 0.2) 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);

    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a0b0;
    --color-text-muted: #606070;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    /* Shadows & Glows */
    --glow-cyan: 0 0 20px rgba(0, 242, 255, 0.4);
    --glow-purple: 0 0 20px rgba(188, 19, 254, 0.4);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 3D Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* Particles Container */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    background: linear-gradient(to right, #fff, #a0a0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--color-text-primary);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 1;
}

section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    transition: var(--transition-smooth);
}

.header.scrolled {
    background: rgba(5, 5, 8, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: var(--spacing-xs) 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.7;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--color-accent-cyan);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--color-accent-cyan);
    border-radius: 50%;
    box-shadow: var(--glow-cyan);
}

/* Language Selector */
.lang-selector {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--glass-border);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--color-accent-cyan);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text-primary);
    position: absolute;
    transition: var(--transition-smooth);
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.menu-toggle span:nth-child(3) {
    bottom: 0;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-display);
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    z-index: 1;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 10px 20px -5px rgba(0, 242, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(0, 242, 255, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: var(--color-accent-blue);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(45, 106, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-top: var(--spacing-md);
}

/* ============================================
   CARDS & ECOSYSTEM
   ============================================ */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card,
.ecosystem-card,
.audience-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover,
.ecosystem-card:hover,
.audience-card:hover {
    transform: translateY(-10px);
    border-color: var(--glass-highlight);
    box-shadow: var(--shadow-card);
    background: rgba(30, 30, 50, 0.5);
}

/* Ecosystem Specifics */
.ecosystem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-fast);
}

.ecosystem-card:hover::before {
    opacity: 1;
}

.card-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
    transition: var(--transition-bounce);
}

.ecosystem-card:hover .card-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.1);
}

.card-title {
    margin-bottom: 0.5rem;
}

.card-description {
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-accent-cyan);
    margin-top: auto;
}

.card-link i {
    transition: transform 0.2s;
}

.card-link:hover i {
    transform: translateX(5px);
}

/* Audience Cards */
.audience-card {
    text-align: center;
    align-items: center;
}

.audience-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: rgba(5, 5, 8, 0.9);
    border-top: 1px solid var(--glass-border);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    color: #fff;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent-cyan);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(10, 10, 18, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition-smooth);
        border-radius: 0;
        border-left: 1px solid var(--glass-border);
    }

    .nav-menu.active {
        right: 0;
    }

    .cookie-content {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 var(--spacing-md);
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: var(--spacing-md);
    }

    .cookie-text p {
        margin-bottom: 0;
        font-size: 0.95rem;
    }

    .cookie-buttons {
        display: flex;
        gap: var(--spacing-sm);
        flex-shrink: 0;
    }

    .cookie-buttons .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    @media (max-width: 768px) {
        .cookie-content {
            flex-direction: column;
            text-align: center;
        }

        .cookie-buttons {
            width: 100%;
            flex-direction: column;
        }
    }

    /* ============================================
   ECOSYSTEM CARDS FIX
   ============================================ */
    .ecosystem-card {
        background: rgba(20, 20, 35, 0.6);
        /* More opaque */
        border: 1px solid rgba(255, 255, 255, 0.1);
        /* Stronger border */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .ecosystem-card:hover {
        background: rgba(30, 30, 50, 0.8);
        border-color: var(--color-accent-cyan);
        box-shadow: 0 10px 30px rgba(0, 242, 255, 0.15);
    }

    /* ============================================
   MENU FIX
   ============================================ */
    .nav-menu {
        background: rgba(5, 5, 8, 0.8);
        /* Darker background */
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(15px);
    }