/* Chantra: Golden Age, website styles.
   The look follows the game's own interface: slate glass panels with silver filigree corners,
   Cinzel capitals, olive-bronze buttons and gold accents, over dusk and sanctum backdrops. */

@font-face {
    font-family: "Cinzel";
    src: url("../fonts/cinzel-latin-wght-normal.woff2") format("woff2-variations");
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: "Gelasio";
    src: url("../fonts/gelasio-latin-wght-normal.woff2") format("woff2-variations");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Gelasio";
    src: url("../fonts/gelasio-latin-wght-italic.woff2") format("woff2-variations");
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
}

:root {
    --header-h: 76px;
    --gutter: clamp(16px, 4vw, 48px);

    --c-bg: #0b0c0e;
    --c-heading: #f1e9d4;
    --c-text: #e7e0cd;
    --c-text-dim: #b1a997;
    --c-text-faint: #7f796d;
    --c-gold: #d4b06a;
    --c-gold-bright: #f0d595;
    --c-silver: #a7adb2;
    --c-line: rgba(160, 168, 174, 0.3);
    --c-line-soft: rgba(160, 168, 174, 0.14);
    --c-link: #a9c1ee;
    --c-link-hover: #d3e0ff;
    --c-panel: linear-gradient(180deg, rgba(32, 39, 44, 0.95), rgba(19, 24, 28, 0.97));

    --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
    --font-body: Georgia, "Gelasio", "Times New Roman", serif;
    --font-ui: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

    color-scheme: dark;
}

/* Base */

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

html {
    background: var(--c-bg);
    -webkit-text-size-adjust: 100%;
}

html.no-scroll {
    overflow: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--c-text);
    background:
        radial-gradient(1400px 700px at 50% -200px, rgba(201, 162, 77, 0.07), transparent 70%),
        var(--c-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--c-heading);
}

a {
    color: var(--c-link);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--c-link-hover);
}

code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.9em;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
}

:focus-visible {
    outline: 2px solid var(--c-gold);
    outline-offset: 2px;
}

/* Blazor moves focus to the page heading after navigation, for screen readers; no ring needed there. */
h1:focus,
h1:focus-visible {
    outline: none;
}

::selection {
    background: rgba(212, 176, 106, 0.4);
    color: #fff;
}

main {
    display: block;
    min-height: 70vh;
}

main:focus {
    outline: none;
}

.container {
    width: min(1200px, calc(100% - 2 * var(--gutter)));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.muted {
    color: var(--c-text-dim);
}

.skip-link {
    position: fixed;
    left: 12px;
    top: -64px;
    z-index: 200;
    padding: 10px 16px;
    border: 0;
    border-radius: 4px;
    background: var(--c-gold);
    color: #1a1209;
    font: 700 0.9rem var(--font-ui);
    cursor: pointer;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 12px;
}

/* Typography helpers */

.eyebrow {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--c-gold);
}

/* The silver knot with fading rules either side, used under headings. */
.knot {
    display: block;
    width: min(360px, 80%);
    height: 18px;
    margin: 14px auto 0;
    background:
        url("../img/ui/rule-knot.png") center / 56px 18px no-repeat,
        linear-gradient(90deg, transparent, rgba(167, 173, 178, 0.55) 35%, transparent 47%, transparent 53%, rgba(167, 173, 178, 0.55) 65%, transparent) center / 100% 1px no-repeat;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto clamp(28px, 4vw, 44px);
    text-align: center;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

.section-heading__lead {
    margin: 16px auto 0;
    color: var(--c-text-dim);
}

.section-more {
    margin: 36px 0 0;
    text-align: center;
}

/* Header */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    isolation: isolate;
    height: var(--header-h);
}

/* The bar's background lives on a pseudo-element: a backdrop-filter on the header itself would
   become the containing block of the fixed mobile menu and squeeze it into the bar. */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(6, 7, 9, 0.82), rgba(6, 7, 9, 0));
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

html.is-scrolled .site-header::before,
.site-header.is-open::before {
    background: rgba(9, 11, 13, 0.93);
    border-bottom-color: var(--c-line-soft);
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 100%;
}

.site-header__brand {
    flex: none;
}

.site-header__brand img {
    display: block;
    width: auto;
    height: 50px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
}

.site-header__menu {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-nav {
    display: flex;
    gap: 4px;
}

.site-nav a {
    position: relative;
    padding: 10px 14px;
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    color: #ddd5c2;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
    transition: color 0.2s;
}

.site-nav a:hover {
    color: #fff;
}

.site-nav a.active {
    color: var(--c-gold-bright);
}

/* A small gold lozenge under the current page. */
.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 7px;
    height: 7px;
    background: var(--c-gold);
    box-shadow: 0 0 10px rgba(212, 176, 106, 0.9);
    transform: translateX(-50%) rotate(45deg);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-header__toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214, 207, 190, 0.3);
    border-radius: 4px;
    background: rgba(10, 12, 14, 0.55);
    cursor: pointer;
}

.burger {
    position: relative;
    width: 20px;
    height: 14px;
}

.burger::before,
.burger::after,
.burger span {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: #e8dfca;
    transition: transform 0.25s, opacity 0.25s;
}

.burger::before { top: 0; }
.burger span { top: 6px; }
.burger::after { bottom: 0; }

.is-open .burger::before { transform: translateY(6px) rotate(45deg); }
.is-open .burger span { opacity: 0; }
.is-open .burger::after { transform: translateY(-6px) rotate(-45deg); }

/* Footer */

.site-footer {
    position: relative;
    margin-top: 48px;
    padding: 64px 0 28px;
    background: linear-gradient(180deg, #0d0e11, #08090b);
    border-top: 1px solid var(--c-line-soft);
}

.site-footer__ornament {
    position: absolute;
    top: -18px;
    left: 50%;
    width: 112px;
    height: 36px;
    background: url("../img/ui/rule-knot.png") center / contain no-repeat;
    transform: translateX(-50%);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 36px;
}

.site-footer__brand img {
    width: 190px;
    height: auto;
}

.site-footer__brand p {
    max-width: 300px;
    margin: 10px 0 0;
    font-style: italic;
    color: var(--c-text-dim);
}

.site-footer__column h2 {
    margin: 0 0 14px;
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--c-gold);
}

.site-footer__column > a {
    display: block;
    padding: 4px 0;
    text-decoration: none;
    color: #cbc4b2;
}

.site-footer__column > a:hover {
    color: #fff;
}

.site-footer__note {
    max-width: 240px;
    margin: 8px 0 0;
    font-size: 0.86rem;
    color: var(--c-text-dim);
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid rgba(160, 168, 174, 0.1);
    font-size: 0.85rem;
    color: var(--c-text-faint);
}

/* Social links */

.social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(214, 207, 190, 0.28);
    border-radius: 50%;
    background: rgba(10, 12, 14, 0.45);
    color: #d4cdbb;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.social-link:hover {
    border-color: var(--c-gold);
    background: rgba(212, 176, 106, 0.12);
    color: #fff;
}

.social-icon {
    flex: none;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.social-links--named {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.social-links--named .social-link {
    width: auto;
    height: auto;
    gap: 10px;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #cbc4b2;
    text-decoration: none;
}

.social-links--named .social-link:hover {
    background: none;
    color: #fff;
}

/* Buttons: slate by default, olive-bronze for the main action, gold for the hero call to action. */

.btn {
    --btn-bg: linear-gradient(180deg, #2d353a, #1f2629);
    --btn-border: #5a646b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    min-height: 42px;
    padding: 0.55em 1.3em;
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    background: var(--btn-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.35);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--c-text);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, filter 0.2s, transform 0.2s;
}

.btn:hover {
    border-color: #8f999f;
    color: #fff;
    filter: brightness(1.14);
}

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

.btn--primary {
    --btn-bg: linear-gradient(180deg, #5f5741 0%, #48422f 55%, #3a3528 100%);
    --btn-border: #a58f5c;
    color: #f7edd2;
}

.btn--primary:hover {
    border-color: #e0c27e;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 22px rgba(224, 194, 126, 0.25);
}

.btn--gold {
    --btn-bg: linear-gradient(180deg, #f3d692 0%, #d6ab5c 50%, #a97a31 100%);
    --btn-border: #f7e3b0;
    color: #23170a;
    text-shadow: 0 1px 0 rgba(255, 240, 205, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 250, 230, 0.6), 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 26px rgba(214, 171, 92, 0.25);
}

.btn--gold:hover {
    color: #1a1006;
    box-shadow: inset 0 1px 0 rgba(255, 250, 230, 0.6), 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 34px rgba(240, 205, 130, 0.45);
}

.btn--ghost {
    --btn-bg: rgba(10, 12, 14, 0.4);
    --btn-border: rgba(214, 207, 190, 0.45);
    backdrop-filter: blur(4px);
}

.btn--danger {
    --btn-bg: linear-gradient(180deg, #5c2c27, #43201d);
    --btn-border: #9c4d44;
    color: #f6dcd6;
}

.btn--sm {
    min-height: 34px;
    padding: 0.4em 0.95em;
    font-size: 0.7rem;
}

.btn--lg {
    min-height: 52px;
    padding: 0.7em 1.8em;
    font-size: 0.88rem;
}

.btn--block {
    width: 100%;
}

.btn .social-icon {
    width: 1.3em;
    height: 1.3em;
}

.btn:disabled,
.btn.is-busy {
    opacity: 0.55;
    cursor: not-allowed;
    filter: none;
    transform: none;
}

/* Panels: the game's window style. Corner pieces come straight from the UI kit. */

.panel,
.race,
.stat {
    --corner: 34px;
    position: relative;
    border: 1px solid rgba(160, 168, 174, 0.38);
    border-radius: 6px;
    background:
        url("../img/ui/corner-tl.png") left 4px top 4px / var(--corner) no-repeat,
        url("../img/ui/corner-tr.png") right 4px top 4px / var(--corner) no-repeat,
        url("../img/ui/corner-bl.png") left 4px bottom 4px / var(--corner) no-repeat,
        url("../img/ui/corner-br.png") right 4px bottom 4px / var(--corner) no-repeat,
        var(--c-panel);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 24px 50px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.panel__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 52px 11px;
    border-bottom: 1px solid var(--c-line-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

/* Silver flourishes either side of the title, as on the game's SIGN IN window. */
.panel__header::before,
.panel__header::after {
    content: "";
    flex: 0 1 84px;
    height: 24px;
    opacity: 0.9;
    background: url("../img/ui/flourish-left.png") right center / contain no-repeat;
}

.panel__header::after {
    background-image: url("../img/ui/flourish-right.png");
    background-position: left center;
}

.panel__title {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.panel__body {
    padding: 22px 26px 26px;
}

.panel__lead {
    margin: 0 0 20px;
    text-align: center;
    font-size: 1.06rem;
    color: #ebe3cf;
}

.panel__footer {
    margin: 20px 0 0;
    text-align: center;
    font-size: 0.95rem;
    color: var(--c-text-dim);
}

/* Forms */

.field__hint {
    margin: 6px 0 0;
    font-size: 0.86rem;
    color: var(--c-text-dim);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.form-actions--center {
    justify-content: center;
}

/* Hero: the game's dusk login backdrop, rebuilt from its layers. Phones get the flattened picture. */

.hero {
    --px: 0;
    --py: 0;
    --scroll: 0;
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    min-height: max(640px, 100svh);
    overflow: hidden;
    /* On narrow screens this keeps the moon at the right edge instead of behind the logo. */
    background: #24171c url("../img/bg/dusk.jpg") 56% bottom / cover no-repeat;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(10, 7, 11, 0.62) 0%, rgba(10, 7, 11, 0.28) 38%, rgba(10, 7, 11, 0) 62%),
        linear-gradient(0deg, var(--c-bg) 0%, rgba(11, 12, 14, 0) 24%);
}

.hero__scene {
    display: none;
    position: absolute;
    inset: 0;
    z-index: -2;
}

/* A 16:9 stage bottom-aligned in the hero; layers are placed as fractions of the original 2880x1620 scene. */
.hero__frame {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: max(100%, calc(max(640px, 100svh) * 16 / 9));
    aspect-ratio: 16 / 9;
    transform: translateX(-50%);
}

.hero__layer {
    --depth: 0;
    position: absolute;
    left: -4%;
    bottom: 0;
    width: 108%;
    background: center bottom / 100% 100% no-repeat;
    transform: translate3d(
        calc(var(--px) * var(--depth) * -56px),
        calc(var(--py) * var(--depth) * -14px + var(--scroll) * (1 - var(--depth)) * 0.35px),
        0);
    transition: transform 0.9s cubic-bezier(0.2, 0.65, 0.25, 1);
    will-change: transform;
}

.hero__layer--sky { --depth: 0; top: 0; bottom: auto; height: 100%; background-image: url("../img/bg/dusk/sky.jpg"); }
.hero__layer--ridge-1 { --depth: 0.15; height: 55.2%; background-image: url("../img/bg/dusk/ridge-1.png"); }
.hero__layer--ridge-2 { --depth: 0.3; height: 46.7%; background-image: url("../img/bg/dusk/ridge-2.png"); }
.hero__layer--ridge-3 { --depth: 0.45; height: 60%; background-image: url("../img/bg/dusk/ridge-3.png"); }
.hero__layer--ridge-4 { --depth: 0.65; height: 36.6%; background-image: url("../img/bg/dusk/ridge-4.png"); }
.hero__layer--ridge-5 { --depth: 1; height: 29.5%; background-image: url("../img/bg/dusk/ridge-5.png"); }

.hero__layer--mist-1,
.hero__layer--mist-2,
.hero__layer--mist-3,
.hero__layer--mist-4 {
    height: 20.2%;
    opacity: 0.9;
    animation: mist-drift 46s ease-in-out infinite alternate;
}

.hero__layer--mist-1 { --depth: 0.22; bottom: 29%; background-image: url("../img/bg/dusk/mist-1.png"); }
.hero__layer--mist-2 { --depth: 0.38; bottom: 20%; background-image: url("../img/bg/dusk/mist-2.png"); animation-duration: 38s; animation-direction: alternate-reverse; }
.hero__layer--mist-3 { --depth: 0.55; bottom: 9%; background-image: url("../img/bg/dusk/mist-3.png"); animation-duration: 52s; }
.hero__layer--mist-4 { --depth: 0.8; bottom: 0; background-image: url("../img/bg/dusk/mist-4.png"); animation-duration: 34s; animation-direction: alternate-reverse; }

@keyframes mist-drift {
    from { translate: -2% 0; }
    to { translate: 2% 0; }
}

@media (min-width: 900px) {
    .hero {
        background-image: none;
    }

    .hero__scene {
        display: block;
    }
}

.hero__content {
    position: relative;
    padding-top: calc(var(--header-h) + 32px);
    padding-bottom: 110px;
}

/* Logo, tagline and buttons share one centred column, placed left like on the game's login screen. */
.hero__column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(580px, 100%);
    text-align: center;
}

.hero__logo {
    position: relative;
    width: min(560px, 86vw);
    margin: 0;
    line-height: 0;
}

.hero__logo img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.65));
}

/* A light sweep across the logo, masked by its silhouette (login_glint from the game). */
.hero__logo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 38%, rgba(255, 246, 220, 0.85) 50%, transparent 62%) no-repeat;
    background-size: 260% 100%;
    background-position: 160% 0;
    -webkit-mask: url("../img/brand/logo-glint.png") center / 100% 100% no-repeat;
    mask: url("../img/brand/logo-glint.png") center / 100% 100% no-repeat;
    mix-blend-mode: overlay;
    animation: glint 8s ease-in-out 1.5s infinite;
    pointer-events: none;
}

@keyframes glint {
    0% { background-position: 160% 0; }
    28%, 100% { background-position: -60% 0; }
}

.hero__tagline {
    margin: 14px 0 0;
    font-family: var(--font-display);
    font-size: clamp(0.74rem, 1.15vw, 0.92rem);
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #f2e7cb;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.hero__rule {
    display: block;
    width: 180px;
    height: 1px;
    margin: 18px 0;
    background: linear-gradient(90deg, transparent, rgba(240, 213, 149, 0.8), transparent);
}

.hero__intro {
    max-width: 500px;
    margin: 0 0 26px;
    font-size: 1.08rem;
    color: #eee5d0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.hero__actions .btn {
    min-height: 62px;
}

.hero__note {
    margin: 18px 0 0;
    text-align: center;
    font-size: 0.92rem;
    color: #d9cfb8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* Launcher download: gold with an icon and a caption; a dark plate saying "coming soon" until a link is set. */
.download-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 9px 26px 9px 20px;
    border: 1px solid #f7e3b0;
    border-radius: 4px;
    background: linear-gradient(180deg, #f3d692 0%, #d6ab5c 50%, #a97a31 100%);
    box-shadow: inset 0 1px 0 rgba(255, 250, 230, 0.6), 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 26px rgba(214, 171, 92, 0.25);
    text-align: left;
    text-decoration: none;
    color: #23170a;
    transition: box-shadow 0.2s, filter 0.2s, transform 0.2s;
}

.download-button:hover {
    color: #1a1006;
    filter: brightness(1.06);
    box-shadow: inset 0 1px 0 rgba(255, 250, 230, 0.6), 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 36px rgba(240, 205, 130, 0.5);
}

.download-button:active {
    transform: translateY(1px);
}

.download-button__icon {
    flex: none;
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.download-button__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.download-button__text strong {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 240, 205, 0.5);
}

.download-button__text small {
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
}

.download-button.is-unavailable {
    border-color: rgba(212, 176, 106, 0.55);
    background: rgba(10, 12, 14, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 22px rgba(0, 0, 0, 0.35);
    color: #e6dbbd;
    cursor: default;
    backdrop-filter: blur(4px);
}

.download-button.is-unavailable .download-button__text strong {
    text-shadow: none;
}

.download-button.is-unavailable .download-button__text small {
    color: var(--c-gold);
    opacity: 1;
}

.download-button.is-unavailable:hover {
    filter: none;
}

.download-button.is-unavailable:active {
    transform: none;
}

.hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: 40px;
    height: 40px;
    border: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M6 10l8 8 8-8' fill='none' stroke='%23f0d595' stroke-width='2'/%3E%3C/svg%3E") center no-repeat;
    opacity: 0.85;
    cursor: pointer;
    transform: translateX(-50%);
    animation: nudge 2.4s ease-in-out infinite;
}

@keyframes nudge {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 8px; }
}

/* Home page sections */

.home-section {
    position: relative;
    padding: clamp(64px, 9vw, 112px) 0;
}

.home-section--trailer {
    padding-top: clamp(40px, 6vw, 72px);
}

.home-section--races {
    isolation: isolate;
    background: radial-gradient(900px 420px at 50% 0%, rgba(201, 162, 77, 0.08), transparent 70%), #0e0f12;
    border-block: 1px solid var(--c-line-soft);
}

.home-section--races::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("../img/ui/leather.png");
    opacity: 0.18;
}

.home-section--community {
    isolation: isolate;
    overflow: hidden;
}

.home-section--community::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("../img/bg/sanctum.jpg") center 40% / cover no-repeat;
    opacity: 0.35;
    mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
}

/* Trailer */

.trailer {
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: 3px;
    background: #07090b;
    box-shadow: 0 34px 80px -30px rgba(0, 0, 0, 0.95);
}

/* The silver frame from the UI kit, laid over the edges like the framed art on the loading screen. */
.trailer::after {
    content: "";
    position: absolute;
    inset: -16px;
    border: 44px solid transparent;
    border-image: url("../img/ui/frame.png") 96 / 44px stretch;
    pointer-events: none;
}

.trailer iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.trailer__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    text-align: center;
}

.trailer__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: blur(3px) brightness(0.42) saturate(0.85);
    transform: scale(1.06);
}

.trailer__message {
    position: relative;
    max-width: 540px;
    padding: 24px;
}

.trailer__message > img {
    display: block;
    width: 130px;
    height: auto;
    margin: 0 auto 6px;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.7));
}

.trailer__title {
    margin: 2px 0 10px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.3rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-heading);
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.9);
}

.trailer__message p {
    color: #e2d9c4;
}

.trailer__message .btn {
    margin-top: 8px;
}

/* News cards */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 24px;
}

.news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(160, 168, 174, 0.28);
    border-radius: 6px;
    background: var(--c-panel);
    box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.95);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.news-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 176, 106, 0.6);
    box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(212, 176, 106, 0.15);
}

.news-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0c0f11;
}

.news-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(19, 24, 28, 0.85), transparent 45%);
}

.news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.65, 0.25, 1);
}

.news-card:hover .news-card__media img {
    transform: scale(1.05);
}

.news-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 22px 22px;
}

.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 0.84rem;
    color: var(--c-text-dim);
}

.news-card__title {
    margin: 0 0 8px;
    font-size: 1.24rem;
    letter-spacing: 0.02em;
}

.news-card__title a {
    text-decoration: none;
    color: var(--c-heading);
}

/* The whole card is clickable through the title link. */
.news-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.news-card:hover .news-card__title a {
    color: var(--c-gold-bright);
}

.news-card__summary {
    display: -webkit-box;
    margin: 0 0 16px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: #cfc7b5;
}

.news-card__more {
    margin-top: auto;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--c-gold);
}

.news-card__more::after {
    content: " \203A";
}

@media (min-width: 900px) {
    .news-card--featured {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    .news-card--featured .news-card__media {
        flex: 0 0 58%;
        aspect-ratio: auto;
        min-height: 360px;
    }

    .news-card--featured .news-card__media::after {
        background: linear-gradient(270deg, rgba(19, 24, 28, 0.9), transparent 40%);
    }

    .news-card--featured .news-card__body {
        justify-content: center;
        padding: 36px 40px;
    }

    .news-card--featured .news-card__title {
        font-size: 1.8rem;
    }

    .news-card--featured .news-card__summary {
        -webkit-line-clamp: 5;
        font-size: 1.05rem;
    }

    .news-card--featured .news-card__more {
        margin-top: 8px;
    }
}

/* Category badges and status chips */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px 2px;
    border: 1px solid;
    border-radius: 3px;
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge--announcement { color: #f1d79a; border-color: rgba(212, 176, 106, 0.5); background: rgba(212, 176, 106, 0.12); }
.badge--update { color: #b3c9f2; border-color: rgba(169, 193, 238, 0.45); background: rgba(169, 193, 238, 0.1); }
.badge--event { color: #e9b0d9; border-color: rgba(220, 150, 200, 0.45); background: rgba(220, 150, 200, 0.1); }
.badge--maintenance { color: #eeb085; border-color: rgba(230, 150, 100, 0.45); background: rgba(230, 150, 100, 0.1); }
.badge--community { color: #a9dba5; border-color: rgba(143, 191, 106, 0.45); background: rgba(143, 191, 106, 0.1); }
.badge--pinned { color: #22170a; border-color: #f3dca6; background: linear-gradient(180deg, #f0cf88, #c99a4c); }

.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 34px;
}

.chip {
    padding: 7px 16px;
    border: 1px solid rgba(160, 168, 174, 0.35);
    border-radius: 999px;
    background: rgba(20, 25, 29, 0.75);
    font-family: var(--font-display);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--c-text-dim);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.chip:hover {
    border-color: rgba(212, 176, 106, 0.65);
    color: var(--c-text);
}

.chip.is-active {
    border-color: #f2dba4;
    background: linear-gradient(180deg, #efcf8b, #c99c50);
    color: #1d150a;
}

/* Inner page banner */

.page-banner {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 clamp(44px, 6vw, 76px);
    text-align: center;
}

.page-banner__art {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.page-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at center, rgba(11, 12, 14, 0.15), rgba(11, 12, 14, 0.6) 75%),
        linear-gradient(180deg, rgba(11, 12, 14, 0.5) 0%, rgba(11, 12, 14, 0.2) 45%, var(--c-bg) 100%);
}

.page-banner h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5.4vw, 3.8rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

.page-banner__lead {
    max-width: 640px;
    margin: 18px auto 0;
    font-size: 1.08rem;
    color: #e2d9c4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.page-section {
    padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 8vw, 96px);
}

.page-section--narrow {
    width: min(760px, calc(100% - 2 * var(--gutter)));
}

/* Pages without a banner start below the fixed header. */
.page-section--top {
    padding-top: calc(var(--header-h) + clamp(48px, 7vw, 88px));
}

.page-loading {
    display: grid;
    place-items: center;
    min-height: 70vh;
    padding-top: var(--header-h);
}

.news-card--static:hover {
    transform: none;
}

/* News page: the feed's short list and patch notes */

.news-block {
    margin-top: clamp(48px, 6vw, 80px);
}

.dispatches {
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--c-line-soft);
}

.dispatch {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--c-line-soft);
}

.dispatch__date {
    flex: 0 0 74px;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-gold);
}

.dispatch__title {
    color: var(--c-heading);
    text-decoration: none;
}

a.dispatch__title:hover {
    color: var(--c-gold-bright);
    text-decoration: underline;
}

.patch-notes {
    display: grid;
    gap: 24px;
    max-width: 880px;
    margin: 0 auto;
}

.patch-note__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.86rem;
    color: var(--c-text-dim);
}

.patch-note__title {
    margin: 0 0 12px;
    font-size: 1.3rem;
    letter-spacing: 0.03em;
}

.patch-note__items {
    margin: 0;
    padding-left: 1.2em;
}

.patch-note__items li + li {
    margin-top: 0.4em;
}

/* Download page */

.download-page__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: clamp(36px, 5vw, 56px);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    display: flex;
    gap: 16px;
    padding: 24px 22px;
    border: 1px solid rgba(160, 168, 174, 0.28);
    border-radius: 6px;
    background: var(--c-panel);
}

.step__number {
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(212, 176, 106, 0.6);
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--c-gold-bright);
}

.step__title {
    margin: 4px 0 8px;
    font-size: 1.12rem;
    letter-spacing: 0.04em;
}

.step p {
    margin: 0;
    color: #cfc7b5;
}

/* Races and classes */

.races {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Narrower screens: one race per row, its three classes side by side. */
@media (max-width: 1100px) {
    .races {
        grid-template-columns: 1fr;
    }

    .race__classes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .class-entry {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .race__classes {
        grid-template-columns: 1fr;
    }

    .class-entry {
        flex-direction: row;
        text-align: left;
    }
}

.race__header {
    padding: 26px 26px 6px;
    text-align: center;
}

.race__header h3 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.race__header p {
    margin: 8px 0 0;
    font-size: 0.98rem;
    color: var(--c-text-dim);
}

.race__classes {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 16px 22px 26px;
    list-style: none;
}

.class-entry {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(160, 168, 174, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
    transition: border-color 0.2s, background-color 0.2s;
}

.class-entry:hover {
    border-color: rgba(212, 176, 106, 0.45);
    background: rgba(212, 176, 106, 0.06);
}

/* Class portraits in the game's gold ring. */
.class-entry__emblem {
    position: relative;
    flex: 0 0 66px;
    height: 66px;
}

.class-entry__emblem img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.class-entry__emblem::after {
    content: "";
    position: absolute;
    inset: -6px;
    background: url("../img/ui/ring.png") center / contain no-repeat;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.class-entry__text {
    display: flex;
    flex-direction: column;
}

.class-entry__text strong {
    font-family: var(--font-display);
    font-size: 1.06rem;
    letter-spacing: 0.08em;
    color: #f0e2bd;
}

.class-entry__text span {
    font-size: 0.92rem;
    color: var(--c-text-dim);
}

/* Concept art: home page strip, gallery grid and lightbox */

.art-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.art-strip__item {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--c-line);
    border-radius: 4px;
}

.art-strip__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.art-strip__item:hover img {
    transform: scale(1.06);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
    gap: 26px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery-tile {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 3px;
    background: #0c0f11;
    cursor: zoom-in;
    box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.95);
}

/* Slim silver frame from the UI kit. */
.gallery-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 18px solid transparent;
    border-image: url("../img/ui/frame-slim.png") 44 / 18px stretch;
    pointer-events: none;
}

.gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.65, 0.25, 1), filter 0.4s;
}

.gallery-tile:hover img {
    transform: scale(1.05);
    filter: brightness(1.08);
}

.gallery-tile__caption {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 40px 22px 20px;
    background: linear-gradient(transparent, rgba(6, 7, 9, 0.92));
    text-align: left;
}

.gallery-tile__title {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: var(--c-heading);
}

.gallery-tile__category {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-gold);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px 76px;
}

.lightbox:focus {
    outline: none;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: rgba(4, 5, 7, 0.93);
    backdrop-filter: blur(6px);
    cursor: zoom-out;
}

.lightbox__figure {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: min(1500px, 100%);
    max-height: 100%;
    margin: 0;
}

.lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
    border: 1px solid var(--c-line);
    background: #0a0c0e;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
}

.lightbox__caption {
    max-width: 760px;
    text-align: center;
}

.lightbox__caption .eyebrow {
    margin-bottom: 4px;
}

.lightbox__caption h2 {
    margin: 0;
    font-size: 1.4rem;
}

.lightbox__description {
    margin: 6px 0 0;
    color: var(--c-text-dim);
}

.lightbox__footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 8px 0 0;
    font-size: 0.86rem;
    color: var(--c-text-faint);
}

.lightbox__nav,
.lightbox__close {
    position: absolute;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(214, 207, 190, 0.4);
    border-radius: 50%;
    background: rgba(14, 17, 20, 0.85) center no-repeat;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.lightbox__nav:hover,
.lightbox__close:hover {
    border-color: var(--c-gold);
    background-color: rgba(40, 34, 22, 0.9);
}

.lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M13.5 4l-7 7 7 7' fill='none' stroke='%23f0d595' stroke-width='2'/%3E%3C/svg%3E");
}

.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; scale: -1 1; }

.lightbox__close {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M3 3l12 12M15 3L3 15' stroke='%23f0d595' stroke-width='2'/%3E%3C/svg%3E");
}

/* Community */

.community {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 22px;
    max-width: 1000px;
    margin: 0 auto 30px;
}

.community-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 20px;
    align-items: center;
    overflow: hidden;
    padding: 26px 28px;
    border: 1px solid var(--c-line);
    border-radius: 6px;
    background: var(--c-panel);
    text-decoration: none;
    color: var(--c-text);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.community-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(420px 200px at 0% 50%, var(--glow), transparent 70%);
    opacity: 0.35;
    pointer-events: none;
}

.community-card--discord { --glow: #5865f2; }
.community-card--youtube { --glow: #ff2a1f; }

.community-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 176, 106, 0.6);
    box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.95);
    color: var(--c-text);
}

.community-card .social-icon {
    position: relative;
    grid-row: 1 / 3;
    width: 50px;
    height: 50px;
}

.community-card--discord .social-icon { fill: #8f9bff; }
.community-card--youtube .social-icon { fill: #ff5a50; }

.community-card__text {
    position: relative;
}

.community-card__text strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.08em;
    color: var(--c-heading);
}

.community-card__text span {
    color: var(--c-text-dim);
}

.community-card__cta {
    position: relative;
    grid-column: 2;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-gold);
}

.community-card__cta::after {
    content: " \203A";
}

.home-section--community .social-links--named {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
}

.home-section--community .social-links--named .social-link {
    padding: 8px 16px;
    border: 1px solid rgba(214, 207, 190, 0.28);
    border-radius: 999px;
    background: rgba(10, 12, 14, 0.5);
}

/* Shared states */

.empty-state {
    max-width: 560px;
    margin: 0 auto;
    padding: 44px 20px;
    text-align: center;
}

.empty-state img {
    display: block;
    width: 120px;
    height: auto;
    margin: 0 auto 10px;
    opacity: 0.85;
}

.empty-state h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
    letter-spacing: 0.06em;
}

.empty-state p {
    margin: 0;
    color: var(--c-text-dim);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 0;
    font-size: 0.92rem;
    color: var(--c-text-dim);
}

.loading__ring {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(212, 176, 106, 0.18);
    border-top-color: var(--c-gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading screen shown while the app downloads (see index.html), after the game's own. */

.boot {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--c-bg);
}

.boot__art {
    position: absolute;
    inset: -60px;
    background: url("../img/art/keyart-4-small.jpg") center / cover no-repeat;
    filter: blur(28px) brightness(0.38) saturate(0.9);
}

.boot__panel {
    position: relative;
    width: min(420px, 86vw);
    text-align: center;
}

.boot__logo {
    width: min(320px, 72vw);
    height: auto;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.7));
}

.boot__eyebrow {
    margin: 16px 0 14px;
    font-family: var(--font-display);
    font-size: 0.76rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #efe4c8;
}

.boot__bar {
    position: relative;
    height: 14px;
    overflow: hidden;
    border: 1px solid #727a80;
    border-radius: 3px;
    background: #0c0f11;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.boot__bar span {
    position: absolute;
    inset: 2px auto 2px 2px;
    width: max(0px, calc(var(--blazor-load-percentage, 0%) - 4px));
    border-radius: 2px;
    background: linear-gradient(180deg, #a6cc72, #5f8f34);
    transition: width 0.2s;
}

.boot__text {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: #d7cfbb;
}

.noscript {
    position: fixed;
    inset: auto 16px 16px;
    margin: 0;
    padding: 14px 18px;
    border: 1px solid #a5574c;
    border-radius: 6px;
    background: #3a1d1a;
    color: #f7dcd6;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 16px 16px;
    z-index: 1000;
    padding: 14px 52px 14px 18px;
    border: 1px solid #a5574c;
    border-radius: 6px;
    background: #3a1d1a;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
    color: #f7dcd6;
}

#blazor-error-ui .reload {
    margin-left: 8px;
    color: #fff;
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: none;
    font-size: 1.05rem;
    color: inherit;
    cursor: pointer;
}

.blazor-error-boundary {
    padding: 1rem 1.25rem;
    border: 1px solid #a5574c;
    border-radius: 6px;
    background: #3a1d1a;
    color: #f7dcd6;
}

.blazor-error-boundary::after {
    content: "Something went wrong while showing this part of the page.";
}

/* Cookie notice (bottom of every page until answered) and the cookies page */

.cookie-notice {
    --corner: 28px;
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 90;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px 22px;
    align-items: center;
    width: min(1000px, calc(100% - 24px));
    padding: 18px 26px;
    transform: translateX(-50%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 24px 70px rgba(0, 0, 0, 0.85);
    animation: notice-in 0.45s ease-out both;
}

@keyframes notice-in {
    from { opacity: 0; translate: 0 18px; }
    to { opacity: 1; translate: 0 0; }
}

.cookie-notice__crest {
    width: 72px;
    height: auto;
}

.cookie-notice__title {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-heading);
}

.cookie-notice__text p {
    margin: 0;
    font-size: 0.95rem;
    color: #ddd4c0;
}

/* "Allow all cookies" above "Allow essential cookies only", both the same width. */
.cookie-notice__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.cookie-notice__actions .btn {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .cookie-notice {
        grid-template-columns: minmax(0, 1fr);
        bottom: 0;
        width: 100%;
        padding: 16px 18px 18px;
        border-radius: 8px 8px 0 0;
    }

    .cookie-notice__crest {
        display: none;
    }

    .cookie-notice__actions .btn {
        white-space: normal;
    }
}

.cookie-page {
    display: grid;
    gap: 24px;
    max-width: 900px;
}

.cookie-page h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}

.cookie-page h3:not(:first-child) {
    margin-top: 20px;
}

.cookie-page p {
    margin: 0 0 12px;
}

.cookie-list {
    display: grid;
    gap: 14px;
    margin: 0 0 16px;
}

.cookie-item {
    padding: 14px 16px;
    border: 1px solid var(--c-line-soft);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
}

.cookie-item dt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.cookie-item dd {
    margin: 0;
    color: #d9d0bc;
}

.cookie-item dd.cookie-item__meta {
    margin-top: 6px;
    font-size: 0.88rem;
    color: var(--c-text-dim);
}

.site-footer__legal a {
    text-decoration: none;
    color: var(--c-text-dim);
}

.site-footer__legal a:hover {
    color: #fff;
}

/* Click-to-play YouTube videos (VideoPlayer): the trailer and the gameplay cards */

.video {
    position: relative;
    container-type: inline-size;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--c-line);
    border-radius: 4px;
    background: #07090b;
    box-shadow: 0 22px 50px -28px rgba(0, 0, 0, 0.9);
}

/* The trailer fills its framed slot. */
.video--large {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    border: 0;
    border-radius: 3px;
    box-shadow: none;
}

.video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video__poster {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

/* YouTube's hq/sd stills are 4:3 with black bars; cover crops them back to the 16:9 picture. */
.video__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) saturate(0.95);
    transition: transform 0.6s, filter 0.3s;
}

.video__poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(5, 6, 8, 0.7));
    pointer-events: none;
}

.video__poster:hover img,
.video__poster:focus-visible img {
    transform: scale(1.04);
    filter: none;
}

.video__poster:focus-visible {
    outline: 2px solid var(--c-gold-bright);
    outline-offset: -4px;
}

.video__play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 64px;
    height: 64px;
    border: 2px solid rgba(240, 213, 149, 0.85);
    border-radius: 50%;
    background: rgba(8, 10, 12, 0.62);
    box-shadow: 0 0 0 6px rgba(212, 176, 106, 0.14), 0 10px 30px rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%);
    transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
}

.video__play::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent var(--c-gold-bright);
    transform: translate(-36%, -50%);
}

.video__poster:hover .video__play,
.video__poster:focus-visible .video__play {
    background: rgba(120, 88, 34, 0.75);
    box-shadow: 0 0 0 8px rgba(240, 213, 149, 0.22), 0 10px 30px rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.07);
}

.video--large .video__play {
    width: 96px;
    height: 96px;
}

.video--large .video__play::before {
    border-width: 16px 0 16px 26px;
}

.video__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(30px, 6%, 56px);
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(1rem, 2.6vw, 1.7rem);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-align: center;
    text-transform: uppercase;
    color: var(--c-heading);
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.95);
}

/* Shown on a click while YouTube videos are still off. */
.video__consent {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: auto;
    padding: 14px 16px;
    text-align: center;
    background: rgba(7, 9, 11, 0.86);
    backdrop-filter: blur(6px);
}

.video__consent p {
    margin: 0;
}

.video__consent-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--c-gold-bright);
}

.video__consent-text {
    font-size: 0.86rem;
    color: var(--c-text-dim);
}

.video__consent-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.video--large .video__consent {
    gap: 12px;
}

.video--large .video__consent-title {
    font-size: clamp(1.1rem, 3vw, 1.8rem);
}

.video--large .video__consent-text {
    font-size: 1rem;
}

.video__close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: 0;
    background: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--c-text-dim);
    cursor: pointer;
}

.video--large .video__close {
    top: 30px;
    right: 34px;
}

.video__close:hover {
    color: var(--c-heading);
}

/* The trailer on phones: clear of the silver frame, and compact like the cards. */
@container (max-width: 600px) {
    .video--large .video__consent {
        gap: 6px;
        padding: 22px 30px;
    }

    .video--large .video__consent-title {
        font-size: 1rem;
    }

    .video--large .video__consent-text {
        font-size: 0.86rem;
    }

    .video--large .video__close {
        top: 18px;
        right: 20px;
        width: 28px;
        height: 28px;
        font-size: 1.3rem;
    }

    .video--large .video__consent-actions .btn {
        min-height: 34px;
        padding: 0.4em 0.95em;
        font-size: 0.7rem;
    }

    .video--large .video__play {
        width: 64px;
        height: 64px;
    }

    .video--large .video__play::before {
        border-width: 11px 0 11px 18px;
    }

    .video--large .video__label {
        bottom: 24px;
        font-size: 0.9rem;
    }
}

@container (max-width: 380px) {
    .video__play {
        width: 54px;
        height: 54px;
    }

    .video__consent {
        gap: 5px;
    }

    .video__consent-actions .btn {
        min-height: 30px;
        padding: 0.3em 0.75em;
        font-size: 0.64rem;
    }
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 30px 26px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.video-card__caption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.video-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--c-heading);
}

.video-card__link {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--c-text-dim);
    text-decoration: none;
}

.video-card__link .social-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.video-card__link:hover {
    color: var(--c-heading);
}

.home-section--gameplay {
    padding-top: clamp(24px, 4vw, 48px);
}

/* Small screens */

@media (max-width: 960px) {
    .site-header__toggle {
        display: inline-flex;
    }

    .site-header__menu {
        position: fixed;
        inset: var(--header-h) 0 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 24px;
        overflow-y: auto;
        padding: 18px var(--gutter) 32px;
        background: rgba(9, 11, 13, 0.98);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    }

    .site-header.is-open .site-header__menu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .site-nav {
        flex-direction: column;
    }

    .site-nav a {
        padding: 15px 4px;
        border-bottom: 1px solid rgba(160, 168, 174, 0.12);
        font-size: 1rem;
    }

    .site-nav a.active::after {
        left: auto;
        right: 8px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%) rotate(45deg);
    }

    .site-header__actions {
        flex-wrap: wrap;
    }

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

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

@media (max-width: 899px) {
    .hero__column {
        margin-inline: auto;
    }
}

@media (max-width: 600px) {
    :root {
        --header-h: 66px;
    }

    body {
        font-size: 16px;
    }

    .site-header__brand img {
        height: 42px;
    }

    .panel__header {
        padding-inline: 40px;
    }

    .panel__body {
        padding: 20px 18px 22px;
    }

    .lightbox {
        padding: 64px 12px 24px;
    }

    .lightbox__nav {
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .trailer::after {
        inset: -10px;
        border-width: 30px;
        border-image-width: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
