/* Routine landing page. Colours, type and motion follow the app's design tokens. */

@font-face {
	font-family: "Fredoka";
	src: url("fonts/fredoka-400.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Fredoka";
	src: url("fonts/fredoka-600.woff2") format("woff2");
	font-weight: 600;
	font-display: swap;
}

@font-face {
	font-family: "Fredoka";
	src: url("fonts/fredoka-700.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

:root {
	color-scheme: light;
	--bg-top: #fff0f7;
	--bg-mid: #fde7ff;
	--bg-bottom: #eef2ff;
	--blob-pink: #ffb6e0;
	--blob-lavender: #c4b5fc;
	--blob-peach: #ffd6a5;
	--primary-from: #f6339a;
	--primary-to: #9810fa;
	--primary-edge: #9d174d;
	--reward-edge: #b45309;
	--star-fill: #fbbf24;
	--star-stroke: #f59e0b;
	--text: #314158;
	--heading: #3c0366;
	--muted: #6b5a82;
	--line: #e9d5ff;
	--card: rgba(255, 255, 255, 0.8);
	--card-border: rgba(255, 255, 255, 0.7);
	--card-shadow: 0 10px 25px -5px rgba(244, 114, 182, 0.25);
	--bezel: #2a0a45;
	--springy: cubic-bezier(0.34, 1.56, 0.64, 1);
	--gutter: 16px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-width: 320px;
	color: var(--text);
	background-color: var(--bg-top);
	background-image:
		radial-gradient(40rem 32rem at 8% 2%, rgba(255, 182, 224, 0.75), transparent 70%),
		radial-gradient(36rem 30rem at 96% 12%, rgba(196, 181, 252, 0.65), transparent 70%),
		radial-gradient(40rem 34rem at 50% 58%, rgba(255, 214, 165, 0.35), transparent 70%),
		linear-gradient(160deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%);
	background-repeat: no-repeat;
	font: 400 1.125rem/1.6 "Fredoka", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a {
	color: var(--primary-to);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--primary-from);
}

h1, h2, h3 {
	margin: 0;
	color: var(--heading);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

p {
	margin: 0;
	text-wrap: pretty;
}

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

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

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

/* Header */

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 20px;
	padding-bottom: 20px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--heading);
	font-size: 1.6rem;
	font-weight: 700;
	text-decoration: none;
}

.brand:hover {
	color: var(--heading);
}

.brand svg {
	width: 44px;
	height: 44px;
	filter: drop-shadow(0 6px 12px rgba(152, 16, 250, 0.25));
}

.site-nav {
	display: none;
	gap: 8px;
}

.site-nav a {
	padding: 8px 14px;
	border-radius: 999px;
	color: var(--heading);
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.site-nav a:hover {
	background: rgba(255, 255, 255, 0.7);
}

@media (min-width: 820px) {
	.site-nav {
		display: flex;
	}
}

/* Hero */

/* The tilted device and its bobbing badges can poke past a phone's edge */
.hero {
	overflow-x: clip;
}

.hero .wrap {
	display: grid;
	gap: 48px;
	align-items: center;
	padding-top: 24px;
	padding-bottom: 40px;
}

@media (min-width: 900px) {
	.hero .wrap {
		grid-template-columns: 1.1fr 0.9fr;
		padding-top: 48px;
		padding-bottom: 64px;
	}
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border: 2px solid var(--line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.75);
	color: var(--heading);
	font-size: 0.95rem;
	font-weight: 600;
}

.hero h1 {
	margin-top: 20px;
	font-size: clamp(2.6rem, 7vw, 4.4rem);
	line-height: 1.02;
}

.gradient-text {
	background: linear-gradient(100deg, var(--primary-from), var(--primary-to));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lede {
	max-width: 34rem;
	margin-top: 20px;
	font-size: 1.15rem;
}

@media (min-width: 640px) {
	.lede {
		font-size: 1.25rem;
	}
}

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

.store {
	display: inline-flex;
	flex-direction: column;
	min-width: 148px;
	padding: 10px 16px 12px;
	border-radius: 18px;
	background: var(--heading);
	box-shadow: 0 5px 0 #1d0233;
	color: #fff;
	line-height: 1.2;
}

.store small {
	color: #e9d5ff;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.store strong {
	font-size: 1.3rem;
	font-weight: 700;
}

/* Device frames */

.device {
	position: relative;
	width: min(100%, 360px);
	margin: 0 auto;
	padding: 12px;
	border-radius: 40px;
	background: var(--bezel);
	box-shadow:
		0 30px 60px -20px rgba(60, 3, 102, 0.45),
		0 12px 24px -12px rgba(244, 114, 182, 0.5),
		inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.device img {
	width: 100%;
	aspect-ratio: 820 / 1180;
	border-radius: 28px;
	background: var(--bg-top);
}

.hero .device {
	width: min(100%, 380px);
	transform: rotate(2deg);
}

.float {
	position: absolute;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 999px;
	background: #fff;
	box-shadow: var(--card-shadow), 0 4px 0 var(--line);
	color: var(--heading);
	font-size: 1.15rem;
	font-weight: 700;
	white-space: nowrap;
	animation: bob 3.2s ease-in-out infinite;
}

.float-stars {
	top: 16%;
	left: -12px;
	color: var(--reward-edge);
}

.float-play {
	right: -8px;
	bottom: 12%;
	animation-delay: -1.6s;
}

@media (min-width: 480px) {
	.float-stars {
		left: -40px;
	}

	.float-play {
		right: -36px;
	}
}

@keyframes bob {
	0%, 100% {
		transform: translateY(0) rotate(-2deg);
	}

	50% {
		transform: translateY(-10px) rotate(2deg);
	}
}

/* Sections */

.section {
	padding: 56px 0;
}

@media (min-width: 900px) {
	.section {
		padding: 80px 0;
	}
}

.section-head {
	max-width: 40rem;
	margin: 0 auto 56px;
	text-align: center;
}

.section-head h2 {
	font-size: clamp(2.1rem, 5vw, 3.1rem);
}

.section-head p {
	margin-top: 14px;
	font-size: 1.2rem;
}

.kicker {
	display: inline-block;
	margin-bottom: 12px;
	color: var(--primary-from);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.feature {
	display: grid;
	gap: 40px;
	align-items: center;
}

.feature + .feature {
	margin-top: 88px;
}

@media (min-width: 900px) {
	.feature {
		grid-template-columns: 1fr 1fr;
		gap: 72px;
	}

	.feature.flip .feature-media {
		order: -1;
	}

	.feature + .feature {
		margin-top: 104px;
	}
}

.feature h3 {
	font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.feature p {
	margin-top: 16px;
}

.ticks {
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.ticks li {
	position: relative;
	margin-top: 10px;
	padding-left: 34px;
}

.ticks li::before {
	content: "";
	position: absolute;
	top: 0.3em;
	left: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--primary-from), var(--primary-to));
}

.ticks li::after {
	content: "";
	position: absolute;
	top: calc(0.3em + 6px);
	left: 7px;
	width: 8px;
	height: 5px;
	border-bottom: 2.5px solid #fff;
	border-left: 2.5px solid #fff;
	transform: rotate(-45deg);
}

/* Cards */

.card {
	border: 2px solid var(--card-border);
	border-radius: 32px;
	background: var(--card);
	box-shadow: var(--card-shadow);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* Stars explainer */

.stars-card {
	width: min(100%, 440px);
	margin: 0 auto;
	padding: 12px;
}

.stars-row {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 12px;
	align-items: center;
	padding: 16px 12px;
}

@media (min-width: 480px) {
	.stars-row {
		grid-template-columns: 112px 1fr;
		gap: 16px;
		padding: 18px 16px;
	}
}

.stars-row + .stars-row {
	border-top: 2px dashed var(--line);
}

.stars {
	display: flex;
	gap: 4px;
}

.stars svg {
	width: 28px;
	height: 28px;
}

@media (min-width: 480px) {
	.stars svg {
		width: 32px;
		height: 32px;
	}
}

.stars .off {
	opacity: 0.18;
	filter: grayscale(1);
}

.stars-row strong {
	display: block;
	color: var(--heading);
	font-size: 1.15rem;
}

.stars-row span {
	color: var(--muted);
	font-size: 1rem;
}

.meter {
	margin: 4px 16px 16px;
	padding: 16px;
	border-radius: 20px;
	background: #fff;
}

.meter-label {
	display: flex;
	justify-content: space-between;
	color: var(--heading);
	font-weight: 700;
}

.meter-track {
	height: 14px;
	margin-top: 10px;
	overflow: hidden;
	border-radius: 999px;
	background: #fdf2f8;
}

.meter-fill {
	width: 72%;
	height: 100%;
	border-radius: inherit;
	background: var(--star-fill);
	transform-origin: left;
	animation: drain 9s linear infinite;
}

@keyframes drain {
	from {
		transform: scaleX(1);
	}

	to {
		transform: scaleX(0.1);
	}
}

/* Puzzle strip */

.puzzle-strip {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

@media (min-width: 720px) {
	.puzzle-strip {
		grid-template-columns: repeat(4, 1fr);
		gap: 24px;
	}
}

.puzzle-strip li {
	text-align: center;
}

.puzzle-strip img {
	width: 100%;
	aspect-ratio: 4 / 5;
	border: 4px solid #fff;
	border-radius: 24px;
	box-shadow: var(--card-shadow);
	background: var(--bg-mid);
}

.puzzle-strip li:last-child img {
	border-color: var(--star-fill);
	box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.25), var(--card-shadow);
}

.puzzle-strip span {
	display: block;
	margin-top: 12px;
	color: var(--heading);
	font-weight: 700;
}

.puzzle-copy {
	max-width: 40rem;
	margin: 0 auto 48px;
	text-align: center;
}

.puzzle-copy h3 {
	font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.puzzle-copy p {
	margin-top: 16px;
}

.feature.puzzle {
	display: block;
}

/* Grown-ups */

.grownups-picker {
	max-width: 560px;
	margin: 0 auto 48px;
	overflow: hidden;
	padding: 0;
}

.grownups-picker img {
	width: 100%;
	aspect-ratio: 820 / 520;
}

.grid {
	display: grid;
	gap: 20px;
}

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

@media (min-width: 960px) {
	.grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
	}
}

.tile {
	padding: 28px;
}

.tile .icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 18px;
	font-size: 1.8rem;
	line-height: 1;
}

.tile h3 {
	margin-top: 18px;
	font-size: 1.35rem;
}

.tile p {
	margin-top: 8px;
	font-size: 1.05rem;
}

.icon.amber { background: #fde68a; }
.icon.pink { background: #fbcfe8; }
.icon.violet { background: #ddd6fe; }
.icon.mint { background: #a7f3d0; }
.icon.sky { background: #bfdbfe; }
.icon.peach { background: #fed7aa; }

/* Call to action */

.cta {
	text-align: center;
}

.cta svg {
	width: 96px;
	height: 96px;
	margin: 0 auto;
	filter: drop-shadow(0 14px 24px rgba(152, 16, 250, 0.3));
	animation: bob 3.6s ease-in-out infinite;
}

.cta h2 {
	margin-top: 28px;
	font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.cta p {
	max-width: 34rem;
	margin: 14px auto 0;
	font-size: 1.2rem;
}

.cta .stores {
	justify-content: center;
}

/* Footer */

.site-footer {
	padding: 40px 0 48px;
	border-top: 2px solid rgba(233, 213, 255, 0.8);
	color: var(--muted);
	font-size: 1rem;
}

.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
}

.site-footer nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.site-footer a {
	color: var(--heading);
	font-weight: 600;
}

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

	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
	}
}
