/*==============================================
   KIMST home page: numbers band ("stats")
   Count-up is driven by stats.js. Uses .kh-reveal (home.css).
===============================================*/

.kh-stats {
    --kh-green: #108543;
    --kh-green-300: #8fe0b0;
    --kh-red: #d02010;
    --kh-ease: cubic-bezier(.22, 1, .36, 1);

    position: relative;
    overflow: hidden;
    padding: 52px 0;
    color: #fff;
    font-family: var(--kh-font-ui);
    background:
        radial-gradient(700px 320px at 8% 0%, rgba(143, 224, 176, .22), transparent 62%),
        radial-gradient(640px 300px at 100% 100%, rgba(7, 61, 32, .55), transparent 62%),
        linear-gradient(120deg, #0a5a2e 0%, #0e7a3d 55%, #108543 100%);
}

/* dotted texture + a large ring, same visual language as the hero */
.kh-stats::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .1) 1.5px, transparent 1.6px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 65%);
    mask-image: linear-gradient(100deg, #000 0%, transparent 65%);
    pointer-events: none;
}

.kh-stats::after {
    content: "";
    position: absolute;
    right: -180px;
    top: -240px;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(255, 255, 255, .03), 0 0 0 110px rgba(255, 255, 255, .02);
    pointer-events: none;
}

.kh-stats .container {
    position: relative;
    z-index: 1;
}

.kh-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* visually hidden text for screen readers (the animated number is aria-hidden) */
.kh-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/*---------- Stat card ----------*/

.kh-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 30px 18px 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
    text-align: center;
    transition: transform .35s var(--kh-ease), background .35s ease, border-color .35s ease;
}

/* light bar along the top edge */
.kh-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22%;
    right: 22%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, transparent, var(--kh-green-300), transparent);
    opacity: .85;
}

.kh-stat:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, .34);
    background: linear-gradient(160deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07));
}

.kh-stat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 7px rgba(255, 255, 255, .14), 0 14px 28px rgba(0, 0, 0, .2);
    color: var(--kh-green);
    font-size: 26px;
    transition: transform .4s var(--kh-ease);
}

.kh-stat__icon i {
    line-height: 1;
}

.kh-stat:hover .kh-stat__icon {
    transform: rotate(-8deg) scale(1.08);
}

.kh-stat__figure {
    position: relative;
}

.kh-stat__value {
    display: inline-flex;
    align-items: flex-start;
    color: #fff;
    font-size: clamp(40px, 4.4vw, 56px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}

.kh-stat__plus {
    margin: 2px 0 0 2px;
    color: var(--kh-green-300);
    font-size: .62em;
    font-weight: 700;
    line-height: 1.2;
}

.kh-stats p.kh-stat__label {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, .86);
    font-family: var(--kh-font-ui);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/*---------- Responsive ----------*/

@media (max-width: 991.98px) {
    .kh-stats {
        padding: 44px 0;
    }

    .kh-stats__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 575.98px) {
    .kh-stats {
        padding: 36px 0;
    }

    .kh-stats__grid {
        gap: 14px;
    }

    .kh-stat {
        padding: 24px 12px 20px;
        border-radius: 18px;
    }

    .kh-stat__icon {
        width: 52px;
        height: 52px;
        margin-bottom: 14px;
        box-shadow: 0 0 0 5px rgba(255, 255, 255, .14), 0 10px 22px rgba(0, 0, 0, .2);
        font-size: 22px;
    }

    .kh-stats p.kh-stat__label {
        font-size: 12px;
        letter-spacing: .08em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kh-stat,
    .kh-stat__icon {
        transition: none;
    }

    .kh-stat:hover,
    .kh-stat:hover .kh-stat__icon {
        transform: none;
    }
}
