/**
 * AudiencePlayer inner-page foundation (issue #64, spec #63).
 *
 * The look of the shared inner-page pieces, defined once and referenced by every
 * inner-page block:
 *   - .ap-inner                  the opt-in scope that carries the --ap-inner-*
 *                                tokens (declared in theme.json). A block adds
 *                                this class to its wrapper to pick them up; the
 *                                homepage never does, so its tokens are untouched.
 *   - .ap-inner-section          the section shell: the 144px inner section
 *                                padding and the 1px top border every section
 *                                but the first carries.
 *   - .ap-section-header         the shared eyebrow + H2 header.
 *
 * Values are ported from the handoff (docs/tmp-reference/page-blocks) as written.
 * Each inner token differs from a homepage token on purpose — see ADR-0016.
 */

/* -- Inner section shell -------------------------------------------------- */

/* The handoff's inner sections are 144px tall top and bottom (vs the homepage's
   160px) and alternate the page background with the tonal Band. */
.ap-inner-section {
	padding-top: var(--ap-inner-section-padding, 144px);
	padding-bottom: var(--ap-inner-section-padding, 144px);
}

/* Every section but the first carries a hairline top border, so stacked
   same-background sections stay visually separated. The adjacent-sibling
   selector makes "every section except the first" automatic. */
.ap-inner-section + .ap-inner-section {
	border-top: 1px solid rgba(20, 18, 24, 0.06);
}

/* -- Section header ------------------------------------------------------- */

.ap-section-header {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ap-section-header--center {
	align-items: center;
	text-align: center;
}

/* Header alignment (the Editor's choice on the section blocks). The wrapper class
   wins over the helper's own --center modifier, so the three values are explicit. */
.ap-header-align--left .ap-section-header {
	align-items: flex-start;
	text-align: left;
}

.ap-header-align--center .ap-section-header {
	align-items: center;
	text-align: center;
}

.ap-header-align--right .ap-section-header {
	align-items: flex-end;
	text-align: right;
}

/* The capped header boxes (720px) sit left by default; centre / right push them. */
.ap-header-align--center :is(.ap-stats__header, .ap-usps__header),
.ap-header-align--center .ap-section-header {
	margin-left: auto;
	margin-right: auto;
}

.ap-header-align--right :is(.ap-stats__header, .ap-usps__header),
.ap-header-align--right .ap-section-header {
	margin-left: auto;
	margin-right: 0;
}

.ap-header-align--left :is(.ap-stats__header, .ap-usps__header),
.ap-header-align--left .ap-section-header {
	margin-left: 0;
	margin-right: auto;
}

/* Eyebrow: 12px / 500 / .16em uppercase in the chosen accent (--ap-accent is set
   by the ap-accent--* class from the shared controls). */
.ap-section-header__eyebrow {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ap-accent, var(--ap-red-text));
}

/* Heading: the handoff's inner H2 — 40px / 1.05 / 400 / -0.04em, balanced. */
.ap-section-header__heading {
	margin: 0;
	font-size: 40px;
	line-height: 1.05;
	font-weight: 600;
	letter-spacing: -0.04em;
	text-wrap: balance;
	color: var(--ap-ink);
}

@media (max-width: 1024px) {
	.ap-section-header__heading {
		font-size: 36px;
	}
}

@media (max-width: 640px) {
	.ap-section-header__heading {
		font-size: 30px;
	}
}

/* -- Breadcrumb ----------------------------------------------------------- */

/* The server-built, language-aware breadcrumb both inner heroes open with
   (inc/breadcrumb.php). The markup is shared; the skin is the variant class —
   `pill` (the text hero: a glass capsule with a dark current-page pill) and `bar`
   (the banner hero: light text over the photo). */

.ap-breadcrumb {
	display: block;
}

.ap-breadcrumb__list {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ap-breadcrumb__crumb,
.ap-breadcrumb__sep {
	display: inline-flex;
	align-items: center;
}

.ap-breadcrumb__chevron {
	display: block;
	width: 12px;
	height: 12px;
}

.ap-breadcrumb__link {
	color: inherit;
	text-decoration: none;
}

.ap-breadcrumb__link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ap-breadcrumb__text {
	color: inherit;
}

/* Pill variant (text hero): the glass capsule with the 14px muted trail, 12px
   chevrons and the dark nested current-page pill. */
.ap-breadcrumb--pill .ap-breadcrumb__list {
	padding: 7px 8px 7px 16px;
	border-radius: 999px;
	font-size: 14px;
	color: rgba(20, 18, 24, 0.75);
	background: rgba(255, 255, 255, 0.65);
	border: 1px solid rgba(20, 18, 24, 0.13);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ap-breadcrumb--pill .ap-breadcrumb__sep {
	color: rgba(20, 18, 24, 0.4);
}

.ap-breadcrumb--pill .ap-breadcrumb__current {
	padding: 3px 10px;
	border-radius: 999px;
	background: #141218;
	color: #fff;
	font-size: 13px;
}

/* Bar variant (banner hero): the light inline trail over the photo, the current
   page in white — no capsule. */
.ap-breadcrumb--bar .ap-breadcrumb__list {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.7);
}

.ap-breadcrumb--bar .ap-breadcrumb__sep {
	color: rgba(255, 255, 255, 0.5);
}

.ap-breadcrumb--bar .ap-breadcrumb__current {
	color: #fff;
}
