:root {
    color-scheme: light dark;
    --bg: #0f1115;
    --surface: #171a21;
    --text: #f2f3f5;
    --muted: #a0a6b0;
    --accent: #e8623d;
    --border: #23262e;
    --topbar-bg: rgba(15, 17, 21, 0.85);
    --hero-glow: #1c2029;
    --nav-hover: rgba(160, 166, 176, 0.18);
    --nav-selected: rgba(160, 166, 176, 0.35);
    --nav-selected-text: #ffffff;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --max-width: 960px;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f5f6f8;
        --surface: #ffffff;
        --text: #1b1f26;
        --muted: #596273;
        --border: #d7dde7;
        --topbar-bg: rgba(245, 246, 248, 0.88);
        --hero-glow: #e7ecf4;
        --nav-hover: rgba(89, 98, 115, 0.12);
        --nav-selected: rgba(89, 98, 115, 0.22);
        --nav-selected-text: #1b1f26;
        --shadow: 0 12px 30px rgba(18, 28, 45, 0.12);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Top bar */
.topbar {
    border-bottom: 1px solid var(--border);
    background: var(--topbar-bg);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
}

.app-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-link:hover {
    background: var(--nav-hover);
}

.app-link.is-selected {
    background: var(--nav-selected);
    color: var(--nav-selected-text);
}

.app-link-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
}

/* Hero */
.hero {
    text-align: center;
    padding: 80px 0 48px;
    background: radial-gradient(circle at 50% 0%, var(--hero-glow) 0%, var(--bg) 70%);
}

.logo {
    width: 112px;
    height: 112px;
    /* border-radius: 24px; */
    object-fit: cover;
}

.hero h1 {
    margin-top: 24px;
    font-size: 3rem;
    letter-spacing: -0.02em;
}

.app-name {
    position: relative;
    display: inline-block;
}

.beta-tag {
    position: absolute;
    bottom: 0.7rem;
    left: 100%;
    margin-left: 0.35em;
    padding: 0.25em 0.5em;
    border: 1px solid var(--accent);
    border-radius: 0.5em;
    color: var(--accent);
    font-size: 0.28em;
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1;
}

.tagline {
    margin-top: 8px;
    font-size: 1.35rem;
    color: var(--accent);
    font-weight: 600;
}

.subtitle {
    margin: 20px auto 0;
    max-width: 560px;
    color: var(--muted);
    font-size: 1.05rem;
}

.download-link {
    display: inline-block;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 36px;
}

.download-badge {
    height: 56px;
    width: auto;
    transition: transform 0.15s ease;
}



.join-test-btn {
    display: inline-block;
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.join-test-btn:hover {
    opacity: 0.7;
}

.tune-source-link {
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: var(--border);
    font-size: 0.85rem;
}

.notes a.tune-source-link {
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: var(--border);
}

/* Screenshot */
.screenshot-section {
    padding: 24px 0 24px;
    text-align: center;
}

.screenshot {
    width: 100%;
    max-width: 340px;
    height: auto;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.screenshot-wide {
    max-width: 100%;
    border-radius: 4px;
}

/* Features */
.features {
    padding: 10px 0 20px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.feature {
    background: var(--surface);
    border-radius: 16px;
    padding: 16px 20px;
}

.feature h3 {
    font-size: 1.15rem;
    /* margin-bottom: 8px; */
}

.feature p {
    color: var(--muted);
    font-size: 0.98rem;
}

/* Notes / long-form content */
.notes {
    padding: 8px 0 64px;
}

.notes h2 {
    font-size: 1.3rem;
    margin: 20px 0 4px;
}

.notes p {
    color: var(--muted);
    margin-bottom: 8px;
}

.notes ul {
    color: var(--muted);
    margin: 0 0 12px 20px;
}

.notes li {
    margin-bottom: 4px;
}

.notes a {
    color: var(--accent);
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
    .container {
        padding: 0 12px;
    }

    .topbar-inner {
        gap: 6px;
        height: 48px;
    }

    .app-link {
        font-size: 0.82rem;
        padding: 4px 7px;
        gap: 5px;
    }

    .app-link-icon {
        width: 18px;
        height: 18px;
        border-radius: 5px;
    }

    .hero h1 {
        font-size: 2.4rem;
    }
    .hero {
        padding: 56px 0 32px;
    }
}
