:root {
    --accent: #4B946C;
    --secondary: #6DB88C;
    --bg: #0a0f0c;
    --bg-elevated: #141a16;
    --text: #F0F0F0;
    --text-muted: #8A9E93;
    --border: #1e2b23;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-height: 100%;
    background: #0a0f0c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse 140% 60% at 50% -5%, rgba(75, 148, 108, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 55% 45% at 95% 105%, rgba(109, 184, 140, 0.09) 0%, transparent 55%),
        #0a0f0c;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    position: relative;
    overflow-x: hidden;
}

/* Grain overlay */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    pointer-events: none;
}

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

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(75, 148, 108, 0.08);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}

.brand-text {
    color: var(--accent);
}

.nav-brand:hover {
    text-decoration: none;
}

.nav-brand:hover .brand-text {
    color: var(--secondary);
}

.nav-brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--secondary);
    text-decoration: none;
}

/* Hero */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 84px 24px 20px;
    text-align: center;
}

.hero-inner {
    max-width: 600px;
    margin: 0 auto;
}

.hero .app-icon {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(75, 148, 108, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(75, 148, 108, 0.15);
    margin-bottom: 14px;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    background: linear-gradient(160deg, #ffffff 0%, var(--secondary) 55%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.app-store-badge {
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-badge:hover {
    transform: scale(1.04);
    opacity: 0.9;
}

.app-store-badge img {
    height: 52px;
}

/* Screenshots */
.screenshots {
    padding: 0 24px 64px;
}

.screenshots-inner {
    max-width: 1080px;
    margin: 0 auto;
    text-align: center;
}

.screenshots h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: var(--text);
}

.screenshots-gallery {
    position: relative;
}

.screenshots-scroll {
    overflow-x: auto;
    padding: 8px 24px 24px;
    margin: 0 -24px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar {
    display: none;
}

.screenshots-track {
    display: flex;
    gap: 20px;
    width: max-content;
    margin: 0 auto;
}

.screenshots-scroll img {
    height: 420px;
    width: auto;
    flex: 0 0 auto;
    scroll-snap-align: center;
    border-radius: 28px;
    filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.5));
}

/* Gallery arrows: hidden until JS detects overflow on small viewports */
.gallery-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(10, 15, 12, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.screenshots-gallery.has-overflow .gallery-arrow {
    display: flex;
}

.gallery-arrow:hover:not(:disabled) {
    background: rgba(75, 148, 108, 0.25);
    border-color: var(--accent);
}

.gallery-arrow:disabled {
    opacity: 0.25;
    cursor: default;
}

.gallery-arrow-prev {
    left: 4px;
}

.gallery-arrow-next {
    right: 4px;
}

/* Footer */
.footer {
    padding: 36px 24px;
    text-align: center;
}

.footer-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--secondary);
    text-decoration: none;
}

/* Legal Pages */
.legal {
    padding: 110px 24px 80px;
    max-width: 720px;
    margin: 0 auto;
}

.legal h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.legal .last-updated {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.legal h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--secondary);
}

.legal p,
.legal ul {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.75;
}

.legal p a,
.legal ul a {
    color: var(--secondary);
}

.legal strong {
    color: var(--text);
    font-weight: 600;
}

.legal ul {
    padding-left: 24px;
}

.legal li {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 640px) {
    .hero {
        padding: 84px 24px 24px;
    }

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

    .hero p {
        font-size: 1rem;
    }

    .hero .app-icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .nav-links {
        gap: 16px;
    }

    .screenshots h2 {
        font-size: 1.3rem;
    }

    .screenshots-scroll img {
        height: 360px;
    }

    .gallery-arrow {
        width: 34px;
        height: 34px;
    }

    .gallery-arrow-prev {
        left: 0;
    }

    .gallery-arrow-next {
        right: 0;
    }
}
