:root {
    --bg: #050505;
    --panel: #10100d;
    --panel-soft: #18150d;
    --text: #fff8d6;
    --muted: #e6dca4;
    --brand: #ffd76a;
    --brand-2: #ffb347;
    --line: rgba(255, 225, 130, 0.2);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(115deg, rgba(255, 211, 96, 0.16), transparent 30%),
        linear-gradient(135deg, #020202 0%, #080704 42%, #231404 100%);
    background-size: 160% 160%;
    color: var(--text);
    overflow-x: hidden;
    animation: backgroundFlow 16s var(--ease) infinite alternate;
}

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

::selection {
    background: rgba(255, 215, 106, 0.32);
    color: var(--text);
}

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

.site-header-inner,
.site-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(5, 5, 5, 0.92), rgba(5, 5, 5, 0.74));
    backdrop-filter: blur(16px);
    transition: border-color 260ms ease, background 260ms ease, box-shadow 260ms ease;
}

.site-header-inner {
    min-height: 84px;
    padding: 0 14px 0 6px;
    border: 1px solid rgba(255, 225, 130, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 215, 106, 0.07), transparent 34%),
        rgba(0, 0, 0, 0.24);
}

.site-header.is-scrolled {
    border-color: var(--line);
    background: rgba(5, 5, 5, 0.88);
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.24);
}

.brand img {
    width: 236px;
    max-height: 86px;
    object-fit: contain;
    filter: drop-shadow(0 18px 24px rgba(255, 179, 71, 0.16));
    transition: transform 380ms var(--ease), filter 380ms ease;
}

.brand:hover img {
    transform: translateY(-2px) scale(1.025);
    filter: drop-shadow(0 22px 34px rgba(255, 179, 71, 0.24));
}

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

.nav,
.footer-links,
.nav-links,
.nav-account {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav {
    gap: 14px;
    justify-content: flex-end;
}

.nav-links,
.nav-account {
    min-height: 50px;
    padding: 6px;
    border: 1px solid rgba(255, 225, 130, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav a,
.user-pill {
    min-height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1;
    position: relative;
    transition: color 220ms ease, background 220ms ease, transform 220ms var(--ease), box-shadow 220ms ease;
}

.nav a.active,
.nav a:hover,
.user-pill {
    color: #050505;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 26px rgba(255, 179, 71, 0.18);
    transform: translateY(-1px);
}

.nav .nav-button {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #050505;
    min-width: 104px;
}

.nav .secondary-action {
    border: 1px solid transparent;
}

.nav .secondary-action:hover,
.nav .secondary-action.active {
    border-color: rgba(255, 225, 130, 0.22);
}

main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 32px;
    padding: 64px 0;
    position: relative;
}

.hero-content h1,
.page-title h1,
.form-card h1 {
    margin: 0;
    font-size: 76px;
    line-height: 0.95;
    text-wrap: balance;
    text-shadow: 0 22px 60px rgba(255, 179, 71, 0.14);
}

.hero-content p,
.page-title p,
.form-card p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.eyebrow {
    color: var(--brand-2);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 240ms var(--ease), box-shadow 240ms ease, border-color 240ms ease, background 240ms ease;
}

.button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.22) 45%, transparent 75%);
    transform: translateX(-120%);
    transition: transform 680ms var(--ease);
}

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

.button:hover::after {
    transform: translateX(120%);
}

.button.primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #050505;
    box-shadow: 0 16px 34px rgba(255, 179, 71, 0.18);
}

.button.secondary {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 215, 106, 0.08);
}

.button.secondary:hover {
    border-color: rgba(255, 215, 106, 0.48);
    background: rgba(255, 215, 106, 0.13);
}

.button.full {
    width: 100%;
}

.status-panel,
.quick-card,
.form-card,
.download-card {
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.status-panel {
    display: grid;
    gap: 1px;
    overflow: hidden;
    transform: translateZ(0);
}

.status-panel div {
    padding: 28px;
    background: rgba(255, 255, 255, 0.03);
    transition: background 260ms ease;
}

.status-panel div:hover {
    background: rgba(255, 215, 106, 0.08);
}

.status-panel span,
.quick-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.status-panel strong {
    font-size: 52px;
    color: var(--brand);
    text-shadow: 0 18px 42px rgba(255, 179, 71, 0.2);
}

.quick-grid,
.download-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 72px;
}

.download-grid-single {
    grid-template-columns: minmax(280px, 420px);
    justify-content: center;
}

.quick-card,
.download-card {
    padding: 24px;
    transition: transform 280ms var(--ease), border-color 280ms ease, box-shadow 280ms ease, background 280ms ease;
}

.quick-card:hover,
.download-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 215, 106, 0.48);
    background:
        linear-gradient(135deg, rgba(255, 215, 106, 0.09), rgba(255, 179, 71, 0.05)),
        linear-gradient(180deg, var(--panel), var(--panel-soft));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
}

.quick-card strong,
.download-card h2 {
    font-size: 24px;
    transition: color 220ms ease;
}

.quick-card:hover strong,
.download-card:hover h2 {
    color: var(--brand);
}

.quick-card p,
.download-card p {
    color: var(--muted);
    line-height: 1.5;
}

.discord-section {
    padding: 0 0 78px;
}

.section-heading {
    text-align: center;
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 0;
    font-size: 44px;
    line-height: 1.05;
}

.discord-cta {
    width: min(760px, 100%);
    min-height: 128px;
    margin: 0 auto;
    padding: 22px;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 215, 106, 0.32);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 215, 106, 0.16), rgba(255, 179, 71, 0.08)),
        linear-gradient(180deg, var(--panel), var(--panel-soft));
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    transition: transform 300ms var(--ease), border-color 300ms ease, box-shadow 300ms ease, background 300ms ease;
}

.discord-cta:hover {
    border-color: rgba(255, 215, 106, 0.68);
    transform: translateY(-5px);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

.discord-cta img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    transition: transform 360ms var(--ease), filter 360ms ease;
}

.discord-cta:hover img {
    transform: scale(1.06) rotate(-2deg);
    filter: drop-shadow(0 18px 24px rgba(255, 179, 71, 0.22));
}

.discord-cta-text strong {
    display: block;
    color: var(--text);
    font-size: 24px;
    margin-bottom: 6px;
}

.discord-cta-text span {
    color: var(--muted);
    line-height: 1.5;
}

.discord-cta-action {
    min-width: 96px;
    min-height: 42px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #050505;
    font-weight: 800;
    transition: transform 240ms var(--ease);
}

.discord-cta:hover .discord-cta-action {
    transform: translateX(2px);
}

.form-section {
    min-height: 640px;
    display: grid;
    place-items: center;
    padding: 48px 0 80px;
}

.form-card {
    width: min(100%, 520px);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.form-card h1 {
    font-size: 44px;
}

label {
    display: block;
    margin: 16px 0 7px;
    color: var(--muted);
    font-weight: 700;
}

input,
select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #070707;
    color: var(--text);
    padding: 0 12px;
    font: inherit;
    transition: border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

input:focus,
select:focus {
    border-color: rgba(255, 215, 106, 0.64);
    background: #0b0a07;
    box-shadow: 0 0 0 4px rgba(255, 215, 106, 0.09);
    outline: none;
}

.message {
    min-height: 24px;
    margin: 16px 0;
    font-weight: 700;
    transition: color 220ms ease, opacity 220ms ease;
}

.message.success {
    color: #b8ff9b;
}

.message.error {
    color: #ff9f8a;
}

.form-foot {
    text-align: center;
}

.form-foot a {
    color: var(--brand-2);
    font-weight: 800;
}

.page-title {
    text-align: center;
    padding: 80px 0 42px;
}

.download-card {
    text-align: center;
}

.download-card img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    transition: transform 280ms var(--ease), filter 280ms ease;
}

.download-card:hover img {
    transform: translateY(-4px) scale(1.04);
    filter: drop-shadow(0 18px 28px rgba(255, 179, 71, 0.2));
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 24px 0 32px;
    color: var(--muted);
}

.site-footer strong {
    color: var(--text);
    display: block;
}

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

.reveal {
    opacity: 0;
    transform: translateY(24px);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 720ms var(--ease), transform 720ms var(--ease);
}

.hero .reveal:nth-child(2),
.quick-grid .reveal:nth-child(2) {
    transition-delay: 90ms;
}

.quick-grid .reveal:nth-child(3) {
    transition-delay: 180ms;
}

@keyframes backgroundFlow {
    from {
        background-position: 0% 20%;
    }

    to {
        background-position: 100% 80%;
    }
}

@media (max-width: 820px) {
    .site-header-inner,
    .site-footer,
    .hero {
        align-items: stretch;
        flex-direction: column;
    }

    .site-header-inner {
        gap: 14px;
        padding: 12px;
    }

    .brand {
        justify-content: center;
        width: 100%;
    }

    .nav,
    .nav-links,
    .nav-account {
        width: 100%;
    }

    .nav {
        align-items: stretch;
    }

    .nav-links,
    .nav-account {
        justify-content: space-between;
    }

    .nav a,
    .user-pill {
        flex: 1 1 auto;
    }

    .hero,
    .quick-grid,
    .download-grid {
        grid-template-columns: 1fr;
    }

    .discord-cta {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .discord-cta img {
        width: 72px;
        height: 72px;
    }

    .discord-cta-action {
        grid-column: 1 / -1;
        width: 100%;
    }

    .hero {
        min-height: auto;
        padding-top: 36px;
    }

    .hero-content h1,
    .page-title h1 {
        font-size: 48px;
    }

    .form-card h1,
    .section-heading h2 {
        font-size: 34px;
    }

    .brand img {
        width: 220px;
        max-height: 82px;
    }
}

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

    .reveal {
        opacity: 1;
        transform: none;
    }
}
