:root {
    color-scheme: dark;
    scroll-padding-top: 4.5rem;
    --bg: #0d0f12;
    --bg-alt: #14171c;
    --surface: #1b1f26;
    --surface-accent: #1d2530;
    --border: #2a2f38;
    --text: #e7eaee;
    --muted: #9aa3ad;
    --accent: #e8462b;
    --accent-hover: #ff5a3c;
    --radius: 14px;
    --maxw: 64rem;
    /* Wider track for the mod grid: most visitors arrive on a desktop gaming
       PC, so the "coming next" cards get three columns and room to breathe. */
    --maxw-wide: 82rem;

    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    line-height: 1.15;
    margin: 0 0 0.5rem;
}

p {
    margin: 0 0 1rem;
}

a {
    color: inherit;
}

strong {
    color: #fff;
}

code {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.1em 0.4em;
    font-size: 0.92em;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 2px;
    border-radius: 4px;
}

em {
    font-style: normal;
    color: var(--accent-hover);
    font-weight: 600;
}

/* ---- Sticky site header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 15, 18, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav {
    max-width: var(--maxw-wide);
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 1.1rem;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
}

.brand:hover {
    color: #fff;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.nav-btn {
    display: inline-block;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

button.nav-btn {
    cursor: pointer;
    font-family: inherit;
}

.nav-btn-outline {
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
}

.nav-btn-outline:hover {
    border-color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

.nav-btn-support {
    border: 1px solid transparent;
    background: var(--accent);
    color: #fff;
}

.nav-btn-support:hover {
    background: var(--accent-hover);
}

/* ---- Hero ---- */
.hero {
    background:
        radial-gradient(1200px 600px at 70% -10%, rgba(232, 70, 43, 0.18), transparent 60%),
        linear-gradient(180deg, #11141a 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}

.hero-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 3.5rem 1.5rem 4.5rem;
    text-align: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: clamp(2.75rem, 8vw, 4.5rem);
    letter-spacing: -0.02em;
}

.hero-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    margin-bottom: 1.25rem;
}

/* Sized in em so the avatar tracks the clamped h1 as the viewport narrows. */
.hero-avatar {
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(232, 70, 43, 0.5);
    flex-shrink: 0;
}

/* Spacing around the lede block lives on the h1 and the buttons, so several
   lede paragraphs in a row sit close together rather than drifting apart. */
.lede {
    max-width: 49rem;
    margin: 0 auto 0.9rem;
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    color: var(--muted);
}

.lede-accent {
    color: var(--accent-hover);
}

.lede a {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    font-weight: 600;
}

.lede a:hover {
    color: #fff;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

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

.btn-ghost {
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--muted);
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.1rem;
}

/* ---- Sections ---- */
.section {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.section-alt {
    background: var(--bg-alt);
    max-width: none;
    border-block: 1px solid var(--border);
}

.section-alt > * {
    max-width: var(--maxw);
    margin-inline: auto;
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    text-align: center;
    margin-bottom: 0.75rem;
}

.section-intro {
    text-align: center;
    color: var(--muted);
    max-width: 42rem;
    margin: 0 auto 2.5rem;
}

/* ---- Cards ---- */
.cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    margin-top: 2rem;
}

/* Released mods are flex, not grid: most visitors arrive here from an in-game
   "update available" popup wanting one download, and a lone card stranded in
   the left half of a two-column grid buries it. Flex centres whatever number
   of cards there are and lets each one take a comfortable width. */
.cards-released {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.cards-released > .card {
    flex: 1 1 22rem;
    max-width: 34rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.card-accent {
    background: var(--surface-accent);
    border-color: rgba(232, 70, 43, 0.4);
}

.card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.card p:last-child {
    margin-bottom: 0;
}

.btn-link {
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
    padding: 0.8rem 0.25rem;
}

.btn-link:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ---- Screenshot links (Watch on YouTube overlay) ---- */
.shot {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    line-height: 0;
    transition: transform 0.15s ease;
}

.shot img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.shot:hover,
.shot:focus-visible {
    transform: translateY(-3px);
}

.yt-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(13, 15, 18, 0.72);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    backdrop-filter: blur(2px);
    transition: background 0.15s ease;
}

.shot:hover .yt-badge,
.shot:focus-visible .yt-badge {
    background: var(--accent);
}

.yt-play {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 7px solid #fff;
}

.yt-badge-sm {
    top: 0.4rem;
    right: 0.4rem;
    padding: 0.25rem 0.55rem;
    font-size: 0.7rem;
}

/* ---- Released mods (Out now) ---- */
.released-thumb {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.released-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.badge {
    flex-shrink: 0;
    background: var(--surface-accent);
    border: 1px solid rgba(232, 70, 43, 0.4);
    color: var(--accent-hover);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.tagline {
    color: var(--muted);
    font-weight: 600;
}

.released-date {
    color: var(--muted);
    font-size: 0.85rem;
}

.released-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: 1rem;
}

.release-notes {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.release-notes-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.release-notes ul {
    margin: 0;
    padding-left: 1.2rem;
}

.release-notes li {
    margin: 0 0 0.35rem;
}

.release-notes li:last-child {
    margin-bottom: 0;
}

/* ---- Featured upcoming card ---- */
.card-featured {
    max-width: var(--maxw-wide);
    margin-top: 2rem;
    position: relative;
}

/* The floated screenshot column is taken out of flow, so re-establish the
   card's height around it. */
.card-featured::after {
    content: "";
    display: block;
    clear: both;
}

.status-pill {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.card-featured h4 {
    font-size: 1.2rem;
    color: var(--accent-hover);
    margin-top: 1.5rem;
}

.quest-list {
    margin: 0.75rem 0 1.5rem;
    display: grid;
    gap: 0.75rem;
}

.quest-list dt {
    font-weight: 700;
    color: #fff;
}

.quest-list dd {
    margin: 0.15rem 0 0;
    color: var(--muted);
}

.sub-clips {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-bottom: 1.5rem;
}

.sub-clip {
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.15s ease;
}

.sub-clip img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.sub-clip:hover,
.sub-clip:focus-visible {
    transform: translateY(-3px);
}

.sub-clip-label {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

/* ---- Numbered upcoming cards ---- */
.upcoming-cards {
    max-width: var(--maxw-wide);
    margin-top: 2rem;
}

.upcoming-card {
    position: relative;
}

.badge-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--surface-accent);
    border: 1px solid rgba(232, 70, 43, 0.4);
    color: var(--accent-hover);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

/* ---- Feature list ---- */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

.feature-list li {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.feature-list h4 {
    font-size: 1.1rem;
    color: #fff;
}

.feature-list p {
    margin: 0;
    color: var(--muted);
}

/* ---- Download ---- */
.section-download {
    text-align: center;
}

.download-note {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

/* ---- CTA section ---- */
.section-cta {
    text-align: center;
}

/* ---- Support dialog ---- */
.support-dialog {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    padding: 0;
    max-width: min(32rem, calc(100vw - 2rem));
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.support-dialog::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.support-dialog-inner {
    padding: 1.75rem 1.75rem 1.5rem;
}

.support-dialog-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.support-dialog-text {
    margin-bottom: 1.5rem;
    color: var(--muted);
    line-height: 1.55;
}

.support-dialog-text a {
    color: var(--accent-hover);
    font-weight: 600;
}

.support-dialog-text a:hover {
    color: #fff;
}

.support-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.support-dialog-actions .btn-ghost {
    background: transparent;
}

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

.footer p {
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin-top: 0.75rem;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ---- Legal pages (privacy, terms) ---- */
.legal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.legal-main {
    flex: 1;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    width: 100%;
}

.legal-content h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.legal-updated {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.legal-content h2 {
    font-size: 1.25rem;
    color: #fff;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content h3 {
    font-size: 1.05rem;
    color: var(--text);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.legal-content p,
.legal-content li {
    color: var(--muted);
}

.legal-content ul {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.legal-content li {
    margin-bottom: 0.35rem;
}

.legal-content a {
    color: var(--accent-hover);
    font-weight: 600;
}

.legal-content a:hover {
    color: #fff;
}

/* ---- Mobile: slim header + one featured screenshot ---- */
@media (max-width: 47.99rem) {
    .nav-hide-mobile {
        display: none;
    }

    .card-featured .sub-clips {
        display: none;
    }
}

/* ---- Responsive: two-up on wider screens ---- */
@media (min-width: 48rem) {
    .cards {
        grid-template-columns: 1fr 1fr;
    }

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

    .sub-clips {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ---- Responsive: desktop (the common case here — gaming PCs) ---- */
@media (min-width: 64rem) {
    .upcoming-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Featured card: screenshots become a narrow column floated down the
       right-hand side, with the copy flowing alongside them. */
    .card-featured .shot,
    .card-featured .sub-clips {
        float: right;
        clear: right;
        width: 25%;
        margin: 0 0 1rem 1.75rem;
    }

    .card-featured .sub-clips {
        grid-template-columns: 1fr;
    }
}
