/**
 * SCBL — FAQ block.
 *
 * Centered eyebrow + heading + accordion list. The answer wrapper uses
 * grid-template-rows transitions for a smooth open/close (with a JS
 * fallback enhancement in faq.js for browsers that need it).
 */

.faq {
	width: 100%;
	background: var(--color-dark-50);
	color: var(--color-text);
	padding-block: clamp(2.5rem, 6vw, 5rem);
}

.faq__inner {
	width: 100%;
	max-width: var(--container-wide);
	margin-inline: auto;
	padding-inline: var(--container-padding);
	display: flex;
	flex-direction: column;
	gap: clamp(1.75rem, 3vw, 2.25rem);
}

/* ─── Head ───────────────────────────────────────────────────────────── */
.faq__head {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.875rem;
}

.faq__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.faq__eyebrow-text {
	color: var(--color-indigo-900);
}

.faq__strip {
	display: block;
	width: 5rem;
	height: 1px;
	background: var(--color-orange-500);
	flex-shrink: 0;
}

.faq__title {
	margin: 0;
	color: var(--color-text);
}

.faq__title-highlight {
	color: var(--color-indigo-600);
}

/* ─── List ───────────────────────────────────────────────────────────── */
.faq__list {
	width: 100%;
	max-width: 51.25rem; /* 820px */
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.faq__item {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: 0.75rem;
	padding: 1.125rem 1.375rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq__item[open] {
	border-color: var(--color-indigo-600);
	box-shadow: 0 0.5rem 1.25rem rgba(95, 47, 157, 0.08);
}

.faq__summary {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	cursor: pointer;
	color: var(--color-text);
}

.faq__summary::-webkit-details-marker { display: none; }
.faq__summary::marker { display: none; content: ''; }

.faq__summary:focus-visible {
	outline: 2px solid var(--color-indigo-600);
	outline-offset: 2px;
	border-radius: 0.375rem;
}

.faq__question {
	flex: 1;
	min-width: 0;
}

/* ─── Plus / minus indicator ────────────────────────────────────────── */
.faq__indicator {
	position: relative;
	width: 1.25rem;
	height: 1.25rem;
	flex: none;
	color: var(--color-orange-500);
	transition: color 0.2s ease, transform 0.25s ease;
}

.faq__indicator::before,
.faq__indicator::after {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	background: currentColor;
	border-radius: 1px;
}

.faq__indicator::before {
	width: 1rem;
	height: 0.125rem;
}

.faq__indicator::after {
	width: 0.125rem;
	height: 1rem;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.faq__item[open] .faq__indicator {
	color: var(--color-indigo-600);
}

.faq__item[open] .faq__indicator::after {
	transform: scaleY(0);
	opacity: 0;
}

/* ─── Answer (smooth open/close) ─────────────────────────────────────── */
/* The wrap's height is animated by faq.js. CSS keeps it collapsed by
 * default so the closed state renders correctly with no JS yet loaded. */
.faq__answer-wrap {
	overflow: hidden;
	height: 0;
}

.faq__item[open] .faq__answer-wrap {
	height: auto;
}

/* While JS is animating, it sets an explicit pixel height + transition. */
.faq__answer-wrap.is-animating {
	height: 0;
	transition: height 0.28s ease;
}

.faq__answer > * {
	margin-top: 0.875rem;
}

.faq__answer > *:first-child { margin-top: 0.875rem; }
