/* Careers landing page, copied from apexdmit.com/careers (apexdmit-v2).
   Everything is prefixed with cp- so the old theme CSS can't reach it. */
@font-face {
	font-family: "Plus Jakarta Sans";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
}

.cp-page {
	--cp-ink: #1a194f;
	--cp-ink-800: #272663;
	--cp-ink-500: #4a4a72;
	--cp-ink-300: #a9a9c4;
	--cp-canvas: #f6f6fa;
	--cp-line: #e5e5ee;
	--cp-accent: #66bb72;
	--cp-accent-700: #35803f;
	--cp-accent-300: #8fd199;
	--cp-accent-50: #eff7f0;
	--cp-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--cp-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
	--cp-ease: cubic-bezier(0.22, 0.7, 0.25, 1);

	font-family: var(--cp-body);
	font-size: 16px;
	line-height: 1.5;
	color: var(--cp-ink);
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.cp-page *,
.cp-page *::before,
.cp-page *::after {
	box-sizing: border-box;
}

.cp-page h1,
.cp-page h2,
.cp-page h3,
.cp-page p,
.cp-page ul,
.cp-page figure {
	margin: 0;
	padding: 0;
}

.cp-page h1,
.cp-page h2,
.cp-page h3 {
	font-family: var(--cp-display);
	font-weight: 600;
	text-transform: none;
	text-wrap: balance;
}

.cp-page ul {
	list-style: none;
}

.cp-page img {
	display: block;
	max-width: 100%;
}

.cp-page a,
.cp-page a:hover,
.cp-page a:focus {
	text-decoration: none;
}

.cp-page a:focus-visible,
.cp-page button:focus-visible,
.cp-page summary:focus-visible {
	outline: 2px solid var(--cp-accent);
	outline-offset: 2px;
}

.cp-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* ---------- Layout ---------- */
.cp-container {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
}

.cp-section {
	position: relative;
	isolation: isolate;
	padding: 80px 0;
	background: #fff;
}

.cp-section--canvas {
	background: var(--cp-canvas);
}

#roles {
	scroll-margin-top: 80px;
}

.cp-eyebrow {
	margin-bottom: 16px !important;
	font: 600 12px/16px var(--cp-body);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--cp-accent-700);
}

.cp-eyebrow--dark {
	color: var(--cp-accent-300);
}

.cp-heading {
	text-align: center;
}

.cp-heading h2 {
	font-size: 30px;
	line-height: 1.15;
	letter-spacing: -0.025em;
	color: var(--cp-ink);
	text-wrap: pretty;
}

.cp-heading p:not(.cp-eyebrow) {
	max-width: 768px;
	margin: 20px auto 0;
	font-size: 18px;
	line-height: 1.625;
	color: var(--cp-ink-500);
}

/* ---------- Buttons ---------- */
.cp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: 9999px;
	font: 500 16px/24px var(--cp-body);
	white-space: nowrap;
	transition: color 0.2s, background-color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.cp-btn .cp-icon {
	transition: transform 0.2s;
}

.cp-btn:hover .cp-icon {
	transform: translateX(4px);
}

.cp-btn--accent,
.cp-btn--accent:focus {
	background: var(--cp-accent);
	color: var(--cp-ink);
}

.cp-btn--accent:hover {
	background: var(--cp-accent-300);
	color: var(--cp-ink);
}

.cp-btn--ghost,
.cp-btn--ghost:focus {
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
}

.cp-btn--ghost:hover {
	border-color: #fff;
	background: #fff;
	color: var(--cp-ink);
}

/* ---------- Hero ---------- */
.cp-hero {
	position: relative;
	isolation: isolate;
	overflow: clip;
	/* The fixed header sits on top of the hero, so leave room for it. */
	padding: 160px 0 96px;
	background: var(--cp-ink);
}

.cp-hero__media {
	display: none;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: -1;
	width: min(55%, 760px);
}

.cp-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.cp-hero__media::before,
.cp-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
}

.cp-hero__media::before {
	background: linear-gradient(90deg,
		var(--cp-ink) 0%,
		color-mix(in srgb, var(--cp-ink) 80%, transparent) 30%,
		color-mix(in srgb, var(--cp-ink) 25%, transparent) 70%,
		color-mix(in srgb, var(--cp-ink) 10%, transparent) 100%);
}

.cp-hero__media::after {
	background: linear-gradient(to top, var(--cp-ink), rgba(26, 25, 79, 0.1), transparent);
}

.cp-hero__copy {
	max-width: 672px;
}

.cp-hero h1 {
	font-size: 36px;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: #fff;
}

.cp-hero__subline {
	margin-top: 16px !important;
	font: 600 16px/24px var(--cp-body);
	color: var(--cp-accent-300);
}

.cp-hero__body {
	margin-top: 16px !important;
	font-size: 18px;
	line-height: 1.625;
	color: var(--cp-ink-300);
}

.cp-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-top: 36px;
}

/* ---------- Life at Apex: photo mosaic ---------- */
.cp-mosaic {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-flow: row dense;
	grid-auto-rows: 150px;
	gap: 12px;
	margin-top: 56px !important;
}

.cp-mosaic li {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background: var(--cp-line);
}

.cp-mosaic .cp-span-wide {
	grid-column: span 2;
	grid-row: span 2;
}

.cp-mosaic .cp-span-tall {
	grid-row: span 2;
}

.cp-mosaic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s ease-out;
}

.cp-mosaic li:hover img {
	transform: scale(1.06);
}

.cp-mosaic__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 40px 16px 12px;
	background: linear-gradient(to top, rgba(26, 25, 79, 0.9), rgba(26, 25, 79, 0.5), transparent);
	font-size: 14px;
	line-height: 1.375;
	color: #fff;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s, transform 0.3s;
}

.cp-mosaic li:hover .cp-mosaic__caption {
	opacity: 1;
	transform: none;
}

/* ---------- Why join us ---------- */
.cp-why {
	display: grid;
	gap: 20px;
	margin-top: 56px !important;
}

.cp-why li {
	padding: 24px;
	border: 1px solid var(--cp-line);
	border-radius: 16px;
	background: #fff;
	transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.cp-why li:hover {
	transform: translateY(-4px);
	border-color: rgba(102, 187, 114, 0.4);
	box-shadow: 0 20px 40px -26px rgba(26, 25, 79, 0.5);
}

.cp-why__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--cp-accent-50);
	color: var(--cp-accent-700);
	transition: background-color 0.3s, color 0.3s;
}

.cp-why__icon svg {
	width: 26px;
	height: 26px;
	fill: currentColor;
}

.cp-why li:hover .cp-why__icon {
	background: var(--cp-accent);
	color: #fff;
}

.cp-why h3 {
	margin-top: 20px !important;
	font-size: 18px;
	line-height: 28px;
	color: var(--cp-ink);
}

.cp-why p {
	margin-top: 8px !important;
	font-size: 15px;
	line-height: 1.625;
	color: var(--cp-ink-500);
}

/* ---------- Video ---------- */
.cp-video {
	max-width: 896px;
	margin: 48px auto 0;
}

.cp-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 24px;
	background: var(--cp-ink);
	box-shadow: 0 0 0 1px var(--cp-line), 0 40px 80px -40px rgba(26, 25, 79, 0.6);
}

.cp-video__play {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.cp-video__play img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s ease-out;
}

.cp-video__play:hover img {
	transform: scale(1.05);
}

.cp-video__shade {
	position: absolute;
	inset: 0;
	background: rgba(26, 25, 79, 0.15);
	transition: background-color 0.3s;
}

.cp-video__play:hover .cp-video__shade {
	background: rgba(26, 25, 79, 0.05);
}

.cp-video__button {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.95);
	color: var(--cp-ink);
	box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.5);
	transform: translate(-50%, -50%);
	transition: transform 0.3s, background-color 0.3s;
}

.cp-video__button svg {
	width: 28px;
	height: 28px;
	margin-left: 4px;
	fill: currentColor;
}

.cp-video__play:hover .cp-video__button {
	background: var(--cp-accent);
	transform: translate(-50%, -50%) scale(1.1);
}

.cp-video__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Open roles (dark band) ---------- */
.cp-section--ink {
	overflow: clip;
	background: var(--cp-ink);
}

/* Soft green glow at the top of the band. */
.cp-roles-glow {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(ellipse 60% 50% at 50% 0%, color-mix(in srgb, var(--cp-accent) 22%, transparent), transparent);
}

.cp-heading--dark h2 {
	color: #fff;
}

.cp-heading--dark p:not(.cp-eyebrow) {
	color: var(--cp-ink-300);
}

.cp-roles-wrap {
	max-width: 896px;
	margin: 48px auto 0;
}

.cp-roles {
	display: grid;
	gap: 16px;
}

/* Extra roles stay hidden only once JS has added the "See more" button. */
.cp-roles.is-collapsed .cp-role--extra {
	display: none;
}

.cp-role {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 20px;
	overflow: hidden;
	padding: 24px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	background: #fff;
	transition: transform 0.3s, box-shadow 0.3s;
}

.cp-role:hover {
	transform: translateY(-2px);
	box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
}

/* Green edge that appears on hover. */
.cp-role__bar {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 4px;
	background: var(--cp-accent);
	opacity: 0;
	transition: opacity 0.3s;
}

.cp-role:hover .cp-role__bar {
	opacity: 1;
}

.cp-role h3 {
	font-size: 20px;
	line-height: 1.375;
	color: var(--cp-ink);
}

.cp-role__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
	font-size: 14px;
	line-height: 20px;
}

.cp-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 9999px;
}

.cp-chip svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	flex-shrink: 0;
}

.cp-chip--shift {
	background: var(--cp-ink);
	font-weight: 500;
	color: #fff;
}

.cp-chip--shift svg {
	color: var(--cp-accent-300);
}

.cp-chip--deadline {
	background: var(--cp-canvas);
	color: var(--cp-ink);
}

.cp-chip--deadline svg {
	color: var(--cp-accent-700);
}

.cp-chip strong {
	font-weight: 600;
}

.cp-role__apply,
.cp-role__apply:focus {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	align-self: flex-start;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 24px;
	border: 1px solid var(--cp-ink);
	border-radius: 9999px;
	background: transparent;
	font: 600 14px/20px var(--cp-body);
	color: var(--cp-ink);
	transition: background-color 0.2s, color 0.2s;
}

.cp-role:hover .cp-role__apply {
	background: var(--cp-ink);
	color: #fff;
}

.cp-role__apply .cp-icon {
	transition: transform 0.2s;
}

.cp-role:hover .cp-role__apply .cp-icon {
	transform: translateX(4px);
}

.cp-role__closed {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	min-height: 44px;
	padding: 10px 24px;
	border-radius: 9999px;
	background: var(--cp-canvas);
	font: 600 14px/20px var(--cp-body);
	color: var(--cp-ink-500);
}

.cp-roles-more {
	margin-top: 32px;
	text-align: center;
}

.cp-roles-more__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 12px 28px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 9999px;
	background: transparent;
	font: 600 14px/20px var(--cp-body);
	color: #fff;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.cp-roles-more__btn[hidden] {
	display: none;
}

.cp-roles-more__btn:hover {
	border-color: #fff;
	background: #fff;
	color: var(--cp-ink);
}

.cp-page .cp-roles-empty {
	max-width: 672px;
	margin: 48px auto 0 !important;
	padding: 24px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.05);
	text-align: center;
	color: var(--cp-ink-300);
}

/* ---------- FAQ ---------- */
.cp-faq {
	max-width: 768px;
	margin: 48px auto 0;
	overflow: hidden;
	border: 1px solid var(--cp-line);
	border-radius: 16px;
	background: #fff;
}

.cp-faq details + details {
	border-top: 1px solid var(--cp-line);
}

.cp-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 44px;
	padding: 20px 24px;
	list-style: none;
	cursor: pointer;
	font: 600 18px/28px var(--cp-body);
	color: var(--cp-ink);
}

.cp-faq summary::-webkit-details-marker {
	display: none;
}

.cp-faq summary:hover {
	background: var(--cp-canvas);
}

.cp-faq__plus {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 9999px;
	background: var(--cp-accent-50);
	font-size: 20px;
	line-height: 1;
	color: var(--cp-accent-700);
	transition: transform 0.3s;
}

.cp-faq details[open] .cp-faq__plus {
	transform: rotate(45deg);
}

.cp-faq p {
	padding: 0 24px 24px;
	line-height: 1.625;
	color: var(--cp-ink-500);
}

/* ---------- Closing band ---------- */
.cp-closing {
	position: relative;
	isolation: isolate;
	overflow: clip;
	padding: 96px 0;
	background: var(--cp-ink);
	text-align: center;
}

.cp-closing__bg {
	position: absolute;
	inset: 0;
	z-index: -3;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform-origin: 40% 60%;
	animation: cp-ken-burns 22s ease-in-out infinite alternate;
}

.cp-closing__wash {
	position: absolute;
	inset: 0;
	z-index: -2;
	background: radial-gradient(ellipse at center, color-mix(in srgb, var(--cp-ink) 62%, transparent) 0%, color-mix(in srgb, var(--cp-ink) 88%, transparent) 85%);
}

.cp-sparkles {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.cp-sparkle {
	position: absolute;
	color: var(--cp-accent-300);
	opacity: 0;
	animation: cp-twinkle 3.4s ease-in-out infinite;
}

.cp-closing h2 {
	max-width: 768px;
	margin: 0 auto !important;
	font-size: 36px;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: #fff;
}

.cp-magic {
	background: linear-gradient(100deg, var(--cp-accent-300) 0%, #fff 35%, var(--cp-accent) 55%, var(--cp-accent-300) 100%);
	background-size: 250% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: cp-magic-shimmer 5s ease-in-out infinite;
}

.cp-closing__body {
	max-width: 576px;
	margin: 24px auto 0 !important;
	font-size: 18px;
	line-height: 1.625;
	color: var(--cp-ink-300);
}

.cp-closing__cta {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.cp-closing__cta .cp-btn:hover {
	transform: translateY(-2px);
	background: #fff;
	box-shadow: 0 14px 30px -12px rgba(255, 255, 255, 0.45);
}

@keyframes cp-ken-burns {
	from { transform: scale(1.04) translate(0, 0); }
	to { transform: scale(1.16) translate(-2%, -1.5%); }
}

@keyframes cp-twinkle {
	0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
	50% { opacity: 0.9; transform: scale(1) rotate(45deg); }
}

@keyframes cp-magic-shimmer {
	0%, 100% { background-position: 100% 0; }
	50% { background-position: 0% 0; }
}

/* ---------- Scroll reveal (armed by careers_page.js) ---------- */
.cp-reveal-item {
	transition: opacity 0.7s var(--cp-ease), transform 0.7s var(--cp-ease);
}

[data-reveal="armed"] .cp-reveal-item {
	opacity: 0;
	transform: translateY(24px);
}

/* Hover lift must still work after the reveal finished. */
[data-reveal="shown"] .cp-why li.cp-reveal-item:hover {
	transform: translateY(-4px);
}

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
	.cp-heading h2 { font-size: 36px; }
	.cp-hero h1,
	.cp-closing h2 { font-size: 48px; }
	.cp-mosaic { grid-auto-rows: 180px; }
	.cp-why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cp-role {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 28px;
	}
	.cp-role__apply,
	.cp-role__closed { align-self: auto; }
}

@media (min-width: 768px) {
	.cp-section { padding: 112px 0; }
	.cp-hero { padding-bottom: 112px; }
	.cp-hero__media { display: block; }
	.cp-closing { padding: 128px 0; }
}

@media (min-width: 1024px) {
	.cp-container { padding: 0 40px; }
	.cp-heading h2 { font-size: 44px; }
	.cp-mosaic {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-auto-rows: 200px;
		gap: 16px;
	}
	.cp-why { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	.cp-closing__bg,
	.cp-magic { animation: none; }
	.cp-sparkle { animation: none; opacity: 0.5; }
}
