/* ============================================================
   Stages Section — «6 Steps Transformation Map»
   ============================================================
   Dark background — matches Hero → Pains → Services rhythm.
   Glass cards, glowing transformation path, hi-tech vibe.
   ============================================================ */

/* ———————————————————————
   Section Background — dark
   ——————————————————————— */

section.stages-section.section {
	position: relative;
	background-color: #0d0d20 !important;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Subtle background pattern — dot matrix + fine grid */
section.stages-section.section::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
		radial-gradient(rgba(255, 94, 20, 0.05) 1px, transparent 1px);
	background-size: 50px 50px, 50px 50px, 25px 25px;
	-webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 45%, transparent 72%);
	mask-image: radial-gradient(ellipse at 50% 50%, black 45%, transparent 72%);
	pointer-events: none;
}

/* Ambient orange glow — bottom-right */
section.stages-section.section::after {
	content: '';
	position: absolute;
	bottom: -150px;
	right: -100px;
	width: 450px;
	height: 450px;
	background: radial-gradient(circle, rgba(255, 94, 20, 0.04) 0%, transparent 65%);
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}

/* ———————————————————————
   Transformation Path — curved flowing line
   ——————————————————————— */

.stages-path {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 100%;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

/* Flowing curve line — brighter on dark bg */
.stages-path::before {
	content: '';
	position: absolute;
	top: 50%;
	left: -5%;
	width: 110%;
	height: 2px;
	background: repeating-linear-gradient(
		90deg,
		rgba(255, 94, 20, 0.20) 0px,
		rgba(255, 94, 20, 0.20) 6px,
		transparent 6px,
		transparent 14px
	);
	border-radius: 50%;
	transform: translateY(-50%) scaleY(1);
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100'%3E%3Cpath d='M0,50 C100,10 200,90 300,50 C400,10 500,90 600,50 C700,10 800,90 900,50 C1000,10 1100,90 1200,50' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100'%3E%3Cpath d='M0,50 C100,10 200,90 300,50 C400,10 500,90 600,50 C700,10 800,90 900,50 C1000,10 1100,90 1200,50' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
	mask-size: 100% 100%;
	-webkit-mask-size: 100% 100%;
	mask-repeat: no-repeat;
	-webkit-mask-repeat: no-repeat;
	mask-mode: luminance;
	-webkit-mask-mode: luminance;
}

/* Solid glowing curve underneath — visible glow on dark */
.stages-path::after {
	content: '';
	position: absolute;
	top: 50%;
	left: -5%;
	width: 110%;
	height: 3px;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(255, 94, 20, 0.08) 10%,
		rgba(255, 94, 20, 0.15) 30%,
		rgba(255, 94, 20, 0.08) 50%,
		rgba(100, 180, 255, 0.06) 70%,
		transparent 100%
	);
	transform: translateY(-50%);
	filter: blur(4px);
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100'%3E%3Cpath d='M0,50 C100,10 200,90 300,50 C400,10 500,90 600,50 C700,10 800,90 900,50 C1000,10 1100,90 1200,50' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100'%3E%3Cpath d='M0,50 C100,10 200,90 300,50 C400,10 500,90 600,50 C700,10 800,90 900,50 C1000,10 1100,90 1200,50' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100'%3E%3Cpath d='M0,50 C100,10 200,90 300,50 C400,10 500,90 600,50 C700,10 800,90 900,50 C1000,10 1100,90 1200,50' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
	mask-size: 100% 100%;
	-webkit-mask-size: 100% 100%;
	mask-repeat: no-repeat;
	-webkit-mask-repeat: no-repeat;
	mask-mode: luminance;
	-webkit-mask-mode: luminance;
}

/* Moving particles along the path — brighter on dark */
.stages-particle {
	position: absolute;
	top: 50%;
	left: 0;
	z-index: 0;
	pointer-events: none;
}

.stages-particle::before {
	content: '';
	display: block;
	width: 5px;
	height: 5px;
	background: var(--color-primary);
	border-radius: 50%;
	box-shadow: 0 0 12px rgba(255, 94, 20, 0.7);
	animation: particle-drift-1 8s ease-in-out infinite;
}

.stages-particle:first-child::before {
	animation-delay: 0s;
}

.stages-particle:nth-child(2) {
	left: auto;
	right: 0;
}

.stages-particle:nth-child(2)::before {
	width: 4px;
	height: 4px;
	background: rgba(100, 180, 255, 0.8);
	box-shadow: 0 0 10px rgba(100, 180, 255, 0.5);
	animation: particle-drift-2 11s ease-in-out 2s infinite;
}

@keyframes particle-drift-1 {
	0% {
		transform: translate(0, 0);
		opacity: 0;
	}
	10% {
		opacity: 1;
	}
	45% {
		transform: translate(300px, -40px);
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
	55% {
		transform: translate(600px, 0);
		opacity: 0;
	}
	90% {
		transform: translate(900px, 40px);
		opacity: 1;
	}
	100% {
		transform: translate(1150px, 0);
		opacity: 0;
	}
}

@keyframes particle-drift-2 {
	0% {
		transform: translate(1150px, 0);
		opacity: 0;
	}
	10% {
		opacity: 1;
	}
	45% {
		transform: translate(850px, -30px);
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
	55% {
		transform: translate(550px, 0);
		opacity: 0;
	}
	90% {
		transform: translate(250px, 30px);
		opacity: 1;
	}
	100% {
		transform: translate(0, 0);
		opacity: 0;
	}
}

section.stages-section .container {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* ———————————————————————
   Section Header
   ——————————————————————— */

.stages-header {
	margin-bottom: 40px;
}

.stages-title-group {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Decorative marker — same system */
.stages-marker {
	display: flex;
	align-items: center;
	gap: 10px;
}

.stages-marker-line {
	width: 32px;
	height: 2px;
	background: var(--color-primary);
	opacity: 0.6;
	border-radius: 1px;
}

.stages-marker-dot {
	display: block;
	width: 6px;
	height: 6px;
	background: var(--color-primary);
	border-radius: 1px;
	transform: rotate(45deg);
	box-shadow: 0 0 8px rgba(255, 94, 20, 0.3);
}

.stages-title {
	font-family: var(--font-heading);
	font-size: 36px;
	font-weight: 700;
	line-height: 1.2;
	color: #ffffff;
	letter-spacing: -0.02em;
	margin: 0;
	max-width: 700px;
}

.stages-title-accent {
	color: var(--color-primary);
}

/* ———————————————————————
   Grid 3×2
   ——————————————————————— */

.stages-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	position: relative;
	padding: 10px 0;
}

/* ———————————————————————
   Stage Card — glassmorphism
   ——————————————————————— */

.stage-card {
	position: relative;
	background: rgba(255, 255, 255, 0.03);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: var(--radius-md);
	padding: 20px 22px;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
	min-height: 100px;
}

.stage-card:hover {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 94, 20, 0.25);
	box-shadow:
		0 8px 30px rgba(0, 0, 0, 0.3),
		0 0 40px rgba(255, 94, 20, 0.03);
}

/* ———————————————————————
   Step Number — orange glow watermark
   ——————————————————————— */

.stage-num {
	font-family: var(--font-heading);
	font-size: 36px;
	font-weight: 800;
	line-height: 1;
	color: rgba(255, 94, 20, 0.30);
	flex-shrink: 0;
	margin-top: -2px;
	transition: color 0.3s ease;
	text-shadow: 0 0 12px rgba(255, 94, 20, 0.08);
}

.stage-card:hover .stage-num {
	color: rgba(255, 94, 20, 0.65);
}

/* ———————————————————————
   Card Body
   ——————————————————————— */

.stage-body {
	flex: 1;
	min-width: 0;
}

.stage-title {
	font-family: var(--font-heading);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #ffffff;
	margin-bottom: 4px;
}

.stage-desc {
	font-size: 13px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 10px;
}

.stage-badge {
	display: inline-block;
	padding: 3px 10px;
	background: rgba(255, 94, 20, 0.12);
	color: var(--color-primary);
	font-size: 11px;
	font-weight: 600;
	border-radius: 20px;
}

/* ———————————————————————
   Connector Arrows — brighter on dark
   ——————————————————————— */

.stage-card[data-connector="right"]::after {
	content: '→';
	position: absolute;
	right: -16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	color: rgba(255, 94, 20, 0.35);
	pointer-events: none;
	z-index: 2;
}

.stage-card[data-connector="left"]::after {
	content: '←';
	position: absolute;
	left: -16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	color: rgba(255, 94, 20, 0.35);
	pointer-events: none;
	z-index: 2;
}

/* Down arrow — from step 3 to step 4 */
.stage-card[data-connector="down"] {
	position: relative;
}

.stage-card[data-connector="down"]::before {
	content: '';
	position: absolute;
	bottom: -12px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 8px solid rgba(255, 94, 20, 0.25);
	pointer-events: none;
	z-index: 2;
}

.stage-card[data-connector="down"]::after {
	content: '';
	position: absolute;
	bottom: -20px;
	left: 50%;
	transform: translateX(-50%);
	width: 2px;
	height: 8px;
	background: rgba(255, 94, 20, 0.25);
	pointer-events: none;
	z-index: 2;
}

/* Remove connector on hover */
.stage-card:hover::after,
.stage-card:hover::before {
	opacity: 0.5;
}
