/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.6s ease,
                box-shadow 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.stat-card.active-glow, .feature-card.active-glow {
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2), 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Specific Glow Colors */
.glow-cyan.active-glow {
    border-color: var(--neon-blue);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.25);
}

.glow-purple.active-glow {
    border-color: var(--neon-purple);
    box-shadow: 0 0 25px rgba(189, 0, 255, 0.25);
}

.glow-blue.active-glow {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
}

@media (max-width: 768px) {
    /* On mobile, remove hover transform to avoid conflict with scroll animation if needed, 
       but keeping scroll-reveal for interaction feeling */
    .glass-hover:hover {
        transform: none;
    }
}

/* Base styles and variables */
:root {
    --bg-dark: #020617;
    --bg-card: rgba(15, 23, 42, 0.6);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --neon-blue: #00f2ff;
    --neon-purple: #bd00ff;
    --neon-pink: #ff00e5;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.12);
    --nav-height: 80px;
    --transition-premium: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
    --section-padding: clamp(4rem, 10vw, 8rem) 8%;
    --container-max-width: 1400px;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-image: 
        radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(189, 0, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 100% 50%, rgba(0, 242, 255, 0.03) 0%, transparent 40%);
}

/* Glassmorphism Utility */
.glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.glass-hover {
    transition: var(--transition-premium);
}

.glass-hover:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(0, 242, 255, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 255, 0.15);
}

/* Header & Navigation */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    height: var(--nav-height);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.header.scrolled {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    height: 75px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--neon-blue), var(--accent), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(0, 242, 255, 0.4));
    cursor: pointer;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--neon-blue);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--neon-blue);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


.login-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 0.7rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition-premium);
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
}

.get-started-btn {
    background: linear-gradient(135deg, var(--accent), var(--neon-purple));
    color: white;
    padding: 0.75rem 2.2rem;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-premium);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.get-started-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.6);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12rem 8% 8rem;
    min-height: 100dvh;
    position: relative;
    overflow: hidden;
    gap: 2rem;
}

.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    animation: pulse 12s infinite alternate ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--neon-purple);
    bottom: 0;
    left: -100px;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.15; }
    100% { transform: scale(1.3) translate(50px, 50px); opacity: 0.25; }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.2;
    animation: float-gentle 10s infinite alternate;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 10;
}

.glow-text {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.05;
    margin-bottom: 2rem;
    font-weight: 900;
    letter-spacing: -3px;
    color: #ffffff;
}

.glow-text span {
    background: linear-gradient(to right, var(--neon-blue), var(--accent), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(0, 242, 255, 0.5));
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    max-width: 520px;
    line-height: 1.7;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 2rem;
    margin-bottom: 5rem;
}

.cta-btn {
    padding: 1.2rem 3rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-premium);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: none;
}

.cta-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    color: white;
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.5), 0 0 15px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.cta-btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 6s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20%, 100% { left: 100%; }
}

.cta-btn.primary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 50px -10px rgba(59, 130, 246, 0.8), 0 0 25px rgba(139, 92, 246, 0.5);
    border-color: rgba(255, 255, 255, 0.45);
}

.cta-btn.secondary {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
}

/* Stats Cards */
.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 500px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
}

.stat-icon {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.05);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.2rem;
}

/* Hero Illustration */
.hero-illustration {
    flex: 1.2;
    position: relative;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.illustration-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.main-svg-scene {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 50px rgba(0, 242, 255, 0.15));
}

/* Floating UI Cards - More compact and UI-like */
.floating-ui {
    position: absolute;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 100;
    width: 260px;
    animation: float-ui 8s ease-in-out infinite;
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 242, 255, 0.05);
}

.floating-ui:hover {
    border-color: var(--neon-blue);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 242, 255, 0.2);
}

.ui-icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.ui-content {
    flex: 1;
}

.ui-content p {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.1rem;
}

.ui-content span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes float-ui {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0); }
    33% { transform: translateY(-15px) translateX(10px) rotate(1deg); }
    66% { transform: translateY(10px) translateX(-15px) rotate(-1deg); }
}

.card-1 { top: 5%; right: 0; animation-delay: 0s; }
.card-2 { bottom: 15%; left: -5%; animation-delay: -2s; }
.card-3 { top: 40%; left: -15%; animation-delay: -4s; }
.card-trending { top: 60%; right: -10%; animation-delay: -6s; width: 220px; }
.card-stats { top: -10%; left: 20%; animation-delay: -1s; width: 200px; }

/* Features Section */
.features {
    padding: var(--section-padding);
    background: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.feature-card {
    padding: 3rem 2.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.feature-icon {
    font-size: 2.5rem;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-bottom: 1rem;
    transition: var(--transition-premium);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* Footer Section */
.footer {
    padding: 6rem 8% 2rem;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.8fr 1.2fr;
    gap: 4rem;
    max-width: var(--container-max-width);
    margin: 0 auto 5rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin: 1.5rem 0 2rem;
    max-width: 300px;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1.2rem;
}

.social-icon {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.social-icon:hover {
    color: var(--neon-blue);
}

.footer-links h4, .footer-newsletter h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--text-primary);
    padding-left: 5px;
}

.footer-newsletter p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.8rem;
}

.newsletter-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--neon-blue);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.newsletter-btn:hover {
    background: var(--neon-purple);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .hero {
        padding: 10rem 5% 5rem;
    }
    .glow-text {
        font-size: 4rem;
    }
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
        padding-bottom: 3rem;
        gap: 0.5rem;
        min-height: auto;
    }
    .hero-content {
        max-width: 100%;
        display: contents; /* Allows reordering children directly within .hero */
    }
    .glow-text {
        order: 1;
        margin-bottom: 0.8rem;
    }
    .hero-subtitle {
        order: 2;
        margin-bottom: 1.2rem;
        max-width: 100%;
    }
    .hero-buttons {
        order: 3;
        justify-content: center;
        margin-bottom: 0.5rem;
        gap: 1rem;
    }
    .hero-illustration {
        order: 4;
        width: 100%;
        height: 350px;
        margin-top: -1.5rem;
        margin-bottom: 1rem;
        transform: scale(0.9);
    }
    .stats-container {
        order: 5;
        margin: 1rem auto 0;
    }
    .floating-ui {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 6%;
        height: 80px;
    }

    .header-actions {
        gap: 1.2rem;
    }

    .nav {
        display: contents;
    }

    .hamburger {
        display: flex;
        flex-shrink: 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100dvh;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: var(--transition-premium);
        z-index: 1000;
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }
    
    .header-actions .get-started-btn {
        display: none;
    }

    .login-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .logo {
        font-size: 1.6rem;
        flex-shrink: 1;
        white-space: nowrap;
    }

    .hero {
        padding-top: 6rem;
    }

    .glow-text {
        font-size: clamp(2.2rem, 10vw, 3rem);
        letter-spacing: -1.5px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin-bottom: 1rem;
    }

    .cta-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
    }

    .hero-illustration {
        height: 300px;
        transform: scale(0.85);
    }

    .stats-container {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 300px;
        gap: 1rem;
    }

    .card-3, .card-stats, .card-trending {
        display: none;
    }

    .card-1 { top: 0; right: 5%; width: 180px; }
    .card-2 { bottom: 0; left: 5%; width: 180px; }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-brand, .footer-brand p {
        margin: 0 auto;
    }

    .social-links {
        justify-content: center;
        margin-top: 1.5rem;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 4%;
    }

    .header-actions {
        gap: 0.8rem;
    }

    .login-btn {
        padding: 0.5rem 1rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .hero {
        padding-top: 6.5rem;
    }

    .hero-illustration {
        height: 260px;
        transform: scale(0.8);
    }

    .floating-ui {
        width: 140px;
        padding: 0.6rem;
    }

    .ui-icon {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .ui-content p {
        font-size: 0.75rem;
    }
}

@media (max-width: 380px) {
    .header {
        padding: 0 3%;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .login-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .hamburger {
        padding: 3px;
    }
}