/* Home page sections: why-choose, community numbers, FAQ.
 *
 * Sits between the featured grid and the footer on public/pages/home.html.
 * Every colour is a --hb-* token so the same block renders on the light and the
 * dark palette without a second rule set; the home page defaults to dark, but
 * the visitor can switch, and both states have to hold.
 *
 * The heading pattern is one shared shape: white lead word, accent tail word
 * with a soft glow. It repeats four times on the page, so it is one class.
 */

.hbg-sec {
	--sec-ink: var(--hb-ink, #14161b);
	--sec-muted: var(--hb-muted, #5d626b);
	--sec-faint: var(--hb-faint, #686c74);
	--sec-card: var(--hb-card, #ffffff);
	--sec-line: var(--hb-line, #e6e8ec);
	--sec-line-strong: var(--hb-line-strong, #d5d8e1);
	--sec-accent: var(--hb-accent, #6571ff);
	--sec-accent-ink: var(--hb-accent-ink, #4a55e0);
	--sec-accent-soft: var(--hb-accent-soft, rgba(101, 113, 255, 0.12));
	--sec-accent-line: var(--hb-accent-line, rgba(101, 113, 255, 0.42));

	position: relative;
	padding: 80px 0;
	color: var(--sec-ink);
	font-size: 15px;
	line-height: 1.6;
}

.hbg-sec *,
.hbg-sec *::before,
.hbg-sec *::after {
	box-sizing: border-box;
}

.hbg-sec__inner {
	width: 100%;
	max-width: var(--hb-shell, 1200px);
	margin: 0 auto;
	padding: 0 var(--hb-gutter, 24px);
}

/* ------------------------------------------------------------- headings */

.hbg-sec__head {
	margin: 0 auto 48px;
	max-width: 720px;
	text-align: center;
}

.hbg-sec__title {
	margin: 0;
	color: var(--sec-ink);
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.hbg-sec__title em {
	font-style: normal;
	color: var(--sec-accent-ink);
	text-shadow: 0 0 28px rgb(101 113 255 / 0.35);
}

.hbg-sec__lede {
	margin: 14px auto 0;
	max-width: 620px;
	color: var(--sec-muted);
	font-size: 15px;
	line-height: 1.65;
}

.hbg-sec__lede b {
	color: var(--sec-ink);
	font-weight: 600;
}

/* ----------------------------------------------------------- why us grid */

.hbg-why {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hbg-why__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 26px;
	border: 1px solid var(--sec-line);
	border-radius: 16px;
	background: var(--sec-card);
	background: color-mix(in srgb, var(--sec-card) 88%, transparent);
	transition: border-color 0.22s ease, transform 0.22s ease;
}

.hbg-why__card:hover {
	border-color: var(--sec-accent-line);
	transform: translateY(-2px);
}

.hbg-why__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0 0 18px;
	border-radius: 13px;
	border: 1px solid var(--sec-accent-line);
	background: var(--sec-accent-soft);
	color: var(--sec-accent-ink);
}

.hbg-why__icon svg {
	width: 21px;
	height: 21px;
}

.hbg-why__title {
	margin: 0 0 10px;
	color: var(--sec-ink);
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.hbg-why__body {
	margin: 0 0 18px;
	color: var(--sec-muted);
	font-size: 14.5px;
	line-height: 1.65;
}

.hbg-why__link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: auto;
	color: var(--sec-accent-ink);
	font-size: 14px;
	font-weight: 650;
	text-decoration: none;
}

.hbg-why__link svg {
	width: 15px;
	height: 15px;
	transition: transform 0.2s ease;
}

.hbg-why__link:hover svg,
.hbg-why__link:focus-visible svg {
	transform: translateX(3px);
}

.hbg-why__link:focus-visible {
	outline: 2px solid var(--sec-accent);
	outline-offset: 4px;
	border-radius: 4px;
}

/* ---------------------------------------------------------------- stats */

/* Two plates, side by side, each one icon + number + label. A rule between
 * them would fight the rounded border, so the gap does the separating. */
.hbg-tallies {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
	max-width: 820px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.hbg-tally {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	grid-template-rows: auto auto auto;
	align-items: center;
	column-gap: 22px;
	row-gap: 3px;
	min-height: 128px;
	padding: 26px 30px;
	border: 1px solid var(--sec-line);
	border-radius: 18px;
	background: var(--sec-card);
	background: color-mix(in srgb, var(--sec-card) 86%, transparent);
	transition: border-color 0.22s ease, transform 0.22s ease;
}

.hbg-tally:hover {
	border-color: var(--sec-accent-line);
	transform: translateY(-2px);
}

.hbg-tally__icon {
	grid-row: 1 / -1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 1px solid var(--sec-line-strong);
	border-radius: 16px;
	background: var(--sec-card);
	color: var(--sec-muted);
}

.hbg-tally--accent .hbg-tally__icon {
	border-color: var(--sec-accent-line);
	background: var(--sec-accent-soft);
	color: var(--sec-accent-ink);
}

.hbg-tally__icon svg {
	width: 25px;
	height: 25px;
}

.hbg-tally__value {
	display: block;
	align-self: end;
	color: var(--sec-ink);
	font-size: clamp(34px, 4.6vw, 48px);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.hbg-tally--accent .hbg-tally__value {
	color: var(--sec-accent-ink);
	text-shadow: 0 0 30px rgb(101 113 255 / 0.35);
}

.hbg-tally__label {
	display: block;
	align-self: start;
	color: var(--sec-faint);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.5;
	text-transform: uppercase;
}

.hbg-tally__note {
	display: block;
	color: var(--sec-muted);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
}

.hbg-tally__note[hidden] {
	display: none;
}

/* ------------------------------------------------------------- reviews */

/* The review block is shared with the product page (reviews.css) and is filled
 * by reviews.js from /api/reviews. Only the shell padding lives here. */
.hbg-sec.hbg-sec--reviews {
	padding: 72px 0;
	border-top: 1px solid var(--sec-line);
}

.hbg-sec--reviews .hbg-reviews {
	max-width: var(--hb-shell, 1200px);
	margin: 0 auto;
	padding: 0 var(--hb-gutter, 24px);
}

/* ------------------------------------------------------------------ FAQ */

.hbg-faq__search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 22px;
	padding: 0 18px;
	height: 56px;
	border: 1px solid var(--sec-line);
	border-radius: 14px;
	background: var(--sec-card);
	background: color-mix(in srgb, var(--sec-card) 82%, transparent);
}

.hbg-faq__search svg {
	flex: none;
	width: 17px;
	height: 17px;
	color: var(--sec-faint);
}

.hbg-faq__search input {
	flex: 1;
	min-width: 0;
	height: 100%;
	border: 0;
	background: transparent;
	color: var(--sec-ink);
	font: inherit;
	font-size: 15px;
}

.hbg-faq__search input::placeholder {
	color: var(--sec-faint);
}

.hbg-faq__search input:focus {
	outline: none;
}

.hbg-faq__search:focus-within {
	border-color: var(--sec-accent-line);
	box-shadow: 0 0 0 3px rgb(101 113 255 / 0.16);
}

.hbg-faq__count {
	flex: none;
	color: var(--sec-faint);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.hbg-faq__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 12px;
}

.hbg-faq__item {
	border: 1px solid var(--sec-line);
	border-radius: 14px;
	background: var(--sec-card);
	background: color-mix(in srgb, var(--sec-card) 82%, transparent);
	overflow: hidden;
	transition: border-color 0.2s ease;
}

.hbg-faq__item[hidden] {
	display: none;
}

.hbg-faq__item.is-open,
.hbg-faq__item:hover {
	border-color: var(--sec-accent-line);
}

.hbg-faq__summary {
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	padding: 16px 20px;
	border: 0;
	background: none;
	color: var(--sec-ink);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.hbg-faq__summary:focus-visible {
	outline: 2px solid var(--sec-accent);
	outline-offset: -3px;
}

.hbg-faq__mark {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 11px;
	border: 1px solid var(--sec-accent-line);
	background: var(--sec-accent-soft);
	color: var(--sec-accent-ink);
}

.hbg-faq__mark svg {
	width: 18px;
	height: 18px;
}

.hbg-faq__q {
	flex: 1;
	min-width: 0;
}

.hbg-faq__chevron {
	flex: none;
	width: 16px;
	height: 16px;
	color: var(--sec-faint);
	transition: transform 0.24s ease;
}

.hbg-faq__item.is-open .hbg-faq__chevron {
	transform: rotate(180deg);
}

/* Height animation without measuring: the grid row collapses to zero and the
 * panel's own content decides the open height. */
.hbg-faq__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.28s ease;
}

.hbg-faq__item.is-open .hbg-faq__panel {
	grid-template-rows: 1fr;
}

.hbg-faq__panel > div {
	overflow: hidden;
}

.hbg-faq__answer {
	margin: 0;
	padding: 0 20px 20px 76px;
	color: var(--sec-muted);
	font-size: 14.5px;
	line-height: 1.7;
}

.hbg-faq__answer a {
	color: var(--sec-accent-ink);
	font-weight: 600;
}

.hbg-faq__empty {
	margin: 0;
	padding: 22px;
	border: 1px dashed var(--sec-line-strong);
	border-radius: 14px;
	color: var(--sec-faint);
	text-align: center;
}

.hbg-faq__empty[hidden] {
	display: none;
}

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
	.hbg-sec[data-reveal] .hbg-sec__head,
	.hbg-sec[data-reveal] .hbg-why,
	.hbg-sec[data-reveal] .hbg-tallies,
	.hbg-sec[data-reveal] .hbg-faq__list {
		opacity: 0;
		transform: translateY(14px);
		transition: opacity 0.5s ease, transform 0.5s ease;
	}

	.hbg-sec.is-shown .hbg-sec__head,
	.hbg-sec.is-shown .hbg-why,
	.hbg-sec.is-shown .hbg-tallies,
	.hbg-sec.is-shown .hbg-faq__list {
		opacity: 1;
		transform: none;
	}

	.hbg-sec.is-shown .hbg-why__card:nth-child(2) {
		transition-delay: 70ms;
	}

	.hbg-sec.is-shown .hbg-why__card:nth-child(3) {
		transition-delay: 140ms;
	}
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
	.hbg-why {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hbg-why__card:last-child {
		grid-column: 1 / -1;
	}

	.hbg-tallies {
		gap: 18px;
	}

	.hbg-faq__answer {
		padding-left: 20px;
	}
}

@media (max-width: 640px) {
	.hbg-sec {
		padding: 56px 0;
	}

	.hbg-sec.hbg-sec--reviews {
		padding: 48px 0;
	}

	.hbg-sec__head {
		margin-bottom: 34px;
	}

	.hbg-why {
		grid-template-columns: minmax(0, 1fr);
	}

	.hbg-why__card:last-child {
		grid-column: auto;
	}

	.hbg-tallies {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.hbg-tally {
		min-height: 108px;
		padding: 22px 24px;
	}

	.hbg-faq__summary {
		gap: 12px;
		padding: 14px 16px;
	}

	.hbg-faq__mark {
		width: 36px;
		height: 36px;
	}

	.hbg-faq__answer {
		padding: 0 16px 18px 64px;
	}
}
