/**
 * home.css — RefreshBalance Premium Homepage
 * Fine-tuned design: hero, stats, articles, feature cards, CTA band.
 */

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
    --rb-hue: 0deg;
    --rb-bg: #f8f9fc;
    --rb-white: #ffffff;
    --rb-dark: #0d0f1a;
    --rb-mid: #4a5168;
    --rb-violet: #7c3aed;
    --rb-teal: #0d9488;
    --rb-rose: #e11d48;
    --rb-amber: #d97706;
    --rb-indigo: #4f46e5;
    --rb-shadow-card: 0 4px 24px -6px rgba(13, 15, 26, 0.08);
    --rb-shadow-lift: 0 16px 48px -12px rgba(124, 58, 237, 0.18);
    --rb-radius-card: 22px;
    --rb-transition: 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Global wrapper ─────────────────────────────────────────── */
.rb-home-wrap {
    background: var(--rb-bg);
    overflow-x: hidden;
}

/* ─── Container ─────────────────────────────────────────────── */
.rb-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Gradient text ─────────────────────────────────────────── */
.rb-grad {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #0d9488 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* No hue-rotate: keeps the violet→teal brand colours fixed */
}

/* ─── Scroll Reveals ─────────────────────────────────────────── */
.rb-anim {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--rb-transition), transform 0.7s var(--rb-transition);
}

.rb-anim.rb-visible {
    opacity: 1;
    transform: none;
}

.rb-anim-d1 {
    transition-delay: 0.08s;
}

.rb-anim-d2 {
    transition-delay: 0.16s;
}

.rb-anim-d3 {
    transition-delay: 0.24s;
}

.rb-anim-d4 {
    transition-delay: 0.32s;
}

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.rb-hero {
    position: relative;
    background:
        linear-gradient(160deg, #f5f3ff 0%, #eef2ff 30%, #f0fdf9 65%, #fef3f8 100%);
    overflow: hidden;
    padding: 2rem 2rem 0;
    text-align: center;
    /* Compact hero */
}

/* Floating orbs */
.rb-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    transition: transform 0.8s ease;
}

.rb-orb-1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12), transparent 65%);
    top: -15%;
    left: -8%;
    filter: blur(60px);
}

.rb-orb-2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.12), transparent 65%);
    top: 10%;
    right: -5%;
    filter: blur(50px);
}

.rb-orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.07), transparent 65%);
    bottom: 30%;
    left: 45%;
    filter: blur(40px);
}

/* Chip */
.rb-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 1.1rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--rb-indigo);
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.08);
}

.rb-chip-dot {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: chip-pulse 2.2s ease-in-out infinite;
}

@keyframes chip-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(1.6);
    }
}

/* Heading */
.rb-hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--rb-dark);
    margin: 0 auto 1.4rem;
    max-width: 18ch;
}

/* Subtitle */
.rb-hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--rb-mid);
    line-height: 1.7;
    max-width: 52ch;
    margin: 0 auto 2.2rem;
}

/* CTAs */
.rb-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.rb-btn-pry {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.875rem 2.25rem;
    background: linear-gradient(135deg, var(--rb-violet), var(--rb-indigo));
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 8px 24px -4px rgba(124, 58, 237, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rb-btn-pry:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px -6px rgba(124, 58, 237, 0.5);
}

.rb-btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 2.25rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    color: var(--rb-dark);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1.5px solid rgba(13, 15, 26, 0.1);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.rb-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(13, 15, 26, 0.2);
}

/* Trust strip */
.rb-trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.2rem;
    margin-bottom: 1.5rem;
    /* was 3.5rem — this caused the large gap */
}

.rb-trust-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
}

.rb-trust-logo {
    font-size: 0.8rem;
    font-weight: 800;
    color: #9ca3af;
}

.rb-trust-sep {
    color: #d1d5db;
    font-size: 0.8rem;
}

/* ECG wave at hero bottom — flush with no gap */
.rb-hero-divider {
    position: relative;
    z-index: 10;
    margin-top: -28px;
    line-height: 0;
    overflow: visible;
    pointer-events: none;
}

.rb-hero-divider svg {
    display: block;
    width: 100%;
    height: 50px;
}

/* ECG Line Animation */
.rb-ecg-line {
    /* Full line is rendered solid. The gradient itself is animated via SVG animateTransform */
    filter: drop-shadow(0 0 4px rgba(124, 58, 237, 0.4));
}

/* ════════════════════════════════════════════════════════════
   STATS BAR
   ════════════════════════════════════════════════════════════ */
.rb-stats-bar {
    background: var(--rb-white);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 1.75rem 2rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.rb-stat {
    text-align: center;
    padding: 0 2.5rem;
}

.rb-stat-div {
    width: 1px;
    height: 36px;
    background: rgba(0, 0, 0, 0.08);
}

.rb-num {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #0d9488 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.rb-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--rb-indigo);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.4rem;
}

/* ════════════════════════════════════════════════════════════
   SHARED SECTION STYLES
   ════════════════════════════════════════════════════════════ */
.rb-section {
    padding: 5rem 0;
}

.rb-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.rb-section-label-wrap {
    text-align: center;
    margin-bottom: 3rem;
}

.rb-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--rb-indigo);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.75rem;
}

.rb-section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.7rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--rb-dark);
    line-height: 1.15;
    margin: 0;
}

/* Live badge */
.rb-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--rb-rose);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.rb-live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--rb-rose);
    border-radius: 50%;
    animation: blink 1.8s infinite;
    display: none;
    /* Already inserted as "●" text */
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 6px rgba(225, 29, 72, 0.8);
    }

    50% {
        opacity: 0.2;
        box-shadow: none;
    }
}

/* View all link */
.rb-viewall {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--rb-indigo);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.rb-arrow {
    margin-left: 0.35rem;
    transition: transform 0.2s ease;
}

.rb-viewall:hover {
    color: var(--rb-dark);
}

.rb-viewall:hover .rb-arrow {
    transform: translateX(5px);
}

/* Articles section background */
.rb-section-articles {
    background: var(--rb-white);
}

/* Article grid (rendered by shortcode) */
.rb-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
}

.rb-article-card {
    display: block;
    text-decoration: none;
    background: var(--rb-white);
    border-radius: var(--rb-radius-card);
    overflow: hidden;
    box-shadow: var(--rb-shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform var(--rb-transition), box-shadow var(--rb-transition);
}

.rb-article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--rb-shadow-lift);
}

.rb-article-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f1f5f9;
}

.rb-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.rb-article-card:hover .rb-article-image img {
    transform: scale(1.06);
}

.rb-article-content {
    padding: 1.4rem 1.5rem 1.6rem;
}

.rb-article-content h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rb-dark);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.rb-article-content p {
    font-size: 0.84rem;
    color: var(--rb-mid);
    margin: 0;
    line-height: 1.55;
}

/* ════════════════════════════════════════════════════════════
   FEATURE CARDS
   ════════════════════════════════════════════════════════════ */
.rb-section-features {
    background: var(--rb-bg);
}

.rb-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.75rem;
}

.rb-card {
    background: var(--rb-white);
    border-radius: var(--rb-radius-card);
    padding: 2.25rem 2rem 2rem;
    box-shadow: var(--rb-shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform var(--rb-transition), box-shadow var(--rb-transition), background 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Per-card coloured gradient hover backgrounds */
.rb-card:nth-child(1):hover {
    background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
    box-shadow: 0 20px 48px -12px rgba(124, 58, 237, 0.2);
    transform: translateY(-7px);
}

.rb-card:nth-child(2):hover {
    background: linear-gradient(145deg, #f0fdf9 0%, #ccfbf1 100%);
    box-shadow: 0 20px 48px -12px rgba(13, 148, 136, 0.2);
    transform: translateY(-7px);
}

.rb-card:nth-child(3):hover {
    background: linear-gradient(145deg, #fff1f2 0%, #ffe4e6 100%);
    box-shadow: 0 20px 48px -12px rgba(225, 29, 72, 0.15);
    transform: translateY(-7px);
}

.rb-card:nth-child(4):hover {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    box-shadow: 0 20px 48px -12px rgba(217, 119, 6, 0.18);
    transform: translateY(-7px);
}

.rb-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.ic-violet {
    background: rgba(124, 58, 237, 0.1);
}

.ic-teal {
    background: rgba(13, 148, 136, 0.1);
}

.ic-rose {
    background: rgba(225, 29, 72, 0.1);
}

.ic-amber {
    background: rgba(217, 119, 6, 0.1);
}

.rb-tag {
    display: inline-block;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.9rem;
}

.tag-violet {
    color: var(--rb-violet);
    background: rgba(124, 58, 237, 0.1);
}

.tag-teal {
    color: var(--rb-teal);
    background: rgba(13, 148, 136, 0.1);
}

.tag-rose {
    color: var(--rb-rose);
    background: rgba(225, 29, 72, 0.1);
}

.tag-amber {
    color: var(--rb-amber);
    background: rgba(217, 119, 6, 0.1);
}

.rb-card h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--rb-dark);
    margin: 0 0 0.6rem;
}

.rb-card p {
    font-size: 0.875rem;
    color: var(--rb-mid);
    line-height: 1.65;
    margin: 0 0 1.2rem;
    flex: 1;
}

.rb-card-link {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--rb-indigo);
    text-decoration: none;
    transition: color 0.2s ease;
}

.rb-card-link:hover {
    color: var(--rb-dark);
}

/* ════════════════════════════════════════════════════════════
   CTA SECTION — light background, vibrant card
   ════════════════════════════════════════════════════════════ */
.rb-cta-section {
    background: var(--rb-bg);
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.rb-cta-card {
    background: linear-gradient(135deg, #6d28d9 0%, #2563eb 50%, #0d9488 100%);
    border-radius: 28px;
    padding: 3.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 20px 60px -12px rgba(109, 40, 217, 0.35);
    position: relative;
    overflow: hidden;
}

.rb-cta-orb {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
    top: -40%;
    right: 5%;
    filter: blur(40px);
    pointer-events: none;
}

.rb-cta-orb-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
    bottom: -30%;
    left: 20%;
}

.rb-cta-text {
    position: relative;
    z-index: 2;
}

.rb-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

/* Animated gradient shimmer button */
@keyframes shimmer-slide {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

.rb-btn-white {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.9rem 2.2rem;
    background: linear-gradient(90deg,
            #7c3aed 0%, #4f46e5 25%, #0d9488 50%, #4f46e5 75%, #7c3aed 100%);
    background-size: 300% auto;
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 20px -4px rgba(124, 58, 237, 0.5);
    animation: shimmer-slide 4s linear infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.rb-btn-white::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
            transparent 40%, rgba(255, 255, 255, 0.18) 50%, transparent 60%);
    background-size: 200% 100%;
    animation: shimmer-slide 2s ease-in-out infinite;
}

.rb-btn-white:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px -6px rgba(124, 58, 237, 0.65);
}

.rb-btn-outline-white {
    display: inline-flex;
    padding: 0.85rem 2rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.rb-btn-outline-white:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .rb-stats-bar {
        gap: 1rem;
    }

    .rb-stat {
        padding: 0 1.5rem;
    }

    .rb-stat-div {
        height: 30px;
    }
}

@media (max-width: 768px) {
    .rb-hero {
        padding-top: 4rem;
    }

    .rb-section {
        padding: 3.5rem 0;
    }

    .rb-stats-bar {
        padding: 2rem 1rem;
    }

    .rb-stat {
        flex: 1 1 42%;
        padding: 0.5rem 1rem;
    }

    .rb-stat-div {
        display: none;
    }

    .rb-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .rb-cta-card {
        flex-direction: column;
        padding: 2.5rem 1.75rem;
        text-align: center;
    }

    .rb-cta-buttons {
        justify-content: center;
    }

    .rb-hero-title {
        font-size: clamp(1.9rem, 8vw, 3rem);
    }

    .rb-cards-grid {
        grid-template-columns: 1fr;
    }

    .rb-tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .rb-container {
        padding: 0 1.25rem;
    }

    .rb-hero {
        padding: 3.5rem 1.25rem 0;
    }

    .rb-hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .rb-btn-pry,
    .rb-btn-ghost {
        width: 100%;
        justify-content: center;
    }
}