/* Self-hosted fonts (latin subset, woff2) — replaces Google Fonts CDN.
   Preloaded in BaseLayout: Source Serif 4 400 (body) + JetBrains Mono 500 (labels). */

@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/static/fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("/static/fonts/source-serif-4-latin-500-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("/static/fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/static/fonts/source-serif-4-latin-700-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Source Serif 4";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("/static/fonts/source-serif-4-latin-400-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/static/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("/static/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("/static/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/static/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metrics-matched fallback faces: while the woff2 files are still loading
   (font-display: swap), the local fallback renders with the web font's
   proportions instead of its own, so the font swap does not reflow the page.
   size-adjust was calibrated on the site's own text (scripts/audit/font_probe.py
   harvests real text runs and ratios webfont/fallback widths) because the
   OS/2 xAvgCharWidth heuristic mispredicts the pair by ~25 points. Two
   2026-08-30 recalibration attempts were rejected with numbers: per-weight
   faces (+56px doc delta vs +32px baseline) and a re-measured scalar
   (117.26% moved an EN paragraph past a wrap boundary, +56px); the original
   117.08% stays because the harness says it is the best measured value on
   this machine.
   Weight verdict, same session: the serif family renders ONLY at weight 400
   (+ italic 400) on this site — headings are mono — so per-weight serif
   faces have nothing to match. Rerun the probe if serif headings are ever
   added.
   ascent-/descent-override = web-font metric (hhea, per em) / size-adjust. */
@font-face {
	font-family: "Source Serif 4 Fallback";
	src: local("Liberation Serif"), local("Times New Roman");
	font-weight: 100 900;
	font-style: normal;
	ascent-override: 88.49%;
	descent-override: 28.61%;
	line-gap-override: 0%;
	size-adjust: 117.08%;
}

@font-face {
	font-family: "Source Serif 4 Fallback";
	src: local("Liberation Serif Italic"), local("LiberationSerif-Italic"), local("Times New Roman Italic");
	font-weight: 100 900;
	font-style: italic;
	ascent-override: 96.26%;
	descent-override: 31.13%;
	line-gap-override: 0%;
	size-adjust: 107.63%;
}

/* local(<generic>) is rejected by chromium (the face logs an error there and
   the stack falls through to ui-monospace). That error state is the
   calibrated reality: binding a named mono face here changes the swap-period
   line metrics in chromium and measurably grew the services/about sections
   (+24px, layout harness 2026-08-30). Leave it exactly as is. */
@font-face {
	font-family: "JetBrains Mono Fallback";
	src: local("monospace");
	font-weight: 100 900;
	font-style: normal;
	ascent-override: 102%;
	descent-override: 30%;
	line-gap-override: 0%;
	size-adjust: 100%;
}

:root {
	--font-display: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, monospace;
	--font-body: "Source Serif 4", "Source Serif 4 Fallback", Georgia, serif;
	--font-mono: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, monospace;

	/* Engineering Blueprint Palette — Light */
	--bg: #f6f7f9;
	--bg-rgb: 246, 247, 249;
	--bg-elevated: #ffffff;
	--bg-muted: #eef0f4;
	--bg-dark: #0d1117;
	--text: #0d1117;
	--text-secondary: #4a5568;
	--text-tertiary: #646e79;
	--accent: #1565c0;
	--accent-rgb: 21, 101, 192;
	--accent-dark: #0d47a1;
	--accent-light: #e3f0fd;
	--accent-glow: rgba(var(--accent-rgb), 0.08);
	--border: #d1d5db;
	--border-subtle: #e5e7eb;
	--border-strong: #9ca3af;
	--success-bg: #e8f5e9;
	--success-border: #a5d6a7;
	--success-text: #2e7d32;
	--error-bg: #fdecea;
	--error-border: #f5c6cb;
	--error-text: #b71c1c;

	/* Fixed "blueprint ink" surfaces: bands that stay dark in BOTH themes
	   (about, footer). Never override these in [data-theme="dark"]. */
	--surface-ink-text: #e6edf3;
	--surface-ink-text-secondary: #9da7b3;
	--surface-ink-text-tertiary: #6a737d;

	--max-w: 1320px;
	--nav-h: 80px;
	--radius: 0px;
	--radius-sm: 0px;
}

[data-theme="dark"] {
	--bg: #0d1117;
	--bg-rgb: 13, 17, 23;
	--bg-elevated: #161b22;
	--bg-muted: #1c2128;
	--bg-dark: #05080c;
	--text: #e6edf3;
	--text-secondary: #9da7b3;
	--text-tertiary: #6a737d;
	--accent: #58a6ff;
	--accent-rgb: 88, 166, 255;
	--accent-dark: #1565c0;
	--accent-light: #0d2a4a;
	--accent-glow: rgba(var(--accent-rgb), 0.1);
	--border: #2d333b;
	--border-subtle: #1c2128;
	--border-strong: #444c56;
	--success-bg: #1b3a1c;
	--success-border: #2e7d32;
	--success-text: #a5d6a7;
	--error-bg: #3b1416;
	--error-border: #8b3a3a;
	--error-text: #f5b5b5;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0d1117;
		--bg-rgb: 13, 17, 23;
		--bg-elevated: #161b22;
		--bg-muted: #1c2128;
		--bg-dark: #05080c;
		--text: #e6edf3;
		--text-secondary: #9da7b3;
		--text-tertiary: #6a737d;
		--accent: #58a6ff;
		--accent-rgb: 88, 166, 255;
		--accent-dark: #1565c0;
		--accent-light: #0d2a4a;
		--accent-glow: rgba(var(--accent-rgb), 0.1);
		--border: #2d333b;
		--border-subtle: #1c2128;
		--border-strong: #444c56;
		--success-bg: #1b3a1c;
		--success-border: #2e7d32;
		--success-text: #a5d6a7;
		--error-bg: #3b1416;
		--error-border: #8b3a3a;
		--error-text: #f5b5b5;
	}
}

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

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	color-scheme: light dark;
}

body {
	font-family: var(--font-body);
	color: var(--text);
	background: var(--bg);
	line-height: 1.65;
	font-size: 17px;
	font-weight: 400;
	/* clip over hidden: clipping stray horizontal overflow without creating
	   a scroll container (hidden leaves the body programmatically
	   scrollable sideways and interferes with anchor scrolling). */
	overflow-x: clip;
}

/* Typographic polish: balanced heading lines (no widowed-word trails) and
   paragraph orphan control. Progressive enhancement — browsers without
   support keep the previous wrapping. */
h1,
h2,
h3,
h4 {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

/* ─── NOISE & GRAIN OVERLAY ─── */

body::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 9999;
	opacity: 0.035;
	/* Served as a real asset, not a data: URI: img-src 'self' blocks data:
	   URIs, so the texture silently never rendered under our CSP. The
	   fixed path (no cache-bust) is fine for a never-changing texture. */
	background-image: url("/static/images/noise.svg");
	background-repeat: repeat;
	background-size: 256px 256px;
}

/* ─── TEXTURE BACKGROUND ─── */

body::after {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: -1;
	background:
		radial-gradient(ellipse at 20% 50%, rgba(var(--accent-rgb), 0.03) 0%, transparent 50%),
		radial-gradient(ellipse at 80% 20%, rgba(var(--accent-rgb), 0.02) 0%, transparent 40%);
}

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

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

a {
	color: var(--text);
	text-decoration: none;
	position: relative;
	transition: color 0.25s ease;
}

a:hover {
	color: var(--accent);
}

/* Text link underline animation — applied to all links by default.
   Card/button/logo links override via background-image: none. */
a {
	background-image: linear-gradient(var(--accent), var(--accent));
	background-position: 0% 100%;
	background-repeat: no-repeat;
	background-size: 0% 1px;
	transition:
		background-size 0.4s cubic-bezier(0.4, 0, 0.2, 1),
		color 0.25s ease;
	padding-bottom: 2px;
}

a:hover {
	background-size: 100% 1px;
}

.skip-link {
	position: absolute;
	top: -100%;
	left: 16px;
	z-index: 200;
	padding: 12px 24px;
	background: var(--text);
	color: var(--bg);
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: top 0.2s ease;
	border: 1px solid var(--border-strong);
}

.skip-link:focus {
	top: 0;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ─── SCROLL REVEAL ANIMATION BASE ─── */
/* CSS-first reveal (2026-08-30): browsers with scroll-driven animations
   reveal via animation-timeline: view() — no JavaScript on this path.
   JS-disabled visitors (html.no-js) see everything immediately; the old
   behavior left below-fold content permanently invisible without JS.
   The IntersectionObserver in theme.js remains ONLY for JS-enabled
   browsers without animation-timeline support.
   The delay classes cascade by extending the scroll range (a time-based
   animation-delay is timeline-relative here and would not stagger). */

.reveal {
	opacity: 0;
	transform: translateY(40px);
	transition:
		opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.no-js .reveal {
	opacity: 1;
	transform: none;
	transition: none;
}

@keyframes reveal-enter {
	from {
		opacity: 0;
		transform: translateY(40px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@supports (animation-timeline: view()) {
	html:not(.no-js) .reveal {
		animation: reveal-enter 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
		animation-timeline: view();
		animation-range: entry 5% entry 60%;
	}

	html:not(.no-js) .reveal-delay-1 {
		animation-range: entry 5% entry 66%;
	}

	html:not(.no-js) .reveal-delay-2 {
		animation-range: entry 5% entry 72%;
	}

	html:not(.no-js) .reveal-delay-3 {
		animation-range: entry 5% entry 78%;
	}

	html:not(.no-js) .reveal-delay-4 {
		animation-range: entry 5% entry 84%;
	}

	html:not(.no-js) .reveal-delay-5 {
		animation-range: entry 5% entry 90%;
	}

	html:not(.no-js) .reveal-delay-6 {
		animation-range: entry 5% entry 96%;
	}
}

.reveal.visible {
	opacity: 1;
	transform: translateY(0);
}

.reveal-delay-1 {
	transition-delay: 0.1s;
}
.reveal-delay-2 {
	transition-delay: 0.2s;
}
.reveal-delay-3 {
	transition-delay: 0.3s;
}
.reveal-delay-4 {
	transition-delay: 0.4s;
}
.reveal-delay-5 {
	transition-delay: 0.5s;
}
.reveal-delay-6 {
	transition-delay: 0.6s;
}

/* ─── REDUCED MOTION ─── */

@media (prefers-reduced-motion: reduce) {
	/* The selector must match the @supports block's specificity, or the
	   scroll-driven animation keeps elements hidden despite this rule. */
	.reveal,
	html:not(.no-js) .reveal,
	.no-js .reveal {
		opacity: 1;
		transform: none;
		transition: none;
		animation: none;
	}
	.hero-badge,
	.hero-title,
	.hero-subtitle,
	.hero-actions {
		animation: none;
	}
	.btn::before {
		display: none;
	}
	* {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

/* ─── NAV ─── */

.nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--nav-h);
	background: transparent;
	border-bottom: 1px solid transparent;
	z-index: 100;
	transition:
		background 0.5s cubic-bezier(0.4, 0, 0.2, 1),
		border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
		backdrop-filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.scrolled {
	background: rgba(var(--bg-rgb), 0.94);
	backdrop-filter: blur(20px) saturate(1.2);
	-webkit-backdrop-filter: blur(20px) saturate(1.2);
	border-bottom-color: var(--border);
}

.nav-container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 40px;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.nav-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--text);
	transition: opacity 0.3s ease;
	background-image: none;
	padding-bottom: 0;
}

.nav-logo:hover {
	opacity: 0.7;
}

.logo-lockup {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.logo-icon {
	height: 26px;
	width: auto;
	display: block;
}

.logo-wordmark {
	font-family: var(--font-mono);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--text);
	white-space: nowrap;
}

.logo-lockup-white .logo-wordmark {
	color: rgba(255, 255, 255, 0.95);
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 8px;
}

.nav-links a {
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 500;
	color: var(--text-secondary);
	text-decoration: none;
	padding: 10px 18px;
	border-radius: var(--radius);
	letter-spacing: 0.04em;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background: none;
	background-image: none;
	position: relative;
}

.nav-links a::after {
	content: "";
	position: absolute;
	bottom: 6px;
	left: 18px;
	right: 18px;
	height: 1px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
	color: var(--accent);
	background: none;
}

.nav-links a:hover::after {
	transform: scaleX(1);
}

.nav-links .lang-switch {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 8px 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-secondary);
	background: transparent;
	font-family: var(--font-mono);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links .lang-switch:hover {
	border-color: var(--accent);
	color: var(--accent);
	background: transparent;
}

.lang-switch svg {
	opacity: 0.5;
	transition: opacity 0.3s ease;
}

.lang-switch:hover svg {
	opacity: 0.8;
}

.nav-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--text);
	cursor: pointer;
	/* 44px minimum touch target (WCAG 2.5.5) */
	min-width: 44px;
	min-height: 44px;
	padding: 8px;
	border-radius: var(--radius);
	transition: background 0.2s ease;
}
.nav-toggle:hover {
	background: var(--bg-muted);
}

.nav-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.theme-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid var(--border);
	color: var(--text-secondary);
	cursor: pointer;
	padding: 8px;
	border-radius: var(--radius);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-toggle:hover {
	border-color: var(--accent);
	color: var(--accent);
	transform: rotate(15deg);
}
.theme-toggle svg {
	width: 16px;
	height: 16px;
}
.mobile-theme-toggle {
	display: none;
}

.icon-sun {
	display: none;
}
.icon-moon {
	display: block;
}

[data-theme="dark"] .icon-sun {
	display: block;
}
[data-theme="dark"] .icon-moon {
	display: none;
}

/* ─── HERO ─── */

.hero {
	min-height: 100vh;
	display: flex;
	align-items: flex-end;
	padding-top: var(--nav-h);
	padding-bottom: 100px;
	position: relative;
	overflow: hidden;
	background: var(--bg);
}

.hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* Blueprint grid — the signature. Static, no animation. */
.hero::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image:
		linear-gradient(var(--accent-glow) 1px, transparent 1px),
		linear-gradient(90deg, var(--accent-glow) 1px, transparent 1px);
	background-size: 48px 48px;
	background-position: center;
	mask-image: radial-gradient(ellipse at 70% 50%, black 0%, transparent 70%);
	-webkit-mask-image: radial-gradient(ellipse at 70% 50%, black 0%, transparent 70%);
	pointer-events: none;
}

.hero-container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 40px;
	position: relative;
	z-index: 1;
	width: 100%;
}

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 500;
	color: var(--accent);
	margin-bottom: 48px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border: 1px solid var(--border);
	padding: 8px 16px;
	background: rgba(var(--accent-rgb), 0.04);
	animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hero-title {
	font-family: var(--font-display);
	font-size: clamp(48px, 9vw, 132px);
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 0.92;
	color: var(--text);
	margin-bottom: 36px;
	text-transform: uppercase;
	max-width: 1000px;
	animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

.hero-title em {
	font-style: normal;
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 3px;
	text-underline-offset: 8px;
}

.hero-subtitle {
	font-family: var(--font-body);
	font-size: clamp(17px, 2vw, 21px);
	line-height: 1.7;
	color: var(--text-secondary);
	margin-bottom: 56px;
	max-width: 520px;
	font-weight: 400;
	animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.8s both;
}

.hero-actions {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1s both;
}

/* ─── BUTTONS ─── */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 40px;
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	border-radius: var(--radius);
	transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	border: none;
	text-decoration: none;
	position: relative;
	overflow: hidden;
	background-image: none;
	padding-bottom: 16px;
}

.btn::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		transparent 30%,
		rgba(255, 255, 255, 0.1) 50%,
		transparent 70%
	);
	transform: translateX(-100%);
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover::before {
	transform: translateX(100%);
}

.btn-primary {
	background: var(--text);
	color: var(--bg);
}

.btn-primary:hover {
	background: var(--accent);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.25);
}

.btn-secondary {
	background: transparent;
	color: var(--text);
	border: 1.5px solid var(--border-strong);
}

.btn-secondary:hover {
	border-color: var(--accent);
	color: var(--accent);
	background: transparent;
	transform: translateY(-2px);
}

.btn-large {
	padding: 20px 48px;
	font-size: 14px;
}

.nav-links .btn-nav {
	padding: 10px 22px;
	background: var(--text);
	color: var(--bg);
	border-radius: var(--radius);
	font-size: 11px;
	font-weight: 500;
	font-family: var(--font-mono);
	transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	letter-spacing: 0.04em;
	background-image: none;
}

.nav-links .btn-nav::after {
	display: none;
}

.nav-links .btn-nav:hover {
	background: var(--accent);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.2);
}

/* ─── SECTIONS ─── */

.section-container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 140px 40px;
}

/* Subpages sit directly under the fixed nav: one intentional offset system
   (section padding-top 40px + container 40px) keeps H1s above the fold. */
.contact > .section-container,
.appointment > .section-container,
.legal-page > .section-container,
.service-detail > .section-container,
.not-found > .section-container {
	padding-top: 40px;
}

.section-label {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-mono);
	font-size: 10px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--accent);
	margin-bottom: 28px;
}

.section-label::before {
	content: "";
	display: inline-block;
	width: 32px;
	height: 1px;
	background: var(--accent);
}

.section-title {
	font-family: var(--font-display);
	font-size: clamp(32px, 4.5vw, 56px);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.05;
	color: var(--text);
	margin-bottom: 24px;
	text-transform: uppercase;
}

.section-subtitle {
	font-family: var(--font-body);
	font-size: 18px;
	color: var(--text-secondary);
	max-width: 560px;
	line-height: 1.7;
	margin-bottom: 72px;
}

/* ─── TECH STRIP ─── */

.tech-strip {
	padding: 40px 0;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	background: var(--bg);
	position: relative;
	overflow: hidden;
}

.tech-strip::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 80px;
	background: linear-gradient(90deg, var(--bg), transparent);
	z-index: 2;
	pointer-events: none;
}

.tech-strip::after {
	content: "";
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 80px;
	background: linear-gradient(270deg, var(--bg), transparent);
	z-index: 2;
	pointer-events: none;
}

.tech-strip-inner {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 64px;
	flex-wrap: wrap;
}

.tech-item {
	display: flex;
	align-items: center;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-item:hover {
	transform: translateY(-2px);
}

.tech-logo {
	height: 22px;
	width: auto;
	opacity: 0.62;
	filter: grayscale(1);
	transition:
		opacity 0.3s ease,
		filter 0.3s ease;
}

.tech-item:hover .tech-logo {
	opacity: 0.75;
	filter: grayscale(0);
}

/* ─── SERVICES ─── */

.services-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	border-top: 1px solid var(--border);
	border-left: 1px solid var(--border);
}

.service-card {
	background: var(--bg);
	border-right: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	padding: 52px 40px 44px;
	text-decoration: none;
	color: inherit;
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	position: relative;
	background-image: none;
	overflow: hidden;
}

.service-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--accent-glow);
	opacity: 0;
	transition: opacity 0.5s ease;
	pointer-events: none;
}

.service-card::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--accent), transparent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
	background: var(--bg-elevated);
	transform: translateY(-4px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.service-card:hover::before {
	opacity: 1;
}

.service-card:hover::after {
	transform: scaleX(1);
}

.service-icon {
	position: relative;
	color: var(--accent);
	margin-bottom: 32px;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
	border-color: var(--accent);
	transform: scale(1.05);
}

.service-card h3 {
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 500;
	letter-spacing: -0.01em;
	margin-bottom: 16px;
	color: var(--text);
	position: relative;
	text-transform: uppercase;
	line-height: 1.2;
}

.service-card p {
	font-family: var(--font-body);
	font-size: 15px;
	color: var(--text-secondary);
	line-height: 1.65;
	flex: 1;
	position: relative;
}

.service-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 32px;
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 500;
	color: var(--accent);
	position: relative;
	transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background-image: none;
}

.service-card:hover .service-link {
	gap: 16px;
}

/* ─── ABOUT ─── */

.about {
	background: var(--bg-dark);
	color: var(--surface-ink-text);
	position: relative;
	overflow: hidden;
}

.about::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.about::after {
	content: "";
	position: absolute;
	top: 20%;
	left: -10%;
	width: 50%;
	height: 60%;
	background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.06) 0%, transparent 70%);
	pointer-events: none;
}

.about .section-label {
	color: var(--accent);
}

.about .section-label::before {
	background: var(--accent);
}

.about .section-title {
	color: var(--surface-ink-text);
}

.about .section-subtitle {
	color: var(--text-tertiary);
}

.about-content {
	max-width: 680px;
	position: relative;
	z-index: 1;
}

.about-content p {
	font-family: var(--font-body);
	font-size: 18px;
	color: var(--surface-ink-text-secondary);
	line-height: 1.8;
	margin-bottom: 28px;
}

.about-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 56px;
	margin-top: 72px;
	padding-top: 56px;
	border-top: 1px solid var(--border);
	position: relative;
	z-index: 1;
}

.about-stat {
	text-align: left;
	position: relative;
}

.about-stat::before {
	content: "";
	position: absolute;
	top: -56px;
	left: 0;
	width: 40px;
	height: 2px;
	background: var(--accent);
}

.about-stat-number {
	font-family: var(--font-display);
	font-size: clamp(44px, 5vw, 64px);
	font-weight: 600;
	letter-spacing: -0.03em;
	color: var(--accent);
	line-height: 1;
	margin-bottom: 14px;
}

.about-stat-label {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-tertiary);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ─── CLIENTS ─── */

.clients {
	padding: 56px 0;
	background: var(--bg-muted);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	position: relative;
}

.clients-label {
	text-align: center;
	color: var(--text-tertiary);
	font-family: var(--font-mono);
	font-size: 10px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	margin-bottom: 28px;
}

.clients-strip {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 16px;
}

.client-name {
	font-family: var(--font-display);
	font-size: 1.2rem;
	font-weight: 500;
	color: var(--text-secondary);
	padding: 8px 6px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	transition: color 0.3s ease;
}

.client-name:hover {
	color: var(--accent);
}

.client-separator {
	color: var(--border-strong);
	font-family: var(--font-mono);
	font-size: 1rem;
	padding: 0 6px;
	opacity: 0.5;
}

/* ─── TESTIMONIALS ─── */

.testimonials {
	padding: 120px 0;
	background: var(--bg);
	border-top: 1px solid var(--border);
	position: relative;
}

.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0;
	border-top: 1px solid var(--border);
	border-left: 1px solid var(--border);
}

.testimonial-card {
	background: var(--bg);
	border-right: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	padding: 56px 44px;
	display: flex;
	flex-direction: column;
	gap: 28px;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
}

.testimonial-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	height: 0;
	background: linear-gradient(180deg, var(--accent), transparent);
	transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
	background: var(--bg-elevated);
}

.testimonial-card:hover::before {
	height: 100%;
}

.testimonial-quote {
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.75;
	color: var(--text-secondary);
	margin: 0;
	font-style: italic;
	flex: 1;
	position: relative;
}

.testimonial-quote::before {
	content: "\201C";
	font-family: var(--font-display);
	font-size: 72px;
	line-height: 1;
	color: var(--accent);
	display: block;
	margin-bottom: 4px;
	opacity: 0.25;
}

.testimonial-author {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.testimonial-author strong {
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 500;
	color: var(--text);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.testimonial-author span {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-tertiary);
	font-weight: 500;
	letter-spacing: 0.04em;
}

/* ─── CTA ─── */

.cta {
	background: var(--text);
	color: var(--bg);
	position: relative;
	border-top: 1px solid var(--border);
	overflow: hidden;
}

.cta::before {
	content: "";
	position: absolute;
	top: -50%;
	left: -20%;
	width: 60%;
	height: 200%;
	background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.06) 0%, transparent 70%);
	pointer-events: none;
}

.cta-content {
	text-align: left;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	position: relative;
	z-index: 1;
}

.cta h2 {
	font-family: var(--font-display);
	font-size: clamp(32px, 4.5vw, 56px);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.05;
	margin-bottom: 24px;
	color: var(--bg);
	text-transform: uppercase;
}

.cta p {
	font-family: var(--font-body);
	font-size: 18px;
	color: var(--text-tertiary);
	margin-bottom: 48px;
	max-width: 480px;
	line-height: 1.7;
}

.cta .btn-primary {
	background: var(--bg);
	color: var(--text);
}

.cta .btn-primary:hover {
	background: var(--accent-dark);
	color: white;
}

/* ─── CONTACT ─── */

.contact {
	background: var(--bg);
	padding-top: calc(var(--nav-h) + 40px);
	border-top: 1px solid var(--border);
}

.contact-grid {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 96px;
	align-items: start;
}

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.form-group label {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 500;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.form-group input,
.form-group textarea {
	padding: 18px 24px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	font-size: 16px;
	font-family: var(--font-body);
	color: var(--text);
	background: var(--bg-elevated);
	transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
	color: var(--text-tertiary);
	opacity: 0.6;
}

.form-consent label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-family: var(--font-mono);
	font-size: 12px;
	line-height: 1.6;
	color: var(--text-secondary);
	cursor: pointer;
}

.form-consent input[type="checkbox"] {
	margin-top: 2px;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	accent-color: var(--accent);
	cursor: pointer;
}

.form-consent a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.alert-success {
	padding: 20px 28px;
	background: var(--success-bg);
	border: 1.5px solid var(--success-border);
	border-radius: var(--radius);
	color: var(--success-text);
	font-family: var(--font-mono);
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 32px;
	position: relative;
}

.alert-success::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--success-border);
}

.alert-error {
	padding: 20px 28px;
	background: var(--error-bg);
	border: 1.5px solid var(--error-border);
	border-radius: var(--radius);
	color: var(--error-text);
	font-family: var(--font-mono);
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 32px;
	position: relative;
}

.alert-error::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--error-border);
}

.contact-info {
	padding: 56px 48px;
	background: var(--bg-muted);
	border-radius: var(--radius);
	border: 1px solid var(--border);
	position: relative;
}

.contact-info::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--accent), transparent);
}

.contact-info h2 {
	font-family: var(--font-display);
	font-size: 18px;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 28px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.contact-info p {
	font-family: var(--font-body);
	font-size: 15px;
	color: var(--text-secondary);
	margin-bottom: 14px;
	line-height: 1.6;
}

.form-note {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-tertiary);
	letter-spacing: 0.02em;
}

/* ─── APPOINTMENT ─── */

.appointment {
	padding-top: calc(var(--nav-h) + 40px);
	min-height: 100vh;
	background: var(--bg);
	border-top: 1px solid var(--border);
}

.cal-embed {
	position: relative;
	width: 100%;
	min-height: 600px;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
}

.cal-embed iframe {
	width: 100%;
	min-height: 600px;
	border: none;
}

.cal-loading {
	/* Overlay inside #cal-embed, not a stacked sibling: hiding it when the
	   booking iframe appears must not move the page (the stacked layout
	   measured CLS 0.46 — Lighthouse, 2026-08-30). */
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 20px;
	border: none;
	background: var(--bg-muted);
	z-index: 1;
}

.cal-loading[hidden] {
	display: none;
}

.cal-loading p {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-tertiary);
}

.cal-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: calSpin 0.9s linear infinite;
}

@keyframes calSpin {
	to {
		transform: rotate(360deg);
	}
}

.cal-fallback {
	margin-top: 24px;
	/* Same envelope as .cal-loading: the settle() swap (loading hidden,
	   fallback shown) must not change the container height — Lighthouse
	   measured CLS 0.46 on this page before the min-height, 2026-08-30. */
	min-height: 600px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 32px 36px;
	background: var(--bg-muted);
	border: 1px solid var(--border);
}

.cal-fallback[hidden] {
	display: none;
}

.cal-fallback h2 {
	font-family: var(--font-display);
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--text);
	margin-bottom: 12px;
}

.cal-fallback p {
	font-family: var(--font-body);
	font-size: 15px;
	color: var(--text-secondary);
	line-height: 1.7;
}

.cal-fallback-links {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
	flex-wrap: wrap;
}

.cal-fallback-links a {
	font-family: var(--font-mono);
	font-size: 14px;
	color: var(--accent);
}

.cal-fallback-links span {
	color: var(--text-tertiary);
}

.cal-timezone {
	margin-top: 16px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--text-tertiary);
}

/* ─── SERVICE DETAIL ─── */

.service-detail {
	padding-top: calc(var(--nav-h) + 40px);
	border-top: 1px solid var(--border);
}

.back-link {
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 500;
	color: var(--text-tertiary);
	margin-bottom: 56px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background-image: none;
}

.back-link:hover {
	color: var(--accent);
	border-color: var(--accent);
	background: transparent;
	transform: translateX(-4px);
}

.service-detail-header {
	display: flex;
	align-items: center;
	gap: 28px;
	margin-bottom: 64px;
}

.service-icon-large {
	color: var(--bg);
	background: var(--text);
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius);
	flex-shrink: 0;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-detail-header:hover .service-icon-large {
	background: var(--accent);
	transform: scale(1.05);
}

.service-detail-header h1 {
	font-family: var(--font-display);
	font-size: clamp(28px, 4.5vw, 52px);
	font-weight: 600;
	letter-spacing: -0.03em;
	color: var(--text);
	text-transform: uppercase;
	line-height: 1.1;
}

.service-detail-body {
	max-width: 720px;
}

.service-detail-body .lead {
	font-family: var(--font-body);
	font-size: 20px;
	line-height: 1.8;
	color: var(--text-secondary);
	margin-bottom: 64px;
}

.service-detail-topics {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 36px;
	margin-bottom: 64px;
}

.service-topic {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	font-size: 15px;
	color: var(--text-secondary);
	line-height: 1.5;
	padding: 16px 20px;
	background: var(--bg-muted);
	border-radius: var(--radius);
	border: 1px solid var(--border);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-topic:hover {
	border-color: var(--accent);
	transform: translateX(4px);
}

.service-topic-bullet {
	color: var(--accent);
	font-family: var(--font-mono);
	font-weight: 600;
	flex-shrink: 0;
	margin-top: 1px;
}

.service-detail-cta {
	margin-top: 16px;
}

/* ─── CASE STUDY ─── */

.case-study {
	margin-top: 64px;
	padding: 44px 40px;
	background: var(--bg-muted);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	position: relative;
	overflow: hidden;
}

.case-study::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: linear-gradient(180deg, var(--accent), transparent 80%);
}

.case-study::after {
	content: "";
	position: absolute;
	top: -50%;
	right: -30%;
	width: 60%;
	height: 200%;
	background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.04) 0%, transparent 70%);
	pointer-events: none;
}

.case-study-label {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 10px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--accent);
	margin-bottom: 18px;
	padding: 6px 14px;
	background: var(--accent-light);
	border-radius: var(--radius);
	position: relative;
	z-index: 1;
}

.case-study-title {
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 16px;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	line-height: 1.2;
	position: relative;
	z-index: 1;
}

.case-study-body {
	font-family: var(--font-body);
	font-size: 15px;
	color: var(--text-secondary);
	line-height: 1.8;
	margin-bottom: 28px;
	position: relative;
	z-index: 1;
}

.case-study-metrics {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	position: relative;
	z-index: 1;
}

.metric-badge {
	display: inline-flex;
	align-items: center;
	padding: 10px 18px;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 500;
	color: var(--text-secondary);
	letter-spacing: 0.03em;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-badge:hover {
	border-color: var(--accent);
	color: var(--accent);
	transform: translateY(-2px);
}

/* ─── RELATED SERVICES ─── */

.related-services {
	margin-top: 96px;
	padding-top: 56px;
	border-top: 1px solid var(--border);
}

.related-services-title {
	font-family: var(--font-display);
	font-size: 18px;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 32px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.related-services-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0;
	border-top: 1px solid var(--border);
	border-left: 1px solid var(--border);
}

.related-service-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 32px 16px;
	background: var(--bg);
	border-right: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	text-decoration: none;
	color: inherit;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	background-image: none;
	position: relative;
	overflow: hidden;
}

.related-service-card::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.related-service-card:hover {
	background: var(--bg-elevated);
}

.related-service-card:hover::after {
	transform: scaleX(1);
}

.related-service-icon {
	color: var(--accent);
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.related-service-card:hover .related-service-icon {
	transform: scale(1.1);
}

.related-service-icon svg {
	width: 28px;
	height: 28px;
}

.related-service-name {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 500;
	color: var(--text-secondary);
	text-align: center;
	line-height: 1.4;
	letter-spacing: 0.02em;
	transition: color 0.3s ease;
}

.related-service-card:hover .related-service-name {
	color: var(--accent);
}

/* ─── LEGAL ─── */

.legal-page {
	padding-top: calc(var(--nav-h) + 40px);
	border-top: 1px solid var(--border);
}

.legal-page h1 {
	font-family: var(--font-display);
	font-size: clamp(28px, 4.5vw, 52px);
	font-weight: 600;
	letter-spacing: -0.03em;
	color: var(--text);
	margin-bottom: 56px;
	text-transform: uppercase;
	line-height: 1.1;
}

.legal-content h2 {
	font-family: var(--font-display);
	font-size: 22px;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 18px;
	margin-top: 48px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.legal-content h3 {
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 600;
	color: var(--text-secondary);
	margin-bottom: 14px;
	margin-top: 32px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.legal-content p {
	font-family: var(--font-body);
	font-size: 15px;
	color: var(--text-secondary);
	line-height: 1.7;
	margin-bottom: 14px;
}

.legal-updated {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--text-tertiary);
	margin-bottom: 32px;
}

.legal-content a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ─── FOOTER ─── */

.footer {
	background: var(--bg-dark);
	color: var(--surface-ink-text);
	border-top: 1px solid var(--border);
	position: relative;
	overflow: hidden;
}

.footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.footer::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 40%;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--accent), transparent);
	opacity: 0.3;
}

.footer-container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 100px 40px 48px;
	position: relative;
	z-index: 1;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1fr;
	gap: 56px;
	margin-bottom: 72px;
}

.footer-brand {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.footer-tagline {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--surface-ink-text-secondary);
	line-height: 1.7;
	max-width: 280px;
}

.footer-links h3 {
	font-family: var(--font-mono);
	font-size: 10px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: var(--surface-ink-text-secondary);
	margin-bottom: 28px;
}

.footer-links a {
	display: block;
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--surface-ink-text-secondary);
	text-decoration: none;
	margin-bottom: 13px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background-image: none;
	position: relative;
}

.footer-links a::after {
	content: "";
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 1px;
	background: var(--accent);
	transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-links a:hover {
	color: var(--surface-ink-text);
	transform: translateX(6px);
}

.footer-links a:hover::after {
	width: 20px;
}

.footer-links p {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--surface-ink-text-secondary);
	margin-bottom: 9px;
}

.footer-bottom {
	padding-top: 36px;
	border-top: 1px solid var(--border);
}

.footer-bottom p {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--surface-ink-text-secondary);
	letter-spacing: 0.04em;
}

/* ─── 404 ─── */

.not-found {
	padding-top: calc(var(--nav-h) + 40px);
	border-top: 1px solid var(--border);
}

.not-found-content {
	text-align: left;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.not-found h1 {
	font-family: var(--font-display);
	font-size: clamp(100px, 20vw, 200px);
	font-weight: 600;
	color: var(--accent);
	line-height: 1;
	margin-bottom: 28px;
	opacity: 0.35;
	letter-spacing: -0.04em;
}

.not-found h2 {
	font-family: var(--font-display);
	font-size: 28px;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 18px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.not-found p {
	font-family: var(--font-body);
	font-size: 16px;
	color: var(--text-secondary);
	margin-bottom: 36px;
}

/* ─── DARK MODE OVERRIDES ─── */

[data-theme="dark"] .service-card:hover {
	background: var(--bg-elevated);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tech-logo {
	filter: grayscale(1) invert(1);
	opacity: 0.55;
}

[data-theme="dark"] .tech-item:hover .tech-logo {
	filter: grayscale(0) invert(1);
	opacity: 0.65;
}

[data-theme="dark"] .nav-links {
	background: rgba(var(--bg-rgb), 0.98);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
	background: var(--bg-elevated);
}

/* ─── RESPONSIVE ─── */

@media (max-width: 1024px) {
	.services-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 48px;
	}
	.related-services-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.testimonials-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.about-stats {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.nav-toggle {
		display: block;
	}
	.mobile-theme-toggle {
		display: flex !important;
	}
	.nav-actions .theme-toggle {
		display: none;
	}

	.nav-links {
		display: none;
		position: absolute;
		top: var(--nav-h);
		left: 0;
		right: 0;
		background: var(--bg-elevated);
		backdrop-filter: blur(24px) saturate(1.2);
		-webkit-backdrop-filter: blur(24px) saturate(1.2);
		flex-direction: column;
		padding: 20px 32px;
		gap: 0;
		border-bottom: 1px solid var(--border);
		box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
	}

	.nav-links.open {
		display: flex;
	}

	.nav-links a:not(.lang-switch) {
		display: block;
		padding: 16px 0;
		border-bottom: 1px solid var(--border-subtle);
	}

	.nav-links .lang-switch {
		padding: 8px 14px !important;
		margin-top: 12px;
	}

	.services-grid {
		grid-template-columns: 1fr;
	}
	.contact-grid {
		grid-template-columns: 1fr;
		gap: 48px;
	}
	.footer-grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}
	.hero-container {
		padding: 60px 24px;
	}
	.section-container {
		padding: 100px 24px;
	}
	.service-detail-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
	}
	.service-detail-topics {
		grid-template-columns: 1fr;
	}
	.about-stats {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.tech-strip-inner {
		gap: 40px;
	}
	.related-services-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.testimonials-grid {
		grid-template-columns: 1fr;
	}
	.clients-strip {
		gap: 6px;
	}
	.client-separator {
		display: none;
	}
	.client-name {
		font-size: 1.1rem;
	}
	.case-study {
		padding: 32px 24px;
	}
	.case-study-metrics {
		gap: 8px;
	}
	.nav-container {
		padding: 0 24px;
	}
	.hero {
		padding-bottom: 80px;
	}
	.hero-title {
		font-size: clamp(38px, 11vw, 72px);
	}
	.about-stat::before {
		width: 28px;
	}
	.contact-info {
		padding: 40px 28px;
	}
}

@media (max-width: 480px) {
	.hero-actions {
		flex-direction: column;
	}
	.logo-wordmark {
		font-size: 13px;
	}
	.logo-lockup {
		gap: 8px;
	}
	.btn {
		width: 100%;
		text-align: center;
	}
	.hero-title {
		font-size: 36px;
	}
	.related-services-grid {
		grid-template-columns: 1fr 1fr;
		gap: 0;
	}
	.related-service-card {
		padding: 24px 12px;
	}
	.metric-badge {
		font-size: 10px;
		padding: 8px 14px;
	}
	.about-stat-number {
		font-size: 40px;
	}
	.section-container {
		padding: 80px 24px;
	}
}

/* Print: imprint and privacy read as documents (M97) */
@media print {
	/* Print is always light, whatever the screen theme: paper is white,
	   ink is dark, and this palette wins over data-theme=dark (verified
	   2026-08-30: computed body background under print media + dark theme
	   is rgb(255,255,255)). */
	:root {
		--bg: #ffffff;
		--text: #000000;
	}

	.nav,
	.footer,
	.hero-actions,
	.btn,
	.theme-toggle,
	.nav-toggle,
	.lang-switch,
	.skip-link,
	.section-label {
		display: none !important;
	}

	/* Scroll-reveal and hero entrance animations always land at their final
	   state: without this, below-fold .reveal sections print invisible
	   (opacity 0 until the IntersectionObserver fires) and a print issued
	   before the delayed fadeInUp animations finish clips the hero. */
	.reveal,
	.hero-badge,
	.hero-title,
	.hero-subtitle {
		opacity: 1 !important;
		transform: none !important;
		animation: none !important;
		transition: none !important;
	}

	body {
		background: #fff;
		color: #000;
		font-size: 12pt;
		line-height: 1.5;
	}

	.section-container,
	.legal-content,
	main {
		max-width: 100%;
		padding: 0;
		margin: 0;
	}

	a {
		color: #000;
		text-decoration: underline;
	}

	.section-title {
		font-size: 20pt;
	}

	h2 {
		font-size: 15pt;
		page-break-after: avoid;
	}

	a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		color: #555;
	}
}
