/* =============================================================================
 * Performance division homepage (front-page.php) — scoped styles.
 *
 * Every selector lives under .perf-home (plus the nav-adjacent bits the
 * template renders itself). The page is self-orchestrated multi-ground:
 * moss hero → paper body → moss process → paper CTA — so it PINS its light
 * tokens locally and ignores the sitewide theme toggle (which the template
 * also hides from its nav). Dark sections re-scope via .ph-dark, exactly
 * like hive-mind's .hm-section-dark convention.
 *
 * Colour law (style.css header): Volt is never text on light grounds —
 * text-level accents on paper are Pine via --accent-fg; Volt appears on
 * light only as fills/chips/underlines. Ember appears exactly once (the
 * P&L card live dot). Borrowed division colours appear exactly once (the
 * divisions strip dots).
 * ============================================================================= */

.perf-home {
	/* Pin to the division's paper ground regardless of the theme toggle. */
	--bg:            var(--paper);
	--bg-2:          var(--perf-50);
	--fg:            var(--moss);
	--fg-dim:        rgba(30, 42, 11, 0.68); /* AA at body sizes on paper + surface */
	--line:          rgba(30, 42, 11, 0.12);
	--card:          #FFFFFF;
	--accent-fg:     var(--pine);
	--accent-italic: var(--pine);

	background: var(--bg);
	color: var(--fg);
	font-family: var(--f-sans);
	font-size: var(--t-body);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

.perf-home * { box-sizing: border-box; }
.perf-home p { margin: 0; }

.perf-home .ph-container {
	max-width: var(--cont);
	margin: 0 auto;
	padding: 0 32px;
}
@media (max-width: 560px) { .perf-home .ph-container { padding: 0 20px; } }

/* ── Grounds ─────────────────────────────────────────────────────────────── */

/* Moss sections. Light type gets +0.05–0.10 line-height (breathing rule). */
.perf-home .ph-dark {
	--bg:            var(--moss);
	--bg-2:          var(--moss-2);
	--fg:            var(--offwhite);
	--fg-dim:        rgba(242, 246, 230, 0.62);
	--line:          rgba(242, 246, 230, 0.14);
	--card:          var(--moss-2);
	--accent-fg:     var(--volt);
	--accent-italic: var(--volt);

	background: var(--bg);
	color: var(--fg);
	line-height: 1.62;
}

.perf-home .ph-section-tint { background: var(--bg-2); }

/* ── Section rhythm ──────────────────────────────────────────────────────── */

.perf-home .ph-section {
	padding: 80px 0;
	border-bottom: 1px solid var(--line);
}
@media (min-width: 768px)  { .perf-home .ph-section { padding: 96px 0; } }
@media (min-width: 1024px) { .perf-home .ph-section { padding: 120px 0; } }

.perf-home .ph-section-head { max-width: 780px; margin-bottom: 56px; }
.perf-home .ph-section-head:only-child,
.perf-home .ph-section-head:last-child { margin-bottom: 0; }

/* ── Type ────────────────────────────────────────────────────────────────── */

.perf-home .ph-h1 {
	font-family: var(--f-display);
	font-weight: 800;
	font-size: clamp(44px, 6.5vw, 92px);
	line-height: 0.98;
	letter-spacing: -0.035em;
	margin: 20px 0 24px;
	text-wrap: balance;
}
.perf-home .ph-h2 {
	font-family: var(--f-display);
	font-weight: 700;
	font-size: clamp(34px, 4.4vw, 58px);
	line-height: 1.04;
	letter-spacing: -0.028em;
	margin: 0;
	text-wrap: balance;
}
.perf-home .ph-h1 em,
.perf-home .ph-h2 em,
.perf-home .ph-closer em {
	font-style: normal;
	font-family: inherit;
	color: var(--accent-italic);
}

.perf-home .ph-lead {
	font-size: clamp(17px, 1.8vw, 20px);
	line-height: 1.55;
	color: var(--fg-dim);
	max-width: 56ch;
	margin-top: 20px;
	text-wrap: pretty;
}

/* Kicker — one of exactly two mono kickers on the page (hero + divisions). */
.perf-home .ph-kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--f-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--fg-dim);
}

.perf-home .ph-mono-tag {
	font-family: var(--f-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--fg-dim);
}

/* ── 1 · Hero ────────────────────────────────────────────────────────────── */

.perf-home .ph-hero { padding: 88px 0 104px; border-bottom: 1px solid var(--line); }
@media (max-width: 768px) { .perf-home .ph-hero { padding: 56px 0 72px; } }

.perf-home .ph-hero-grid {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: 64px;
	align-items: center;
}
@media (max-width: 960px) { .perf-home .ph-hero-grid { grid-template-columns: 1fr; gap: 44px; } }

.perf-home .ph-hero-sub {
	font-size: 19px;
	line-height: 1.6;
	color: var(--fg-dim);
	max-width: 54ch;
	margin: 0 0 36px;
	text-wrap: pretty;
}
.perf-home .ph-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.perf-home .ph-hero-byline {
	margin-top: 24px;
	font-family: var(--f-mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--fg-dim);
}

/* Entrance — CSS-only so content is never gated on JS. */
@keyframes ph-rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}
.perf-home .ph-hero-left  { animation: ph-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.perf-home .ph-hero-right { animation: ph-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both; }

/* P&L card v2 adjustments on the moss ground. */
.perf-home .ph-dark .pnl-card { border-color: rgba(242, 246, 230, 0.16); }
.perf-home .ph-dark .pnl-tabs .tab.active { background: rgba(242, 246, 230, 0.10); color: var(--fg); }
/* The page's ONE Ember moment: the live pulse dot. */
.perf-home .pnl-dotr {
	background: var(--ember);
	box-shadow: 0 0 0 4px color-mix(in oklch, var(--ember) 25%, transparent);
}

/* ── 3 · Problem ─────────────────────────────────────────────────────────── */

.perf-home .ph-problem-pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	padding-top: 8px;
}
@media (max-width: 900px) { .perf-home .ph-problem-pair { grid-template-columns: 1fr; gap: 40px; } }

.perf-home .ph-problem-line {
	margin-top: 14px;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.35;
	max-width: 30ch;
	text-wrap: pretty;
}
.perf-home .ph-crosses {
	list-style: none;
	padding: 0;
	margin: 22px 0 0;
	border-top: 1px solid var(--line);
}
.perf-home .ph-crosses li {
	padding: 13px 0;
	border-bottom: 1px solid var(--line);
	font-size: 15px;
	display: flex;
	gap: 14px;
	align-items: center;
	color: var(--fg-dim);
}
.perf-home .ph-crosses .x { color: var(--red); font-family: var(--f-mono); }

.perf-home .ph-closer {
	margin-top: 56px;
	font-family: var(--f-display);
	font-weight: 600;
	font-size: clamp(22px, 2.6vw, 30px);
	line-height: 1.3;
	letter-spacing: -0.018em;
	max-width: 38ch;
	text-wrap: pretty;
}

/* ── 4 · Services index ──────────────────────────────────────────────────── */

.perf-home .ph-svc-index { border-top: 1px solid var(--line); }
.perf-home .ph-svc-row {
	display: grid;
	grid-template-columns: 56px 1fr 300px;
	gap: 32px;
	align-items: start;
	padding: 30px 8px;
	border-bottom: 1px solid var(--line);
}
/* No hover wash: the rows aren't interactive, and the wash is how this
   system signals "clickable" (false affordance otherwise). */
@media (max-width: 900px) {
	.perf-home .ph-svc-row { grid-template-columns: 44px 1fr; }
	.perf-home .ph-svc-tags { grid-column: 2; }
}

.perf-home .ph-svc-n { font-size: 12px; color: var(--fg-dim); letter-spacing: 0.1em; padding-top: 6px; }
.perf-home .ph-svc-name {
	font-family: var(--f-display);
	font-weight: 700;
	font-size: clamp(21px, 2.2vw, 27px);
	letter-spacing: -0.018em;
	line-height: 1.12;
	margin: 0 0 8px;
}
.perf-home .ph-svc-arg {
	font-size: 15px;
	line-height: 1.55;
	color: var(--fg-dim);
	max-width: 58ch;
	text-wrap: pretty;
}
.perf-home .ph-svc-tags {
	font-size: 11.5px;
	line-height: 1.7;
	letter-spacing: 0.02em;
	color: var(--fg-dim);
	padding-top: 7px;
}

/* Measurement strip — the goal metrics, no invented numbers. */
.perf-home .ph-measure-strip {
	margin-top: 40px;
	padding: 22px 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	display: flex;
	align-items: center;
	gap: 28px;
	flex-wrap: wrap;
}
.perf-home .ph-measure-goals { display: flex; gap: 20px; flex-wrap: wrap; }
.perf-home .ph-goal {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--accent-fg);
	white-space: nowrap;
}
.perf-home .ph-measure-link {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--f-mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fg);
	border-bottom: 1px solid var(--accent);
	padding-bottom: 3px;
	transition: color 0.15s;
}
.perf-home .ph-measure-link:hover { color: var(--accent-fg); }
@media (max-width: 640px) { .perf-home .ph-measure-link { margin-left: 0; } }

/* ── 5 · Two tracks ──────────────────────────────────────────────────────── */

.perf-home .ph-tracks {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}
@media (max-width: 900px) { .perf-home .ph-tracks { grid-template-columns: 1fr; } }

.perf-home .ph-track-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 36px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.perf-home .ph-track-name {
	font-family: var(--f-display);
	font-weight: 700;
	font-size: clamp(21px, 2.1vw, 26px);
	letter-spacing: -0.018em;
	line-height: 1.15;
	margin: 0;
	text-wrap: balance;
}
.perf-home .ph-track-body {
	font-size: 15px;
	line-height: 1.6;
	color: var(--fg-dim);
	max-width: 52ch;
	text-wrap: pretty;
}
.perf-home .ph-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.perf-home .ph-chip {
	/* Volt as fill (tint), moss text — never Volt text on light. */
	background: var(--perf-100);
	color: var(--moss);
	font-family: var(--f-mono);
	font-size: 11px;
	letter-spacing: 0.06em;
	padding: 5px 11px;
	border-radius: var(--radius-pill);
	white-space: nowrap;
}

/* ── 9 · Quotes (placeholder testimonials) ───────────────────────────────── */

.perf-home .ph-section-quotes { padding-top: 0; }
.perf-home .ph-section-quotes .quotes-grid { margin-top: 0; }

/* ── 11 · Divisions strip — the one borrowed-colour moment ──────────────── */

.perf-home .ph-divisions {
	padding: 30px 0;
	border-bottom: 1px solid var(--line);
	background: var(--bg-2);
}
.perf-home .ph-divisions-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
.perf-home .ph-division-list { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.perf-home .ph-division {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.005em;
	color: var(--fg);
}
.perf-home a.ph-division:hover .ph-division-note { color: var(--fg); }
.perf-home .ph-division-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.perf-home .ph-division-note { font-weight: 400; color: var(--fg-dim); transition: color 0.15s; }

/* ── 12 · CTA ────────────────────────────────────────────────────────────── */

.perf-home .cta-section { border-bottom: none; padding-bottom: 140px; }
@media (max-width: 768px) { .perf-home .cta-section { padding-bottom: 96px; } }

/* ── Motion preferences ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.perf-home .ph-hero-left,
	.perf-home .ph-hero-right { animation: none; }
	.perf-home .ph-svc-row,
	.perf-home .ph-measure-link,
	.perf-home .ph-division-note { transition: none; }
}
