/* ==========================================================================
   20-home.css — Active Tahoe
   Owned by the "home" worker. Scoped to .at-* classes used on the homepage
   (post 36) and the six topic pages. Do not use these classes elsewhere.
   ========================================================================== */

.at-sec,
.at-topic-page {
	--at-ink: #171717;
	--at-ink-soft: #3d4a44;
	--at-green: #005A39;
	--at-green-mid: #047857;
	--at-green-light: #279B7A;
	--at-surface: #ffffff;
	--at-tint: #dce8e2;
	--at-line: #c6d3cd;
	--at-photo-bg: #dbe4df;
	--at-radius: 14px;

	box-sizing: border-box;
	color: var(--at-ink);
	padding-block: clamp(1.25rem, 4vw, 3.25rem);
	padding-inline: clamp(1rem, 4vw, 2rem);
	margin-block: 0 !important;
	overflow-wrap: break-word;
}

.at-sec :where(h1, h2, h3, h4) { color: var(--at-ink); }
.at-sec :where(p, li) { color: var(--at-ink-soft); line-height: 1.55; }
.at-sec :where(strong) { color: var(--at-ink); }
.at-sec :where(a) { color: var(--at-green); }
.at-sec img { max-width: 100%; height: auto; }

/* Deterministic vertical rhythm: WordPress emits per-block layout rules that
   zero child margins and apply a uniform block gap. Pin our own instead so the
   section spacing does not depend on which rule happens to win. */
.at-sec > * { margin-block: 0 !important; }
.at-sec > * + * { margin-block-start: var(--at-gap, 0.9rem) !important; }
.at-hero__text > * { margin-block: 0 !important; }
.at-quote > * { margin-block: 0 !important; }
.at-card__body > * { margin-block: 0 !important; }
.at-who__item > *, .at-stat > * { margin-block: 0 !important; }

.at-h1 {
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0 0 0.6em;
	text-wrap: balance;
}
.at-h2 {
	font-size: clamp(1.35rem, 4.2vw, 2.25rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
	text-wrap: balance;
}
.at-h3 {
	font-size: clamp(1.1rem, 3vw, 1.35rem);
	font-weight: 700;
	line-height: 1.25;
	margin-block: 0 !important;
	margin-block-start: 1.6rem !important;
}
.at-sub { font-size: clamp(0.95rem, 2.4vw, 1.05rem); max-width: 46em; }
.at-note { font-size: 0.8rem; margin: 0.9rem 0 0; opacity: 0.85; }
.at-lead { font-size: clamp(1.05rem, 2.8vw, 1.3rem); line-height: 1.5; color: var(--at-ink); }

/* ---------- buttons ---------- */
.at-buttons { gap: 0.6rem; margin: 0; }
.at-buttons > * { margin: 0 !important; }
.at-btn .wp-block-button__link {
	border-radius: 999px;
	padding: 0.72rem 1.35rem;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	display: inline-block;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}
.at-btn--primary .wp-block-button__link {
	background: var(--at-green); color: #fff; border: 2px solid var(--at-green);
}
.at-btn--primary .wp-block-button__link:hover,
.at-btn--primary .wp-block-button__link:focus { background: #003d27; border-color: #003d27; color: #fff; }
.at-btn--secondary .wp-block-button__link {
	background: transparent; color: var(--at-green); border: 2px solid var(--at-green);
}
.at-btn--secondary .wp-block-button__link:hover,
.at-btn--secondary .wp-block-button__link:focus { background: var(--at-green); color: #fff; }

/* ---------- hero ---------- */
.at-hero { background: var(--at-tint); padding-block: clamp(1.75rem, 5vw, 4rem); }
.at-hero__cols { align-items: center; }
.at-hero__text > * { margin-block: 0; }
.at-hero__sub { font-size: clamp(1rem, 2.5vw, 1.15rem); line-height: 1.55; margin: 0 0 1.4rem; max-width: 34em; }
.at-hero__media { max-width: 420px; margin-inline: auto; }
.at-portrait { margin: 0; }
.at-portrait img {
	display: block; width: 100%; height: auto;
	aspect-ratio: 3 / 4; object-fit: cover;
	border-radius: var(--at-radius);
	background: var(--at-photo-bg);
	box-shadow: 0 10px 28px rgba(0, 45, 30, .16);
}
@media (max-width: 781px) {
	.at-hero__media { max-width: 320px; }
	.at-hero__cols { gap: 1.5rem; }
}
@media (max-width: 600px) {
	.at-hero__media { max-width: 200px; }
}

/* ---------- who this is for ---------- */
.at-who__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.at-who__grid > * { margin-block: 0 !important; }
@media (min-width: 782px) { .at-who__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.at-who__item {
	background: var(--at-surface); border: 1px solid var(--at-line);
	border-radius: var(--at-radius); padding: 0.75rem 0.85rem;
}
.at-who__text { margin: 0; font-size: 0.82rem; line-height: 1.4; }
.at-who__text br { display: none; }
.at-who__text strong { display: block; font-size: 0.95rem; margin-bottom: 0.2rem; }

/* ---------- credentials strip ---------- */
.at-stats { background: var(--at-green); }
.at-sec.at-stats p,
.at-sec.at-stats span,
.at-sec.at-stats a,
.at-sec.at-stats h2 { color: #fff; }
.at-stats__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; text-align: center; }
.at-stats__grid > * { margin-block: 0 !important; }
@media (min-width: 782px) { .at-stats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
.at-stat__text { margin: 0; }
.at-stat__text br { display: none; }
.at-stat__value { display: block; font-size: clamp(1.25rem, 4.4vw, 1.8rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
.at-stat__label { display: block; font-size: 0.78rem; line-height: 1.3; margin-top: 0.25rem; opacity: 0.85; }
.at-morelink { margin: 1.25rem 0 0; font-size: 0.9rem; }
.at-morelink a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- topic cards ---------- */
.at-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.at-cards > * { margin-block: 0 !important; }
@media (min-width: 782px) { .at-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.at-card {
	background: var(--at-surface); border: 1px solid var(--at-line);
	border-radius: var(--at-radius); overflow: hidden;
	display: flex; flex-direction: column;
}
.at-card > * { margin-block: 0 !important; }
.at-card__media { margin: 0; background: var(--at-photo-bg); line-height: 0; }
.at-card__media a { display: block; }
.at-card__media img {
	display: block; width: 100%; height: auto;
	aspect-ratio: 4 / 3; object-fit: cover;
	background: var(--at-photo-bg);
	border-radius: 0;
}
.at-card__body { padding: 0.75rem 0.85rem 1rem; }
.at-card__body > * { margin-block: 0 !important; }
.at-card__title { font-size: clamp(0.95rem, 2.6vw, 1.1rem); font-weight: 700; line-height: 1.25; margin: 0 0 0.3rem !important; }
.at-card__title a { text-decoration: none; color: var(--at-green); }
.at-card__title a:hover, .at-card__title a:focus { text-decoration: underline; }
.at-card__desc { font-size: 0.84rem; line-height: 1.45; margin: 0; }

/* ---------- how it works ---------- */
.at-steps { list-style: none; counter-reset: atstep; margin: 0 0 0.5rem; padding: 0; display: grid; gap: 10px; }
@media (min-width: 782px) { .at-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; } }
.at-steps li { counter-increment: atstep; position: relative; padding-left: 2.5rem; font-size: 0.92rem; line-height: 1.45; }
.at-steps li::before {
	content: counter(atstep);
	position: absolute; left: 0; top: 0.05rem;
	width: 1.75rem; height: 1.75rem; border-radius: 50%;
	background: var(--at-green); color: #fff;
	display: grid; place-items: center;
	font-size: 0.85rem; font-weight: 700;
}
.at-prices { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 8px; }
@media (min-width: 782px) { .at-prices { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.at-prices li {
	background: var(--at-surface); border: 1px solid var(--at-line);
	border-radius: 10px; padding: 0.6rem 0.8rem; font-size: 0.88rem; line-height: 1.4;
}

/* ---------- testimonials ---------- */
.at-quotes__grid { display: grid; gap: 12px; }
.at-quotes__grid > * { margin-block: 0 !important; }
@media (min-width: 782px) { .at-quotes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
.at-quote {
	background: var(--at-surface);
	border-left: 4px solid var(--at-green-light);
	border-radius: 0 var(--at-radius) var(--at-radius) 0;
	padding: 0.85rem 0.95rem; margin: 0;
}
.at-quote p { font-size: 0.9rem; line-height: 1.5; margin: 0 0 0.45rem; }
.at-quote cite { font-style: normal; font-size: 0.82rem; font-weight: 600; color: var(--at-green); }

/* ---------- substack band ---------- */
.at-substack {
	background: var(--at-tint);
	border-block: 1px solid var(--at-line);
	text-align: center;
}
.at-substack .at-sub { margin-inline: auto; }

/* ---------- final CTA band ---------- */
.at-sec.at-cta--final { background: var(--at-green); }
.at-sec.at-cta--final h2,
.at-sec.at-cta--final p,
.at-sec.at-cta--final li,
.at-sec.at-cta--final span,
.at-sec.at-cta--final a { color: #fff; }
.at-cta--final .at-btn--primary .wp-block-button__link { background: #fff; color: var(--at-green); border-color: #fff; }
.at-cta--final .at-btn--primary .wp-block-button__link:hover { background: #e3efe9; color: var(--at-green); }
.at-cta--final .at-btn--secondary .wp-block-button__link { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.at-cta--final .at-btn--secondary .wp-block-button__link:hover { background: #fff; color: var(--at-green); }
.at-cta--final .at-tel a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.at-tel { margin: 1rem 0 0; font-size: 0.92rem; }

/* ---------- topic-page CTA (light) ---------- */
.at-sec.at-cta { background: var(--at-tint); text-align: center; }
.at-sec.at-cta--final { background: var(--at-green); }
.at-cta .at-buttons { justify-content: center; }

/* ---------- topic page body ---------- */
.at-page-body { --at-measure: 46rem; --at-gap: 0.95rem; }
.at-page-body > * { max-width: var(--at-measure) !important; margin-inline: auto !important; }
.at-page-body h2 { margin-block-start: 1.9rem !important; }
.at-page-body p, .at-page-body ul { max-width: none; }
.at-banner { margin-block-end: 1.4rem !important; }
.at-banner img {
	display: block; width: 100%; height: auto;
	aspect-ratio: 3 / 2; object-fit: cover;
	border-radius: var(--at-radius);
	background: var(--at-photo-bg);
}
.at-page-body .at-note {
	background: var(--at-tint); border-radius: 10px;
	padding: 0.85rem 1rem; font-size: 0.9rem; opacity: 1;
	margin-block-start: 1.6rem !important;
}
.at-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.at-checklist li { position: relative; padding-left: 1.6rem; line-height: 1.5; }
.at-checklist li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--at-green-light); font-weight: 700; }

/* ---------- topic page title (rendered by the page template) ---------- */
.at-topic-page .wp-block-post-title {
	font-size: clamp(1.9rem, 5.5vw, 3rem) !important;
	line-height: 1.08;
	letter-spacing: -0.02em;
	font-weight: 700;
	color: #171717;
	box-sizing: border-box;
	max-width: calc(46rem + 2 * clamp(1rem, 4vw, 2rem));
	margin: clamp(1.25rem, 4vw, 2.5rem) auto 0;
	padding-inline: clamp(1rem, 4vw, 2rem);
}
.at-topic-page .wp-block-post-title.has-text-align-center { text-align: left; }
.at-topic-page .at-page-body { padding-block-start: clamp(0.75rem, 2vw, 1.25rem); }

/* Constrained-layout belt and braces: the theme emits per-block layout styles,
   this guarantees the same measure if those are ever stripped/minified away. */
.at-sec > * { max-width: var(--wp--style--global--content-size, 1200px); margin-inline: auto; }
.at-sec > .alignfull, .at-sec > .alignwide { max-width: none; }

/* ---------- phone tightening ---------- */
@media (max-width: 600px) {
	.at-card__media img { aspect-ratio: 16 / 10; }
	.at-card__body { padding: 0.55rem 0.6rem 0.7rem; }
	.at-card__title { font-size: 0.9rem; margin-bottom: 0.2rem !important; }
	.at-card__desc { font-size: 0.78rem; line-height: 1.35;
		display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.at-cards { gap: 12px; }
}

/* ---------- per-section gap tuning ---------- */
.at-hero { --at-gap: 0; }
.at-who, .at-stats, .at-topics, .at-quotes { --at-gap: 0.85rem; }
.at-how { --at-gap: 0.9rem; }
.at-substack, .at-cta { --at-gap: 0.75rem; }
.at-hero__text > * + * { margin-block-start: 0 !important; }
.at-h1 { margin-block-end: 0.5em !important; }
.at-hero__sub { margin-block-end: 1.25rem !important; }
.at-quote p { margin-block-end: 0.45rem !important; }
.at-card__title { margin-block-end: 0.25rem !important; }
.at-who__text strong { margin-block-end: 0.2rem; }
.at-morelink { margin-block-start: 1.1rem !important; }
.at-tel { margin-block-start: 0.85rem !important; }
.at-banner { margin-block-end: 1.6rem !important; }
