/* ==========================
   1. CSS VARIABLES & RESET
========================== */
:root {
    --bg-dark: #020617;
    --bg-secondary: #0f172a;
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --section-spacing: 100px;
    --glow-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(129, 140, 248, 0.08) 0%, transparent 25%);
    z-index: -2;
    animation: pulseBackground 15s ease-in-out infinite alternate;
}

@keyframes pulseBackground {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.text-accent { color: var(--accent-primary); }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; }

/* HEADER & NAV */
header {
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header.scrolled { padding: 0.7rem 0; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); }

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

.logo {
    font-size: 1.5rem; font-weight: 800; letter-spacing: 1px;
    text-decoration: none; color: var(--text-light); display: flex; align-items: center;
}
.logo span { color: var(--accent-primary); }

.desktop-nav ul { display: flex; list-style: none; gap: 2rem; }
.desktop-nav a {
    text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 0.95rem;
    position: relative; transition: color 0.3s ease;
}
.desktop-nav a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--accent-primary); transition: width 0.3s ease;
}
.desktop-nav a:hover { color: var(--text-light); }
.desktop-nav a:hover::after { width: 100%; }

.mobile-toggle { display: none; cursor: pointer; font-size: 1.5rem; color: var(--text-light); }

/* HERO */
#hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding-top: 80px; position: relative;
}
#hero::after {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 400px; height: 400px; background: var(--accent-primary); filter: blur(150px);
    opacity: 0.15; z-index: -1;
}

.hero-content { max-width: 800px; }
.animate-block { opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s ease forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

.hero-title {
    font-size: 4rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, var(--accent-primary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.25rem; color: var(--text-muted); margin-bottom: 3rem;
    max-width: 600px; margin-left: auto; margin-right: auto;
}

.btn-primary {
    display: inline-block; padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-dark); font-weight: 700; text-decoration: none; border-radius: 50px;
    box-shadow: var(--glow-shadow); transition: all 0.3s ease;
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 0 50px rgba(56, 189, 248, 0.6); }

/* FEATURES */
#features { padding: var(--section-spacing) 0; background-color: var(--bg-secondary); position: relative; }
#features::before {
    content: ''; position: absolute; top: -50px; left: 0; width: 100%; height: 50px;
    background: var(--bg-secondary); clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.03); padding: 2.5rem; border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.3s ease;
    position: relative; overflow: hidden;
}
.feature-card:hover { transform: translateY(-10px); border-color: var(--accent-primary); background: rgba(255, 255, 255, 0.05); }
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, transparent, rgba(56, 189, 248, 0.1));
    opacity: 0; transition: opacity 0.3s ease;
}
.feature-card:hover::before { opacity: 1; }
.feature-icon { font-size: 2rem; margin-bottom: 1.5rem; color: var(--accent-primary); }
.feature-card h3 { margin-bottom: 1rem; font-size: 1.3rem; }
.feature-card p { color: var(--text-muted); }

/* FOOTER */
footer { background: var(--bg-dark); padding: 5rem 0 2rem; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; list-style: none; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--accent-primary); }
.copyright { color: var(--text-muted); font-size: 0.9rem; }

/* MOBILE RESPONSIVE */
.mobile-nav-overlay {
    position: fixed; top: 0; right: -100%; width: 70%; height: 100vh;
    background: var(--bg-secondary); z-index: 999; padding: 5rem 2rem;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1); box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.mobile-nav-overlay.active { right: 0; }
.mobile-nav-overlay ul { list-style: none; display: flex; flex-direction: column; gap: 1.5rem; }
.mobile-nav-overlay a { text-decoration: none; color: var(--text-light); font-size: 1.2rem; font-weight: 600; }

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-toggle { display: block; }
    .hero-title { font-size: 2.8rem; }
    .section-title { font-size: 2rem; }
}