:root {
    --bg: #040a13;
    --bg-soft: #091323;
    --panel: rgba(7, 17, 33, 0.92);
    --panel-soft: rgba(8, 20, 38, 0.82);
    --border: rgba(113, 166, 255, 0.18);
    --border-strong: rgba(94, 168, 255, 0.36);
    --text: #f2f6ff;
    --muted: #9aaecb;
    --blue: #1f82ff;
    --blue-bright: #34a2ff;
    --green: #5ce7a1;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --content-width: min(1180px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(36, 112, 228, 0.18), transparent 28%),
        linear-gradient(180deg, #060c17 0%, #040913 48%, #06101d 100%);
    font-family: "Aptos", "Segoe UI", sans-serif;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 90%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.topbar,
.downloads-hero {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(4, 10, 20, 0.92);
    border-bottom: 1px solid rgba(116, 168, 255, 0.12);
    backdrop-filter: blur(18px);
}

.topbar-inner,
.downloads-shell,
.downloads-hero__content {
    width: var(--content-width);
    margin: 0 auto;
}

.topbar-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    min-height: 86px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    position: relative;
    width: 42px;
    height: 22px;
    border-top: 5px solid #76bbff;
    border-radius: 999px;
    transform: skewX(-18deg);
    filter: drop-shadow(0 0 10px rgba(51, 144, 255, 0.34));
}

.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    left: 3px;
    border-top: 4px solid rgba(127, 192, 255, 0.82);
    border-radius: 999px;
}

.brand-mark::before {
    top: 7px;
    width: 31px;
}

.brand-mark::after {
    top: 14px;
    width: 21px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-copy strong {
    font-family: "Bahnschrift", "Trebuchet MS", sans-serif;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    font-style: italic;
    letter-spacing: 0.04em;
}

.brand-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.main-nav,
.topbar-actions,
.release-actions,
.sound-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.main-nav {
    justify-content: center;
    flex-wrap: wrap;
}

.main-nav a,
.ghost-link {
    position: relative;
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 600;
    transition: color 180ms ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -13px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue-bright), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.ghost-link:hover {
    color: var(--text);
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
    transform: scaleX(1);
}

.primary-link,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.primary-link {
    color: #f8fbff;
    background: linear-gradient(135deg, #2088ff 0%, #1863ff 100%);
    box-shadow: 0 12px 28px rgba(24, 99, 255, 0.3);
}

.secondary-link {
    color: var(--text);
    background: rgba(8, 18, 34, 0.76);
    border: 1px solid var(--border-strong);
}

.primary-link:hover,
.secondary-link:hover {
    transform: translateY(-2px);
}

.downloads-hero {
    position: relative;
    min-height: 400px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(3, 8, 18, 0.86) 0%, rgba(4, 10, 19, 0.54) 36%, rgba(4, 10, 19, 0.62) 100%),
        linear-gradient(180deg, rgba(3, 8, 18, 0.14), rgba(3, 8, 18, 0.66)),
        url("../FSFO_V6/landing-cockpit-hero.png") center center / cover no-repeat;
    border-bottom: 1px solid rgba(103, 154, 244, 0.12);
}

.downloads-hero__content {
    position: relative;
    z-index: 1;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 0 54px;
    text-align: center;
}

.downloads-hero h1,
.download-card h2,
.download-card h3 {
    margin: 0;
    font-family: "Bahnschrift", "Trebuchet MS", sans-serif;
}

.downloads-hero h1 {
    font-size: clamp(3.4rem, 7vw, 6.2rem);
    line-height: 0.95;
}

.downloads-hero p {
    max-width: 720px;
    margin: 18px auto 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    line-height: 1.45;
}

.hero-highlights {
    display: flex;
    justify-content: center;
    gap: 26px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.hero-highlights article {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 18px;
}

.hero-highlights article + article {
    border-left: 1px solid rgba(120, 170, 255, 0.28);
}

.highlight-icon,
.meta-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #7dbaff;
    background: rgba(11, 29, 54, 0.7);
    border: 1px solid rgba(100, 169, 255, 0.22);
}

.highlight-icon svg,
.meta-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.hero-highlights strong {
    display: block;
    font-size: 1.18rem;
}

.hero-highlights span:last-child {
    color: var(--muted);
}

.downloads-shell {
    padding: 36px 0 56px;
}

.downloads-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
    gap: 24px;
}

.download-card {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.download-card--release {
    padding: 22px;
    display: grid;
    grid-template-columns: minmax(420px, 1.22fr) minmax(280px, 0.78fr);
    gap: 22px;
}

.release-preview img {
    width: 100%;
    aspect-ratio: 1.34 / 1;
    object-fit: contain;
    object-position: center center;
    border-radius: 18px;
    border: 1px solid rgba(110, 168, 255, 0.14);
    background: #0b1524;
}

.release-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-kicker {
    margin: 0;
    color: #4f9dff;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.release-copy h2 {
    font-size: clamp(2rem, 3vw, 2.7rem);
}

.release-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.62;
}

.release-actions {
    margin-top: 6px;
    flex-wrap: wrap;
}

.release-actions .primary-link,
.release-actions .secondary-link,
.sound-actions .primary-link,
.sound-actions .secondary-link,
.side-card .primary-link {
    width: 100%;
}

.release-meta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-top: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid rgba(120, 170, 255, 0.16);
}

.meta-item strong {
    display: block;
    font-size: 1.35rem;
}

.meta-item span:last-child {
    color: var(--muted);
}

.side-card,
.sound-card {
    padding: 24px;
}

.side-card h3,
.sound-card h3 {
    font-size: 2rem;
    margin-bottom: 14px;
}

.req-alert,
.side-card p,
.sound-card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.68;
}

.req-alert a,
.text-link {
    color: #67a9ff;
}

.check-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.check-list li {
    position: relative;
    padding-left: 28px;
    color: #dbeaff;
}

.check-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--green);
    font-weight: 800;
}

.text-link {
    display: inline-flex;
    margin-top: 20px;
    font-weight: 700;
}

.sound-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sound-card__header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.wave-bars {
    display: flex;
    align-items: end;
    gap: 6px;
    min-width: 170px;
    justify-content: end;
}

.wave-bars span {
    width: 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(52, 162, 255, 0.15), rgba(52, 162, 255, 0.78));
}

.wave-bars span:nth-child(1) { height: 24px; }
.wave-bars span:nth-child(2) { height: 40px; }
.wave-bars span:nth-child(3) { height: 18px; }
.wave-bars span:nth-child(4) { height: 54px; }
.wave-bars span:nth-child(5) { height: 30px; }
.wave-bars span:nth-child(6) { height: 46px; }
.wave-bars span:nth-child(7) { height: 20px; }
.wave-bars span:nth-child(8) { height: 34px; }

.sound-actions {
    margin-top: 10px;
    flex-wrap: wrap;
}

.notice-card {
    margin-top: 24px;
    padding: 18px 22px;
    color: #d6e4fb;
    background: rgba(11, 25, 46, 0.88);
    border: 1px solid rgba(120, 170, 255, 0.16);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.notice-card strong {
    color: #ffffff;
}

@media (max-width: 1120px) {
    .topbar-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 18px 0;
    }

    .downloads-grid,
    .download-card--release {
        grid-template-columns: 1fr;
    }

    .hero-highlights article + article {
        border-left: 0;
    }
}

@media (max-width: 760px) {
    .topbar-inner,
    .downloads-shell,
    .downloads-hero__content {
        width: min(calc(100vw - 20px), 100%);
    }

    .main-nav,
    .topbar-actions,
    .release-actions,
    .sound-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .main-nav a::after {
        bottom: -8px;
    }

    .downloads-hero {
        min-height: 360px;
        background-position: 60% center;
    }

    .downloads-hero__content {
        min-height: 360px;
        padding: 64px 0 40px;
    }

    .hero-highlights {
        gap: 14px;
    }

    .hero-highlights article {
        width: 100%;
        justify-content: center;
        padding: 0;
    }

    .release-meta {
        grid-template-columns: 1fr;
    }

    .sound-card__header {
        flex-direction: column;
        align-items: start;
    }
}
