/* ==================================================
   Homepage Stats Section — isolated rebuild
   The legacy site CSS (index_style.css) still styles .stat-item /
   .counter / .split-text etc. elsewhere (needed as JS hooks -- the
   counter count-up script selects by these exact class names). Rather
   than fight that cascade property-by-property again, every element in
   this section is hard-reset with `all: revert` first, THEN styled
   fresh from a blank slate using only the amzy-stats-* classes below.
   No legacy rule can bleed through this boundary.
   ================================================== */
:root {
    --hs-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
    --hs-orange: #ff5e14;
    --hs-ink: #14161a;
    --hs-muted: #6b7280;
    --hs-line: #e4e6eb;
}

/* Reset boundary: every element inside .amzy-stats starts from the
   browser default, wiping the legacy card/glow/animation styles. */
.amzy-stats,
.amzy-stats * {
    all: revert;
    box-sizing: border-box;
}

.amzy-stats {
    display: block;
    background: #fff;
    padding: 100px 0 90px;
    font-family: var(--hs-font);
}

.amzy-stats .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.amzy-stats-heading {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}

.amzy-stats .split-text {
    display: block;
    font-family: var(--hs-font);
    font-weight: 500;
    font-size: clamp(30px, 3.6vw, 44px);
    line-height: 1.28;
    letter-spacing: -0.015em;
    color: var(--hs-ink);
    margin: 0;
    /* The old JS sets an inline slide-in animation on this element on
       scroll -- !important is required to beat that inline style. */
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

.amzy-stats-hairline {
    display: block;
    max-width: 1120px;
    margin: 0 auto 54px;
    height: 1px;
    background: linear-gradient(90deg,
        var(--hs-line) 0%, var(--hs-line) 38%,
        var(--hs-orange) 50%,
        var(--hs-line) 62%, var(--hs-line) 100%);
    opacity: 0.6;
}

.amzy-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 1120px;
    margin: 0 auto;
}

/* .stat-item is still selected by the old entrance-animation JS
   (adds .animated, sets an inline float animation). Force it to plain
   and static -- visible immediately, no motion beyond the hover below. */
.amzy-stats .stat-item {
    display: block;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

.amzy-stat {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.amzy-stat-number {
    display: block;
    font-family: var(--hs-font);
    font-weight: 300;
    font-size: clamp(30px, 3vw, 38px);
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--hs-ink);
    margin: 0 0 14px;
    transition: color 0.2s ease;
}

/* Hover: only the number tints orange. Nothing else moves. */
.amzy-stat:hover .amzy-stat-number {
    color: var(--hs-orange);
}

.amzy-stats .counter-plus,
.amzy-stats .counter,
.amzy-stats .rating-number {
    display: inline;
    font: inherit;
    color: inherit;
    /* The JS adds a "finalPulse" inline animation once counting finishes. */
    animation: none !important;
}

.amzy-stat-label {
    display: block;
    font-family: var(--hs-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    color: var(--hs-muted);
    margin: 0;
}

/* --- Tablet --- */
@media (max-width: 992px) {
    .amzy-stats-grid { gap: 24px; }
}

/* --- Mobile: same look, scaled down -- single row of 4, never wraps
   into 2x2, no fixed heights so multi-line labels never get clipped. --- */
@media (max-width: 768px) {
    .amzy-stats { padding: 56px 0 52px; }
    .amzy-stats-heading { margin-bottom: 30px; padding: 0 20px; }
    .amzy-stats .split-text { font-size: 22px; line-height: 1.3; }
    .amzy-stats-hairline { margin: 0 16px 26px; max-width: calc(100% - 32px); }

    .amzy-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin: 0 16px;
        max-width: calc(100% - 32px);
        align-items: start;
    }

    .amzy-stat-number { font-size: 17px; margin-bottom: 6px; }
    .amzy-stat-label { font-size: 9.5px; line-height: 1.3; }
}

@media (prefers-reduced-motion: reduce) {
    .amzy-stat-number { transition: none; }
}
