/* Public site shell */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --header-height: 74px;
    --content-width: 1220px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 1rem/1.62 Aptos, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure {
    margin: 0;
}

h1,
h2,
h3 {
    line-height: 1.12;
    text-wrap: balance;
}

h1,
h2 {
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(3rem, 5.7vw, 5.75rem);
    font-weight: 680;
}

h2 {
    font-size: clamp(2rem, 4.1vw, 3.45rem);
    font-weight: 640;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 640;
}

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

a {
    color: var(--brand-bright);
    text-underline-offset: 0.25em;
}

summary {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 4px;
}

::selection {
    background: var(--brand-bright);
    color: var(--brand-ink);
}

[hidden] {
    display: none !important;
}

.site-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.site-shell > main {
    flex: 1;
}

.wrap {
    width: min(calc(100% - 3rem), var(--content-width));
    margin-inline: auto;
}

.section-pad {
    padding-block: clamp(3.75rem, 7vw, 6.75rem);
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.65rem 0.9rem;
    transform: translateY(-160%);
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: absolute;
    z-index: 100;
    inset: 0 0 auto;
    height: var(--header-height);
    border-bottom: 1px solid var(--line);
    background: var(--header-bg);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    display: grid;
    width: min(1420px, calc(100% - 56px));
    height: 100%;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    text-decoration: none;
}

.brand__wordmark {
    width: 171px;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.site-nav a {
    position: relative;
    color: var(--ink-soft);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-decoration: none;
    text-transform: uppercase;
}

.site-nav a::after {
    position: absolute;
    right: 0;
    bottom: -9px;
    left: 0;
    height: 1px;
    transform: scaleX(0);
    background: var(--brand);
    content: "";
    transition: transform 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--ink);
}

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

.site-header__actions {
    display: flex;
    justify-content: flex-end;
}

.mobile-menu {
    display: none;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.75rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 3px;
    color: inherit;
    font-size: 0.9375rem;
    font-weight: 680;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

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

.button--primary:hover {
    background: var(--brand-bright);
}

.button--secondary {
    border-color: #56606b;
    background: transparent;
    color: var(--ink);
}

.button--secondary:hover {
    border-color: var(--brand-bright);
    background: rgb(228 147 55 / 8%);
}

.button--discord {
    border-color: rgb(255 255 255 / 20%);
    background: #4451d5;
    color: #fff;
}

.button--discord:hover {
    background: #505de4;
}

.discord-mark {
    width: 1.5rem;
}

.discord-button--header {
    width: 154px;
    min-height: 40px;
    padding: 9px 15px;
    font-size: 0.875rem;
}

.discord-button--header .discord-mark {
    width: 20px;
}

/* Home and shared page heroes */

.site-hero,
.public-page-hero {
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(ellipse at 79% 41%, rgb(228 147 55 / 15%), transparent 52%),
        linear-gradient(145deg, #0b1015 25%, #17191d 75%, #11161c);
}

.site-hero::before,
.public-page-hero::before {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgb(236 202 161 / 8%) 1px, transparent 1px),
        linear-gradient(to bottom, rgb(236 202 161 / 8%) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 76% 50%, #000, transparent 72%);
    pointer-events: none;
    content: "";
}

.site-hero__inner,
.public-page-hero__inner {
    position: relative;
}

.site-hero__inner {
    display: grid;
    min-height: clamp(510px, 39vw, 620px);
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(2rem, 4vw, 4.75rem);
    padding-block: clamp(3.5rem, 6vw, 5.5rem);
}

.site-hero h1 {
    font-size: clamp(3rem, 4.65vw, 4.25rem);
}

.site-hero__copy > p:not(.eyebrow, .site-hero__availability),
.public-page-hero__inner > p {
    max-width: 35rem;
    margin-top: 1.35rem;
    color: var(--ink-soft);
    font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
}

.eyebrow {
    margin-bottom: 1rem;
    color: var(--brand-bright);
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-hero__copy .button-row {
    margin-top: 1.75rem;
}

.site-hero__availability {
    margin-top: 0.9rem;
    color: var(--ink-muted);
    font-size: 0.875rem;
}

.public-page-hero__inner {
    padding-block: clamp(3.5rem, 7vw, 6rem);
}

.public-page-hero h1 {
    font-size: clamp(2.75rem, 5.3vw, 4.875rem);
}

.app-preview {
    min-width: 0;
    border: 1px solid #49525c;
    border-radius: 8px;
    background: var(--paper-deep);
    box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 40%);
}

.app-preview > a,
.showcase__image {
    display: block;
}

.app-preview img {
    width: 100%;
    border-radius: 7px 7px 0 0;
}

.app-preview figcaption {
    display: flex;
    min-height: 40px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    padding: 0.6rem 0.9rem;
    border-top: 1px solid var(--line);
    color: var(--ink-muted);
    font-size: 0.875rem;
}

.section-heading {
    margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.section-heading--split,
.site-cta__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
    gap: 1rem 3rem;
}

.section-heading p,
.site-cta p {
    max-width: 38rem;
    color: var(--ink-soft);
    font-size: 1.0625rem;
}

.workflow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.2rem, 3vw, 2.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.workflow li {
    padding-block: 1.15rem 0.75rem;
    border-top: 2px solid var(--brand);
}

.workflow p,
.showcase__caption p {
    margin-top: 0.65rem;
    color: var(--ink-soft);
}

.showcase {
    border-block: 1px solid var(--line);
    background: var(--paper-deep);
}

.showcase__grid,
.download-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.showcase__item {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.showcase__image img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 7px 7px 0 0;
    object-fit: cover;
    object-position: top;
}

.showcase__caption {
    padding: clamp(1.05rem, 2.1vw, 1.65rem);
    border-top: 1px solid var(--line);
}

.site-cta {
    background: radial-gradient(ellipse at 90% 100%, rgb(228 147 55 / 11%), transparent 65%);
}

.site-cta__inner {
    align-items: center;
}

.site-cta__inner .button-row {
    justify-content: flex-end;
}

.site-cta p {
    margin-top: 0.85rem;
}

/* Downloads and help */

.download-section {
    padding-top: clamp(2.75rem, 5vw, 4.25rem);
}

.release-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.55rem 1.5rem;
    margin-bottom: 1.4rem;
}

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

.release-summary p,
.download-card > p,
.download-help {
    color: var(--ink-soft);
}

.download-card {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 0.85rem;
    padding: clamp(1.2rem, 3.1vw, 2rem);
    border: 1px solid var(--line);
    border-top: 2px solid var(--brand);
    border-radius: 6px;
    background: var(--surface);
}

.download-card--planned {
    border-top-color: var(--line);
}

.download-card h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.platform-status {
    padding: 0.18rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.875rem;
    line-height: 1.4;
}

.installer-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.installer,
.installer-row {
    margin-top: auto;
    padding-top: 0.4rem;
}

.installer-row .installer {
    margin-top: 0;
    padding-top: 0;
}

.installer__details {
    display: block;
    margin-top: 0.5rem;
    color: var(--ink-muted);
    font-size: 0.875rem;
}

.download-recommended {
    display: block;
    color: var(--brand-bright);
}

.download-card.is-recommended {
    border-color: var(--brand);
}

.windows-mark {
    display: grid;
    width: 1.05rem;
    height: 1.05rem;
    grid-template: repeat(2, 1fr) / repeat(2, 1fr);
    gap: 2px;
    flex-shrink: 0;
}

.windows-mark i {
    background: currentColor;
}

.release-notes,
.help-list details {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.release-notes {
    margin-top: 1.5rem;
}

.release-notes summary,
.help-list summary {
    padding: 0.9rem 1rem;
    color: var(--ink);
    font-weight: 640;
}

.release-notes__body,
.help-answer {
    padding: 0 1rem 1.1rem;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.release-notes__body {
    white-space: pre-wrap;
}

.download-help {
    margin-top: 1.5rem;
}

.help-section {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
}

.help-list {
    display: grid;
    gap: 0.75rem;
}

.help-answer ul {
    margin: 0.6rem 0 0;
    padding-inline-start: 1.35rem;
}

.help-answer p + p,
.help-answer li + li {
    margin-top: 0.35rem;
}

.help-community {
    display: grid;
    justify-items: start;
    gap: 1rem;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-top: 2px solid var(--brand);
    border-radius: 6px;
    background: var(--paper-deep);
}

.help-community h2 {
    font-size: 1.65rem;
}

.help-community p {
    color: var(--ink-soft);
}

/* Footer and responsive shell */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--paper-deep);
}

.site-footer__main {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    padding-block: 2.6rem 2rem;
}

.site-footer__lead p {
    max-width: 26rem;
    margin-top: 0.6rem;
    color: var(--ink-soft);
}

.site-footer__links {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 0.45rem;
}

.site-footer__links a,
.site-footer__base a {
    color: var(--ink-soft);
    text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__base a:hover {
    color: var(--brand-bright);
    text-decoration: underline;
}

.site-footer__label {
    margin-bottom: 0.25rem;
    color: var(--brand-bright);
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-footer__base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.45rem 1rem;
    padding-block: 1.15rem;
    border-top: 1px solid var(--line);
    color: var(--ink-muted);
    font-size: 0.875rem;
}

@media (max-width: 58rem) {
    .site-header__inner {
        grid-template-columns: 1fr auto auto;
        gap: 0.6rem;
    }

    .site-nav {
        display: none;
    }

    .mobile-menu {
        position: relative;
        display: block;
    }

    .mobile-menu > summary {
        display: flex;
        width: 44px;
        height: 44px;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 5px;
        padding: 8px;
        list-style: none;
    }

    .mobile-menu > summary::-webkit-details-marker {
        display: none;
    }

    .mobile-menu > summary span {
        width: 23px;
        height: 1px;
        background: var(--brand-bright);
    }

    .mobile-menu > summary span:nth-child(2) {
        width: 17px;
    }

    .mobile-menu nav {
        position: absolute;
        top: 48px;
        right: 0;
        display: grid;
        width: min(300px, calc(100vw - 40px));
        padding: 12px;
        border: 1px solid var(--line);
        background: var(--paper-deep);
        box-shadow: 0 25px 60px rgb(0 0 0 / 55%);
    }

    .mobile-menu nav > a:not(.button) {
        padding: 0.65rem 0.75rem;
        border-bottom: 1px solid var(--line);
        color: var(--ink);
        font-size: 0.9375rem;
        text-decoration: none;
    }

    .mobile-menu nav > a:not(.button):hover,
    .mobile-menu nav > a.is-active {
        background: rgb(255 255 255 / 4%);
    }

    .mobile-menu nav > a.is-active {
        box-shadow: inset 2px 0 var(--brand);
    }

    .mobile-discord {
        margin-top: 0.65rem;
    }

    .site-hero__inner {
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .site-hero__preview {
        max-width: 48rem;
    }

    .site-cta__inner .button-row {
        justify-content: start;
    }
}

@media (max-width: 45rem) {
    :root {
        --header-height: 64px;
    }

    .wrap {
        width: calc(100% - 2rem);
    }

    .site-header__inner {
        grid-template-columns: 1fr auto;
    }

    .site-header__actions {
        display: none;
    }

    .brand__wordmark {
        width: 146px;
    }

    .section-heading--split,
    .site-cta__inner,
    .workflow,
    .showcase__grid,
    .download-grid,
    .help-section {
        grid-template-columns: 1fr;
    }

    .site-footer__main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer__lead {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .button,
    .site-nav a::after {
        transition: none;
    }

    .button:hover {
        transform: none;
    }
}
