/* ==========================================================================
   Homepage donation section: "Pronami" (docs/donations-plan.md).
   A maroon night lit by gold coins; the card is an ivory offering slip
   whose foot is the live Quittung preview. Fonts come from index.php:
   Cinzel (display), Cormorant Garamond italic (accent), Jost (body).
   ========================================================================== */

.donate {
    --d-night: #2a0705;
    --d-maroon: #551910;
    --d-maroon-2: #6b2117;
    --d-sindoor: #c2361b;
    --d-sindoor-hot: #e0461f;
    --d-gold: #f0c15c;
    --d-gold-soft: #f6db92;
    --d-gold-deep: #a8721a;
    --d-ivory: #fdf7ea;
    --d-ivory-2: #f7ecd3;
    --d-ink: #2b1a14;
    --d-muted: #7a5f52;
    --d-line: rgba(122, 95, 82, 0.28);
    --d-ease: cubic-bezier(0.22, 1, 0.36, 1);

    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: var(--d-ivory);
    background:
        radial-gradient(120% 80% at 85% 10%, rgba(224, 70, 31, 0.28) 0, transparent 55%),
        radial-gradient(90% 70% at 0% 100%, rgba(240, 193, 92, 0.14) 0, transparent 60%),
        linear-gradient(160deg, var(--d-maroon) 0%, var(--d-night) 62%, #1c0403 100%);
    border-top: 4px solid var(--d-gold);
    border-bottom: 4px solid var(--d-gold);
    scroll-margin-top: 6rem;
}

/* Border band echoing a red-and-gold sari paar, top edge only. */
.donate::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 10px;
    background: repeating-linear-gradient(90deg, var(--d-gold) 0 14px, var(--d-sindoor) 14px 22px, var(--d-gold-deep) 22px 26px, var(--d-sindoor) 26px 34px);
    opacity: 0.85;
    z-index: 1;
}

/* A slowly turning alpana behind the story column. Pure CSS: conic petals + dotted rings. */
.donate-alpana {
    position: absolute;
    width: min(78vw, 820px);
    aspect-ratio: 1;
    left: -18%;
    top: 50%;
    translate: 0 -50%;
    z-index: -1;
    border-radius: 50%;
    opacity: 0.16;
    background:
        radial-gradient(circle, transparent 0 21%, var(--d-gold) 21.2% 21.6%, transparent 21.8% 100%),
        radial-gradient(circle, transparent 0 34%, var(--d-gold) 34.2% 34.5%, transparent 34.7% 100%),
        repeating-conic-gradient(from 0deg, var(--d-gold) 0deg 1.2deg, transparent 1.2deg 15deg),
        radial-gradient(circle, transparent 0 47%, var(--d-gold) 47.2% 47.6%, transparent 47.8% 100%);
    -webkit-mask: radial-gradient(circle, #000 0 48%, transparent 48.5%);
    mask: radial-gradient(circle, #000 0 48%, transparent 48.5%);
    animation: donate-turn 120s linear infinite;
}

.donate-grain {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.09;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.donate-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 5.5rem 1rem 5rem;
    display: grid;
    gap: 3.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .donate-inner { padding: 7rem 1.5rem 6.5rem; }
}

@media (min-width: 1024px) {
    .donate-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 31rem);
        gap: 5rem;
    }
}

/* ---- Story column -------------------------------------------------------- */

.donate-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--d-gold);
}

.donate-eyebrow-rule {
    width: 2.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--d-gold));
}

.donate-title {
    margin-top: 1.4rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(2.6rem, 6.2vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: var(--d-ivory);
}

.donate-title em {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.12em;
    color: var(--d-gold);
    padding-inline: 0.04em;
}

.donate-lede {
    margin-top: 1.6rem;
    max-width: 34rem;
    font-size: 1.08rem;
    line-height: 1.75;
    color: rgba(253, 247, 234, 0.82);
}

.donate-custom {
    position: relative;
    margin-top: 2.2rem;
    max-width: 32rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.1rem;
    align-items: center;
    padding: 1.1rem 1.3rem;
    border-left: 2px solid var(--d-gold);
    background: linear-gradient(90deg, rgba(240, 193, 92, 0.1), transparent 85%);
}

.donate-custom-mark {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--d-night);
    background: radial-gradient(circle at 35% 30%, #fff3c9, var(--d-gold) 55%, var(--d-gold-deep));
    box-shadow: 0 0 0 3px rgba(240, 193, 92, 0.25), 0 6px 20px rgba(0, 0, 0, 0.35);
}

.donate-custom p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.45;
    color: var(--d-gold-soft);
}

.donate-trust {
    margin-top: 2.6rem;
    display: grid;
    gap: 1.15rem;
    max-width: 34rem;
}

.donate-trust li {
    display: grid;
    grid-template-columns: 2.6rem 1fr;
    gap: 1rem;
    align-items: start;
    font-size: 0.93rem;
    line-height: 1.55;
    color: rgba(253, 247, 234, 0.7);
}

.donate-trust strong {
    display: block;
    font-weight: 600;
    color: var(--d-ivory);
    letter-spacing: 0.01em;
}

.donate-trust-icon {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.8rem;
    color: var(--d-gold);
    border: 1px solid rgba(240, 193, 92, 0.35);
    background: rgba(240, 193, 92, 0.06);
}

.donate-trust-icon svg { width: 1.25rem; height: 1.25rem; }

/* ---- The offering card -------------------------------------------------- */

.donate-card {
    position: relative;
    color: var(--d-ink);
    background:
        linear-gradient(var(--d-ivory), var(--d-ivory)) padding-box,
        linear-gradient(145deg, var(--d-gold-soft), var(--d-gold-deep) 45%, var(--d-gold) 100%) border-box;
    border: 1.5px solid transparent;
    border-radius: 1.75rem;
    padding: 2rem 1.4rem 1.6rem;
    box-shadow:
        0 40px 80px -30px rgba(0, 0, 0, 0.7),
        0 0 0 8px rgba(240, 193, 92, 0.07);
}

@media (min-width: 640px) {
    .donate-card { padding: 2.4rem 2.2rem 1.9rem; }
}

/* Corner flourishes */
.donate-card::before,
.donate-card::after {
    content: "";
    position: absolute;
    width: 3.4rem;
    height: 3.4rem;
    border: 1.5px solid var(--d-gold);
    opacity: 0.55;
    pointer-events: none;
}
.donate-card::before { top: 0.75rem; left: 0.75rem; border-right: 0; border-bottom: 0; border-top-left-radius: 1.2rem; }
.donate-card::after { top: 0.75rem; right: 0.75rem; border-left: 0; border-bottom: 0; border-top-right-radius: 1.2rem; }

.donate-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.donate-card-head {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
}

.donate-card-head--spaced { margin-top: 2rem; }

.donate-step {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--d-sindoor);
    letter-spacing: 0.08em;
}

.donate-card-title {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--d-maroon);
    letter-spacing: 0.02em;
}

/* ---- Coins ---------------------------------------------------------------- */

.donate-coins {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem 0.8rem;
    border: 0;
    padding: 0;
}

.donate-coin {
    position: relative;
    display: grid;
    place-items: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    animation: donate-coin-in 700ms var(--d-ease) both;
    animation-delay: calc(var(--i) * 70ms + 150ms);
}

.donate-coin input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.donate-coin-face {
    position: relative;
    width: 100%;
    max-width: 6.2rem;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.05rem;
    color: #5a3a0c;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.85) 0 8%, transparent 30%),
        radial-gradient(circle at 50% 50%, #f8dd96 0 58%, #e9b94d 59% 64%, #f6d27a 65% 72%, #c48a26 73% 100%);
    box-shadow:
        inset 0 -4px 8px rgba(120, 72, 10, 0.35),
        inset 0 3px 6px rgba(255, 245, 210, 0.7),
        0 6px 14px -6px rgba(84, 42, 6, 0.55);
    transition: transform 380ms var(--d-ease), box-shadow 380ms var(--d-ease), filter 380ms var(--d-ease);
}

/* Milled rim */
.donate-coin-face::before {
    content: "";
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    border: 1.5px dashed rgba(122, 78, 12, 0.38);
}

.donate-coin-currency {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
}

.donate-coin-value {
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: clamp(1.45rem, 5vw, 1.85rem);
    line-height: 1;
    color: #4a2c05;
    text-shadow: 0 1px 0 rgba(255, 245, 210, 0.8);
}

.donate-coin--other .donate-coin-value {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

.donate-coin--other .donate-coin-face {
    color: var(--d-maroon);
    background:
        radial-gradient(circle at 50% 50%, var(--d-ivory) 0 64%, var(--d-ivory-2) 65% 100%);
    box-shadow: inset 0 0 0 1.5px rgba(168, 114, 26, 0.55), 0 6px 14px -8px rgba(84, 42, 6, 0.4);
}
.donate-coin--other .donate-coin-face::before { border-color: rgba(168, 114, 26, 0.45); }
.donate-coin--other .donate-coin-value { color: var(--d-maroon); text-shadow: none; }

.donate-coin:hover .donate-coin-face {
    transform: translateY(-3px) rotate(-4deg);
}

.donate-coin input:checked + .donate-coin-face {
    transform: translateY(-5px) scale(1.06);
    box-shadow:
        inset 0 -4px 8px rgba(120, 72, 10, 0.35),
        inset 0 3px 6px rgba(255, 245, 210, 0.7),
        0 0 0 3px var(--d-ivory),
        0 0 0 5.5px var(--d-sindoor),
        0 16px 26px -10px rgba(194, 54, 27, 0.6);
}

.donate-coin input:checked + .donate-coin-face::after {
    content: "";
    position: absolute;
    inset: -14%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 244, 205, 0.9) 78%, transparent 86%);
    -webkit-mask: radial-gradient(circle, transparent 0 66%, #000 67% 70%, transparent 71%);
    mask: radial-gradient(circle, transparent 0 66%, #000 67% 70%, transparent 71%);
    animation: donate-turn 2.8s linear infinite;
    pointer-events: none;
}

.donate-coin input:focus-visible + .donate-coin-face {
    outline: 2px solid var(--d-maroon);
    outline-offset: 6px;
}

/* ---- Other amount --------------------------------------------------------- */

.donate-other {
    display: grid;
    grid-template-rows: 1fr;
    margin-top: 1.1rem;
    animation: donate-unfold 420ms var(--d-ease);
}

.donate-other[hidden] { display: none; }

.donate-amount-input {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    border-bottom: 2px solid var(--d-gold-deep);
    padding-bottom: 0.2rem;
    transition: border-color 200ms ease;
}

.donate-amount-input span {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--d-gold-deep);
}

.donate-amount-input input {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--d-maroon);
    padding: 0;
    outline: none;
}

.donate-amount-input:focus-within { border-color: var(--d-sindoor); }

/* ---- Name / email ----------------------------------------------------------- */

.donate-fields {
    margin-top: 1rem;
    display: grid;
    gap: 1.15rem;
}

.donate-field { display: grid; gap: 0.35rem; }

.donate-field-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--d-muted);
}

.donate-field > input {
    width: 100%;
    border: 0;
    border-bottom: 1.5px solid var(--d-line);
    background: transparent;
    padding: 0.55rem 0 0.5rem;
    font-size: 1.05rem;
    color: var(--d-ink);
    outline: none;
    transition: border-color 220ms ease, background-size 320ms var(--d-ease);
    background-image: linear-gradient(var(--d-sindoor), var(--d-sindoor));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
}

.donate-field > input::placeholder { color: rgba(122, 95, 82, 0.55); }

.donate-field > input:focus {
    border-bottom-color: transparent;
    background-size: 100% 2px;
}

.donate-field > input[aria-invalid="true"],
.donate-amount-input:has(input[aria-invalid="true"]) {
    border-bottom-color: var(--d-sindoor);
}

.donate-field-hint {
    font-size: 0.8rem;
    color: var(--d-muted);
}

.donate-error {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--d-sindoor);
}

p.donate-error { margin-top: 0.6rem; }

/* ---- Live Quittung preview ---------------------------------------------- */

.donate-receipt {
    position: relative;
    margin: 2rem -0.35rem 0;
    border-radius: 0.9rem;
    background:
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(168, 114, 26, 0.09) 27px 28px),
        #fffdf6;
    border: 1px solid rgba(168, 114, 26, 0.3);
    box-shadow: 0 10px 24px -18px rgba(84, 42, 6, 0.6);
    transform: rotate(-0.6deg);
    transition: transform 400ms var(--d-ease);
}

.donate-card:focus-within .donate-receipt { transform: rotate(0deg); }

.donate-receipt-perf {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: -1px;
    height: 0;
    border-top: 2px dashed rgba(168, 114, 26, 0.45);
}

.donate-receipt-body { padding: 1rem 1.15rem 1.05rem; }

.donate-receipt-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--d-muted);
}

.donate-receipt-no { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }

.donate-receipt-amount {
    margin-top: 0.55rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: center;
}

.donate-receipt-figure {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--d-maroon);
    border: 1.5px solid var(--d-maroon);
    border-radius: 0.4rem;
    padding: 0.3rem 0.6rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.donate-receipt-words {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--d-ink);
    overflow-wrap: anywhere;
}

.donate-receipt-words.is-updating { animation: donate-ink 380ms var(--d-ease); }

.donate-receipt-meta {
    margin-top: 0.7rem;
    display: grid;
    gap: 0.15rem;
    font-size: 0.8rem;
    color: var(--d-muted);
}

.donate-receipt-meta strong { font-weight: 600; color: var(--d-ink); }

/* ---- Submit ------------------------------------------------------------------ */

.donate-form-error {
    margin-top: 1.2rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.8rem;
    font-size: 0.9rem;
    color: var(--d-maroon);
    background: rgba(194, 54, 27, 0.08);
    border: 1px solid rgba(194, 54, 27, 0.3);
}

.donate-submit {
    position: relative;
    overflow: hidden;
    margin-top: 1.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.1rem 1.4rem;
    border: 0;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff8ec;
    cursor: pointer;
    background: linear-gradient(135deg, var(--d-sindoor-hot) 0%, var(--d-sindoor) 45%, #8f2211 100%);
    box-shadow: 0 16px 30px -14px rgba(194, 54, 27, 0.85), inset 0 1px 0 rgba(255, 220, 190, 0.35);
    transition: transform 260ms var(--d-ease), box-shadow 260ms var(--d-ease), filter 260ms ease;
}

.donate-submit svg { width: 1.15rem; height: 1.15rem; opacity: 0.9; }

.donate-submit::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 236, 200, 0.35) 50%, transparent 70%);
    translate: -120% 0;
    transition: translate 800ms var(--d-ease);
}

.donate-submit:hover { transform: translateY(-2px); box-shadow: 0 22px 36px -14px rgba(194, 54, 27, 0.95), inset 0 1px 0 rgba(255, 220, 190, 0.35); }
.donate-submit:hover::after { translate: 120% 0; }
.donate-submit:hover .donate-submit-arrow { transform: translateX(4px); }
.donate-submit:focus-visible { outline: 3px solid var(--d-gold); outline-offset: 3px; }
.donate-submit-arrow { transition: transform 260ms var(--d-ease); }

.donate-submit[disabled] {
    cursor: progress;
    filter: saturate(0.7) brightness(0.95);
    transform: none;
}

.donate-submit.is-loading .donate-submit-arrow {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 248, 236, 0.35);
    border-top-color: #fff8ec;
    font-size: 0;
    animation: donate-turn 700ms linear infinite;
}

.donate-fineprint {
    margin-top: 0.9rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--d-muted);
}

.donate-fineprint a { color: var(--d-maroon); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Motion ------------------------------------------------------------------ */

@keyframes donate-turn { to { rotate: 360deg; } }

@keyframes donate-coin-in {
    from { opacity: 0; transform: translateY(14px) rotateY(80deg); }
    to { opacity: 1; transform: none; }
}

@keyframes donate-unfold {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

@keyframes donate-ink {
    from { opacity: 0.2; filter: blur(2px); }
    to { opacity: 1; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
    .donate-alpana,
    .donate-coin,
    .donate-coin input:checked + .donate-coin-face::after,
    .donate-other,
    .donate-receipt-words.is-updating { animation: none; }
    .donate-coin-face,
    .donate-submit,
    .donate-receipt { transition: none; }
}

/* ---- Standalone page (donate.php) ------------------------------------------ */

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

.donate-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem clamp(1rem, 4vw, 2.5rem);
    background: rgba(253, 247, 234, 0.96);
    border-bottom: 1px solid rgba(207, 144, 32, 0.35);
    backdrop-filter: blur(10px);
}

.donate-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    text-decoration: none;
}

.donate-brand img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid #fbeecb;
    object-fit: cover;
    box-shadow: 0 0 22px rgba(249, 119, 0, 0.25);
    flex-shrink: 0;
}

.donate-brand > span { display: grid; min-width: 0; }

.donate-brand-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(0.85rem, 2.4vw, 1.05rem);
    color: #ac4504;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donate-brand-tag {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: #7a5f52;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donate-back {
    flex-shrink: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #551910;
    text-decoration: none;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1.5px solid rgba(85, 25, 16, 0.25);
    transition: background 200ms ease, border-color 200ms ease;
}

.donate-back:hover { background: #fbeecb; border-color: #cf9020; }

@media (max-width: 480px) {
    .donate-brand-tag { display: none; }
    .donate-back { padding: 0.5rem 0.8rem; font-size: 0.8rem; }
}

.donate--page {
    border-top: 0;
    min-height: calc(100vh - 4.6rem);
    display: flex;
    align-items: center;
}

.donate--page .donate-inner { width: 100%; }

.donate-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem 1.5rem;
    padding: 1.4rem clamp(1rem, 4vw, 2.5rem);
    font-size: 0.8rem;
    color: rgba(253, 247, 234, 0.55);
    background: #1c0403;
}

.donate-foot a { color: #f6db92; text-decoration: none; }
.donate-foot a:hover { text-decoration: underline; }

/* Entrance: story then card, one orchestrated reveal on load. */
.donate--page .donate-story { animation: donate-rise 800ms var(--d-ease) both; }
.donate--page .donate-card { animation: donate-rise 900ms var(--d-ease) 180ms both; }

@keyframes donate-rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .donate--page .donate-story,
    .donate--page .donate-card { animation: none; }
}

/* donate.php has no Tailwind preflight: neutralise UA defaults inside the section. */
:where(.donate) :where(h2, p, blockquote, ul, fieldset) { margin: 0; }
:where(.donate) :where(ul) { list-style: none; padding: 0; }
:where(.donate) :where(fieldset) { min-width: 0; }
:where(.donate) :where(*, *::before, *::after) { box-sizing: border-box; }
.donate-topbar, .donate-topbar * { box-sizing: border-box; }

/* ---- Return / thank-you page (donation-return.php) ------------------------- */

.donate--result { justify-content: center; }

.donate-result {
    width: min(40rem, 100% - 2rem);
    margin: 0 auto;
    padding: 5rem 0;
    text-align: center;
    animation: donate-rise 800ms var(--d-ease) both;
}

.donate-result .donate-eyebrow { justify-content: center; }

.donate-result-seal {
    width: 5.5rem;
    height: 5.5rem;
    margin: 0 auto 1.8rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #4a2c05;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.85) 0 8%, transparent 30%),
        radial-gradient(circle at 50% 50%, #f8dd96 0 58%, #e9b94d 59% 64%, #f6d27a 65% 72%, #c48a26 73% 100%);
    box-shadow: 0 0 0 6px rgba(240, 193, 92, 0.15), 0 18px 40px -12px rgba(0, 0, 0, 0.6);
    animation: donate-coin-in 900ms var(--d-ease) both;
}

.donate-result-seal svg { width: 2.4rem; height: 2.4rem; }

.donate-result-seal--wait {
    background: none;
    border: 3px solid rgba(240, 193, 92, 0.25);
    border-top-color: var(--d-gold);
    box-shadow: none;
    animation: donate-turn 1s linear infinite;
}

.donate-result-seal--muted {
    color: var(--d-ivory);
    background: rgba(253, 247, 234, 0.08);
    border: 1.5px solid rgba(253, 247, 234, 0.3);
    box-shadow: none;
}

.donate-result-title {
    margin: 1.2rem 0 0;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    line-height: 1.08;
    color: var(--d-ivory);
}

.donate-result-title em {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.12em;
    color: var(--d-gold);
}

.donate-result-lede {
    margin: 1.2rem auto 0;
    max-width: 30rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(253, 247, 234, 0.82);
}

.donate-result-lede strong { color: var(--d-ivory); }

.donate-result-receipt {
    margin: 2.4rem auto 0;
    max-width: 30rem;
    display: grid;
    gap: 1.2rem;
    align-items: center;
    padding: 1.4rem 1.5rem;
    text-align: left;
    color: var(--d-ink);
    border-radius: 1rem;
    background:
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(168, 114, 26, 0.09) 27px 28px),
        #fffdf6;
    border: 1px solid rgba(168, 114, 26, 0.35);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8);
    transform: rotate(-0.8deg);
}

@media (min-width: 560px) {
    .donate-result-receipt { grid-template-columns: 1fr auto; }
}

.donate-result-receipt > div { display: grid; gap: 0.2rem; }

.donate-result-number {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--d-maroon);
    font-variant-numeric: tabular-nums;
}

.donate-result-mail { font-size: 0.85rem; color: var(--d-muted); overflow-wrap: anywhere; }

.donate-result-download,
.donate-result-retry {
    margin-top: 0;
    width: auto;
    padding: 0.9rem 1.4rem;
    text-decoration: none;
    font-size: 0.98rem;
}

.donate-result-retry { display: inline-flex; margin-top: 2rem; }

.donate-result-note {
    margin: 1.4rem auto 0;
    max-width: 30rem;
    font-size: 0.9rem;
    color: rgba(253, 247, 234, 0.6);
}

.donate-result-note a,
.donate-result-contact a { color: var(--d-gold-soft); }

.donate-result-home {
    display: inline-block;
    margin-top: 2.2rem;
    color: var(--d-ivory);
    border-color: rgba(253, 247, 234, 0.3);
}

.donate-result-home:hover { background: rgba(253, 247, 234, 0.08); border-color: var(--d-gold); }

.donate-result-contact {
    margin-top: 3rem;
    font-size: 0.85rem;
    color: rgba(253, 247, 234, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    .donate-result,
    .donate-result-seal { animation: none; }
}

/* ---- Mobile / tablet: centre the story column above the card ----------------
   Only below the two-column breakpoint. The form stays left-aligned (labels and
   inputs read best that way); the trust list is centred as a block but its rows
   keep their icon-then-text alignment. */
@media (max-width: 1023px) {
    .donate-story { text-align: center; }
    .donate-eyebrow { justify-content: center; }
    .donate-eyebrow-rule { display: none; }
    .donate-lede,
    .donate-custom,
    .donate-trust { margin-left: auto; margin-right: auto; }
    .donate-custom {
        grid-template-columns: 1fr;
        justify-items: center;
        border-left: 0;
        border-top: 2px solid var(--d-gold);
        background: linear-gradient(180deg, rgba(240, 193, 92, 0.1), transparent 85%);
    }
    .donate-trust { text-align: left; width: fit-content; max-width: 100%; }
}
