/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* --- NEW Color Palette --- */
:root {
    --bg-color: #0D0C22;
    /* Dark Navy/Purple Background */
    --text-color: #F8F9FA;
    /* Off-White Text */
    --text-color-light: #A0AEC0;
    /* Muted Gray Text */
    --accent-color: #8A42DB;
    /* Vibrant Purple */
    --accent-color-dark: #6B2CB3;
    /* Darker Purple for Hover */
    --card-bg-color: rgba(23, 22, 49, 0.6);
    /* Semi-transparent card color */
    --border-color: rgba(138, 66, 219, 0.3);
    /* Faint purple border */

    /* Gradient Blob Colors */
    --g1-color: rgb(138, 66, 219);
    --g2-color: rgb(22, 11, 85);
    --g3-color: rgb(215, 66, 133);
    --g4-color: rgb(75, 12, 131);
    --g5-color: rgb(66, 153, 225);

    --section-padding: 4rem 0;
    --font-family: 'Inter', sans-serif;
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --header-height: 4.5rem;
}

/* --- BASE STYLES & RESET --- */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--normal-font-size);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

body.loaded {
    opacity: 1;
}

h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- PRELOADER (Updated Colors) --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.preloader-panel {
    position: fixed;
    width: 100%;
    height: 50vh;
    background-color: var(--accent-color-dark);
    /* Changed to new background color */
    z-index: 1001;
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.preloader-panel-top { top: 0; }
.preloader-panel-bottom { bottom: 0; }

.preloader-logo {
    display: none;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    z-index: 1002;
    opacity: 0;
    animation: fadeInOut 1.5s ease-in-out 0.2s forwards;
    transition: opacity 0.4s ease-out;
}

@keyframes fadeInOut { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

.preloader.hidden {
    visibility: hidden;
    transition: visibility 0s 1s;
}

.preloader.hidden .preloader-logo { opacity: 0; }
.preloader.hidden .preloader-panel-top { transform: translateY(-100%); }
.preloader.hidden .preloader-panel-bottom { transform: translateY(100%); }

/* --- NEW: ANIMATED GRADIENT BACKGROUND --- */
.gradient-bg {
    width: 100vw;
    height: 100vh;
    position: fixed;
    overflow: hidden;
    z-index: -1;
    top: 0;
    left: 0;
}

.gradients-container {
    filter: blur(40px);
    width: 100%;
    height: 100%;
}

.g1, .g2, .g3, .g4, .g5 {
    position: absolute;
    border-radius: 100%;
    mix-blend-mode: screen;
}

/* Updated Blob Styles */
.g1 { background: var(--g1-color); width: 600px; height: 600px; top: -40%; left: 60%; opacity: 0.5; animation: move 22s ease-in-out -2s infinite alternate; }
.g2 { background: var(--g2-color); width: 500px; height: 500px; top: 10%; left: 80%; opacity: 0.6; animation: move 20s ease-in-out -4s infinite alternate; }
.g3 { background: var(--g3-color); width: 450px; height: 450px; top: 70%; left: 70%; opacity: 0.4; animation: move 25s ease-in-out -6s infinite alternate; }
.g4 { background: var(--g4-color); width: 550px; height: 550px; top: -30%; left: -50%;   opacity: 0.5; animation: move 18s ease-in-out -8s infinite alternate; } /* Moved to top-left */
.g5 { background: var(--g5-color); width: 300px; height: 300px; top: 60%; left: 10%; opacity: 0.7; animation: move 15s ease-in-out -10s infinite alternate; }
@keyframes move {
    0% { transform: translate(0%, 0%); }
    100% { transform: translate(100%, 100%); }
}

/* --- REUSABLE CSS CLASSES --- */
.container { max-width: 1024px; margin-left: 1.5rem; margin-right: 1.5rem; }
.section { padding: var(--section-padding); }
.section-title { font-size: var(--h2-font-size); text-align: center; margin-bottom: 2rem; }
.section-subtitle { text-align: center; max-width: 600px; margin: 0 auto 4rem auto; color: var(--text-color-light); }

/* --- NEW: BUTTON STYLING --- */
/* --- NEW: BUTTON STYLING (with animated mesh) --- */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    padding: 0.9rem 1.75rem;
    border-radius: 50px; /* Pill shape */
    font-weight: 500;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;

    /* Animated Mesh Background */
    background: linear-gradient(90deg, var(--accent-color), var(--g3-color), var(--accent-color));
    background-size: 500% 500%;
    animation: animatedButtonBg 30s ease infinite;
}

@keyframes animatedButtonBg {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
}

.button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.button::after {
    content: '→';
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.3s ease;
    display: inline-block;
}

.button:hover::after {
    transform: translateX(5px);
}

/* --- ANIMATIONS --- */
.animate-text { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animate-text.visible { opacity: 1; transform: translateY(0); }
.hero .animate-text:nth-child(2) { transition-delay: 0.2s; }
.hero .animate-text:nth-child(3) { transition-delay: 0.4s; }
.hero .animate-text:nth-child(4) { transition-delay: 0.6s; }
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* --- HEADER & NAV (Updated for new theme) --- */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(13, 12, 34, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow 0.4s;
}

.header.scrolled { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.nav { height: var(--header-height); display: flex; justify-content: center; align-items: center; }
.nav-logo { font-weight: 700; color: var(--text-color); }
.nav-menu, .nav-button { display: none; }

/* --- HERO (No background, it's global now) --- */
.hero-background-wrapper { /* This wrapper is no longer needed for background but we keep it for structure */ position: relative; }
.hero { padding: 0; padding-top: calc(var(--header-height) + 3rem); min-height: 70vh; display: flex; align-items: center; text-align: center; position: relative; }
.hero-container { width: 100%; }
.hero-title { font-size: var(--h1-font-size); margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-color-light); max-width: 600px; margin: 0 auto 2rem auto; }
.button-hero { padding: 1.1rem 2.25rem; font-size: 1.1rem; }
.hero-credibility { margin-top: 2rem; color: var(--text-color-light); font-size: 0.9rem; }
.scroll-down { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); animation: bounce 2s infinite; }
.scroll-down i { width: 24px; height: 24px; color: var(--text-color-light); }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -10px); } 60% { transform: translate(-50%, -5px); } }

/* --- PROBLEM CARDS (Updated for glassmorphism) --- */
.problem { background: transparent; }
.problem-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.problem-card {
    background-color: var(--card-bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease-out, border-color 0.3s ease-out;
}
.problem-card:hover { transform: translateY(-5px); border-color: var(--accent-color); }
.problem-card svg { color: var(--accent-color); margin-bottom: 1.5rem; width: 48px; height: 48px; stroke-width: 1.5 }
.problem-card h3 { min-height: 3.8em; }

/* --- SOLUTION (Vertical Timeline with Spotlight Effect) --- */
.solution {
    background-color: transparent;
    position: relative;
    isolation: isolate; /* This contains the z-index of the spotlight */
    overflow: hidden; /* Ensures the glow doesn't spill out */
}

/* This is the new spotlight */
.solution::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px; /* Large size for a soft effect */
    height: 800px;
    background: radial-gradient(circle, rgba(138, 66, 219, 0.1) 0%, rgba(13, 12, 34, 0) 65%);
    z-index: -1; /* Places the spotlight behind the timeline */
}

.timeline {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    z-index: 2; /* Ensures timeline is on top of the spotlight */
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    padding: 2rem 0;
    position: relative;
    z-index: 2;
}

.timeline-content {
    padding: 1.5rem 2rem;
    background-color: var(--card-bg-color); /* The glass card remains */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    position: relative;
}

.timeline-step {
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--accent-color);
    border: 2px solid var(--bg-color);
    border-radius: 50%;
    top: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

/* --- TESTIMONIALS --- */
#testimonials { display: none; }

/* --- ABOUT --- */
.about-container { display: grid; gap: 3rem; align-items: center; }
.about-image img { border-radius: 0.75rem; }
.about-content p { text-align: justify; margin-bottom: 1.5rem; }

/* --- FAQ (Updated for glassmorphism) --- */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item {
    background-color: var(--card-bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}
.faq-question { padding: 1.5rem; font-weight: 500; cursor: pointer; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.faq-question i { transition: transform 0.3s; color: var(--text-color-light); }
.faq-answer { padding: 0 1.5rem 1.5rem; color: var(--text-color-light); }
.faq-item[open] summary { font-weight: 700; color: var(--accent-color); }
.faq-item[open] .faq-question i { transform: rotate(180deg); color: var(--accent-color); }

/* --- CTA (Updated for new theme) --- */
.cta { background-color: transparent; text-align: center; }
.cta .section-title, .cta .section-subtitle { color: var(--text-color); }

/* --- Differentiated CTA Section --- */
.cta .container {
    background-color: var(--card-bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1rem; /* A slightly larger radius for a bolder look */
    padding: 4rem 2rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

/* Optional: Add a subtle hover effect like the other cards */
.cta .container:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

/* --- FOOTER --- */
.footer { padding: 3rem 0; text-align: center; color: var(--text-color-light); }
.footer svg { width: 24px; height: 24px; margin-top: 0.5rem; color: var(--text-color-light); transition: color 0.3s; }
.footer a:hover svg { color: var(--accent-color); }

/* --- MEDIA QUERIES --- */
@media screen and (min-width: 768px) {
    :root { --h1-font-size: 3.5rem; --h2-font-size: 2.5rem; }
    .hero { min-height: 80vh; }
    .about-container { grid-template-columns: 0.7fr 1fr; }
    .timeline::after { left: 20px; margin-left: 0; }
    .timeline-item { padding: 2rem 0 2rem 60px; }
    .timeline-item::after { left: 20px; }
    /* Desktop Nav */
    .nav { justify-content: space-between; }
    .nav-menu { display: flex; align-items: center; }
    .nav-list { display: flex; flex-direction: row; column-gap: 2.5rem; }
    .nav-button { display: inline-flex; margin-left: 2.5rem; }
    .nav-link { color: var(--text-color); font-weight: 500; transition: color 0.3s; }
    .nav-link:hover { color: var(--accent-color); }
}

@media screen and (min-width: 1024px) {
    .container { margin-left: auto; margin-right: auto; }
    .problem-grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- Infrequent Shine Effect for Hero Button --- */
.button-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.7) 50%, transparent 80%);
    
    /* Animation settings */
    animation: shine 8s infinite;
    transform: translateX(-101%); /* Start off-screen */
}

@keyframes shine {
    0% { transform: translateX(-101%); }
    15% { transform: translateX(101%); }
    100% { transform: translateX(101%); }
}

/* --- Cursor Highlight Effect --- */
.cursor-highlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    z-index: 9999;

    /* Center the gradient on the cursor's actual point */
    margin-left: -250px;
    margin-top: -250px;
    
    /* The Glow Effect */
    background: radial-gradient(circle, rgba(151, 16, 230, 0.08) 0%, transparent 50%);
    
    /* This is CRITICAL: makes the div un-clickable */
    pointer-events: none;

    /* Smoothness and initial state */
    transition: opacity 0.3s ease-in-out;
    opacity: 0.3;
}

/* --- Content Link Styles --- */
.about-content a {
    color: #c6b3ff; /* A brighter, more vibrant purple */
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

/* This is the key: It ensures visited links have the same bright color */
.about-content a:visited {
    color: #c6b3ff;
}

/* Optional: Makes the link even brighter on hover for clear feedback */
.about-content a:hover {
    color: #FFFFFF; /* Pure white on hover */
}

/* --- Smooth FAQ Accordion Animation --- */
.faq-item {
    transition: all 0.2s ease;
}

.faq-content {
    display: grid;
    grid-template-rows: 0fr;
    /* Slower duration and a smoother easing curve */
    transition: grid-template-rows 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-question svg {
    /* Make the icon sync perfectly with the panel animation */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item[open] .faq-content {
    grid-template-rows: 1fr; /* Expand to full height when open */
}

.faq-answer {
    overflow: hidden; /* Prevents content spill during animation */
    padding-bottom: 1.5rem; /* Add padding here instead of the parent */
}

/* Original rule adjustment: remove padding from the parent */
.faq-item[open] .faq-answer {
    padding: 0 1.5rem 1.5rem; /* This rule is no longer needed */
}
.faq-item .faq-answer {
    padding: 0 1.5rem; /* Adjust padding for the new structure */
}



.faq-item[open] summary svg {
    transform: rotate(180deg);
}