/* Apex Consulting (apexconsulting.se). Always the navy brand look of the
   Google Play developer page (scripts/apex_brand). */

@font-face {
	font-family: "League Spartan";
	src: url("/shared/apex/fonts/league-spartan.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
}

:root {
	color-scheme: dark;
	--bg: #060b1f;
	--bg-soft: #0d1534;
	--glass: rgba(143, 176, 255, 0.06);
	--glass-hi: rgba(143, 176, 255, 0.1);
	--text: #eef2ff;
	--muted: #a6b3d8;
	--line: rgba(143, 176, 255, 0.14);
	--accent: #8fb0ff;
	--accent-soft: rgba(31, 79, 214, 0.2);
	--blue: #1f4fd6;
	--cyan: #3fb2ff;
	--violet: #7a5cff;
	--mark-filter: none;
	--sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--display: "League Spartan", var(--sans);
	--gutter: clamp(16px, 4vw, 40px);
	--max: 1080px;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 76px;
}

body {
	margin: 0;
	background:
		radial-gradient(1100px 620px at 50% -140px, rgba(31, 79, 214, 0.5), transparent 70%),
		radial-gradient(700px 520px at 100% 0, rgba(63, 178, 255, 0.14), transparent 70%),
		radial-gradient(800px 700px at 0 900px, rgba(122, 92, 255, 0.1), transparent 70%),
		var(--bg);
	background-repeat: no-repeat;
	color: var(--text);
	font: 400 17px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

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

h1,
h2,
h3 {
	font-family: var(--display);
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0;
}

.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	border-bottom: 1px solid var(--line);
	background: rgba(6, 11, 31, 0.62);
	-webkit-backdrop-filter: blur(14px) saturate(1.4);
	backdrop-filter: blur(14px) saturate(1.4);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 68px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
	font-family: var(--display);
	font-weight: 700;
	font-size: 19px;
	letter-spacing: 0.01em;
	padding-top: 3px;
}

.brand img {
	width: 34px;
	height: auto;
	margin-top: -3px;
	filter: var(--mark-filter);
}

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

.site-nav a {
	color: var(--muted);
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
}

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

/* Home */
.hero {
	position: relative;
	padding: clamp(64px, 12vw, 128px) 0 clamp(56px, 9vw, 96px);
}

.eyebrow {
	margin: 0 0 18px;
	color: var(--accent);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hero h1 {
	max-width: 15ch;
	font-size: clamp(40px, 6.6vw, 68px);
	font-weight: 700;
}

.grad {
	background: linear-gradient(100deg, #8fb0ff 10%, #3fb2ff 50%, #b49bff 90%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lede {
	max-width: 36em;
	margin: 22px 0 34px;
	color: var(--muted);
	font-size: clamp(18px, 2.1vw, 20px);
}

.button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 24px;
	border-radius: 999px;
	background: #fff;
	color: #0a1a5c;
	font-weight: 650;
	font-size: 16px;
	text-decoration: none;
	box-shadow: 0 10px 30px rgba(31, 79, 214, 0.35);
	transition: transform 0.15s, box-shadow 0.15s;
}

.button:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 36px rgba(31, 79, 214, 0.5);
}

.button.ghost {
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.04);
	color: var(--text);
	box-shadow: none;
}

.button.ghost:hover {
	border-color: rgba(255, 255, 255, 0.4);
	box-shadow: none;
}

/* Home hero: the lockup look of the developer page, app icons floating around */
.home-hero {
	overflow: hidden;
	padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 10vw, 120px);
	text-align: center;
}

.home-hero::before {
	content: "";
	position: absolute;
	inset: -10% -20% -10% 0;
	background: url("/shared/apex/mark.svg") 62% 50% / auto 118% no-repeat;
	opacity: 0.045;
	pointer-events: none;
}

.home-hero .wrap {
	position: relative;
	max-width: 1280px;
}

.home-hero .copy {
	position: relative;
	z-index: 1;
	max-width: 620px;
	margin: 0 auto;
}

.home-hero h1 {
	max-width: none;
}

.home-hero .lede {
	margin-left: auto;
	margin-right: auto;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 26px;
	padding: 7px 14px 6px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--glass);
	color: #c6d3fb;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.chip::before {
	content: "";
	width: 8px;
	height: 8px;
	margin-top: -1px;
	border-radius: 50%;
	background: var(--cyan);
	box-shadow: 0 0 0 4px rgba(63, 178, 255, 0.18);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.orbit {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px 18px;
	max-width: calc(7 * 64px + 6 * 18px);
	margin: 0 auto 40px;
	padding: 0;
	list-style: none;
}

.orbit a {
	display: block;
	transform: rotate(var(--r, 0deg)) translateY(var(--y, 0));
}

.orbit img {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: 22.5%;
	box-shadow: 0 14px 28px rgba(1, 4, 20, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.07);
	animation: bob 6s ease-in-out infinite;
	animation-delay: var(--d, 0s);
	transition: transform 0.2s;
}

.orbit a:hover img {
	animation-play-state: paused;
	transform: scale(1.1) rotate(calc(-1 * var(--r, 0deg)));
}

.orbit li:nth-child(1) { --r: -7deg; --d: -0.4s; }
.orbit li:nth-child(2) { --r: 5deg; --d: -2.1s; --y: 10px; }
.orbit li:nth-child(3) { --r: -4deg; --d: -3.3s; }
.orbit li:nth-child(4) { --r: 8deg; --d: -1.2s; --y: 10px; }
.orbit li:nth-child(5) { --r: -6deg; --d: -4.6s; }
.orbit li:nth-child(6) { --r: 4deg; --d: -2.8s; --y: 10px; }
.orbit li:nth-child(7) { --r: 7deg; --d: -0.9s; }
.orbit li:nth-child(8) { --r: -5deg; --d: -5.2s; --y: 10px; }
.orbit li:nth-child(9) { --r: 4deg; --d: -1.7s; }
.orbit li:nth-child(10) { --r: -8deg; --d: -3.9s; --y: 10px; }
.orbit li:nth-child(11) { --r: 6deg; --d: -2.4s; }
.orbit li:nth-child(12) { --r: -4deg; --d: -4.2s; --y: 10px; }
.orbit li:nth-child(13) { --r: 5deg; --d: -3.1s; }
.orbit li:nth-child(14) { --r: -6deg; --d: -1.4s; --y: 10px; }

@keyframes bob {
	0%,
	100% {
		translate: 0 0;
	}

	50% {
		translate: 0 -10px;
	}
}

@media (min-width: 1100px) {
	.home-hero {
		padding: 150px 0 160px;
	}

	.orbit {
		display: block;
		position: absolute;
		inset: -64px 0;
		max-width: none;
		margin: 0;
	}

	.orbit li {
		position: absolute;
		left: var(--x);
		top: var(--t);
	}

	.orbit a {
		translate: -50% -50%;
		transform: rotate(var(--r, 0deg));
	}

	.orbit img {
		width: var(--s, 96px);
		height: var(--s, 96px);
	}

	.orbit li:nth-child(1) { --x: 6%; --t: 44%; --s: 112px; }
	.orbit li:nth-child(2) { --x: 16%; --t: 12%; --s: 96px; }
	.orbit li:nth-child(3) { --x: 33%; --t: 0%; --s: 84px; }
	.orbit li:nth-child(4) { --x: 67%; --t: 0%; --s: 84px; }
	.orbit li:nth-child(5) { --x: 84%; --t: 10%; --s: 104px; }
	.orbit li:nth-child(6) { --x: 95%; --t: 40%; --s: 96px; }
	.orbit li:nth-child(7) { --x: 93%; --t: 72%; --s: 108px; }
	.orbit li:nth-child(8) { --x: 82%; --t: 98%; --s: 96px; }
	.orbit li:nth-child(9) { --x: 64%; --t: 104%; --s: 84px; }
	.orbit li:nth-child(10) { --x: 36%; --t: 104%; --s: 84px; }
	.orbit li:nth-child(11) { --x: 17%; --t: 96%; --s: 100px; }
	.orbit li:nth-child(12) { --x: 5%; --t: 74%; --s: 96px; }
	.orbit li:nth-child(13) { --x: 50%; --t: 108%; --s: 80px; }
	.orbit li:nth-child(14) { --x: 50%; --t: 1%; --s: 80px; }
}

@media (max-width: 640px) {
	.orbit {
		gap: 14px 8px;
		max-width: calc(7 * 40px + 6 * 8px);
	}

	.orbit img {
		width: 40px;
		height: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.orbit img {
		animation: none;
	}
}

.section {
	position: relative;
	padding: clamp(56px, 9vw, 96px) 0;
	border-top: 1px solid var(--line);
}

.section-head {
	margin-bottom: 40px;
}

.section-head h2 {
	font-size: clamp(30px, 3.8vw, 40px);
	font-weight: 700;
}

.section-head p {
	max-width: 34em;
	margin: 12px 0 0;
	color: var(--muted);
}

.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

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

.card {
	position: relative;
	padding: 28px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: linear-gradient(160deg, var(--glass-hi), rgba(143, 176, 255, 0.025));
}

.card h3 {
	font-size: 22px;
	font-weight: 650;
}

.card p {
	margin: 10px 0 0;
	color: var(--muted);
	font-size: 16px;
}

.card .num {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin-bottom: 20px;
	padding-top: 3px;
	border-radius: 14px;
	background: linear-gradient(140deg, #2f62ec, #1a3db8 55%, #0a1a5c);
	box-shadow: 0 10px 24px rgba(31, 79, 214, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
	color: #fff;
	font-family: var(--display);
	font-size: 19px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.grid > .card:nth-child(2) .num {
	background: linear-gradient(140deg, #4cc3ff, #1f84e0 55%, #0b3f8a);
	box-shadow: 0 10px 24px rgba(63, 178, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.grid > .card:nth-child(3) .num {
	background: linear-gradient(140deg, #9a80ff, #6246e0 55%, #2c1a8a);
	box-shadow: 0 10px 24px rgba(122, 92, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.app {
	display: flex;
	flex-direction: column;
	gap: 18px;
	align-items: flex-start;
	color: inherit;
	text-decoration: none;
	transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.app:hover {
	border-color: rgba(143, 176, 255, 0.4);
	transform: translateY(-4px);
	box-shadow: 0 22px 44px rgba(1, 4, 20, 0.45);
}

.app img {
	flex: none;
	width: 72px;
	height: 72px;
	border-radius: 22.5%;
	box-shadow: 0 12px 24px rgba(1, 4, 20, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.07);
	transition: transform 0.25s;
}

.app:hover img {
	transform: rotate(-6deg) scale(1.05);
}

.app .link {
	display: inline-block;
	margin-top: 12px;
	color: var(--accent);
	font-size: 15px;
	font-weight: 600;
}

.contact {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 28px 40px;
	padding: clamp(32px, 5vw, 56px);
	border-radius: 28px;
	background:
		radial-gradient(120% 140% at 15% 0, rgba(255, 255, 255, 0.18), transparent 55%),
		linear-gradient(135deg, #2f62ec, #1a3db8 55%, #0a1a5c);
	box-shadow: 0 30px 60px rgba(10, 26, 92, 0.5);
}

.contact::after {
	content: "";
	position: absolute;
	right: -40px;
	bottom: -70px;
	width: 380px;
	height: 250px;
	background: url("/shared/apex/mark.svg") center / contain no-repeat;
	opacity: 0.1;
	pointer-events: none;
}

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

.contact h2 {
	font-size: clamp(28px, 3.6vw, 38px);
	font-weight: 700;
	color: #fff;
}

.contact p {
	margin: 10px 0 0;
	color: #d4defc;
}

/* Footer */
.site-footer {
	padding: 40px 0 48px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 15px;
}

.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 24px 48px;
}

.site-footer address {
	font-style: normal;
	line-height: 1.7;
}

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

.site-footer nav {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.site-footer a {
	color: var(--muted);
	text-decoration: none;
}

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

/* Legal pages */
.doc {
	max-width: 760px;
	padding-top: clamp(40px, 7vw, 72px);
	padding-bottom: clamp(56px, 9vw, 96px);
}

.back {
	display: inline-block;
	margin-bottom: 28px;
	color: var(--muted);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}

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

.doc h1 {
	margin-bottom: 24px;
	font-size: clamp(30px, 4.4vw, 40px);
	font-weight: 700;
}

.doc h2 {
	margin: 40px 0 12px;
	font-size: 23px;
	font-weight: 650;
}

.doc h3 {
	margin: 28px 0 8px;
	font-size: 18px;
	font-weight: 650;
}

.doc h4 {
	margin: 22px 0 6px;
	font-size: 16px;
}

.doc p,
.doc ul,
.doc ol {
	margin: 0 0 16px;
}

.doc ul,
.doc ol {
	padding-left: 1.4em;
}

.doc li {
	margin-bottom: 6px;
}

.doc hr {
	margin: 36px 0;
	border: 0;
	border-top: 1px solid var(--line);
}

.doc .table {
	margin: 0 0 20px;
	overflow-x: auto;
}

.doc table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.doc th,
.doc td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.doc th {
	font-weight: 600;
}

.legal-list h2 {
	margin-top: 36px;
}

.legal-list ul {
	list-style: none;
	padding: 0;
	border-top: 1px solid var(--line);
}

.legal-list li {
	margin: 0;
	border-bottom: 1px solid var(--line);
}

.legal-list li a {
	display: block;
	padding: 13px 0;
	text-decoration: none;
}

.legal-list li a:hover {
	text-decoration: underline;
}

@media (max-width: 860px) {
	.grid,
	.grid.two {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 520px) {
	.brand span {
		font-size: 16px;
	}

	.site-nav {
		gap: 18px;
	}

	.card {
		padding: 22px;
	}

	.contact .button {
		width: 100%;
		justify-content: center;
	}
}

/* Apps page */
.hero-compact {
	padding-bottom: clamp(40px, 6vw, 64px);
}

.app-index {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.app-index a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 16px 6px 6px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--bg-soft);
	color: var(--text);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s;
}

.app-index a:hover {
	border-color: var(--accent);
}

.app-index img {
	width: 32px;
	height: 32px;
	border-radius: 8px;
}

.app-entry {
	scroll-margin-top: 24px;
}

.app-entry + .app-entry {
	margin-top: clamp(56px, 8vw, 88px);
	padding-top: clamp(56px, 8vw, 88px);
	border-top: 1px solid var(--line);
}

.app-head {
	display: flex;
	align-items: center;
	gap: 18px;
}

.app-icon {
	flex: none;
	width: 72px;
	height: 72px;
	border-radius: 17px;
	box-shadow: 0 0 0 1px var(--line);
}

.app-head h3 {
	font-size: clamp(24px, 3vw, 30px);
	font-weight: 700;
}

.app-head p {
	margin: 4px 0 0;
	color: var(--muted);
}

.shots {
	display: flex;
	gap: 14px;
	margin: 28px calc(-1 * var(--gutter)) 0;
	padding: 4px var(--gutter) 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 var(--gutter);
	scrollbar-width: thin;
	outline-offset: -2px;
}

.shots img {
	flex: none;
	width: auto;
	height: clamp(340px, 42vw, 440px);
	border-radius: 18px;
	box-shadow: 0 0 0 1px var(--line);
	background: var(--bg-soft);
	scroll-snap-align: start;
}

.app-body {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 16px 48px;
	margin-top: 24px;
}

.app-about {
	margin: 0;
}

.features {
	margin: 0;
	padding: 0;
	list-style: none;
}

.features li {
	position: relative;
	padding: 0 0 8px 26px;
	color: var(--muted);
	font-size: 16px;
}

.features li::before {
	content: "";
	position: absolute;
	top: 0.55em;
	left: 4px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
}

.app-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	margin-top: 24px;
}

.stores {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.store {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 18px 8px 14px;
	border-radius: 12px;
	background: var(--text);
	color: var(--bg);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.15;
	text-decoration: none;
	transition: opacity 0.15s;
}

.store:hover {
	opacity: 0.85;
}

.store svg {
	width: 24px;
	height: 24px;
}

.store small {
	display: block;
	font-size: 11px;
	font-weight: 500;
	opacity: 0.8;
}

.app-links {
	margin: 0;
	color: var(--muted);
	font-size: 15px;
}

.app-links a {
	font-weight: 600;
	text-decoration: none;
}

.app-links a:hover {
	text-decoration: underline;
}

.section-foot {
	margin: 32px 0 0;
}

.section-foot a {
	font-weight: 600;
	text-decoration: none;
}

@media (max-width: 860px) {
	.app-body {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 520px) {
	.app-head {
		align-items: flex-start;
	}

	.app-icon {
		width: 60px;
		height: 60px;
		border-radius: 14px;
	}

	.shots {
		gap: 10px;
	}
}
