/*
 * IncubeSocial — FAQ page (page-faq.php)
 * Scoped styles for the accordion FAQ template. Loaded only when this
 * template is active (see incubesocial_enqueue_faq_assets in functions.php).
 * Built on top of design-tokens.css — no new color values invented here.
 */

.faq-page {
	padding-top: 3rem;
	padding-bottom: 5rem;
}

/* ---------- Hero ---------- */

.faq-hero {
	max-width: 46rem;
	margin: 0 0 3rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid rgba(13, 19, 43, 0.1);
}

.faq-hero__eyebrow {
	margin: 0 0 0.75rem;
	font-family: var(--font-body);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-purple-primary);
}

.faq-hero__title {
	font-size: clamp(1.9rem, 4.4vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 1rem;
	max-width: 22ch;
}

.faq-hero__lede {
	font-size: 1.0625rem;
	line-height: 1.65;
	max-width: 42ch;
	color: var(--color-navy-dark);
	opacity: 0.82;
	margin: 0;
}

/* ---------- Group ---------- */

.faq-group {
	margin: 0 0 3.25rem;
}

.faq-group:first-of-type {
	margin-top: 0.5rem;
}

.faq-group__heading-row {
	display: flex;
	align-items: baseline;
	gap: 0.875rem;
	margin: 0 0 1.25rem;
}

.faq-group__index {
	font-family: var(--font-heading);
	font-size: 0.875rem;
	font-weight: 700;
	/* Accent hues (blue/pink) fail WCAG AA as small text on the light
	   background — purple is the only brand accent that clears 4.5:1,
	   so it's the one used for legible small labels. */
	color: var(--color-purple-primary);
	letter-spacing: 0.04em;
}

.faq-group__label {
	font-size: 1.375rem;
	font-weight: 700;
	margin: 0;
}

/* First group (security) gets a little extra visual weight — it's the
   objection that decides whether the visitor keeps reading at all. */
.faq-group:first-of-type .faq-group__label {
	font-size: 1.5rem;
}

.faq-group:first-of-type .faq-group__heading-row {
	position: relative;
	padding-left: 1rem;
}

.faq-group:first-of-type .faq-group__heading-row::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.15em;
	bottom: 0.15em;
	width: 3px;
	border-radius: 999px;
	background: var(--gradient-signature);
}

/* ---------- Accordion list ---------- */

.faq-list {
	display: flex;
	flex-direction: column;
	border-top: 1px solid rgba(13, 19, 43, 0.12);
}

.faq-item {
	border-bottom: 1px solid rgba(13, 19, 43, 0.12);
}

.faq-item__heading {
	margin: 0;
}

.faq-item__trigger {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	width: 100%;
	padding: 1.25rem 0.25rem;
	cursor: pointer;
	font-family: var(--font-body);
}

.faq-item__trigger:focus-visible {
	outline: 2px solid var(--color-blue-accent);
	outline-offset: 4px;
	border-radius: 4px;
}

.faq-item__question {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--color-navy-dark);
	line-height: 1.4;
}

.faq-item__icon {
	position: relative;
	flex: none;
	width: 1.375rem;
	height: 1.375rem;
}

.faq-item__icon::before,
.faq-item__icon::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	background: var(--color-purple-primary);
	transform: translate(-50%, -50%);
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.faq-item__icon::before {
	width: 1.375rem;
	height: 2px;
}

.faq-item__icon::after {
	width: 2px;
	height: 1.375rem;
}

.faq-item__trigger[aria-expanded="true"] .faq-item__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
	opacity: 0;
}

.faq-item__trigger[aria-expanded="true"] .faq-item__icon::before {
	background: var(--color-pink-accent);
}

.faq-item__panel {
	padding: 0 0.25rem 1.5rem;
	max-width: 62ch;
}

.faq-item__panel p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--color-navy-dark);
	opacity: 0.88;
}

/* ---------- CTA ---------- */

.faq-cta {
	margin-top: 3.5rem;
	padding: 2.75rem 2rem;
	border-radius: 1.25rem;
	text-align: center;
	background: var(--color-navy-dark);
}

.faq-cta__title {
	color: #fff;
	font-size: 1.5rem;
	margin: 0 0 0.5rem;
}

.faq-cta__text {
	color: #fff;
	opacity: 0.75;
	margin: 0 0 1.5rem;
	font-size: 1rem;
}

.faq-cta__button {
	display: inline-block;
}

/* ---------- Mobile-first breakpoints ---------- */

@media (min-width: 640px) {
	.faq-page {
		padding-top: 4rem;
	}

	.faq-hero {
		margin-bottom: 3.5rem;
	}

	.faq-group__heading-row {
		gap: 1rem;
	}
}

@media (min-width: 960px) {
	.faq-page {
		padding-top: 5rem;
		padding-bottom: 7rem;
	}

	.faq-hero {
		margin-bottom: 4.5rem;
	}

	.faq-item__question {
		font-size: 1.125rem;
	}

	.faq-cta {
		padding: 3.5rem 3rem;
	}
}

/* ---------- Reduced motion ---------- */

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