/**
 * FAQ widget (both versions). One column on small screens, two from 980px.
 */

.msd-faq {
	--msd-faq-pad: clamp(80px, 11vw, 140px);
	--msd-faq-accent: var(--msd-red, #9d2020);

	padding-top: var(--msd-faq-pad);
	padding-bottom: var(--msd-faq-pad);
	color: var(--msd-ink, #1e2a30);
}

.msd-faq__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(32px, 6vw, 96px);
	align-items: start;
}

/* Intro */

.msd-faq__intro {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.msd-faq__eyebrow {
	color: var(--msd-faq-accent);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.msd-faq .msd-faq__title {
	margin: 0;
	color: var(--msd-ink, #1e2a30);
	font-family: var(--msd-font-heading, "Bricolage Grotesque", system-ui, sans-serif);
	font-size: clamp(2.1rem, 4.4vw, 3.6rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

.msd-faq__title-accent {
	color: var(--msd-faq-accent);
}

.msd-faq .msd-faq__text {
	max-width: 440px;
	margin: 0;
	color: var(--msd-text-muted, #4c565d);
	font-size: 18px;
	line-height: 1.6;
}

.msd-faq .msd-faq__button {
	display: flex;
	align-items: center;
	align-self: flex-start;
	gap: 10px;
	min-height: 54px;
	margin-top: 6px;
	padding: 0 26px;
	border: 1.5px solid var(--msd-ink, #1e2a30);
	border-radius: 999px;
	color: var(--msd-ink, #1e2a30);
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.msd-faq .msd-faq__button--solid {
	border-color: var(--msd-espresso, #281616);
	background-color: var(--msd-espresso, #281616);
	color: var(--msd-white, #fff);
}

.msd-faq .msd-faq__button:hover {
	border-color: var(--msd-espresso-hover, #3e2323);
	background-color: var(--msd-espresso-hover, #3e2323);
	color: var(--msd-white, #fff);
}

.msd-faq__button .msd-icon {
	font-size: 20px;
}

/* Questions */

.msd-faq__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.msd-faq .msd-faq__item {
	overflow: hidden;
	border: 1px solid var(--msd-line, #e6e0d5);
	border-radius: 22px;
	background-color: var(--msd-white, #fff);
}

.msd-faq__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 22px 24px;
	cursor: pointer;
	list-style: none;
}

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

/* The focus ring would be clipped by the rounded card, so draw it inside. */
.msd-faq__summary:focus-visible {
	border-radius: 22px;
	outline: 2px solid var(--msd-ink, #1e2a30);
	outline-offset: -4px;
	box-shadow: none;
}

.msd-faq .msd-faq__question {
	margin: 0;
	color: var(--msd-ink, #1e2a30);
	font-family: var(--msd-font-heading, "Bricolage Grotesque", system-ui, sans-serif);
	font-size: clamp(17px, 1.5vw, 19px);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.01em;
	text-wrap: pretty;
}

.msd-faq__icon {
	display: grid;
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: #f3eee5;
	color: var(--msd-ink, #1e2a30);
	font-size: 22px;
	transition: transform 0.3s, background-color 0.3s, color 0.3s;
	place-items: center;
}

/* Open: the plus turns into a cross. White on the accent colour, for contrast. */
.msd-faq__item[open] .msd-faq__icon {
	transform: rotate(45deg);
	background-color: var(--msd-faq-accent);
	color: var(--msd-white, #fff);
}

.msd-faq__answer {
	padding: 0 24px 24px;
}

.msd-faq .msd-faq__answer p {
	max-width: 640px;
	margin: 0;
	color: var(--msd-text-muted, #4c565d);
	font-size: 16px;
	line-height: 1.65;
}

/* Smooth opening where the browser supports it; elsewhere it simply opens. */
@supports selector(::details-content) {

	.msd-faq {
		interpolate-size: allow-keywords;
	}

	.msd-faq__item::details-content {
		overflow: clip;
		transition: block-size 0.35s ease, content-visibility 0.35s allow-discrete;
		block-size: 0;
	}

	.msd-faq__item[open]::details-content {
		block-size: auto;
	}
}

@media (min-width: 980px) {

	.msd-faq__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {

	.msd-faq__icon,
	.msd-faq .msd-faq__button {
		transition: none;
	}

	.msd-faq__item::details-content {
		transition: none;
	}
}
