/* ============================================================
   /v3/css/referral.css
   Standalone /referral page — Ambassador Program landing.
   Priority 3 of the Referral rollout (spec: Punchy design 25%).

   Layout: hero (big 25%) → how-it-works → rewards table →
           social proof → FAQ → final CTA → footer.

   Depends on: tokens.css, design.css, utilities.css, v3-modal.css.
   Own scope: `body.v3-page-referral` + `.v3-referral-page-*`.
   ============================================================ */

body.v3-page-referral {
    background: #050608;
    color: #D4DAE5;
    /* Prevent horizontal scrollbar from any full-bleed section using 100vw. */
    overflow-x: hidden;
}

/* Reset any inherited padding/max-width from base .v3-main so hero
   background truly bleeds edge-to-edge (fix: parent constrained the
   section to a narrower column, leaving black rails on both sides). */
.v3-main-referral {
    padding: 0 0 40px;
    max-width: none !important;
    margin: 0 !important;
    width: 100%;
}

/* ---------- HERO ---------- */
/* Full-bleed regardless of any parent max-width:
   width: 100vw + left: 50% + margin-left: -50vw = section stretches
   across the full viewport even if wrapped inside a narrower <main>. */
.v3-referral-page-hero {
    position: relative;
    padding: 72px 0 52px;
    overflow: hidden;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background:
        radial-gradient(ellipse 1200px 600px at 80% 20%,
            rgba(37, 170, 225, 0.22) 0%, transparent 65%),
        radial-gradient(ellipse 900px 500px at 20% 90%,
            rgba(95, 227, 168, 0.15) 0%, transparent 60%),
        #050608;
}

/* Same trick for the alt section (rewards table backdrop). */
.v3-referral-page-section-alt {
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    position: relative;
}

.v3-referral-page-container {
    max-width: 960px;
    text-align: center;
    padding: 0 20px;
}

.v3-referral-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(37, 170, 225, 0.15);
    border: 1px solid rgba(37, 170, 225, 0.35);
    border-radius: 999px;
    color: #5DC8F0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 22px;
    font-family: 'JetBrains Mono', monospace;
}

.v3-referral-page-eyebrow i {
    font-size: 12px;
}

.v3-referral-page-title {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(34px, 5.5vw, 56px);
    line-height: 1.1;
    color: #FFFFFF;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.v3-referral-page-big {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(56px, 10vw, 108px);
    line-height: 1;
    background: linear-gradient(135deg, #25AAE1 0%, #5FE3A8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
    margin: 0 4px;
    filter: drop-shadow(0 4px 24px rgba(37, 170, 225, 0.35));
}

.v3-referral-page-sub {
    max-width: 620px;
    margin: 0 auto 28px;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(212, 218, 229, 0.85);
}

.v3-referral-page-sub strong {
    color: #FFFFFF;
    font-weight: 600;
}

/* CTA row */
.v3-referral-page-cta-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.v3-referral-page-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #25AAE1, #5DC8F0);
    color: #050608;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(37, 170, 225, 0.45);
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 200ms ease, filter 140ms ease;
}

.v3-referral-page-btn-primary:hover {
    color: #050608;
    text-decoration: none;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 8px 26px rgba(37, 170, 225, 0.55);
}

.v3-referral-page-btn-primary:active {
    transform: scale(0.97);
}

.v3-referral-page-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.05);
    color: #D4DAE5;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    transition: background 180ms ease, border-color 180ms ease;
}

.v3-referral-page-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
    text-decoration: none;
}

/* Hero mini stats */
.v3-referral-page-hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.v3-referral-page-stat-mini {
    text-align: center;
    min-width: 100px;
}

.v3-referral-page-stat-mini-num {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #FFFFFF;
    letter-spacing: -0.01em;
}

.v3-referral-page-stat-mini-lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #7A8599;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ---------- SECTION SHELL ---------- */
.v3-referral-page-section {
    padding: 60px 0;
}

.v3-referral-page-section .container {
    max-width: 960px;
    padding: 0 20px;
}

/* Base band styling (border + tint) — extended above with full-bleed rule. */
.v3-referral-page-section-alt {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.v3-referral-page-h2 {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3vw, 32px);
    color: #FFFFFF;
    text-align: center;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

.v3-referral-page-h2-sub {
    text-align: center;
    color: #7A8599;
    font-size: 14px;
    margin: 0 auto 36px;
    max-width: 560px;
}

/* ---------- HOW IT WORKS ---------- */
.v3-referral-page-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 40px;
}

.v3-referral-page-step {
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.v3-referral-page-step:hover {
    border-color: rgba(37, 170, 225, 0.35);
    background: rgba(37, 170, 225, 0.05);
    transform: translateY(-2px);
}

.v3-referral-page-step-num {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #25AAE1, #5FE3A8);
    color: #050608;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 14px;
}

.v3-referral-page-step-title {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #FFFFFF;
    margin-bottom: 6px;
}

.v3-referral-page-step-desc {
    color: rgba(212, 218, 229, 0.75);
    font-size: 13px;
    line-height: 1.55;
}

/* ---------- REWARDS TABLE ---------- */
.v3-referral-page-table-wrap {
    max-width: 800px;
    margin: 0 auto;
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.v3-referral-page-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.v3-referral-page-table th {
    text-align: left;
    padding: 14px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #7A8599;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.v3-referral-page-table td {
    padding: 16px 18px;
    color: #D4DAE5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.v3-referral-page-table tr:last-child td {
    border-bottom: none;
}

.v3-referral-page-table-earn {
    color: #5FE3A8 !important;
    font-weight: 700;
    text-align: right;
}

.v3-referral-page-table td.v3-referral-page-table-earn {
    color: #5FE3A8;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
    font-size: 15px;
}

.v3-referral-page-table-foot {
    max-width: 800px;
    margin: 20px auto 0;
    text-align: center;
    color: #7A8599;
    font-size: 12px;
    line-height: 1.6;
}

.v3-referral-page-table-foot i {
    color: #5DC8F0;
    margin-right: 6px;
}

/* ---------- SOCIAL PROOF ---------- */
.v3-referral-page-proof {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    max-width: 900px;
    margin: 0 auto;
}

.v3-referral-page-proof-item {
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    text-align: center;
}

.v3-referral-page-proof-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    background: rgba(37, 170, 225, 0.15);
    border: 1px solid rgba(37, 170, 225, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5DC8F0;
    font-size: 18px;
}

.v3-referral-page-proof-title {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #FFFFFF;
    margin-bottom: 6px;
}

.v3-referral-page-proof-desc {
    color: rgba(212, 218, 229, 0.75);
    font-size: 13px;
    line-height: 1.55;
}

/* ---------- FAQ ---------- */
.v3-referral-page-faq {
    max-width: 720px;
    margin: 0 auto;
}

.v3-referral-page-faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 0;
    overflow: hidden;
}

.v3-referral-page-faq-item[open] {
    background: rgba(37, 170, 225, 0.04);
    border-color: rgba(37, 170, 225, 0.25);
}

.v3-referral-page-faq-item summary {
    padding: 16px 20px;
    cursor: pointer;
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: #FFFFFF;
    list-style: none;
    position: relative;
    padding-right: 44px;
    user-select: none;
}

.v3-referral-page-faq-item summary::-webkit-details-marker {
    display: none;
}

.v3-referral-page-faq-item summary::after {
    content: '＋';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #5DC8F0;
    font-size: 16px;
    font-weight: 400;
    transition: transform 180ms ease;
}

.v3-referral-page-faq-item[open] summary::after {
    content: '−';
    color: #FFFFFF;
}

.v3-referral-page-faq-body {
    padding: 0 20px 18px;
    color: rgba(212, 218, 229, 0.85);
    font-size: 14px;
    line-height: 1.65;
}

.v3-referral-page-faq-body a {
    color: #5DC8F0;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted rgba(93, 200, 240, 0.4);
}

.v3-referral-page-faq-body a:hover {
    color: #FFFFFF;
    border-bottom-color: #FFFFFF;
}

/* ---------- FINAL CTA ---------- */
.v3-referral-page-section-cta {
    padding: 80px 0 60px;
}

.v3-referral-page-final {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    padding: 48px 24px;
    background:
        radial-gradient(ellipse 500px 200px at 50% 100%,
            rgba(95, 227, 168, 0.15) 0%, transparent 60%),
        linear-gradient(135deg, rgba(37, 170, 225, 0.08), rgba(95, 227, 168, 0.06));
    border: 1px solid rgba(37, 170, 225, 0.35);
    border-radius: 20px;
}

.v3-referral-page-final h2 {
    font-family: 'Satoshi', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3vw, 32px);
    color: #FFFFFF;
    margin: 0 0 8px;
}

.v3-referral-page-final p {
    color: rgba(212, 218, 229, 0.8);
    font-size: 15px;
    margin: 0 0 24px;
}

/* ---------- FOOTER ---------- */
.v3-footer-referral {
    padding: 30px 0;
    text-align: center;
    color: #7A8599;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
}

.v3-footer-referral a {
    color: #5DC8F0;
    text-decoration: none;
    margin: 0 4px;
}

.v3-footer-referral a:hover {
    color: #FFFFFF;
}

/* ---------- MOBILE ---------- */
@media (max-width: 720px) {
    .v3-referral-page-hero { padding: 60px 0 40px; }
    .v3-referral-page-section { padding: 40px 0; }
    .v3-referral-page-steps,
    .v3-referral-page-proof {
        grid-template-columns: 1fr;
    }
    .v3-referral-page-hero-stats {
        gap: 24px;
    }
    .v3-referral-page-table th,
    .v3-referral-page-table td {
        padding: 12px 12px;
        font-size: 12px;
    }
    .v3-referral-page-table td.v3-referral-page-table-earn {
        font-size: 13px;
    }
    .v3-referral-page-cta-row {
        flex-direction: column;
        gap: 10px;
    }
    .v3-referral-page-btn-primary,
    .v3-referral-page-btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .v3-referral-page-final {
        padding: 32px 16px;
    }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    .v3-referral-page-btn-primary,
    .v3-referral-page-btn-secondary,
    .v3-referral-page-step,
    .v3-referral-page-faq-item summary::after {
        transition: none !important;
    }
}
