:root {
    color-scheme: dark;
    --bg: #030303;
    --ink: #f2eee8;
    --muted: #a49d94;
    --soft: rgba(242, 238, 232, 0.68);
    --red: #e10600;
    --red-2: #ff2c20;
    --bone: #f4efe4;
    --steel: #101112;
    --line: rgba(244, 239, 228, 0.14);
    --glass: rgba(10, 10, 10, 0.62);
    --green: #8cffbf;
    --font-ui: "Inter", Arial, sans-serif;
    --font-display: "Rajdhani", "Inter", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-ui);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 22%, rgba(225, 6, 0, 0.25), transparent 24%),
        radial-gradient(circle at 76% 14%, rgba(244, 239, 228, 0.12), transparent 20%),
        linear-gradient(115deg, rgba(0, 0, 0, 0.2), rgba(225, 6, 0, 0.1), rgba(0, 0, 0, 0.7));
    mix-blend-mode: screen;
    opacity: 0.7;
    z-index: -3;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

#voidCanvas,
.noise,
.scanline,
.blood-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

#voidCanvas {
    z-index: -4;
    background:
        linear-gradient(rgba(3, 3, 3, 0.36), rgba(3, 3, 3, 0.92)),
        url("/static/assets/dayz-donation-hero.png") center / cover;
}

.noise {
    z-index: 20;
    opacity: 0.12;
    background-image:
        repeating-radial-gradient(circle at 17% 22%, rgba(255,255,255,0.24) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 7px);
    mix-blend-mode: overlay;
}

.scanline {
    z-index: 21;
    opacity: 0.14;
    background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(255,255,255,0.18) 8px);
}

.blood-grid {
    z-index: -2;
    opacity: 0.3;
    background-image:
        linear-gradient(rgba(225, 6, 0, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 239, 228, 0.08) 1px, transparent 1px);
    background-size: 82px 82px;
    mask-image: radial-gradient(circle at center, black, transparent 72%);
    animation: grid-drift 16s linear infinite;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 18px 34px;
    border-bottom: 1px solid rgba(244, 239, 228, 0.08);
    background: linear-gradient(180deg, rgba(0,0,0,0.86), rgba(0,0,0,0.22));
    backdrop-filter: blur(18px);
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-lockup img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    mix-blend-mode: screen;
}

.topbar nav {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.topbar nav a,
.audio-toggle,
.ghost-link,
.primary-link,
.donate-button,
.modal-close {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(10, 10, 10, 0.62);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
}

.topbar nav a,
.audio-toggle {
    min-height: 38px;
    padding: 9px 13px;
    color: var(--soft);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.audio-toggle {
    justify-self: end;
}

.audio-toggle[aria-pressed="true"] {
    border-color: rgba(225, 6, 0, 0.8);
    color: var(--red-2);
    box-shadow: 0 0 24px rgba(225, 6, 0, 0.22);
}

main {
    position: relative;
    z-index: 1;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 34px;
    padding: 118px 6vw 72px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 88px 4vw 42px;
    border: 1px solid rgba(244, 239, 228, 0.12);
    clip-path: polygon(0 0, 90% 0, 100% 13%, 100% 100%, 9% 100%, 0 88%);
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(225,6,0,0.09), rgba(0,0,0,0.2));
    box-shadow: inset 0 0 80px rgba(225,6,0,0.08);
    z-index: -1;
}

.hero-art {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 540px;
}

.hero-logo {
    width: min(520px, 86vw);
    filter: drop-shadow(0 0 38px rgba(225, 6, 0, 0.46));
    mix-blend-mode: screen;
    transform: translateY(26px) scale(0.92);
    opacity: 0;
    animation: logo-arrive 1200ms cubic-bezier(.2,.9,.1,1) forwards;
}

.logo-orbit {
    position: absolute;
    width: min(620px, 92vw);
    aspect-ratio: 1;
    border: 1px solid rgba(225, 6, 0, 0.38);
    border-radius: 50%;
    animation: spin 18s linear infinite;
}

.logo-orbit::before,
.logo-orbit::after,
.logo-orbit span {
    content: "";
    position: absolute;
    inset: 7%;
    border: 1px dashed rgba(244, 239, 228, 0.18);
    border-radius: 50%;
}

.logo-orbit::after {
    inset: 18%;
    border-color: rgba(225, 6, 0, 0.22);
    animation: spin 10s linear reverse infinite;
}

.logo-orbit span:nth-child(1) {
    inset: 2%;
    border-left-color: var(--red);
}

.logo-orbit span:nth-child(2) {
    inset: 30%;
    border-top-color: var(--bone);
}

.logo-orbit span:nth-child(3) {
    inset: 42%;
    border-right-color: var(--red);
}

.hero-copy {
    max-width: 760px;
    transform: translateY(22px);
    opacity: 0;
    animation: copy-arrive 900ms ease 280ms forwards;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--red-2);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0;
}

h1 {
    max-width: 760px;
    font-size: clamp(68px, 11vw, 152px);
    text-transform: uppercase;
}

h2 {
    font-size: clamp(38px, 5vw, 72px);
}

h3 {
    font-size: 23px;
}

.glitch {
    position: relative;
    text-shadow: 0 0 34px rgba(225, 6, 0, 0.42);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.55;
}

.glitch::before {
    color: var(--red);
    transform: translate(3px, 0);
    clip-path: inset(0 0 55% 0);
    animation: glitch-a 2200ms infinite;
}

.glitch::after {
    color: var(--bone);
    transform: translate(-3px, 0);
    clip-path: inset(55% 0 0 0);
    animation: glitch-b 2600ms infinite;
}

.lead {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--soft);
    font-size: 19px;
    line-height: 1.65;
}

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

.primary-link,
.ghost-link,
.donate-button {
    min-height: 54px;
    display: inline-grid;
    place-items: center;
    padding: 0 20px;
    font-weight: 900;
    text-transform: uppercase;
}

.primary-link,
.donate-button {
    border-color: rgba(225, 6, 0, 0.78);
    background: linear-gradient(135deg, #f7efe4 0%, #e10600 34%, #740400 100%);
    color: #090909;
    box-shadow: 0 0 30px rgba(225, 6, 0, 0.28);
}

.primary-link:hover,
.donate-button:hover,
.ghost-link:hover,
.topbar nav a:hover {
    transform: translateY(-1px);
    border-color: var(--red-2);
}

.hero-hud {
    position: absolute;
    left: 6vw;
    right: 6vw;
    bottom: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hero-hud div,
.mission-grid article,
.story-module,
.support-panel,
.terms-strip article {
    border: 1px solid var(--line);
    background: rgba(8, 8, 8, 0.72);
    backdrop-filter: blur(16px);
}

.hero-hud div {
    min-height: 82px;
    padding: 16px;
    clip-path: polygon(0 0, 95% 0, 100% 18%, 100% 100%, 0 100%);
}

.hero-hud span {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
}

.hero-hud p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.mission-band,
.terms-section {
    padding: 92px 6vw;
    background: linear-gradient(180deg, rgba(5,5,5,0.25), rgba(5,5,5,0.9));
}

.mission-copy {
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1fr);
    gap: 28px;
    align-items: end;
}

.mission-copy p {
    margin: 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.7;
}

.mission-grid,
.terms-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.mission-grid article,
.terms-strip article {
    min-height: 160px;
    padding: 22px;
    border-radius: 6px;
}

.mission-grid strong,
.terms-strip strong {
    display: block;
    font-family: var(--font-display);
    font-size: 27px;
    line-height: 1;
    text-transform: uppercase;
}

.mission-grid span,
.terms-strip span {
    display: block;
    margin-top: 16px;
    color: var(--muted);
    line-height: 1.55;
}

.support-zone {
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(420px, 1fr);
    gap: 22px;
    padding: 96px 6vw;
    background:
        linear-gradient(90deg, rgba(225, 6, 0, 0.18), transparent 42%),
        rgba(0, 0, 0, 0.72);
}

.story-module,
.support-panel {
    border-radius: 8px;
    padding: 28px;
}

.story-module {
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story-module p {
    margin: 24px 0 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.7;
}

.story-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 34px;
}

.story-points span {
    min-height: 86px;
    display: grid;
    align-items: end;
    border: 1px solid rgba(244, 239, 228, 0.13);
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(225, 6, 0, 0.24), rgba(255,255,255,0.035)),
        repeating-linear-gradient(0deg, transparent 0 7px, rgba(255,255,255,0.035) 8px);
    padding: 15px;
    color: var(--bone);
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.panel-heading p:not(.eyebrow) {
    color: var(--soft);
    line-height: 1.6;
}

.tier-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0;
}

.tier-button {
    min-height: 94px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    color: var(--ink);
    padding: 15px;
    cursor: pointer;
}

.tier-button:hover,
.tier-button.is-active {
    border-color: var(--red-2);
    background: rgba(225, 6, 0, 0.17);
    box-shadow: inset 0 0 28px rgba(225, 6, 0, 0.12);
}

.tier-button strong {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1;
}

.tier-button span {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: 13px;
}

.donation-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.donation-form label {
    display: grid;
    gap: 7px;
}

.donation-form label span {
    color: var(--soft);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.donation-form label:nth-child(3),
.donation-form label:nth-child(4),
.preview,
.terms-check,
.donate-button,
.form-note {
    grid-column: 1 / -1;
}

input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(2,2,2,0.76);
    color: var(--ink);
    padding: 0 13px;
    outline: none;
}

input:focus {
    border-color: var(--red-2);
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.18);
}

.amount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(2,2,2,0.76);
}

.amount-row input {
    border: 0;
    border-radius: 0;
}

.amount-row strong {
    display: grid;
    place-items: center;
    border-left: 1px solid var(--line);
    color: var(--red-2);
}

.preview {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(244, 239, 228, 0.14);
    border-radius: 6px;
    padding: 14px;
    background: linear-gradient(90deg, rgba(225, 6, 0, 0.13), rgba(255,255,255,0.04));
    color: var(--soft);
}

.preview strong {
    color: var(--bone);
}

.terms-check {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.terms-check input {
    min-height: 18px;
    width: 18px;
    margin-top: 2px;
}

.terms-check span {
    text-transform: none;
    line-height: 1.45;
}

.donate-button {
    min-height: 58px;
}

.donate-button:disabled {
    opacity: 0.62;
    cursor: wait;
}

.form-note {
    min-height: 20px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.form-note.error {
    color: #ff8b83;
}

.terms-section {
    display: grid;
    grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    padding-bottom: 120px;
}

.terms-strip {
    margin-top: 0;
}

.terms-wide {
    grid-column: 2;
    width: max-content;
    margin-top: 18px;
}

.terms-modal {
    width: min(940px, calc(100vw - 28px));
    max-height: min(820px, calc(100vh - 28px));
    border: 1px solid rgba(244, 239, 228, 0.22);
    border-radius: 8px;
    background: #080808;
    color: var(--ink);
    padding: 0;
    box-shadow: 0 0 70px rgba(225, 6, 0, 0.22);
}

.terms-modal::backdrop {
    background: rgba(0,0,0,0.82);
    backdrop-filter: blur(10px);
}

.modal-shell {
    position: relative;
    padding: 34px;
}

.terms-modal h2 {
    font-size: clamp(36px, 8vw, 68px);
    line-height: 1.02;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    font-size: 28px;
}

.legal-copy {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.operator-box {
    display: grid;
    gap: 7px;
    border: 1px solid rgba(244, 239, 228, 0.14);
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    padding: 16px;
    color: var(--soft);
}

.operator-box strong {
    color: var(--bone);
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 1;
    text-transform: uppercase;
}

.legal-copy h3 {
    color: var(--bone);
}

.legal-copy p {
    margin: 0;
    color: var(--soft);
    line-height: 1.65;
}

.legal-copy a {
    color: var(--red-2);
}

.status-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        linear-gradient(rgba(0,0,0,0.76), rgba(0,0,0,0.9)),
        url("/static/assets/endbalkan-logo-redesign.png") center / min(680px, 88vw) no-repeat,
        #050505;
}

.status-box {
    width: min(680px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8,8,8,0.88);
    padding: 34px;
    backdrop-filter: blur(18px);
}

.status-box h1 {
    font-size: clamp(44px, 8vw, 82px);
}

.status-box p {
    color: var(--soft);
    line-height: 1.65;
}

.status-box.ok {
    border-color: rgba(140, 255, 191, 0.35);
}

.status-box.warn {
    border-color: rgba(225, 6, 0, 0.45);
}

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

@keyframes grid-drift {
    to { transform: translate3d(-82px, 82px, 0); }
}

@keyframes logo-arrive {
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes copy-arrive {
    to { transform: translateY(0); opacity: 1; }
}

@keyframes glitch-a {
    0%, 88%, 100% { transform: translate(3px, 0); }
    89% { transform: translate(14px, -4px); }
    91% { transform: translate(-8px, 3px); }
}

@keyframes glitch-b {
    0%, 84%, 100% { transform: translate(-3px, 0); }
    86% { transform: translate(-16px, 5px); }
    88% { transform: translate(10px, -3px); }
}

@media (max-width: 1050px) {
    .topbar {
        grid-template-columns: 1fr auto;
    }

    .topbar nav {
        display: none;
    }

    .hero,
    .support-zone,
    .mission-copy,
    .terms-section {
        grid-template-columns: 1fr;
    }

    .hero-art {
        min-height: 430px;
    }

    .hero-hud {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        grid-column: 1 / -1;
        margin-top: 18px;
    }

    .story-module {
        min-height: auto;
    }

    .terms-wide {
        grid-column: 1;
    }
}

@media (max-width: 700px) {
    .topbar {
        padding: 12px 16px;
    }

    .brand-lockup span {
        display: none;
    }

    .hero {
        padding: 88px 18px 44px;
    }

    h1 {
        font-size: clamp(42px, 12.8vw, 54px);
    }

    .hero::before {
        inset: 72px 10px 26px;
    }

    .hero-art {
        min-height: 300px;
    }

    .hero-hud,
    .mission-grid,
    .terms-strip,
    .story-points,
    .tier-grid,
    .donation-form {
        grid-template-columns: 1fr;
    }

    .mission-band,
    .support-zone,
    .terms-section {
        padding: 62px 18px;
    }

    .story-module,
    .support-panel,
    .modal-shell {
        padding: 20px;
    }

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

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