/* ==========================================================================
   FAQ
   ========================================================================== */

.faq {
	padding-block: var(--space-section);
	background-color: var(--surface-100);
}

/* Stacked on phones and tablets. Desktop: heading left, questions right. */
.faq__inner {
	display: grid;
	gap: var(--space-6);
}

.faq__title {
	max-width: 14ch;
	color: var(--brand-blue);
}

/* Only when the FAQ has an eyebrow (Services page): eyebrow and heading together. */
.faq__header .faq__title {
	margin-top: var(--space-3);
}

.faq__list {
	border-top: 1px solid var(--border-subtle);
}

.faq__item {
	border-bottom: 1px solid var(--border-subtle);
}

/* The question is the toggle. Browser triangle removed, plus/minus added. */
.faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-5);
	padding-block: var(--space-5);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-snug);
	list-style: none;
	cursor: pointer;
}

.faq__question::-webkit-details-marker {
	display: none;
}

.faq__question::after {
	content: "+";
	content: "+" / "";
	flex-shrink: 0;
	font-size: var(--text-xl);
	font-weight: var(--weight-regular);
	line-height: 1;
	color: var(--brand-blue);
}

.faq__item[open] > .faq__question::after {
	content: "\2212";
	content: "\2212" / "";
}

.faq__question:hover {
	color: var(--brand-blue);
}

.faq__answer {
	max-width: var(--measure);
	padding-bottom: var(--space-5);
}

@media (min-width: 64em) {
	.faq__inner {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		align-items: start;
		gap: var(--space-9);
	}
}

/* ==========================================================================
   Closing call to action
   ========================================================================== */

.cta {
	/* Bottom padding halved: the footer follows directly, so a full section gap read as empty. */
	padding-block: var(--space-section) calc(var(--space-section) / 2);
	background-color: var(--surface-100);
	/* The FAQ above is also surface-100, so a hairline marks where the CTA begins. */
	border-top: 1px solid var(--border-subtle);
}

/* Stacked on phones. Desktop: copy left, button right. */
.cta__inner {
	display: grid;
	justify-items: start;
	gap: var(--space-6);
}

.cta__title {
	color: var(--brand-blue);
}

/* The default hover (white) would vanish on light grey, so darken to brand blue instead. */
.cta__button:hover {
	color: var(--on-blue);
	background-color: var(--brand-blue-700);
}

.cta__text {
	max-width: var(--measure);
	margin-top: var(--space-4);
	font-size: var(--text-lg);
}

@media (min-width: 64em) {
	.cta__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: var(--space-8);
	}

	.cta__text {
		margin-top: var(--space-5);
	}
}

/* A question marked as a heading (question_heading): looks the same as plain text. */
.faq__question-text {
	margin: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
	text-wrap: inherit;
	color: inherit;
}
