/* =====================================================
   Stats Bar — Capital Flex
   All values use CSS custom properties only.
   ===================================================== */

.stats {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

/* ---- Eyebrow label ---- */

.stats__eyebrow {
    text-align: center;
    margin-bottom: var(--space-10);
    justify-content: center;
}

/* ---- 4-column grid with dividers ---- */

.stats__grid {
    display: flex;
    align-items: center;
    gap: 0;
}

/* ---- Individual stat ---- */

.stats__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-6) var(--space-8);
    gap: var(--space-2);
}

/* ---- Number + suffix row ---- */

.stats__value {
    display: flex;
    align-items: baseline;
    gap: var(--space-1);
    line-height: 1;
}

.stats__number {
    font-family: var(--font-heading);
    font-weight: var(--fw-extrabold);
    font-size: var(--text-h1);
    color: var(--color-primary-light);
    letter-spacing: -0.02em;
    line-height: 1;
    transition: color var(--ease-base);
}

.stats__suffix {
    font-family: var(--font-heading);
    font-weight: var(--fw-extrabold);
    font-size: var(--text-h2);
    color: var(--color-primary-light);
    letter-spacing: -0.02em;
    line-height: 1;
}

/* ---- Label ---- */

.stats__item-label {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: var(--space-1);
}

/* ---- Vertical dividers ---- */

.stats__divider {
    width: 1px;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* ---- Counter animation state ---- */

.stats__number.is-animating {
    color: var(--color-white);
}

/* =====================================================
   Responsive — Tablet ≤ 768px
   ===================================================== */

@media (max-width: 768px) {
    .stats__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    /* Hide vertical dividers on mobile grid */
    .stats__divider {
        display: none;
    }

    .stats__item {
        padding: var(--space-8) var(--space-6);
        position: relative;
    }

    /* Subtle border between cells */
    .stats__item:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }

    .stats__item:nth-child(-n+4) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* Remove bottom border from last row */
    .stats__item:nth-last-child(-n+4):nth-child(odd),
    .stats__item:nth-last-child(-n+4):nth-child(even) {
        border-bottom: none;
    }
}

/* =====================================================
   Responsive — Small mobile ≤ 640px
   ===================================================== */

@media (max-width: 640px) {
    .stats {
        padding-top: var(--space-12);
        padding-bottom: var(--space-12);
    }

    .stats__item {
        padding: var(--space-6) var(--space-4);
    }

    .stats__item-label {
        font-size: var(--text-xs);
    }
}
