/* style-head.css - Above-the-fold styles (mobile-first)
   This file should be inlined or loaded synchronously.
   Contains: Variables, Reset, Base, Header, Nav, Hero, Logo Banner, CTA Button
*/

/* ============================================
   Variables - Mobile defaults
   ============================================ */
:root {
	--color-dark: #0f0f10;
	--color-dark-bg: #0d0d0d;
	--color-white: #ffffff;
	--color-gray-100: #f5f5f5;
	--color-gray-200: #e5e5e5;
	--color-gray-300: #c4c4c4;
	--color-gray-400: #a3a3a3;
	--color-gray-600: #525252;
	--color-primary: #BEB742;
	--color-delta: #31B64F;
	--color-blueprint: #3489CA;
	--color-build: #7F47D6;
	--color-base: #CA7823;
	--color-warning: #EC06F8;
	--color-primary-dark: #3489CA;
	--color-primary-tint: color-mix(in srgb, var(--color-primary) 24%, transparent);
	--color-primary-tint-hover: color-mix(in srgb, var(--color-primary) 36%, transparent);

	--container-width: 1440px;
	--container-padding: 24px;

	/* Mobile defaults */
	--nav-height: 44px;
	--logo-banner-height: 36px;

	--transition: 0.2s ease-out;
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.grecaptcha-badge {
	position: fixed !important;
	left: auto !important;
	top: var(--recaptcha-badge-top, -10000px) !important;
	right: 12px !important;
	bottom: auto !important;
	opacity: 0 !important;
	pointer-events: none;
	transform: translateX(192px) !important;
	transition: opacity 0.2s ease-out, transform 0.28s ease-out !important;
	will-change: transform, opacity;
}

html.recaptcha-badge-positioned .grecaptcha-badge {
	opacity: 0.5 !important;
	pointer-events: auto;
}

html.recaptcha-badge-positioned .grecaptcha-badge:hover {
	transform: translateX(0) !important;
	opacity: 0.9 !important;
}

html.recaptcha-badge-positioned .grecaptcha-badge:focus-within {
	transform: translateX(0) !important;
	opacity: 0.9 !important;
}

/* Prevent CSS reset from affecting SVG text positioning */
svg text,
svg tspan {
	margin: initial;
	padding: initial;
	line-height: initial;
	letter-spacing: initial;
}

/* Disable transitions on page load to prevent layout shift */
.preload *,
.preload *::before,
.preload *::after {
	transition: none !important;
	-webkit-transition: none !important;
}

/* Scroll reveal - initial hidden state (must be in sync CSS to prevent flash) */
.scroll-reveal {
	opacity: 0;
	transform: translateY(50px);
}

/* Hide below-the-fold content until page loads */
.preload #main-content {
	content-visibility: hidden;
	contain-intrinsic-size: 0 5000px;
}

#main-content {
	position: relative;
}

html {
	font-size: 18px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-weight: 300;
	line-height: 1.6;
	letter-spacing: 1px;
	color: var(--color-white);
	background-color: var(--color-dark-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	line-height: 1.2;
	font-weight: 600;
}

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

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

/* ============================================
   CTA Button - needed in header
   ============================================ */
.btn-cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	font-family: 'Roboto Mono', monospace;
	font-size: 14px;
	font-weight: 300;
	line-height: 14px;
	color: var(--color-white);
	background-color: var(--color-primary-tint);
	border: none;
	border-radius: 0;
	cursor: pointer;
	transition: all var(--transition);
	text-transform: uppercase;
	letter-spacing: 0px;
}

.btn-cta__corners {
	position: absolute;
	top: -1px;
	left: -1px;
	right: -1px;
	bottom: -1px;
	pointer-events: none;
	transition: all var(--transition);
}

.btn-cta:hover .btn-cta__corners {
	top: 1px;
	left: 1px;
	right: 1px;
	bottom: 1px;
}

.btn-cta__corners-top,
.btn-cta__corners-bottom {
	position: absolute;
	left: 0;
	right: 0;
}

.btn-cta__corners-top {
	top: 0;
}

.btn-cta__corners-bottom {
	bottom: 0;
}

.btn-cta__corners-top::before,
.btn-cta__corners-top::after,
.btn-cta__corners-bottom::before,
.btn-cta__corners-bottom::after {
	content: '';
	position: absolute;
	width: 8px;
	height: 8px;
	border-color: var(--color-primary);
	border-style: solid;
	transition: border-color var(--transition);
}

.btn-cta__corners-top::before {
	top: 0;
	left: 0;
	border-width: 1px 0 0 1px;
}

.btn-cta__corners-top::after {
	top: 0;
	right: 0;
	border-width: 1px 1px 0 0;
}

.btn-cta__corners-bottom::before {
	bottom: 0;
	left: 0;
	border-width: 0 0 1px 1px;
}

.btn-cta__corners-bottom::after {
	bottom: 0;
	right: 0;
	border-width: 0 1px 1px 0;
}

.btn-cta__arrow {
	display: inline-flex;
	width: 9px;
	height: 9px;
	border-color: var(--color-white);
	border-style: solid;
	border-width: 1px 1px 0 0;
	transform: translateX(-5px) rotate(45deg);
	transition: transform var(--transition), border-color var(--transition);
}

.btn-cta:hover {
	background-color: var(--color-primary-tint-hover);
	color: var(--color-primary);
}

.btn-cta:hover .btn-cta__arrow {
	transform: rotate(45deg) translateX(0px) translateY(-0px);
	border-color: var(--color-primary);
}

/* Dark button variant */
.btn-cta--dark {
	border-color: var(--color-white);
	background: rgba(255, 255, 255, 0.1);
}

.btn-cta--dark .btn-cta__corners-top::before,
.btn-cta--dark .btn-cta__corners-top::after,
.btn-cta--dark .btn-cta__corners-bottom::before,
.btn-cta--dark .btn-cta__corners-bottom::after {
	border-color: var(--color-white);
}

/* ============================================
   Header & Navigation - Mobile first
   ============================================ */
.header {
	background-color: #0d0d0d;
	position: relative;
}

.nav {
	position: sticky;
	top: 0;
	z-index: 100;
	padding: 20px 0;
	border-bottom: 0.5px dashed rgba(255, 255, 255, 0.5);
	background-color: var(--color-dark-bg);
}

.nav__container {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 var(--container-padding);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.nav__logo {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--color-white);
	transition: transform var(--transition);
}

.nav__logo img {
	width: clamp(138px, 42vw, 200px);
	height: auto;
}

.nav__logo:hover {
	transform: scale(1.03);
}

.nav__cta {
	display: flex;
	align-items: center;
}

.nav__cta .btn-cta {
	padding: 10px 12px;
	font-size: 12px;
	line-height: 12px;
	white-space: nowrap;
}

.nav__logo-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background-color: var(--color-white);
	color: var(--color-dark);
	font-weight: 700;
	font-size: 12px;
	border-radius: 4px;
}

.nav__logo-text {
	font-weight: 500;
	font-size: 16px;
}

/* Mobile: hide menu, show toggle */
.nav__menu {
	display: none;
}

.nav__mobile-toggle {
	display: flex;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
	padding: 8px;
}

.nav__mobile-toggle span {
	width: 24px;
	height: 2px;
	background-color: var(--color-white);
}

.nav__arrow {
	display: inline-flex;
	width: 7px;
	height: 7px;
	margin-left: 6px;
	border-color: var(--color-white);
	border-style: solid;
	border-width: 0 1px 1px 0;
	transform: rotate(45deg) translateY(-2px);
}

/* ============================================
   Hero - Mobile first
   ============================================ */
.hero {
	position: relative;
	z-index: 1;
	height: calc(100vh - var(--nav-height) - var(--logo-banner-height));
	height: calc(100svh - var(--nav-height) - var(--logo-banner-height));
	min-height: 500px;
	width: 100%;
	overflow: hidden;
	border-bottom: 0.5px dashed rgba(255, 255, 255, 0.5);
}

.holding .hero {
	height: auto;
	min-height: calc(100svh - var(--nav-height));
	display: flex;
	flex-direction: column;
}

#hero-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	opacity: 0;
	transition: opacity 0.8s ease-out;
}

#hero-canvas.loaded {
	opacity: 1;
}

.hero__container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 42px var(--container-padding) 0;
}

/* Homepage hero - mobile: single column */
.hero:not(.hero--left-only):not(.hero--case-study) .hero__container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	padding-bottom: 32px;
	align-items: start;
	pointer-events: none;
}

.hero:not(.hero--left-only):not(.hero--case-study) .hero__left,
.hero:not(.hero--left-only):not(.hero--case-study) .hero__right {
	pointer-events: auto;
}

.hero:not(.hero--left-only):not(.hero--case-study) .hero__banner {
	pointer-events: auto;
}

.hero__title {
	font-size: 42px;
	font-weight: 400;
	color: var(--color-white);
	line-height: 1.08;
	letter-spacing: -0.02em;
	margin-top: 20px;
}

.hero__description {
	font-size: 14px;
	color: var(--color-white);
	margin-bottom: 32px;
	line-height: 1.7;
}

/* Holding page: tighten hero copy for better line length */
.holding .hero__right p {
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: 0.3px;
	max-width: 85%;
	color: var(--color-gray-300);
	margin-bottom: 20px;
}
.holding .hero__right p .hero__right-emphasis {
	opacity: 2;
	color: var(--color-white);
}

.holding .hero__right .btn-cta--hero {
	margin-left: 0;
	margin-top: 24px;
	padding: 10px 12px;
	font-size: 12px;
	line-height: 12px;
	vertical-align: middle;
}

.holding .hero__container {
	flex: 1 0 auto;
}

/* Hero Banner - Mobile first (relative position in flow) */
.hero__banner {
	position: relative;
	width: calc(100% - 48px);
	margin: 0 auto 24px;
	background-color: rgba(13, 13, 13, 0.85);
	padding: 24px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	text-decoration: none;
	color: inherit;
	transition: background-color var(--transition);
}

.holding .hero__banner {
	margin-top: auto;
}

.hero__banner:hover,
.hero__banner:focus-visible {
	background-color: rgba(13, 13, 13, 1);
}

/* Hero banner corner accents with CTA-style rollover */
.hero__banner-corners {
	position: absolute;
	top: -1px;
	left: -1px;
	right: -1px;
	bottom: -1px;
	pointer-events: none;
	transition: all var(--transition);
}

.hero__banner:hover .hero__banner-corners,
.hero__banner:focus-visible .hero__banner-corners {
	top: 1px;
	left: 1px;
	right: 1px;
	bottom: 1px;
}

.hero__banner-corners-top,
.hero__banner-corners-bottom {
	position: absolute;
	left: 0;
	right: 0;
}

.hero__banner-corners-top {
	top: 0;
}

.hero__banner-corners-bottom {
	bottom: 0;
}

.hero__banner-corners-top::before,
.hero__banner-corners-top::after,
.hero__banner-corners-bottom::before,
.hero__banner-corners-bottom::after {
	content: '';
	position: absolute;
	width: 8px;
	height: 8px;
	border-color: var(--color-delta);
	border-style: solid;
	transition: border-color var(--transition);
}

.hero__banner-corners-top::before {
	top: 0;
	left: 0;
	border-width: 1px 0 0 1px;
}

.hero__banner-corners-top::after {
	top: 0;
	right: 0;
	border-width: 1px 1px 0 0;
}

.hero__banner-corners-bottom::before {
	bottom: 0;
	left: 0;
	border-width: 0 0 1px 1px;
}

.hero__banner-corners-bottom::after {
	bottom: 0;
	right: 0;
	border-width: 0 1px 1px 0;
}

.hero__banner-content {
	flex: 1;
}

.hero__banner-title {
	font-size: 24px;
	font-weight: 400;
	color: var(--color-white);
	margin-bottom: 12px;
	line-height: 1.3;
}

.hero__banner-title-arrow {
	margin-left: 8px;
	transform: translateX(-5px) rotate(45deg);
	vertical-align: middle;
}

.hero__banner:hover .hero__banner-title-arrow,
.hero__banner:focus-visible .hero__banner-title-arrow {
	border-color: var(--color-delta);
	transform: translateX(0) rotate(45deg);
}

.hero__banner-highlight {
	color: var(--color-delta);
}

.hero__banner-description {
	font-size: 13px;
	color: var(--color-gray-300);
	line-height: 1.6;
}

.hero__banner-description span {
	color: var(--color-gray-100);
}

/* ============================================
   Logo Banner - Mobile first
   ============================================ */
.logo-banner {
	background-color: var(--color-dark-bg);
	padding: 24px 0;
	border-bottom: 0.5px dashed rgba(255, 255, 255, 0.5);
	overflow: hidden;
}

.logo-banner__container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 var(--container-padding);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 48px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.logo-banner__container::-webkit-scrollbar {
	display: none;
}

.logo-banner__item {
	color: white;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}

/* ============================================
   Desktop overrides (min-width: 769px)
   ============================================ */
@media (min-width: 769px) {
	:root {
		--container-padding: 42px;
		--nav-height: 80px;
		--logo-banner-height: 72px;
	}

	/* Nav - show menu, hide toggle */
	.nav__menu {
		display: flex;
		align-items: center;
		gap: 32px;
		margin-left: auto;
		margin-right: 32px;
	}

	.nav__menu a {
		position: relative;
		color: var(--color-white);
		font-size: 14px;
		font-weight: 300;
		line-height: 1;
		transition: opacity var(--transition);
	}

	.nav__menu a:hover {
		opacity: 0.7;
	}

	/* Active nav item - use ::after for bold text to prevent layout shift */
	.nav__menu a.is-active {
		color: transparent;
	}

	.nav__menu a.is-active::after {
		content: attr(data-text);
		position: absolute;
		left: 0;
		top: 2px;
		font-size: 14px;
		font-weight: 700;
		line-height: 1;
		letter-spacing: 1px;
		color: var(--color-white);
	}

	.nav__mobile-toggle {
		display: none;
	}

	/* Hero - desktop layout */
	.hero {
		min-height: 567px;
	}

	.holding .hero {
		height: calc(100svh - var(--nav-height));
		min-height: 567px;
		display: block;
	}

	.hero:not(.hero--left-only):not(.hero--case-study) .hero__container {
		grid-template-columns: 1fr 1fr;
		gap: 60px;
		padding-bottom: 0;
	}

	.hero:not(.hero--left-only):not(.hero--case-study) .hero__right {
		max-width: 500px;
	}

	/* Holding page: give the right column more room */
	.holding .hero:not(.hero--left-only):not(.hero--case-study) .hero__container {
		/* Keep content on the left, leave right side for animation */
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		height: 100%;
		/* Reserve space above bottom banner so "middle" means between title and banner */
		padding-bottom: 450px;
		gap: 0;
	}

	.holding .hero:not(.hero--left-only):not(.hero--case-study) .hero__left {
		max-width: 620px;
		/* Keep a consistent minimum gap before body copy on mid-height screens. */
		margin-bottom: clamp(20px, 2.4vh, 30px);
	}

	.holding .hero:not(.hero--left-only):not(.hero--case-study) .hero__right {
		max-width: 620px;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		/* Vertically center between top content and banner region */
		margin-top: auto;
		margin-bottom: auto;
	}

	.hero__title {
		font-size: 78px;
	}

	.hero__description {
		font-size: 16px;
	}

	/* Hero Banner - desktop: absolute positioned at bottom */
	.hero__banner {
		position: absolute;
		bottom: 30px;
		left: 50%;
		transform: translateX(-50%);
		width: calc(100% - 60px);
		max-width: calc(var(--container-width) - 60px);
		margin: 0;
		flex-direction: row;
		align-items: flex-end;
		gap: 40px;
	}

	.hero__banner-title {
		font-size: 32px;
	}

	.hero__banner-description {
		font-size: 14px;
		max-width: 1500px;
	}
}
