:root {
    /* Dark mode - dark blue (not pure black) */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo img {
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.lang-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-switcher a {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.lang-switcher a:hover {
    color: var(--primary);
}

.lang-switcher a.active {
    background: #2563eb;
    /* Darker Blue (Tailwind blue-600) for better contrast with white text */
    color: white;
}

/* Hero */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-cta img {
    height: 60px;
    transition: transform 0.2s;
}

.hero-cta img:hover {
    transform: scale(1.05);
}

/* App Preview / Screenshots - Contained Carousel with Fade */
.app-preview {
    padding: 4rem 0;
    background: var(--bg);
}

.app-preview h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

/* Fade edges */
.carousel-container::before,
.carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 10;
    pointer-events: none;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg), transparent);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg), transparent);
}

.screenshot-carousel {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scroll 40s linear infinite;
    padding: 1rem 0;
}

.screenshot-carousel:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.screenshot-item {
    flex: 0 0 auto;
}

.screenshot-item img {
    height: 450px;
    width: auto;
    aspect-ratio: 280 / 600;
    /* Fixes CLS by reserving width before load */
    max-width: none;
    border-radius: 24px;
    border: 1px solid #374151;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s;
    display: block;
}

.screenshot-item img:hover {
    transform: scale(1.02);
}

/* Features */
.features {
    padding: 5rem 0;
    background: var(--bg-alt);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Privacy Highlight */
.privacy-highlight {
    padding: 5rem 0;
    background: var(--bg);
    text-align: center;
}

.privacy-highlight h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.privacy-highlight ul {
    list-style: none;
    display: inline-block;
    text-align: left;
    margin-top: 1.5rem;
}

.privacy-highlight li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

/* Legal Pages */
.legal-page {
    padding: 4rem 0;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.legal-content h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.legal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.legal-content address {
    font-style: normal;
    color: var(--text-muted);
}

.legal-content a {
    color: var(--primary);
}

/* FAQ Accordion Styles */
.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

details {
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
}

details[open] {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

summary {
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    list-style: none;
    position: relative;
    padding-right: 3rem;
    display: block;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.2s;
}

details[open] summary::after {
    content: '−';
}

.faq-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icon Colors */
.feature-icon svg {
    color: var(--primary);
}

/* Story Section Updates */
.story-section {
    padding: 6rem 0;
    text-align: center;
    background: var(--bg);
}

.story-content {
    max-width: 800px;
    margin: 0 auto;
}

.story-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.story-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Footer Grid Updates */
.footer {
    background: var(--bg-alt);
    /* Kept background from original main.css but updated padding */
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: left;
}

.footer-col h3,
.footer-col h4 {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .screenshot-item img {
        height: 320px;
    }

    .screenshot-carousel {
        animation-duration: 25s;
    }

    .carousel-container::before,
    .carousel-container::after {
        width: 50px;
    }

    .lang-switcher {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .lang-switcher a {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
}