:root {
	--bg: #f4f1ea;
	--bg-raised: #fbf9f4;
	--bg-band: #ebe6db;
	--ink: #14171c;
	--ink-soft: #4a4f59;
	--ink-faint: #7b808a;
	--line: #d8d2c4;
	--accent: #c2541b;
	--accent-ink: #fff8f0;
	--teal: #0f6b62;
	--term-bg: #0f1319;
	--term-ink: #d9dde4;
	--term-dim: #7d8696;
	--term-ok: #5fd3a5;
	--term-warn: #f2b84b;
	--term-accent: #ff9b5e;

	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--radius: 14px;
	--wrap: 1160px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0c0f14;
		--bg-raised: #131820;
		--bg-band: #10141b;
		--ink: #ece8df;
		--ink-soft: #b3b6bd;
		--ink-faint: #80858f;
		--line: #252b35;
		--accent: #ff8a4c;
		--accent-ink: #1a0d05;
		--teal: #5fd3c0;
		--term-bg: #080a0e;
		color-scheme: dark;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
}

/* Smooth scrolling only for in-page link clicks (the clicked link holds focus). On load and refresh the jump to a
   #fragment stays instant, so late font swaps or scroll restoration cannot cancel it mid-animation. */
html:focus-within {
	scroll-behavior: smooth;
}

/* Land section content just below the sticky nav (64px): offset = nav + 24px gap - the section's top padding. */
[id] {
	scroll-margin-top: 88px;
}

.section[id] {
	scroll-margin-top: calc(88px - var(--section-pad));
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
	margin: 0;
	font-family: var(--serif);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.015em;
}

p {
	margin: 0;
}

a {
	color: inherit;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

::selection {
	background: var(--accent);
	color: var(--accent-ink);
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 16px;
}

@media (min-width: 720px) {
	.wrap {
		padding: 0 32px;
	}
}

.skip {
	position: absolute;
	left: -9999px;
}

.skip:focus {
	left: 16px;
	top: 16px;
	z-index: 100;
	padding: 8px 14px;
	background: var(--ink);
	color: var(--bg);
	border-radius: 8px;
}

/* Nav */
.nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}

.nav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 64px;
}

.brand {
	display: inline-flex;
	align-items: baseline;
	font-family: var(--mono);
	font-weight: 500;
	font-size: 18px;
	text-decoration: none;
	letter-spacing: -0.01em;
}

.brand {
	align-items: center;
}

.brand__mark {
	width: 26px;
	height: 26px;
	margin-right: 10px;
	border-radius: 7px;
}

.brand--small .brand__mark {
	width: 22px;
	height: 22px;
	margin-right: 8px;
}

.brand__tld {
	color: var(--ink-faint);
}

.brand--small {
	font-size: 15px;
}

.nav__links {
	display: flex;
	align-items: center;
	gap: 4px;
}

.nav__links a {
	display: inline-block;
	padding: 8px 12px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	color: var(--ink-soft);
	border-radius: 999px;
	transition: color 0.15s;
}

.nav__links a:hover {
	color: var(--ink);
}

.nav__links .nav__cta {
	color: var(--accent-ink);
	background: var(--accent);
	padding: 8px 16px;
}

.nav__links .nav__cta:hover {
	color: var(--accent-ink);
	filter: brightness(1.07);
}

@media (max-width: 640px) {
	.nav__links li:not(:last-child) {
		display: none;
	}
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 22px;
	font-family: var(--sans);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	border-radius: 999px;
	border: 1px solid transparent;
	transition:
		transform 0.15s,
		filter 0.15s,
		border-color 0.15s;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn--primary {
	background: var(--accent);
	color: var(--accent-ink);
}

.btn--primary:hover {
	filter: brightness(1.07);
}

.btn--ghost {
	border-color: var(--line);
	color: var(--ink);
}

.btn--ghost:hover {
	border-color: var(--ink-faint);
}

.btn--lg {
	padding: 16px 28px;
	font-size: 17px;
	font-family: var(--mono);
	font-weight: 500;
	word-break: break-all;
}

/* Hero */
.hero {
	position: relative;
	padding: 36px 0 32px;
	overflow: hidden;
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 48px 48px;
	opacity: 0.45;
	mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 10%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 10%, transparent 75%);
	pointer-events: none;
}

.hero__grid {
	position: relative;
	display: grid;
	gap: 48px;
	align-items: center;
}

@media (min-width: 980px) {
	.hero {
		padding: 56px 0 48px;
	}

	.hero__grid {
		grid-template-columns: 1.05fr 1fr;
		gap: 56px;
	}
}

.eyebrow,
.kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.kicker {
	color: var(--accent);
	margin-bottom: 14px;
}

.eyebrow__flower {
	width: 18px;
	height: 18px;
	animation: sway 6s ease-in-out infinite;
}

@keyframes sway {
	50% {
		transform: rotate(30deg);
	}
}

.hero h1 {
	margin: 14px 0 22px;
	font-size: clamp(40px, 6.4vw, 72px);
	font-weight: 350;
}

.hero h1 em {
	font-style: italic;
	color: var(--accent);
}

.lede {
	max-width: 36em;
	font-size: clamp(17px, 1.6vw, 19px);
	color: var(--ink-soft);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

/* Terminal */
.term {
	margin: 0;
	min-width: 0;
	background: var(--term-bg);
	color: var(--term-ink);
	border-radius: var(--radius);
	border: 1px solid color-mix(in srgb, var(--term-ink) 12%, transparent);
	box-shadow:
		0 30px 60px -30px rgb(10 12 18 / 0.55),
		0 0 0 1px rgb(0 0 0 / 0.04);
	overflow: hidden;
}

.term__bar {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 12px 16px;
	border-bottom: 1px solid color-mix(in srgb, var(--term-ink) 10%, transparent);
}

.term__bar > span {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--term-ink) 22%, transparent);
}

.term__title {
	margin-left: 10px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--term-dim);
}

.term__body {
	margin: 0;
	padding: 20px 20px 24px;
	font-family: var(--mono);
	font-size: 12px;
	line-height: 1.85;
	overflow-x: auto;
	white-space: pre;
}

@media (min-width: 520px) {
	.term__body {
		font-size: 14px;
	}
}

.term__body--solo {
	display: inline-block;
	margin-bottom: 32px;
	background: var(--term-bg);
	color: var(--term-ink);
	border-radius: var(--radius);
}

.c-prompt {
	color: var(--term-accent);
}
.c-dim {
	color: var(--term-dim);
}
.c-ok {
	color: var(--term-ok);
}
.c-warn {
	color: var(--term-warn);
}
.c-accent {
	color: var(--term-accent);
}

.caret {
	display: inline-block;
	width: 0.6em;
	height: 1.1em;
	vertical-align: text-bottom;
	background: var(--term-ink);
	animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
	50% {
		opacity: 0;
	}
}

.term__body [data-line] {
	visibility: hidden;
}

.term__body [data-line].is-on {
	visibility: visible;
}

/* Stats */
.stats {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	margin: 64px 0 0;
	border-top: 1px solid var(--line);
}

@media (min-width: 720px) {
	.stats {
		grid-template-columns: repeat(3, 1fr);
	}
}

.stat {
	display: flex;
	flex-direction: column-reverse;
	gap: 4px;
	padding: 24px 0;
	border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
	.stat {
		padding: 28px 24px;
		border-bottom: 0;
	}

	.stat + .stat {
		border-left: 1px solid var(--line);
	}

	.stat:first-child {
		padding-left: 0;
	}
}

.stat dd {
	margin: 0;
	font-family: var(--serif);
	font-size: 44px;
	line-height: 1;
	letter-spacing: -0.02em;
}

.stat dt {
	font-size: 14px;
	color: var(--ink-soft);
}

/* Sections */
.section {
	--section-pad: 88px;
	padding: var(--section-pad) 0;
}

@media (min-width: 980px) {
	.section {
		--section-pad: 120px;
	}
}

.section--band {
	background: var(--bg-band);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.section__head {
	max-width: 720px;
	margin-bottom: 52px;
}

.section h2 {
	font-size: clamp(32px, 4.4vw, 52px);
}

.section h2.h2--sm {
	font-size: clamp(28px, 3.4vw, 40px);
}

.section__lede {
	margin-top: 18px;
	max-width: 38em;
	font-size: 18px;
	color: var(--ink-soft);
}

/* Services */
.services {
	display: grid;
	gap: 16px;
}

@media (min-width: 900px) {
	.services {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}
}

.card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 28px;
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	transition:
		border-color 0.2s,
		transform 0.2s;
}

.card:hover {
	border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
	transform: translateY(-2px);
}

.card__code {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--accent);
}

.card h3 {
	font-size: 26px;
}

.card p:not(.card__code) {
	color: var(--ink-soft);
}

/* Steps */
.steps {
	display: grid;
	gap: 0;
	counter-reset: step;
	border-top: 1px solid var(--line);
}

@media (min-width: 620px) {
	.steps {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 980px) {
	.steps {
		grid-template-columns: repeat(4, 1fr);
	}
}

.step {
	position: relative;
	padding: 28px 0;
	border-bottom: 1px solid var(--line);
}

@media (min-width: 620px) {
	.step {
		padding: 32px 24px 32px 0;
	}

	.step:nth-child(even) {
		padding-left: 24px;
		border-left: 1px solid var(--line);
	}
}

@media (min-width: 980px) {
	.step {
		border-bottom: 0;
	}

	.step + .step {
		padding-left: 24px;
		border-left: 1px solid var(--line);
	}
}

.step__n {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin-bottom: 18px;
	font-family: var(--mono);
	font-size: 14px;
	color: var(--accent-ink);
	background: var(--accent);
	border-radius: 50%;
}

.step h3 {
	font-size: 30px;
	margin-bottom: 10px;
}

.step p {
	color: var(--ink-soft);
	font-size: 16px;
}

/* Split layout */
.split {
	display: grid;
	gap: 40px;
	margin-top: 96px;
}

.wrap.split {
	margin-top: 0;
}

@media (min-width: 900px) {
	.split {
		grid-template-columns: 0.9fr 1.1fr;
		gap: 72px;
		align-items: start;
	}
}

/* Sources */
.sources {
	display: grid;
	gap: 1px;
	background: var(--line);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}

@media (min-width: 620px) {
	.sources {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 980px) {
	.sources {
		grid-template-columns: repeat(3, 1fr);
	}
}

.source {
	padding: 26px;
	background: var(--bg);
}

.source h3 {
	margin-bottom: 14px;
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--teal);
}

.source p {
	font-size: 15px;
	color: var(--ink-soft);
}

/* Deliverables */
.files {
	background: var(--term-bg);
	color: var(--term-ink);
	border-radius: var(--radius);
	padding: 10px 0;
	font-size: 15px;
}

.files li {
	display: grid;
	gap: 2px 20px;
	padding: 14px 24px;
	border-bottom: 1px solid color-mix(in srgb, var(--term-ink) 8%, transparent);
}

.files li:last-child {
	border-bottom: 0;
}

@media (min-width: 560px) {
	.files li {
		grid-template-columns: 150px 1fr;
		align-items: baseline;
	}
}

.files code {
	font-family: var(--mono);
	font-size: 14px;
	color: var(--term-accent);
}

.files span {
	color: var(--term-dim);
}

/* Contact */
.contact {
	text-align: center;
}

.contact__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.contact__flower img {
	display: block;
	width: 96px;
	height: 96px;
	margin-bottom: 20px;
}

.contact h2 {
	max-width: 15em;
}

.contact .section__lede {
	margin-bottom: 36px;
}

/* 404 */
.notfound__flower {
	display: block;
	margin-bottom: 24px;
}

.notfound h1 {
	font-size: clamp(40px, 6vw, 64px);
	margin-bottom: 14px;
}

.notfound .lede {
	margin-bottom: 32px;
}

/* Footer */
.footer {
	border-top: 1px solid var(--line);
	padding: 32px 0;
}

.footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
}

.footer__meta {
	font-size: 14px;
	color: var(--ink-faint);
}

.footer__meta a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.footer__meta a:hover,
.footer__meta a:focus-visible {
	color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}
