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

:root {
    --primary: #166534;
    --primary-muted: #15803d;
    --text: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    --bg: #fafafa;
    --surface: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
    /* Aliases for subpages */
    --primary-green: var(--primary);
    --light-green: var(--primary-muted);
    --lighter-green: #22c55e;
    --text-dark: var(--text);
    --text-medium: var(--text-muted);
    --background: var(--bg);
    --white: var(--surface);
    --shadow: rgba(15, 23, 42, 0.06);
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero */
.hero {
    background: var(--surface);
    color: var(--text);
    padding: 48px 24px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.hero-top .lang-switcher {
    margin: 0;
    text-align: left;
}

.lang-switcher {
    text-align: right;
    margin-bottom: 2rem;
}

.lang-switcher a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s;
}

.lang-switcher a:hover {
    color: var(--primary);
}

.hero-download-badge {
    display: block;
    line-height: 0;
    background: none;
    padding: 0;
}

.hero-badge-img {
    height: 36px;
    width: auto;
    display: block;
}

.app-name {
    font-family: 'Outfit', sans-serif;
    font-size: 2.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.description {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.65;
}

/* Main */
main {
    padding-top: 128px;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 64px;
}

section {
    margin-bottom: 64px;
}

main > section:first-of-type {
    padding-top: 3rem;
}

main > section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 3rem;
}

h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1px;
    background: #f1f5f9;
    border-radius: var(--radius);
    overflow: hidden;
}

.feature-card {
    background: #fafafa;
    padding: 28px;
}

.feature-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.feature-card ul {
    list-style: none;
    padding: 0;
}

.feature-card li {
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.feature-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

/* Highlights */
.highlights {
    padding: 0;
}

.highlight-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.highlight-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.highlight-item:last-child {
    border-bottom: none;
}

.highlight-item strong {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 0.25rem;
}

.highlight-item p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Instructions */
.instructions {
    padding: 0;
}

.instruction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-list a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.15s;
}

.instruction-list a:hover {
    color: var(--primary-muted);
}

/* Support */
.support {
    padding: 0 0 2rem 0;
}

.support p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.contact-email {
    margin: 1rem 0;
}

.contact-email a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.contact-email a:hover {
    color: var(--primary-muted);
}

/* Screenshots Section */
.screenshots h2 {
    margin-bottom: 1.5rem;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.screenshot-item {
    margin: 0;
    text-align: center;
    background: var(--bg); /* #fafafa so transparent pixels don’t show white */
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    background: transparent !important; /* prevent forced-colors/UA from filling transparent pixels */
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.1)); /* follows image alpha (rounded edges) */
}

.screenshot-item figcaption {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
}

@media (min-width: 640px) {
    .screenshot-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 720px;
        margin: 0 auto;
    }
}

@media (min-width: 960px) {
    .screenshot-grid {
        grid-template-columns: repeat(6, 1fr);
        max-width: none;
        gap: 1rem;
    }
    
}

/* App Download Section */
.app-download {
    padding: 0;
    scroll-margin-top: 2rem;
}

.app-download-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 2.5rem;
    background: var(--surface); /* #ffffff; device area uses --bg via .app-device-frame */
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.app-device-frame {
    flex-shrink: 0;
    width: 180px;
    background: var(--surface); /* #ffffff behind device screenshot */
}

.device-screenshot {
    width: 100%;
    height: auto;
    display: block;
    background: transparent !important; /* prevent forced-colors/UA from filling transparent pixels */
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.2)); /* follows image alpha (rounded edges) */
}

.app-icon {
    display: block;
    margin: 0 auto 0.75rem;
    border-radius: 16px;
}

.app-download-content {
    text-align: center;
}

.app-download-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.app-download-subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.app-store-badges {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.app-badge-link {
    display: block;
    line-height: 0;
}

.app-badge {
    height: 40px;
    width: auto;
    display: block;
    transition: opacity 0.15s;
}

.app-badge-link:hover .app-badge {
    opacity: 0.85;
}

.app-download-requirements {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.system-requirements {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Footer */
footer {
    background: var(--surface);
    color: var(--text-muted);
    padding: 32px 24px;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

footer a:hover {
    color: var(--text);
}

/* Responsive */
@media (max-width: 768px) {
    .app-name {
        font-size: 2.25rem;
    }

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

    .hero {
        padding: 40px 24px 32px;
    }

    main {
        padding-top: 96px;
        padding-left: 24px;
        padding-right: 24px;
        padding-bottom: 48px;
    }

    section {
        margin-bottom: 48px;
    }

    main > section:first-of-type {
        padding-top: 2rem;
    }

    main > section:last-of-type {
        padding-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .app-name {
        font-size: 2rem;
    }

    .feature-card {
        padding: 24px;
    }

    .app-download-card {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .app-device-frame {
        width: 120px;
        height: 240px;
    }

    .app-badge {
        height: 36px;
    }
}
