/* ==========================================================================
   davidthomas.com.au — "Terminal Workshop" design system v2.0
   Dark, direct, techy. One accent thread per business, woven on the home page.
   Fonts: Space Grotesk (display) · Inter (body) · JetBrains Mono (terminal)
   ========================================================================== */

/* 1. Tokens
   -------------------------------------------------------------------------- */
:root {
	/* Surfaces */
	--bg: #0b0e14;
	--bg-soft: #0f131c;
	--surface: #141a27;
	--surface-2: #1a2233;
	--line: #263045;
	--line-soft: #1b2334;

	/* Ink */
	--text: #eaeef7;
	--muted: #9aa3b8;
	--faint: #6e7789;

	/* Per-business accent threads (set solid on body[data-accent]) */
	--green: #3ddc97;
	--amber: #ffb224;
	--violet: #9b8cff;

	/* Active accent (business pages + components). Home weaves all three. */
	--accent: var(--violet);
	--accent-glow: rgba(155, 140, 255, 0.14);

	/* The weave — three threads, one fabric */
	--weave: linear-gradient(90deg, var(--green), var(--amber), var(--violet));

	/* Type */
	--font-display: 'Space Grotesk', 'Inter', sans-serif;
	--font-body: 'Inter', system-ui, sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

	--fs-display: clamp(2.3rem, 6vw, 4.3rem);
	--fs-h1: clamp(2.2rem, 5vw, 3.4rem);
	--fs-h2: clamp(1.65rem, 3.2vw, 2.35rem);
	--fs-h3: 1.22rem;
	--fs-lead: clamp(1.06rem, 1.7vw, 1.3rem);
	--fs-body: 1.03rem;
	--fs-small: 0.92rem;
	--fs-mono: 0.88rem;

	/* Geometry */
	--sp-1: 4px;
	--sp-2: 8px;
	--sp-3: 12px;
	--sp-4: 16px;
	--sp-6: 24px;
	--sp-8: 32px;
	--sp-12: 48px;
	--sp-16: 64px;
	--sp-24: 96px;
	--radius-sm: 8px;
	--radius-md: 14px;
	--radius-lg: 22px;
	--container: 1140px;
	--reading: 70ch;

	--shadow-md: 0 10px 30px rgba(2, 4, 10, 0.45);
	--shadow-lg: 0 24px 60px rgba(2, 4, 10, 0.55);
}

body[data-accent='green'] {
	--accent: var(--green);
	--accent-glow: rgba(61, 220, 151, 0.13);
}
body[data-accent='amber'] {
	--accent: var(--amber);
	--accent-glow: rgba(255, 178, 36, 0.13);
}
body[data-accent='violet'] {
	--accent: var(--violet);
	--accent-glow: rgba(155, 140, 255, 0.15);
}

/* 2. Reset + base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	font-weight: 400;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

main {
	flex: 1;
}

::selection {
	background: var(--accent);
	color: #0b0e14;
}

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

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

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

h1,
h2,
h3 {
	font-family: var(--font-display);
	line-height: 1.12;
	letter-spacing: -0.015em;
	margin: 0 0 var(--sp-4);
	text-wrap: balance;
}

h1 {
	font-size: var(--fs-h1);
	font-weight: 700;
	/* Long unbreakable words ("telecommunications") must never clip at
	   narrow viewports — break only as a last resort. */
	overflow-wrap: anywhere;
	text-wrap: balance;
}

h2 {
	font-size: var(--fs-h2);
	font-weight: 700;
}

h3 {
	font-size: var(--fs-h3);
	font-weight: 600;
}

p {
	margin: 0 0 var(--sp-4);
}

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.container--narrow {
	max-width: calc(var(--reading) + 3rem);
}

.site-content {
	display: block;
}

/* 3. Signature motifs
   -------------------------------------------------------------------------- */

/* The weave thread — a 3px gradient line. Home hero/header/CTA. */
.thread {
	height: 3px;
	border: 0;
	margin: 0;
	background: var(--weave);
	border-radius: 999px;
}

.thread--soft {
	opacity: 0.55;
}

/* Mono eyebrow: "// the work" */
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	font-weight: 500;
	letter-spacing: 0.06em;
	color: var(--accent);
	margin-bottom: var(--sp-3);
}

.eyebrow::before {
	content: '//';
	color: var(--faint);
}

/* Status badge: "EST. 2006 · STILL ANSWERING" */
.badge {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	font-family: var(--font-mono);
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--muted);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: var(--sp-2) var(--sp-4);
	background: rgba(20, 26, 39, 0.65);
}

.badge::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 10px var(--accent);
	flex: none;
}

/* Blinking terminal caret */
.caret {
	display: inline-block;
	color: var(--accent);
	animation: caret-blink 1.1s steps(1) infinite;
}

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

/* 4. Header + navigation
   -------------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(11, 14, 20, 0.82);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line-soft);
}

.site-header::after {
	/* The thread runs under the header on every page */
	content: '';
	display: block;
	height: 2px;
	background: var(--weave);
	opacity: 0.5;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-6);
	min-height: 68px;
}

.site-brand {
	font-family: var(--font-mono);
	font-size: 1.02rem;
	font-weight: 600;
	color: var(--text);
	white-space: nowrap;
}

.site-brand:hover {
	text-decoration: none;
	color: var(--accent);
}

.site-brand .caret {
	margin-left: 2px;
}

.main-navigation__list {
	display: flex;
	align-items: center;
	gap: var(--sp-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-navigation__list a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--sp-3);
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--muted);
	border-radius: var(--radius-sm);
	transition: color 0.15s ease;
}

.main-navigation__list a:hover {
	color: var(--text);
	text-decoration: none;
}

.main-navigation__list a.is-active {
	color: var(--text);
}

.main-navigation__list a.is-active::before {
	content: '> ';
	color: var(--accent);
	font-family: var(--font-mono);
}

/* Nav CTA lives in the header list */
.main-navigation__list a.nav-cta {
	margin-left: var(--sp-2);
	background: var(--accent);
	color: #0b0e14;
	font-weight: 600;
	padding: 0 var(--sp-4);
	border-radius: var(--radius-sm);
}

.main-navigation__list a.nav-cta:hover {
	filter: brightness(1.08);
	color: #0b0e14;
}

.menu-toggle {
	display: none;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--sp-4);
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	color: var(--text);
	background: transparent;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	cursor: pointer;
}

.menu-toggle[aria-expanded='true'] {
	border-color: var(--accent);
	color: var(--accent);
}

@media (max-width: 920px) {
	.menu-toggle {
		display: inline-flex;
	}

	.main-navigation {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		background: rgba(13, 17, 25, 0.98);
		border-bottom: 1px solid var(--line);
		padding: var(--sp-4) clamp(1.25rem, 4vw, 2rem) var(--sp-6);
	}

	.main-navigation.is-open {
		display: block;
	}

	.main-navigation__list {
		flex-direction: column;
		align-items: stretch;
		gap: var(--sp-1);
	}

	.main-navigation__list a {
		min-height: 48px;
		padding: var(--sp-2) var(--sp-3);
	}

	.main-navigation__list a.nav-cta {
		margin: var(--sp-3) 0 0;
		justify-content: center;
		min-height: 48px;
	}
}

/* 5. Buttons
   -------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--sp-2);
	min-height: 48px;
	padding: 0 var(--sp-6);
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	text-align: center;
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease,
		border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
	text-decoration: none;
	transform: translateY(-2px);
}

.btn:active {
	transform: translateY(0);
}

.btn-primary {
	background: var(--accent);
	color: #0b0e14;
	box-shadow: 0 6px 24px var(--accent-glow), 0 2px 8px rgba(2, 4, 10, 0.4);
}

.btn-primary:hover {
	color: #0b0e14;
	filter: brightness(1.07);
	box-shadow: 0 10px 32px var(--accent-glow), 0 2px 8px rgba(2, 4, 10, 0.4);
}

/* Home page buttons weave all three threads */
.btn-weave {
	background: var(--weave);
	color: #0b0e14;
	box-shadow: 0 6px 24px rgba(155, 140, 255, 0.18), 0 2px 8px rgba(2, 4, 10, 0.4);
}

.btn-weave:hover {
	color: #0b0e14;
	filter: brightness(1.06);
}

.btn-ghost {
	background: transparent;
	color: var(--text);
	border-color: var(--line);
}

.btn-ghost:hover {
	color: var(--text);
	border-color: var(--accent);
}

.btn-ghost .btn-arrow {
	color: var(--accent);
}

.btn-lg {
	min-height: 56px;
	padding: 0 var(--sp-8);
	font-size: 1.06rem;
	border-radius: var(--radius-md);
}

.btn-arrow {
	font-family: var(--font-mono);
	font-weight: 500;
}

.btn[rel~='external'] .btn-arrow {
	/* External hint: ↗ */
	margin-left: -2px;
}

/* 6. Hero
   -------------------------------------------------------------------------- */
.hero {
	position: relative;
	padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
	overflow: hidden;
}

/* Ambient accent glow + faint grid, hero only */
.hero::before {
	content: '';
	position: absolute;
	inset: -40% -20% auto;
	height: 140%;
	background:
		radial-gradient(560px 380px at 78% 30%, var(--accent-glow), transparent 68%),
		radial-gradient(420px 320px at 12% 82%, rgba(61, 220, 151, 0.07), transparent 70%);
	pointer-events: none;
}

.hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(154, 163, 184, 0.13) 1px, transparent 1px);
	background-size: 26px 26px;
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
	-webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
	pointer-events: none;
}

.hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

.hero__inner--solo {
	grid-template-columns: minmax(0, 1fr);
	max-width: 800px;
}

.hero__eyebrow {
	margin-bottom: var(--sp-4);
}

.hero__title {
	font-size: var(--fs-display);
	font-weight: 700;
	margin-bottom: var(--sp-4);
}

.hero__title em {
	font-style: normal;
	color: var(--accent);
}

.hero__subtitle {
	font-size: var(--fs-lead);
	color: var(--muted);
	max-width: 56ch;
	margin-bottom: var(--sp-6);
}

.hero__subtitle strong {
	color: var(--text);
	font-weight: 600;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-3);
	margin-bottom: var(--sp-5, 20px);
}

.hero__status {
	font-family: var(--font-mono);
	font-size: var(--fs-mono);
	color: var(--faint);
	margin-top: var(--sp-4);
}

.hero__status b {
	color: var(--muted);
	font-weight: 500;
}

@media (max-width: 920px) {
	.hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Phones: shrink hero titles so the longest word on the site
   ("telecommunications", 363px @ 36.8px) fits whole on one line —
   measured 308px @ 8vw/390px, 253px @ 320px. overflow-wrap stays as
   a never-clip safety but no longer triggers. */
@media (max-width: 480px) {
	.hero__title {
		font-size: clamp(1.9rem, 8vw, 2.4rem);
	}
}

/* 7. Terminal window
   -------------------------------------------------------------------------- */
.term {
	background: #0d1119;
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
	font-family: var(--font-mono);
	font-size: 0.86rem;
	line-height: 1.75;
}

.term__bar {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 11px 14px;
	background: rgba(26, 34, 51, 0.55);
	border-bottom: 1px solid var(--line-soft);
}

.term__dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	flex: none;
}

.term__dot:nth-child(1) {
	background: #ff5f57;
}
.term__dot:nth-child(2) {
	background: #febc2e;
}
.term__dot:nth-child(3) {
	background: #28c840;
}

.term__title {
	margin-left: var(--sp-2);
	font-size: 0.76rem;
	color: var(--faint);
	letter-spacing: 0.04em;
}

.term__body {
	padding: var(--sp-4) var(--sp-5);
	overflow-x: auto;
}

.term__body pre {
	margin: 0;
	font-family: inherit;
	white-space: pre;
}

.term__prompt {
	color: var(--green);
}

.term__cmd {
	color: var(--text);
}

.term__out {
	color: var(--muted);
}

.term__hl {
	color: var(--violet);
	font-weight: 600;
}

.term__hl-amber {
	color: var(--amber);
	font-weight: 600;
}

.term__hl-green {
	color: var(--green);
	font-weight: 600;
}

.term__comment {
	color: var(--faint);
}

/* 8. Sections
   -------------------------------------------------------------------------- */
.content-section {
	padding: clamp(3.25rem, 7vw, 5.5rem) 0;
}

.content-section--soft {
	background: var(--bg-soft);
	border-block: 1px solid var(--line-soft);
}

.section-head {
	max-width: 640px;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head p {
	color: var(--muted);
	font-size: var(--fs-lead);
	margin: 0;
}

/* 9. Cards (business + feature)
   -------------------------------------------------------------------------- */
.cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--sp-6);
}

.cards--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--sp-3);
	background: var(--surface);
	border: 1px solid var(--line-soft);
	border-radius: var(--radius-md);
	padding: var(--sp-6);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card::before {
	content: '';
	position: absolute;
	top: -1px;
	left: var(--sp-5);
	right: var(--sp-5);
	height: 2px;
	background: var(--card-accent, var(--accent));
	border-radius: 999px;
	opacity: 0.85;
}

.card:hover {
	transform: translateY(-4px);
	border-color: var(--line);
	box-shadow: var(--shadow-md);
}

.card__badge {
	align-self: flex-start;
}

.card__title {
	font-size: 1.35rem;
	margin: 0;
}

.card__title a {
	color: var(--text);
}

.card__title a:hover {
	color: var(--accent);
	text-decoration: none;
}

.card__blurb {
	color: var(--muted);
	font-size: var(--fs-small);
	margin: 0;
	flex: 1;
}

.card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-3);
	margin-top: var(--sp-2);
}

.card__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-weight: 600;
	font-size: 0.95rem;
}

.card__link--ext {
	color: var(--card-accent, var(--accent));
}

.card__link--ghost {
	color: var(--muted);
}

.card__link--ghost:hover {
	color: var(--text);
}

.card[data-accent='green'] {
	--card-accent: var(--green);
}
.card[data-accent='amber'] {
	--card-accent: var(--amber);
}
.card[data-accent='violet'] {
	--card-accent: var(--violet);
}

@media (max-width: 920px) {
	.cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (min-width: 921px) and (max-width: 1080px) {
	.cards {
		gap: var(--sp-4);
	}
}

/* 10. git log timeline
   -------------------------------------------------------------------------- */
.gitlog {
	position: relative;
	max-width: 780px;
	margin: 0 auto;
	padding-left: 0;
	list-style: none;
}

.gitlog::before {
	content: '';
	position: absolute;
	top: 10px;
	bottom: 10px;
	left: 8px;
	width: 2px;
	background: linear-gradient(
		to bottom,
		var(--green),
		var(--amber),
		var(--violet)
	);
	opacity: 0.5;
	border-radius: 999px;
}

.gitlog__entry {
	position: relative;
	padding: 0 0 var(--sp-8) var(--sp-12);
}

.gitlog__entry:last-child {
	padding-bottom: 0;
}

.gitlog__dot {
	position: absolute;
	left: 0;
	top: 6px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--bg);
	border: 2px solid var(--entry-accent, var(--violet));
	box-shadow: 0 0 12px var(--entry-glow, rgba(155, 140, 255, 0.35));
}

.gitlog__entry[data-accent='green'] {
	--entry-accent: var(--green);
	--entry-glow: rgba(61, 220, 151, 0.35);
}
.gitlog__entry[data-accent='amber'] {
	--entry-accent: var(--amber);
	--entry-glow: rgba(255, 178, 36, 0.35);
}
.gitlog__entry[data-accent='violet'] {
	--entry-accent: var(--violet);
	--entry-glow: rgba(155, 140, 255, 0.35);
}

.gitlog__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--sp-3);
	font-family: var(--font-mono);
	font-size: 0.88rem;
	color: var(--muted);
	margin-bottom: var(--sp-2);
}

.gitlog__hash {
	color: var(--entry-accent, var(--accent));
	opacity: 0.9;
}

.gitlog__year {
	font-weight: 700;
	font-size: 1rem;
	color: var(--text);
	letter-spacing: 0.04em;
}

.gitlog__type {
	text-transform: none;
	color: var(--muted);
}

.gitlog__message {
	font-family: var(--font-display);
	font-size: clamp(1.15rem, 2.2vw, 1.45rem);
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
	text-wrap: pretty;
}

.gitlog__message .gitlog__type {
	font-family: var(--font-mono);
	font-size: 0.72em;
	font-weight: 500;
	color: var(--entry-accent, var(--accent));
	margin-right: 6px;
}

/* 11. Stats strip
   -------------------------------------------------------------------------- */
.stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--sp-6);
	text-align: left;
}

.stat__value {
	font-family: var(--font-display);
	font-size: clamp(1.9rem, 3.6vw, 2.7rem);
	font-weight: 700;
	color: var(--text);
	line-height: 1.1;
}

.stat__value em {
	font-style: normal;
	color: var(--accent);
}

.stat__label {
	font-family: var(--font-mono);
	font-size: 0.82rem;
	color: var(--faint);
	letter-spacing: 0.03em;
	margin-top: var(--sp-2);
}

@media (max-width: 920px) {
	.stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* 12. Prose (markdown bodies)
   -------------------------------------------------------------------------- */
.prose {
	color: var(--muted);
	font-size: 1.04rem;
}

.prose > * + * {
	margin-top: var(--sp-4);
}

.prose h2,
.prose h3 {
	color: var(--text);
	margin-top: var(--sp-12);
}

.prose h2 {
	font-size: 1.55rem;
}

.prose h3 {
	font-size: 1.22rem;
}

.prose strong {
	color: var(--text);
	font-weight: 600;
}

.prose em {
	color: var(--text);
}

.prose a {
	color: var(--accent);
	font-weight: 500;
}

.prose ul,
.prose ol {
	padding-left: 1.3rem;
}

.prose li + li {
	margin-top: var(--sp-2);
}

.prose li::marker {
	color: var(--accent);
}

.prose blockquote {
	margin: var(--sp-6) 0;
	padding: var(--sp-4) var(--sp-6);
	border-left: 3px solid var(--accent);
	background: var(--surface);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	color: var(--text);
	font-size: 1.1rem;
}

.prose code {
	font-family: var(--font-mono);
	font-size: 0.88em;
	background: var(--surface-2);
	border: 1px solid var(--line-soft);
	border-radius: 6px;
	padding: 2px 7px;
	color: var(--accent);
}

.prose hr {
	border: 0;
	height: 1px;
	background: var(--line-soft);
	margin: var(--sp-8) 0;
}

/* 13. CTA band
   -------------------------------------------------------------------------- */
.cta-section {
	position: relative;
	margin: clamp(2rem, 5vw, 4rem) auto;
	overflow: hidden;
}

.cta-section .container {
	position: relative;
	max-width: calc(var(--container) - 4rem);
}

.cta-panel {
	position: relative;
	background:
		radial-gradient(520px 260px at 85% 20%, var(--accent-glow), transparent 70%),
		var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: clamp(2.25rem, 5vw, 3.75rem);
	text-align: center;
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}

.cta-panel::before {
	content: '';
	position: absolute;
	top: 0;
	left: 10%;
	right: 10%;
	height: 3px;
	background: var(--weave);
	border-radius: 999px;
}

.cta-panel::after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(154, 163, 184, 0.1) 1px, transparent 1px);
	background-size: 24px 24px;
	mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 55%);
	-webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 55%);
	pointer-events: none;
}

.cta-panel > * {
	position: relative;
	z-index: 1;
}

.cta-section__title {
	font-size: clamp(1.7rem, 3.6vw, 2.5rem);
	margin-bottom: var(--sp-3);
}

.cta-section__sub {
	color: var(--muted);
	font-size: var(--fs-lead);
	max-width: 52ch;
	margin: 0 auto var(--sp-6);
}

.cta-section__email {
	font-family: var(--font-mono);
	font-size: 1rem;
	color: var(--accent);
	margin-bottom: var(--sp-6);
}

.cta-section__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--sp-3);
}

.cta-section__note {
	font-family: var(--font-mono);
	font-size: 0.82rem;
	color: var(--faint);
	margin-top: var(--sp-4);
}

/* 14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
	background: var(--bg-soft);
	border-top: 1px solid var(--line-soft);
	margin-top: clamp(2rem, 5vw, 4rem);
	padding: clamp(2.5rem, 5vw, 4rem) 0 var(--sp-6);
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: var(--sp-8);
	padding-bottom: var(--sp-8);
	border-bottom: 1px solid var(--line-soft);
}

.site-footer__brand h2 {
	font-size: 1.3rem;
	margin-bottom: var(--sp-2);
}

.site-footer__brand p {
	color: var(--muted);
	font-size: var(--fs-small);
	max-width: 34ch;
}

.site-footer__nav h3 {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--faint);
	margin-bottom: var(--sp-3);
}

.site-footer__nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--sp-2);
}

.site-footer__nav a {
	color: var(--muted);
	font-size: var(--fs-small);
	min-height: 24px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.site-footer__nav a:hover {
	color: var(--text);
	text-decoration: none;
}

.site-footer__nav a .btn-arrow {
	color: var(--faint);
	font-size: 0.8em;
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--sp-3);
	padding-top: var(--sp-6);
	font-family: var(--font-mono);
	font-size: 0.82rem;
	color: var(--faint);
}

.site-footer__bottom a {
	color: var(--muted);
}

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

@media (max-width: 920px) {
	.site-footer__inner {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 560px) {
	.site-footer__inner {
		grid-template-columns: 1fr;
	}
}

/* 15. Reveal animations
   --------------------------------------------------------------------------
   Hidden state only applies once JS has tagged <html class="js"> — without
   JS, or before it loads, all content is fully visible. main.js adds the
   class, IntersectionObserver flips .fl-animation → .fl-animated on scroll. */
.js .fl-animation {
	opacity: 0;
	transform: translateY(16px);
}

.js .fl-animated {
	opacity: 1;
	transform: none;
	transition: opacity 0.55s ease, transform 0.55s ease;
}

/* Stagger cards within a grid */
.cards .fl-animation:nth-child(2) {
	transition-delay: 0.08s;
}
.cards .fl-animation:nth-child(3) {
	transition-delay: 0.16s;
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.fl-animation,
	.fl-animated,
	.js .fl-animation {
		opacity: 1;
		transform: none;
	}
}
