/* =====================================================================
   BY THE NUMBERS - 3D scoreboard
   No cards: one wide board tilted back in 3D that stands upright on
   scroll; each number rolls into place on odometer-style digit reels.
   ===================================================================== */
.numbers3d { position: relative; padding: 120px 0 120px; overflow: hidden; }
.numbers3d::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(60% 50% at 50% 65%, rgba(32,156,207,.12), transparent 70%), radial-gradient(30% 40% at 15% 20%, rgba(199,207,21,.05), transparent 70%); }

.n3-head { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 50px; }
.n3-heading { margin: 12px 0 0; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(3.2rem, 7vw, 7.4rem); line-height: .92; letter-spacing: -.025em; color: #fff; }
.n3-heading em { font-style: italic; color: #c7cf15; }
.n3-sub { margin: 0 0 14px; max-width: 380px; font-size: 1.05rem; line-height: 1.6; color: rgba(255,255,255,.65); text-align: right; }

/* ---- board ---- */
.n3-stage { perspective: 1400px; perspective-origin: 50% 0%; }
.n3-board {
    position: relative; display: grid; grid-template-columns: repeat(5, 1fr); transform-style: preserve-3d; transform-origin: 50% 100%;
    border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0));
    transform: rotateX(calc(var(--py, 0) * -6deg)) rotateY(calc(var(--px, 0) * 8deg));
    transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
/* moving light along the top edge */
.n3-board::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 30%;
    background: linear-gradient(90deg, transparent, #c7cf15, #209ccf, transparent); animation: n3scan 5s linear infinite; }
@keyframes n3scan { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

.n3-stat { position: relative; padding: clamp(30px, 4vw, 54px) clamp(14px, 1.8vw, 28px); display: grid; gap: 10px; align-content: start; transition: background .4s; }
.n3-stat + .n3-stat { border-left: 1px solid rgba(255,255,255,.1); }
.n3-stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; transform: scaleX(0); transform-origin: left;
    background: linear-gradient(90deg, #c7cf15, #209ccf); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.n3-stat:hover { background: rgba(32,156,207,.06); }
.n3-stat:hover::after { transform: scaleX(1); }

.n3-num { display: flex; align-items: flex-start; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(3.4rem, 6.2vw, 6.8rem); line-height: 1; letter-spacing: -.02em; color: #fff; }
.n3-suffix { font-size: .55em; line-height: 1.2; margin-left: .04em; color: #c7cf15; }
/* digit reels (built by JS) */
.n3-digits { display: inline-flex; }
.n3-reel { position: relative; display: inline-block; height: 1em; overflow: hidden; width: .56em; text-align: center;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%); }
.n3-strip { display: flex; flex-direction: column; will-change: transform; }
.n3-strip span { display: block; height: 1em; line-height: 1em; }

.n3-label { font-size: clamp(.98rem, 1.1vw, 1.1rem); font-weight: 600; color: #fff; letter-spacing: -.005em; }
.n3-meta { font-size: .84rem; color: rgba(255,255,255,.5); }

@media (max-width: 1000px) {
    .n3-head { flex-direction: column; align-items: flex-start; }
    .n3-sub { text-align: left; }
    .n3-board { grid-template-columns: repeat(2, 1fr); }
    .n3-stat + .n3-stat { border-left: 0; }
    .n3-stat { border-top: 1px solid rgba(255,255,255,.08); }
    .n3-stat:nth-child(even) { border-left: 1px solid rgba(255,255,255,.1); }
    .n3-stat:first-child { grid-column: 1 / -1; border-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .n3-board { transform: none; transition: none; } .n3-board::before { animation: none; } }
