:root {
	--ink: #151616;
	--ink-soft: #1c1e1e;
	--paper: #f1e7c7;
	--muted: #a7aaa6;
	--red: #d8392e;
	--red-bright: #ee4b3d;
	--gold: #d9a900;
	--line: rgba(255, 255, 255, 0.1);
	--page-pad: clamp(20px, 5vw, 72px);
	--radius: 22px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--ink);
	scroll-behavior: smooth;
	scroll-padding-top: 24px;
}

body.site-home {
	min-width: 0;
	overflow-x: hidden;
	background: var(--ink);
	color: var(--muted);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	text-rendering: optimizeLegibility;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.middler {
	width: min(calc(100% - (var(--page-pad) * 2)), 1120px);
	margin-inline: auto;
}

#say-hello {
	position: fixed;
	inset: auto clamp(16px, 3vw, 36px) clamp(16px, 3vw, 36px) auto;
	z-index: 1000;
}

#say-hello a {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 0 20px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: var(--red);
	box-shadow: 0 14px 44px rgba(0, 0, 0, 0.34);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-decoration: none;
	text-transform: uppercase;
	transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

#say-hello a::after {
	content: "Start a project ↗";
}

#say-hello a:hover,
#say-hello a:focus-visible {
	background: var(--red-bright);
	box-shadow: 0 18px 52px rgba(216, 57, 46, 0.3);
	transform: translateY(-3px);
}

#say-hello img {
	display: none;
}

#sky {
	position: relative;
	isolation: isolate;
	height: clamp(500px, 31.25vw, 640px);
	min-height: 500px;
	overflow: hidden;
	background: var(--gold) url("/_ima/sky.jpg") center top / max(100vw, 1600px) auto no-repeat;
}

#sky::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	z-index: 700;
	height: 90px;
	background: linear-gradient(to bottom, transparent, var(--ink));
	pointer-events: none;
}

#sky #bground,
#sky #robot,
#sky #lazer,
#sky #fground {
	position: absolute;
	inset: -3% 0;
	width: 100%;
	height: 106%;
	background-position: center top;
	background-repeat: no-repeat;
	background-attachment: scroll;
	background-size: max(100vw, 1600px) auto;
	will-change: transform;
}

#sky #bground {
	z-index: 300;
	background-image: url("/_ima/bground.png");
}

#sky #robot {
	z-index: 400;
	background-image: url("/_ima/robot.png");
}

#sky #lazer {
	z-index: 450;
	background-image: url("/_ima/lazer.png");
	opacity: 0;
}

#sky #fground {
	z-index: 500;
	background-image: url("/_ima/fground.png");
}

#lazer.is-firing {
	animation: laser-burst 1.9s ease-out both;
}

@keyframes laser-burst {
	0%, 14%, 22%, 30%, 38%, 46%, 100% { opacity: 0; }
	10%, 18%, 26%, 34%, 42% { opacity: 1; }
	58% { opacity: 0.95; }
	78% { opacity: 0; }
}

#mobile-robot {
	display: none;
}

#three {
	position: relative;
	z-index: 5;
	padding: clamp(40px, 5vw, 72px) 0 clamp(64px, 8vw, 112px);
	border-top: 0;
	background: var(--ink);
}

#three .middler {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2.5vw, 30px);
}

#three p {
	position: relative;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: clamp(26px, 3.2vw, 40px);
	float: none;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
	box-shadow: 0 22px 60px rgba(0, 0, 0, 0.16);
	color: #aeb1ae;
	font-size: clamp(14px, 1.2vw, 16px);
}

#three p::before {
	content: "0" counter(story);
	display: block;
	margin-bottom: 38px;
	color: rgba(255, 255, 255, 0.26);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.16em;
}

#three .middler {
	counter-reset: story;
}

#three p {
	counter-increment: story;
}

#three p strong {
	display: inline-block;
	margin-bottom: 13px;
	color: var(--red-bright);
	font-size: clamp(20px, 2.2vw, 30px);
	font-weight: 900;
	letter-spacing: -0.03em;
	line-height: 1;
}

#three p a {
	color: var(--paper);
	font-weight: 700;
	text-decoration-color: var(--red);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.js #three p {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 600ms ease, transform 600ms cubic-bezier(.2, .75, .2, 1);
}

.js #three p:nth-child(2) { transition-delay: 90ms; }
.js #three p:nth-child(3) { transition-delay: 180ms; }

.js #three p.is-visible {
	opacity: 1;
	transform: none;
}

#contact {
	position: relative;
	padding: clamp(72px, 9vw, 128px) 0 clamp(54px, 7vw, 92px);
	overflow: hidden;
	background:
		linear-gradient(90deg, rgba(11, 12, 12, 0.98) 0%, rgba(11, 12, 12, 0.94) 62%, rgba(11, 12, 12, 0.52) 100%),
		url("/_ima/say-hello.jpg") right 10% bottom 12% / min(34vw, 420px) auto no-repeat,
		#0b0c0c;
}

#contact::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 60px 60px;
	mask-image: linear-gradient(to right, #000, transparent 82%);
	pointer-events: none;
}

#contact .middler {
	position: relative;
	padding: 0;
	background: none;
}

#contact form,
#contact .contact-thanks {
	position: relative;
	z-index: 2;
	width: min(100%, 720px);
}

#contact .callus {
	margin: 0 0 clamp(32px, 5vw, 52px);
	padding: 0;
	color: var(--paper);
	font-size: clamp(28px, 4.6vw, 58px);
	font-weight: 900;
	letter-spacing: -0.055em;
	line-height: 0.98;
}

#contact .callus span {
	display: block;
	margin-top: 12px;
	color: #777c77;
	font-size: 0.42em;
	letter-spacing: 0;
	line-height: 1.2;
}

#contact .callus a {
	color: var(--red-bright);
	text-decoration: none;
}

#contact form > label {
	display: block;
	width: auto;
	margin: 20px 0 8px;
	padding: 0;
	float: none;
	color: #d3d5cf;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

#contact .inputs,
#contact .textareas {
	display: block;
	width: 100%;
	margin: 0;
	padding: 15px 17px;
	float: none;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	outline: none;
	background: rgba(255, 255, 255, 0.07);
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-size: 16px;
	transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

#contact .textareas {
	min-height: 150px;
	resize: vertical;
}

#contact .inputs:focus,
#contact .textareas:focus {
	border-color: var(--red-bright);
	background: rgba(255, 255, 255, 0.1);
	box-shadow: 0 0 0 4px rgba(238, 75, 61, 0.12);
}

.human-check {
	margin: 28px 0 0;
	padding: 0;
	border: 0;
}

.human-check legend {
	margin-bottom: 10px;
	color: #d3d5cf;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.radio-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

#contact label.radios {
	display: flex;
	align-items: center;
	gap: 10px;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 13px 14px;
	float: none;
	border: 1px solid rgba(255, 255, 255, 0.13);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.045);
	color: #bfc2bd;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.3;
	transition: border-color 160ms ease, background-color 160ms ease;
}

#contact label.radios:has(input:checked) {
	border-color: var(--red-bright);
	background: rgba(238, 75, 61, 0.11);
	color: #fff;
}

#contact label.radios input {
	flex: 0 0 auto;
	accent-color: var(--red-bright);
}

#contact p.human {
	margin: 10px 0 0;
	padding: 0;
	color: #70746f;
	font-size: 12px;
}

#submit {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: min(100%, 420px);
	min-height: 58px;
	margin: 30px 0 0;
	padding: 0 20px;
	border: 0;
	border-radius: 12px;
	background: var(--red);
	box-shadow: 0 12px 36px rgba(216, 57, 46, 0.18);
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-align: left;
	transition: transform 180ms ease, background-color 180ms ease;
}

#submit:hover,
#submit:focus-visible {
	background: var(--red-bright);
	transform: translateY(-2px);
}

#submit:disabled {
	cursor: wait;
	opacity: 0.64;
	transform: none;
}

.contact-thanks > p:not(.address) {
	margin: 0;
	color: var(--paper);
}

.form-errors {
	margin: 0 0 28px;
	padding: 14px 16px;
	border: 1px solid var(--red-bright);
	border-radius: 12px;
	background: rgba(238, 75, 61, 0.11);
	color: var(--paper);
	font-size: 13px;
}

.form-errors strong {
	color: #fff;
}

/* honeypot: off-screen for people, still there for bots */
.hp-field {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

.form-status {
	min-height: 24px;
	margin: 14px 0 0;
	color: var(--paper);
	font-size: 13px;
}

#thanks {
	position: fixed;
	left: 50%;
	bottom: 26px;
	z-index: 1200;
	width: min(calc(100vw - 40px), 560px);
	height: auto;
	padding: 18px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 18px;
	background: #121313;
	box-shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
	transform: translateX(-50%);
}

#thanks[hidden] {
	display: none;
}

#thanks img {
	display: block;
	width: 100%;
	height: auto;
}

p.address {
	margin: 68px 0 0;
	padding: 22px 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	color: #555a56;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-align: left;
	text-transform: uppercase;
}

@media (max-width: 900px) {
	#three .middler {
		grid-template-columns: 1fr;
	}

	#three p::before {
		margin-bottom: 24px;
	}

	#contact {
		background:
			linear-gradient(rgba(11, 12, 12, 0.94), rgba(11, 12, 12, 0.98)),
			url("/_ima/say-hello.jpg") right -40px bottom 40px / 270px auto no-repeat,
			#0b0c0c;
	}
}

@media (max-width: 960px) {
	#sky {
		height: auto;
		min-height: 240px;
		aspect-ratio: 1200 / 551;
		background: var(--gold) url("/_ima/mobile-robot.gif") center / cover no-repeat;
	}

	#sky #bground,
	#sky #robot,
	#sky #lazer,
	#sky #fground {
		display: none;
	}
}

@media (max-width: 760px) {
	:root {
		--page-pad: 20px;
		--radius: 18px;
	}

	#say-hello a {
		min-height: 48px;
		padding-inline: 17px;
		font-size: 11px;
	}

	#three {
		padding-block: 56px;
	}

	#three p {
		padding: 27px;
		font-size: 15px;
	}

	.js #three p {
		opacity: 1;
		transform: none;
	}

	.radio-grid {
		grid-template-columns: 1fr;
	}

	#contact {
		padding-top: 64px;
		background: #0b0c0c;
	}

	#contact::before {
		mask-image: linear-gradient(to bottom, #000, transparent 90%);
	}

	#contact .callus span {
		font-size: 0.48em;
	}

	#submit {
		width: 100%;
	}
}

@media (max-width: 430px) {
	#sky {
		min-height: 222px;
	}

	#say-hello {
		inset: auto 12px 12px auto;
	}

	#say-hello a::after {
		content: "Say hello ↗";
	}

	#contact .callus {
		font-size: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}

	#sky #bground,
	#sky #robot,
	#sky #lazer,
	#sky #fground {
		transform: none !important;
	}

	.js #three p {
		opacity: 1;
		transform: none;
	}
}
