/**
 * Referral points page — Refer & Earn hero (native / enterprise).
 * Scoped to body.points-page. Uses portal --kf-app-* typography.
 */

body.points-page {
    --rf-ink: #0b1f14;
    --rf-muted: rgba(255, 255, 255, 0.72);
    --rf-surface: #ffffff;
    --rf-forest: #14532d;
    --rf-forest-mid: #166534;
    --rf-leaf: #22c55e;
    --rf-gold: #fbbf24;
    --rf-gold-deep: #d97706;
    --rf-press: #0f3d22;
}

/* ── Refer & Earn hero ── */
.rf-hero {
    position: relative;
    overflow: hidden;
    margin: 0 0 18px;
    padding: 22px 18px 18px;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(120% 90% at 100% -10%, rgba(34, 197, 94, 0.35) 0%, transparent 55%),
        radial-gradient(90% 70% at -10% 110%, rgba(251, 191, 36, 0.22) 0%, transparent 50%),
        linear-gradient(155deg, #0f3d22 0%, #14532d 42%, #166534 100%);
    box-shadow:
        0 18px 40px rgba(15, 61, 34, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    isolation: isolate;
}

.rf-hero__glow {
    position: absolute;
    inset: auto -20% -40% auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.28) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.rf-hero__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
    filter: blur(0.2px);
}

.rf-hero__orb--a {
    top: 12px;
    right: 18px;
    width: 10px;
    height: 10px;
    background: var(--rf-gold);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.7);
}

.rf-hero__orb--b {
    top: 48px;
    right: 52px;
    width: 6px;
    height: 6px;
    background: #86efac;
    box-shadow: 0 0 12px rgba(134, 239, 172, 0.8);
}

.rf-hero__inner {
    position: relative;
    z-index: 1;
}

.rf-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 5px 10px 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: var(--kf-app-font-family, inherit);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ecfdf5;
}

.rf-hero__badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rf-leaf);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.rf-hero__title {
    margin: 0 0 8px;
    font-family: var(--kf-app-font-family, inherit);
    font-size: clamp(1.55rem, 6.2vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -0.038em;
    line-height: 1.12;
    color: #fff;
}

.rf-hero__title em {
    font-style: normal;
    color: var(--rf-gold);
}

.rf-hero__sub {
    margin: 0 0 18px;
    max-width: 22rem;
    font-family: var(--kf-app-font-family, inherit);
    font-size: var(--kf-app-fs-body, 0.95rem);
    font-weight: 560;
    line-height: 1.45;
    letter-spacing: -0.015em;
    color: var(--rf-muted);
}

.rf-hero__sub strong {
    color: #fff;
    font-weight: 750;
}

.rf-hero__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 0 16px;
}

.rf-stat {
    padding: 12px 12px 11px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.rf-stat__label {
    margin: 0 0 4px;
    font-family: var(--kf-app-font-family, inherit);
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.rf-stat__value {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--kf-app-font-family, inherit);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.rf-stat__unit {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--rf-gold);
}

.rf-hero__link-block {
    margin: 0;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--rf-ink);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.rf-hero__link-label {
    margin: 0 0 8px;
    font-family: var(--kf-app-font-family, inherit);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.rf-hero__link-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.rf-hero__link-field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #f8fafc;
}

.rf-hero__link-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    padding: 12px 0;
    font-family: var(--kf-app-font-family, inherit);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rf-hero__copy {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 5.75rem;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #1a8a3c 0%, #166534 100%);
    color: #fff;
    font-family: var(--kf-app-font-family, inherit);
    font-size: 0.88rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 6px 14px rgba(22, 101, 52, 0.35);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.rf-hero__copy:hover {
    background: linear-gradient(180deg, #1f9a45 0%, #17803a 100%);
}

.rf-hero__copy:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.3);
}

.rf-hero__copy.is-copied {
    background: linear-gradient(180deg, #0f766e 0%, #0d9488 100%);
    box-shadow: 0 6px 14px rgba(13, 148, 136, 0.35);
}

.rf-hero__copy svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.rf-hero__share-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.rf-hero__share {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    color: #14532d;
    font-family: var(--kf-app-font-family, inherit);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.rf-hero__share:active {
    transform: scale(0.98);
    background: #f0fdf4;
}

.rf-hero__share svg {
    width: 16px;
    height: 16px;
}

.rf-hero__toast {
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #14532d;
    font-family: var(--kf-app-font-family, inherit);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.rf-hero__toast[hidden] {
    display: none !important;
}

.rf-hero__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.rf-hero__step {
    padding: 10px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.rf-hero__step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.2);
    color: var(--rf-gold);
    font-family: var(--kf-app-font-family, inherit);
    font-size: 0.72rem;
    font-weight: 800;
}

.rf-hero__step-text {
    margin: 0;
    font-family: var(--kf-app-font-family, inherit);
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.82);
}

@media (prefers-reduced-motion: no-preference) {
    .rf-hero__orb--a {
        animation: rf-orb-float 3.2s ease-in-out infinite;
    }

    .rf-hero__orb--b {
        animation: rf-orb-float 2.6s ease-in-out infinite 0.4s;
    }

    .rf-hero__badge-dot {
        animation: rf-pulse 2s ease-in-out infinite;
    }

    @keyframes rf-orb-float {
        0%,
        100% {
            transform: translateY(0);
            opacity: 0.55;
        }
        50% {
            transform: translateY(-6px);
            opacity: 1;
        }
    }

    @keyframes rf-pulse {
        0%,
        100% {
            box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
        }
        50% {
            box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.08);
        }
    }
}

@media (max-width: 380px) {
    .rf-hero__steps {
        grid-template-columns: 1fr;
    }

    .rf-hero__step {
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        padding: 10px 12px;
    }

    .rf-hero__step-num {
        margin: 0;
        flex-shrink: 0;
    }
}
