/* ==========================================================================
   Fortune Group — key numbers as premium stat cards
   ========================================================================== */
.gf-stats {
  --s-ink: #1b1f24;
  --s-soft: #5a636d;
  --s-red: #d90a0a;
  --s-grad: linear-gradient(100deg, #ff3b2f 0%, #d90a0a 45%, #7e0606 100%);
  --s-font: "Archivo", "Manrope", system-ui, sans-serif;
  --s-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  padding: clamp(60px, 7vw, 100px) 0;
  background: linear-gradient(180deg, #fff 0%, #f3f5f7 100%);
}
.gf-stats::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(27,31,36,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(27,31,36,.045) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(60% 80% at 50% 50%, #000, transparent 80%); mask-image: radial-gradient(60% 80% at 50% 50%, #000, transparent 80%); }
.gf-stats__grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }

.gf-stat {
  position: relative; overflow: hidden;
  padding: 28px 26px 26px;
  background: #fff;
  border: 1.5px solid rgba(188, 0, 0, 0.10);
  border-radius: 22px;
  isolation: isolate;
  opacity: 0; transform: translateY(22px);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.38s, border-color 0.38s;
}
.gf-stats.is-in .gf-stat { opacity: 1; transform: none; transition: opacity 0.6s ease calc(var(--i) * 0.12s), transform 0.7s var(--s-ease) calc(var(--i) * 0.12s), box-shadow 0.38s, border-color 0.38s; }
.gf-stat::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #BC0000; transform: scaleX(0); transform-origin: left; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.gf-stat::after { /* big faint outlined number in the corner, like a part number */
  content: attr(data-ghost); position: absolute; right: -6px; bottom: -22px; z-index: -1;
  font: 800 110px/1 var(--s-font); font-variation-settings: "wdth" 120; letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 1px rgba(188, 0, 0, 0.08);
}
.gf-stat:hover { transform: translateY(-8px); box-shadow: 0 12px 40px rgba(188, 0, 0, 0.18); border-color: rgba(188, 0, 0, 0.22); }
.gf-stat:hover::before { transform: scaleX(1); }

/* icon with a dial-gauge ring that sweeps round as the number counts up */
.gf-stat__top { position: relative; width: 64px; height: 64px; margin-bottom: 22px; }
.gf-stat__icon { position: absolute; inset: 8px; display: grid; place-items: center; border-radius: 50%; background: rgba(188, 0, 0, 0.10); color: #BC0000; font-size: 20px; transition: background 0.35s, color 0.35s; }
.gf-stat:hover .gf-stat__icon { background: #BC0000; color: #fff; }
.gf-stat__gauge { position: absolute; inset: 0; width: 64px; height: 64px; transform: rotate(-90deg); }
.gf-stat__track { fill: none; stroke: rgba(27, 31, 36, 0.08); stroke-width: 3; }
.gf-stat__arc { fill: none; stroke: #d90a0a; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 2s cubic-bezier(0.3, 0.6, 0.2, 1) calc(var(--i) * 0.12s + 0.2s); }
.gf-stats.is-in .gf-stat__arc { stroke-dashoffset: 18; }

.gf-stat__num { display: flex; align-items: flex-start; gap: 2px; margin-bottom: 8px; font: 800 clamp(40px, 4vw, 60px)/1 var(--s-font); font-variation-settings: "wdth" 112; letter-spacing: -0.04em; color: var(--s-ink); font-variant-numeric: tabular-nums; }
.gf-stat__num sup { top: 0; font-size: 0.5em; line-height: 1; background: var(--s-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gf-stat__label { margin-bottom: 8px; font: 700 17px/1.3 var(--s-font); color: var(--s-ink); }
.gf-stat__note { margin: 0; font-size: 14px; line-height: 1.6; color: var(--s-soft); }

@media (max-width: 991px) { .gf-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gf-stats__grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .gf-stat { opacity: 1; transform: none; } .gf-stat__arc { transition: none; stroke-dashoffset: 18; } }

/* ==========================================================================
   v2 — red gradient stage with floating CNC parts
   ========================================================================== */
.gf-stats {
  overflow: hidden;
  padding: clamp(80px, 9vw, 130px) 0;
  background:
    radial-gradient(60% 80% at 15% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 60%),
    radial-gradient(50% 70% at 100% 100%, rgba(60, 0, 0, 0.45), rgba(60, 0, 0, 0) 70%),
    linear-gradient(120deg, #ff3b2f 0%, #d90a0a 45%, #7e0606 100%);
}
.gf-stats::before { /* machinist grid in white */
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  -webkit-mask-image: none; mask-image: none;
}
/* floating parts */
.gf-stats__parts { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.gf-part {
  position: absolute; height: auto;
  fill: none; stroke: rgba(255, 255, 255, 0.38); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round;
  filter: drop-shadow(0 10px 18px rgba(60, 0, 0, 0.35));
  animation: gf-part-float var(--d) ease-in-out var(--dl) infinite, gf-part-spin calc(var(--d) * 3) linear var(--dl) infinite;
}
.gf-part:nth-child(even) { stroke: rgba(255, 255, 255, 0.24); }
@keyframes gf-part-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -26px; } }
@keyframes gf-part-spin { to { rotate: calc(var(--r) * 360deg); } }
.gf-stats .auto-container { position: relative; z-index: 1; }

/* cards: crisp white on the red stage */
.gf-stat { border-color: rgba(255, 255, 255, 0.6); box-shadow: 0 30px 60px -30px rgba(60, 0, 0, 0.6); }
.gf-stat:hover { box-shadow: 0 40px 70px -30px rgba(60, 0, 0, 0.75); border-color: #fff; }

@media (max-width: 767px) { .gf-part:nth-child(n+6) { display: none; } }
@media (prefers-reduced-motion: reduce) { .gf-part { animation: none; } }

/* ==========================================================================
   v3 — shorter stage, frosted-glass instrument cards
   ========================================================================== */
.gf-stats { padding: clamp(44px, 5vw, 72px) 0; }
.gf-stats__grid { gap: 16px; }
.gf-stat {
  display: grid; grid-template-columns: 58px 1fr; column-gap: 16px; align-items: center;
  padding: 20px 20px 18px;
  background: linear-gradient(150deg, rgba(255,255,255,.20), rgba(255,255,255,.06));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 24px 50px -28px rgba(50,0,0,.7);
  color: #fff;
}
/* corner registration marks, like a machined plate */
.gf-stat::before {
  top: 10px; right: 10px; left: auto; width: 14px; height: 14px; background: none;
  border-top: 1.5px solid rgba(255,255,255,.55); border-right: 1.5px solid rgba(255,255,255,.55);
  transform: none; border-radius: 0 4px 0 0; transition: width .35s, height .35s, border-color .35s;
}
.gf-stat::after { -webkit-text-stroke: 1px rgba(255,255,255,.10); font-size: 84px; bottom: -16px; }
.gf-stat:hover { transform: translateY(-6px); background: linear-gradient(150deg, rgba(255,255,255,.28), rgba(255,255,255,.10)); border-color: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 30px 60px -28px rgba(50,0,0,.85); }
.gf-stat:hover::before { transform: none; width: 26px; height: 26px; border-color: #fff; }

.gf-stat__top { grid-row: 1 / span 2; width: 58px; height: 58px; margin: 0; }
.gf-stat__gauge { width: 58px; height: 58px; }
.gf-stat__icon { inset: 8px; background: #fff; color: #c00; font-size: 17px; box-shadow: 0 6px 14px -6px rgba(50,0,0,.6); }
.gf-stat:hover .gf-stat__icon { background: #fff; color: #7e0606; }
.gf-stat__track { stroke: rgba(255,255,255,.22); }
.gf-stat__arc { stroke: #fff; }

.gf-stat__num { margin: 0; font-size: clamp(32px, 2.8vw, 44px); color: #fff; }
.gf-stat__num sup { background: none; color: rgba(255,255,255,.75); -webkit-text-fill-color: currentColor; }
.gf-stat__label { grid-column: 2; margin: 2px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.gf-stat__note { grid-column: 1 / -1; margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,.28); font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.78); }

.gf-part { stroke: rgba(255,255,255,.30); }
.gf-part:nth-child(even) { stroke: rgba(255,255,255,.18); }

@media (max-width: 520px) {
  .gf-stats__grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .gf-stat { grid-template-columns: 1fr; padding: 16px 14px; }
  .gf-stat__top { grid-row: auto; width: 46px; height: 46px; margin-bottom: 10px; }
  .gf-stat__gauge { width: 46px; height: 46px; }
  .gf-stat__icon { inset: 6px; font-size: 14px; }
  .gf-stat__label { grid-column: 1; font-size: 11px; }
  .gf-stat__note { display: none; }
}
