/*
 * FAQ page — hero (first block).
 *
 * Reuses the Home animated stage frame from layout/header.php, but the
 * background source is a still image (faq-hero.png) instead of the looping
 * Home video. The hero card composition mirrors the Home hero (title +
 * gradient line + description) and is sized fluidly so the layout adapts
 * smoothly between breakpoints rather than snapping at fixed widths.
 *
 * Container math: site-shell = min(1348px, 100%) with 16px side padding
 * (see global.css), inner content width scales with the viewport below that cap.
 */

/* Match Home page top alignment / borderless main inside the stage. */
.page-template-page-faq .site-header,
.page-slug-faq .site-header,
.page-slug-faq-2 .site-header {
	padding: 0;
}

.page-template-page-faq .site-main,
.page-slug-faq .site-main,
.page-slug-faq-2 .site-main {
	padding: 0;
	max-width: 100%;
	background-color: transparent;
}

.page-template-page-faq .home-stage__frame,
.page-slug-faq .home-stage__frame,
.page-slug-faq-2 .home-stage__frame {
	border: 1px solid rgba(100, 100, 102, 0.5);
}

/* Still image stage — sits behind everything, fills the rounded frame. */
.faq-stage__image {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
	border-radius: inherit;
}

.faq-stage__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
	opacity: 0.86;
	border-radius: inherit;
}

.faq-stage__overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: radial-gradient(
		circle at 50% 34%,
		rgba(0, 0, 0, 0.04) 0%,
		rgba(0, 0, 0, 0.22) 70%,
		rgba(0, 0, 0, 0.32) 100%
	);
}

/*
 * Hero card on top of the stage.
 *
 * Uses fluid sizing (clamp + min) so the card, type scale, internal padding
 * and top offset all transition smoothly between mobile and desktop instead
 * of snapping at media-query breakpoints.
 */
.faq-hero {
	position: relative;
	z-index: 1;
	margin-top: clamp(72px, 17vw, 290px);
	margin-bottom: 0;
}

.faq-hero__card {
	/*
	 * Card width is driven by the title's natural single-line width on
	 * desktop. The title uses `white-space: nowrap` so its first line
	 * defines the card's intrinsic max-content. The description is
	 * intentionally opted out of intrinsic-size contribution via
	 * `max-width: 1px; min-width: 100%;` — at render time it still fills
	 * the card and wraps within it, but it never pushes the card wider
	 * than the title. On smaller screens the title is allowed to wrap, so
	 * the card collapses smoothly to the available viewport width.
	 */
	width: fit-content;
	max-width: 100%;
	height: auto;
	padding: clamp(18px, 2vw, 26px) clamp(16px, 1.6vw, 22px) clamp(16px, 1.5vw, 20px);
	border-radius: clamp(18px, 1.8vw, 24px);
	border: 1px solid rgba(189, 211, 250, 0.22);
	background: linear-gradient(180deg, rgba(20, 28, 43, 0.2) 0%, rgba(6, 10, 18, 0.14) 100%);
	backdrop-filter: blur(4px) saturate(118%);
	-webkit-backdrop-filter: blur(4px) saturate(118%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.15),
		inset 0 -1px 0 rgba(255, 255, 255, 0.05),
		0 6px 18px rgba(0, 0, 0, 0.2);
}

.faq-hero__title {
	margin: 0;
	max-width: 100%;
	white-space: nowrap;
	background-image: linear-gradient(90deg, #e6e7eb 0%, #bdd3fa 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	font-size: clamp(30px, 5vw, 56px);
	font-weight: 700;
	line-height: 1.08;
}

.faq-hero__line {
	/*
	 * Spec from design: 922px wide, 2px tall, soft horizontal gradient that
	 * fades from transparent → #bdd3fa(0.24) → transparent. Uses background
	 * instead of border-image for simpler control; visual result matches the
	 * `border-image-source` gradient from Figma.
	 */
	width: min(922px, 100%);
	height: 2px;
	margin: clamp(10px, 1.2vw, 14px) 0 clamp(10px, 1.4vw, 16px);
	background: linear-gradient(
		90deg,
		rgba(112, 125, 148, 0) 0%,
		rgba(189, 211, 250, 0.24) 50.96%,
		rgba(112, 125, 148, 0) 100%
	);
}

.faq-hero__description {
	margin: 0;
	/*
	 * Opt the description out of the card's intrinsic-size calculation:
	 * the tiny `max-width` caps its max-content contribution to 1px, so
	 * the title alone defines the card's natural width, while
	 * `min-width: 100%` makes the paragraph fill the card at render time
	 * and wrap normally inside it.
	 */
	max-width: 1px;
	min-width: 100%;
	background-image: linear-gradient(90deg, #e6e7eb 0%, #bdd3fa 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	font-size: clamp(15px, 1.05vw, 16px);
	line-height: 1.3;
}

/*
 * On smaller viewports the title is wider than the available space, so we
 * allow it to wrap. Once the title can wrap, the card collapses to the
 * available width naturally and stays readable down to mobile.
 */
@media (max-width: 1024px) {
	.faq-hero__title {
		white-space: normal;
	}

	.faq-hero__card {
		width: 100%;
	}
}

/*
 * Insights / FAQ / Connect — first-stage text panel matches Company hero inner
 * (.company-hero__container-inner): same rgba panel, border, padding, title gradient, white body copy.
 */
.page-template-page-insights .faq-hero__card,
.page-slug-insights .faq-hero__card,
.page-template-page-faq .faq-hero__card,
.page-slug-faq .faq-hero__card,
.page-slug-faq-2 .faq-hero__card,
.page-template-page-connect .faq-hero__card,
.page-slug-connect .faq-hero__card {
	/* Width follows the title (two-line Insights / Connect, single-line FAQ on desktop). */
	width: fit-content;
	max-width: 100%;
	padding: 24px;
	border-radius: 24px;
	background: rgba(9, 9, 11, 0.5);
	border: 1px solid rgba(189, 211, 250, 0.22);
	box-sizing: border-box;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

@media (max-width: 1024px) {
	.page-template-page-insights .faq-hero__card,
	.page-slug-insights .faq-hero__card,
	.page-template-page-faq .faq-hero__card,
	.page-slug-faq .faq-hero__card,
	.page-slug-faq-2 .faq-hero__card,
	.page-template-page-connect .faq-hero__card,
	.page-slug-connect .faq-hero__card {
		width: 100%;
		max-width: 100%;
		padding-inline: 8px;
	}
}

.page-template-page-insights .faq-hero__title,
.page-slug-insights .faq-hero__title,
.page-template-page-faq .faq-hero__title,
.page-slug-faq .faq-hero__title,
.page-slug-faq-2 .faq-hero__title,
.page-template-page-connect .faq-hero__title,
.page-slug-connect .faq-hero__title {
	white-space: normal;
	background: linear-gradient(96deg, #e6e7eb -6.36%, #bdd3fa 81.94%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	font-weight: 700;
	line-height: 1.1072;
}

/* Insights + Connect: two intentional lines (<br>); fluid type on wide viewports. */
.page-template-page-insights .faq-hero__title,
.page-slug-insights .faq-hero__title,
.page-template-page-connect .faq-hero__title,
.page-slug-connect .faq-hero__title {
	font-size: clamp(32px, 4.5vw, 56px);
}

/* FAQ: one line on desktop; scale down smoothly so it fits the viewport. */
.page-template-page-faq .faq-hero__title,
.page-slug-faq .faq-hero__title,
.page-slug-faq-2 .faq-hero__title {
	font-size: clamp(26px, 4vw + 0.35rem, 56px);
}

@media (min-width: 1025px) {
	.page-template-page-faq .faq-hero__title,
	.page-slug-faq .faq-hero__title,
	.page-slug-faq-2 .faq-hero__title {
		white-space: nowrap;
	}
}

@media (max-width: 1024px) {
	.page-template-page-insights .faq-hero__title,
	.page-slug-insights .faq-hero__title,
	.page-template-page-faq .faq-hero__title,
	.page-slug-faq .faq-hero__title,
	.page-slug-faq-2 .faq-hero__title,
	.page-template-page-connect .faq-hero__title,
	.page-slug-connect .faq-hero__title {
		font-size: 32px;
		letter-spacing: -0.96px;
		line-height: 1.0938;
	}
}

.page-template-page-insights .faq-hero__description,
.page-slug-insights .faq-hero__description,
.page-template-page-faq .faq-hero__description,
.page-slug-faq .faq-hero__description,
.page-slug-faq-2 .faq-hero__description,
.page-template-page-connect .faq-hero__description,
.page-slug-connect .faq-hero__description {
	/* Same intrinsic-width trick as base .faq-hero__description: title sets card width. */
	max-width: 1px;
	min-width: 100%;
	background: none;
	-webkit-background-clip: border-box;
	background-clip: border-box;
	color: #fff;
	-webkit-text-fill-color: #fff;
	font-size: 16px;
	line-height: 1.125;
	font-weight: 400;
}

@media (max-width: 1024px) {
	.page-template-page-insights .faq-hero__description,
	.page-slug-insights .faq-hero__description,
	.page-template-page-faq .faq-hero__description,
	.page-slug-faq .faq-hero__description,
	.page-slug-faq-2 .faq-hero__description,
	.page-template-page-connect .faq-hero__description,
	.page-slug-connect .faq-hero__description {
		font-size: 14px;
		line-height: 1.0715;
	}
}

.page-template-page-insights .faq-hero__line,
.page-slug-insights .faq-hero__line,
.page-template-page-faq .faq-hero__line,
.page-slug-faq .faq-hero__line,
.page-slug-faq-2 .faq-hero__line,
.page-template-page-connect .faq-hero__line,
.page-slug-connect .faq-hero__line {
	width: 100%;
	max-width: none;
	margin: 15px 0;
}
