:root {
	--amec-projects-dark: #151719;
	--amec-projects-ink: #25292d;
	--amec-projects-muted: #626a73;
	--amec-projects-soft: #f3f6f8;
	--amec-projects-panel: #f7f5f0;
	--amec-projects-accent: #c83c00;
	--amec-projects-accent-on-dark: #ff7a3d;
	--amec-projects-line: rgba(21, 23, 25, 0.12);
	--amec-projects-font: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.amec-projects-archive,
.amec-project-single {
	overflow-x: clip;
	background: var(--amec-projects-soft);
	color: var(--amec-projects-ink);
	font-family: var(--amec-projects-font);
}

.amec-projects-shell {
	width: min(1120px, calc(100% - 40px));
	margin: 0 auto;
}

.amec-projects-hero,
.amec-project-single__hero {
	position: relative;
	min-height: clamp(500px, 58vw, 760px);
	display: grid;
	align-items: end;
	padding: clamp(130px, 14vw, 180px) 0 clamp(60px, 7vw, 96px);
	background:
		linear-gradient(90deg, rgba(13, 15, 17, 0.84), rgba(13, 15, 17, 0.42)),
		var(--amec-projects-hero-image, linear-gradient(135deg, #2f363c, #151719));
	background-position: center;
	background-size: cover;
	color: #ffffff;
}

.amec-projects-hero__inner,
.amec-project-single__hero-inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
	gap: clamp(32px, 6vw, 72px);
	align-items: end;
}

.amec-projects-kicker,
.amec-project-single__back,
.amec-project-card__type {
	display: inline-flex;
	margin: 0 0 14px;
	color: var(--amec-projects-accent);
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}

.amec-projects-hero .amec-projects-kicker,
.amec-project-single__back {
	color: var(--amec-projects-accent-on-dark);
}

.amec-projects-kicker {
	margin-bottom: 18px;
	font-size: 0.72rem !important;
	font-weight: 800 !important;
	letter-spacing: 0.13em;
	line-height: 1.2;
}

.amec-projects-hero .amec-projects-kicker {
	margin: 0 0 18px;
	color: var(--amec-projects-accent-on-dark) !important;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.13em;
	line-height: 1.2;
}

.amec-projects-hero h1,
.amec-project-single h1 {
	max-width: 820px;
	margin: 0;
	color: #ffffff !important;
	font-size: clamp(2rem, 3.36vw, 3.6rem);
	font-weight: 700;
	line-height: 0.9;
	letter-spacing: 0;
}

.amec-projects-hero p,
.amec-project-single__hero-copy p {
	max-width: 660px;
	margin: 22px 0 0;
	color: rgba(255, 255, 255, 0.78) !important;
	font-size: clamp(1rem, 1.6vw, 1.2rem);
	line-height: 1.7;
}

.amec-projects-hero__stats,
.amec-project-single__meta-panel {
	padding: 24px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.amec-projects-hero__stats span {
	display: block;
	font-size: clamp(2.6rem, 5vw, 4rem);
	font-weight: 800;
	line-height: 0.95;
}

.amec-projects-hero__stats small,
.amec-project-single__meta-panel span {
	display: block;
	margin-top: 8px;
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.amec-projects-list,
.amec-project-single__overview,
.amec-project-single__gallery,
.amec-project-single__nav {
	padding: clamp(58px, 7vw, 104px) 0;
}

.amec-projects-list {
	padding-top: clamp(54px, 6vw, 86px);
}

.amec-projects-section-heading {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.5fr);
	grid-template-areas:
		"kicker copy"
		"title copy";
	gap: clamp(10px, 1.6vw, 18px) clamp(34px, 6vw, 90px);
	align-items: start;
	margin-bottom: clamp(34px, 4.6vw, 58px);
	padding-bottom: clamp(24px, 3vw, 36px);
	border-bottom: 1px solid rgba(21, 23, 25, 0.1);
}

.amec-projects-section-heading .amec-projects-kicker {
	grid-area: kicker;
	margin-bottom: 0;
}

.amec-projects-section-heading h2,
.amec-project-single__overview h2,
.amec-project-single__gallery h2 {
	margin: 0;
	max-width: 760px;
	font-size: clamp(1.65rem, 2.2vw, 1.98rem);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: 0;
}

.amec-projects-section-heading h2 {
	grid-area: title;
	max-width: 780px;
}

.amec-projects-section-heading p:last-child {
	grid-area: copy;
	margin: 0;
	max-width: 500px;
	padding-left: 24px;
	border-left: 3px solid var(--amec-projects-accent);
	color: var(--amec-projects-muted);
	font-size: clamp(1rem, 1.2vw, 1.08rem);
	line-height: 1.75;
}

.amec-projects-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.amec-project-card {
	position: relative;
	min-width: 0;
	min-height: clamp(300px, 28vw, 420px);
	aspect-ratio: 0.78;
	overflow: hidden;
	border-radius: 8px;
	background: #151719;
	box-shadow: 0 18px 40px rgba(21, 23, 25, 0.08);
	isolation: isolate;
	transform: translateZ(0);
	transition: transform 260ms ease, box-shadow 260ms ease;
}

.amec-project-card:hover,
.amec-project-card:focus-within {
	transform: translateY(-8px);
	box-shadow: 0 30px 70px rgba(21, 23, 25, 0.18);
}

.amec-project-card__media {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	overflow: hidden;
	background: #d7d2c9;
}

.amec-project-card__media img,
.amec-project-single__hero-media img,
.amec-project-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.amec-project-card__media img {
	filter: saturate(0.96) contrast(1.02);
	transform: scale(1.01);
	transition: transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 520ms ease;
}

.amec-project-card:hover .amec-project-card__media img,
.amec-project-card:focus-within .amec-project-card__media img,
.amec-project-gallery__item:hover img,
.amec-project-gallery__item:focus img {
	filter: saturate(1.08) contrast(1.06);
	transform: scale(1.09);
}

.amec-project-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #dad6cf, #f3f0ea);
}

.amec-project-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	background:
		linear-gradient(180deg, rgba(21, 23, 25, 0.05) 0%, rgba(21, 23, 25, 0.1) 38%, rgba(21, 23, 25, 0.82) 100%),
		linear-gradient(135deg, rgba(255, 94, 20, 0.2), rgba(255, 94, 20, 0) 42%);
	opacity: 0.92;
	transition: opacity 260ms ease;
	pointer-events: none;
}

.amec-project-card::after {
	content: "View";
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	opacity: 0;
	transform: translateY(-8px) scale(0.92);
	transition: opacity 220ms ease, transform 220ms ease, background-color 220ms ease;
	pointer-events: none;
}

.amec-project-card:hover::before,
.amec-project-card:focus-within::before {
	opacity: 1;
}

.amec-project-card:hover::after,
.amec-project-card:focus-within::after {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.amec-project-card__body {
	position: absolute;
	inset: auto 0 0;
	z-index: 4;
	padding: 22px;
	color: #ffffff;
	transform: translateY(8px);
	transition: transform 260ms ease;
	pointer-events: none;
}

.amec-project-card:hover .amec-project-card__body,
.amec-project-card:focus-within .amec-project-card__body {
	transform: translateY(0);
}

.amec-project-card__body h3 {
	margin: 0;
	color: #ffffff;
	font-size: clamp(1.08rem, 1.35vw, 1.46rem);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: 0;
}

.amec-project-card__body a {
	color: #ffffff;
	text-decoration: none;
	pointer-events: auto;
}

.amec-project-card__type {
	margin-bottom: 10px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.amec-project-card__location {
	display: block;
	margin-top: 8px;
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.25;
}

.navigation.pagination {
	margin: clamp(36px, 5vw, 56px) 0 0;
}

.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.navigation.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 0 14px;
	border: 1px solid var(--amec-projects-line);
	border-radius: 999px;
	background: #ffffff;
	color: var(--amec-projects-ink);
	font-weight: 700;
	text-decoration: none;
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers:focus {
	border-color: var(--amec-projects-dark);
	background: var(--amec-projects-dark);
	color: #ffffff;
}

.amec-projects-empty {
	margin: 0;
	color: var(--amec-projects-muted);
}

.amec-project-single__meta-panel {
	display: grid;
	gap: 18px;
}

.amec-project-single__meta-panel div + div {
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.amec-project-single__meta-panel strong {
	display: block;
	margin-top: 6px;
	color: #ffffff;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.35;
}

.amec-project-single__overview {
	background: #ffffff;
}

.amec-project-single__overview-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.78fr) minmax(300px, 0.58fr);
	gap: clamp(28px, 6vw, 80px);
	align-items: start;
}

.amec-project-single__overview-copy p {
	margin: 0;
	color: var(--amec-projects-muted);
	font-size: clamp(1rem, 1.4vw, 1.12rem);
	line-height: 1.8;
}

.amec-project-single__overview-copy p + p {
	margin-top: 18px;
}

.amec-project-single__gallery {
	background: var(--amec-projects-soft);
}

.amec-project-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-flow: dense;
	gap: 16px;
}

.amec-project-gallery__item {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 8px;
	background: #d7d2c9;
}

.amec-project-gallery__item:focus-visible {
	outline: 3px solid var(--amec-projects-accent);
	outline-offset: 4px;
}

.amec-project-gallery__item--large {
	grid-column: span 2;
	grid-row: span 2;
}

.amec-project-gallery__item img {
	transition: transform 220ms ease;
}

.amec-project-lightbox-open {
	overflow: hidden !important;
}

.amec-project-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: grid;
	place-items: center;
	padding: clamp(18px, 4vw, 48px);
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms ease, visibility 180ms ease;
}

.amec-project-lightbox.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.amec-project-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 8, 10, 0.9);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.amec-project-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) 64px;
	align-items: center;
	width: min(100%, 1320px);
	height: min(100%, 860px);
	gap: clamp(12px, 2vw, 24px);
}

.amec-project-lightbox__figure {
	position: relative;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	align-items: center;
	justify-items: center;
	min-width: 0;
	height: 100%;
	margin: 0;
}

.amec-project-lightbox__figure::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 0;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	border: 2px solid rgba(255, 255, 255, 0.16);
	border-top-color: rgba(255, 255, 255, 0.7);
	border-radius: 999px;
	opacity: 0;
	transform: rotate(0deg);
	transition: opacity 140ms ease;
	animation: amec-project-lightbox-spin 900ms linear infinite;
	pointer-events: none;
}

.amec-project-lightbox.is-loading .amec-project-lightbox__figure::before {
	opacity: 1;
}

.amec-project-lightbox__image {
	position: relative;
	z-index: 1;
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 160px);
	object-fit: contain;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
	opacity: 1;
	transition: opacity 160ms ease;
}

.amec-project-lightbox.is-loading .amec-project-lightbox__image {
	opacity: 0.45;
}

.amec-project-lightbox__caption {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	align-items: center;
	justify-content: space-between;
	width: min(100%, 900px);
	margin-top: 18px;
	color: rgba(255, 255, 255, 0.74);
	font-size: 0.88rem;
	font-weight: 700;
}

.amec-project-lightbox__count {
	color: rgba(255, 255, 255, 0.54);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.amec-project-lightbox__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	font: inherit;
	font-size: 0;
	cursor: pointer;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.amec-project-lightbox__button:hover,
.amec-project-lightbox__button:focus-visible {
	border-color: rgba(255, 255, 255, 0.48);
	background: rgba(255, 255, 255, 0.16);
	transform: translateY(-1px);
	outline: none;
}

.amec-project-lightbox__nav {
	width: 58px;
	height: 58px;
}

.amec-project-lightbox__nav::before {
	display: block;
	font-size: 2.25rem;
	font-weight: 400;
	line-height: 1;
}

.amec-project-lightbox__nav--prev::before {
	content: "‹";
	transform: translateY(-2px);
}

.amec-project-lightbox__nav--next::before {
	content: "›";
	transform: translateY(-2px);
}

.amec-project-lightbox__close {
	position: fixed;
	top: max(18px, env(safe-area-inset-top));
	right: max(18px, env(safe-area-inset-right));
	z-index: 2;
	width: 48px;
	height: 48px;
}

.amec-project-lightbox__close::before,
.amec-project-lightbox__close::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 2px;
	border-radius: 999px;
	background: currentColor;
}

.amec-project-lightbox__close::before {
	transform: rotate(45deg);
}

.amec-project-lightbox__close::after {
	transform: rotate(-45deg);
}

@keyframes amec-project-lightbox-spin {
	to {
		transform: rotate(360deg);
	}
}

.amec-project-single__nav {
	background: var(--amec-projects-dark);
	color: #ffffff;
}

.amec-project-single__nav .amec-projects-shell {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.amec-project-single__nav a {
	display: block;
	min-height: 130px;
	padding: 24px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	color: #ffffff;
	text-decoration: none;
}

.amec-project-single__nav a:hover,
.amec-project-single__nav a:focus {
	border-color: rgba(255, 255, 255, 0.42);
	background: rgba(255, 255, 255, 0.06);
}

.amec-project-single__nav span {
	display: block;
	margin-bottom: 10px;
	color: rgba(255, 255, 255, 0.58);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.amec-project-single__nav strong {
	display: block;
	font-size: clamp(1.2rem, 2.4vw, 2rem);
	line-height: 1.1;
}

@media (max-width: 1024px) {
	.amec-projects-hero__inner,
	.amec-project-single__hero-inner,
	.amec-projects-section-heading,
	.amec-project-single__overview-grid {
		grid-template-columns: 1fr;
	}

	.amec-projects-section-heading {
		grid-template-areas:
			"kicker"
			"title"
			"copy";
		align-items: start;
	}

	.amec-projects-section-heading p:last-child {
		max-width: 680px;
	}

	.amec-projects-hero__stats,
	.amec-project-single__meta-panel {
		max-width: 440px;
	}

}

@media (max-width: 900px) {
	.amec-projects-grid,
	.amec-project-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.amec-project-gallery__item--large {
		grid-column: span 2;
	}
}

@media (max-width: 620px) {
	.amec-projects-shell {
		width: min(100% - 24px, 1120px);
	}

	.amec-projects-hero,
	.amec-project-single__hero {
		min-height: 560px;
		padding-top: 112px;
	}

	.amec-projects-hero h1,
	.amec-project-single h1 {
		font-size: clamp(1.8rem, 8vw, 2.4rem);
	}

	.amec-projects-list {
		padding-top: 52px;
	}

	.amec-projects-section-heading {
		gap: 12px;
		margin-bottom: 28px;
		padding-bottom: 24px;
	}

	.amec-projects-section-heading h2,
	.amec-project-single__overview h2,
	.amec-project-single__gallery h2 {
		line-height: 1.06;
	}

	.amec-projects-section-heading p:last-child {
		padding-left: 18px;
	}

	.amec-projects-grid,
	.amec-project-gallery,
	.amec-project-single__nav .amec-projects-shell {
		grid-template-columns: 1fr;
	}

	.amec-project-gallery__item--large {
		grid-column: span 1;
		grid-row: span 1;
	}

	.amec-project-card__body {
		padding: 20px;
	}

	.amec-project-lightbox {
		padding: 16px;
	}

	.amec-project-lightbox__dialog {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: minmax(0, 1fr) auto;
		width: 100%;
		height: 100%;
		gap: 14px;
	}

	.amec-project-lightbox__figure {
		grid-column: 1 / -1;
	}

	.amec-project-lightbox__image {
		max-height: calc(100vh - 150px);
	}

	.amec-project-lightbox__caption {
		align-self: end;
		margin-top: 14px;
		font-size: 0.82rem;
	}

	.amec-project-lightbox__nav {
		width: 100%;
		height: 50px;
	}

	.amec-project-lightbox__nav--prev {
		grid-column: 1;
		grid-row: 2;
	}

	.amec-project-lightbox__nav--next {
		grid-column: 2;
		grid-row: 2;
	}

	.amec-project-lightbox__close {
		width: 44px;
		height: 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.amec-project-card,
	.amec-project-card::after,
	.amec-project-card__body,
	.amec-project-card__media img,
	.amec-project-gallery__item img,
	.amec-project-lightbox,
	.amec-project-lightbox__button,
	.amec-project-lightbox__image {
		scroll-behavior: auto;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

	.amec-project-card:hover,
	.amec-project-card:focus-within,
	.amec-project-card:hover .amec-project-card__media img,
	.amec-project-card:focus-within .amec-project-card__media img,
	.amec-project-gallery__item:hover img,
	.amec-project-gallery__item:focus img {
		transform: none;
	}
}
