/* =============================================================
   Elite Pearl Charter — FAQ accordion
   ============================================================= */

.epc-faq {
	background: var(--epc-black);
	color: var(--epc-silver);
	border-top: 1px solid var(--epc-line-soft);
}

.epc-faq__inner {
	width: 100%;
	max-width: var(--epc-container);
	margin-inline: auto;
	padding: 4rem var(--epc-gutter);
}

@media (min-width: 768px) {
	.epc-faq__inner {
		padding-block: 5.5rem;
	}
}

@media (min-width: 1200px) {
	.epc-faq__inner {
		padding-block: 7rem;
	}
}

/* --- Intro --------------------------------------------------------- */

.epc-faq__intro {
	max-width: 56rem;
	margin: 0 auto 2.5rem;
	text-align: center;
}

@media (min-width: 768px) {
	.epc-faq__intro {
		margin-bottom: 3.5rem;
	}
}

.epc-faq__eyebrow {
	margin: 0 0 0.75rem;
	font-family: var(--epc-font-sans);
	font-size: clamp(0.6875rem, 1.6vw, 0.8125rem);
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--epc-silver);
}

.epc-faq__heading {
	margin: 0;
	font-family: var(--epc-font-serif);
	font-size: clamp(1.625rem, 4.6vw, 2.75rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	text-wrap: balance;
}

.epc-faq__rule {
	display: block;
	width: 72px;
	height: 1px;
	margin: 1.25rem auto 1.5rem;
	background: linear-gradient(
		to right,
		transparent 0%,
		rgb(255 255 255 / 70%) 50%,
		transparent 100%
	);
}

.epc-faq__text {
	max-width: 62ch;
	margin: 0 auto;
	font-family: var(--epc-font-sans);
	font-size: clamp(0.875rem, 2vw, 1rem);
	line-height: 1.9;
	color: var(--epc-grey);
	text-wrap: pretty;
}

/* --- List ----------------------------------------------------------- */

.epc-faq__list {
	display: grid;
	gap: 0.75rem;
	max-width: 60rem;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.epc-faq__item {
	overflow: hidden;
	background: var(--epc-ink-950);
	border: 1px solid var(--epc-line-soft);
	border-radius: 12px;
	transition: border-color 520ms var(--epc-ease-soft),
		background-color 520ms var(--epc-ease-soft);
}

.epc-faq__item:hover,
.epc-faq__item:focus-within {
	border-color: rgb(255 255 255 / 32%);
}

/*
 * --epc-gradient-panel, not --epc-gradient-surface. The surface gradient ends on
 * #8d8f8e, which is a sheen across a 376px card but lands its silver end inside
 * anything much wider: an open item on the home page is 960px, and the right
 * third of it was washing out to near white, taking the minus sign and the
 * answer text with it. The panel gradient is the same family and direction and
 * stays dark the whole way across.
 */
.epc-faq__item.is-open {
	background: var(--epc-gradient-panel);
	border-color: rgb(255 255 255 / 45%);
}

/* --- Question ------------------------------------------------------- */

.epc-faq__q {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
}

.epc-faq__trigger {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	width: 100%;
	padding: 1.1rem 1.15rem;
	font-family: var(--epc-font-sans);
	font-size: clamp(0.875rem, 2vw, 1rem);
	font-weight: 600;
	line-height: 1.5;
	text-align: left;
	color: var(--epc-nav-idle);
	background: none;
	border: 0;
	cursor: pointer;
	transition: color 520ms var(--epc-ease-soft);
}

@media (min-width: 768px) {
	.epc-faq__trigger {
		padding: 1.25rem 1.5rem;
	}
}

.epc-faq__trigger:hover,
.epc-faq__item.is-open .epc-faq__trigger {
	color: var(--epc-white);
}

.epc-faq__trigger:focus-visible {
	outline: 2px solid var(--epc-white);
	outline-offset: -3px;
	border-radius: 12px;
}

/* Brand diamond, rotating as the answer opens. */
.epc-faq__marker {
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	background: var(--epc-gradient-title);
	transform: rotate(45deg);
	transition: transform 520ms var(--epc-ease-soft);
}

.epc-faq__item.is-open .epc-faq__marker {
	transform: rotate(135deg);
}

.epc-faq__label {
	flex: 1;
}

/* Plus that becomes a minus, drawn from two bars. */
.epc-faq__sign {
	position: relative;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.epc-faq__sign::before,
.epc-faq__sign::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	border-radius: 2px;
	transform: translateY(-50%);
	transition: transform 520ms var(--epc-ease-soft),
		opacity 320ms var(--epc-ease-soft);
}

.epc-faq__sign::after {
	transform: translateY(-50%) rotate(90deg);
}

.epc-faq__item.is-open .epc-faq__sign::after {
	transform: translateY(-50%) rotate(0deg);
	opacity: 0;
}

/* --- Answer ---------------------------------------------------------- */

/*
 * Collapsed with grid-template-rows rather than display:none, so the answer
 * text stays in the DOM and in the page's find-on-page and crawlable content
 * even while closed, and the open and close actually animate.
 */
.epc-faq__a {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 520ms var(--epc-ease-soft);
}

.epc-faq__item.is-open .epc-faq__a {
	grid-template-rows: 1fr;
}

.epc-faq__a-inner {
	min-height: 0;
	overflow: hidden;
}

.epc-faq__a-inner p {
	margin: 0;
	padding: 0 1.15rem 1.25rem 2.9rem;
	font-family: var(--epc-font-sans);
	font-size: clamp(0.8125rem, 1.9vw, 0.9375rem);
	line-height: 1.85;
	color: var(--epc-grey);
	text-wrap: pretty;
}

@media (min-width: 768px) {
	.epc-faq__a-inner p {
		padding: 0 1.5rem 1.4rem 3.3rem;
	}
}

/* --- Footer link ------------------------------------------------------ */

.epc-faq__more {
	display: flex;
	justify-content: center;
	margin-top: 2rem;
}

@media (max-width: 479.98px) {
	.epc-faq__more .epc-btn {
		width: 100%;
	}
}

/* --- Reduced motion ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.epc-faq__item,
	.epc-faq__trigger,
	.epc-faq__marker,
	.epc-faq__sign::before,
	.epc-faq__sign::after,
	.epc-faq__a {
		transition-duration: 0.01ms !important;
	}
}

/*
 * Two-column variant, used on the contact page. A real grid, not CSS columns:
 * an accordion in a multi-column flow would reflow every item below it each
 * time one opened, making the page jump under the reader.
 */
@media (min-width: 900px) {
	.epc-faq__list--cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
		gap: 0.75rem 1.25rem;
		max-width: none;
	}
}
