/*
 * FAQs block. Loaded only on pages that use it. Mobile first; desktop from 900px.
 * Source: the components file's ".faq" and ".acc" CSS. Look C = hairline rows;
 * look F = soft cards. The +/- icon is drawn in CSS (no image, no JavaScript).
 */

.faqs { padding: 56px 0; }

.faqs__grid { display: grid; gap: 22px; }

.faqs__title { font-size: 1.9rem; line-height: 1.1; }
.faqs__intro { max-width: var(--intro-w, 90ch); margin: 10px 0 0; color: var(--muted); }
.faqs__call { max-width: 40ch; margin: 12px 0 0; color: var(--muted); }

.faqs__list { display: grid; gap: var(--faqs-gap, 0); }

/*
 * Each row is a little wider than the text column, so the hover tint has room
 * around the words. Negative margins keep the question and answer lined up with
 * the heading, so nothing moves when the row is hovered.
 */
.faqs__item {
	--faqs-pad: 10px;
	position: relative;
	isolation: isolate;
	margin: 0 calc(var(--faqs-pad) * -1);
	padding: 0 var(--faqs-pad);
	border-bottom: 1px solid var(--line);
}

/* The rounded hover tint sits behind the row and stops at the hairline. */
.faqs__item::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: 12px;
	background: transparent;
	transition: background-color 0.2s ease;
	pointer-events: none;
}

@media (hover: hover) {
	html body.look-c .faqs__item:hover::before { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
}

/* Look C rows are flat, so the card lift and shadow are replaced by the tint. */
@media (hover: hover) {
	html body.look-c .faqs__item:hover { transform: none; box-shadow: none; }
}

.faqs__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 0;
	font-size: 1.03rem;
	font-weight: 700;
	line-height: 1.3;
	list-style: none;
	cursor: pointer;
}

.faqs__item summary::-webkit-details-marker { display: none; }
.faqs__item summary:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* The plus that turns into a minus when the question is open. */
.faqs__pm {
	position: relative;
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.faqs__pm::before,
.faqs__pm::after {
	content: "";
	position: absolute;
	top: 14px;
	right: 9px;
	left: 9px;
	height: 2px;
	border-radius: 2px;
	background: var(--brand);
}

.faqs__pm::after { transform: rotate(90deg); transition: transform 0.2s; }
.faqs__item[open] .faqs__pm::after { transform: rotate(0); }

.faqs__answer { padding: 0 0 18px; color: var(--muted); }
.faqs__answer > * { max-width: 62ch; margin: 0; }
.faqs__answer > * + * { margin-top: 0.8em; }
.faqs__answer ul,
.faqs__answer ol { padding-left: 1.25em; }

/* ---------- Look F: each question is its own soft card ---------- */

.look-f .faqs__list { --faqs-gap: 10px; }

.look-f .faqs__item {
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: var(--card-r);
	background: var(--surface);
}

.look-f .faqs__pm { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.look-f .faqs__pm::before,
.look-f .faqs__pm::after { background: var(--brand); }

@media (prefers-reduced-motion: reduce) {
	.faqs__pm::after { transition: none; }
}

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
	.faqs { padding: 96px 0; }
	.faqs__title { font-size: 2.9rem; }
	.faqs__grid { grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
	.faqs__item { --faqs-pad: 14px; }
}
