/* Metro Gulf 2025 — SVG animations + next-gen UI
 * ponytail: pure CSS animations, no libs. JS only for scroll reveal + counters.
 */

/* ---------- Keyframes ---------- */

@keyframes mg-draw {
	to { stroke-dashoffset: 0; }
}

@keyframes mg-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50%      { transform: scale(1.6); opacity: 0.4; }
}

@keyframes mg-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-12px); }
}

@keyframes mg-gradient-shift {
	0%   { background-position: 0% 50%; }
	50%  { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

@keyframes mg-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

@keyframes mg-shimmer {
	0%   { background-position: -200% 0; }
	100% { background-position: 200% 0; }
}

@keyframes mg-fade-up {
	from { opacity: 0; transform: translateY(40px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes mg-spin-slow {
	to { transform: rotate(360deg); }
}

/* ---------- Hero ---------- */

.mg-hero {
	position: relative;
	min-height: 88vh;
	overflow: hidden;
	background: radial-gradient(circle at 20% 30%, #1a3a38 0%, #101010 55%);
	color: #fff;
	display: flex;
	align-items: center;
}

.mg-hero__mesh {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 80% 20%, rgba(11, 180, 170, 0.25), transparent 40%),
		radial-gradient(circle at 10% 80%, rgba(94, 197, 189, 0.18), transparent 45%);
	background-size: 200% 200%;
	animation: mg-gradient-shift 18s ease infinite;
	pointer-events: none;
}

.mg-hero__svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	opacity: 0.9;
}

.mg-hero__svg path,
.mg-hero__svg line {
	stroke: #0bb4aa;
	stroke-width: 1.4;
	fill: none;
	stroke-dasharray: 600;
	stroke-dashoffset: 600;
	animation: mg-draw 3.5s ease forwards;
}

.mg-hero__svg line:nth-child(odd) { animation-delay: 0.4s; }
.mg-hero__svg line:nth-child(3n)  { animation-delay: 0.9s; stroke: #5ec5bd; }

.mg-node {
	fill: #0bb4aa;
	transform-box: fill-box;
	transform-origin: center;
	animation: mg-pulse 3s ease-in-out infinite;
}
.mg-node--alt { fill: #5ec5bd; animation-delay: 1.2s; }
.mg-node--lg  { animation-duration: 4s; }

.mg-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 30px;
	width: 100%;
}

.mg-hero h1 {
	font-family: 'Onest', sans-serif;
	font-weight: 700;
	font-size: clamp(34px, 6vw, 64px);
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0 0 18px;
	color: #fff;
	animation: mg-fade-up 0.9s ease 0.3s both;
}

.mg-hero__gradient-text {
	background: linear-gradient(90deg, #0bb4aa, #5ec5bd, #0bb4aa);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: mg-shimmer 6s linear infinite;
}

.mg-hero p {
	font-size: clamp(16px, 2.2vw, 20px);
	color: #D9D9D9;
	max-width: 620px;
	margin: 0 0 32px;
	animation: mg-fade-up 0.9s ease 0.6s both;
}

.mg-hero__ctas {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	animation: mg-fade-up 0.9s ease 0.9s both;
}

/* ---------- Buttons ---------- */

.mg-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: 999px;
	font-family: 'Onest', sans-serif;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.mg-btn:hover { transform: translateY(-2px); }

.mg-btn--primary {
	background: #0bb4aa;
	color: #fff;
	box-shadow: 0 8px 30px rgba(11, 180, 170, 0.35);
}
.mg-btn--primary:hover { background: #37746F; box-shadow: 0 12px 40px rgba(11, 180, 170, 0.5); }

.mg-btn--ghost {
	background: transparent;
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.mg-btn--ghost:hover { border-color: #0bb4aa; color: #0bb4aa; }

/* ---------- Section scaffold ---------- */

.mg-section {
	max-width: 1200px;
	margin: 0 auto;
	padding: 96px 30px;
}

.mg-section--wide { max-width: 1450px; }
.mg-section--tint { background: #f9fafd; }

.mg-eyebrow {
	display: inline-block;
	font-family: 'Onest', sans-serif;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #0bb4aa;
	margin-bottom: 12px;
}

.mg-section h2 {
	font-family: 'Onest', sans-serif;
	font-weight: 600;
	font-size: clamp(26px, 4vw, 40px);
	line-height: 1.2;
	margin: 0 0 16px;
	color: #101010;
}

.mg-lead {
	color: #6C6C77;
	font-size: 17px;
	max-width: 640px;
	margin: 0 0 48px;
}

/* ---------- Service cards with SVG draw-on-hover ---------- */

.mg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
}

.mg-card {
	position: relative;
	padding: 36px 28px;
	border-radius: 18px;
	background: #fff;
	border: 1px solid #E6E8EE;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.mg-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(11, 180, 170, 0.06), transparent 60%);
	opacity: 0;
	transition: opacity 0.3s ease;
}
.mg-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 50px rgba(16, 16, 16, 0.08);
	border-color: #0bb4aa;
}
.mg-card:hover::before { opacity: 1; }

.mg-card__icon {
	width: 56px;
	height: 56px;
	margin-bottom: 20px;
}
.mg-card__icon path,
.mg-card__icon circle,
.mg-card__icon line,
.mg-card__icon rect {
	stroke: #0bb4aa;
	stroke-width: 2;
	fill: none;
	stroke-dasharray: 200;
	stroke-dashoffset: 200;
	transition: stroke-dashoffset 0.8s ease;
}
.mg-card:hover .mg-card__icon path,
.mg-card:hover .mg-card__icon circle,
.mg-card:hover .mg-card__icon line,
.mg-card:hover .mg-card__icon rect {
	stroke-dashoffset: 0;
}

.mg-card h3 {
	font-family: 'Onest', sans-serif;
	font-size: 19px;
	font-weight: 600;
	margin: 0 0 10px;
	color: #101010;
}
.mg-card p {
	font-size: 15px;
	color: #6C6C77;
	margin: 0 0 18px;
	line-height: 1.7;
}
.mg-card__link {
	font-family: 'Onest', sans-serif;
	font-weight: 600;
	font-size: 14px;
	color: #0bb4aa;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.mg-card__link svg { width: 14px; height: 14px; transition: transform 0.25s ease; }
.mg-card__link:hover svg { transform: translateX(4px); }

/* ---------- Stat band ---------- */

.mg-stats {
	background: linear-gradient(135deg, #101010 0%, #0f2a28 100%);
	color: #fff;
	padding: 80px 30px;
}
.mg-stats__grid {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 32px;
	text-align: center;
}
.mg-stat__num {
	font-family: 'Onest', sans-serif;
	font-weight: 700;
	font-size: clamp(40px, 6vw, 64px);
	line-height: 1;
	color: #0bb4aa;
	display: block;
}
.mg-stat__num--alt { color: #5ec5bd; }
.mg-stat__label {
	display: block;
	margin-top: 10px;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #D9D9D9;
}

/* ---------- Client marquee ---------- */

.mg-marquee {
	overflow: hidden;
	padding: 56px 0;
	background: #fff;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.mg-marquee__track {
	display: flex;
	gap: 80px;
	width: max-content;
	animation: mg-marquee 28s linear infinite;
}
.mg-marquee:hover .mg-marquee__track { animation-play-state: paused; }
.mg-marquee__item {
	font-family: 'Onest', sans-serif;
	font-weight: 600;
	font-size: 22px;
	color: #6C6C77;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	opacity: 0.65;
	transition: opacity 0.25s ease, color 0.25s ease;
}
.mg-marquee__item:hover { opacity: 1; color: #0bb4aa; }
.mg-marquee__item svg { width: 24px; height: 24px; }

/* ---------- CTA banner with animated gradient border ---------- */

.mg-cta {
	position: relative;
	padding: 2px;
	border-radius: 24px;
	background: linear-gradient(120deg, #0bb4aa, #5ec5bd, #37746F, #0bb4aa);
	background-size: 300% 300%;
	animation: mg-gradient-shift 8s ease infinite;
	margin: 0 30px 96px;
	max-width: 1450px;
	margin-left: auto;
	margin-right: auto;
}
.mg-cta__inner {
	background: #0a1a19;
	border-radius: 22px;
	padding: 64px 40px;
	text-align: center;
	color: #fff;
}
.mg-cta h2 {
	color: #fff;
	margin: 0 0 14px;
}
.mg-cta p {
	color: #D9D9D9;
	max-width: 540px;
	margin: 0 auto 28px;
}

/* ---------- Scroll reveal ---------- */

.mg-reveal {
	opacity: 0;
	transform: translateY(36px);
	transition: opacity 0.7s ease, transform 0.7s ease;
	will-change: opacity, transform;
}
.mg-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}
.mg-reveal--delay-1 { transition-delay: 0.12s; }
.mg-reveal--delay-2 { transition-delay: 0.24s; }
.mg-reveal--delay-3 { transition-delay: 0.36s; }
.mg-reveal--delay-4 { transition-delay: 0.48s; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
	.mg-reveal { opacity: 1; transform: none; }
	.mg-hero__svg path,
	.mg-hero__svg line { stroke-dashoffset: 0; }
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
	.mg-hero { min-height: 78vh; }
	.mg-section { padding: 64px 24px; }
	.mg-cta { margin: 0 16px 64px; }
	.mg-cta__inner { padding: 44px 24px; }
	.mg-marquee__track { gap: 48px; }
}