/**
 * Features Content Layout
 *
 * Base layout structure and styling for feature sections.
 *
 * @package AgenticWP
 */

/* Base feature section styling */
.features-section {
	position: relative;
	padding: 80px 5vw;
	overflow: visible; /* Allow blob backgrounds to extend beyond */
	margin-bottom: 0; /* No gaps between sections for seamless blob blending */
}

/* Feature section containers - uses .container-wide from base.css */
.features-section .container-wide {
	position: relative;
	z-index: 1;
	padding: 0 20px;
}

/* Feature section headings */
.features-section h2 {
	font-size: clamp(28px, 4vw, 44px);
	line-height: 1.2;
	margin: 0 0 24px;
	letter-spacing: -0.02em;
	font-weight: 700;
	color: var(--ink);
	text-align: center;
}

/* Feature section paragraphs */
.features-section p {
	margin: 0 0px 40px;
	color: var(--ink);
	margin: 0 auto;
	max-width: 700px;
	text-align: center;
}

/* Lead text intro paragraphs */
.features-section .lead,
.features-section .lead-text {
	text-align: center;
}

.features-section p:last-child {
	margin-bottom: 0;
}

/* Feature section lists */
.features-section ul {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
}

.features-section ul li {
	position: relative;
	padding-left: 28px;
	margin-bottom: 12px;
	font-size: clamp(16px, 2.5vw, 18px);
	line-height: 1.7;
	color: var(--ink);
}

/* Custom bullet using CSS pseudo-element */
.features-section ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 10px;
	width: 6px;
	height: 6px;
	background: var(--accent);
	border-radius: 50%;
}

/* Feature content sections with spacing */
.features-section .feature-intro {
	margin-bottom: 40px;
}

.features-section .feature-solution {
	margin-bottom: 40px;
}

.features-section .feature-examples {
	margin-bottom: 40px;
}

.features-section .feature-technical {
	margin-bottom: 0;
}

/* Code elements within feature sections */
.features-section code {
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.9em;
	background: rgba(107, 114, 128, 0.1);
	padding: 2px 6px;
	border-radius: 3px;
	color: var(--ink);
}

/* Responsive: Tablet */
@media (max-width: 940px) {
	.features-section {
		padding: 60px 5vw;
	}

	.features-section .container-wide {
		padding: 0 16px;
	}

	.features-section h2 {
		font-size: clamp(24px, 4vw, 36px);
		margin-bottom: 20px;
	}

	.features-section p {
		font-size: clamp(15px, 2.5vw, 17px);
	}
}

/* ========================================================================
   Scroll Animation System
   Elements with .animate-on-scroll start hidden and reveal when in viewport
   ======================================================================== */

.animate-on-scroll {
	opacity: 0;
	transform: translateY(20px);
	transition:
		opacity 0.5s ease-out,
		transform 0.5s ease-out;
}

.animate-on-scroll.in-view {
	opacity: 1;
	transform: translateY(0);
}

/* Staggered delays for sequential reveal */
.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.animate-on-scroll {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Progressive enhancement: No JavaScript */
.no-js .animate-on-scroll {
	opacity: 1;
	transform: none;
}

/* Responsive: Mobile */
@media (max-width: 680px) {
	.features-section {
		padding: 50px 5vw;
	}

	.features-section .container-wide {
		padding: 0 12px;
	}

	.features-section h2 {
		font-size: clamp(22px, 4vw, 32px);
		margin-bottom: 16px;
	}

	.features-section p {
		font-size: clamp(14px, 2.5vw, 16px);
		margin-bottom: 16px;
	}
}

/* ========================================================================
   Section Transition Smoothing
   Handles visual transitions between blob and lightweight background sections
   ======================================================================== */

/*
 * Section Order & Background Types:
 * 1. Ship (blob) → Create (lightweight)
 * 2. Create (lightweight) → Images (blob)
 * 3. Images (blob) → Optimize (lightweight)
 * 4. Optimize (lightweight) → Bulk (lightweight)
 * 5. Bulk (lightweight) → Gamification (blob)
 */

/* Lightweight sections that follow a blob section get a fade-in from above */
.feature-create::after,
.feature-optimize::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 120px;
	background: linear-gradient(
		180deg,
		transparent 0%,
		rgba(255, 255, 255, 0.3) 100%
	);
	pointer-events: none;
	z-index: 0;
}

/* Smooth transition between two lightweight sections */
.feature-bulk::before {
	/* Override the bg-gradient pseudo-element to extend slightly upward */
	top: -40px;
}
