/* ==========================================
   TIMELINE / SUPERPOWERS SECTION
   "Your New Content Superpowers"
   ========================================== */

/* Superpowers section should have position relative for absolute blobs */
.superpowers {
	position: relative;
	overflow: visible; /* Allow blob background to extend beyond */
}

/* Animated blob background container - extends both directions */
.how-background {
	top: -120px; /* Extend into previous section for seamless blend */
	bottom: -120px; /* Extend into next section for seamless blend */
	filter: url('#how-plasma');
}

/* Blob color customization for superpowers section */
.how-blob {
	background: radial-gradient(
		circle,
		#ede9fe 0%,
		rgba(167, 139, 250, 0.1) 100%
	);
}

/* Blob animations with unique timings */
#how-blob-1 {
	animation: blob-float-1 22s ease-in-out infinite;
}

#how-blob-2 {
	animation: blob-float-2 26s ease-in-out infinite 4s;
}

#how-blob-3 {
	animation: blob-float-3 28s ease-in-out infinite 8s;
}

#how-blob-4 {
	animation: blob-float-4 24s ease-in-out infinite 2s;
}

#how-blob-5 {
	animation: blob-float-5 30s ease-in-out infinite 6s;
}

/* Ensure timeline content appears above background */
.superpowers .container {
	position: relative;
	z-index: 1;
}

/* Gradient accent for heading */
.superpowers h2 .accent {
	background: linear-gradient(135deg, #A78BFA, #4C1D95);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: #4C1D95;
}

/* Timeline wrapper - Desktop (>900px) */
.timeline {
	display: grid;
	grid-template-columns: repeat(6, 1fr); /* 6-column for 2+3 layout */
	gap: 32px 24px; /* row-gap column-gap */
	position: relative;
	padding: 20px 0;
}

/* Explicit grid placement for 3+3 layout */
.timeline-item:nth-child(1) {
	grid-column: 1 / 3; /* First row, left */
}

.timeline-item:nth-child(2) {
	grid-column: 3 / 5; /* First row, center */
}

.timeline-item:nth-child(3) {
	grid-column: 5 / 7; /* First row, right */
}

.timeline-item:nth-child(4) {
	grid-column: 1 / 3; /* Second row, left */
}

.timeline-item:nth-child(5) {
	grid-column: 3 / 5; /* Second row, center */
}

.timeline-item:nth-child(6) {
	grid-column: 5 / 7; /* Second row, right */
}

/* Timeline connector (animated drawing line) */
.timeline::before {
	content: '';
	position: absolute;
	top: calc(50% - 1px);
	left: 10%;
	width: 80%;
	height: 2px;
	background-image: repeating-linear-gradient(
		to right,
		var(--accent) 0px,
		var(--accent) 3px,
		transparent 3px,
		transparent 8px
	);
	z-index: 0;
	transform-origin: left center;
	transform: scaleX(0); /* Start invisible */
	transition: transform 0.8s ease-out;
	opacity: 0.6;
	display: none; /* Hidden */
}

/* Active state when timeline enters viewport */
.timeline.in-view::before {
	transform: scaleX(1); /* Draw to full width */
}

/* Timeline item card */
.timeline-item {
	/* Layout */
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	padding: 24px 20px;

	/* Visual */
	background: linear-gradient(135deg, rgba(237, 233, 254, 0.7), rgba(219, 234, 254, 0.7)); /* Purple to blue gradient with 70% opacity */
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px); /* Safari support */
	border: 1px solid var(--line);
	border-radius: 16px;
	position: relative;
	z-index: 1;

	/* Animation prep (initial state) */
	opacity: 0;
	transform: translateY(20px);
	transition:
		opacity 0.5s ease-out,
		transform 0.5s ease-out,
		box-shadow 0.2s ease;
}


/* Staggered reveal delays */
.timeline-item:nth-child(1) {
	transition-delay: 0s;
}

.timeline-item:nth-child(2) {
	transition-delay: 0.1s;
}

.timeline-item:nth-child(3) {
	transition-delay: 0.2s;
}

.timeline-item:nth-child(4) {
	transition-delay: 0.3s;
}

.timeline-item:nth-child(5) {
	transition-delay: 0.4s;
}

.timeline-item:nth-child(6) {
	transition-delay: 0.5s;
}

/* Active state (in viewport) */
.timeline-item.in-view {
	opacity: 1;
	transform: translateY(0);
}

/* Hover state */
.timeline-item:hover {
	transform: translateY(-4px); /* Subtle lift */
	box-shadow: 0 8px 20px rgba(101, 163, 13, 0.15); /* Accent-tinted shadow */
}


/* Icon (emoji) - removed from template */
.timeline-item .icon {
	display: none;
}

/* Headline */
.timeline-item h3 {
	font-size: 24px;
	color: var(--ink);
	margin: 0 0 12px 0;
	line-height: 1.3;
}

/* Description */
.timeline-item p {
	font-size: 16px;
	color: var(--ink);
	line-height: 1.6;
	margin: 0;
}

/* ==========================================
   RESPONSIVE: TABLET (680px - 900px)
   ========================================== */
@media (max-width: 900px) {
	.timeline {
		grid-template-columns: repeat(2, 1fr); /* 2 columns */
		gap: 24px 16px; /* Tighter spacing */
	}

	/* Reset grid-column placements to auto-flow */
	.timeline-item:nth-child(1),
	.timeline-item:nth-child(2),
	.timeline-item:nth-child(3),
	.timeline-item:nth-child(4),
	.timeline-item:nth-child(5),
	.timeline-item:nth-child(6) {
		grid-column: span 1;
	}

	/* Hide horizontal timeline connector */
	.timeline::before {
		display: none;
	}
}

/* ==========================================
   RESPONSIVE: MOBILE (<680px)
   ========================================== */
@media (max-width: 680px) {
	.timeline {
		display: flex;
		flex-direction: column;
		gap: 40px;
		padding: 20px 0;
	}

	/* Vertical timeline line */
	.timeline::after {
		content: '';
		position: absolute;
		left: 16px;
		top: 60px;
		bottom: 60px;
		width: 2px;
		background: var(--line);
		z-index: 0;
	}

	/* Timeline item adjustments */
	.timeline-item {
		padding-left: 50px;
		text-align: left;
		align-items: flex-start;
	}

	/* Dot indicator */
	.timeline-item::before {
		content: '';
		position: absolute;
		left: 8px;
		top: 32px;
		width: 16px;
		height: 16px;
		background: var(--accent);
		border: 3px solid var(--bg);
		border-radius: 50%;
		z-index: 1;
	}

	/* Icon removed */
	.timeline-item .icon {
		display: none;
	}

	/* Full width text */
	.timeline-item h3,
	.timeline-item p {
		max-width: 100%;
	}

	/* Reduce hover lift on mobile (less relevant for touch) */
	.timeline-item:hover {
		transform: translateY(-2px);
	}
}

/* ==========================================
   PROGRESSIVE ENHANCEMENT: NO JAVASCRIPT
   ========================================== */
.no-js .timeline::before,
.no-js .timeline-item {
	/* Make visible by default when JS is disabled */
	opacity: 1;
	transform: none;
}

/* ==========================================
   ACCESSIBILITY: REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {
	.timeline::before,
	.timeline-item {
		transition: none;
		opacity: 1;
		transform: none;
	}

	.timeline-item:hover {
		transform: none;
	}
}
