:root {
    --bg: #0e1013;
    --bg-elevated: #171a1f;
    --bg-card: #1d2127;
    --border: #2b3038;
    --text: #f2f3f5;
    --text-muted: #a3a9b3;
    --accent: #f39200;
    --accent-strong: #ffad33;
    --accent-ink: #1a1203;
    --radius: 14px;
    --max-width: 1120px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent-strong);
}

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

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(14, 16, 19, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand img {
    height: 30px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
    color: var(--text);
}

.lang-switch {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.lang-switch button {
    background: transparent;
    color: var(--text-muted);
    border: 0;
    padding: 4px 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.lang-switch button[aria-pressed='true'] {
    background: var(--accent);
    color: var(--accent-ink);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.button-primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.button-primary:hover {
    background: var(--accent-strong);
}

.button-secondary {
    border-color: var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.button-secondary:hover {
    border-color: var(--accent);
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    background: #05070c url('img/earth.jpg') center top / cover no-repeat;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(14, 16, 19, 0.2) 0%, rgba(14, 16, 19, 0.65) 70%, var(--bg) 100%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 48px;
    padding-top: 88px;
    padding-bottom: 88px;
}

.eyebrow {
    display: inline-block;
    color: var(--accent-strong);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.hero p.lead {
    color: #d4d8de;
    font-size: 18px;
    margin: 0 0 32px;
    max-width: 34em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-visual {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    font-size: clamp(26px, 3.4vw, 36px);
    line-height: 1.2;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

.section-intro {
    color: var(--text-muted);
    margin: 0 0 40px;
    max-width: 44em;
}

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.card h3 {
    margin: 14px 0 8px;
    font-size: 19px;
}

.card p {
    margin: 0;
    color: var(--text-muted);
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(243, 146, 0, 0.14);
    color: var(--accent-strong);
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.card .card-link {
    display: inline-block;
    margin-top: 14px;
    font-weight: 600;
    text-decoration: none;
}

.steps {
    counter-reset: step;
}

.steps .card {
    position: relative;
}

.steps .card::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: 20px;
    right: 22px;
    font-size: 40px;
    font-weight: 800;
    color: rgba(243, 146, 0, 0.22);
    line-height: 1;
}

.banner {
    background:
        linear-gradient(90deg, rgba(11, 12, 15, 0.92) 0%, rgba(11, 12, 15, 0.7) 45%, rgba(11, 12, 15, 0.25) 100%),
        #0b0c0f url('img/light-trails.jpg') center / cover no-repeat;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.banner .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.banner h2 {
    margin: 0 0 6px;
    font-size: clamp(24px, 3vw, 32px);
}

.banner p {
    margin: 0;
    color: #d4d8de;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.site-footer img {
    height: 34px;
    width: auto;
}

.brand img {
    height: 30px;
}

.site-footer address {
    font-style: normal;
}

.site-footer a {
    color: var(--text-muted);
}

/* Downloads page */
.page-header {
    padding: 64px 0 24px;
}

.page-header h1 {
    font-size: clamp(30px, 4vw, 44px);
    margin: 0 0 10px;
}

.downloads {
    padding-top: 16px;
}

.download-app {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    margin-bottom: 24px;
}

.download-app header h2 {
    margin: 0 0 4px;
    font-size: 24px;
}

.download-app .version {
    display: inline-block;
    font-size: 13px;
    color: var(--accent-strong);
    font-weight: 600;
    margin-bottom: 10px;
}

.download-app .description {
    color: var(--text-muted);
    margin: 0;
}

.download-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.download-item.is-recommended {
    border-color: var(--accent);
    background: rgba(243, 146, 0, 0.08);
}

.download-item .platform {
    font-weight: 600;
}

.download-item .meta {
    color: var(--text-muted);
    font-size: 14px;
    word-break: break-all;
}

.download-item .badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

.state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .hero .container {
        grid-template-columns: 1fr;
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .download-app {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .site-nav .nav-optional {
        display: none;
    }

    .site-nav {
        gap: 14px;
    }

    section {
        padding: 56px 0;
    }

    .download-item {
        flex-direction: column;
        align-items: stretch;
    }

    .download-item .button {
        width: 100%;
    }
}
