/* =============================================================
   COMPONENTS — typography, buttons, cards, nav, forms, accordion, footer
   elements, focus states, reveal-on-scroll.
   ============================================================= */

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	font-weight: var(--fw-bold);
	line-height: var(--lh-tight);
	letter-spacing: var(--ls-tight);
	color: var(--color-primary);
	margin: 0 0 var(--space-4);
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); }

p { margin: 0 0 var(--space-4); }
.prose { max-width: 68ch; color: var(--color-text); }
.prose:last-child { margin-bottom: 0; }

a { color: var(--color-accent-text); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--color-highlight-hover); }

.entry-content h2 { margin-top: var(--space-10); }
.entry-content h3 { margin-top: var(--space-8); }
.entry-content ul, .entry-content ol { padding-left: var(--space-6); margin-bottom: var(--space-4); }
.entry-content li { margin-bottom: var(--space-2); }
.entry-content img { border-radius: var(--radius-md); }

/* ---------- Focus states (accessibility gate) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.faq-item__q:focus-visible {
	outline: 3px solid var(--color-primary);
	outline-offset: 3px;
	border-radius: var(--radius-sm);
}
.btn:focus-visible { outline-color: var(--color-primary); }

/* ---------- Skip link ---------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link.screen-reader-text:focus {
	position: fixed !important;
	top: var(--space-3);
	left: var(--space-3);
	width: auto; height: auto;
	clip: auto;
	z-index: 1000;
	background: var(--color-primary);
	color: var(--color-white);
	padding: var(--space-3) var(--space-5);
	border-radius: var(--radius-md);
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-family: var(--font-heading);
	font-weight: var(--fw-semibold);
	font-size: var(--text-body);
	line-height: 1;
	padding: 14px 24px;
	border-radius: var(--radius-full);
	border: 1.5px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background-color var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal), transform var(--transition-fast);
	white-space: nowrap;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn:active { transform: translateY(1px); }

/* Primary = the CTA button (emerald-mint bg). Dark text, NOT white — white
   on this specific mint fails AA (2.5:1); charcoal on mint passes (5.7:1). */
.btn--primary { background: var(--color-accent); color: var(--color-primary); }
.btn--primary:hover { background: var(--color-accent-hover); color: var(--color-primary); }

.btn--dark { background: var(--color-primary); color: var(--color-white); }
.btn--dark:hover { background: var(--color-primary-light); color: var(--color-white); }

.btn--ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border-dark); }
.btn--ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }

.btn--outline { background: transparent; color: var(--color-accent-text); border-color: var(--color-accent); }
.btn--outline:hover { background: var(--color-accent-light); color: var(--color-accent-text); }

.btn--lg { padding: 16px 32px; font-size: var(--text-lg); }
.btn--sm { padding: 9px 18px; font-size: var(--text-sm); }

.hero__actions, .ask-cta-box { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.ask-cta-box { flex-direction: column; align-items: flex-start; margin: var(--space-8) 0; }
.ask-cta-box__note { color: var(--color-text-muted); font-size: var(--text-sm); margin-top: var(--space-3); margin-bottom: 0; }

/* ---------- Site logo (header + footer) ---------- */
.site-logo { display: inline-flex; align-items: center; text-decoration: none; }
.site-logo img.custom-logo { max-height: 44px; width: auto; }
.site-logo__text, .footer-logo {
	font-family: var(--font-heading);
	font-weight: var(--fw-extrabold);
	font-size: 1.375rem;
	color: var(--color-primary);
	letter-spacing: var(--ls-tight);
}
.footer-logo { color: var(--color-white); display: inline-block; margin-bottom: var(--space-3); }
.site-logo__accent, .footer-logo__accent { color: var(--color-accent); }

/* ---------- Nav ---------- */
.site-nav a { color: var(--color-primary); text-decoration: none; font-weight: var(--fw-medium); }
.site-nav a:hover { color: var(--color-accent-text); }

.menu-toggle {
	background: none;
	border: 1px solid var(--color-border-dark);
	border-radius: var(--radius-md);
	width: 40px; height: 40px;
	align-items: center;
	justify-content: center;
	color: var(--color-primary);
	cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }

/* ---------- Eyebrow / section header ---------- */
.hero__eyebrow, .sec__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--text-xs);
	font-weight: var(--fw-semibold);
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--color-accent-text);
	margin-bottom: var(--space-3);
}
.hero__eyebrow svg, .sec__eyebrow svg { width: 14px; height: 14px; }
.sec__title { margin-bottom: var(--space-3); }
.sec__sub { color: var(--color-text-muted); font-size: var(--text-lg); }

.hero__title { margin-bottom: var(--space-4); }
.hero__title em { color: var(--color-accent-text); font-style: normal; }
.hero__sub { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 52ch; }

.hero__stat { display: flex; flex-direction: column; }
.hero__stat strong { font-family: var(--font-heading); font-size: var(--text-h3); color: var(--color-primary); line-height: 1; }
.hero__stat span { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); }

/* ---------- Hero placeholder (no image present) ---------- */
.hero__card {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	padding: var(--space-5);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	aspect-ratio: 1;
}
.hero__card svg { width: 32px; height: 32px; color: var(--color-accent-text); }
.hero__card span { font-weight: var(--fw-semibold); font-size: var(--text-sm); }
.hero__card--2 { margin-top: var(--space-8); }
.hero__card--4 { margin-top: calc(-1 * var(--space-8)); }
.hero__card--1, .hero__card--3 { background: var(--color-accent-light); }

/* ---------- Trust items (free-explainer) ---------- */
.trust-item { text-align: center; }
.trust-item__icon {
	width: 56px; height: 56px;
	display: flex; align-items: center; justify-content: center;
	margin: 0 auto var(--space-4);
	background: var(--color-accent-light);
	border-radius: var(--radius-full);
	color: var(--color-accent-text);
}
.trust-item__icon svg { width: 24px; height: 24px; }
.trust-item h3 { font-size: var(--text-h5); margin-bottom: var(--space-2); }
.trust-item p { color: var(--color-text-muted); margin-bottom: 0; font-size: var(--text-sm); }

/* ---------- Process steps ---------- */
.process-step { text-align: center; position: relative; }
.process-step__num {
	width: 40px; height: 40px;
	display: flex; align-items: center; justify-content: center;
	margin: 0 auto var(--space-3);
	background: var(--color-primary);
	color: var(--color-white);
	border-radius: var(--radius-full);
	font-family: var(--font-heading);
	font-weight: var(--fw-bold);
}
.process-step__icon { color: var(--color-accent-text); margin-bottom: var(--space-2); }
.process-step__icon svg { width: 28px; height: 28px; }
.process-step__title { font-size: var(--text-h5); margin-bottom: var(--space-2); }
.process-step__desc { color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: 0; }
.process-note { text-align: center; color: var(--color-text-faint); font-size: var(--text-sm); margin-top: var(--space-8); margin-bottom: 0; }

/* ---------- Topic cards (question bank) ---------- */
.topic-card, .quote-card, .reader-card {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: var(--space-6);
	transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}
.topic-card:hover, .reader-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.topic-card__icon {
	width: 48px; height: 48px;
	display: flex; align-items: center; justify-content: center;
	background: var(--color-accent-light);
	color: var(--color-accent-text);
	border-radius: var(--radius-md);
	margin-bottom: var(--space-4);
}
.topic-card__icon svg { width: 22px; height: 22px; }
.topic-card h3 { font-size: var(--text-h5); margin-bottom: var(--space-2); }
.topic-card p { color: var(--color-text-muted); font-size: var(--text-sm); }
.topic-card__link {
	display: inline-flex; align-items: center; gap: var(--space-1);
	font-weight: var(--fw-semibold); font-size: var(--text-sm);
	text-decoration: none; color: var(--color-accent-text);
	border-bottom: 2px solid var(--color-highlight);
	padding-bottom: 2px;
}
.topic-card__link svg { width: 14px; height: 14px; }
.topic-card--compact { padding: var(--space-5); }

/* ---------- Quote cards (testimonials) ---------- */
.quote-card__icon { color: var(--color-highlight); margin-bottom: var(--space-3); }
.quote-card__icon svg { width: 26px; height: 26px; }
.quote-card__text { font-size: var(--text-lg); font-style: italic; margin-bottom: var(--space-5); }
.quote-card__author { display: flex; flex-direction: column; }
.quote-card__name { font-weight: var(--fw-semibold); }
.quote-card__role { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---------- Reader cards ---------- */
.reader-card { text-align: center; }
.reader-card__avatar {
	width: 96px; height: 96px;
	margin: 0 auto var(--space-4);
	border-radius: var(--radius-full);
	overflow: hidden;
	background: var(--color-accent-light);
	display: flex; align-items: center; justify-content: center;
}
.reader-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.reader-card__initial { font-family: var(--font-heading); font-size: 2rem; font-weight: var(--fw-bold); color: var(--color-accent-text); }
.reader-card__name { font-size: var(--text-h5); margin-bottom: var(--space-2); }
.reader-card__role { display: flex; align-items: center; justify-content: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.reader-card__role svg { width: 16px; height: 16px; color: var(--color-accent-text); flex-shrink: 0; }
.reader-card__short { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: 0; }
.reader-card--compact { padding: var(--space-5); }

/* ---------- Full reader bio cards (Readers page) ---------- */
.reader-full-card {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: var(--space-8);
	align-items: start;
	padding: var(--space-8) 0;
	border-bottom: 1px solid var(--color-border);
}
.reader-full-card:last-child { border-bottom: none; }
.reader-full-card__avatar {
	width: 160px; height: 160px;
	border-radius: var(--radius-full);
	overflow: hidden;
	background: var(--color-accent-light);
	display: flex; align-items: center; justify-content: center;
}
.reader-full-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.reader-full-card__tags { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0 var(--space-4); padding: 0; }
.reader-full-card__tags li {
	font-size: var(--text-xs);
	font-weight: var(--fw-semibold);
	background: var(--color-accent-light);
	color: var(--color-accent-text);
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-full);
}
@media (max-width: 640px) {
	.reader-full-card { grid-template-columns: 1fr; text-align: center; }
	.reader-full-card__avatar { margin: 0 auto; }
	.reader-full-card__tags { justify-content: center; }
}

/* ---------- Byline card (single post) ---------- */
.byline-card {
	display: flex;
	gap: var(--space-4);
	align-items: center;
	margin-top: var(--space-10);
	padding: var(--space-5);
	background: var(--color-bg-alt);
	border-radius: var(--radius-lg);
}
.byline-card__avatar { width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--radius-full); overflow: hidden; background: var(--color-accent-light); display: flex; align-items: center; justify-content: center; }
.byline-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline-card__body strong { display: block; font-family: var(--font-heading); }
.byline-card__body span { display: block; font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-2); }
.byline-card__body p { margin-bottom: 0; font-size: var(--text-sm); }
.single-meta { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---------- FAQ accordion ---------- */
.faq-list { display: flex; flex-direction: column; gap: var(--space-3); }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.faq-item__q {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	background: var(--color-white);
	border: none;
	text-align: left;
	font-family: var(--font-heading);
	font-weight: var(--fw-semibold);
	font-size: var(--text-body);
	color: var(--color-primary);
	padding: var(--space-5);
	cursor: pointer;
}
.faq-item__icon { flex-shrink: 0; color: var(--color-accent-text); transition: transform var(--transition-normal); }
.faq-item__icon svg { width: 18px; height: 18px; }
.faq-item.open .faq-item__icon { transform: rotate(45deg); }
.faq-item__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--transition-slow); }
.faq-item.open .faq-item__a { grid-template-rows: 1fr; }
.faq-item__a-inner { overflow: hidden; }
.faq-item__a-body { padding: 0 var(--space-5) var(--space-5); color: var(--color-text-muted); }
.faq-item__a-body p:last-child { margin-bottom: 0; }

/* ---------- Guide TOC (pillar page) ---------- */
.guide-toc { background: var(--color-bg-alt); border-radius: var(--radius-lg); padding: var(--space-5); }
.guide-toc__title { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--space-3); }
.guide-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.guide-toc li { counter-increment: toc; margin-bottom: var(--space-2); font-size: var(--text-sm); }
.guide-toc li::before { content: counter(toc) '. '; color: var(--color-accent-text); font-weight: var(--fw-semibold); }
.guide-toc a { color: var(--color-text); text-decoration: none; }
.guide-toc a:hover { color: var(--color-accent-text); }
.guide-body :first-child { margin-top: 0; }

/* ---------- CTA banner ---------- */
.cta-banner { padding: var(--space-20) 0; text-align: center; background: var(--color-primary); color: var(--color-white); }
.cta-banner h2 { color: var(--color-white); }
.cta-banner p { color: var(--color-footer-text); font-size: var(--text-lg); margin-bottom: var(--space-8); }
.cta-banner__list { list-style: none; margin: 0 0 var(--space-8); padding: 0; display: flex; flex-direction: column; gap: var(--space-2); align-items: center; }
.cta-banner__list li { display: flex; align-items: center; gap: var(--space-2); color: var(--color-footer-text); }
.cta-banner__list svg { width: 18px; height: 18px; color: var(--color-accent); flex-shrink: 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-4); }
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-accent-text); }

/* ---------- Post cards ---------- */
.post-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow var(--transition-normal), transform var(--transition-normal); }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-card__thumb { display: block; aspect-ratio: 16/10; overflow: hidden; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: var(--space-5); }
.post-card__title { font-size: var(--text-h5); margin-bottom: var(--space-2); }
.post-card__title a { color: var(--color-primary); text-decoration: none; }
.post-card__title a:hover { color: var(--color-accent-text); }
.post-card__excerpt { color: var(--color-text-muted); font-size: var(--text-sm); }
.post-card__link { font-size: var(--text-sm); font-weight: var(--fw-semibold); text-decoration: none; display: inline-flex; align-items: center; gap: var(--space-1); }
.post-card__link svg { width: 14px; height: 14px; }

/* ---------- Search form ---------- */
.search-form__row { display: flex; align-items: center; gap: var(--space-2); border: 1.5px solid var(--color-border-dark); border-radius: var(--radius-full); padding: var(--space-2) var(--space-4); background: var(--color-white); }
.search-form__icon { color: var(--color-text-faint); display: flex; }
.search-form__icon svg { width: 18px; height: 18px; }
.search-form__field { border: none; outline: none; flex: 1; font-family: var(--font-body); font-size: var(--text-body); background: transparent; }
.search-form__submit { background: var(--color-accent); color: var(--color-primary); border: none; border-radius: var(--radius-full); padding: var(--space-2) var(--space-4); font-weight: var(--fw-semibold); cursor: pointer; }

/* ---------- Reveal-on-scroll (progressive enhancement only) ---------- */
html.js-motion .reveal,
html.js-motion .topic-card,
html.js-motion .quote-card,
html.js-motion .reader-card,
html.js-motion .trust-item,
html.js-motion .process-step,
html.js-motion .faq-item,
html.js-motion .post-card {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity var(--transition-slow), transform var(--transition-slow);
}
html.js-motion .is-in { opacity: 1; transform: none; }
