/* ==========================================================================
   YS Stats — tarjetas de cristal con anillo animado, dinámicas y premium
   Identidad visual: navy #00247e · acento naranja #cd7d0b
   ========================================================================== */

.ys-stats {
	position: relative;
	padding: 100px 0 96px;
	background: radial-gradient(ellipse at top, #0c1f5e 0%, #050b24 60%, #03061a 100%);
	overflow: hidden;
	isolation: isolate;
}

/* ---------- Decorative background ---------- */
.ys-stats__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(90px);
	z-index: 0;
	pointer-events: none;
}

.ys-stats__glow--1 {
	width: 460px;
	height: 460px;
	top: -180px;
	left: -140px;
	background: radial-gradient(circle, rgba(205, 125, 11, .26), transparent 70%);
	animation: ysStatsDrift 12s ease-in-out infinite alternate;
}

.ys-stats__glow--2 {
	width: 520px;
	height: 520px;
	bottom: -220px;
	right: -160px;
	background: radial-gradient(circle, rgba(37, 99, 235, .22), transparent 70%);
	animation: ysStatsDrift 14s ease-in-out infinite alternate-reverse;
}

@keyframes ysStatsDrift {
	from { transform: translate(0, 0) scale(1); }
	to   { transform: translate(40px, -30px) scale(1.12); }
}

.ys-stats__grid-lines {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, .9), transparent 75%);
}

.ys-stats__container {
	position: relative;
	z-index: 1;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}

.ys-stats .ys-section-head {
	margin-bottom: 56px;
}

/* ---------- Grid ---------- */
.ys-stats__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 26px;
}

/* ---------- Glass card ---------- */
.ys-stat {
	position: relative;
	text-align: center;
	padding: 38px 22px 32px;
	border-radius: 18px;
	background: linear-gradient(155deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
	border: 1px solid rgba(255, 255, 255, .12);
	backdrop-filter: blur(10px);
	opacity: 0;
	transform: translateY(34px);
	transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .55s ease, border-color .35s ease, box-shadow .35s ease, background .35s ease;
}

.ys-stats.is-visible .ys-stat {
	opacity: 1;
	transform: translateY(0);
}

.ys-stats.is-visible .ys-stat:nth-child(1) { transition-delay: .08s; }
.ys-stats.is-visible .ys-stat:nth-child(2) { transition-delay: .2s; }
.ys-stats.is-visible .ys-stat:nth-child(3) { transition-delay: .32s; }
.ys-stats.is-visible .ys-stat:nth-child(4) { transition-delay: .44s; }

.ys-stat:hover {
	transform: translateY(-8px);
	border-color: rgba(205, 125, 11, .55);
	background: linear-gradient(155deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
	box-shadow: 0 22px 46px rgba(0, 0, 0, .4), 0 0 0 1px rgba(205, 125, 11, .25);
}

/* ---------- Icon + animated ring ---------- */
.ys-stat__ring {
	position: relative;
	width: 76px;
	height: 76px;
	margin: 0 auto 18px;
}

.ys-stat__ring svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.ys-stat__ring circle {
	fill: none;
	stroke: rgba(205, 125, 11, .4);
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-dasharray: 182;
	stroke-dashoffset: 0;
	animation: ysStatsRingSpin 5s linear infinite;
	transform-origin: center;
}

@keyframes ysStatsRingSpin {
	0%   { stroke-dasharray: 18 164; stroke-dashoffset: 0; }
	50%  { stroke-dasharray: 100 82; stroke-dashoffset: -90; }
	100% { stroke-dasharray: 18 164; stroke-dashoffset: -182; }
}

.ys-stat__icon {
	position: absolute;
	inset: 9px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	color: #f0a93a;
	background: rgba(205, 125, 11, .14);
	transition: transform .45s cubic-bezier(.2, .8, .2, 1), background .35s ease, color .35s ease;
}

.ys-stat:hover .ys-stat__icon {
	transform: scale(1.12) rotate(-6deg);
	background: linear-gradient(135deg, #f0a93a, #cd7d0b);
	color: #0c1330;
}

/* ---------- Number + label ---------- */
.ys-stat__number {
	font-family: 'Barlow', sans-serif;
	font-size: 34px;
	font-weight: 800;
	color: #ffffff;
	margin: 0;
	line-height: 1;
}

.ys-stat__number span {
	color: #f0a93a;
}

.ys-stat__label {
	margin: 8px 0 0;
	font-family: 'Lato', sans-serif;
	font-size: 13.5px;
	font-weight: 600;
	color: #b9c3e6;
	letter-spacing: .01em;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.ys-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 575px) {
	.ys-stats { padding: 70px 0; }
	.ys-stats__grid { grid-template-columns: 1fr; gap: 18px; }
	.ys-stat__number { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
	.ys-stats__glow,
	.ys-stat,
	.ys-stat__icon,
	.ys-stat__ring circle {
		animation: none !important;
		transition-duration: .01ms !important;
	}
}
