/* --- CSS Variables for Theming --- */
:root {
    /* Light Mode (Soft, warm pastels) */
    --bg-color: #fcf9fc;
    --text-color: #4a4a4a;
    --nav-bg: rgba(252, 249, 252, 0.85);
    --card-bg: #ffffff;
    --accent-color: #bfa2db; /* Soft purple */
    --accent-hover: #a078c4;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Dark Mode (Midnight blues and soft lavenders) */
body.dark-mode {
    --bg-color: #0f172a; /* Deep midnight blue */
    --text-color: #e2e8f0; /* Soft off-white/gray */
    --nav-bg: rgba(15, 23, 42, 0.85);
    --card-bg: #1e293b;
    --accent-color: #818cf8; /* Soft glowing indigo */
    --accent-hover: #6366f1;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* --- Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px); /* Frosted glass effect */
    z-index: 1000;
    transition: background-color 0.5s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.theme-btn {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: var(--accent-color);
    color: #fff;
}

/* --- Sections Setup --- */
section {
    padding: 6rem 5%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--accent-color);
}

/* --- Hero Section --- */
.hero-section {
    align-items: center;
    text-align: center;
    margin-top: 60px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* --- Features Grid Section --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.5s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

body.dark-mode .card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--accent-color);
}

.card p {
    font-size: 1rem;
    opacity: 0.85;
}

/* --- Safe Haven Section --- */
.safe-haven-section {
    align-items: center;
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(191, 162, 219, 0.1));
}

body.dark-mode .safe-haven-section {
    background: linear-gradient(to bottom, transparent, rgba(129, 140, 248, 0.05));
}

.haven-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.haven-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    opacity: 0.9;
}

/* --- Call to Action Button --- */
.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(191, 162, 219, 0.4);
}

.cta-button:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}