/* Global Variables & Theme Config */
:root {
    /* Dark Theme (Default) */
    --bg-main: #030712;
    --nav-bg: rgba(3, 7, 18, 0.6);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    
    /* Neon Accents */
    --accent-1: #10b981; /* Emerald */
    --accent-2: #3b82f6; /* Blue */
    --danger: #ef4444;   /* Red */
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
    /* Light Theme */
    --bg-main: #f3f4f6;
    --nav-bg: rgba(243, 244, 246, 0.7);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    
    --accent-1: #059669;
    --accent-2: #2563eb;
    --danger: #dc2626;
    
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* =========================================
   Animated Fluorescent Smoke Background 
   ========================================= */
.smoke-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.smoke {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: drift 20s infinite alternate ease-in-out;
}

.smoke-1 {
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
    top: -20%; left: -10%;
}

.smoke-2 {
    width: 40vw; height: 40vw;
    background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
    bottom: -10%; right: -10%;
    animation-delay: -5s;
    animation-duration: 25s;
}

.smoke-3 {
    width: 30vw; height: 30vw;
    background: radial-gradient(circle, var(--danger) 0%, transparent 70%);
    top: 40%; left: 40%;
    opacity: 0.2;
    animation-delay: -10s;
    animation-duration: 30s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5vw, 10vh) scale(1.2); }
}

/* =========================================
   Navigation & Blinking Logo Mask 
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--nav-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo-wrapper { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
}

/* Improved CSS Mask Blinking:
   Instead of a black box overlay, we animate the clip-path of the logo
   to make it close like an eyelid.
*/
.logo-container {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    animation: blink 5s infinite;
}

.logo { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

@keyframes blink {
    0%, 92%, 100% { clip-path: ellipse(100% 100% at 50% 50%); }
    96% { clip-path: ellipse(100% 2% at 50% 50%); } /* Eye closes tightly */
}

.brand-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.nav-links { 
    display: flex; 
    align-items: center; 
    gap: 2rem; 
}

.nav-links a { 
    color: var(--text-primary); 
    text-decoration: none; 
    font-weight: 500; 
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent-1); }

/* Theme Toggle SVG Icon Logic */
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
}
.theme-btn:hover { background-color: var(--glass-bg); }

.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }


/* =========================================
   Hero Section 
   ========================================= */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10rem 5% 5rem;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content { flex: 1.2; }

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--accent-1);
    color: var(--accent-1);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.glow-pulse {
    animation: pulse-border 2s infinite alternate;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.2); }
    100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
}

.main-title { 
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5.5rem; 
    line-height: 0.9; 
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle { 
    color: var(--text-secondary); 
    font-size: 1.15rem; 
    line-height: 1.7;
    max-width: 550px;
}

/* =========================================
   Glassmorphism UI Cards 
   ========================================= */
.hero-visual { 
    flex: 0.8; 
    display: flex; 
    justify-content: center; 
    perspective: 1200px; 
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    box-shadow: 0 30px 60px var(--glass-shadow);
}

.phone-card {
    padding: 3rem 2rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
    transform: rotateY(-15deg) rotateX(10deg);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.phone-card:hover { 
    transform: rotateY(0deg) rotateX(0deg) translateY(-10px); 
}

.floating {
    animation: float-card 6s ease-in-out infinite;
}

@keyframes float-card {
    0%, 100% { transform: rotateY(-15deg) rotateX(10deg) translateY(0); }
    50% { transform: rotateY(-15deg) rotateX(10deg) translateY(-20px); }
}

.phone-card:hover.floating {
    animation: none; /* Stop float on hover */
}

.avatar-glow { 
    font-size: 3.5rem; 
    margin-bottom: 1.5rem; 
    filter: drop-shadow(0 0 15px var(--danger));
}

.alert-text { 
    color: var(--danger); 
    font-size: 1.4rem;
    font-weight: 700;
}

.number { 
    font-size: 1.8rem; 
    font-weight: 300; 
    margin: 10px 0; 
    letter-spacing: 1px;
}

.danger-bar { 
    width: 100%; 
    height: 6px; 
    background: rgba(255,255,255,0.1); 
    border-radius: 3px; 
    overflow: hidden; 
    margin: 20px 0; 
}

.danger-fill { 
    width: 90%; 
    height: 100%; 
    background: var(--danger); 
    box-shadow: 0 0 10px var(--danger);
}

.community-score {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* =========================================
   Features Grid (Scroll Animations)
   ========================================= */
.features { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 2.5rem; 
    padding: 5rem 5%; 
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card { 
    padding: 3rem 2rem; 
    transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s; 
}

.feature-card:hover { 
    transform: translateY(-10px); 
    border-color: var(--accent-1);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.1);
}

.feature-icon { 
    font-size: 2.5rem; 
    margin-bottom: 1.5rem; 
    background: var(--glass-bg);
    display: inline-block;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =========================================
   Scroll Animation Classes
   ========================================= */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* =========================================
   Footer
   ========================================= */
footer { 
    text-align: center; 
    padding: 4rem 5%; 
    color: var(--text-secondary); 
    border-top: 1px solid var(--glass-border); 
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    opacity: 0.5;
    filter: grayscale(100%);
    transition: opacity 0.3s, filter 0.3s;
}

.footer-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .hero { flex-direction: column; text-align: center; padding-top: 8rem; }
    .hero-content { margin-bottom: 4rem; display: flex; flex-direction: column; align-items: center; }
    .main-title { font-size: 4rem; }
    .phone-card { transform: none; }
    .floating { animation: none; }
    .nav-links a { display: none; } /* Simplified mobile nav */
}
