/* Section 7 — FAQ (Figma «Landing · FAQ» 1440 wide, «Mobile · FAQ» 390 wide). On sand.
   A computer has two columns: heading and support card (sticky) at the right, the questions at the left. Below
   1024px one column: heading, questions, the note under them, then the support card. */

.faq {
	padding: 80px 0 140px; /* .sec: the frame (base.css). */
	background: var(--sand);
}

.faq__inner {
	display: grid;
	grid-template-columns: minmax(0, 400fr) minmax(0, 680fr);
	align-items: start;
	column-gap: 40px;
	width: var(--container);
	margin: 0 auto;
	padding: 70px 40px 0;
}

.faq__side {
	position: sticky;
	top: calc(var(--admin-bar) + var(--nav-top) + var(--nav-height) + 24px);
}

.faq__title {
	font-size: clamp(26px, 3.06vw, 44px);
	font-weight: 900;
	line-height: 1.35;
}

.faq__lead {
	margin-top: 18px;
	color: var(--subtle);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.7;
}

/* The support card. */
.faq__support {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 46px;
	padding: 24px;
	border: 1px solid rgba(21, 19, 31, 0.08);
	border-radius: 28px;
	background: var(--white);
}

.faq__who { display: flex; align-items: center; gap: 12px; }

.faq__avatar {
	display: grid;
	flex: none;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 2px solid var(--coral);
	border-radius: 50%;
	background: #fff1ec;
	color: var(--coral);
}
.faq__avatar .icon { width: 24px; height: 24px; }

.faq__names { display: flex; flex-direction: column; gap: 2px; }
.faq__names b { font-size: 17px; font-weight: 700; line-height: 22px; }
.faq__names span { color: var(--muted); font-size: 13px; font-weight: 500; line-height: 17px; }

.faq__buttons { display: flex; align-items: flex-start; gap: 8px; }
.faq__buttons .btn { flex: 1; font-size: 15px; font-weight: 600; line-height: 20px; }
.faq__ask { height: 45px; }
.faq__docs { height: 47px; }

/* The questions --------------------------------------------------------------------------------------------------- */

.faq__list { display: flex; flex-direction: column; gap: 12px; }

.faq__item {
	--ring: #fff1ec;
	--ring-line: var(--coral);
	--ring-text: var(--coral-deep);
	padding: 20px 22px;
	border: 1px solid rgba(21, 19, 31, 0.08);
	border-radius: 24px;
	background: var(--white);
	transition: border-color 0.25s, box-shadow 0.25s, padding 0.25s;
}

/* Read before: grey, like a seen story. */
.faq__item.is-seen {
	--ring: var(--sand);
	--ring-line: #d9d4d0;
	--ring-text: var(--subtle);
}
.faq__item.is-seen .faq__text { color: var(--muted); }

/* Open: the ring filled coral, the card outlined. */
.faq__item.is-open {
	--ring: var(--coral);
	--ring-line: var(--coral);
	--ring-text: var(--white);
	padding-bottom: 24px;
	border-color: rgba(255, 107, 74, 0.35);
	box-shadow: 0 12px 30px rgba(20, 18, 31, 0.06);
}
.faq__item.is-open .faq__text { color: var(--ink); }

.faq__q { font: inherit; }

.faq__button {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	text-align: right;
	cursor: pointer;
}
.faq__button:focus-visible { outline-offset: 6px; border-radius: 16px; }

.faq__ring {
	display: grid;
	flex: none;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--ring);
	box-shadow: inset 0 0 0 2px var(--ring-line);
	color: var(--ring-text);
	font-size: 15px;
	font-weight: 700;
	line-height: 20px;
	transition: background-color 0.25s, box-shadow 0.25s, color 0.25s;
}

.faq__text {
	flex: 1;
	font-size: 18px;
	font-weight: 600;
	line-height: 23px;
	transition: color 0.25s;
}

.faq__toggle {
	display: grid;
	flex: none;
	place-items: center;
	width: 32px;
	height: 32px;
	margin-inline-start: 2px;
	border-radius: 50%;
	background: var(--sand);
	color: var(--ink);
	transition: background-color 0.25s, color 0.25s;
}
.faq__toggle .icon { grid-area: 1 / 1; width: 16px; height: 16px; }
.faq__toggle .icon--minus,
.faq__item.is-open .faq__toggle .icon--plus { display: none; }
.faq__item.is-open .faq__toggle .icon--minus { display: block; }
.faq__item.is-open .faq__toggle { background: var(--ink); color: var(--white); }
.faq__button:hover .faq__toggle { background: var(--sand-line); }
.faq__item.is-open .faq__button:hover .faq__toggle { background: #2a2738; }

/* The answer: opens from 0fr to 1fr. */
.faq__panel {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	transition: grid-template-rows 0.25s var(--ease-out), visibility 0s 0.25s;
}
.faq__item.is-open .faq__panel {
	grid-template-rows: 1fr;
	visibility: visible;
	transition: grid-template-rows 0.25s var(--ease-out), visibility 0s;
}
.faq__clip { min-height: 0; overflow: hidden; }

.faq__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start; /* RTL: the right edge. */
	gap: 14px;
	padding: 12px 46px 0 48px;
}
.faq__body p { color: var(--muted); font-size: 16px; line-height: 1.85; }

.faq__setting {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px 7px 10px;
	border-radius: 999px;
	background: var(--sand);
	color: var(--muted);
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
}
.faq__setting .icon { width: 14px; height: 14px; }

.faq__caption {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
	padding-inline: 22px;
	color: var(--subtle);
	font-size: 13px;
	font-weight: 500;
	line-height: 17px;
}
.faq__caption i { flex: none; width: 14px; height: 14px; border: 2px solid #d9d4d0; border-radius: 50%; }

@media (prefers-reduced-motion: reduce) {
	.faq__item,
	.faq__panel,
	.faq__item.is-open .faq__panel { transition: none; }
}

@media (max-width: 1180px) {
	.faq__inner { padding-inline: 0; }
}

/* One column: heading, questions, note, support card. ----------------------------------------------------------- */

@media (max-width: 1023px) {
	.faq__inner { display: flex; flex-direction: column; align-items: stretch; }
	.faq__side { display: contents; }
	.faq__head { order: 0; }
	.faq__main { order: 1; margin-top: 26px; }
	.faq__support { order: 2; margin-top: 30px; }
}

@media (max-width: 767px) {
	.faq { padding: 36px 0 44px; }
	.faq__inner { padding-top: 48px; }
	.faq__title { font-size: 26px; line-height: 1.4; }
	.faq__lead { margin-top: 8px; font-size: 16px; }

	.faq__list { gap: 10px; }
	.faq__item { padding: 16px; }
	.faq__item.is-open { padding-bottom: 20px; }
	.faq__button { gap: 10px; }
	.faq__text { font-size: 16px; line-height: 21px; }
	.faq__body { padding: 12px 42px 0 0; }
	.faq__setting { align-self: stretch; border-radius: 16px; }

	.faq__caption { align-items: flex-start; margin-top: 16px; padding-inline: 0; }
	.faq__caption i { margin-top: 1px; }

	.faq__support { padding: 20px; }
}
