/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Olive Green Color Palette */
    --primary-olive: #6B7A4F;
    --muted-olive: #8B9467;
    --sage-green: #A8B88A;
    --light-bg: #F9F8F2;
    --dark-bg: #1E1E1E;
    --white: #FFFFFF;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    
    /* Dark mode colors */
    --dark-bg-primary: #1E1E1E;
    --dark-bg-secondary: #2C2C2C;
    --dark-text-primary: #FFFFFF;
    --dark-text-secondary: #E0E0E0;
    --dark-card-bg: #2C2C2C;
    --dark-border: #3E3E3E;
}

[data-theme="dark"] {
    --light-bg: var(--dark-bg-primary);
    --white: var(--dark-bg-secondary);
    --text-dark: var(--dark-text-primary);
    --text-light: var(--dark-text-secondary);
    /* Keep original olive green colors */
    /* --primary-olive, --muted-olive, --sage-green remain unchanged */
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    padding-top: 0; /* No padding needed since header is fixed and hidden initially */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transform: translateY(-100%);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

[data-theme="dark"] header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header.visible {
    transform: translateY(0);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--primary-olive);
    color: var(--primary-olive);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
    width: 40px;
    height: 40px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .theme-toggle {
    background-color: var(--dark-bg-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-toggle:hover {
    background-color: var(--primary-olive);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(107, 122, 79, 0.2);
}

.theme-toggle:focus {
    outline: 2px solid var(--primary-olive);
    outline-offset: 2px;
}

[data-theme="dark"] .theme-toggle {
    border-color: var(--primary-olive);
    color: var(--primary-olive);
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: var(--primary-olive);
    color: var(--white);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-olive);
}

[data-theme="dark"] .logo {
    color: var(--sage-green);
}

.logo img {
    width: 40px;
    height: 40px;
}

/* Hero Section */
.hero {
    padding: 4rem 0 6rem;
    text-align: center;
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--sage-green) 50%, var(--white) 100%);
    position: relative;
    transition: background 0.3s ease;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, var(--dark-bg-primary) 0%, rgba(107, 122, 79, 0.2) 50%, var(--dark-bg-primary) 100%);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--white));
    pointer-events: none;
    transition: background 0.3s ease;
}

[data-theme="dark"] .hero::after {
    background: linear-gradient(to bottom, transparent, var(--dark-bg-secondary));
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-logo {
    margin-bottom: 2rem;
}

.hero-logo img {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(107, 122, 79, 0.2);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-olive);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

[data-theme="dark"] .hero h1 {
    color: var(--sage-green);
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    line-height: 1.8;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    align-items: center;
}

.download-badge {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    width: 200px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-badge:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.download-badge img {
    height: 60px;
    width: 200px;
    display: block;
    object-fit: contain;
    object-position: center;
}

.play-store {
    background-color: #000000;
}

.play-store:hover {
    background-color: #333333;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background-color: var(--white);
    position: relative;
}

.features.contact-section {
    padding-top: 2rem;
    background: linear-gradient(to bottom, var(--white) 0%, var(--white) 70%, var(--primary-olive) 100%);
    position: relative;
    transition: background 0.3s ease;
}

[data-theme="dark"] .features.contact-section {
    background: linear-gradient(to bottom, var(--dark-bg-secondary) 0%, var(--dark-bg-secondary) 70%, var(--primary-olive) 100%);
}

.features.contact-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--primary-olive));
    pointer-events: none;
    transition: background 0.3s ease;
}

[data-theme="dark"] .features.contact-section::after {
    background: linear-gradient(to bottom, transparent, var(--primary-olive));
}

.features.contact-section h2 {
    color: var(--primary-olive);
}

[data-theme="dark"] .features.contact-section h2 {
    color: var(--sage-green);
}

.features.contact-section .features-grid {
    padding-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-olive);
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .features h2 {
    color: var(--sage-green);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.feature-card {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    display: block;
    color: inherit;
}

[data-theme="dark"] .feature-card {
    background-color: var(--dark-card-bg);
    border-color: var(--dark-border);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(107, 122, 79, 0.15);
    border-color: var(--sage-green);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-olive);
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--primary-olive);
    margin-bottom: 1rem;
}

[data-theme="dark"] .feature-card h3 {
    color: var(--sage-green);
}

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

/* Social & Contact Section */
.social-contact {
    padding: 6rem 0;
    background-color: var(--white);
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 1.5rem 2.5rem;
    background-color: var(--light-bg);
    color: var(--primary-olive);
    text-decoration: none;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(107, 122, 79, 0.1);
    min-width: 200px;
    justify-content: center;
}

.contact-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(107, 122, 79, 0.2);
    border-color: var(--sage-green);
    background-color: var(--white);
}

.contact-link svg {
    width: 24px;
    height: 24px;
}

.contact-link span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--primary-olive);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] footer {
    color: #FFFFFF;
}

footer p {
    opacity: 0.9;
}

footer a {
    color: var(--white);
    opacity: 0.9;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] footer a {
    color: #FFFFFF;
}

footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .description {
        font-size: 1rem;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .download-badge {
        width: 180px;
        height: 54px;
    }

    .download-badge img {
        height: 54px;
        width: 180px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .features h2 {
        font-size: 2rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-link {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        padding: 0.4rem;
        top: 16px;
        right: 16px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0 4rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-logo img {
        width: 100px;
        height: 100px;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .features,
    .social-contact {
        padding: 4rem 0;
    }

    .container {
        padding: 0 16px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--primary-olive);
    outline-offset: 2px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 2001;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

[data-theme="dark"] .modal-content {
    background-color: var(--dark-card-bg);
    border: 2px solid var(--dark-border);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    background-color: var(--light-bg);
    color: var(--primary-olive);
    transform: rotate(90deg);
}

[data-theme="dark"] .modal-close {
    color: var(--dark-text-secondary);
}

[data-theme="dark"] .modal-close:hover {
    background-color: var(--dark-bg-primary);
    color: var(--sage-green);
}

.modal-content h2 {
    font-size: 2rem;
    color: var(--primary-olive);
    margin-bottom: 1rem;
    font-weight: 600;
}

[data-theme="dark"] .modal-content h2 {
    color: var(--sage-green);
}

.modal-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.6;
}

[data-theme="dark"] .modal-content p {
    color: var(--dark-text-secondary);
}

@media (max-width: 480px) {
    .modal-content {
        padding: 2rem 1.5rem;
        max-width: 90%;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }

    .modal-content p {
        font-size: 1rem;
    }
}

