/* Stat counter - In-numbers section */
/* Used across experience pages right after snapshot card */
.stat-counter-section {
    padding-block: var(--space-4);
}

.stat-counter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.stat-counter__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-2);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* The animated number — domain color threads through here */
.stat-counter__number {
    font-family: var(--font-body);
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-text-muted);
    /* default fallback */
    transition: color 0.3s ease;
}

/* Domain color on the number */
.stat-counter__item[data-domain="engineering"] .stat-counter__number {
    color: var(--color-domain-engineering);
}

.stat-counter__item[data-domain="data"] .stat-counter__number {
    color: var(--color-domain-data);
}

.stat-counter__item[data-domain="product"] .stat-counter__number {
    color: var(--color-domain-product);
}

.stat-counter__item[data-domain="growth"] .stat-counter__number {
    color: var(--color-domain-growth);
}

.stat-counter__label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.4;
    max-width: 14ch;
}

/* Scroll reveal — fade in as a group, no layout shift */
.stat-counter__item {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-counter__item.is-visible {
    opacity: 1;
}

/* Staggered delay per item */
.stat-counter__item:nth-child(1) {
    transition-delay: 0ms;
}

.stat-counter__item:nth-child(2) {
    transition-delay: 80ms;
}

.stat-counter__item:nth-child(3) {
    transition-delay: 160ms;
}

.stat-counter__item:nth-child(4) {
    transition-delay: 240ms;
}

/* Mobile — 2×2 grid */
@media (max-width: 640px) {
    .stat-counter {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8) var(--space-4);
    }
}

/* NC Site Builder Injection */
/* note: this injection is designed to fix issues caused by Namecheap Sitebuilder */
.stat-counter {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
}

.stat-counter__number {
    font-size: clamp(2rem, 5vw, 4rem) !important;
    line-height: 1 !important;
}

.stat-counter__label {
    margin-top: 10px;
}

@media (max-width: 900px) {
    .stat-counter {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .stat-counter {
        grid-template-columns: 1fr !important;
    }
}
