:root {
	--navy: #071b3a;
	--blue: #123b86;
	--blue-bright: #1a58c7;
	--red: #c52832;
	--ink: #152033;
	--muted: #5e697b;
	--line: #dce2eb;
	--mist: #f3f6fa;
	--white: #ffffff;
	--shadow: 0 18px 45px rgba(7, 27, 58, 0.12);
	--radius: 18px;
	--content: 1180px;
	--font-display: "Aptos Display", Aptos, "Segoe UI", Helvetica, Arial, sans-serif;
}

@view-transition {
	navigation: auto;
}

::view-transition-old(root) {
	animation: 160ms ease both page-fade-out;
}

::view-transition-new(root) {
	animation: 280ms ease both page-fade-in;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--ink);
	background: var(--white);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.65;
}

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

a {
	color: var(--blue-bright);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--red);
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

:focus-visible {
	outline: 3px solid #f0b429;
	outline-offset: 3px;
}

.skip-link {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 1000;
	padding: 0.65rem 1rem;
	color: var(--white);
	background: var(--navy);
	transform: translateY(-150%);
}

.skip-link:focus {
	transform: translateY(0);
}

.container {
	width: min(calc(100% - 2rem), var(--content));
	margin-inline: auto;
}

.eyebrow {
	margin: 0 0 0.6rem;
	color: var(--red);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

h1,
h2,
h3 {
	margin-top: 0;
	color: var(--navy);
	font-family: var(--font-display);
	font-weight: 720;
	line-height: 1.16;
}

h1 {
	font-size: clamp(2.35rem, 5.6vw, 4.4rem);
	letter-spacing: -0.035em;
}

h2 {
	font-size: clamp(1.75rem, 3.2vw, 2.7rem);
	letter-spacing: -0.025em;
}

h3 {
	font-size: 1.35rem;
}

p {
	margin-top: 0;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 4px 18px rgba(7, 27, 58, 0);
	transition: box-shadow 180ms ease;
	view-transition-name: site-header;
}

.site-header.is-scrolled {
	box-shadow: 0 4px 18px rgba(7, 27, 58, 0.11);
}

.topbar {
	color: #dce7f8;
	background: var(--navy);
	font-size: 0.86rem;
}

.topbar .container {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1.5rem;
	min-height: 38px;
}

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

.header-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: 94px;
	transition: min-height 180ms ease;
}

.brand {
	flex: 0 1 420px;
}

.brand img {
	width: min(100%, 390px);
	height: auto;
	transition: width 180ms ease;
}

.site-header.is-scrolled .header-main {
	min-height: 76px;
}

.site-header.is-scrolled .brand img {
	width: min(100%, 330px);
}

.nav-toggle {
	display: none;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--navy);
	background: var(--white);
	font: inherit;
	font-weight: 750;
	cursor: pointer;
}

.site-nav ul {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	display: block;
	padding: 0.6rem 0.72rem;
	border-radius: 8px;
	color: var(--navy);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.035em;
	text-decoration: none;
	text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
	color: var(--white);
	background: var(--blue);
}

.hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: min(680px, 78vh);
	background: var(--navy);
}

.hero-slide {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	opacity: 0;
	object-fit: cover;
	transition: opacity 900ms ease;
}

.hero-slide.is-active {
	opacity: 1;
}

.hero::after,
.page-hero::after {
	position: absolute;
	inset: 0;
	z-index: -1;
	content: "";
	background: linear-gradient(90deg, rgba(3, 18, 43, 0.93) 0%, rgba(3, 18, 43, 0.7) 48%, rgba(3, 18, 43, 0.2) 100%);
}

.hero .container {
	display: grid;
	align-content: center;
	min-height: inherit;
	padding-block: 6rem;
}

.hero-content {
	max-width: 780px;
	color: var(--white);
}

.hero h1,
.page-hero h1 {
	margin-bottom: 1.25rem;
	color: var(--white);
}

.hero .lead {
	max-width: 670px;
	margin-bottom: 2rem;
	color: #e6edf8;
	font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.75rem 1.2rem;
	border: 2px solid var(--blue);
	border-radius: 10px;
	color: var(--white);
	background: var(--blue);
	font-weight: 800;
	text-decoration: none;
}

.button:hover {
	color: var(--white);
	border-color: var(--red);
	background: var(--red);
}

.button-secondary {
	border-color: rgba(255, 255, 255, 0.65);
	background: rgba(255, 255, 255, 0.08);
}

.button-light {
	color: var(--navy);
	border-color: var(--white);
	background: var(--white);
}

.slider-controls {
	position: absolute;
	right: max(1rem, calc((100% - var(--content)) / 2));
	bottom: 1.5rem;
	display: flex;
	gap: 0.45rem;
}

.slider-dot {
	width: 34px;
	height: 5px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
}

.slider-dot.is-active {
	background: var(--white);
}

.section {
	padding-block: clamp(4rem, 8vw, 7rem);
}

.section-muted {
	background: var(--mist);
}

.section-intro {
	max-width: 760px;
	margin-bottom: 2.5rem;
	color: var(--muted);
	font-size: 1.08rem;
}

.split {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
	gap: clamp(2rem, 6vw, 5rem);
	align-items: start;
}

.stat-card,
.service-card,
.content-card,
.contact-card,
.staff-card {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white);
	box-shadow: var(--shadow);
}

.stat-card {
	padding: 2rem;
	border-top: 5px solid var(--red);
}

.stat-card strong {
	display: block;
	margin-bottom: 0.5rem;
	color: var(--blue);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(3rem, 7vw, 5.5rem);
	line-height: 1;
}

.service-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.15rem;
}

.service-card {
	overflow: hidden;
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.service-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 22px 55px rgba(7, 27, 58, 0.17);
}

.service-card-media {
	display: grid;
	place-items: center;
	aspect-ratio: 5 / 4;
	padding: clamp(0.65rem, 1.5vw, 1rem);
	border-bottom: 1px solid var(--line);
	background: var(--mist);
	overflow: hidden;
}

.service-card-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.service-card-body {
	padding: 1.4rem;
}

.service-card p {
	color: var(--muted);
}

.service-card a {
	font-weight: 800;
}

.cta {
	color: var(--white);
	background: var(--blue);
}

.cta .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding-block: 3.5rem;
}

.cta h2 {
	margin-bottom: 0.3rem;
	color: var(--white);
	font-size: clamp(1.9rem, 4vw, 3rem);
}

.cta p {
	margin: 0;
	color: #dce7f8;
}

.page-hero {
	position: relative;
	isolation: isolate;
	display: grid;
	align-content: end;
	min-height: 390px;
	background-color: var(--navy);
	background-position: center;
	background-size: cover;
}

.page-hero .container {
	padding-block: 5rem 4rem;
}

.page-hero h1 {
	margin-bottom: 0.6rem;
	font-size: clamp(2.35rem, 5.4vw, 4.25rem);
}

.page-hero p {
	max-width: 720px;
	margin: 0;
	color: #e6edf8;
	font-size: 1.15rem;
}

.page-hero-engineering { background-image: url("../images/home/slide-2.jpg"); }
.page-hero-surveying { background-image: url("../images/home/slide-3.jpg"); }
.page-hero-testing { background-image: url("../images/home/slide-4.jpg"); }
.page-hero-projects { background-image: url("../images/home/slide-5.jpg"); }
.page-hero-staff { background-image: url("../images/home/slide-1.jpg"); }
.page-hero-contact { background-image: url("../images/home/slide-1.jpg"); }

.content-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

.content-card {
	padding: clamp(1.5rem, 4vw, 2.25rem);
}

.content-card h2,
.content-card h3 {
	margin-bottom: 1rem;
}

.check-list {
	display: grid;
	gap: 0.7rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.check-list li {
	position: relative;
	padding-left: 1.4rem;
}

.check-list li::before {
	position: absolute;
	top: 0.62em;
	left: 0;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--red);
	content: "";
}

.project-intro {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: 3rem;
	align-items: start;
}

.project-scope {
	padding: 2rem;
	border-left: 4px solid var(--red);
	background: var(--mist);
}

.gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.gallery-item {
	position: relative;
	overflow: hidden;
	min-height: 270px;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: var(--navy);
	cursor: zoom-in;
}

.gallery-item img {
	width: 100%;
	height: 100%;
	min-height: 270px;
	object-fit: cover;
	transition: transform 240ms ease;
}

.gallery-item:hover img {
	transform: scale(1.035);
}

.gallery-item span {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 2.5rem 1rem 1rem;
	color: var(--white);
	background: linear-gradient(transparent, rgba(3, 18, 43, 0.95));
	font-size: 0.94rem;
	font-weight: 800;
	text-align: left;
}

.lightbox {
	width: min(94vw, 117.333vh, 1024px);
	max-width: none;
	max-height: 92vh;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}

.lightbox::backdrop {
	background: rgba(1, 8, 20, 0.9);
	backdrop-filter: blur(5px);
}

.lightbox-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 12px;
	background: #020814;
	box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
	user-select: none;
}

.lightbox-stage > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	-webkit-user-drag: none;
	pointer-events: none;
}

.lightbox-bar {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 3.5rem 1.25rem 1rem;
	color: var(--white);
	background: linear-gradient(transparent, rgba(1, 8, 20, 0.9));
	font-weight: 700;
	pointer-events: none;
}

.lightbox-count {
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
	opacity: 0.8;
}

.lightbox-close,
.lightbox-arrow {
	position: absolute;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	color: var(--white);
	background: rgba(1, 8, 20, 0.62);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(8px);
	cursor: pointer;
	transition: background 160ms ease, transform 160ms ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
	background: rgba(197, 40, 50, 0.94);
	transform: scale(1.06);
}

.lightbox-close svg,
.lightbox-arrow svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.lightbox-close {
	top: 14px;
	right: 14px;
}

.lightbox-arrow {
	top: 50%;
	transform: translateY(-50%);
}

.lightbox-arrow:hover {
	transform: translateY(-50%) scale(1.06);
}

.lightbox-previous {
	left: 14px;
}

.lightbox-next {
	right: 14px;
}

.staff-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

.staff-card {
	display: grid;
	grid-template-columns: 127px minmax(0, 1fr);
	gap: 1.35rem;
	align-items: center;
	padding: 1.35rem;
}

.staff-card img {
	width: 127px;
	height: 175px;
	border-radius: 12px;
	object-fit: cover;
	object-position: center top;
	background: var(--mist);
}

.staff-card-content {
	padding: 0.2rem 0;
}

.staff-card h2 {
	margin-bottom: 0.2rem;
	font-size: 1.45rem;
}

.staff-title {
	margin-bottom: 0;
	color: var(--red);
	font-weight: 800;
}

.contact-section {
	background:
		linear-gradient(180deg, rgba(243, 246, 250, 0.35), rgba(243, 246, 250, 0.9)),
		var(--white);
}

.contact-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
	gap: 1.5rem;
	align-items: start;
}

.contact-card {
	padding: clamp(1.6rem, 4vw, 2.5rem);
}

.contact-form-card {
	border-top: 5px solid var(--red);
}

.contact-form-card h2,
.contact-details-card h2 {
	margin-bottom: 0.65rem;
}

.contact-intro {
	max-width: 620px;
	margin-bottom: 2rem;
	color: var(--muted);
}

.contact-form {
	position: relative;
	margin-top: 0;
}

.form-trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

.form-field {
	display: grid;
	gap: 0.45rem;
}

.form-field-full {
	grid-column: 1 / -1;
}

.form-field label {
	color: var(--navy);
	font-size: 0.9rem;
	font-weight: 800;
}

.form-field label span {
	color: var(--red);
}

.form-field input,
.form-field select,
.form-field textarea {
	width: 100%;
	min-height: 50px;
	padding: 0.75rem 0.85rem;
	border: 1px solid #b8c2d1;
	border-radius: 10px;
	color: var(--ink);
	background: var(--white);
	font: inherit;
	line-height: 1.4;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field textarea {
	min-height: 170px;
	resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
	color: #7b8697;
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
	border-color: #7d8ba0;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
	border-color: var(--blue-bright);
	outline: 0;
	box-shadow: 0 0 0 4px rgba(26, 88, 199, 0.13);
}

.contact-form-footer {
	display: flex;
	align-items: center;
	gap: 1rem 1.25rem;
	margin-top: 1.5rem;
}

.contact-submit {
	border: 0;
	font: inherit;
	cursor: pointer;
}

.contact-submit:disabled {
	cursor: wait;
	opacity: 0.72;
}

.form-verification {
	min-height: 65px;
}

.form-privacy {
	max-width: 330px;
	margin: 0;
	color: var(--muted);
	font-size: 0.82rem;
	line-height: 1.45;
}

.form-status {
	margin: 1.25rem 0 0;
	padding: 0.9rem 1rem;
	border-left: 4px solid var(--blue);
	border-radius: 0 8px 8px 0;
	color: var(--navy);
	background: #e8eef9;
	font-weight: 700;
}

.form-status.is-success {
	border-left-color: #24824b;
	color: #175c36;
	background: #e5f5eb;
}

.form-status.is-error {
	border-left-color: var(--red);
	color: #7d1b22;
	background: #fbeaec;
}

.contact-sidebar {
	display: grid;
	gap: 1.5rem;
}

.contact-list {
	display: grid;
	gap: 1.4rem;
	margin: 0;
}

.contact-list div {
	display: grid;
	gap: 0.2rem;
}

.contact-list dt {
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.contact-list dd {
	margin: 0;
	color: var(--navy);
	font-size: 1.1rem;
	font-weight: 750;
}

.map-card {
	overflow: hidden;
	min-height: 300px;
	padding: 0;
}

.map-card iframe {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 300px;
	border: 0;
}

.site-footer {
	padding-block: 4rem 2rem;
	color: #c9d4e7;
	background: var(--navy);
}

.footer-grid {
	display: grid;
	grid-template-columns: minmax(380px, 1.4fr) repeat(2, minmax(140px, 0.6fr));
	gap: clamp(1.5rem, 4vw, 3rem);
	padding-bottom: 3rem;
}

.footer-logo {
	width: min(100%, 460px);
	margin-bottom: 1.25rem;
	padding: 0.75rem;
	border-radius: 8px;
	background: var(--white);
}

.site-footer h2 {
	margin-bottom: 1rem;
	color: var(--white);
	font-family: inherit;
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.site-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer a {
	color: #e7eef9;
}

.footer-bottom {
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-size: 0.87rem;
}

.footer-bottom p {
	margin: 0;
}

@media (max-width: 1150px) {
	.nav-toggle {
		display: inline-flex;
	}

	.site-nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		display: none;
		padding: 0.75rem 1rem 1rem;
		border-top: 1px solid var(--line);
		background: var(--white);
		box-shadow: 0 18px 30px rgba(7, 27, 58, 0.12);
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav ul {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.site-nav a {
		padding: 0.75rem;
	}

}

@media (max-width: 760px) {
	.topbar .container {
		justify-content: center;
		gap: 0.8rem;
		font-size: 0.76rem;
	}

	.header-main {
		min-height: 78px;
	}

	.brand {
		flex-basis: 280px;
	}

	.hero {
		min-height: 620px;
	}

	.hero::after,
	.page-hero::after {
		background: linear-gradient(90deg, rgba(3, 18, 43, 0.91), rgba(3, 18, 43, 0.58));
	}

	.split,
	.content-grid,
	.project-intro,
	.contact-layout,
	.staff-grid {
		grid-template-columns: 1fr;
	}

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

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

	.cta .container {
		align-items: flex-start;
		flex-direction: column;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}

	.footer-grid > :first-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 520px) {
	.topbar .address-short {
		display: none;
	}

	.service-grid,
	.gallery,
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.form-grid,
	.contact-sidebar {
		grid-template-columns: 1fr;
	}

	.contact-form-footer {
		align-items: stretch;
		flex-direction: column;
	}

	.contact-submit {
		width: 100%;
	}

	.form-privacy {
		max-width: none;
	}

	.footer-grid > :first-child {
		grid-column: auto;
	}

	.gallery-item,
	.gallery-item img {
		min-height: 240px;
	}

	.lightbox {
		width: min(calc(100vw - 1rem), 117.333vh);
	}

	.lightbox-stage {
		border-radius: 8px;
	}

	.lightbox-close,
	.lightbox-arrow {
		width: 42px;
		height: 42px;
	}

	.lightbox-close {
		top: 10px;
		right: 10px;
	}

	.lightbox-previous {
		left: 10px;
	}

	.lightbox-next {
		right: 10px;
	}

	.lightbox-bar {
		padding: 3rem 0.9rem 0.75rem;
		font-size: 0.88rem;
	}

	.staff-card {
		grid-template-columns: 110px minmax(0, 1fr);
		gap: 1rem;
		padding: 1rem;
	}

	.staff-card img {
		width: 110px;
		height: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@keyframes page-fade-out {
	to {
		opacity: 0;
		transform: translateY(-4px);
	}
}

@keyframes page-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}
