/*
	MyBucks landing page.
	Plain CSS, no build step: cascade layers, native nesting, container queries,
	scroll-driven animations (progressive enhancement) and fluid type.
	Brand colors come from src/HorusBI.WebApp/Content/scss/_variables.scss.
*/

@layer reset, tokens, base, layout, components, sections, motion;

@layer reset {
	*, *::before, *::after { box-sizing: border-box; }
	* { margin: 0; }
	html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
	body { min-height: 100dvh; line-height: 1.55; -webkit-font-smoothing: antialiased; }
	img, svg { display: block; max-width: 100%; }
	ul, ol { padding: 0; list-style: none; }
	a { color: inherit; text-decoration: none; }
	button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
}

@layer tokens {
	:root {
		/* Brand */
		--navy-950: #0B141F;
		--navy-900: #101B28;
		--navy-800: #142130;
		--navy-700: #1E2E40;
		--navy-600: #3C4859;
		--slate-400: #7C9EB2;
		--slate-200: #B3CDD9;
		--lime-500: #C7EF00;
		--lime-400: #D8EC00;
		--lime-700: #92BC00;
		--lime-ink: #4F6600;
		--amber-500: #F5B33D;

		/* Surfaces and text */
		--paper: #F4F7F9;
		--white: #FFFFFF;
		--ink: var(--navy-800);
		--ink-muted: #556375;
		--on-dark: #EAF1F5;
		--on-dark-muted: color-mix(in oklch, var(--slate-200) 80%, transparent);
		--line: color-mix(in oklch, var(--navy-800) 12%, transparent);
		--line-dark: color-mix(in oklch, white 12%, transparent);

		/* Type */
		--font-sans: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
		--step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
		--step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
		--step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
		--step-2: clamp(1.5rem, 1.25rem + 1.1vw, 2.2rem);
		--step-3: clamp(2rem, 1.5rem + 2.3vw, 3.4rem);

		/* Space and shape */
		--gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
		--section-pad: clamp(4rem, 3rem + 5vw, 7.5rem);
		--radius-s: 0.6rem;
		--radius-m: 1rem;
		--radius-l: 1.5rem;
		--shadow-1: 0 1px 2px rgb(16 27 40 / 0.06), 0 4px 16px rgb(16 27 40 / 0.06);
		--shadow-2: 0 24px 60px -20px rgb(4 10 18 / 0.55);
		--header-h: 4.25rem;
		--ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
	}
}

@layer base {
	html {
		scroll-padding-top: calc(var(--header-h) + 1rem);
		color-scheme: light;
		interpolate-size: allow-keywords;
	}
	@media (prefers-reduced-motion: no-preference) {
		html { scroll-behavior: smooth; }
	}

	body {
		font-family: var(--font-sans);
		font-size: var(--step-0);
		color: var(--ink);
		background: var(--white);
	}

	h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
	h1 { font-size: var(--step-3); font-weight: 700; }
	h2 { font-size: var(--step-2); font-weight: 700; }
	h3 { font-size: var(--step-1); font-weight: 600; }
	p { text-wrap: pretty; }

	:focus-visible {
		outline: 3px solid var(--lime-500);
		outline-offset: 3px;
		border-radius: 4px;
	}

	.skip-link {
		position: absolute;
		inset-inline-start: 1rem;
		inset-block-start: -10rem;
		z-index: 100;
		padding: 0.75rem 1rem;
		background: var(--lime-500);
		color: var(--navy-900);
		font-weight: 600;
		border-radius: var(--radius-s);
		&:focus { inset-block-start: 1rem; }
	}
}

@layer layout {
	.container {
		width: min(100% - 2 * var(--gutter), 75rem);
		margin-inline: auto;
	}
	.container--narrow { width: min(100% - 2 * var(--gutter), 50rem); }

	.section {
		padding-block: var(--section-pad);
		content-visibility: auto;
		contain-intrinsic-size: auto 900px;
	}
	.section--paper { background: var(--paper); }
	.section--navy {
		background:
			radial-gradient(60rem 30rem at 85% 0%, color-mix(in oklch, var(--slate-400) 22%, transparent), transparent 70%),
			var(--navy-800);
		color: var(--on-dark);
	}

	.section__head {
		max-width: 44rem;
		margin-block-end: clamp(2.5rem, 2rem + 2vw, 4rem);
		display: grid;
		gap: 0.9rem;
		& p:not(.eyebrow) { color: var(--ink-muted); font-size: var(--step-1); line-height: 1.45; }
	}

	.split {
		display: grid;
		gap: clamp(2.5rem, 2rem + 3vw, 5rem);
		align-items: center;
		@media (width >= 60rem) {
			grid-template-columns: 1.05fr 1fr;
			&.split--reverse > :first-child { order: 2; }
		}
	}
	.split__copy {
		display: grid;
		gap: 1.1rem;
		& > p:not(.eyebrow) { font-size: var(--step-1); line-height: 1.45; color: var(--ink-muted); }
	}
	.section--navy .split__copy > p:not(.eyebrow) { color: var(--on-dark-muted); }

	.trio {
		display: grid;
		gap: 1.25rem;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	}
}

@layer components {
	/* Buttons */
	.btn {
		--btn-bg: transparent;
		--btn-fg: currentColor;
		--btn-bd: transparent;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 0.5rem;
		min-height: 2.75rem;
		padding: 0.6rem 1.15rem;
		border-radius: 999px;
		border: 1.5px solid var(--btn-bd);
		background: var(--btn-bg);
		color: var(--btn-fg);
		font-weight: 600;
		font-size: var(--step--1);
		white-space: nowrap;
		transition: transform 0.2s var(--ease-out), background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
		&:hover { transform: translateY(-1px); }
		&:active { transform: translateY(0); }
	}
	.btn--lg { min-height: 3.25rem; padding-inline: 1.6rem; font-size: var(--step-0); }
	.btn--lime {
		--btn-bg: var(--lime-500);
		--btn-fg: var(--navy-900);
		&:hover { --btn-bg: var(--lime-400); box-shadow: 0 10px 30px -10px color-mix(in oklch, var(--lime-500) 70%, transparent); }
	}
	.btn--navy {
		--btn-bg: var(--navy-800);
		--btn-fg: var(--white);
		&:hover { --btn-bg: var(--navy-700); box-shadow: 0 10px 30px -12px rgb(16 27 40 / 0.6); }
	}
	.btn--ghost {
		--btn-fg: var(--on-dark);
		&:hover { --btn-bg: color-mix(in oklch, white 8%, transparent); }
	}
	.btn--outline {
		--btn-fg: var(--on-dark);
		--btn-bd: color-mix(in oklch, white 30%, transparent);
		&:hover { --btn-bd: var(--lime-500); --btn-fg: var(--lime-500); }
	}
	.btn--outline-navy {
		--btn-fg: var(--navy-800);
		--btn-bd: color-mix(in oklch, var(--navy-800) 45%, transparent);
		&:hover { --btn-bd: var(--navy-800); }
	}

	.eyebrow {
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		font-size: var(--step--1);
		font-weight: 600;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: var(--lime-500);
		&::before {
			content: "";
			inline-size: 1.5rem;
			block-size: 2px;
			background: currentColor;
			border-radius: 2px;
		}
	}
	.eyebrow--dark { color: var(--lime-ink); }

	/* Status dots */
	.dot {
		inline-size: 0.6rem;
		block-size: 0.6rem;
		border-radius: 50%;
		flex: none;
		&.ok { background: var(--lime-500); box-shadow: 0 0 0 3px color-mix(in oklch, var(--lime-500) 25%, transparent); }
		&.warn { background: var(--amber-500); box-shadow: 0 0 0 3px color-mix(in oklch, var(--amber-500) 25%, transparent); }
	}

	/* Cards */
	.card {
		container-type: inline-size;
		position: relative;
		display: grid;
		align-content: start;
		gap: 0.75rem;
		padding: clamp(1.4rem, 1.1rem + 1vw, 2rem);
		background: var(--white);
		border: 1px solid var(--line);
		border-radius: var(--radius-l);
		box-shadow: var(--shadow-1);
		transition: transform 0.3s var(--ease-out), box-shadow 0.3s, border-color 0.3s;
		& p { color: var(--ink-muted); }
		&:hover {
			transform: translateY(-3px);
			border-color: color-mix(in oklch, var(--lime-700) 45%, transparent);
			box-shadow: 0 2px 4px rgb(16 27 40 / 0.05), 0 18px 40px -18px rgb(16 27 40 / 0.3);
		}
	}
	.card--plain { box-shadow: none; background: var(--paper); border-color: transparent; }
	.card--dark {
		background:
			radial-gradient(30rem 20rem at 100% 0%, color-mix(in oklch, var(--lime-500) 14%, transparent), transparent 60%),
			var(--navy-800);
		border-color: var(--navy-700);
		color: var(--on-dark);
		& p { color: var(--on-dark-muted); }
		& .card__icon { background: color-mix(in oklch, var(--lime-500) 16%, transparent); color: var(--lime-500); }
	}
	.card__icon {
		display: grid;
		place-items: center;
		inline-size: 2.75rem;
		block-size: 2.75rem;
		border-radius: 0.8rem;
		background: color-mix(in oklch, var(--lime-500) 28%, white);
		color: var(--navy-800);
		& svg {
			inline-size: 1.4rem;
			fill: none;
			stroke: currentColor;
			stroke-width: 1.8;
			stroke-linecap: round;
			stroke-linejoin: round;
		}
	}

	.chips {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem;
		margin-block-start: 0.25rem;
		& li {
			padding: 0.3rem 0.75rem;
			border-radius: 999px;
			background: var(--paper);
			border: 1px solid var(--line);
			font-size: var(--step--1);
			font-weight: 500;
		}
	}

	.checks {
		display: grid;
		gap: 0.75rem;
		margin-block-start: 0.5rem;
		& li {
			position: relative;
			padding-inline-start: 2.1rem;
			&::before {
				content: "";
				position: absolute;
				inset-inline-start: 0;
				inset-block-start: 0.2rem;
				inline-size: 1.25rem;
				block-size: 1.25rem;
				border-radius: 50%;
				background:
					url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23142130' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 0.8rem no-repeat,
					var(--lime-500);
			}
		}
		& b { font-weight: 600; }
	}
	.section--navy .checks li { color: var(--on-dark); }
}

@layer sections {
	/* Header */
	.site-header {
		position: sticky;
		inset-block-start: 0;
		z-index: 50;
		block-size: var(--header-h);
		background: color-mix(in oklch, var(--navy-900) 82%, transparent);
		backdrop-filter: saturate(160%) blur(14px);
		-webkit-backdrop-filter: saturate(160%) blur(14px);
		border-block-end: 1px solid var(--line-dark);
		color: var(--on-dark);
	}
	.site-header__inner {
		block-size: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1.5rem;
	}
	.brand img { block-size: 2rem; inline-size: auto; }

	.nav-toggle {
		display: grid;
		gap: 5px;
		padding: 0.6rem;
		border-radius: var(--radius-s);
		& span { display: block; inline-size: 1.4rem; block-size: 2px; background: currentColor; border-radius: 2px; }
		@media (width >= 64rem) { display: none; }
	}

	/* Mobile: the nav is a native popover. Desktop: it is always visible inline. */
	.site-nav {
		inset: var(--header-h) 0 auto auto;
		margin: 0;
		inline-size: min(22rem, 100vw);
		max-block-size: calc(100dvh - var(--header-h));
		overflow: auto;
		padding: 1.25rem var(--gutter) 1.75rem;
		background: var(--navy-900);
		color: var(--on-dark);
		border: 1px solid var(--line-dark);
		border-radius: 0 0 0 var(--radius-l);
		box-shadow: var(--shadow-2);
		& ul { display: grid; gap: 0.25rem; }
		& ul a {
			display: block;
			padding: 0.7rem 0.75rem;
			border-radius: var(--radius-s);
			font-weight: 500;
			color: var(--on-dark-muted);
			transition: color 0.2s, background-color 0.2s;
			&:hover { color: var(--white); background: color-mix(in oklch, white 7%, transparent); }
		}
		@media (prefers-reduced-motion: no-preference) {
			transition: opacity 0.25s, translate 0.25s var(--ease-out), overlay 0.25s allow-discrete, display 0.25s allow-discrete;
			opacity: 0;
			translate: 0 -0.5rem;
			&:popover-open {
				opacity: 1;
				translate: 0 0;
				@starting-style { opacity: 0; translate: 0 -0.5rem; }
			}
		}
		@media (prefers-reduced-motion: reduce) {
			&:popover-open { opacity: 1; }
		}
	}
	.site-nav__actions {
		display: grid;
		gap: 0.6rem;
		margin-block-start: 1rem;
		padding-block-start: 1rem;
		border-block-start: 1px solid var(--line-dark);
	}

	@media (width >= 64rem) {
		.site-nav,
		.site-nav:not(:popover-open) {
			display: flex;
			position: static;
			inset: auto;
			align-items: center;
			gap: 1.5rem;
			inline-size: auto;
			max-block-size: none;
			overflow: visible;
			padding: 0;
			background: none;
			border: 0;
			box-shadow: none;
			opacity: 1;
			translate: none;
			& ul { display: flex; gap: 0.15rem; }
			& ul a { padding: 0.5rem 0.7rem; font-size: var(--step--1); }
		}
		.site-nav__actions {
			display: flex;
			margin: 0;
			padding: 0;
			border: 0;
		}
	}

	/* Hero */
	.hero {
		position: relative;
		isolation: isolate;
		overflow: clip;
		margin-block-start: calc(-1 * var(--header-h));
		padding-block: calc(var(--header-h) + clamp(3rem, 2rem + 5vw, 6.5rem)) clamp(4rem, 3rem + 5vw, 7rem);
		background: var(--navy-900);
		color: var(--on-dark);
	}
	.hero__glow {
		position: absolute;
		inset: 0;
		z-index: -1;
		background:
			radial-gradient(40rem 26rem at 78% 30%, color-mix(in oklch, var(--lime-500) 20%, transparent), transparent 65%),
			radial-gradient(36rem 30rem at 10% 90%, color-mix(in oklch, var(--slate-400) 28%, transparent), transparent 70%);
		&::after {
			/* Subtle grid that fades toward the edges */
			content: "";
			position: absolute;
			inset: 0;
			background-image:
				linear-gradient(color-mix(in oklch, white 5%, transparent) 1px, transparent 1px),
				linear-gradient(90deg, color-mix(in oklch, white 5%, transparent) 1px, transparent 1px);
			background-size: 3.5rem 3.5rem;
			mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
		}
	}
	.hero__grid {
		display: grid;
		gap: clamp(3rem, 2rem + 4vw, 5rem);
		align-items: center;
		@media (width >= 64rem) { grid-template-columns: 1.1fr 1fr; }
	}
	.hero__copy {
		display: grid;
		gap: 1.4rem;
		& .lead { font-size: var(--step-1); line-height: 1.5; color: var(--on-dark-muted); max-width: 38rem; }
	}
	.hl {
		background: linear-gradient(100deg, var(--lime-400), var(--lime-500) 60%, var(--slate-200));
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
	}
	.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
	.hero__bullets {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem 1.25rem;
		font-size: var(--step--1);
		color: var(--on-dark-muted);
		& li { display: inline-flex; align-items: center; gap: 0.45rem; }
		& li::before { content: ""; inline-size: 0.4rem; block-size: 0.4rem; border-radius: 50%; background: var(--lime-500); }
	}

	/* Hero mock-up */
	.mock {
		position: relative;
		max-width: 34rem;
		justify-self: center;
		inline-size: 100%;
	}
	.mock__window {
		border-radius: var(--radius-l);
		background: linear-gradient(180deg, color-mix(in oklch, white 9%, var(--navy-800)), var(--navy-800));
		border: 1px solid var(--line-dark);
		box-shadow: var(--shadow-2), inset 0 1px 0 color-mix(in oklch, white 10%, transparent);
		overflow: hidden;
	}
	.mock__bar {
		display: flex;
		align-items: center;
		gap: 0.4rem;
		padding: 0.75rem 1rem;
		border-block-end: 1px solid var(--line-dark);
		font-size: 0.75rem;
		color: var(--on-dark-muted);
		& i { inline-size: 0.6rem; block-size: 0.6rem; border-radius: 50%; background: color-mix(in oklch, white 18%, transparent); }
		& span { margin-inline-start: 0.6rem; }
	}
	.mock__body { display: grid; gap: 1rem; padding: 1.1rem; }
	.mock__kpis {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 0.6rem;
	}
	.kpi {
		display: grid;
		gap: 0.15rem;
		padding: 0.7rem;
		border-radius: var(--radius-s);
		background: color-mix(in oklch, white 5%, transparent);
		border: 1px solid var(--line-dark);
		& small { font-size: 0.68rem; color: var(--on-dark-muted); }
		& strong { font-size: clamp(0.8rem, 0.7rem + 0.4vw, 1rem); color: var(--white); white-space: nowrap; }
		& em { font-style: normal; font-size: 0.68rem; color: var(--on-dark-muted); }
		& em.up { color: var(--lime-500); }
	}
	.mock__chart {
		padding: 0.8rem;
		border-radius: var(--radius-s);
		background: color-mix(in oklch, white 4%, transparent);
		& small { font-size: 0.7rem; color: var(--on-dark-muted); }
	}
	.bars {
		display: flex;
		align-items: end;
		gap: 0.6rem;
		block-size: 6.5rem;
		margin-block-start: 0.6rem;
		& span {
			flex: 1;
			border-radius: 0.35rem 0.35rem 0.15rem 0.15rem;
			background: linear-gradient(180deg, var(--lime-500), color-mix(in srgb, var(--lime-700) 55%, var(--navy-800)));
			transform-origin: bottom;
		}
		& span:nth-child(1) { block-size: 46%; }
		& span:nth-child(2) { block-size: 58%; }
		& span:nth-child(3) { block-size: 52%; }
		& span:nth-child(4) { block-size: 70%; }
		& span:nth-child(5) { block-size: 78%; }
		& span:nth-child(6) { block-size: 92%; }
	}
	.mock__recon {
		display: grid;
		gap: 0.35rem;
		font-size: 0.78rem;
		& li {
			display: flex;
			align-items: center;
			gap: 0.6rem;
			padding: 0.55rem 0.7rem;
			border-radius: var(--radius-s);
			background: color-mix(in oklch, white 4%, transparent);
		}
		& span { margin-inline-start: auto; color: var(--on-dark-muted); white-space: nowrap; }
	}
	.mock__toast {
		position: absolute;
		inset-inline-start: -1.25rem;
		inset-block-end: -1.5rem;
		display: flex;
		align-items: center;
		gap: 0.75rem;
		max-width: 17rem;
		padding: 0.8rem 1rem;
		border-radius: var(--radius-m);
		background: var(--white);
		color: var(--ink);
		box-shadow: var(--shadow-2);
		& div { display: grid; }
		& strong { font-size: 0.85rem; }
		& small { font-size: 0.75rem; color: var(--ink-muted); }
		@media (width < 40rem) { inset-inline-start: 0.5rem; }
	}

	/* Stats strip */
	.stats {
		background: var(--navy-800);
		color: var(--on-dark);
		border-block: 1px solid var(--line-dark);
	}
	.stats__grid {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	}
	.stat {
		display: grid;
		gap: 0.25rem;
		padding: 2rem 1.25rem;
		text-align: center;
		& + .stat { border-inline-start: 1px solid var(--line-dark); }
		& strong {
			font-size: var(--step-3);
			line-height: 1;
			color: var(--lime-500);
			font-variant-numeric: tabular-nums;
		}
		& span { font-size: var(--step--1); color: var(--on-dark-muted); }
		@media (width < 30rem) { & + .stat { border-inline-start: 0; border-block-start: 1px solid var(--line-dark); } }
	}

	/* Steps */
	.steps {
		display: grid;
		gap: 1.25rem;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
		counter-reset: step;
	}
	.step {
		position: relative;
		display: grid;
		gap: 0.75rem;
		padding: 2rem 1.75rem;
		border-radius: var(--radius-l);
		background: var(--paper);
		& p { color: var(--ink-muted); }
	}
	.step__num {
		display: grid;
		place-items: center;
		inline-size: 2.75rem;
		block-size: 2.75rem;
		border-radius: 50%;
		background: var(--navy-800);
		color: var(--lime-500);
		font-weight: 700;
		font-size: var(--step-1);
	}

	/* Feature bento grid */
	.bento {
		display: grid;
		gap: 1.25rem;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
		grid-auto-flow: dense;
		@media (width >= 60rem) {
			grid-template-columns: repeat(3, 1fr);
			& .card--wide { grid-column: span 2; }
			& .card--tall { grid-row: span 2; }
		}
	}
	.card--feature {
		background:
			radial-gradient(28rem 16rem at 100% 0%, color-mix(in oklch, var(--lime-500) 18%, transparent), transparent 70%),
			var(--white);
	}
	.mini-dre {
		display: grid;
		gap: 0.4rem;
		margin-block-start: auto;
		padding-block-start: 1rem;
		font-size: var(--step--1);
		& div {
			display: flex;
			justify-content: space-between;
			padding: 0.55rem 0.8rem;
			border-radius: var(--radius-s);
			background: color-mix(in oklch, white 6%, transparent);
		}
		& b { font-variant-numeric: tabular-nums; }
		& .total { background: var(--lime-500); color: var(--navy-900); font-weight: 600; }
	}
	/* Container query: inside a wide card, the DRE sample sits side by side with the text */
	@container (width >= 30rem) {
		.mini-dre { grid-template-columns: 1fr 1fr; }
	}

	/* Franchise benchmark */
	.benchmark {
		display: grid;
		gap: 0.9rem;
		padding: clamp(1.4rem, 1rem + 1.5vw, 2.25rem);
		border-radius: var(--radius-l);
		background: color-mix(in oklch, white 6%, transparent);
		border: 1px solid var(--line-dark);
		box-shadow: var(--shadow-2);
	}
	.benchmark__title {
		font-weight: 600;
		& small { font-weight: 400; color: var(--on-dark-muted); }
	}
	.benchmark__row {
		display: grid;
		grid-template-columns: 2.5rem 1fr;
		align-items: center;
		gap: 0.75rem;
		font-size: var(--step--1);
		color: var(--on-dark-muted);
	}
	.track {
		position: relative;
		block-size: 0.85rem;
		border-radius: 999px;
		background: color-mix(in oklch, white 8%, transparent);
		& .you {
			position: absolute;
			inset-block: 0;
			inset-inline-start: 0;
			border-radius: inherit;
			background: linear-gradient(90deg, var(--lime-700), var(--lime-500));
		}
		& .median {
			position: absolute;
			inset-block: -0.3rem;
			inline-size: 3px;
			border-radius: 2px;
			background: var(--slate-200);
		}
		& .b1 { inline-size: 52%; } & .m1 { inset-inline-start: 58%; }
		& .b2 { inline-size: 61%; } & .m2 { inset-inline-start: 57%; }
		& .b3 { inline-size: 66%; } & .m3 { inset-inline-start: 59%; }
		& .b4 { inline-size: 72%; } & .m4 { inset-inline-start: 60%; }
		& .b5 { inline-size: 79%; } & .m5 { inset-inline-start: 61%; }
	}
	.benchmark__legend {
		display: flex;
		gap: 1.25rem;
		font-size: var(--step--1);
		color: var(--on-dark-muted);
		& span { display: inline-flex; align-items: center; gap: 0.45rem; }
		& .lg-you::before { content: ""; inline-size: 1rem; block-size: 0.5rem; border-radius: 999px; background: var(--lime-500); }
		& .lg-median::before { content: ""; inline-size: 3px; block-size: 0.9rem; background: var(--slate-200); }
	}

	/* Integrations marquee */
	.marquee {
		--gap: 0.9rem;
		display: flex;
		gap: var(--gap);
		overflow: hidden;
		padding-block: 0.45rem;
		mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
		&:hover .marquee__track { animation-play-state: paused; }
	}
	.marquee__track {
		display: flex;
		flex: none;
		gap: var(--gap);
		min-inline-size: 100%;
		justify-content: space-around;
		& li {
			padding: 0.8rem 1.4rem;
			border-radius: 999px;
			background: var(--paper);
			border: 1px solid var(--line);
			font-weight: 600;
			color: var(--navy-600);
			white-space: nowrap;
		}
	}

	/* Phone mock-up */
	.phone {
		justify-self: center;
		inline-size: min(100%, 20rem);
		padding: 0.75rem;
		border-radius: 2.6rem;
		background: var(--navy-900);
		box-shadow: var(--shadow-2), inset 0 0 0 2px color-mix(in oklch, white 12%, transparent);
	}
	.phone__screen {
		display: grid;
		gap: 0.8rem;
		padding: 2.25rem 1rem 1.25rem;
		border-radius: 2rem;
		background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
		color: var(--on-dark);
		position: relative;
		&::before {
			/* Camera notch */
			content: "";
			position: absolute;
			inset-block-start: 0.7rem;
			inset-inline: 50%;
			translate: -50% 0;
			inline-size: 5.5rem;
			block-size: 1.2rem;
			border-radius: 999px;
			background: var(--navy-950);
		}
	}
	.phone__hello { font-size: 0.85rem; color: var(--on-dark-muted); }
	.phone__card {
		display: grid;
		gap: 0.4rem;
		padding: 0.9rem;
		border-radius: 1.1rem;
		background: color-mix(in oklch, white 6%, transparent);
		& small { font-size: 0.72rem; color: var(--on-dark-muted); }
		& strong { font-size: 1.35rem; }
	}
	.phone__card--lime {
		background: var(--lime-500);
		color: var(--navy-900);
		& small { color: color-mix(in oklch, var(--navy-900) 75%, transparent); }
	}
	.meter {
		block-size: 0.45rem;
		border-radius: 999px;
		background: color-mix(in oklch, var(--navy-900) 18%, transparent);
		& i { display: block; block-size: 100%; inline-size: 82%; border-radius: inherit; background: var(--navy-900); }
	}
	.cash {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 0.4rem;
		font-size: 0.8rem;
		& span { display: grid; padding: 0.5rem; border-radius: 0.7rem; background: color-mix(in oklch, white 6%, transparent); }
		& b { color: var(--lime-500); font-size: 0.7rem; }
	}
	.spend {
		display: grid;
		gap: 0.3rem;
		font-size: 0.82rem;
		& li { display: flex; justify-content: space-between; }
		& b { color: var(--lime-500); }
	}

	/* FAQ */
	.faq {
		display: grid;
		gap: 0.75rem;
		& details {
			border-radius: var(--radius-m);
			background: var(--white);
			border: 1px solid var(--line);
			transition: border-color 0.2s, box-shadow 0.2s;
			&[open] { border-color: color-mix(in oklch, var(--lime-700) 50%, transparent); box-shadow: var(--shadow-1); }
		}
		& summary {
			display: flex;
			justify-content: space-between;
			align-items: center;
			gap: 1rem;
			padding: 1.15rem 1.35rem;
			font-weight: 600;
			cursor: pointer;
			list-style: none;
			&::-webkit-details-marker { display: none; }
			&::after {
				content: "";
				flex: none;
				inline-size: 0.65rem;
				block-size: 0.65rem;
				border-inline-end: 2px solid currentColor;
				border-block-end: 2px solid currentColor;
				rotate: 45deg;
				translate: 0 -0.15rem;
				transition: rotate 0.25s var(--ease-out);
			}
		}
		& details[open] summary::after { rotate: -135deg; translate: 0 0.1rem; }
		& details p { padding: 0 1.35rem 1.25rem; color: var(--ink-muted); }
		/* Animates the open/close height where ::details-content is supported */
		@media (prefers-reduced-motion: no-preference) {
			& details::details-content {
				block-size: 0;
				overflow: clip;
				transition: block-size 0.3s var(--ease-out), content-visibility 0.3s allow-discrete;
			}
			& details[open]::details-content { block-size: auto; }
		}
	}

	/* Final CTA */
	.cta {
		padding-block: clamp(4rem, 3rem + 5vw, 7rem);
		background:
			radial-gradient(40rem 20rem at 0% 100%, color-mix(in oklch, white 35%, transparent), transparent 70%),
			linear-gradient(120deg, var(--lime-400), var(--lime-500) 50%, var(--lime-700));
		color: var(--navy-900);
	}
	.cta__inner {
		display: grid;
		justify-items: center;
		gap: 1.1rem;
		text-align: center;
		& h2 { font-size: var(--step-3); }
		& p { font-size: var(--step-1); max-width: 38rem; color: color-mix(in oklch, var(--navy-900) 80%, transparent); }
		& .hero__ctas { justify-content: center; margin-block-start: 0.5rem; }
		& .wa-icon { flex: none; }
		& .cta__contact { font-size: var(--step-0); }
		& .cta__contact a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
	}

	/* Footer */
	.site-footer {
		padding-block: 3rem 2rem;
		background: var(--navy-950);
		color: var(--on-dark-muted);
		font-size: var(--step--1);
	}
	.site-footer__inner {
		display: grid;
		gap: 2rem;
		& > div { display: grid; gap: 0.75rem; }
		& nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
		& nav a:hover { color: var(--white); }
		@media (width >= 48rem) {
			grid-template-columns: 1fr auto;
			align-items: center;
		}
	}
	.site-footer__legal {
		grid-column: 1 / -1;
		padding-block-start: 1.5rem;
		border-block-start: 1px solid var(--line-dark);
	}

	/* 404 page (no sticky header above it) */
	.not-found {
		min-block-size: 100dvh;
		margin-block-start: 0;
		padding-block: 4rem;
		display: grid;
		align-items: center;
	}
	.not-found__inner { justify-items: start; }
}

@layer motion {
	@media (prefers-reduced-motion: no-preference) {
		/* Infinite marquee */
		.marquee__track { animation: marquee 40s linear infinite; }
		.marquee--reverse .marquee__track { animation-direction: reverse; animation-duration: 46s; }

		/* Hero entrance */
		.hero__copy > * { animation: rise 0.8s var(--ease-out) both; }
		.hero__copy > :nth-child(2) { animation-delay: 0.08s; }
		.hero__copy > :nth-child(3) { animation-delay: 0.16s; }
		.hero__copy > :nth-child(4) { animation-delay: 0.24s; }
		.hero__copy > :nth-child(5) { animation-delay: 0.32s; }
		.mock { animation: rise 1s 0.2s var(--ease-out) both; }
		.mock__toast { animation: pop 0.6s 1.1s var(--ease-out) both, float 6s 1.7s ease-in-out infinite; }
		.bars span { animation: grow 0.9s var(--ease-out) both; }
		.bars span:nth-child(2) { animation-delay: 0.45s; }
		.bars span:nth-child(3) { animation-delay: 0.55s; }
		.bars span:nth-child(4) { animation-delay: 0.65s; }
		.bars span:nth-child(5) { animation-delay: 0.75s; }
		.bars span:nth-child(6) { animation-delay: 0.85s; }

		/* Reveal on scroll: CSS scroll-driven animation where supported... */
		@supports (animation-timeline: view()) {
			.reveal {
				animation: rise linear both;
				animation-timeline: view();
				animation-range: entry 0% entry 55%;
			}
			.track .you {
				animation: fill linear both;
				animation-timeline: view();
				animation-range: entry 20% cover 45%;
			}
		}
		/* ...and an IntersectionObserver fallback (site.js adds .is-visible) everywhere else */
		@supports not (animation-timeline: view()) {
			.js .reveal { opacity: 0; translate: 0 1.5rem; transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out); }
			.js .reveal.is-visible { opacity: 1; translate: 0 0; }
		}
	}

	@keyframes rise { from { opacity: 0; translate: 0 1.5rem; } }
	@keyframes pop { from { opacity: 0; scale: 0.9; translate: 0 0.75rem; } }
	@keyframes float { 50% { translate: 0 -0.4rem; } }
	@keyframes grow { from { scale: 1 0; } }
	@keyframes fill { from { inline-size: 0; } }
	@keyframes marquee { to { translate: calc(-100% - var(--gap)) 0; } }
}

/* Cookie consent banner (assets/js/analytics.js) and privacy page. Unlayered on purpose. */
.consent {
	position: fixed; left: 16px; bottom: 16px; z-index: 80; max-width: 560px;
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
	background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-m);
	padding: 16px 18px; box-shadow: 0 10px 30px rgb(11 20 31 / .25); font-size: var(--step--1); line-height: 1.5;
}
.consent__text { flex: 1 1 280px; }
.consent__text a { color: var(--lime-ink); font-weight: 600; text-decoration: underline; }
.consent__actions { display: flex; gap: 8px; }
.consent__btn { min-height: 40px; padding: 8px 16px; border-radius: var(--radius-s); font-weight: 600; border: 2px solid transparent; }
.consent__btn--primary { background: var(--navy-800); color: var(--white); }
.consent__btn--primary:hover { background: var(--navy-950); }
.consent__btn--secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.consent__btn--secondary:hover { border-color: var(--ink); }
@media (max-width: 640px) {
	.consent { left: 8px; right: 8px; bottom: 8px; max-width: none; }
	.consent__actions { width: 100%; }
	.consent__btn { flex: 1; }
}
@media print { .consent { display: none; } }

.legal-page { background: var(--paper); color: var(--ink); min-height: 100dvh; }
.legal-page__bar { background: var(--navy-900); padding-block: 1rem; }
.legal-page__body { max-width: 46rem; margin-inline: auto; padding: 3rem var(--gutter) 5rem; }
.legal-page__body h1 { font-size: var(--step-3); line-height: 1.15; margin-block-end: 1rem; }
.legal-page__body h2 { font-size: var(--step-1); margin-block: 2rem .6rem; }
.legal-page__body p { margin-block-end: 1rem; color: var(--ink-muted); }
.legal-page__body a { color: var(--lime-ink); font-weight: 600; text-decoration: underline; }
