/* Bonai landing page — standalone, served at the site root for guests */

:root {
	--violet: #5b3df5;
	--violet-deep: #4428d9;
	--lilac: #b7a6ff;
	--lavender: #e6e0ff;
	--mist: #f5f2ff;
	--ink: #1e1745;
	--ink-soft: #5a5480;
	--sun: #ffc83d;
	--paper: #ffffff;

	--display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
	--body: "Figtree", "Avenir Next", system-ui, sans-serif;

	--gutter: clamp(16px, 5vw, 72px);
	--measure: 36rem;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--lavender);
	color: var(--ink);
	font-family: var(--body);
	font-size: 1.125rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	padding: clamp(0px, 3vw, 40px);
}

a {
	color: inherit;
}

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

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

h1,
h2,
h3,
h4 {
	font-family: var(--display);
	margin: 0;
	text-wrap: balance;
}

p {
	margin: 0;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* The white canvas sitting on lavender, as in the reference */
.frame {
	max-width: 1240px;
	margin: 0 auto;
	background: var(--paper);
	border-radius: clamp(0px, 3vw, 40px);
	overflow: hidden;
}

/* Nav */

.nav {
	display: flex;
	align-items: center;
	gap: 32px;
	padding: 18px var(--gutter);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--display);
	font-weight: 800;
	font-size: 1.5rem;
	color: var(--violet);
	text-decoration: none;
	margin-right: auto;
}

.brand svg {
	width: 32px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 4;
	stroke-linecap: round;
}

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

.nav nav a {
	text-decoration: none;
	font-weight: 500;
	font-size: 1rem;
	color: var(--ink-soft);
}

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

/* Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-lg {
	padding: 15px 28px;
	font-size: 1.0625rem;
}

.btn-primary {
	background: var(--violet);
	color: var(--paper);
}

.btn-primary:hover {
	background: var(--violet-deep);
}

.btn-quiet {
	color: var(--ink);
}

.btn-quiet:hover {
	color: var(--violet);
}

.btn-light {
	background: var(--paper);
	color: var(--violet);
}

.btn-light:hover {
	background: var(--mist);
}

.btn:active {
	transform: translateY(1px);
}

/* Hero */

.hero {
	text-align: center;
	padding: clamp(12px, 3.5vh, 48px) var(--gutter) 0;
}

.hero h1 {
	/* Sized by height too, so the hero stage still fits on short screens */
	font-size: clamp(2.5rem, min(6vw, 8.5vh), 5.25rem);
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: -0.03em;
	color: var(--violet);
	max-width: 20ch;
	margin: 0 auto;
}

/* Keep each short phrase of the headline on one line */
.hero h1 span {
	white-space: nowrap;
}

.lede {
	max-width: var(--measure);
	margin: clamp(10px, 2vh, 20px) auto 0;
	font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
	color: var(--ink-soft);
}

.proof {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-top: clamp(8px, 1.6vh, 16px);
	font-size: 0.9375rem;
	font-weight: 500;
}

.proof-faces {
	display: inline-flex;
}

.proof-faces span {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid var(--paper);
	background: var(--lavender);
	font-size: 17px;
	margin-left: -10px;
}

.proof-faces span:first-child {
	margin-left: 0;
	background: #ffe7a8;
}

.proof-faces span:last-child {
	background: #d6f5e3;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: clamp(14px, 2.6vh, 28px);
}

/* Hero stage: the child's photo framed by one ring per Level, outermost first */

.stage {
	position: relative;
	/* welcome.html narrows this further so the whole stage fits in the first screen */
	max-width: 900px;
	margin: clamp(28px, 6vh, 64px) auto 0;
	/* Stickers, badge and teacher bubble size themselves against the stage (cqw) */
	container-type: inline-size;
}

.arch {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.arch-photo {
	opacity: 0;
	animation: appear 0.6s ease forwards;
}

.ring {
	fill: none;
	stroke-linecap: butt;
	stroke-dasharray: 1300;
	stroke-dashoffset: 1300;
	animation: draw 0.9s cubic-bezier(0.3, 0.7, 0.2, 1) forwards;
	animation-delay: calc(0.15s + var(--i) * 0.12s);
}

.ring-label {
	font-family: var(--display);
	font-weight: 700;
	letter-spacing: 0.02em;
	opacity: 0;
	animation: appear 0.4s ease forwards;
	animation-delay: calc(0.6s + var(--i) * 0.12s);
}

/* Emoji stickers and the teacher bubble land last, as one beat */
.sticker,
.call,
.badge-1on1 {
	animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
	animation-delay: 1.1s;
}

.sticker {
	position: absolute;
	display: grid;
	place-items: center;
	width: clamp(40px, 7.2cqw, 64px);
	height: clamp(40px, 7.2cqw, 64px);
	border-radius: 50%;
	background: var(--paper);
	font-size: clamp(19px, 3.4cqw, 30px);
	line-height: 1;
	box-shadow: 0 10px 24px -8px rgba(68, 40, 217, 0.35);
	z-index: 2;
}

.s-pencil { left: 1%; top: 8%; transform: rotate(-12deg); }
.s-star { right: 10%; top: -4%; animation-delay: 1.18s; }
.s-paint { left: -2%; top: 58%; animation-delay: 1.26s; }
.s-abc { left: 14%; top: -6%; animation-delay: 1.34s; }
.s-books { right: -1%; top: 70%; animation-delay: 1.42s; }

.call {
	position: absolute;
	right: 3%;
	top: 22%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	z-index: 3;
}

.call img {
	width: clamp(68px, 14.5cqw, 132px);
	height: clamp(68px, 14.5cqw, 132px);
	border-radius: 50%;
	object-fit: cover;
	border: 6px solid var(--paper);
	box-shadow: 0 16px 32px -12px rgba(30, 23, 69, 0.45);
}

.live {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--ink);
	color: var(--paper);
	font-size: clamp(0.75rem, 1.6cqw, 0.875rem);
	font-weight: 600;
	white-space: nowrap;
}

.live::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ff5a5f;
	box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.3);
}

.badge-1on1 {
	position: absolute;
	left: 9%;
	top: 30%;
	display: grid;
	place-items: center;
	width: clamp(56px, 10.6cqw, 96px);
	height: clamp(56px, 10.6cqw, 96px);
	border-radius: 50%;
	background: var(--sun);
	color: var(--ink);
	font-family: var(--display);
	font-weight: 800;
	font-size: clamp(1.2rem, 3.6cqw, 2rem);
	letter-spacing: -0.02em;
	transform: rotate(-10deg);
	box-shadow: 0 12px 28px -10px rgba(30, 23, 69, 0.4);
	z-index: 3;
}

.dot {
	position: absolute;
	border-radius: 50%;
	background: var(--lilac);
}

.dot-a { width: 18px; height: 18px; left: 24%; top: 4%; }
.dot-b { width: 40px; height: 40px; right: 24%; top: -2%; background: var(--violet); }
.dot-c { width: 26px; height: 26px; left: 30%; top: 2%; background: var(--lavender); }

@keyframes draw {
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes appear {
	to {
		opacity: 1;
	}
}

@keyframes pop {
	from {
		scale: 0;
	}
	to {
		scale: 1;
	}
}

/* Sections */

.section {
	padding: clamp(72px, 10vw, 128px) var(--gutter) 0;
}

.section-head {
	max-width: var(--measure);
	margin-bottom: 48px;
}

.section-head h2,
.parents h2 {
	font-size: clamp(2rem, 4.2vw, 3.25rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.025em;
}

.section-head p {
	margin-top: 16px;
	color: var(--ink-soft);
}

.empty {
	padding: 32px;
	border: 2px dashed var(--lavender);
	border-radius: 20px;
	color: var(--ink-soft);
}

/* How it works: photo beside three steps */

.how {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: clamp(32px, 6vw, 80px);
	align-items: center;
}

.how-photo {
	position: relative;
	margin: 0;
}

.how-photo img {
	display: block;
	width: 100%;
	aspect-ratio: 5 / 4;
	object-fit: cover;
	border-radius: 220px 220px 28px 28px;
}

.how-photo figcaption {
	position: absolute;
	left: 50%;
	bottom: -20px;
	translate: -50% 0;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--paper);
	font-weight: 600;
	font-size: 0.9375rem;
	white-space: nowrap;
	box-shadow: 0 10px 24px -8px rgba(68, 40, 217, 0.35);
}

.how-intro {
	margin-top: 16px;
	color: var(--ink-soft);
	max-width: 32rem;
}

.steps {
	list-style: none;
	margin: 32px 0 0;
	padding: 0;
	display: grid;
	gap: 20px;
}

.steps li {
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.step-icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 18px;
	background: var(--mist);
	font-size: 28px;
	line-height: 1;
}

.steps h3 {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.25;
	margin-top: 4px;
}

.steps p {
	margin-top: 2px;
	color: var(--ink-soft);
}

.how h2 {
	font-size: clamp(2rem, 4.2vw, 3.25rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.025em;
}

/* Levels: a real sequence, so numbered steps on a rail */

.levels {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.levels::before {
	content: "";
	position: absolute;
	left: 31px;
	top: 32px;
	bottom: 32px;
	width: 2px;
	background: var(--lavender);
}

.level {
	position: relative;
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr);
	gap: 16px 40px;
	padding: 28px 0;
}

.level + .level {
	border-top: 1px solid var(--mist);
}

.level-step {
	position: relative;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--paper);
	border: 3px solid var(--violet);
	font-size: 1.75rem;
	line-height: 1;
}

.level:nth-child(2) .level-step { border-color: #7458f7; }
.level:nth-child(3) .level-step { border-color: #8e75fa; }
.level:nth-child(n + 4) .level-step { border-color: #a893fc; }

.level-body .level-number {
	margin-top: 4px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--violet);
}

.level-body h3 {
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.15;
	margin-top: 2px;
}

.level-body p {
	margin-top: 8px;
	color: var(--ink-soft);
	max-width: 30rem;
}

.level-body .level-meta {
	margin-top: 12px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--violet);
}

.level-goals {
	background: var(--mist);
	border-radius: 20px;
	padding: 20px 24px;
	align-self: start;
}

.level-goals h4 {
	font-family: var(--body);
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--ink-soft);
}

.level-goals ul {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
}

.level-goals li {
	position: relative;
	padding-left: 26px;
	margin-top: 6px;
}

.level-goals li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.5em;
	width: 12px;
	height: 6px;
	border-left: 2.5px solid var(--violet);
	border-bottom: 2.5px solid var(--violet);
	transform: rotate(-45deg);
}

/* Teachers */

.teachers {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 40px 32px;
}

.teacher {
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.avatar {
	flex: none;
	object-fit: cover;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--lavender);
	color: var(--violet);
	font-family: var(--display);
	font-weight: 800;
	font-size: 1.5rem;
}

.teacher:nth-child(3n + 2) .avatar {
	background: var(--violet);
	color: var(--paper);
}

.teacher h3 {
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.2;
	margin-top: 6px;
}

.teacher-levels {
	margin-top: 4px;
	font-size: 1rem;
	color: var(--ink-soft);
}

.skills {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.skills li {
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--mist);
	font-size: 0.875rem;
	font-weight: 500;
}

/* Class times: list beside a photo */

.times {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	gap: clamp(32px, 6vw, 80px);
	align-items: center;
}

.times-photo {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	border: 10px solid var(--lavender);
}

.slot-icon {
	font-size: 1.5rem;
	line-height: 1;
}

.slots {
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: 44rem;
}

.slots li {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 18px 0;
	border-bottom: 1px solid var(--lavender);
}

.slot-name {
	font-family: var(--display);
	font-weight: 700;
	font-size: 1.375rem;
}

.slot-time {
	font-variant-numeric: tabular-nums;
	color: var(--ink-soft);
	white-space: nowrap;
}

/* Pricing: three plan cards, the middle one in violet */

.plans {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
	align-items: stretch;
}

.plan {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 32px 28px;
	border-radius: 28px;
	background: var(--mist);
	border: 2px solid var(--lavender);
}

.plan-featured {
	background: var(--violet);
	border-color: var(--violet);
	color: var(--paper);
}

.plan-flag {
	position: absolute;
	top: -14px;
	left: 28px;
	padding: 4px 14px;
	border-radius: 999px;
	background: var(--sun);
	color: var(--ink);
	font-size: 0.8125rem;
	font-weight: 600;
}

.plan-icon {
	font-size: 2rem;
	line-height: 1;
}

.plan h3 {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.15;
}

.plan-price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-top: 4px;
}

.plan-amount {
	font-family: var(--display);
	font-size: clamp(2.5rem, 4vw, 3.25rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
}

.plan-per,
.plan-blurb,
.plan-yearly {
	color: var(--ink-soft);
	font-size: 1rem;
}

.plan-featured .plan-per,
.plan-featured .plan-blurb,
.plan-featured .plan-yearly {
	color: rgba(255, 255, 255, 0.84);
}

.plan-facts {
	list-style: none;
	margin: 12px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--lavender);
	display: grid;
	gap: 10px;
	font-size: 1rem;
}

.plan-featured .plan-facts {
	border-top-color: rgba(255, 255, 255, 0.28);
}

.plan-facts li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

/* Push the yearly line and the button to the bottom so the three buttons line up */
.plan-facts {
	margin-bottom: auto;
}

.plan-yearly {
	padding-top: 12px;
}

.plan-yearly strong {
	color: inherit;
	font-weight: 600;
}

.plan-featured .plan-yearly strong {
	color: var(--paper);
}

.plan .btn {
	margin-top: 12px;
	align-self: flex-start;
}

/* What's included: six short cards */

.included {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

.included li {
	padding: 28px 24px;
	border-radius: 24px;
	background: var(--paper);
	border: 2px solid var(--lavender);
}

.included-icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 18px;
	background: var(--lavender);
	font-size: 1.625rem;
	line-height: 1;
}

.included h3 {
	margin-top: 18px;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
}

.included p {
	margin-top: 8px;
	font-size: 1rem;
	color: var(--ink-soft);
}

/* Parents band */

.parents {
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	margin: clamp(72px, 10vw, 128px) var(--gutter) 0;
	padding: clamp(40px, 6vw, 72px);
	border-radius: 32px;
	background: var(--violet);
	color: var(--paper);
}

.parents h2 {
	font-size: clamp(2rem, 4.2vw, 3.25rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.025em;
}

.parents p {
	max-width: 32rem;
	margin: 16px 0 32px;
	color: rgba(255, 255, 255, 0.88);
}

/* The family photo sits in an arch, echoing the hero */
.parents-photo {
	display: block;
	width: 100%;
	max-width: 340px;
	justify-self: end;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 200px 200px 24px 24px;
	border: 8px solid rgba(255, 255, 255, 0.18);
}

/* Footer */

.footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px 24px;
	padding: 40px var(--gutter);
	font-size: 0.9375rem;
	color: var(--ink-soft);
}

.footer .credits {
	font-size: 0.8125rem;
}

.footer a {
	text-decoration: none;
}

.footer .credits a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

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

/* Small screens */

@media (max-width: 860px) {
	.how,
	.times,
	.parents {
		grid-template-columns: minmax(0, 1fr);
	}

	.times-photo {
		max-width: 280px;
		justify-self: center;
		order: -1;
	}

	.parents-photo {
		justify-self: start;
		max-width: 260px;
	}
}

@media (max-width: 760px) {
	.nav {
		gap: 16px;
	}

	.nav nav {
		display: none;
	}

	.level {
		grid-template-columns: 48px minmax(0, 1fr);
		gap: 16px 20px;
	}

	.level-step {
		width: 48px;
		height: 48px;
		font-size: 1.375rem;
	}

	.levels::before {
		left: 23px;
	}

	.level-goals {
		grid-column: 2;
	}

	/* Ring names are too small to read at this width; the levels list below names them */
	.ring-label {
		display: none;
	}

	.stage {
		margin-left: -8px;
		margin-right: -8px;
	}

	.s-abc,
	.s-books,
	.s-pencil,
	.dot {
		display: none;
	}

	.call {
		right: 0;
		top: -22%;
		gap: 6px;
	}

	.call img {
		border-width: 4px;
	}

	.live {
		font-size: 0.75rem;
		padding: 4px 10px;
	}

	.badge-1on1 {
		left: 2%;
		top: 0;
	}

	.actions {
		flex-wrap: nowrap;
		gap: 4px;
	}

	.actions .btn-lg {
		padding: 12px 16px;
		font-size: 1rem;
	}

	.slots li {
		grid-template-columns: 32px minmax(0, 1fr);
		gap: 2px 10px;
	}

	.slot-time {
		grid-column: 2;
	}

	.plan {
		padding: 28px 22px;
	}

	.plan .btn {
		align-self: stretch;
	}

	.footer {
		flex-direction: column;
	}
}

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

	.ring,
	.ring-label,
	.arch-photo,
	.sticker,
	.call,
	.badge-1on1 {
		animation: none;
		stroke-dashoffset: 0;
		opacity: 1;
	}
}
