/* Athla, the landing page. Colours, curves and sizes are the app's light theme
   (packages/mobile/src/design-system/tokens.ts). */

@font-face {
	font-family: "Inter";
	src: url("fonts/inter-latin-wght.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Instrument Serif";
	src: url("fonts/instrument-serif-italic.ttf") format("truetype");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

:root {
	color-scheme: light;

	--bg: #f3f4f6;
	--surface: #ffffff;
	--border: #e5e7eb;
	--border-strong: #d1d5db;
	--text: #111827;
	--text-2: #666d7a;
	--text-lead: #4a5160;
	--ink: #0b0f1a;
	--quiet: #eef0f3;

	--accent: #ff4d00;
	--accent-light: #ff8a00;
	--accent-pressed: #d93f00;
	--accent-text: #c43b00;
	--accent-tint-08: #ff4d0014;
	--accent-tint-16: #ff4d0029;
	--accent-tint-22: #ff4d0038;
	--green: #00d084;
	--green-text: #007a50;
	--blue: #3b82f6;
	--blue-text: #1d4ed8;
	--water: #22b8e6;
	--alert-text: #a85400;
	--logo: #f4511e;

	/* The blueprint the home screen is drawn on before it is built. */
	--plan: rgba(29, 78, 216, 0.5);
	--plan-soft: rgba(29, 78, 216, 0.1);
	--plan-line: rgba(29, 78, 216, 0.07);

	--cta: linear-gradient(135deg, var(--accent) 0%, var(--accent) 60%, var(--accent-light) 100%);
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
	--ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);

	--gutter: clamp(16px, 4vw, 40px);
	--nav-height: 64px;
	--shadow-card: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px -16px rgba(17, 24, 39, 0.18);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* An anchor lands under the floating bar, not behind it. */
	scroll-padding-top: calc(var(--nav-height) + 28px);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

p,
h1,
h2,
h3,
figure {
	margin: 0;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 3px solid var(--blue-text);
	outline-offset: 3px;
	border-radius: 6px;
}

.sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

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

.i {
	width: 1em;
	height: 1em;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.i-fill {
	fill: currentColor;
	stroke: none;
}

/* ——— Navigation: the page's width at the top, then a floating rail once the page scrolls ——— */

.nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	pointer-events: none;
}

.nav-rail {
	max-width: min(1320px, 100%);
	margin: 0 auto;
	border-radius: 0;
	background-color: rgba(255, 255, 255, 0);
	pointer-events: auto;
	transition:
		max-width 420ms var(--ease),
		margin 420ms var(--ease),
		border-radius 420ms var(--ease),
		background-color 420ms var(--ease),
		box-shadow 420ms var(--ease);
}

.nav-bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	height: var(--nav-height);
	padding: 0 var(--gutter);
	transition:
		height 420ms var(--ease),
		padding 420ms var(--ease);
}

.nav-bar > .brand {
	justify-self: start;
}

.nav-bar > .btn {
	grid-column: 3;
	justify-self: end;
}

.nav-links {
	display: flex;
	gap: 28px;
}

.nav-links a {
	border-radius: 6px;
	color: var(--text-lead);
	font-size: 14.5px;
	font-weight: 550;
	text-decoration: none;
	transition: color 150ms;
}

.nav-links a:hover {
	color: var(--text);
}

.nav.is-detached .nav-rail {
	max-width: min(1152px, calc(100% - 2 * var(--gutter)));
	margin-top: 12px;
	border-radius: 28px;
	/* 85 % white: the links hold 4.5:1 even over the phone's ink bezel (#0B0F1A). */
	background-color: rgba(255, 255, 255, 0.85);
	-webkit-backdrop-filter: blur(18px) saturate(1.7);
	backdrop-filter: blur(18px) saturate(1.7);
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.6),
		0 0 0 1px rgba(17, 24, 39, 0.06),
		0 4px 14px rgba(17, 24, 39, 0.1);
}

.nav.is-detached .nav-bar {
	height: 56px;
	padding: 0 8px 0 22px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	border-radius: 8px;
}

.brand-mark {
	height: 30px;
	width: auto;
}

.brand-mark .ink,
.brand-name {
	fill: var(--text);
}

.brand-mark .spark {
	fill: var(--logo);
}

.brand-name {
	height: 12px;
	width: auto;
	/* The A's counters are holes, as the app draws them (LogoLockup, fillRule evenodd). */
	fill-rule: evenodd;
}

/* ——— Hero: the words centred, then the phone among four cards ——— */

.hero {
	max-width: 1320px;
	margin: 0 auto;
	padding: calc(var(--nav-height) + clamp(24px, 5vw, 56px)) var(--gutter) 96px;
}

.hero-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 820px;
	margin: 0 auto;
	text-align: center;
	container-type: inline-size;
}

.kicker {
	color: var(--text-2);
	font-size: 14px;
	font-weight: 550;
}

.kicker-state {
	color: var(--accent-text);
	font-weight: 650;
}

h1 {
	margin-top: 20px;
	font-size: clamp(2.4rem, 10.5cqi, 5.4rem);
	font-weight: 800;
	line-height: 0.96;
	letter-spacing: -0.045em;
}

.h1-line {
	display: block;
}

.h1-accent {
	padding-bottom: 0.06em;
	background: linear-gradient(100deg, var(--accent-pressed) 0%, var(--accent) 55%, #ff5a0a 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.h1-accent em {
	font-family: "Instrument Serif", Georgia, serif;
	font-style: italic;
	font-weight: 400;
	font-size: 1.12em;
	letter-spacing: -0.01em;
	/* The full stop sits close to the italic, as it would after an upright word. */
	margin-right: -0.04em;
}

.lead {
	max-width: 32em;
	margin-top: 22px;
	color: var(--text-lead);
	font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
	line-height: 1.6;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 52px;
	padding: 0 22px;
	border: 0;
	border-radius: 14px;
	font: inherit;
	font-size: 16px;
	font-weight: 650;
	text-decoration: none;
	cursor: pointer;
	transition:
		transform 150ms var(--ease),
		box-shadow 250ms var(--ease),
		background-color 150ms;
}

.btn .i {
	font-size: 19px;
}

.btn-nav .i {
	font-size: 17px;
}

.btn-primary {
	background: var(--cta);
	color: var(--ink);
	box-shadow:
		0 12px 28px -12px rgba(255, 77, 0, 0.65),
		inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:hover {
	transform: translateY(-1px);
	box-shadow:
		0 18px 36px -14px rgba(255, 77, 0, 0.7),
		inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:active {
	transform: translateY(0) scale(0.98);
	box-shadow: 0 0 0 6px var(--accent-tint-22);
}

.hero-head > .btn {
	margin-top: 32px;
}

/* The bar's button: smaller, a pill in the rail's pill. */
.btn-nav {
	gap: 8px;
	height: 40px;
	padding: 0 18px;
	border-radius: 999px;
	font-size: 14px;
	box-shadow:
		0 6px 16px -8px rgba(255, 77, 0, 0.6),
		inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* The phone, then the cards under it; on a wide screen, the cards around it. */

.showcase {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	max-width: 1180px;
	margin: clamp(48px, 7vw, 80px) auto 0;
}

.features {
	display: grid;
	gap: 12px;
	width: 100%;
	max-width: 720px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Each card in its dimension's colour, as in the section below: the score's ring at 64,
   training's accent, health's green, the community's blue. */
.feature {
	--tone: var(--accent-light);
	--tint: rgba(255, 138, 0, 0.13);
	--edge: rgba(255, 138, 0, 0.26);
	padding: 20px;
	border: 1px solid var(--edge);
	border-radius: 14px;
	background: linear-gradient(155deg, var(--tint), rgba(255, 255, 255, 0.82) 64%);
}

.feature-training {
	--tone: var(--accent);
	--tint: rgba(255, 77, 0, 0.11);
	--edge: rgba(255, 77, 0, 0.22);
}

.feature-health {
	--tone: var(--green);
	--tint: rgba(0, 208, 132, 0.13);
	--edge: rgba(0, 208, 132, 0.28);
}

.feature-community {
	--tone: var(--blue);
	--tint: rgba(59, 130, 246, 0.11);
	--edge: rgba(59, 130, 246, 0.24);
}

.feature-icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--tone);
	color: #fff;
	font-size: 19px;
}

.feature h2 {
	margin-top: 14px;
	font-size: 17px;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.feature p {
	margin-top: 6px;
	color: var(--text-2);
	font-size: 14px;
	line-height: 1.5;
}

.device-wrap {
	--s: 0.74;
	--bezel: 10px;
	position: relative;
	order: -1;
}

.device {
	position: relative;
	padding: var(--bezel);
	border-radius: calc(48px * var(--s) + var(--bezel));
	background: linear-gradient(150deg, #2a3140, var(--ink) 40%, #1c2230);
	box-shadow:
		inset 0 0 0 1.5px #3a4252,
		inset 0 0 0 3px #0b0f1a,
		0 40px 80px -36px rgba(11, 15, 26, 0.45),
		0 12px 24px -12px rgba(11, 15, 26, 0.18);
}

.viewport {
	position: relative;
	width: calc(390px * var(--s));
	height: calc(844px * var(--s));
	overflow: hidden;
	border-radius: calc(48px * var(--s));
	background: var(--bg);
	isolation: isolate;
}

.layer {
	position: absolute;
	top: 0;
	left: 0;
	width: 390px;
	height: 844px;
	transform: scale(var(--s));
	transform-origin: 0 0;
}

.js .viewport {
	--p: 0;
}

.layer-render {
	clip-path: inset(0 0 calc((1 - var(--p, 1)) * 100%) 0);
}

.scan {
	position: absolute;
	z-index: 3;
	left: 0;
	right: 0;
	top: calc(var(--p, 1) * 100%);
	height: 2px;
	margin-top: -1px;
	background: linear-gradient(
		90deg,
		transparent,
		var(--accent) 18%,
		var(--accent-light) 82%,
		transparent
	);
	box-shadow: 0 0 16px 3px rgba(255, 77, 0, 0.4);
	opacity: 0;
	transition: opacity 250ms;
	pointer-events: none;
}

.scan::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2px;
	height: 72px;
	background: linear-gradient(to top, rgba(255, 106, 0, 0.14), transparent);
}

.is-scanning .scan {
	opacity: 1;
}

/* The ring of the 404 page, turning while the page is « en construction ». */

.building-ring {
	width: 44px;
	height: 44px;
	flex: none;
	animation: turn 6s linear infinite;
}

.building-ring circle {
	fill: none;
	stroke-width: 4.5;
}

.building-ring .t {
	stroke: var(--border);
}

.building-ring .a {
	stroke: var(--accent);
	stroke-linecap: round;
	stroke-dasharray: 100;
	stroke-dashoffset: 58;
	animation: breathe 3s var(--ease-in-out) infinite alternate;
}

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

@keyframes breathe {
	from {
		stroke-dashoffset: 66;
	}
	to {
		stroke-dashoffset: 52;
	}
}

/* ——— The home screen (SC-01), drawn at 390 × 844 and scaled ——— */

.screen {
	position: relative;
	width: 390px;
	height: 844px;
	overflow: hidden;
	background: var(--bg);
	color: var(--text);
	font-size: 15px;
	line-height: 1.3;
	letter-spacing: -0.005em;
}

.island {
	position: absolute;
	top: 11px;
	left: 50%;
	width: 120px;
	height: 34px;
	margin-left: -60px;
	border-radius: 20px;
	background: var(--ink);
}

.sb {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 54px;
	padding: 4px 30px 0 44px;
	font-size: 16px;
	font-weight: 650;
}

.sb-icons {
	width: 72px;
	height: 14px;
	fill: var(--text);
}

.sb-icons .sb-wifi {
	fill: none;
	stroke: var(--text);
	stroke-width: 1.9;
	stroke-linecap: round;
}

.sb-icons .sb-cell {
	fill: none;
	stroke: rgba(17, 24, 39, 0.4);
	stroke-width: 1;
}

.sb-icons .sb-tip {
	fill: rgba(17, 24, 39, 0.4);
}

.hh {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 56px;
	padding: 0 16px;
}

.avatar {
	position: relative;
	width: 44px;
	height: 44px;
	flex: none;
}

.avatar svg {
	width: 44px;
	height: 44px;
	transform: rotate(-90deg);
}

.avatar circle,
.ring circle {
	fill: none;
}

.avatar .t {
	stroke: var(--border);
	stroke-width: 3;
}

.avatar .a {
	--off: 30;
	stroke: var(--accent);
	stroke-width: 3;
	stroke-linecap: round;
}

.avatar-in {
	position: absolute;
	inset: 6px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--accent-tint-16);
	color: var(--accent-text);
	font-size: 12.5px;
	font-weight: 750;
}

.avatar-lvl {
	position: absolute;
	right: -4px;
	bottom: -3px;
	display: grid;
	place-items: center;
	width: 19px;
	height: 19px;
	border: 2px solid var(--bg);
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-size: 10px;
	font-weight: 800;
}

.hello {
	flex: 1;
	font-size: 20px;
	font-weight: 750;
	letter-spacing: -0.015em;
}

.flame {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 16px;
	font-weight: 750;
}

.flame .i {
	color: var(--accent);
	font-size: 21px;
}

.share {
	margin-left: 8px;
	font-size: 21px;
}

.sc {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 182px;
	padding-top: 6px;
}

.ring {
	position: relative;
	display: grid;
	place-items: center;
	width: 146px;
	height: 146px;
}

.ring svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.ring .t {
	stroke: var(--border);
	stroke-width: 10;
}

.ring .a {
	--off: 36;
	stroke: var(--accent-light);
	stroke-width: 10;
	stroke-linecap: round;
}

.avatar .a,
.ring .a {
	stroke-dasharray: 100;
	stroke-dashoffset: var(--off);
	transition:
		stroke-dashoffset 1100ms var(--ease),
		opacity 120ms;
}

.ring-n {
	position: relative;
	font-size: 54px;
	font-weight: 800;
	letter-spacing: -2px;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.trend {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	color: var(--text-2);
	font-size: 14px;
	transition:
		opacity 400ms var(--ease) 350ms,
		translate 400ms var(--ease) 350ms;
}

.trend .band {
	color: var(--accent-text);
	font-weight: 750;
}

.trend .up {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: var(--green-text);
	font-weight: 650;
}

.trend .up .i {
	font-size: 14px;
	stroke-width: 2.6;
}

.bars {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 22px;
	height: 74px;
	padding: 2px 20px 0;
}

.bar p {
	display: flex;
	justify-content: space-between;
	color: var(--text-2);
	font-size: 13px;
}

.bar b {
	color: var(--text);
	font-weight: 750;
	font-variant-numeric: tabular-nums;
}

.track {
	height: 4px;
	margin-top: 7px;
	overflow: hidden;
	border-radius: 2px;
	background: var(--border);
}

.track i {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--text);
	transform-origin: left;
	transition: transform 800ms var(--ease);
}

.track-lg {
	height: 6px;
	border-radius: 3px;
}

.track-none {
	background: transparent;
}

.w58 {
	width: 58%;
}
.w62 {
	width: 62%;
}
.w66 {
	width: 66%;
}
.w71 {
	width: 71%;
}
.w80 {
	width: 80%;
}
.w88 {
	width: 88%;
}

.track .green {
	background: var(--green);
}
.track .blue {
	background: var(--blue);
}
.track .water {
	background: var(--water);
}

.bars .bar:nth-child(2) i {
	transition-delay: 40ms;
}
.bars .bar:nth-child(3) i {
	transition-delay: 80ms;
}
.bars .bar:nth-child(4) i {
	transition-delay: 120ms;
}

.card {
	position: relative;
	margin: 0 16px;
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: 20px;
	background: var(--surface);
	box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
}

.label {
	color: var(--text-2);
	font-size: 11px;
	font-weight: 750;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

.next {
	margin-top: 12px;
}

.next-title {
	margin-top: 8px;
	font-size: 19px;
	font-weight: 750;
	letter-spacing: -0.01em;
}

.next-meta {
	margin-top: 4px;
	color: var(--text-2);
	font-size: 13px;
}

.next-meta .link {
	color: var(--accent-text);
	font-weight: 650;
}

.cta {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 46px;
	margin-top: 14px;
	border-radius: 14px;
	background: var(--cta);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
}

.cta .i {
	font-size: 16px;
}

.xp {
	position: absolute;
	right: 10px;
	padding: 4px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.24);
	font-size: 11.5px;
	font-weight: 750;
}

.health {
	margin-top: 12px;
}

.kcal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-top: 8px;
	color: var(--text-2);
	font-size: 13px;
}

.kcal b {
	color: var(--text);
	font-size: 18px;
	font-weight: 800;
}

.health .track-lg {
	margin-top: 8px;
}

.cols {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--border);
}

.cols > div {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cols small {
	color: var(--text-2);
	font-size: 11px;
	font-weight: 650;
}

.cols b {
	margin-top: 3px;
	font-size: 15px;
	font-weight: 750;
	white-space: nowrap;
}

.cols span {
	color: var(--text-2);
	font-size: 11px;
	white-space: nowrap;
}

.cols .track {
	height: 3px;
	margin-top: 6px;
}

.cols em {
	margin-top: 6px;
	color: var(--accent-text);
	font-size: 11.5px;
	font-style: normal;
	font-weight: 700;
	white-space: nowrap;
}

.tabs {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	justify-content: space-around;
	height: 86px;
	padding: 9px 6px 0;
	border-top: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.97);
}

.tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 74px;
	color: var(--text-2);
	font-size: 10.5px;
	font-weight: 650;
}

.tab .i {
	font-size: 24px;
	stroke-width: 1.8;
}

.tab.on {
	color: var(--accent);
}

.tab.on .i {
	fill: rgba(255, 77, 0, 0.18);
}

.home-bar {
	position: absolute;
	left: 50%;
	bottom: 8px;
	width: 134px;
	height: 5px;
	margin-left: -67px;
	border-radius: 3px;
	background: var(--ink);
}

/* Before the scan reaches them, what the home fills stays empty. */

.js .layer-render [data-reveal]:not(.on) .a {
	stroke-dashoffset: 100;
	opacity: 0;
}

.js .layer-render [data-reveal]:not(.on) .track i {
	transform: scaleX(0);
}

.js .layer-render .sc:not(.on) .trend {
	opacity: 0;
	translate: 0 4px;
}

/* The blueprint: the same screen, its texts as bones, its shapes as dashed lines. */

.only-bp {
	display: none;
}

.layer-bp .screen {
	background-color: #f7f9fc;
	background-image:
		linear-gradient(var(--plan-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--plan-line) 1px, transparent 1px);
	background-size: 8px 8px;
}

.layer-bp .only-bp {
	display: block;
}

.layer-bp .bone {
	border-radius: 4px;
	background: var(--plan-soft);
	color: transparent;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.layer-bp svg,
.layer-bp svg * {
	fill: none !important;
	stroke: var(--plan) !important;
	stroke-width: 1px !important;
	stroke-dasharray: 3 3;
}

.layer-bp .sb-icons,
.layer-bp .sb-icons * {
	stroke-dasharray: none;
}

.layer-bp .ring .a,
.layer-bp .avatar .a {
	display: none;
}

.layer-bp .card,
.layer-bp .cta,
.layer-bp .avatar-in,
.layer-bp .avatar-lvl,
.layer-bp .xp {
	border: 1px dashed var(--plan);
	background: transparent;
	box-shadow: none;
}

.layer-bp .track {
	background: transparent;
	outline: 1px dashed var(--plan);
	outline-offset: -1px;
}

.layer-bp .track i {
	display: none;
}

.layer-bp .cols {
	border-top-style: dashed;
	border-color: var(--plan);
}

.layer-bp .tabs {
	border-top: 1px dashed var(--plan);
	background: transparent;
}

.guides {
	position: absolute;
	inset: 0 16px;
	border-left: 1px dashed rgba(29, 78, 216, 0.22);
	border-right: 1px dashed rgba(29, 78, 216, 0.22);
	pointer-events: none;
}

.mark {
	position: absolute;
	color: var(--blue-text);
	font-size: 10px;
	font-weight: 650;
	letter-spacing: 0.04em;
}

.mark span {
	position: absolute;
	padding: 1px 4px;
	border-radius: 3px;
	background: #f7f9fc;
	white-space: nowrap;
}

.mark-ring {
	top: 6px;
	left: calc(50% + 73px + 16px);
	width: 9px;
	height: 146px;
	border-top: 1px solid var(--plan);
	border-bottom: 1px solid var(--plan);
}

.mark-ring::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 4px;
	border-left: 1px solid var(--plan);
}

.mark-ring span {
	top: 50%;
	left: 12px;
	translate: 0 -50%;
}

.mark-pad {
	top: 58px;
	left: -16px;
	width: 16px;
	height: 9px;
	border-left: 1px solid var(--plan);
	border-right: 1px solid var(--plan);
}

.mark-pad::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 4px;
	border-top: 1px solid var(--plan);
}

.mark-pad span {
	top: -16px;
	left: 50%;
	translate: -50% 0;
}

/* ——— The four dimensions ——— */

.dims {
	display: grid;
	gap: 44px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 72px var(--gutter) 96px;
}

.eyebrow {
	color: var(--accent-text);
	font-size: 12px;
	font-weight: 750;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

h2 {
	margin-top: 14px;
	font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.4rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.04em;
	text-wrap: balance;
}

.dims-lead {
	max-width: 32em;
	margin-top: 18px;
	color: var(--text-lead);
	font-size: 17px;
	line-height: 1.6;
}

.dims-lead strong {
	color: var(--text);
}

.dims-score {
	display: flex;
	align-items: center;
	gap: 22px;
	max-width: 440px;
	margin-top: 30px;
	padding: 20px 24px 20px 20px;
	border: 1px solid var(--border);
	border-radius: 24px;
	background: var(--surface);
	box-shadow: var(--shadow-card);
}

.ring-demo {
	width: 120px;
	height: 120px;
	flex: none;
}

.ring-demo .t,
.ring-demo .a {
	stroke-width: 12;
}

.ring-demo .a {
	transition: stroke-dashoffset 700ms var(--ease);
}

.ring-demo .ring-n {
	font-size: 42px;
	letter-spacing: -1.5px;
}

.js .dims-score:not(.is-in) .ring-demo .a {
	stroke-dashoffset: 100;
	opacity: 0;
}

.dims-band {
	color: var(--accent-text);
	font-size: 18px;
	font-weight: 750;
}

.dims-count {
	margin-top: 2px;
	color: var(--text-2);
	font-size: 14px;
}

.dims-zero {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--border);
	color: var(--text-2);
	font-size: 14px;
	line-height: 1.45;
	animation: rise 400ms var(--ease) both;
}

.dims-zero b {
	color: var(--text);
}

@keyframes rise {
	from {
		opacity: 0;
		translate: 0 6px;
	}
}

.dims-hint {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	color: var(--text-2);
	font-size: 14px;
}

.dims-hint .i {
	color: var(--accent-text);
	font-size: 18px;
}

.dims-grid {
	display: grid;
	gap: 16px;
}

.dim {
	--tone: var(--accent);
	--tone-text: var(--accent-text);
	--tone-tint: var(--accent-tint-08);
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px;
	border: 1px solid var(--border);
	border-radius: 24px;
	background: var(--surface);
	box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
	transition:
		transform 250ms var(--ease),
		box-shadow 250ms var(--ease),
		opacity 700ms var(--ease),
		translate 700ms var(--ease);
}

.dim:hover {
	transform: translateY(-3px);
	box-shadow: 0 22px 44px -28px rgba(17, 24, 39, 0.3);
}

.dim-nutrition {
	--tone: var(--green);
	--tone-text: var(--green-text);
	--tone-tint: rgba(0, 208, 132, 0.1);
}

.dim-sleep {
	--tone: var(--blue);
	--tone-text: var(--blue-text);
	--tone-tint: rgba(59, 130, 246, 0.1);
}

.dim-regularity {
	--tone: var(--accent-light);
	--tone-text: var(--alert-text);
	--tone-tint: rgba(255, 138, 0, 0.12);
}

.dim-head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.dim-icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	flex: none;
	border-radius: 12px;
	background: var(--tone-tint);
	color: var(--tone-text);
	font-size: 20px;
}

.dim h3 {
	flex: 1;
	font-size: 18px;
	font-weight: 750;
	letter-spacing: -0.01em;
}

.dim-value {
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	white-space: nowrap;
}

.dim-desc {
	color: var(--text-2);
	font-size: 15px;
	line-height: 1.5;
}

.dim-viz {
	position: relative;
	height: 72px;
	margin-top: auto;
}

.dim-viz::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 12px;
	background: repeating-linear-gradient(135deg, var(--border) 0 3px, transparent 3px 6px);
	opacity: 0;
	transition: opacity 300ms var(--ease);
}

.viz-bars {
	display: flex;
	align-items: flex-end;
	gap: 6px;
}

.viz-bars i {
	flex: 1;
	border-radius: 6px;
	background: var(--quiet);
	transform-origin: bottom;
	transition: transform 700ms var(--ease);
}

.viz-bars i:last-child {
	background: var(--tone);
}

.dim-training .viz-bars i:last-child {
	background: linear-gradient(to top, var(--accent), var(--accent-light));
}

.dim-training .viz-bars i:nth-child(1) {
	height: 38%;
}
.dim-training .viz-bars i:nth-child(2) {
	height: 46%;
}
.dim-training .viz-bars i:nth-child(3) {
	height: 42%;
}
.dim-training .viz-bars i:nth-child(4) {
	height: 55%;
}
.dim-training .viz-bars i:nth-child(5) {
	height: 61%;
}
.dim-training .viz-bars i:nth-child(6) {
	height: 57%;
}
.dim-training .viz-bars i:nth-child(7) {
	height: 72%;
}
.dim-training .viz-bars i:nth-child(8) {
	height: 86%;
}

.dim-sleep .viz-bars i {
	background: rgba(59, 130, 246, 0.2);
}
.dim-sleep .viz-bars i:nth-child(1) {
	height: 76%;
}
.dim-sleep .viz-bars i:nth-child(2) {
	height: 80%;
}
.dim-sleep .viz-bars i:nth-child(3) {
	height: 72%;
}
.dim-sleep .viz-bars i:nth-child(4) {
	height: 88%;
}
.dim-sleep .viz-bars i:nth-child(5) {
	height: 82%;
}
.dim-sleep .viz-bars i:nth-child(6) {
	height: 77%;
}
.dim-sleep .viz-bars i:nth-child(7) {
	height: 79%;
	background: var(--blue);
}

.viz-bars i:nth-child(2) {
	transition-delay: 40ms;
}
.viz-bars i:nth-child(3) {
	transition-delay: 80ms;
}
.viz-bars i:nth-child(4) {
	transition-delay: 120ms;
}
.viz-bars i:nth-child(5) {
	transition-delay: 160ms;
}
.viz-bars i:nth-child(6) {
	transition-delay: 200ms;
}
.viz-bars i:nth-child(7) {
	transition-delay: 240ms;
}
.viz-bars i:nth-child(8) {
	transition-delay: 280ms;
}

.viz-kcal {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 14px;
	height: auto;
	min-height: 72px;
}

.kcal-track {
	flex: none;
	height: 10px;
	overflow: hidden;
	border-radius: 5px;
	background: var(--quiet);
}

.kcal-track i {
	display: block;
	width: 88%;
	height: 100%;
	border-radius: inherit;
	background: var(--green);
	transform-origin: left;
	transition: transform 900ms var(--ease);
}

.viz-kcal p {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.viz-kcal span {
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--quiet);
	color: var(--text-lead);
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
}

.viz-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	grid-auto-rows: 1fr;
	gap: 6px;
}

.viz-days i {
	border-radius: 6px;
	background: var(--quiet);
	transition:
		transform 500ms var(--ease-bounce),
		opacity 300ms;
}

/* The last 16 days, at the heatmap's five levels of the accent (EN-07). */
.viz-days i:nth-child(n + 6) {
	background: rgba(255, 77, 0, 0.55);
}
.viz-days i:nth-child(3n + 7) {
	background: rgba(255, 77, 0, 0.32);
}
.viz-days i:nth-child(4n + 8) {
	background: rgba(255, 77, 0, 0.8);
}
.viz-days i:nth-child(n + 18) {
	background: var(--accent);
}

.dim-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	padding-top: 12px;
	border-top: 1px solid var(--border);
}

.dim-fact {
	display: flex;
	align-items: center;
	gap: 5px;
	color: var(--text-2);
	font-size: 14px;
}

.dim-fact b {
	color: var(--text);
	font-weight: 750;
}

.flame-ic {
	color: var(--accent);
	font-size: 16px;
}

.fact-off {
	display: none;
}

/* A dimension no longer followed: hatched, out of the sum, never zero. */

.dim.is-off .dim-value {
	color: var(--text-2);
	font-size: 15px;
	font-weight: 650;
	letter-spacing: 0;
}

.dim.is-off .dim-icon {
	background: var(--quiet);
	color: var(--text-2);
}

.dim.is-off .dim-viz > * {
	opacity: 0;
}

.dim.is-off .dim-viz::after {
	opacity: 1;
}

.dim.is-off .fact-on {
	display: none;
}

.dim.is-off .fact-off {
	display: inline;
}

.dim-viz > * {
	transition: opacity 300ms var(--ease);
}

.switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--text-2);
	font: inherit;
	font-size: 13px;
	font-weight: 650;
	cursor: pointer;
	border-radius: 999px;
}

.switch-track {
	position: relative;
	width: 44px;
	height: 26px;
	border-radius: 13px;
	background: var(--accent);
	transition: background 200ms var(--ease);
}

.switch-knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(17, 24, 39, 0.25);
	transform: translateX(18px);
	transition: transform 250ms var(--ease);
}

.switch[aria-checked="false"] .switch-track {
	background: var(--border-strong);
}

.switch[aria-checked="false"] .switch-knob {
	transform: translateX(0);
}

/* ——— The closing card ——— */

.outro {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 var(--gutter) 88px;
}

.outro-card {
	position: relative;
	overflow: hidden;
	padding: clamp(44px, 7vw, 88px) clamp(20px, 5vw, 64px);
	border: 1px solid var(--border);
	border-radius: 32px;
	background:
		radial-gradient(60% 90% at 100% 0%, rgba(255, 138, 0, 0.16), transparent 70%),
		radial-gradient(50% 80% at 0% 100%, rgba(255, 77, 0, 0.1), transparent 70%), var(--surface);
	text-align: center;
	box-shadow: var(--shadow-card);
}

.outro-mark {
	width: 64px;
	height: auto;
	margin: 0 auto 26px;
	display: block;
}

.outro-mark path {
	fill: var(--text);
}

.outro-mark .spark {
	fill: var(--logo);
}

.outro-card h2 {
	font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4.4rem);
}

.outro-card > p:not(.eyebrow) {
	max-width: 30em;
	margin: 16px auto 30px;
	color: var(--text-lead);
	font-size: 17px;
}

/* ——— Footer ——— */

.foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 26px var(--gutter) 40px;
	border-top: 1px solid var(--border);
	color: var(--text-2);
	font-size: 14px;
}

.foot nav {
	display: flex;
	gap: 22px;
}

.foot a {
	text-decoration: none;
}

.foot a:hover {
	color: var(--text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ——— Legal notice and lost page ——— */

.legal {
	max-width: 720px;
	margin: 0 auto;
	padding: calc(var(--nav-height) + 32px) var(--gutter) 96px;
}

.legal h1 {
	margin: 0 0 8px;
	font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem);
	letter-spacing: -0.04em;
	line-height: 1.05;
}

.legal h2 {
	margin-top: 40px;
	font-size: 20px;
	letter-spacing: -0.01em;
}

.legal p {
	margin-top: 10px;
	color: var(--text-lead);
	font-size: 17px;
	line-height: 1.65;
}

.legal a {
	color: var(--accent-text);
	font-weight: 600;
	text-underline-offset: 3px;
}

.lost {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	min-height: 100vh;
	padding: 40px var(--gutter);
	text-align: center;
}

.lost-ring {
	width: 64px;
	height: 64px;
	margin-bottom: 8px;
}

.lost h1 {
	max-width: 14em;
	margin: 0;
	font-size: clamp(2.2rem, 1.4rem + 3vw, 3.8rem);
	letter-spacing: -0.04em;
	line-height: 1.04;
	text-wrap: balance;
}

.lost > p:not(.eyebrow) {
	margin-bottom: 12px;
	color: var(--text-lead);
	font-size: 17px;
}

/* ——— Entrances ——— */

.js .reveal {
	opacity: 0;
	translate: 0 18px;
	transition:
		opacity 700ms var(--ease),
		translate 700ms var(--ease),
		transform 250ms var(--ease),
		box-shadow 250ms var(--ease);
}

.js .reveal.is-in {
	opacity: 1;
	translate: 0 0;
}

.js .dims-grid .reveal:nth-child(2) {
	transition-delay: 60ms;
}
.js .dims-grid .reveal:nth-child(3) {
	transition-delay: 120ms;
}
.js .dims-grid .reveal:nth-child(4) {
	transition-delay: 180ms;
}

.js .dim:not(.is-in) .viz-bars i,
.js .dim:not(.is-in) .kcal-track i {
	transform: scaleY(0);
}

.js .dim:not(.is-in) .kcal-track i {
	transform: scaleX(0);
}

.js .dim:not(.is-in) .viz-days i {
	transform: scale(0.4);
	opacity: 0;
}

.viz-days i:nth-child(7n + 2) {
	transition-delay: 30ms;
}
.viz-days i:nth-child(7n + 3) {
	transition-delay: 60ms;
}
.viz-days i:nth-child(7n + 4) {
	transition-delay: 90ms;
}
.viz-days i:nth-child(7n + 5) {
	transition-delay: 120ms;
}
.viz-days i:nth-child(7n + 6) {
	transition-delay: 150ms;
}
.viz-days i:nth-child(7n) {
	transition-delay: 180ms;
}

/* The hero's words come in one after the other, then the cards around the phone. */
.hero-head > *,
.h1-line,
.feature {
	animation: enter 800ms var(--ease) both;
}

.hero-head > h1 {
	animation: none;
}
.hero-head > .kicker {
	animation-delay: 50ms;
}
.h1-line:first-child {
	animation-delay: 120ms;
}
.h1-line.h1-accent {
	animation-delay: 190ms;
}
.hero-head > .lead {
	animation-delay: 270ms;
}
.hero-head > .btn {
	animation-delay: 340ms;
}
.feature-score {
	animation-delay: 520ms;
}
.feature-health {
	animation-delay: 580ms;
}
.feature-training {
	animation-delay: 640ms;
}
.feature-community {
	animation-delay: 700ms;
}

@keyframes enter {
	from {
		opacity: 0;
		translate: 0 14px;
	}
}

/* ——— Larger screens ——— */

@media (min-width: 640px) {
	.dims-grid,
	.features {
		grid-template-columns: 1fr 1fr;
	}

	.device-wrap {
		--s: 0.78;
		--bezel: 11px;
	}
}

@media (min-width: 1024px) {
	.dims {
		grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
		gap: 64px;
		/* The words stay put beside the cards, centred on them. */
		align-items: center;
		padding-top: 96px;
	}
}

@media (min-width: 1240px) {
	.features {
		position: absolute;
		inset: 0;
		display: block;
		max-width: none;
		pointer-events: none;
	}

	/* Anchored to the phone (390 × 0.78 and its two bezels), not to the page's edges: the inner
	   cards 40 from it and lower, the outer ones 112 further out and higher. */
	.feature {
		--beside: calc(50% + (390px * 0.78 + 22px) / 2 + 40px);
		--outside: calc(var(--beside) + 112px);
		position: absolute;
		width: 256px;
		pointer-events: auto;
	}

	.feature-score {
		top: 14%;
		right: var(--outside);
	}

	.feature-training {
		top: 50%;
		right: var(--beside);
	}

	.feature-health {
		top: 14%;
		left: var(--outside);
	}

	.feature-community {
		top: 50%;
		left: var(--beside);
	}
}

@media (max-width: 719px) {
	.nav-links {
		display: none;
	}

	.nav-bar {
		grid-template-columns: 1fr auto;
	}

	.nav-bar > .btn {
		grid-column: 2;
	}
}

@media (max-width: 399px) {
	.nav.is-detached .nav-bar {
		padding: 0 6px 0 14px;
	}

	/* The envelope alone: the label stays for screen readers. */
	.btn-nav {
		width: 40px;
		padding: 0;
	}

	.btn-nav-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

@media (max-width: 639px) {
	.brand-name {
		height: 10px;
	}

	.brand-mark {
		height: 26px;
	}

	.dims-score {
		gap: 16px;
		padding: 16px 18px 16px 16px;
	}

	.ring-demo {
		width: 104px;
		height: 104px;
	}

	.ring-demo .ring-n {
		font-size: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		animation-delay: 0ms !important;
		transition-duration: 150ms !important;
		transition-delay: 0ms !important;
	}

	html {
		scroll-behavior: auto;
	}

	.building-ring {
		animation: none;
	}
}
