/*--------------------------------------------------------------
# FAQ Wayfinding Signs
# The question groups as a full-width black strip of airport signs
# under the hero: an orange pictogram, the topic, a gate number and an
# arrow, each jumping to its group in the list. Four across on
# desktop, two by two on tablets, a stacked list on phones.
--------------------------------------------------------------*/

/* Offsets the jump targets depend on (see "Jump targets" below). Declared
   on the page wrapper so every target on the page can use them.

   --faq-header-h is the site header's real height: .header-container is
   72px and .site-header adds no padding above 480px. */
.site-main--faq {
	--faq-header-h: 72px;
	--faq-jump-gap: 20px;
}

/* ── Section ──
   Bottom padding only, like every section after the hero (page-faq.php):
   .faq-hero above supplies the gap over it. Smaller than the page's 100px
   rhythm, because the signs index the list straight beneath them. */
.faq-signs {
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

	padding: 0 0 56px;
}

/* As wide as the closing CTA box, so the two bookend the page */
.faq-signs__container {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}


/* ──────────────────────────────────────────────
   The board
   ────────────────────────────────────────────── */

/* A black strip the full width of the page. The signs themselves stay
   inside the container, in line with the content below. */
.faq-signs__strip {
	background: var(--tpp-black);
}

.faq-signs__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Hairlines between signs, drawn on the items so each link's hover fill
   still runs edge to edge */
.faq-signs__item {
	display: flex;
}

.faq-signs__item + .faq-signs__item {
	border-left: 1px solid rgba(255, 255, 255, 0.12);
}


/* ──────────────────────────────────────────────
   A sign
   ────────────────────────────────────────────── */

/* The colour is restated for :visited, :hover, :focus and :active because
   style.css sets those link states to color: inherit, which would turn the
   label dark on the black board. */
.faq-signs__sign,
.faq-signs__sign:visited,
.faq-signs__sign:hover,
.faq-signs__sign:focus,
.faq-signs__sign:active {
	color: var(--tpp-white);
}

.faq-signs__sign {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding: 22px;
	text-decoration: none;
	transition: background-color 0.25s ease;
}

.faq-signs__sign:hover {
	background: #262626;
}

.faq-signs__sign:focus-visible {
	outline: 2px solid var(--tpp-accent);
	outline-offset: -4px;
	background: #262626;
}

/* Orange pictogram, the group's own icon */
.faq-signs__pict {
	display: grid;
	flex: none;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	background: var(--tpp-accent);
	color: var(--tpp-black);
}

.faq-signs__pict svg {
	display: block;
	width: 24px;
	height: 24px;
}

.faq-signs__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.faq-signs__label {
	font-family: var(--tpp-font-heading);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.faq-signs__gate {
	font-family: var(--mono);
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
}

/* Nudges forward on hover, pointing the way */
.faq-signs__arrow {
	flex: none;
	margin-left: auto;
	color: var(--tpp-accent);
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-signs__sign:hover .faq-signs__arrow,
.faq-signs__sign:focus-visible .faq-signs__arrow {
	transform: translateX(4px);
}


/* ──────────────────────────────────────────────
   Line under the board
   ────────────────────────────────────────────── */

.faq-signs__sub {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: 12px;
	font-family: var(--mono);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--tpp-text-light);
}

/* Down to the "Still have a question?" box. Its states are restated for
   the same reason as the signs'. */
.faq-signs__desk,
.faq-signs__desk:visited,
.faq-signs__desk:focus,
.faq-signs__desk:active {
	color: var(--tpp-blue);
}

.faq-signs__desk {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	transition: color 0.25s ease;
}

.faq-signs__desk:hover,
.faq-signs__desk:focus-visible {
	color: var(--tpp-blue-dark);
}

.faq-signs__desk:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: 3px;
	border-radius: var(--tpp-radius-sm);
}


/* ──────────────────────────────────────────────
   Jump targets
   The site header is sticky, so a group (or the closing CTA) jumped to
   has to clear it or it lands underneath. CSS rather than a script
   offset, so it applies to the plain anchor jump as well.
   ────────────────────────────────────────────── */

.faq-list__group,
.faq-cta {
	scroll-margin-top: calc(var(--faq-header-h) + var(--faq-jump-gap));
}


/* ──────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────── */

/* Tablet (≤991px) — two by two */
@media screen and (max-width: 991px) {
	.faq-signs {
		padding-bottom: 44px;
	}

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

	/* Each row starts with an odd sign, so those lose the left hairline,
	   and the second row gets one along its top */
	.faq-signs__item:nth-child(odd) {
		border-left: 0;
	}

	.faq-signs__item:nth-child(n+3) {
		border-top: 1px solid rgba(255, 255, 255, 0.12);
	}
}

/* Mobile (≤767px) — a stacked list */
@media screen and (max-width: 767px) {
	.site-main--faq {
		--faq-jump-gap: 16px;
	}

	.faq-signs {
		padding-bottom: 32px;
	}

	.faq-signs__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.faq-signs__item + .faq-signs__item {
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		border-left: 0;
	}

	.faq-signs__sign {
		padding: 16px 18px;
	}

	.faq-signs__pict {
		width: 40px;
		height: 40px;
	}

	.faq-signs__pict svg {
		width: 22px;
		height: 22px;
	}
}

/* Small mobile (≤480px) */
@media screen and (max-width: 480px) {
	/* The header is TALLER here, not shorter: .header-container drops to
	   60px but .site-header gains 10px of padding top and bottom. */
	.site-main--faq {
		--faq-header-h: 80px;
		--faq-jump-gap: 12px;
	}

	.faq-signs {
		padding-bottom: 26px;
	}
}


/* ──────────────────────────────────────────────
   Reduced motion
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.faq-signs__sign,
	.faq-signs__arrow,
	.faq-signs__desk {
		transition: none;
	}
}

/* Tap targets at least 44px tall on phones (Owen's request). */
@media screen and (max-width: 767px) {
	.faq-signs__desk {
		min-height: 44px;
		margin: -14px 0;
	}
}
