/* --- Global Styles & Variables --- */
:root {
    --primary-blue: #00BFFF;   /* Deep Sky Blue */
    --primary-glow: #8A2BE2;   /* Blue Violet for glows */
    --dark-bg: #121212;        /* Even darker, more modern background */
    --light-bg: #1e1e1e;       /* Lighter dark for cards/forms */
    --text-light: #e0e0e0;     /* Slightly off-white text */
    --text-heading: #ffffff;
    --card-bg: #2a2a2a;
}

/* Base body and scroll behavior */
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    text-align: center;
    overflow-x: hidden; /* Prevents horizontal scrollbars */
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { background: var(--primary-blue); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-glow); }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Advanced Animations --- */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-content h1, .hero-content p, .contact h2, .contact h3 { overflow: hidden; }
h1 span, h2 span, h3 span, p span {
    display: inline-block;
    transform: translateY(100%);
    animation: revealText 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes revealText { to { transform: translateY(0); } }

/* --- Header & Navigation (Optimized for Performance) --- */
.navbar {
    /* Apply the graphically intensive properties from the start, but make them invisible */
    background-color: rgba(18, 18, 18, 0); /* Start with 0 opacity */
    backdrop-filter: blur(10px);

    /* Set initial state */
    padding: 25px 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0); /* Start with transparent border */
    
    /* Only transition the properties that change */
    transition: padding 0.3s ease, background-color 0.3s ease, border-bottom-color 0.3s ease;
}

.navbar.scrolled {
    padding: 15px 0;
    background-color: rgba(18, 18, 18, 0.7); /* Transition to 0.7 opacity */
    border-bottom-color: rgba(255, 255, 255, 0.1); /* Fade in the border */
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; text-decoration: none; color: var(--text-heading); font-weight: 700; font-size: 1.2rem; }
.logo img { height: 40px; margin-right: 10px; transition: transform 0.3s ease; }
.logo:hover img { transform: rotate(-10deg) scale(1.1); }
.desktop-nav { display: flex; align-items: center; }
.nav-link { color: var(--text-light); text-decoration: none; font-weight: 400; position: relative; padding: 5px 0; margin-left: 25px; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 2px; background-color: var(--primary-blue); transition: width 0.3s ease-out; }
.nav-link:hover::after { width: 100%; }

/* --- Hero Section --- */
.hero {
    background-image: linear-gradient(rgba(18,18,18,0.7), var(--dark-bg) 90%), url('images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* THIS CREATES THE PARALLAX EFFECT */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0 20px;
}
.hero-content {}
.hero-title span { animation-delay: 0.2s; }
.hero-subtitle span { animation-delay: 0.4s; }
.hero .btn { animation: slideInUp 0.8s ease-out 0.6s backwards; }
.hero-title { font-size: clamp(3rem, 10vw, 6.5rem); font-weight: 900; margin: 0; color: white; text-shadow: 0 0 15px rgba(0, 191, 255, 0.5); }
.hero-subtitle { font-size: clamp(1rem, 4vw, 1.5rem); color: var(--primary-blue); font-weight: 400; margin-top: 10px; margin-bottom: 40px; }

/* --- Buttons --- */
.btn { display: inline-block; background-color: var(--primary-blue); color: #000; padding: 15px 40px; text-decoration: none; font-weight: 700; border-radius: 8px; border: none; transition: all 0.3s ease; box-shadow: 0 0 15px rgba(0, 191, 255, 0.4); cursor: pointer; }
.btn:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 0 30px rgba(138, 43, 226, 0.6); background-color: var(--primary-glow); color: white; }

/* --- Section Base Styles --- */
.section-title { font-size: 2.5rem; font-weight: 900; margin-bottom: 50px; color: var(--text-heading); }

/* --- Features Section --- */
.features { padding: 100px 0; background-color: var(--dark-bg); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.feature-card {
    background-color: var(--card-bg);
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Needed for the spotlight pseudo-element */
    overflow: hidden;   /* Keeps the spotlight inside the card */
}
.feature-card::before { /* THE SPOTLIGHT ELEMENT */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x) var(--y), rgba(255, 255, 255, 0.1), transparent 20%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.feature-card:hover::before {
    opacity: 1; /* Show spotlight on hover */
}
.feature-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.feature-icon { color: var(--primary-blue); width: 60px; height: 60px; margin: 0 auto 20px auto; }
.feature-card h3 { margin-top: 0; font-size: 1.5rem; color: var(--text-heading); }
.feature-card p { line-height: 1.7; color: var(--text-light); }

/* --- Contact Section & Form --- (Same as before) */
.contact { padding: 100px 0; background-color: var(--light-bg); }
.contact h2 { font-size: 1.5rem; font-weight: 400; color: var(--text-light); margin: 0; }
.contact h3 { font-size: 3rem; font-weight: 900; color: var(--text-heading); margin: 0 0 20px 0; }
.contact p { max-width: 600px; margin: 0 auto 40px auto; line-height: 1.7; }
.contact-form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.form-group input, .form-group textarea { width: 100%; padding: 15px; border: 1px solid #444; border-radius: 8px; background-color: var(--dark-bg); color: var(--text-light); font-family: 'Poppins', sans-serif; font-size: 1rem; box-sizing: border-box; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 10px rgba(0, 191, 255, 0.5); }
.form-group textarea { min-height: 150px; resize: vertical; }

/* --- FAQ Section --- (Same as before) */
.faq { padding: 100px 0; background-color: var(--dark-bg); }
.faq-accordion { max-width: 800px; margin: 0 auto; text-align: left; }
.faq-item { background-color: var(--card-bg); border-radius: 8px; margin-bottom: 10px; border: 1px solid #333; overflow: hidden; }
.faq-question { width: 100%; background: none; border: none; padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-family: 'Poppins', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--text-heading); }
.faq-icon { width: 24px; height: 24px; transition: transform 0.3s ease; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out, padding 0.4s ease-out; }
.faq-answer p { padding: 0 25px 0 25px; margin: 0; line-height: 1.7; color: var(--text-light); }
.faq-item.active .faq-answer { max-height: 200px; padding-bottom: 20px; }
.faq-item.active .faq-icon { transform: rotate(180deg); }

/* --- Footer --- (Same as before) */
footer { background: linear-gradient(to right, var(--primary-blue), var(--primary-glow)); color: #fff; padding: 20px 0; font-size: 0.9rem; font-weight: 700; }

/* --- Scroll Animation Classes --- (Same as before) */
.hidden { opacity: 0; transform: translateY(50px); transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1); }
.show { opacity: 1; transform: translateY(0); }
.feature-card.hidden:nth-child(1) { transition-delay: 100ms; }
.feature-card.hidden:nth-child(2) { transition-delay: 200ms; }
.feature-card.hidden:nth-child(3) { transition-delay: 300ms; }
.feature-card.hidden:nth-child(4) { transition-delay: 400ms; }

/* --- Mobile Navigation --- (Same as before) */
.hamburger-menu { display: none; background: none; border: none; cursor: pointer; padding: 0; z-index: 1001; }
.hamburger-menu .bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: white; transition: all 0.3s ease-in-out; }
.hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
.hamburger-menu.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger-menu.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.mobile-nav { position: fixed; top: 0; left: 100%; width: 100%; height: 100vh; background-color: rgba(18, 18, 18, 0.95); backdrop-filter: blur(10px); display: flex; flex-direction: column; justify-content: center; align-items: center; transition: left 0.4s cubic-bezier(0.86, 0, 0.07, 1); z-index: 999; }
.mobile-nav.active { left: 0; }
.mobile-nav .nav-link { font-size: 2rem; margin: 20px 0; }

/* --- Media Query for Responsiveness --- (Same as before) */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .hamburger-menu { display: block; }
}

/* --- Back to Top Button --- (Same as before) */
.back-to-top { position: fixed; bottom: 25px; right: 25px; background-color: var(--primary-blue); color: #000; width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; text-decoration: none; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); opacity: 0; pointer-events: none; transform: translateY(20px); transition: opacity 0.3s ease, transform 0.3s ease; z-index: 998; }
.back-to-top.active { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg { width: 24px; height: 24px; }
.back-to-top:hover { background-color: var(--primary-glow); color: white; transform: scale(1.1); }