@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Poppins&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;

	--black: #1a1a1a;
	--white: #f3fdfd;
	--dark-blue: #025c85;

	--size-h1: clamp(2rem, 8vw, 5rem);
	--size-h2: 1.2rem;
	--size-p: 1rem;
	--size-quote: 1.4rem;

	--serif-font: "DM Serif Display", serif;
}





.placeholder {
	color: darkred;
}




html {
	/* scroll-behavior: smooth; */
	scroll-padding-top: 2em;
}

body {
	min-height: 100vh;
	display: grid;
	place-items: center;
	background-color: var(--white);
	background-image: url("https://www.transparenttextures.com/patterns/noisy.png");
	font-family: "Poppins", sans-serif;
	font-size: 16px;
	color: var(--black);
	counter-reset: num;
	overflow-x: hidden;
}

main {
	width: 100%;
	min-width: 0;
	max-width: 100vw;
}

img {
	width: 100%;
	height: auto;
}

h1,
h2,
h3 {
	font-family: "Montserrat", serif;
	font-weight: 400;
}

h1 {
	font-size: var(--size-h1);
	color: var(--dark-blue);
}

h2 {
	height: min-content;
	font-size: var(--size-h2);
	font-weight: normal;
	margin-bottom: 0.3em;
}

p {
	font-size: var(--size-p);
	line-height: 1.5rem;
	opacity: 0.8;
}

ul {
	padding-left: clamp(1.2rem, 5vw, 2.5rem);
	margin-bottom: 1em;
}

ul.stickyNav {
	list-style-type: none;
}

li {
	margin-bottom: 0.5em;
}

a {
	text-decoration: none;
}





/* scrolling items like ticker feed */
.wrapperHorizontalScrollingItems {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.wrapperHorizontalScrollingItems h2 {
	color: var(--dark-blue);
	font-weight: 600;
	font-size: var(--size-h2);
}

.marquee {
	white-space: nowrap;
	overflow: hidden;
	display: inline-block;
}

.marquee p {
	display: inline-block;
	/* padding-right: 20px; */
	/* Add some spacing between the duplicated items */
}

.wrapperHorizontalScrollingItems .marquee:nth-of-type(1) {
	animation: marquee-rtl 20s linear infinite;
}

.wrapperHorizontalScrollingItems .marquee:nth-of-type(2) {
	animation: marquee-ltr 20s linear infinite;
}

@keyframes marquee-rtl {
	0% {
		transform: translate3d(0, 0, 0);
	}

	100% {
		transform: translate3d(-20%, 0, 0);
	}
}

@keyframes marquee-ltr {
	0% {
		transform: translate3d(-20%, 0, 0);
	}

	100% {
		transform: translate3d(0, 0, 0);
	}
}

/*  */


/* svg icons */
.floated-icon {
	/* Choose where you want the SVG to sit */
	float: left;

	/* Set a defined size */
	width: 3rem;
	height: auto;

	/* Add margin for spacing between the SVG and the text */
	margin-right: .5rem;
	margin-bottom: .5rem;
}



/* collapsible sections */
.collapsible-section {
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	margin-bottom: 16px;
	margin-top: 1em;
	overflow: hidden;
}

.collapsible-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	cursor: pointer;
	user-select: none;
	transition: background 0.2s;
}

.collapsible-header:hover {
	background: #f9f9f9;
}

.collapsible-header h4 {
	margin: 0;
	/* font-size: 1.5rem; */
	color: #333;
}

.chevron {
	width: 24px;
	height: 24px;
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.chevron.expanded {
	transform: rotate(90deg);
}

.collapsible-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.collapsible-content.expanded {
	max-height: 10000px;
}

.content-inner {
	padding: 0 20px 20px 20px;
	color: #666;
	line-height: 1.6;
}


/* end collapsible sections */







article {
	margin: 4em auto;
	width: 100%;
	max-width: 1080px;
	padding: 1em;
	position: relative;
}






article video {
	width: 100%;
}


blockquote {
	padding: 1em 0 1em 1em;
	font-size: var(--size-quote);
	font-family: var(--serif-font);
	position: relative;
}

blockquote span {
	display: block;
	font-family: "Poppins", sans-serif !important;
	font-size: 1rem;
	font-family: inherit;
	text-transform: uppercase;
	margin-top: 0.5em;
}

blockquote::before {
	position: absolute;
	top: -50px;
	left: 0;
	content: "\201C";
	font-size: 8em;
	color: var(--dark-blue);
	opacity: 0.2;
}

/* sticky nav that highlights currently active section */
.stickyNav {
	position: sticky;
	width: min-content;
	top: 0;
	left: 0;
	display: grid;
	grid-template-columns: repeat(3, 8vw);
	padding: 3px;
	justify-items: center;
	align-items: center;
	z-index: 10;
	background-color: var(--dark-blue);
	opacity: 0;
	transition: opacity 0.2s;
}

.stickyNav.show {
	opacity: 1;
}

.item a {
	display: block;
	font-weight: bold;
	color: var(--white);
	opacity: 0.3;
}

.active a {
	opacity: 1;
}

/*  */








.intro,
.middle,
.epilogue,
.final {
	margin-top: 6em;
}

.section {
	display: grid;
	grid-template-columns: 40% 1fr;
	column-gap: 1em;
	position: relative;
	counter-increment: num;
}

.section h2 {
	text-transform: uppercase;
	font-weight: 600;
	color: var(--dark-blue);
}

.section:not(div.blank)::before {
	position: absolute;
	content: "0" counter(num);
	left: 0;
	top: 1.3rem;
	/* top: 2%; */
	font-size: 4rem;
	color: var(--dark-blue);
	opacity: 0.2;
}

.blank {
	counter-reset: num;
}

.blank img {
	grid-column: 2/3;
	margin: 1em 0;
}

.hero {
	display: grid;
	grid-template-columns: 100%;
	/* grid-template-columns: 50% 1fr; */
	column-gap: 1em;
	align-items: center;
	position: relative;
}

.hero div {
	height: min-content;
	padding: 1em 2em 1em 0;
}

.hero h1 {
	font-size: clamp(1.2rem, -7.8rem + 60vw, 1.8rem);
	/* line-height: calc(var(--size-h1) + 0.5rem); */
	font-family: "Poppins", sans-serif;
}

.hero h2 {
	margin: 1em 0 0.3em 0;
	font-size: calc(var(--size-p) + 0.2rem);
}

.intro p {
	/* margin: 2em 0; */
	display: block;
	column-count: 1;
	column-gap: 2em;
}

.intro h2+p {
	margin-top: 0.5em;
}

.intro video {
	max-height: 40vh;
}

.middle p,
.epilogue p,
.final p {
	margin-bottom: 2em;
}

.middle img {
	width: 50%;
	float: left;
	padding-right: 2em;
}

.final p:last-of-type {
	column-count: 2;
	column-gap: 2em;
}

@media (max-width: 700px) {
	article {
		margin: 1em auto;
	}

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

	.hero div {
		margin-bottom: 2em;
	}

	.hero h1 {
		/* font-size: calc(var(--size-h1) - 1rem); */
		font-size: clamp(1.2rem, -13.8rem + 100vw, 1.4rem);
	}

	.section:not(div.blank)::before {
		top: 3%;
		font-size: 4rem;
	}

	.intro p {
		margin: 1em 0;
		column-count: 1;
	}

	.final p:last-of-type {
		column-count: 1;
		column-gap: 1em;
	}
}

@media (max-width: 600px) {
	.hero h1 {
		/* font-size: calc(var(--size-h1) - 2rem);	 */
		font-size: clamp(1.2rem, -13.8rem + 100vw, 1.4rem);
	}

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

	/* .icon-large {
		width: 50%;
		float: left;
		padding-right: 2em;
	} */

	blockquote::before {
		top: -30px;
		font-size: 6em;
	}

	.section h2 {
		margin-bottom: 1em;
	}

	.section:not(div.blank)::before {
		top: -1.5em;
		font-size: 2rem;
	}

	html {
		scroll-padding-top: 5em;
	}
}





footer {
	text-align: center;
	margin-top: 2em;
}











/* Virtual Joystick Styles */
.joystick-zone {
	position: absolute;
	bottom: 20px;
	width: 150px;
	height: 150px;
	z-index: 10;
	touch-action: none;
	/* Prevent scrolling */
}

#joystick-zone-left {
	left: 20px;
}

#joystick-zone-right {
	right: 20px;
}

.joystick-base {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100px;
	height: 100px;
	background: rgba(255, 255, 100, 0.4);
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
}

.joystick-stick {
	position: absolute;
	top: 50%;
	left: 50%;
	margin-top: -25px;
	margin-left: -25px;
	width: 50px;
	height: 50px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	pointer-events: none;
	/* Let touches pass through to zone */
	transition: opacity 0.2s;
	opacity: 0.3;
}

/* Only show on touch devices or when needed */
@media (hover: hover) and (pointer: fine) {
	.joystick-zone {
		display: none;
	}
}



/* threejs multiple scenes support */
.scene-container {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	/* border-bottom: 2px solid #333; */
	overflow: hidden;
	box-sizing: border-box;
	padding: 1em 0;
}

.scene-wrapper {
	width: 100%;
	height: 1320px;
	max-height: 50vh;
	position: relative;
}

canvas {
	display: block;
	/* ensure the canvas never grows wider than its container */
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	box-sizing: border-box;
}

.scene-label {
	position: absolute;
	top: 20px;
	left: 20px;
	font-size: 24px;
	font-weight: bold;
	/* background: rgba(0, 0, 0, 0.7); */
	padding: 10px 20px;
	border-radius: 5px;
	z-index: 10;
}

/*  */
/* layout debugger */
.debug-outlined {
	position: relative;
	/* Ensure the outlined elements are relative for the absolute tooltip position */
}

.debug-outlined:not([data-display="none"])::after {
	content: attr(data-display);
	position: absolute;
	top: -10px;
	/* Position slightly above the border/element */
	left: 50%;
	transform: translateX(-50%) translateY(-100%);
	padding: 2px 6px;
	background-color: rgb(255 255 255 / 95%);
	color: #111827;
	/* Dark text */
	font-size: 10px;
	font-weight: 600;
	border: 1px solid currentColor;
	/* Use the outline color for the border */
	border-radius: 4px;
	white-space: nowrap;
	z-index: 10000;
	/* High z-index to ensure visibility */
	pointer-events: none;
	/* Allows clicks to pass through the tooltip */
	opacity: 0.95;
	transition: opacity 0.1s ease;
}

/* 2-column layout for services section on larger screens */
@media (min-width: 701px) {
	.text-video-grid {
		/* display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2em;
		align-items: center;
		margin-bottom: 2em; */
	}
}