/* 1. GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700;800&display=swap');

/* 2. VARIABLES & RESET */
:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --white: #ffffff;
    --bg-light: #f8fafc;
    --radius: 16px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Enables smooth scrolling when clicking links */
}

body {
    background: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden; /* Prevents horizontal scroll from animations */
}

/* 3. KEYFRAME ANIMATIONS */

/* Fade Up: Elements slide up and fade in */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Moving Gradient: Background colors shift slowly */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Float: Subtle hovering for cards */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

/* 4. HEADER (Glassmorphism) */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px); /* Stronger blur for frosted glass look */
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

nav a {
    margin-left: 30px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 15px;
    position: relative;
    transition: color 0.3s;
}

/* Nav Link Underline Animation */
nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--primary);
}

/* 5. HERO SECTION (Animated Background) */
.hero {
    /* 3-Color Gradient */
    background: linear-gradient(-45deg, #4f46e5, #3b82f6, #06b6d4, #4f46e5);
    background-size: 400% 400%; /* Make background larger for movement */
    animation: gradientMove 12s ease infinite; /* Activate animation */
    color: var(--white);
    padding: 140px 0 160px;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%); /* Modern angled bottom */
}

/* Staggered Entrance Animations */
.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 48px; /* Larger */
    font-weight: 800;
    margin-bottom: 20px;
    opacity: 0; /* Hidden initially */
    animation: fadeUp 0.8s ease-out forwards; /* Run animation */
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 20px;
    opacity: 0;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeUp 0.8s ease-out 0.2s forwards; /* 0.2s delay */
}

.hero-buttons {
    margin-top: 35px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.4s forwards; /* 0.4s delay */
}

/* 6. BUTTONS */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn.primary {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.btn.secondary {
    border: 2px solid rgba(255,255,255,0.4);
    color: var(--white);
    margin-left: 15px;
    background: transparent;
}

.btn.secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

/* 7. TOOLS SECTION */
.tools {
    padding: 60px 0 100px;
    margin-top: -50px; /* Overlap hero */
}

.tools h2, .why h2, .faq h2 {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    margin-bottom: 50px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tool-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

/* Card Hover Effect */
.tool-card:hover {
    transform: translateY(-10px); /* Lifts higher */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-light);
}

.tool-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

/* 8. WHY & FAQ SECTIONS */
.why, .faq {
    background: var(--white);
    padding: 100px 0;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.faq {
    background: var(--bg-light);
}

.faq p {
    max-width: 750px;
    margin: 0 auto 20px;
    color: var(--text-light);
}

/* 9. FOOTER */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer a {
    color: #cbd5e1;
    margin-left: 20px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--primary-light);
}

/* 10. RESPONSIVE */
@media (max-width: 768px) {
    .hero h1 { font-size: 34px; }
    
    .header-flex {
        flex-direction: column;
        gap: 15px;
    }

    nav {
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a { margin: 0; }

    .btn {
        width: 100%;
        margin: 10px 0 0 0;
        text-align: center;
    }
}