/**
 * Page sections, in the order the builder lists them.
 */

/* -------------------------------------------------------------------- hero */

.px-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: min(88vh, 860px);
	padding-block: clamp(64px, 8vw, 112px) clamp(112px, 13vw, 192px);
	background: var(--px-char);
	color: var(--px-fg);
	isolation: isolate;
	overflow: hidden;
}

.px-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(100deg, rgba(22, 19, 15, .9) 0%, rgba(22, 19, 15, .7) 42%, rgba(22, 19, 15, .32) 80%, rgba(22, 19, 15, .2)),
		linear-gradient(0deg, rgba(22, 19, 15, .4), transparent 40%);
}

/* On a phone the words run the full width, so the shade is even across it. */
@media (max-width: 760px) {
	.px-hero::before {
		background: linear-gradient(180deg, rgba(22, 19, 15, .72) 0%, rgba(22, 19, 15, .6) 55%, rgba(22, 19, 15, .8));
	}
}

.px-hero__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.px-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.75fr) minmax(250px, .8fr);
	align-items: center;
	gap: clamp(32px, 5vw, 80px);
}

.px-hero__title {
	max-width: 17ch;
	margin-bottom: 0;
	color: #fff;
	text-wrap: pretty;
}

.px-hero__body {
	max-width: 58ch;
	margin-top: var(--px-space-5);
	color: var(--px-fg-muted);
	font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}

.px-hero__highlights {
	display: grid;
	grid-auto-rows: 1fr;
	gap: var(--px-space-3);
}

.px-hero__highlight {
	display: grid;
	gap: 2px;
	padding: var(--px-space-4) var(--px-space-5);
	border: 1px solid rgba(255, 255, 255, .15);
	border-radius: var(--px-radius);
	background: rgba(31, 26, 21, .72);
}

.px-hero__figure {
	background: var(--px-flame-soft);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-family: var(--px-font-display);
	font-size: clamp(1.9rem, 3vw, 2.6rem);
	font-weight: 800;
	line-height: 1.15;
}

.px-hero__label {
	color: var(--px-fg);
	font-size: .95rem;
}

@media (max-width: 900px) {
	.px-hero {
		min-height: 0;
	}

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

	.px-hero__highlights {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

}

@media (max-width: 560px) {
	.px-hero__highlights {
		gap: var(--px-space-2);
	}

	.px-hero__highlight {
		padding: var(--px-space-3);
	}

	.px-hero__figure {
		font-size: 1.6rem;
	}

	.px-hero__label {
		font-size: .85rem;
		line-height: 1.3;
	}
}

/* -------------------------------------------------------------- media + text */

.px-media-text {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(32px, 6vw, 88px);
}

.px-media-text--flip .px-media-text__media {
	order: 2;
}

/* A vacancy's facts sit at the top and stay in view beside a long description. */
.px-job__apply {
	width: 100%;
	margin-top: var(--px-space-5);
}

.px-job .px-media-text {
	align-items: start;
}

@media (min-width: 900px) {
	.px-job .px-media-text__media {
		position: sticky;
		top: 120px;
	}
}

.px-media-text__media {
	position: relative;
}

.px-media-text__img {
	position: relative;
	z-index: 1;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: var(--px-feather);
	object-fit: cover;
}

/* A sliver of flame showing behind the picture's lower corner. */
.px-media-text__media:has(.px-media-text__img)::after {
	content: "";
	position: absolute;
	right: -12px;
	bottom: -12px;
	width: 58%;
	height: 58%;
	border-radius: 20px 20px 48px 20px;
	background: var(--px-flame);
}

.px-media-text__content .px-heading {
	max-width: none;
}

@media (max-width: 860px) {
	.px-media-text {
		grid-template-columns: minmax(0, 1fr);
	}

	.px-media-text--flip .px-media-text__media {
		order: 0;
	}

	.px-media-text__media:has(.px-media-text__img)::after {
		right: -8px;
		bottom: -8px;
	}
}

/* ------------------------------------------------------------------- stats */

.px-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-top: clamp(32px, 4vw, 56px);
}

.px-stat {
	display: grid;
	gap: var(--px-space-1);
	padding-inline: clamp(16px, 2.5vw, 36px);
	border-inline-start: 1px solid var(--px-line);
}

.px-stat__value {
	background: var(--px-flame-soft);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-family: var(--px-font-display);
	font-size: clamp(2.6rem, 5.4vw, 4.4rem);
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.px-section:not(.px-section--dark):not(.px-section--photo) .px-stat__value {
	background: linear-gradient(100deg, #e07a00, var(--px-ember));
	-webkit-background-clip: text;
	background-clip: text;
}

.px-stat__label {
	color: var(--px-fg);
	font-weight: 500;
}

@media (max-width: 860px) {
	.px-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: var(--px-space-6);
	}

	.px-stat {
		padding-inline-end: 8px;
	}
}

/* ----------------------------------------------------------------- gallery */

.px-gallery__item {
	position: relative;
	display: block;
	border-radius: var(--px-radius);
	background: var(--px-paper);
	overflow: hidden;
}

.px-gallery__item img {
	width: 100%;
}

.px-gallery--masonry {
	display: flex;
	align-items: flex-start;
	gap: var(--px-space-4);
}

.px-gallery__col {
	display: grid;
	flex: 1 1 0;
	min-width: 0;
	gap: var(--px-space-4);
}

/* One or two photos should not stretch across the whole page. */
.px-gallery--cols-1 { max-width: 720px; }
.px-gallery--cols-2 { max-width: 1000px; }

.px-gallery--mosaic {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: clamp(160px, 21vw, 280px);
	gap: var(--px-space-4);
}

.px-gallery--mosaic .px-gallery__item:nth-child(1),
.px-gallery--mosaic .px-gallery__item:nth-child(4),
.px-gallery--mosaic .px-gallery__item:nth-child(6) {
	grid-column: span 2;
}

.px-gallery--mosaic img {
	height: 100%;
	object-fit: cover;
}

@media (max-width: 620px) {
	.px-gallery--mosaic {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: 42vw;
		gap: var(--px-space-3);
	}

	.px-gallery--mosaic .px-gallery__item:nth-child(n) {
		grid-column: auto;
	}

	.px-gallery--mosaic .px-gallery__item:nth-child(3n + 1) {
		grid-column: 1 / -1;
	}

	.px-gallery--masonry {
		display: block;
		columns: 2;
		column-gap: var(--px-space-3);
	}

	.px-gallery__col {
		display: contents;
	}

	.px-gallery--masonry .px-gallery__item {
		margin-bottom: var(--px-space-3);
		break-inside: avoid;
	}
}

/* Lightbox, created by main.js */
.px-lightbox {
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(14, 11, 8, .95);
	color: #fff;
}

.px-lightbox::backdrop {
	background: rgba(14, 11, 8, .95);
}

.px-lightbox__stage {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	padding: 64px 16px;
}

.px-lightbox__img {
	width: auto;
	max-width: 100%;
	max-height: calc(100dvh - 128px);
	border-radius: var(--px-radius-sm);
	object-fit: contain;
}

.px-lightbox__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 50%;
	background: rgba(22, 19, 15, .8);
	color: #fff;
	font-size: 1.1rem;
	cursor: pointer;
}

.px-lightbox__btn:hover {
	border-color: var(--px-amber);
	color: var(--px-amber);
}

.px-lightbox__close { top: 12px; right: 12px; }
.px-lightbox__prev { top: 50%; left: 12px; transform: translateY(-50%); }
.px-lightbox__next { top: 50%; right: 12px; transform: translateY(-50%); }

.px-lightbox__count {
	position: absolute;
	top: 24px;
	left: 20px;
	font-size: .9rem;
}

@media (max-width: 620px) {
	.px-lightbox__prev,
	.px-lightbox__next {
		top: auto;
		bottom: 8px;
		transform: none;
	}

	.px-lightbox__prev { left: calc(50% - 56px); }
	.px-lightbox__next { right: calc(50% - 56px); }
}

/* -------------------------------------------------------------- logo strip */

.px-section--logos .px-heading + * {
	margin-top: 0;
}

.px-logos {
	margin-top: clamp(24px, 3vw, 40px);
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.px-logos__track {
	display: flex;
	width: max-content;
	animation: px-marquee 42s linear infinite;
}

.px-logos:hover .px-logos__track {
	animation-play-state: paused;
}

.px-logos__run {
	display: flex;
	align-items: center;
}

.px-logos__item {
	width: clamp(140px, 15vw, 200px);
	padding-inline: clamp(12px, 1.6vw, 24px);
}

.px-logos__item img {
	width: 100%;
	height: 96px;
	object-fit: contain;
}

@keyframes px-marquee {
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.px-logos {
		mask-image: none;
	}

	.px-logos__track {
		width: auto;
		animation: none;
	}

	.px-logos__run {
		flex-wrap: wrap;
		justify-content: center;
		width: 100%;
	}

	.px-logos__run[aria-hidden="true"] {
		display: none;
	}
}

/* ---------------------------------------------------- two feature panels */

.px-panels {
	display: grid;
	grid-auto-rows: 1fr;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--px-space-5);
}

.px-panel {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 520px;
	border-radius: var(--px-feather);
	background: var(--px-char);
	color: var(--px-fg);
	isolation: isolate;
	overflow: hidden;
}

.px-panel__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.px-panel::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(22, 19, 15, .28) 0%, rgba(22, 19, 15, .9) 52%, rgba(22, 19, 15, .97));
}

.px-panel__copy {
	padding: clamp(24px, 3vw, 40px);
}

.px-panel__title {
	margin-bottom: var(--px-space-3);
	font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.px-panel__body {
	color: #e4dccf;
}

@media (max-width: 860px) {
	.px-panels {
		grid-template-columns: minmax(0, 1fr);
	}

	.px-panel {
		min-height: 420px;
	}
}

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

.px-band {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--px-space-6);
	padding: clamp(32px, 5vw, 72px);
	border-radius: 24px 120px 24px 24px;
	background: var(--px-flame-soft);
	color: var(--px-char);
	overflow: hidden;
}

/* The logo's swoosh, drawn large and faint across the panel. */
.px-band::before {
	content: "";
	position: absolute;
	right: -10%;
	bottom: -70%;
	width: 62%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(215, 38, 30, .38), transparent);
	pointer-events: none;
}

.px-band > * {
	position: relative;
}

.px-band__eyebrow {
	display: block;
	margin-bottom: var(--px-space-2);
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.px-band__title {
	max-width: 22ch;
	margin-bottom: 0;
	color: var(--px-char);
}

.px-band__body {
	max-width: 60ch;
	margin-top: var(--px-space-3);
	font-size: 1.1rem;
}

.px-band__actions {
	margin-top: 0;
}

/* Gold would vanish on the orange band, so its main buttons turn charcoal. */
.px-band .px-btn--primary,
.px-band .px-btn--secondary {
	--b-bg: linear-gradient(120deg, #3a3129 0%, #2c251e 45%, #16130f 100%);
	--b-fg: #fff;
	--b-arrow: var(--px-amber);
	--b-shadow: 0 12px 26px -16px rgba(22, 19, 15, .9);
	--b-shadow-hover: 0 18px 36px -18px rgba(22, 19, 15, .85);
}

.px-band .px-btn--outline,
.px-band .px-btn--ghost {
	--b-bg: transparent;
	--b-fg: var(--px-char);
	--b-line: var(--px-char);
	--b-arrow: var(--px-char);
	--b-shadow: none;
}

.px-band .px-btn--outline:hover,
.px-band .px-btn--ghost:hover {
	--b-bg: rgba(255, 255, 255, .22);
	--b-line: var(--px-char);
}

.px-band :focus-visible {
	outline-color: var(--px-char);
}

.px-band__points {
	display: grid;
	grid-column: 1 / -1;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--px-space-5);
	padding-top: var(--px-space-5);
	border-top: 1px solid rgba(22, 19, 15, .25);
}

.px-band__point {
	display: flex;
	gap: var(--px-space-3);
}

.px-band__point-title {
	margin: 0 0 4px;
	color: var(--px-char);
	font-size: 1.05rem;
}

.px-band__point-body {
	margin: 0;
	font-size: .975rem;
}

@media (max-width: 760px) {
	.px-band {
		grid-template-columns: minmax(0, 1fr);
		border-radius: 20px 64px 20px 20px;
	}

	.px-band .px-btn {
		width: 100%;
	}
}

/* ----------------------------------------------------------------- contact */

.px-contact {
	display: grid;
	grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
	align-items: start;
	gap: clamp(32px, 6vw, 80px);
}

/* Every form sits on the same card: warm white, a flame strip along the top. */
.px-contact__form,
.px-form-card {
	position: relative;
	padding: clamp(22px, 3.4vw, 44px);
	padding-top: clamp(28px, 3.8vw, 48px);
	border: 1px solid #efe2cf;
	border-radius: var(--px-feather);
	background: linear-gradient(180deg, #fff 0%, #fffaf3 100%);
	box-shadow: 0 32px 64px -38px rgba(44, 30, 12, .38), 0 2px 8px rgba(44, 30, 12, .04);
	overflow: hidden;
	scroll-margin-top: calc(var(--px-header) + 16px);
}

.px-contact__form::before,
.px-form-card::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 5px;
	background: var(--px-flame-soft);
}

.px-form-card {
	margin-top: var(--px-space-6);
}

/* The details beside a form: each way to reach us is its own small card. */
.px-contact .px-channel {
	align-items: center;
	padding: 14px 16px;
	border: 1px solid #efe2cf;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 10px 24px -20px rgba(44, 30, 12, .4);
	transition: border-color .35s ease, box-shadow .45s ease, transform .45s var(--px-ease);
}

.px-section--paper .px-contact .px-channel {
	background: #fffdf9;
}

@media (hover: hover) {
	.px-contact .px-channel:hover {
		border-color: #f3c98e;
		box-shadow: 0 16px 30px -20px rgba(214, 115, 0, .55);
		transform: translateY(-2px);
	}
}

.px-section--dark .px-contact__form {
	--px-fg: #1f1a15;
	--px-fg-muted: #5f564b;
	color: var(--px-fg);
}

@media (max-width: 900px) {
	.px-contact {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* --------------------------------------------------------------------- map */

.px-map {
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
	border-radius: var(--px-feather);
	background: var(--px-char);
	overflow: hidden;
}

.px-map__frame {
	min-height: 440px;
}

.px-map__embed {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 440px;
	border: 0;
}

.px-map__card {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--px-space-3);
	padding: clamp(24px, 3vw, 40px);
	background: var(--px-char);
	color: var(--px-fg);
}

.px-map__heading {
	margin: 0;
	font-size: 1.5rem;
}

.px-map__address {
	color: var(--px-fg-muted);
}

.px-map__facts {
	display: grid;
	gap: var(--px-space-2);
}

.px-map__facts li {
	display: flex;
	align-items: center;
	gap: 10px;
}

.px-map__facts .px-icon {
	color: var(--px-amber);
}

.px-map__facts a {
	color: var(--px-fg);
}

.px-map__actions {
	margin-top: var(--px-space-3);
}

@media (max-width: 860px) {
	.px-map {
		grid-template-columns: minmax(0, 1fr);
	}

	.px-map__frame,
	.px-map__embed {
		min-height: 320px;
	}
}

/* -------------------------------------------------------- tabs + accordion */

.px-tabs__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--px-space-2);
	margin-bottom: var(--px-space-6);
}

.px-tabs__tab {
	min-height: 46px;
	padding: 10px 20px;
	border: 1.5px solid var(--px-line);
	border-radius: var(--px-radius-sm);
	background: transparent;
	color: var(--px-fg);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.px-tabs__tab[aria-selected="true"] {
	border-color: transparent;
	background: var(--px-flame-soft);
	color: var(--px-char);
}

.px-accordion {
	display: grid;
	gap: var(--px-space-3);
}

.px-accordion__item {
	border: 1px solid var(--px-line);
	border-radius: var(--px-radius-sm);
	background: var(--px-surface);
}

.px-accordion__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--px-space-4);
	width: 100%;
	min-height: 56px;
	padding: 14px 20px;
	border: 0;
	background: none;
	color: var(--px-fg);
	font-family: var(--px-font-display);
	font-size: 1.05rem;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.px-accordion__icon {
	position: relative;
	flex: none;
	width: 16px;
	height: 16px;
}

.px-accordion__icon::before,
.px-accordion__icon::after {
	content: "";
	position: absolute;
	top: 7px;
	left: 0;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: var(--px-accent);
	transition: transform .25s;
}

.px-accordion__icon::after {
	transform: rotate(90deg);
}

[aria-expanded="true"] > .px-accordion__icon::after {
	transform: rotate(0);
}

.px-accordion__panel {
	padding: 0 20px 20px;
	color: var(--px-fg-muted);
}

/* ------------------------------------------------------ team + testimonials */

.px-team {
	display: grid;
	gap: var(--px-space-5);
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.px-person {
	position: relative;
}

.px-person__portrait {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	border-radius: var(--px-radius);
	background: var(--px-char-3);
	overflow: hidden;
}

.px-person__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.px-person__initials {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--px-amber);
	font-family: var(--px-font-display);
	font-size: 3rem;
	font-weight: 700;
}

.px-person__name {
	margin: var(--px-space-3) 0 0;
}

.px-person__role {
	margin: 0;
	color: var(--px-fg-muted);
}

.px-person__bio,
.px-person__quals {
	margin-top: var(--px-space-2);
	color: var(--px-fg-muted);
	font-size: .95rem;
}

.px-quotes {
	display: grid;
	grid-auto-rows: 1fr;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: var(--px-space-5);
}

/* Four quotes sit two by two rather than three and one. */
.px-quotes:has(> :nth-child(4):last-child) {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

/* Five sit three and two, the two centred under the three; on a tablet two,
   two and one, the one centred. */
@media (min-width: 681px) {
	.px-quotes:has(> :nth-child(5):last-child) {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.px-quotes:has(> :nth-child(5):last-child) > * {
		grid-column: span 2;
	}
}

@media (min-width: 1025px) {
	.px-quotes:has(> :nth-child(5):last-child) > :nth-child(4) {
		grid-column: 2 / span 2;
	}

	.px-quotes:has(> :nth-child(5):last-child) > :nth-child(5) {
		grid-column: 4 / span 2;
	}
}

@media (min-width: 681px) and (max-width: 1024px) {
	.px-quotes:has(> :nth-child(5):last-child) {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.px-quotes:has(> :nth-child(5):last-child) > :nth-child(5) {
		grid-column: 2 / span 2;
	}
}

.px-quote {
	/* The card design comes from .px-card in cards.css. */
	min-height: 0;
	margin: 0;
}

.px-quote__mark .px-icon {
	width: 26px;
	height: 26px;
}

.px-quote__text {
	margin: 0 0 var(--px-space-5);
	font-size: 1.075rem;
	line-height: 1.7;
}

/* The byline sits at the foot, so cards in a row line up. */
.px-quote__by {
	display: flex;
	align-items: center;
	gap: var(--px-space-3);
	margin-top: auto;
	padding-top: var(--px-space-4);
	border-top: 1.5px solid var(--t-line);
}

.px-quote__avatar {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--t-line);
}

.px-quote__avatar--initials {
	display: grid;
	place-items: center;
	background: var(--t-solid);
	color: var(--t-on);
	font-weight: 700;
	letter-spacing: .04em;
}

.px-quote__name {
	display: block;
	font-weight: 700;
}

.px-quote__role {
	display: block;
	color: var(--px-fg-muted);
	font-size: .9rem;
}
