/* ============================================================
   Rasta Man API - Donation Page
   Matches the rasta-man-api.whop.site theme: dark navy + cyan glow,
   Golos Text typography, glass-card surfaces.
   ============================================================ */

:root {
    --bg-primary: #090e1a;
    --bg-secondary: #0e1525;
    --bg-card: #121a2b;
    --bg-elevated: #1d2435;

    --text-primary: #edf2f7;
    --text-secondary: #dbe6f0;
    --text-muted: #7588a3;

    --accent-primary: #07bdd5;
    --accent-primary-dim: #06a7bc;
    --accent-red: #ef4343;

    --border-color: #20283c;

    --gradient-primary: linear-gradient(135deg, #07bdd5 0%, #06a7bc 100%);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
    --glow-primary: 0 0 20px rgba(7, 189, 213, 0.35);

    --font-heading: 'Golos Text', sans-serif;
    --font-body: 'Golos Text', sans-serif;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Lightweight inline icons (replaces external icon font) */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
}

/* CSS-only spinner (replaces fa-spinner) */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(7, 189, 213, 0.3); }

#particle-canvas {
    position: fixed; inset: 0;
    z-index: 0; pointer-events: none; opacity: 0.25;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px); /* reduced from 120px — large blur radii are expensive to render */
    pointer-events: none;
    z-index: 0;
    opacity: 0.18;
    animation: orbFloat 25s ease-in-out infinite;
    will-change: transform;
}
.orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, var(--accent-primary), transparent 70%); top: 5%; left: -10%; }
.orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, var(--accent-primary-dim), transparent 70%); bottom: 5%; right: -10%; animation-delay: -8s; }
.orb-3 { width: 350px; height: 350px; background: radial-gradient(circle, var(--accent-primary), transparent 70%); top: 50%; left: 50%; animation-delay: -15s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(-20px, 30px) scale(1.08); }
}

/* HEADER */
.site-header {
    position: relative; z-index: 2;
    display: flex; justify-content: center;
    padding: 32px 24px 0;
}
.logo-container { display: flex; align-items: center; gap: 14px; }

.logo-badge {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.logo-badge::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(7, 189, 213, 0.35), transparent 70%);
    animation: logoHaloPulse 3s ease-in-out infinite;
    z-index: 0;
}
.logo-icon-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(7, 189, 213, 0.4);
    filter: drop-shadow(0 0 10px rgba(7, 189, 213, 0.5));
    animation: logoFloat 4s ease-in-out infinite;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.logo-badge:hover .logo-icon-img {
    transform: scale(1.08) rotate(-3deg);
    filter: drop-shadow(0 0 18px rgba(7, 189, 213, 0.8));
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(1.5deg); }
}
@keyframes logoHaloPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

.logo-text { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; }
.logo-accent {
    color: var(--accent-primary);
    text-shadow: 0 0 20px var(--accent-primary);
    animation: textGlowPulse 3s ease-in-out infinite;
}

@keyframes textGlowPulse {
    0%, 100% { text-shadow: 0 0 10px var(--accent-primary); }
    50% { text-shadow: 0 0 22px var(--accent-primary), 0 0 36px rgba(7, 189, 213, 0.5); }
}

/* MAIN */
.donate-main {
    position: relative; z-index: 1;
    max-width: 620px;
    margin: 0 auto;
    padding: 48px 20px 80px;
}

.donate-hero { text-align: center; margin-bottom: 40px; }
.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(7, 189, 213, 0.08);
    border: 1px solid rgba(7, 189, 213, 0.2);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 100px;
    margin-bottom: 16px;
}
.donate-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 14px;
}
.title-gradient {
    color: var(--accent-primary);
    text-shadow: 0 0 24px var(--accent-primary);
}
.donate-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto;
}

/* CARD */
.donate-card-wrapper { position: relative; }
.donate-card {
    background: rgba(18, 26, 43, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(7, 189, 213, 0.15);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-md);
}

.form-block { margin-bottom: 32px; }
.block-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 18px;
    color: var(--text-primary);
}
.step-num {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--bg-primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: var(--glow-primary);
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.amount-btn {
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}
.amount-btn:hover { border-color: rgba(7, 189, 213, 0.4); }
.amount-btn.active {
    background: rgba(7, 189, 213, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary) inset, var(--glow-primary);
}
.custom-btn { font-family: var(--font-body); font-size: 0.9rem; }

.custom-amount-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}
.custom-amount-row.focused { border-color: rgba(7, 189, 213, 0.4); }
.currency-prefix { color: var(--text-muted); font-weight: 600; }
.custom-amount-row input {
    background: none; border: none; outline: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    width: 100%;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.form-group { margin-bottom: 18px; }
.form-row .form-group { margin-bottom: 0; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.optional-tag { color: var(--text-muted); font-weight: 400; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}
.form-group input:focus, .form-group textarea:focus {
    border-color: rgba(7, 189, 213, 0.4);
    box-shadow: 0 0 0 3px rgba(7, 189, 213, 0.08);
}
.form-group textarea { resize: vertical; min-height: 70px; }

.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent-primary); }
.checkbox-row label { margin: 0; font-size: 0.85rem; }

.payment-element-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    min-height: 60px;
}
.payment-placeholder {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px 4px;
}

.form-error {
    color: var(--accent-red);
    font-size: 0.85rem;
    margin-bottom: 16px;
    min-height: 1em;
}

.btn-donate {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px;
    background: var(--gradient-primary);
    color: var(--bg-primary);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--glow-primary);
    transition: var(--transition-fast);
}
.btn-donate:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(7, 189, 213, 0.5); }
.btn-donate:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.secure-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 16px;
}

/* SUCCESS */
.donate-success {
    background: rgba(18, 26, 43, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(7, 189, 213, 0.2);
    border-radius: var(--radius-lg);
    padding: 48px 36px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.success-icon {
    width: 64px; height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(7, 189, 213, 0.1);
    color: var(--accent-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    box-shadow: var(--glow-primary);
}
.donate-success h2 { font-family: var(--font-heading); font-size: 1.4rem; margin-bottom: 10px; }
.donate-success p { color: var(--text-secondary); margin-bottom: 24px; }
.btn-outline-gold {
    padding: 12px 28px;
    background: transparent;
    border: 1px solid rgba(7, 189, 213, 0.4);
    color: var(--accent-primary);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}
.btn-outline-gold:hover { background: rgba(7, 189, 213, 0.1); border-color: var(--accent-primary); }

/* FOOTER */
.donate-footer {
    position: relative; z-index: 1;
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
    .amount-grid { grid-template-columns: repeat(3, 1fr); }
    .donate-card { padding: 24px; }
}

/* ============================================================
   PAGE ANIMATIONS
   ============================================================ */

/* Staggered entrance for hero, card, and form blocks */
.anim-fade-up {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--delay, 0s);
}
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Success panel pop-in */
.anim-pop {
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.9) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.success-icon {
    animation: successPulse 1.8s ease-in-out infinite;
}
@keyframes successPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(7, 189, 213, 0.3); }
    50% { box-shadow: 0 0 28px rgba(7, 189, 213, 0.6); }
}

/* Card border breathing glow (opacity-animated pseudo-layer, GPU-composited
   instead of animating box-shadow directly, which is expensive to repaint) */
.donate-card { position: relative; }
.donate-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    box-shadow: 0 0 24px rgba(7, 189, 213, 0.18);
    opacity: 0;
    pointer-events: none;
    animation: cardGlowBreathe 6s ease-in-out infinite;
    will-change: opacity;
}
@keyframes cardGlowBreathe {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Step number badges pop when their block enters */
.step-num {
    animation: stepPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--delay, 0s) + 0.2s);
}
@keyframes stepPop {
    0% { transform: scale(0); }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Amount button press feedback */
.amount-btn {
    transform: scale(1);
}
.amount-btn:active {
    transform: scale(0.95);
}
.amount-btn.active {
    animation: amountSelectPulse 0.4s ease-out;
}
@keyframes amountSelectPulse {
    0% { transform: scale(0.95); }
    60% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* Donate button shimmer sweep */
.btn-donate {
    position: relative;
    overflow: hidden;
}
.btn-donate::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: translateX(-100%);
    animation: btnShimmer 3.5s ease-in-out infinite;
    will-change: transform;
}
@keyframes btnShimmer {
    0% { transform: translateX(-100%); }
    40%, 100% { transform: translateX(100%); }
}

/* Reduce visual load on small/mobile screens — hide the 3rd orb and
   shrink blur radius further, since mobile GPUs struggle most with this */
@media (max-width: 768px) {
    .orb-3 { display: none; }
    .glow-orb { filter: blur(60px); }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .anim-fade-up, .anim-pop, .logo-icon-img, .logo-badge::before,
    .logo-accent, .donate-card::after, .success-icon, .btn-donate::before,
    .glow-orb {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
