/**
 * Reusable pieces: buttons, headings, cards, forms, lists.
 */

/* ----------------------------------------------------------------- buttons */

/*
 * One button, several looks. A variant only sets the --b-* colours, so shape,
 * sizes, focus and disabled states are the same for every button.
 *
 *   primary    gold gradient, dark text     the main action: Get a Quote, Apply now
 *   orange     deep flame gradient, white   careers: View open positions
 *   secondary  charcoal, white (or --dark)  contact, and buttons on the orange band
 *   outline    white with a gold border     Learn more, About us, View more
 *   ghost      see-through, soft border     on dark backgrounds
 *   text       words and an arrow, no box   quiet links
 *   icon       one icon in a compact square (add --round for a circle)
 *
 * Sizes: --sm, the default, and --lg. Hover movement lives in effects.css.
 */
.px-btn {
	--b-bg: transparent;
	--b-fg: var(--px-fg);
	--b-line: transparent;
	--b-shadow: none;
	--b-shadow-hover: var(--b-shadow);
	--b-arrow: currentColor;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 12px 24px;
	border: 2px solid var(--b-line);
	border-radius: 14px;
	background: var(--b-bg);
	background-size: 160% 100%;
	background-position: 0 0;
	box-shadow: var(--b-shadow);
	color: var(--b-fg);
	font-family: var(--px-font-display);
	font-size: .975rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	isolation: isolate;
	transition: transform .45s var(--px-ease), box-shadow .45s ease, border-color .35s ease, color .35s ease, background-position .6s ease;
}

.px-btn:hover {
	box-shadow: var(--b-shadow-hover);
	color: var(--b-fg);
}

.px-btn:active {
	transform: translateY(0) scale(.98);
}

.px-btn__icon {
	display: inline-grid;
	flex: none;
	place-items: center;
	color: var(--b-arrow);
	transition: transform .45s var(--px-ease);
}

.px-btn__icon .px-icon {
	width: 1.15em;
	height: 1.15em;
}

/* Gold: the main action on a page. */
.px-btn--primary {
	--b-bg: linear-gradient(120deg, #ffcf47 0%, #ffb000 45%, #ff9500 100%);
	--b-fg: var(--px-char);
	--b-shadow: 0 10px 22px -14px rgba(214, 125, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .5);
	--b-shadow-hover: 0 18px 32px -16px rgba(214, 115, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* Orange: deep enough for white text to stay readable. */
.px-btn--orange {
	--b-bg: linear-gradient(120deg, #d6500e 0%, #c43d0c 50%, #b5320d 100%);
	--b-fg: #fff;
	--b-shadow: 0 10px 22px -14px rgba(181, 50, 13, .9), inset 0 1px 0 rgba(255, 255, 255, .22);
	--b-shadow-hover: 0 18px 32px -16px rgba(181, 50, 13, .95), inset 0 1px 0 rgba(255, 255, 255, .22);
}

/* Charcoal, the dark of the logo's swoosh. */
.px-btn--secondary,
.px-btn--dark {
	--b-bg: linear-gradient(120deg, #3a3129 0%, #2c251e 45%, #16130f 100%);
	--b-fg: #fff;
	--b-arrow: var(--px-amber);
	--b-shadow: 0 10px 22px -14px rgba(22, 19, 15, .9);
	--b-shadow-hover: 0 18px 32px -16px rgba(22, 19, 15, .9);
}

/* White with a gold edge: a second, quieter choice beside a gold button. */
.px-btn--outline {
	--b-bg: #fff;
	--b-fg: var(--px-char);
	--b-line: var(--px-amber);
	--b-arrow: var(--px-ember);
	--b-shadow: 0 8px 18px -15px rgba(214, 125, 0, .8);
	--b-shadow-hover: 0 14px 26px -16px rgba(214, 125, 0, .85);
}

.px-btn--outline:hover {
	--b-bg: #fff8ea;
	--b-line: #ff9500;
}

/* See-through: made for photographs and dark sections. */
.px-btn--ghost {
	--b-bg: transparent;
	--b-fg: #fff;
	--b-line: rgba(255, 255, 255, .45);
	--b-arrow: var(--px-amber);
}

.px-btn--ghost:hover {
	--b-bg: rgba(255, 255, 255, .1);
	--b-line: var(--px-amber);
}

/* Chosen for a light section anyway, it turns dark so it stays visible. */
.px-section:not(.px-section--dark, .px-section--photo, .px-hero) .px-btn--ghost {
	--b-fg: var(--px-char);
	--b-line: rgba(22, 19, 15, .28);
	--b-arrow: var(--px-ember);
}

.px-section:not(.px-section--dark, .px-section--photo, .px-hero) .px-btn--ghost:hover {
	--b-bg: rgba(22, 19, 15, .05);
	--b-line: var(--px-char);
}

/* Words and an arrow, underlined in gold. */
.px-btn--text {
	--b-fg: var(--px-char);
	--b-arrow: var(--px-ember);
	min-height: 0;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
}

.px-btn--text .px-btn__label {
	padding-bottom: 3px;
	background: linear-gradient(var(--px-amber), var(--px-amber)) 0 100% / 100% 2px no-repeat;
	transition: background-size .45s var(--px-ease);
}

.px-btn--text:hover {
	--b-fg: var(--px-ember);
}

/* Icon only: compact actions. Give it an aria-label. */
.px-btn--icon {
	--b-bg: #fff4dc;
	--b-fg: var(--px-ember);
	--b-shadow: 0 8px 18px -14px rgba(214, 125, 0, .7);
	--b-shadow-hover: 0 14px 24px -14px rgba(214, 125, 0, .8);
	width: 50px;
	height: 50px;
	padding: 0;
}

.px-btn--icon .px-icon {
	width: 1.3rem;
	height: 1.3rem;
}

.px-btn--icon.px-btn--primary,
.px-btn--icon.px-btn--orange,
.px-btn--icon.px-btn--dark {
	--b-fg: var(--px-char);
}

.px-btn--icon.px-btn--orange,
.px-btn--icon.px-btn--dark {
	--b-fg: #fff;
}

.px-btn--round {
	border-radius: 50%;
}

/* Sizes. */
.px-btn--sm {
	gap: 8px;
	min-height: 40px;
	padding: 8px 16px;
	border-radius: 12px;
	font-size: .875rem;
}

.px-btn--lg {
	gap: 12px;
	min-height: 58px;
	padding: 15px 30px;
	border-radius: 16px;
	font-size: 1.075rem;
}

.px-btn--icon.px-btn--sm {
	width: 40px;
	height: 40px;
	padding: 0;
}

.px-btn--icon.px-btn--lg {
	width: 58px;
	height: 58px;
	padding: 0;
}

@media (max-width: 480px) {
	.px-btn--lg:not(.px-btn--icon) {
		gap: 10px;
		min-height: 52px;
		padding: 13px 24px;
		font-size: 1rem;
	}
}

/* On dark ground an outline or text button turns light, and a dark one white. */
.px-hero .px-btn--outline,
.px-pagehead .px-btn--outline,
.px-section--dark .px-btn--outline,
.px-section--photo .px-btn--outline,
.px-site-footer .px-btn--outline {
	--b-bg: transparent;
	--b-fg: #fff;
	--b-line: rgba(255, 255, 255, .45);
	--b-arrow: var(--px-amber);
	--b-shadow: none;
}

.px-hero .px-btn--outline:hover,
.px-pagehead .px-btn--outline:hover,
.px-section--dark .px-btn--outline:hover,
.px-section--photo .px-btn--outline:hover,
.px-site-footer .px-btn--outline:hover {
	--b-bg: rgba(255, 255, 255, .1);
	--b-line: var(--px-amber);
}

.px-hero .px-btn--text,
.px-section--dark .px-btn--text,
.px-section--photo .px-btn--text {
	--b-fg: #fff;
	--b-arrow: var(--px-amber);
}

.px-section--dark .px-btn--secondary,
.px-hero .px-btn--secondary,
.px-section--photo .px-btn--secondary {
	--b-bg: #fff;
	--b-fg: var(--px-char);
	--b-arrow: var(--px-ember);
}

/* Focus and disabled, the same for every variant. */
.px-btn:focus-visible {
	outline: 3px solid var(--px-amber);
	outline-offset: 3px;
}

.px-btn:disabled,
.px-btn[aria-disabled="true"],
.px-btn.is-disabled {
	--b-bg: #ece6dc;
	--b-fg: #8a8177;
	--b-line: transparent;
	--b-arrow: #8a8177;
	--b-shadow: none;
	--b-shadow-hover: none;
	cursor: not-allowed;
	transform: none;
}

.px-btn--text:disabled .px-btn__label,
.px-btn--text.is-disabled .px-btn__label {
	background-size: 0 2px;
}

.px-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--px-space-3);
	margin-top: var(--px-space-6);
}

.px-actions--after {
	margin-top: var(--px-space-7);
}

/* ---------------------------------------------------------------- headings */

.px-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: var(--px-space-4);
	color: var(--px-accent);
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.px-eyebrow::before {
	content: "";
	width: 28px;
	height: 3px;
	border-radius: 3px;
	background: var(--px-flame);
}

.px-eyebrow--center {
	justify-content: center;
}

.px-heading {
	max-width: 760px;
}

.px-heading + * {
	margin-top: clamp(32px, 4vw, 56px);
}

.px-heading--center {
	margin-inline: auto;
	text-align: center;
}

.px-heading__title {
	margin-bottom: 0;
}

.px-heading__body {
	margin-top: var(--px-space-4);
	color: var(--px-fg-muted);
	font-size: 1.1rem;
}

/* ------------------------------------------------------------------- grids */

/* Every card in a set is the same size: rows share one height, and a short last
   row is centred rather than stretched. */
.px-grid {
	display: grid;
	grid-auto-rows: 1fr;
	gap: var(--px-space-5);
}

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

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

.px-grid--3 > * {
	grid-column: span 2;
}

@media (min-width: 1025px) {
	.px-grid--3 > :last-child:nth-child(3n + 1) {
		grid-column: 3 / span 2;
	}

	.px-grid--3 > :nth-last-child(2):nth-child(3n + 1) {
		grid-column: 2 / span 2;
	}
}

@media (max-width: 1024px) {
	.px-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

/* Tablet only: on a phone the grid has one column, and placing a card in
   column 2 there would add columns and squeeze every card. */
@media (min-width: 681px) and (max-width: 1024px) {
	.px-grid--3 > :last-child:nth-child(odd) {
		grid-column: 2 / span 2;
	}
}

@media (max-width: 680px) {
	.px-grid--2,
	.px-grid--3,
	.px-grid--4 {
		grid-template-columns: minmax(0, 1fr);
	}

	.px-grid--3 > :nth-child(n) {
		grid-column: auto;
	}
}

/* ------------------------------------------------------------------- lists */

.px-ticklist {
	display: grid;
	gap: var(--px-space-3);
	margin-top: var(--px-space-5);
	padding: 0;
	list-style: none;
}

.px-ticklist li {
	display: flex;
	gap: 12px;
	margin: 0;
}

.px-ticklist__icon {
	width: 22px;
	height: 22px;
	margin-top: 3px;
	color: var(--px-accent);
}

.px-channels {
	display: grid;
	gap: var(--px-space-4);
	margin-top: var(--px-space-6);
}

.px-channel {
	display: flex;
	gap: var(--px-space-4);
}

.px-channel__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 12px 22px 12px 12px;
	background: var(--px-icon-ground);
	color: var(--px-icon-fg);
}

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

.px-channel__value {
	display: block;
	color: var(--px-fg);
	font-weight: 600;
	overflow-wrap: anywhere;
	text-decoration: none;
}

.px-channel__value a {
	color: inherit;
	text-decoration: none;
}

a.px-channel__value:hover,
.px-channel__value a:hover {
	color: var(--px-accent);
	text-decoration: underline;
}

.px-factlist {
	display: grid;
	margin: var(--px-space-4) 0 0;
}

.px-factlist dt {
	padding-top: var(--px-space-3);
	border-top: 1px dashed #ead9c1;
	color: var(--px-ember);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.px-factlist dt:first-child {
	padding-top: 0;
	border-top: 0;
}

.px-factlist dd {
	margin: 4px 0 var(--px-space-3);
	color: var(--px-fg);
	font-family: var(--px-font-display);
	font-weight: 600;
}

/* The vacancy summary card: the same card as the forms, so a page reads as one. */
.px-office {
	position: relative;
	padding: clamp(22px, 2.6vw, 32px);
	padding-top: clamp(26px, 3vw, 36px);
	border: 1px solid #efe2cf;
	border-radius: var(--px-feather);
	background: linear-gradient(180deg, #fff 0%, #fffaf3 100%);
	box-shadow: 0 28px 56px -36px rgba(44, 30, 12, .38), 0 2px 8px rgba(44, 30, 12, .04);
	overflow: hidden;
}

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

.px-office__country {
	margin: 0;
	font-size: 1.2rem;
}

.px-office .px-btn {
	width: 100%;
	margin-top: var(--px-space-2);
}

/* ------------------------------------------------------------------- forms */

.px-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--px-space-4);
}

.px-form__field--full {
	grid-column: 1 / -1;
}

.px-form__label {
	display: block;
	margin-bottom: 7px;
	color: var(--px-fg);
	font-family: var(--px-font-display);
	font-size: .875rem;
	font-weight: 600;
	letter-spacing: .005em;
}

.px-form__required {
	color: var(--px-ember);
}

.px-input {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 13px 16px;
	border: 1.5px solid #e6dccd;
	border-radius: var(--px-radius-sm);
	background: #fdfbf8;
	box-shadow: inset 0 1px 2px rgba(44, 30, 12, .04);
	color: var(--px-char);
	font: inherit;
	font-size: 1rem;
	transition: border-color .2s, box-shadow .25s, background-color .2s;
}

.px-input::placeholder {
	color: #a39888;
}

textarea.px-input {
	min-height: 150px;
	line-height: 1.6;
	resize: vertical;
}

/* A drawn arrow, the same in every browser. */
select.px-input {
	padding-right: 46px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2410c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-position: right 16px center;
	background-repeat: no-repeat;
	background-size: 18px;
	cursor: pointer;
	appearance: none;
}

.px-input:hover {
	border-color: #d2c3ad;
	background-color: #fff;
}

.px-input:focus {
	border-color: var(--px-orange);
	outline: 0;
	background-color: #fff;
	box-shadow: 0 0 0 4px rgba(255, 106, 19, .14), 0 6px 18px -10px rgba(214, 115, 0, .5);
}

.px-input[aria-invalid="true"] {
	border-color: var(--px-red);
	background-color: #fffafa;
}

/* The CV upload reads as a drop area rather than a bare browser control. */
.px-input--file {
	min-height: 64px;
	padding: 12px;
	border-style: dashed;
	border-color: #e2c9a6;
	background: #fff8ee;
	color: var(--px-fg-muted);
	font-size: .95rem;
	cursor: pointer;
}

.px-input--file:hover {
	border-color: var(--px-orange);
	background: #fff3e2;
}

.px-input--file::file-selector-button {
	margin-right: 14px;
	padding: 10px 18px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(120deg, #3a3129 0%, #16130f 100%);
	color: #fff;
	font-family: var(--px-font-display);
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .3s ease;
}

.px-input--file:hover::file-selector-button {
	background: linear-gradient(120deg, #d6500e 0%, #b5320d 100%);
}

.px-form__hint {
	margin: 6px 0 0;
	color: var(--px-fg-muted);
	font-size: .875rem;
}

.px-form__error {
	margin: 6px 0 0;
	color: #b3201a;
	font-size: .9rem;
	font-weight: 600;
}

.px-form__notice {
	margin-bottom: var(--px-space-4);
	padding: var(--px-space-4);
	border-radius: var(--px-radius-sm);
	font-weight: 600;
}

.px-form__notice--success {
	margin-bottom: 0;
	border: 1px solid #9fd4ae;
	background: #eaf7ee;
	color: #14532d;
}

.px-form__notice--error {
	border: 1px solid #e6a5a1;
	background: #fdeeed;
	color: #8c1a15;
}

/* Bots fill it, people never see it. */
.px-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.px-searchform__row {
	display: flex;
	gap: var(--px-space-2);
}

.px-searchform__row .px-input {
	flex: 1 1 auto;
	min-width: 0;
}

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

@media (max-width: 480px) {
	.px-searchform__row {
		flex-direction: column;
	}
}

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

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

/* -------------------------------------------------------------- pagination */

.px-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--px-space-2);
	margin-top: var(--px-space-7);
}

.px-pagination a,
.px-pagination span {
	display: grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--px-line);
	border-radius: var(--px-radius-sm);
	color: var(--px-fg);
	text-decoration: none;
}

.px-pagination .current {
	border-color: var(--px-char);
	background: var(--px-char);
	color: #fff;
}
