@font-face {
    font-family: Vazirmatn;
    src: url("fonts/Vazirmatn-Variable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    font-family: Vazirmatn, Tahoma, sans-serif;
    --ink: #2e1830;
    --muted: #625467;
    --rose: #a71650;
    --line: #e9d9e2;
    --wash: #faf2f6;
    --page: #f9f4f7;
    --glow-top: #f7dde9;
    --glow-bottom: #eee3f5;
    --surface: #fff;
    --input: #fffafd;
    --brand: #fff8fb;
    --focus: #9b2453;
    --error: #842349;
    --shadow: #6b305b;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #fff1fa;
    --muted: #dbc6d6;
    --rose: #ff9cc6;
    --line: #62475d;
    --wash: #392733;
    --page: #211821;
    --glow-top: #3f2638;
    --glow-bottom: #2d223b;
    --surface: #2d202b;
    --input: #322531;
    --brand: #3d2838;
    --focus: #ffa3cd;
    --error: #ffb0cb;
    --shadow: #0c080d;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(ellipse at 100% 0%, var(--glow-top) 0%, transparent 50%),
        radial-gradient(ellipse at 0% 75%, var(--glow-bottom) 0%, transparent 55%),
        var(--page);
}
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.donate-page {
    width: min(38rem, calc(100% - 2rem));
    margin-inline: auto;
    padding-block: clamp(1.5rem, 5.4vh, 3.4rem) 1.5rem;
}
.donation-preferences {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1.15rem;
}
.donation-preferences nav {
    display: flex;
    gap: .15rem;
    padding: .2rem;
    border: 1px solid var(--line);
    border-radius: .85rem;
    background: var(--wash);
}
.donation-preferences a {
    display: grid;
    grid-auto-flow: column;
    gap: .3rem;
    align-items: center;
    min-height: 2.35rem;
    padding: .25rem .55rem;
    border-radius: .65rem;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.donation-preferences a[aria-current],
.donation-preferences a:hover {
    color: var(--rose);
    background: var(--surface);
}
.donate-hero { text-align: center; margin-bottom: 1.45rem; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 6.45rem;
    aspect-ratio: 1;
    margin: 0 auto .95rem;
    border: 1px solid var(--line);
    border-radius: 2rem;
    background: var(--brand);
    box-shadow: 0 .55rem 1.7rem color-mix(in srgb, var(--shadow), transparent 88%);
}
.brand-mark img { width: 5.25rem; height: 5.25rem; object-fit: contain; }
h1 {
    margin: 0;
    font-size: clamp(2rem, 7vw, 2.9rem);
    font-weight: 900;
    line-height: 1.4;
    letter-spacing: -.03em;
}
.donate-hero p { max-width: 32ch; margin: .55rem auto 0; color: var(--muted); line-height: 1.9; }

.donation-panel {
    border: 1px solid var(--line);
    border-radius: 1.65rem;
    padding: clamp(1rem, 4vw, 1.75rem);
    background: var(--surface);
    box-shadow: 0 1.1rem 3.2rem color-mix(in srgb, var(--shadow), transparent 84%);
}
.methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .3rem;
    padding: .3rem;
    margin-bottom: 1.25rem;
    border-radius: .92rem;
    background: var(--wash);
}
.methods a {
    display: grid;
    place-items: center;
    min-height: 2.8rem;
    border-radius: .68rem;
    padding: .35rem .25rem;
    color: var(--muted);
    font-weight: 700;
    font-size: .88rem;
    line-height: 1.55;
    text-align: center;
    text-decoration: none;
}
.methods a[aria-current] { background: var(--surface); color: var(--rose); box-shadow: 0 .1rem .4rem #6b305b1c; }
label { display: block; margin-bottom: .44rem; font-weight: 800; }
.amount-input {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-height: 3.45rem;
    padding-inline: .85rem;
    border: 1px solid var(--line);
    border-radius: .82rem;
    background: var(--input);
}
.amount-input:focus-within { border-color: var(--rose); box-shadow: 0 0 0 2px #a7165029; }
.amount-input input {
    flex: 1;
    min-width: 0;
    padding-block: .65rem;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 700;
}
.amount-input input::placeholder { color: var(--muted); font-size: .88rem; font-weight: 400; }
.amount-input span { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .62rem; }
.presets button {
    min-height: 2.65rem;
    border: 1px solid var(--line);
    border-radius: .68rem;
    background: var(--surface);
    color: var(--rose);
    padding: .3rem .1rem;
    font-size: clamp(.74rem, 3vw, .91rem);
    font-weight: 700;
}
.presets button:is(:hover, [aria-pressed="true"]) { background: var(--wash); border-color: var(--rose); }
.pay {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: .6rem;
    min-height: 3.45rem;
    width: 100%;
    margin-top: 1.2rem;
    padding: .65rem .9rem;
    border: 0;
    border-radius: .9rem;
    background: linear-gradient(110deg, #9b0d4b, #b31759);
    color: white;
    text-align: start;
    font-weight: 800;
    box-shadow: 0 .42rem .9rem #ac1f5430;
}
.pay:hover { background: #900d43; }
.pay span:last-child {
    display: grid;
    place-items: center;
    width: 1.95rem;
    aspect-ratio: 1;
    border-radius: .56rem;
    background: #ffffff26;
}
.payment-error {
    margin: 0 0 1rem;
    border-inline-start: 3px solid var(--rose);
    border-radius: .45rem;
    padding: .6rem .8rem;
    background: var(--wash);
    color: var(--error);
}
.wallet {
    margin-top: 1.1rem;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: .85rem;
}
.wallet input {
    display: block;
    width: 100%;
    padding: .55rem;
    border: 1px solid var(--line);
    border-radius: .55rem;
    background: var(--wash);
    color: var(--ink);
    font-family: ui-monospace, Consolas, monospace;
    font-size: .85rem;
}
.wallet button {
    margin-top: .55rem;
    border: 0;
    border-radius: .45rem;
    padding: .3rem .55rem;
    background: var(--wash);
    color: var(--rose);
}
.wallet p, .wallet [role="status"] { margin: .4rem 0 0; color: var(--muted); font-size: .82rem; }
.donation-footer { margin-top: 1.25rem; color: var(--muted); text-align: center; font-size: .82rem; line-height: 1.75; }
.donation-footer p { margin: .24rem 0; }
@media (max-width: 355px) {
    .donate-page { width: calc(100% - 1rem); }
    .donate-hero p { font-size: .91rem; }
    .presets { gap: .25rem; }
}
