/* UBD Global styles */

:root {
	--color-navy: #14213D;
	--color-white: #FFFFFF;
	--color-text-soft: #454E5E; /* softened navy-charcoal for body copy, instead of pure black/navy */
	--font-serif: "Cormorant Garamond", Georgia, "Times New Roman", Times, serif;
	--font-sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--font-heading: "Metropolis", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--section-padding: 48px;
	--divider-gap: 48px;
	--border-bar-width: 3cm;
	--sticky-nav-offset: 80px;

	/* Technical-drawing watermark (behind all content) */
	--watermark-image: url("../img/techdraw.png");
	--watermark-opacity: 0.15;
	--watermark-tile-size: 600px auto; /* size of one tile; smaller than viewport keeps it sharp instead of upscaled */
	--watermark-repeat: no-repeat;     /* set to "repeat" to tile the watermark again */
	--watermark-position: center;
	--watermark-tint-rgb: 20, 33, 61;  /* navy, for optional tint */
	--watermark-tint-opacity: 0;       /* 0 = off; raise (e.g. 0.1) for a subtle navy wash over the image */
}

@font-face {
	font-family: 'Metropolis';
	src: url('../fonts/Metropolis-Regular.otf') format('opentype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

html, body {
	margin: 0;
	padding: 0;
	color: var(--color-navy);
	font-family: var(--font-sans);
}

html {
	background-color: var(--color-white);
}

body {
	background-color: transparent;
}

body::before,
body::after {
	content: "";
	position: fixed;
	top: 0;
	height: 100vh;
	width: var(--border-bar-width);
	background-color: var(--color-navy);
	z-index: 1000;
	pointer-events: none;
}

body::before {
	left: 0;
}

body::after {
	right: 0;
}

/* Technical-drawing watermark: fixed, behind all page content and border bars */
html::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	opacity: var(--watermark-opacity);
	background-image:
		linear-gradient(rgba(var(--watermark-tint-rgb), var(--watermark-tint-opacity)), rgba(var(--watermark-tint-rgb), var(--watermark-tint-opacity))),
		var(--watermark-image);
	background-repeat: no-repeat, var(--watermark-repeat);
	background-size: 100% 100%, var(--watermark-tile-size);
	background-position: center, var(--watermark-position);
}

h1, h2, h3 {
	font-family: var(--font-serif);
	color: var(--color-navy);
	font-weight: 600;
	font-size: 2.1rem;
	letter-spacing: 0.5px;
	margin: 0 0 32px 0;
}

/* Section headings set in Metropolis instead of the default serif.
   Only the Regular (400) weight file is loaded, so the browser synthesizes
   (faux-)bold for this 700 weight to preserve prior visual prominence. */
.heading-metropolis {
	font-family: var(--font-heading);
	font-weight: 700;
}

#team h2,
#about h2,
#awards h2,
#clients h2,
#portfolio h2,
#contact h2 {
	text-align: center;
}

#founder,
#team,
#about,
#awards,
#clients,
#portfolio,
#contact {
	scroll-margin-top: var(--sticky-nav-offset);
}

.founder-title {
	font-family: var(--font-sans);
	color: var(--color-navy);
	font-size: 13px;
	font-weight: 300;
	letter-spacing: 3px;
	text-transform: uppercase;
	margin: 0 0 12px 0;
}

.founder-name {
	font-size: 4.5em;
	margin: 0 0 20px 0;
}

p {
	font-family: var(--font-sans);
	font-weight: 400;
	line-height: 1.75;
	max-width: 640px;
}

section {
	padding: var(--section-padding) 40px;
	max-width: 1100px;
	margin: 0 auto;
}

#founder {
	padding-top: 24px;
}

/* Hero */
.hero {
	height: 100vh;
	max-width: none;
	margin: 0;
	padding: 0 40px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 48px;
	background-color: transparent;
	text-align: center;
}

.hero-logo {
	width: clamp(160px, 36vw, 480px);
	max-width: calc(100vw - (2 * var(--border-bar-width)) - 48px);
	height: auto;
	animation: hero-logo-entrance 1.4s cubic-bezier(0.16, 1, 0.3, 1);
	filter:
		drop-shadow(0 0 30px rgba(255, 255, 255, 0.9))
		drop-shadow(0 0 60px rgba(255, 255, 255, 0.7))
		drop-shadow(0 0 100px rgba(255, 255, 255, 0.5))
		drop-shadow(0 0 150px rgba(255, 255, 255, 0.3));
}

@keyframes hero-logo-entrance {
	from {
		opacity: 0;
		transform: scale(0.92);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.hero-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 16px 48px;
	max-width: calc(100vw - (2 * var(--border-bar-width)) - 48px);
	animation: hero-logo-entrance 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-nav a,
.sticky-nav a {
	display: inline-block;
	font-family: var(--font-sans);
	font-size: 13px;
	font-weight: 300;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--color-navy);
	text-decoration: none;
	position: relative;
	padding-bottom: 4px;
	opacity: 0.8;
	transform: scale(1);
	transform-origin: center bottom;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), letter-spacing 0.3s ease;
}

.hero-nav a::after,
.sticky-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background-color: var(--color-navy);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.hero-nav a:hover,
.sticky-nav a:hover {
	opacity: 1;
	transform: scale(1.12);
}

.hero-nav a:hover::after,
.sticky-nav a:hover::after {
	transform: scaleX(1);
}

/* Sticky nav bar (appears once the hero scrolls out of view) */
.sticky-nav {
	position: fixed;
	top: 0;
	left: var(--border-bar-width);
	right: var(--border-bar-width);
	z-index: 500;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px 40px;
	padding: 20px 24px;
	background-color: var(--color-white);
	border-bottom: 1px solid rgba(20, 33, 61, 0.08);
	box-shadow: 0 8px 24px rgba(20, 33, 61, 0.06);
	opacity: 0;
	transform: translateY(-12px);
	pointer-events: none;
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.sticky-nav.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* Header logo (scrolls away with the page — not fixed/sticky) */
.site-header {
	display: none;
	position: absolute;
	top: calc(100vh + 24px);
	right: calc(3cm + 40px);
	max-width: none;
	margin: 0;
	padding: 0;
	background-color: transparent;
	z-index: 5;
}

.site-header .logo {
	width: 200px;
	height: auto;
	opacity: 0;
}

/* Scroll reveal */
.reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

section.in-view .reveal {
	opacity: 1;
	transform: translateY(0);
}

/* Section dividers */
.section-divider {
	width: 48px;
	height: 2px;
	margin: var(--divider-gap) auto;
	background-color: var(--color-navy);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-divider.in-view {
	opacity: 1;
	transform: translateY(0);
}

/* Placeholder boxes */
.placeholder-box {
	border: 1px solid var(--color-navy);
	border-radius: 12px;
	color: var(--color-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 14px;
}

.placeholder-photo {
	width: 100%;
	max-width: 480px;
	height: 320px;
	margin-bottom: 32px;
	object-fit: cover;
	object-position: center top;
}

/* Founder two-column layout */
.founder-columns {
	display: flex;
	align-items: stretch;
	gap: 48px;
}

.founder-photo-col {
	flex: 0 0 38%;
	max-width: 38%;
	position: relative;
}

.founder-text-col {
	flex: 1 1 62%;
}

.founder-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	margin-bottom: 0;
}

.founder-text-col p {
	max-width: 65ch;
	line-height: 1.8;
	margin: 0 0 24px 0;
}

.founder-text-col p:last-child {
	margin-bottom: 0;
}

/* About section — editorial redesign */
#about {
	padding-top: 50px;
	padding-bottom: 60px;
}

.about-photo-frame {
	position: relative;
	left: 50%;
	width: calc(100vw - (2 * var(--border-bar-width)));
	margin-left: calc(-50vw + var(--border-bar-width));
	margin-top: 40px;
	margin-bottom: 56px;
	overflow: hidden;
}

.about-photo {
	display: block;
	width: 100%;
	height: auto;
}

.team-photo-full-frame {
	position: relative;
	left: 50%;
	width: calc(100vw - (2 * var(--border-bar-width)));
	margin-left: calc(-50vw + var(--border-bar-width));
	margin-top: 40px;
	margin-bottom: 56px;
}

.team-photo-full {
	display: block;
	width: 100%;
	height: auto;
}

.about-columns {
	display: flex;
	gap: 64px;
	align-items: flex-start;
}

.about-col {
	flex: 1 1 0;
	min-width: 0;
}

.about-col-heading {
	font-family: var(--font-sans);
	color: var(--color-navy);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 3px;
	text-transform: uppercase;
	margin: 0 0 20px 0;
}

.about-copy {
	max-width: 600px;
	line-height: 1.85;
	color: var(--color-text-soft);
	margin: 0 0 24px 0;
}

.about-copy:last-of-type {
	margin-bottom: 0;
}

/* Founder statement / quote */
.about-quote {
	max-width: 720px;
	margin: 112px auto 0 auto;
	padding: 0 24px;
	text-align: center;
}

.about-quote p {
	max-width: none;
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.8rem, 3.2vw, 2.6rem);
	line-height: 1.45;
	color: var(--color-navy);
	margin: 0;
}

.team-photo-frame {
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	margin: 0 auto 16px auto;
	cursor: pointer;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.team-member:hover .team-photo-frame {
	transform: translateY(-12px) scale(1.07);
	box-shadow: 0 18px 30px rgba(20, 33, 61, 0.18);
}

.team-photo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transform: scale(var(--zoom, 1));
	transform-origin: center top;
}

.placeholder-text {
	color: var(--color-navy);
}

/* Hover intrigue on images */
.placeholder-photo {
	cursor: pointer;
}

.placeholder-photo:hover {
	transform: scale(1.03);
}

/* Grayscale-to-color hover: Founder, About Us, and Our Team photos only.
   -webkit-filter is included alongside filter for older Safari; the color
   state is also mirrored on an `.is-color` class (toggled via JS mouseenter/
   mouseleave in main.js) rather than relying solely on :hover, since Safari's
   trackpad/touch handling can leave :hover stuck on or fail to engage it. */
.about-photo,
.team-photo-full,
.team-photo {
	-webkit-filter: grayscale(100%);
	filter: grayscale(100%);
	transition: -webkit-filter 0.6s ease-in-out, filter 0.6s ease-in-out;
}

/* founder-photo also carries the .placeholder-photo scale-on-hover, so its
   transition must declare both properties in one rule - a separate/competing
   `transition` declaration on :hover would replace this list wholesale
   instead of merging with it, silently dropping whichever property isn't
   repeated and breaking that property's animation. */
.founder-photo {
	-webkit-filter: grayscale(100%);
	filter: grayscale(100%);
	transition: -webkit-filter 0.6s ease-in-out, filter 0.6s ease-in-out, transform 0.4s ease;
}

.founder-photo:hover,
.founder-photo.is-color,
.about-photo:hover,
.about-photo.is-color,
.team-photo-full:hover,
.team-photo-full.is-color,
.team-member:hover .team-photo,
.team-member.is-color .team-photo {
	-webkit-filter: grayscale(0%);
	filter: grayscale(0%);
}

/* Team grid */
#team {
	max-width: min(1600px, calc(100vw - (2 * var(--border-bar-width)) - 80px));
}

.team-carousel {
	display: block;
}

.team-track-wrap {
	overflow: visible;
}

.team-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
}

.team-member {
	text-align: center;
}

.team-name {
	font-family: var(--font-serif);
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.4px;
	color: var(--color-navy);
	margin: 0 0 2px 0;
}

.team-role {
	font-family: var(--font-sans);
	font-size: 13px;
	font-weight: 400;
	color: rgba(20, 33, 61, 0.65);
	margin: 0;
}

.team-arrow {
	display: none;
}

/* Awards grid */
.awards-marquee {
	overflow: hidden;
	position: relative;
	left: 50%;
	width: calc(100vw - (2 * var(--border-bar-width)));
	margin-left: calc(-50vw + var(--border-bar-width));
	padding: 24px 0;
}

.awards-track {
	display: flex;
	align-items: center;
	width: max-content;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.awards-track.is-dragging {
	cursor: grabbing;
}

.award-logo {
	flex: 0 0 auto;
	height: 100px;
	width: auto;
	display: block;
	margin-right: 64px;
	mix-blend-mode: multiply;
	transition: transform 0.3s ease;
	-webkit-user-drag: none;
}

.award-logo:hover {
	transform: scale(1.08);
}

/* Portfolio request form */
.form-intro {
	max-width: 480px;
	margin: 0 auto 48px auto;
	text-align: center;
	color: var(--color-navy);
}

.request-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 600px;
	margin: 0 auto;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-align: left;
}

.form-field label {
	font-family: var(--font-sans);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--color-navy);
}

.form-field input,
.form-field select,
.form-field textarea {
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: 300;
	color: var(--color-navy);
	background-color: var(--color-white);
	border: 1px solid rgba(20, 33, 61, 0.3);
	border-radius: 12px;
	padding: 14px 18px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-field input::placeholder,
.form-field textarea::placeholder {
	color: rgba(20, 33, 61, 0.4);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
	outline: none;
	border-color: var(--color-navy);
	box-shadow: 0 0 0 3px rgba(20, 33, 61, 0.08);
}

.form-submit {
	align-self: center;
	margin-top: 8px;
	padding: 16px 48px;
	background-color: var(--color-navy);
	color: var(--color-white);
	border: 1px solid var(--color-navy);
	border-radius: 12px;
	font-family: var(--font-sans);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 3px;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.form-submit:hover {
	background-color: #1f2f52;
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(20, 33, 61, 0.18);
}

/* Contact details */
.contact-details {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}

.contact-details p {
	margin: 0;
}

.contact-link {
	font-family: var(--font-sans);
	font-size: 18px;
	font-weight: 300;
	letter-spacing: 0.5px;
	color: var(--color-navy);
	text-decoration: none;
	position: relative;
	padding-bottom: 4px;
	opacity: 0.85;
	transition: opacity 0.3s ease;
}

.contact-link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: 0;
	height: 1px;
	background-color: var(--color-navy);
	transition: right 0.3s ease;
}

.contact-link:hover {
	opacity: 1;
}

.contact-link:hover::after {
	right: 0;
}

/* Clients marquee */
.clients-marquee {
	overflow: hidden;
	position: relative;
	left: 50%;
	width: calc(100vw - (2 * var(--border-bar-width)));
	margin-left: calc(-50vw + var(--border-bar-width));
	padding: 24px 0;
}

.clients-track {
	display: flex;
	align-items: center;
	width: max-content;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.clients-track.is-dragging {
	cursor: grabbing;
}

.client-logo {
	flex: 0 0 auto;
	height: 94px;
	width: auto;
	display: block;
	margin-right: 64px;
	mix-blend-mode: multiply;
	transition: transform 0.3s ease;
	-webkit-user-drag: none;
}

.client-logo:hover {
	transform: scale(1.15);
}

.client-logo-large {
	height: 117.5px;
}

@media (min-width: 768px) and (max-width: 900px) {
	.team-carousel {
		display: flex;
		align-items: center;
		gap: 12px;
	}

	.team-track-wrap {
		flex: 1 1 auto;
		overflow: hidden;
	}

	.team-grid {
		display: flex;
		flex-wrap: nowrap;
		gap: 32px;
		width: max-content;
		transition: transform 0.4s ease;
	}

	.team-member {
		flex: 0 0 150px;
		width: 150px;
	}

	.team-arrow {
		display: flex;
		flex: 0 0 auto;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		border: 1px solid var(--color-navy);
		border-radius: 50%;
		background-color: var(--color-white);
		color: var(--color-navy);
		font-size: 18px;
		line-height: 1;
		padding: 0;
		cursor: pointer;
	}

	.team-arrow:disabled {
		opacity: 0.3;
		cursor: default;
	}
}

/* Mobile: static 2-column grid instead of the swipeable carousel */
@media (max-width: 767px) {
	.team-carousel {
		display: block;
	}

	.team-track-wrap {
		overflow: visible;
	}

	.team-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 28px 16px;
		width: auto;
		transform: none !important;
	}

	.team-member {
		width: auto;
	}

	.team-arrow {
		display: none;
	}
}

@media (max-width: 900px) {
	:root {
		--border-bar-width: 0.8cm;
	}

}

@media (max-width: 768px) {
	:root {
		--border-bar-width: 16px;
		--sticky-nav-offset: 64px;
		/* techdraw.png is native ~1086px wide; the desktop 600px tile overflows
		   a 360-430px mobile viewport and reads as an oversized, cropped-in
		   zoom. Scaling the tile itself down (rather than switching to
		   background-size: cover, which would crop it further) keeps it well
		   inside the native resolution, so it stays just as sharp. */
		--watermark-tile-size: 280px auto;
	}

	section {
		padding: 80px 24px;
	}

	.hero {
		padding: 0 24px;
	}

	.hero-nav {
		gap: 10px 24px;
	}

	.hero-nav a,
	.sticky-nav a {
		font-size: 12px;
		letter-spacing: 1.5px;
	}

	.sticky-nav {
		gap: 8px 20px;
		padding: 14px 16px;
	}

	.founder-columns {
		flex-direction: column;
		gap: 32px;
	}

	.founder-name {
		font-size: 2.6rem;
	}

	.founder-photo-col,
	.founder-text-col {
		flex: 1 1 100%;
		max-width: 100%;
	}

	.founder-photo-col {
		position: static;
	}

	.founder-photo {
		position: static;
		width: 100%;
		height: auto;
		object-fit: contain;
	}

	#about {
		padding-top: 34px;
		padding-bottom: 44px;
	}

	.about-columns {
		flex-direction: column;
		gap: 40px;
	}

	.about-photo-frame {
		margin-top: 28px;
		margin-bottom: 40px;
	}

	.team-photo-full-frame {
		margin-top: 28px;
		margin-bottom: 40px;
	}

	.about-quote {
		margin: 80px auto 0 auto;
	}

	.client-logo {
		height: 64px;
		margin-right: 40px;
	}

	.client-logo-large {
		height: 80px;
	}

	.award-logo {
		height: 64px;
		margin-right: 40px;
	}
}

@media (max-width: 500px) {
	:root {
		--border-bar-width: 6px;
	}
}
