/* site.css — the entry site's own layout sheet.
 *
 * Every brand-carrying value — color, radius, font, easing, the red press
 * signal — resolves through the design-system bundle's marketing token
 * layer (colors_and_type.css, linked beside this sheet): --basalt-*,
 * --circuit-*, --accent-*, --text-*, --pastel-gold, --border, --radius*,
 * --font-*, --liquid-ease. The bundle's token header scopes --app-* to
 * Canvas product chrome; marketing surfaces use this layer. The remaining
 * literals are layout geometry (widths, paddings, blur radii) and neutral
 * shadow overlays (pure black/white alpha, no hue) — never a brand value.
 * Visual foundations follow the bundle README: layered basalt background +
 * grain, glass surfaces, two co-leading brand colors, red press signal,
 * no emoji, reduced-motion honored. */

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background:
		radial-gradient(ellipse 80% 60% at 50% 30%, rgb(var(--basalt-surface) / 0.55), transparent 70%),
		rgb(var(--basalt-deep));
	color: rgb(var(--text));
	font-family: var(--font-inter);
	line-height: 1.6;
	min-height: 100vh;
}

body::before {
	/* film grain — SVG fractal noise, the bundle README's layered background */
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	opacity: var(--grain-opacity);
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	z-index: 0;
}

::selection {
	background: var(--accent-red-dim);
}

main {
	position: relative;
	z-index: 1;
}

/* ---- nav (fixed glass chrome, h-16 mobile / h-20 desktop) ---- */

.nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 4rem;
	padding: 0 1.5rem;
	background: rgb(var(--basalt-surface) / 0.6);
	backdrop-filter: blur(24px);
	border-bottom: 1px solid var(--border);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
	transition: border-color 200ms var(--liquid-ease);
}

.nav-brand {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	text-decoration: none;
}

.nav-mark {
	width: 28px;
	height: 28px;
	display: block;
}

.nav-wordmark {
	color: rgb(var(--text));
	font-weight: 800;
	letter-spacing: -0.02em;
}

.nav-links {
	display: flex;
	gap: 1.5rem;
}

.nav-links a {
	font-family: var(--font-jetbrains);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: rgb(var(--text-muted));
	transition: color 200ms var(--liquid-ease);
}

.nav-links a:hover {
	color: rgb(var(--circuit-glow));
}

/* ---- type ---- */

.overline {
	font-family: var(--font-jetbrains);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgb(var(--circuit-glow));
	margin: 0 0 1rem;
}

.display {
	font-size: clamp(2.75rem, 7vw, 5.5rem);
	line-height: 1.02;
	font-weight: 900;
	letter-spacing: -0.05em;
	text-transform: uppercase;
	margin: 0 0 1.25rem;
}

.display-sm {
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	line-height: 1.1;
	font-weight: 900;
	letter-spacing: -0.04em;
	text-transform: uppercase;
	margin: 0 0 0.75rem;
}

.dot {
	/* the trailing period on display headings is the red co-lead */
	color: rgb(var(--accent-red));
}

.section-sub {
	color: rgb(var(--text-muted));
	margin: 0 0 2.5rem;
}

/* ---- hero ---- */

.hero {
	max-width: 1600px;
	margin: 0 auto;
	padding: clamp(8rem, 18vh, 12rem) 1.5rem clamp(4rem, 8vw, 8rem);
}

.pulse {
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: rgb(var(--circuit-glow));
	margin-right: 0.625rem;
	animation: pulse-dot 3s var(--liquid-ease) infinite;
}

@keyframes pulse-dot {
	0%,
	100% {
		opacity: 1;
		box-shadow: 0 0 0 0 rgb(var(--circuit-glow) / 0.4);
	}
	50% {
		opacity: 0.6;
		box-shadow: 0 0 0 6px rgb(var(--circuit-glow) / 0);
	}
}

.hero-sub {
	font-size: clamp(1.125rem, 2vw, 1.375rem);
	color: rgb(var(--text));
	margin: 0 0 0.75rem;
}

.hero-body {
	color: rgb(var(--text-muted));
	max-width: 42rem;
	margin: 0 0 2.5rem;
}

.hero-ctas {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

/* ---- buttons (solid circuit carries black ink; press = the red signal) ---- */

.btn {
	display: inline-block;
	font-family: var(--font-jetbrains);
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: var(--radius-btn);
	padding: 0.75rem 1.5rem;
	border: 1px solid transparent;
	transition:
		transform 200ms var(--liquid-ease),
		box-shadow 200ms var(--liquid-ease),
		border-color 200ms var(--liquid-ease),
		color 200ms var(--liquid-ease);
}

.btn-primary {
	background: rgb(var(--circuit-glow));
	color: rgb(var(--basalt-deep));
}

.btn-primary:hover {
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px var(--circuit-dim);
	transform: translateY(-2px);
}

.btn-primary:active {
	box-shadow: -4px 4px 0 rgb(var(--accent-red));
	transform: translateY(0);
}

.btn-ghost {
	border-color: rgb(var(--circuit-glow) / 0.4);
	color: rgb(var(--circuit-glow));
}

.btn-ghost:hover {
	border-color: rgb(var(--circuit-glow));
}

.btn-ghost:active {
	box-shadow: -4px 4px 0 rgb(var(--accent-red));
}

/* ---- estate sections ---- */

.estate,
.company {
	max-width: 1600px;
	margin: 0 auto;
	padding: clamp(4rem, 8vw, 8rem) 1.5rem;
}

.roots {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
	gap: 1rem;
	margin: 0 0 2rem;
}

.door-group {
	margin: 0 0 3rem;
}

.door-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	gap: 1rem;
}

.door {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.25rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	text-decoration: none;
	color: rgb(var(--text));
	background: rgb(var(--basalt-surface) / 0.35);
	transition:
		border-color 300ms var(--liquid-ease),
		background 300ms var(--liquid-ease),
		transform 300ms var(--liquid-ease),
		box-shadow 300ms var(--liquid-ease);
}

a.door:hover {
	border-color: rgb(var(--circuit-glow) / 0.15);
	background: rgb(var(--basalt-surface) / 0.6);
	transform: translateY(-4px);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px var(--circuit-dim);
}

.door-host {
	font-family: var(--font-jetbrains);
	font-size: 1rem;
	font-weight: 500;
	color: rgb(var(--text));
	overflow-wrap: anywhere;
}

a.door:hover .door-host {
	color: rgb(var(--circuit-glow));
}

.door-kind {
	align-self: flex-start;
	font-family: var(--font-jetbrains);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgb(var(--text-muted));
	border: 1px solid var(--border);
	border-radius: 9999px;
	padding: 0.125rem 0.625rem;
}

.door-rule {
	height: 1px;
	background: linear-gradient(to right, rgb(var(--circuit-glow) / 0.35), transparent);
	border: 0;
	margin: 0.25rem 0;
}

.door-blurb {
	font-size: 0.9375rem;
	color: rgb(var(--text-muted));
	margin: 0;
}

.door-note {
	font-family: var(--font-jetbrains);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgb(var(--pastel-gold));
}

.door-root {
	background: rgb(var(--basalt-surface) / 0.6);
	border-color: rgb(var(--circuit-glow) / 0.2);
}

.link {
	color: rgb(var(--circuit-glow));
	text-decoration: none;
	border-bottom: 1px solid rgb(var(--circuit-glow) / 0.35);
	transition: border-color 200ms var(--liquid-ease);
}

.link:hover {
	border-color: rgb(var(--circuit-glow));
}

/* ---- company + footer ---- */

.company-body {
	color: rgb(var(--text-muted));
	max-width: 46rem;
	margin: 0 0 1rem;
}

.footer {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	max-width: 1600px;
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
	border-top: 1px solid var(--border);
}

.footer-line {
	font-family: var(--font-jetbrains);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgb(var(--text-muted));
}

/* ---- 404 ---- */

.lost {
	max-width: 60rem;
	margin: 0 auto;
	padding: clamp(8rem, 20vh, 14rem) 1.5rem 4rem;
}

/* ---- motion discipline (bundle README: decorative animation dies under
   prefers-reduced-motion; transitions clamp to 150ms) ---- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.pulse {
		animation: none;
	}

	* {
		transition-duration: 150ms !important;
		animation-duration: 150ms !important;
	}
}
