.faq {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: var(--space-60);
	padding: 80px;
	background: var(--color-white);

	@media (min-width: 810px) and (max-width: 1199.98px) {
		padding: 50px 40px;
	}

	@media (max-width: 809.98px) {
		flex-direction: column;
		padding: 50px 25px;
	}
}

.faq__intro {
	position: sticky;
	top: 36px;
	z-index: 1;
	display: flex;
	flex: 1 0 0;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-20);
	min-width: 1px;
	max-width: 300px;
	overflow: clip;

	@media (max-width: 1199.98px) {
		position: relative;
		top: auto;
		max-width: none;
	}

	@media (max-width: 809.98px) {
		flex: none;
		width: 100%;
	}
}

.faq__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-10);
	width: 100%;
}

.faq__heading {
	width: 100%;
	font-family: var(--font-figtree);
	font-size: var(--fs-40);
	font-weight: var(--fw-regular);
	line-height: var(--lh-140);
	letter-spacing: var(--ls-wide);
	color: var(--color-olive);

	& em {
		font-family: var(--font-cormorant);
		font-style: italic;
		font-weight: var(--fw-semibold);
		letter-spacing: var(--ls-tight);
	}
}

.faq__text {
	width: 100%;
	color: var(--color-ink-70);
}

.faq__list {
	display: flex;
	flex: 1 0 0;
	flex-direction: column;
	gap: var(--space-24);
	min-width: 1px;
	overflow: clip;

	@media (max-width: 809.98px) {
		flex: none;
		width: 100%;
	}
}

.faq-item {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: var(--space-16);
	overflow: clip;
	cursor: pointer;
	background: var(--color-white);
	border-radius: var(--radius-12);
	outline: 1px solid var(--color-sage-light);
	outline-offset: -1px;
}

.faq-item__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	text-align: start;
	cursor: pointer;
}

.faq-item__label {
	flex: 1 0 0;
	min-width: 1px;
}

.faq-item__icon {
	position: relative;
	flex: none;
	width: 24px;
	height: 24px;

	& svg {
		position: absolute;
		inset: 0;
		fill: none;
		stroke: var(--color-ink-70);
		stroke-linecap: round;
		stroke-linejoin: round;
		stroke-width: 1.5;
		transition: opacity 0.4s var(--ease-framer);
	}
}

.faq-item__close,
.faq-item.is-open .faq-item__plus {
	opacity: 0;
}

.faq-item.is-open .faq-item__close {
	opacity: 1;
}

/* Height animation: Framer tweens the card's layout over 0.4s. */
.faq-item__answer {
	display: grid;
	grid-template-rows: 1fr;
	transition: grid-template-rows 0.4s var(--ease-framer);

	.js .faq-item:not(.is-open) & {
		grid-template-rows: 0fr;
	}
}

.faq-item__inner {
	min-height: 0;
	overflow: hidden;

	/* The 10px gap Framer adds between question and answer. */
	&::before {
		display: block;
		height: var(--space-10);
		content: "";
	}

	& a {
		color: var(--color-olive);
		text-decoration: underline;
	}

	& > * + * {
		margin-top: 1em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.faq-item__answer,
	.faq-item__icon svg {
		transition: none;
	}
}
