/* PullBeat website. Colours are the app's panel Palette (shared/ui/panel_theme.tres),
   the background is the store covers' graphite, the font is the app's Inter. */

@font-face {
	font-family: "Inter";
	src: url("../fonts/Inter-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Inter";
	src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Inter";
	src: url("../fonts/Inter-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	color-scheme: dark;
	--bg: #17171a;
	--panel: #1c1c20;
	--card: #25252a;
	--raised: #323238;
	--raised-hover: #3d3d44;
	--raised-pressed: #45454d;
	--line: rgba(255, 255, 255, 0.08);
	--text: #ececee;
	--text2: #a8a8b0;
	--text3: #80808a;
	--accent: #ff6a1a;
	--accent-hover: #ff8240;
	--accent-pressed: #e2550a;
	--accent-text: #ff9257;
	--on-accent: #1f0f05;
	--radius: 12px;
	--gutter: 16px;
	--width: 1120px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-weight: 500;
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

img,
svg {
	display: block;
	max-width: 100%;
}

a {
	color: var(--accent-text);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

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

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

h1,
h2,
h3 {
	margin: 0;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

p {
	margin: 0;
}

.container {
	width: 100%;
	max-width: calc(var(--width) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 10;
	padding: 8px 14px;
	border-radius: 8px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
	text-decoration: none;
}

.skip-link:focus {
	top: 12px;
}

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

/* Header and footer */

.site-header {
	position: relative;
	z-index: 2;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 72px;
}

.brand {
	display: block;
	flex: none;
	border-radius: 6px;
}

.brand img {
	width: 142px;
	height: auto;
}

.site-nav {
	display: flex;
	gap: 4px;
}

.site-nav a {
	padding: 8px 12px;
	border-radius: 8px;
	color: var(--text2);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}

.site-nav a:hover {
	background: var(--raised);
	color: var(--text);
}

.site-footer {
	margin-top: 96px;
	border-top: 1px solid var(--line);
	padding-block: 40px 48px;
	color: var(--text3);
	font-size: 0.875rem;
}

.site-footer .container {
	display: grid;
	gap: 24px;
}

.footer-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.footer-top .brand img {
	width: 120px;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-links a {
	color: var(--text2);
	font-weight: 600;
	text-decoration: none;
}

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

.footer-note {
	max-width: 60ch;
}

/* Buttons: only the main action is orange; secondary ones are tonal grey. */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 12px 24px;
	border-radius: var(--radius);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-align: center;
	transition: background-color 120ms ease;
}

.button-primary {
	background: var(--accent);
	color: var(--on-accent);
}

.button-primary:hover {
	background: var(--accent-hover);
	color: var(--on-accent);
}

.button-primary:active {
	background: var(--accent-pressed);
}

.button-secondary {
	background: var(--raised);
	color: var(--text);
}

.button-secondary:hover {
	background: var(--raised-hover);
	color: var(--text);
}

.button-secondary:active {
	background: var(--raised-pressed);
}

.button svg {
	width: 20px;
	height: 20px;
	flex: none;
}

/* Hero */

/* The ripples spill past the hero, faded out by a mask (no hard edges);
   the sections after it are layered above them. body clips the sides. */
.hero {
	position: relative;
	z-index: 0;
	padding-block: 8px 72px;
}

.hero .container {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	align-items: center;
}

.hero-art {
	position: relative;
	width: min(240px, 64vw);
	aspect-ratio: 1;
	margin: 24px auto 40px;
}

.hero-art svg {
	position: absolute;
	inset: -70%;
	width: 240%;
	height: 240%;
	max-width: none;
	pointer-events: none;
	-webkit-mask-image: radial-gradient(circle closest-side, #000 40%, transparent 100%);
	mask-image: radial-gradient(circle closest-side, #000 40%, transparent 100%);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.hero-copy {
	position: relative;
	z-index: 1;
}

.eyebrow {
	color: var(--accent-text);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hero h1 {
	margin-top: 14px;
	font-size: clamp(2.75rem, 5vw + 1.5rem, 5.25rem);
	line-height: 1;
	letter-spacing: -0.035em;
}

.lead {
	margin-top: 20px;
	max-width: 34rem;
	color: var(--text2);
	font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.25rem);
	line-height: 1.55;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

.pulse {
	transform-box: fill-box;
	transform-origin: center;
	animation: pulse 2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
	opacity: 0;
}

.pulse-late {
	animation-delay: 1s;
}

@keyframes pulse {
	0% {
		transform: scale(1);
		opacity: 0.6;
	}

	100% {
		transform: scale(3.4);
		opacity: 0;
	}
}

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

	.pulse {
		animation: none;
		display: none;
	}
}

/* Sections */

.section,
.site-footer {
	position: relative;
	z-index: 1;
}

.section {
	padding-top: 96px;
}

.section-head {
	display: grid;
	gap: 14px;
	max-width: 40rem;
	margin-bottom: 40px;
}

.section-head h2 {
	font-size: clamp(2rem, 2.2vw + 1.25rem, 2.875rem);
}

.section-head p:not(.eyebrow) {
	color: var(--text2);
	font-size: 1.0625rem;
}

.card {
	border: 1px solid var(--line);
	border-radius: 20px;
	background: var(--panel);
}

/* How it works */

.steps {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: step;
}

.step {
	padding: 28px 24px 30px;
	counter-increment: step;
}

.step::before {
	content: counter(step);
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin-bottom: 22px;
	border: 3px solid var(--accent);
	border-radius: 50%;
	color: var(--text);
	font-size: 1rem;
	font-weight: 700;
}

.step h3,
.feature h3 {
	font-size: 1.25rem;
	letter-spacing: -0.01em;
}

.step p,
.feature p {
	margin-top: 10px;
	color: var(--text2);
}

/* Motions: the dumbbell colours from core/workout/motion.gd */

.motions {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.motion {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 4px 16px;
	align-items: start;
	align-content: start;
	padding: 20px;
}

.motion-dot {
	grid-row: span 2;
	width: 18px;
	height: 18px;
	margin-top: 4px;
	border-radius: 50%;
	background: var(--c);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent), 0 0 22px color-mix(in srgb, var(--c) 55%, transparent);
}

.motion h3 {
	font-size: 1.0625rem;
	letter-spacing: -0.005em;
	line-height: 1.4;
}

.motion p {
	color: var(--text2);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.m-squat { --c: #ff6b1f; }
.m-raise { --c: #33d1ff; }
.m-twist { --c: #4d73ff; }
.m-row { --c: #4dff80; }
.m-punch { --c: #ff4dad; }
.m-cross { --c: #a875ff; }
.m-jump { --c: #ff3838; }
.m-reach { --c: #b8ff2e; }
.m-pulldown { --c: #f233ff; }

.note {
	margin-top: 20px;
	color: var(--text3);
	font-size: 0.9375rem;
}

/* Highlights */

.features {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.feature {
	padding: 26px 24px 28px;
}

.feature-icon {
	width: 28px;
	height: 28px;
	margin-bottom: 18px;
	color: var(--accent);
}

/* Screenshots */

.shots {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.shot {
	margin: 0;
}

.shot img,
.shot-frame {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--panel);
	object-fit: cover;
}

.shot-frame {
	display: grid;
	place-items: center;
	background:
		radial-gradient(circle at 50% 50%, transparent 0, var(--panel) 70%),
		repeating-radial-gradient(circle at 50% 50%, transparent 0 54px, rgba(255, 106, 26, 0.16) 54px 57px),
		var(--panel);
	color: var(--text3);
	font-size: 0.875rem;
	font-weight: 600;
}

.shot-frame span {
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--card);
}

.shot figcaption {
	margin-top: 10px;
	color: var(--text2);
	font-size: 0.9375rem;
	font-weight: 600;
}

/* Get it */

.get {
	position: relative;
	overflow: hidden;
	padding: 56px 24px;
	text-align: center;
}

.get-art {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 1400px;
	max-width: none;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.get-body {
	position: relative;
	display: grid;
	justify-items: center;
	gap: 16px;
}

.get h2 {
	font-size: clamp(1.875rem, 2vw + 1.25rem, 2.625rem);
	max-width: 22ch;
}

.get p {
	color: var(--text2);
	max-width: 36rem;
}

.get .actions {
	justify-content: center;
	margin-top: 12px;
}

/* Legal pages */

.doc {
	max-width: calc(44rem + 2 * var(--gutter));
	padding-top: 24px;
}

.doc-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 40px;
	border-bottom: 1px solid var(--line);
	overflow-x: auto;
	scrollbar-width: none;
}

.doc-tabs a {
	flex: none;
	margin-bottom: -1px;
	padding: 12px 14px;
	border-bottom: 3px solid transparent;
	color: var(--text2);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.doc-tabs a:hover {
	color: var(--text);
}

.doc-tabs a[aria-current="page"] {
	border-bottom-color: var(--accent);
	color: var(--text);
}

.doc h1 {
	font-size: clamp(2.25rem, 2.5vw + 1.5rem, 3.25rem);
}

.doc-intro {
	margin-top: 16px;
	color: var(--text3);
	font-size: 0.9375rem;
}

.doc-body {
	margin-top: 40px;
}

.doc-body > p,
.doc-body section p {
	color: var(--text2);
	font-size: 1.0625rem;
	line-height: 1.7;
}

.doc-body > p + p,
.doc-body section p + p {
	margin-top: 16px;
}

.doc-body > p:first-child {
	color: var(--text);
	font-size: 1.1875rem;
	line-height: 1.6;
}

.doc-body section {
	margin-top: 40px;
}

.doc-body h2 {
	margin-bottom: 12px;
	color: var(--accent-text);
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	line-height: 1.4;
}

/* Not found */

.not-found {
	display: grid;
	justify-items: start;
	gap: 18px;
	padding-block: 72px 24px;
}

.not-found h1 {
	font-size: clamp(2.5rem, 4vw + 1.5rem, 4rem);
}

.not-found p:not(.eyebrow) {
	color: var(--text2);
	font-size: 1.125rem;
}

/* Wider screens */

@media (min-width: 640px) {
	:root {
		--gutter: 24px;
	}

	.brand img {
		width: 158px;
	}

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

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

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

	.shots > :first-child {
		grid-column: 1 / -1;
	}

	.get {
		padding: 80px 48px;
	}

	.site-footer .container {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (min-width: 900px) {
	:root {
		--gutter: 32px;
	}

	.hero {
		padding-block: 40px 120px;
	}

	.hero .container {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
		gap: 48px;
		min-height: 560px;
	}

	.hero-art {
		order: 2;
		width: 100%;
		max-width: 400px;
		margin: 0 auto;
	}

	.hero-art svg {
		inset: -110%;
		width: 320%;
		height: 320%;
	}

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

	.motions,
	.features {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.section {
		padding-top: 128px;
	}
}

@media (max-width: 639px) {
	.site-nav a:not(:last-child) {
		display: none;
	}

	.actions .button {
		flex: 1 1 100%;
	}

	/* The three legal tabs fit a 360 px wide phone. */
	.doc-tabs {
		gap: 0;
	}

	.doc-tabs a {
		padding-inline: 8px;
		font-size: 0.8125rem;
	}
}
