/*
Lamy LP — What We Connect (Phase 5)

Strategy D4: 2x2 component grid with absolute-centered hub overlapping the
grid's row gap. Matches design source (lp-sections.jsx LPWhatWeConnect lines
532-616: hub at top:50%/left:50% via translate(-50%,-50%), grid with big
row-gap to make space for the hub, 4 SVG connector lines from each corner
percentage to the center).

Section alternation: --bg-section (#0A0A0A), alternating from Growth Engine
(#050505).

Purple Accent C (central hub): gold->purple gradient border via padding-box
/ border-box technique, inner purple glow, outer gold glow.
Purple Accent F (section atmosphere): subtle radial purple wash.

Mobile-first: base = hub-on-top + vertical-stack of components (no connectors,
since lines have nothing to anchor to in a stack). At >=768px the diagram
flips to D4 (absolute hub + 2x2 grid + SVG connectors).
*/

/* ============================================================
   Section
   ============================================================ */
.lp-what-we-connect {
	position: relative;
	overflow: hidden;
	background: var(--bg-section);
	padding-inline: clamp(64px, 10vw, 128px);
	/* Phase 8.9.6: desktop max 96px -> 64px (round 2 spacing reduction).
	   Phase 8.9.8: round 3 reduction - clamp(48, 8vw, 64) -> clamp(32, 5vw, 40). */
	padding-block: clamp(32px, 5vw, 40px);
}

.lp-what-we-connect > .lp-divider-gradient {
	height: 1px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	margin-block: clamp(48px, 8vw, 96px);
	margin-block-start: 0;
	background: var(--accent-gradient);
	border: 0;
}

/* Purple Accent Location F — atmospheric wash */
.lp-what-we-connect__bg-glow {
	position: absolute;
	inset: -10%;
	background: radial-gradient(
		ellipse at center,
		var(--purple-atmosphere) 0%,
		transparent 70%
	);
	opacity: 0.10;
	filter: blur(100px);
	z-index: 0;
	pointer-events: none;
}

.lp-what-we-connect .lp-container {
	position: relative;
	z-index: 1;
}

/* ============================================================
   Pill section label (scoped — matches Problem + Growth Engine)
   ============================================================ */
.lp-what-we-connect .lp-section-label {
	display: inline-block;
	font-family: 'Heebo', sans-serif;
	font-size: 14px;
	font-weight: 600;
	padding: 6px 14px;
	background: rgba(212, 175, 55, 0.1);
	border: 1px solid var(--gold-primary);
	border-radius: 999px;
	color: var(--gold-highlight);
	margin-bottom: 16px;
	letter-spacing: 0.02em;
	text-transform: none;
}

.lp-what-we-connect .lp-section-label::before,
.lp-what-we-connect .lp-section-label::after {
	content: none;
}

/* ============================================================
   Heading
   ============================================================ */
.lp-what-we-connect__heading {
	font-family: 'Rubik', 'Heebo', sans-serif;
	font-weight: 800;
	font-size: clamp(28px, 4vw, 48px);
	color: var(--text-heading);
	text-wrap: balance;
	letter-spacing: -0.01em;
	line-height: 1.15;
	margin: 0 0 clamp(32px, 4vw, 48px) 0;
	text-align: center;
}

/* ============================================================
   Diagram container — mobile-first
   Base: flex column (hub on top, then stacked cards). Connectors hidden.
   ============================================================ */
.lp-what-we-connect__diagram {
	position: relative;
	max-width: 1100px;
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: clamp(24px, 4vw, 32px);
}

/* ============================================================
   Central hub — Purple Accent C
   ============================================================ */
.lp-what-we-connect__hub {
	width: clamp(160px, 50vw, 220px);
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	margin-inline: auto;

	/* Gradient border via padding-box / border-box double-background */
	background:
		linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
		var(--accent-gradient) border-box;
	border: 3px solid transparent;

	/* Inner purple glow + outer gold glow (Purple Accent C) */
	box-shadow:
		inset 0 0 60px rgba(138, 79, 255, 0.3),
		0 0 80px rgba(212, 175, 55, 0.15);

	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	position: relative;
	z-index: 4;
}

.lp-what-we-connect__hub-content {
	color: var(--gold-highlight);
	font-family: 'Rubik', 'Heebo', sans-serif;
	font-weight: 700;
	font-size: clamp(18px, 2vw, 26px);
	line-height: 1.2;
	padding: clamp(16px, 2vw, 24px);
	letter-spacing: -0.01em;
}

/* ============================================================
   Connectors — desktop-only; hidden on mobile since stacked cards
   have no corners to anchor to
   ============================================================ */
.lp-what-we-connect__connectors {
	display: none;
}

/* ============================================================
   Component grid + cards
   ============================================================ */
.lp-what-we-connect__grid {
	display: flex;
	flex-direction: column;
	gap: clamp(16px, 3vw, 24px);
	position: relative;
	z-index: 3;
}

.lp-what-we-connect__component {
	background: var(--bg-card);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	padding: clamp(20px, 2.5vw, 32px);
	transition:
		border-color 0.3s ease,
		transform 0.3s ease,
		box-shadow 0.3s ease;
	position: relative;
	overflow: hidden;
}

.lp-what-we-connect__component:hover {
	border-color: rgba(212, 175, 55, 0.3);
	transform: translateY(-2px);
	box-shadow: 0 8px 32px rgba(212, 175, 55, 0.08);
}

.lp-what-we-connect__component-number {
	display: block;
	font-family: 'Rubik', 'Heebo', sans-serif;
	font-weight: 800;
	color: var(--gold-highlight);
	font-size: clamp(14px, 1.2vw, 16px);
	letter-spacing: 0.05em;
	margin-bottom: 8px;
}

.lp-what-we-connect__component-icon {
	display: inline-flex;
	width: clamp(40px, 4vw, 48px);
	height: clamp(40px, 4vw, 48px);
	color: var(--gold-primary);
	margin-bottom: 12px;
	transition: color 0.3s ease;
}

.lp-what-we-connect__component:hover .lp-what-we-connect__component-icon {
	color: var(--gold-highlight);
}

.lp-what-we-connect__component-icon svg {
	width: 100%;
	height: 100%;
}

.lp-what-we-connect__component-title {
	font-family: 'Rubik', 'Heebo', sans-serif;
	font-weight: 700;
	font-size: clamp(18px, 1.8vw, 22px);
	color: var(--text-heading);
	line-height: 1.3;
	margin: 0 0 8px 0;
}

.lp-what-we-connect__component-body {
	font-family: 'Heebo', sans-serif;
	font-weight: 400;
	font-size: clamp(15px, 1.2vw, 16px);
	color: var(--text-body);
	line-height: 1.6;
	margin: 0 0 16px 0;
	text-wrap: pretty;
}

/* "↳ feeds the X stage of the engine" tag — locked-copy arrow text */
.lp-what-we-connect__component-arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 13px;
	background: rgba(212, 175, 55, 0.06);
	border: 1px solid rgba(212, 175, 55, 0.22);
	border-radius: 999px;
	font-size: 12.5px;
	color: var(--gold-primary);
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.4;
}

.lp-what-we-connect__component-arrow-glyph {
	font-size: 11px;
	opacity: 0.7;
}

/* ============================================================
   Desktop (>=768px) — D4: 2x2 grid with absolute hub overlap
   ============================================================ */
@media (min-width: 768px) {
	.lp-what-we-connect__diagram {
		display: block; /* containing block for absolute hub + connectors */
		padding-block: clamp(20px, 3vw, 40px);
	}

	.lp-what-we-connect__hub {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: clamp(180px, 22vw, 240px);
		margin: 0;
	}

	.lp-what-we-connect__connectors {
		display: block;
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		pointer-events: none;
		z-index: 1;
		animation: lp-wwc-pulse 8s ease-in-out infinite;
	}

	.lp-what-we-connect__grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		column-gap: clamp(24px, 4vw, 48px);
		row-gap: clamp(180px, 22vw, 280px);
	}
}

/* Larger desktop tuning */
@media (min-width: 1024px) {
	.lp-what-we-connect__hub {
		width: clamp(220px, 22vw, 280px);
	}

	.lp-what-we-connect__grid {
		row-gap: clamp(220px, 24vw, 300px);
	}
}

/* ============================================================
   Pulse animation on connectors (opacity ebb)
   ============================================================ */
@keyframes lp-wwc-pulse {
	0%, 100% { opacity: 0.55; }
	50%      { opacity: 1; }
}

/* ============================================================
   Reduced motion — disable pulse + hover transforms
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.lp-what-we-connect__connectors {
		animation: none;
	}
	.lp-what-we-connect__component {
		transition: none;
	}
	.lp-what-we-connect__component:hover {
		transform: none;
	}
}

/* ============================================================
   Phase 11.3 (Item 9) — inline accent on the system phrase in the H2.
   Was a filled pill (gold-purple gradient + dark text). Now a lighter
   treatment: gold text with a subtle curved underline (::after) — keeps
   visual emphasis without the heavy badge look. The curved underline
   uses an elliptical border-radius (50% / 100%) to soften the line ends.
   ============================================================ */
.lp-system-badge {
	display: inline-block;
	position: relative;
	padding-bottom: 8px;
	color: var(--gold-highlight);
	font-weight: 800;
	white-space: nowrap;
	letter-spacing: -0.01em;
	/* On very narrow viewports the phrase is too wide to keep on one line
	   alongside its preamble — allow wrap there. */
}

.lp-system-badge::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 4px;
	/* Phase 11.4 (Fix C): gradient underline (gold → purple → gold)
	   mirrors the brand accent line used elsewhere; was solid gold. */
	background: var(--accent-gradient);
	border-radius: 50% / 100%;
}

@media (max-width: 480px) {
	.lp-system-badge { white-space: normal; }
}
