/*
Theme Name: Adele Belusi
Theme URI: https://adelebelusi.com
Author: Adele Belusi
Description: Block theme for Adele Belusi — World of Languages. Presentation only: all learning content comes from the Adele Learning plugin.
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.3
Version: 0.10.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adelebelusi
*/

/*
 * Design tokens live in theme.json. This file holds what theme.json cannot express:
 * the floating header, sky bands, speech bubbles, highlight pills and section layouts.
 */

:root {
	--ab-header-h: 104px;
	--ab-sky-top: #8ED6F6;
	--ab-radius-card: var(--wp--custom--radius--card, 24px);
}

/* ---------- Base ---------- */

html {
	scroll-padding-top: calc(var(--ab-header-h) + 16px);
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

:lang(zh),
:lang(zh-Hans) {
	font-family: var(--wp--preset--font-family--chinese);
	letter-spacing: 0;
}

img {
	height: auto;
}

.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group {
	margin-block-start: 0;
}

/* ---------- Focus: always visible, never removed ---------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.wp-element-button:focus-visible,
.wp-block-navigation-item__content:focus-visible {
	outline: var(--wp--custom--focus--width) solid var(--wp--custom--focus--color);
	outline-offset: var(--wp--custom--focus--offset);
	border-radius: 8px;
}

.has-ink-background-color :where(a, button, .wp-element-button):focus-visible,
.has-purple-ink-background-color :where(a, button, .wp-element-button):focus-visible {
	outline-color: var(--wp--preset--color--yellow);
}

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	padding: 1rem 1.5rem;
	border-radius: 0 0 12px 0;
	clip-path: none;
	z-index: 100000;
}

/* ---------- Buttons ---------- */

.wp-element-button,
.wp-block-button__link {
	min-height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	box-shadow: 0 5px 0 #E39A2B;
	transition: background-color var(--wp--custom--motion--fast) var(--wp--custom--motion--easing),
		transform var(--wp--custom--motion--fast) var(--wp--custom--motion--easing),
		box-shadow var(--wp--custom--motion--fast) var(--wp--custom--motion--easing);
}

.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 7px 0 #E39A2B;
}

.wp-element-button:active,
.wp-block-button__link:active {
	transform: translateY(3px);
	box-shadow: 0 2px 0 #E39A2B;
}

.wp-block-button.is-style-arrow > .wp-block-button__link::after {
	content: "";
	width: 22px;
	height: 22px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--purple-ink);
	box-shadow: inset 0 0 0 3px currentColor;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--lavender);
	color: var(--wp--preset--color--purple-ink);
	box-shadow: inset 0 0 0 3px currentColor;
}

.wp-block-button.is-style-purple > .wp-block-button__link {
	background: var(--wp--preset--color--purple-ink);
	color: var(--wp--preset--color--white);
	box-shadow: 0 5px 0 #4E2FA3;
}

.wp-block-button.is-style-purple > .wp-block-button__link:hover {
	background: #5B39B5;
	color: var(--wp--preset--color--white);
	box-shadow: 0 7px 0 #4E2FA3;
}

/* ---------- Cards and small pieces ---------- */

.is-style-card,
.is-style-card-lavender {
	border-radius: 32px;
	padding: clamp(1.75rem, 4vw, 3rem);
}

.is-style-card {
	background: var(--wp--preset--color--white);
	box-shadow: 0 6px 0 #EFE6D6;
}

.is-style-card-lavender {
	background: var(--wp--preset--color--lavender);
}

.wp-block-image.is-style-rounded-card img {
	border-radius: var(--ab-radius-card);
}

.is-style-placeholder {
	border: 2px dashed var(--wp--preset--color--coral-ink);
	background: var(--wp--preset--color--coral-wash);
	border-radius: var(--ab-radius-card);
	padding: 1rem 1.25rem;
	font-size: var(--wp--preset--font-size--small);
}

.is-style-placeholder::before {
	content: "Placeholder";
	display: block;
	margin-bottom: 0.25rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--coral-ink);
}

/* Highlight pills behind headline words (added with the editor's Highlight button). */
mark.ab-hl {
	padding: 0 0.32em;
	border-radius: 0.38em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--mint);
}

mark.ab-hl--purple {
	background: var(--wp--preset--color--purple-ink);
	color: var(--wp--preset--color--white);
}

mark.ab-hl--yellow {
	background: var(--wp--preset--color--yellow);
}

.ab-badge,
.ab-eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 900;
	font-size: 0.875rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ab-badge {
	align-self: flex-start;
	padding: 0.375rem 0.875rem;
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--purple-ink);
}

.ab-badge--coral {
	color: var(--wp--preset--color--coral-ink);
}

.ab-eyebrow {
	color: #FFD58F;
}

.ab-draft-note {
	color: var(--wp--preset--color--ink-soft);
}

/* ---------- Floating header ---------- */

.ab-header-part {
	position: sticky;
	top: 0;
	z-index: 60;
	padding: 14px var(--wp--preset--spacing--20) 0;
	margin-bottom: calc(-1 * var(--ab-header-h));
	pointer-events: none;
}

.admin-bar .ab-header-part {
	top: var(--wp-admin--admin-bar--height, 0);
}

.ab-header__card {
	pointer-events: auto;
	min-height: 72px;
	padding: 10px 12px 10px 18px;
	border-radius: 26px;
	background: var(--wp--preset--color--white);
	box-shadow: 0 10px 30px rgba(37, 35, 58, 0.12);
}

.ab-logo {
	margin: 0;
	flex: none;
}

/* The owner's logo artwork (assets/logo/logo.webp, 720 × 174), shown at a size that keeps "World of Languages" readable. */
.ab-logo img,
.ab-footer__logo img {
	display: block;
	width: 232px !important;
	height: auto !important;
	aspect-ratio: 720 / 174; /* Reserves the logo's space before it loads. */
}

@media (max-width: 1259px) {

	.ab-logo img {
		width: 220px !important;
	}
}

.ab-header__cta .wp-block-button__link {
	min-height: 48px;
	padding: 0.75rem 1.375rem;
	white-space: nowrap;
}

.ab-header .wp-block-navigation__container {
	flex-wrap: nowrap;
}

.ab-header .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.625rem 0.5rem;
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
}

.ab-header .wp-block-navigation-item__content:hover,
.ab-header .current-menu-item > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--lavender);
	color: var(--wp--preset--color--purple-ink);
}

.ab-header .wp-block-navigation__submenu-container {
	min-width: 15rem !important;
	padding: 0.5rem;
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: 18px;
	box-shadow: var(--wp--preset--shadow--lifted);
}

.ab-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	width: 100%;
	border-radius: 12px;
}

.ab-header .wp-block-navigation__responsive-container-open,
.ab-header .wp-block-navigation__responsive-container-close {
	width: 48px;
	height: 48px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--wp--preset--color--lavender);
	color: var(--wp--preset--color--ink);
}

/* "Start Learning" menu item: only inside the open menu. */
.ab-header .ab-only-overlay {
	display: none;
}

.ab-header .is-menu-open .ab-only-overlay {
	display: block;
}

.ab-header .is-menu-open .ab-only-overlay > .wp-block-navigation-item__content {
	justify-content: center;
	margin-bottom: 0.5rem;
	background: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--ink);
	box-shadow: 0 5px 0 #E39A2B;
}

/* Open menu (phones and tablets): one left-aligned list, sub-pages indented. */
.ab-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
	background: var(--wp--preset--color--white);
}

.ab-header .is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch !important;
	max-width: 32rem;
	margin: 0 auto;
	padding-top: 1rem;
}

.ab-header .is-menu-open .wp-block-navigation__container,
.ab-header .is-menu-open .wp-block-navigation-item {
	align-items: stretch !important;
	gap: 0.125rem !important;
	width: 100%;
}

.ab-header .is-menu-open .wp-block-navigation-item__content {
	box-sizing: border-box;
	justify-content: flex-start;
	width: 100%;
	min-height: 56px;
	padding: 0.75rem 1rem !important;
	border-radius: 14px;
	font-size: 1.25rem !important;
}

.ab-header .is-menu-open .wp-block-navigation__submenu-container {
	width: 100%;
	min-width: 0 !important;
	padding: 0 0 0.5rem 1rem !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.ab-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	min-height: 48px;
	padding: 0.625rem 1rem !important;
	font-size: 1.0625rem !important;
	font-weight: 600;
	color: var(--wp--preset--color--ink-soft);
}

.ab-header .is-menu-open .wp-block-navigation__submenu-icon {
	display: none;
}

/* Six menu items plus the button need about 1260px; below that, use the menu button. */
@media (min-width: 600px) and (max-width: 1259px) {

	.ab-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.ab-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.ab-header .wp-block-navigation__responsive-container.is-menu-open {
		position: fixed;
		inset: 0;
		z-index: 100000;
		overflow: auto;
	}

	.ab-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		display: flex;
	}
}

@media (max-width: 599px) {

	:root {
		--ab-header-h: 84px;
	}

	.ab-header-part {
		padding-top: 10px;
	}

	.ab-header__card {
		min-height: 64px;
		padding: 8px 8px 8px 14px;
		border-radius: 22px;
	}

	.ab-logo img {
		width: 190px !important;
	}

	.ab-header__cta {
		display: none !important;
	}
}

/* ---------- Sky bands (top of every page, under the floating header) ---------- */

.ab-sky {
	position: relative;
	overflow: hidden;
	background: linear-gradient(180deg, var(--ab-sky-top) 0%, #BFE8F8 52%, #E9F7FD 100%);
}

.ab-sky::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 70px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C 240 5 480 70 720 44 S 1200 10 1440 46 V70 H0z' fill='%23FFF9EF'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
	pointer-events: none;
}

.ab-page-hero {
	padding-top: calc(var(--ab-header-h) + clamp(2.5rem, 6vw, 4.5rem)) !important;
	padding-bottom: calc(70px + clamp(1.5rem, 4vw, 3rem)) !important;
	border-radius: 0;
}

.ab-page-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("assets/svg/page-sky.svg") bottom center / cover no-repeat;
	pointer-events: none;
}

.ab-page-hero > * {
	position: relative;
	z-index: 1;
}

/* Pages with no sky band at the top (e.g. wide pages) still clear the header. */
.wp-site-blocks > main > .wp-block-post-content:first-child > :first-child:not(.ab-sky):not(.ab-hub-hero),
.wp-site-blocks > main > :first-child:not(.ab-sky):not(.wp-block-post-content):not(.ab-hub-hero) {
	padding-top: calc(var(--ab-header-h) + 2rem);
}

/* ---------- Homepage hero ---------- */

.ab-hero {
	background: linear-gradient(180deg, var(--ab-sky-top) 0%, #BFE8F8 46%, #FFE9C2 100%);
	padding-top: calc(var(--ab-header-h) + clamp(2rem, 5vw, 3.5rem));
	padding-bottom: clamp(5rem, 8vw, 7rem);
	padding-inline: var(--wp--preset--spacing--20);
}

.ab-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("assets/svg/hero-world.svg") bottom center / cover no-repeat;
	pointer-events: none;
}

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

.ab-hero__title {
	font-size: clamp(2.375rem, 4.8vw, 4rem);
	line-height: 1.12;
	letter-spacing: -0.015em;
}

.ab-hero__lead {
	font-weight: 500;
}

.ab-hero__media {
	position: relative;
	min-height: 500px;
}

.ab-hero__photo {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(400px, 82%);
	margin: 0;
	transform: translate(-50%, -48%);
}

.ab-hero__photo img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	border: 14px solid var(--wp--preset--color--white);
	box-shadow: 0 18px 40px rgba(37, 35, 58, 0.18);
	background: var(--wp--preset--color--white);
}

/* Speech bubbles with greetings, floating around the photo. */
.ab-bubbles {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.ab-bubble {
	position: absolute;
	margin: 0 !important;
	padding: 0.625rem 1rem;
	border-radius: 20px;
	background: var(--wp--preset--color--white);
	box-shadow: 0 8px 20px rgba(37, 35, 58, 0.12);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 900;
	font-size: 1.25rem;
	line-height: 1.2;
	white-space: nowrap;
	pointer-events: auto;
}

.ab-bubble::after {
	content: "";
	position: absolute;
	bottom: -9px;
	left: 22px;
	border: 10px solid transparent;
	border-top-color: var(--wp--preset--color--white);
	border-bottom: 0;
}

.ab-bubbles .ab-bubble:nth-child(1) { left: 2%; top: 6%; color: var(--wp--preset--color--purple-ink); }
.ab-bubbles .ab-bubble:nth-child(2) { right: 4%; top: 2%; color: var(--wp--preset--color--mint-ink); }
.ab-bubbles .ab-bubble:nth-child(3) { left: -2%; top: 44%; color: var(--wp--preset--color--coral-ink); }
.ab-bubbles .ab-bubble:nth-child(4) { right: -1%; top: 36%; color: var(--wp--preset--color--yellow-ink); }
.ab-bubbles .ab-bubble:nth-child(5) { left: 6%; bottom: 8%; color: var(--wp--preset--color--purple-ink); }
.ab-bubbles .ab-bubble:nth-child(6) { right: 6%; bottom: 14%; color: var(--wp--preset--color--mint-ink); }
.ab-bubbles .ab-bubble:nth-child(7) { left: 42%; bottom: -2%; color: var(--wp--preset--color--coral-ink); }

.ab-bubble--static {
	right: 4%;
	top: 6%;
	color: var(--wp--preset--color--purple-ink);
}

/* ---------- Sections ---------- */

.ab-section {
	padding-block: clamp(4rem, 8vw, 5.5rem);
	padding-inline: var(--wp--preset--spacing--20);
}

.ab-section > * + * {
	margin-block-start: clamp(2rem, 4vw, 2.5rem);
}

.ab-section--tight-top {
	padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.ab-section--latest:not(:has(.ab-latest-section)) {
	display: none;
}

.ab-section-head {
	gap: 0.75rem;
	max-width: 46rem;
	margin-inline: auto;
}

.ab-section-head > * {
	margin: 0;
}

.ab-row-head {
	gap: 1.5rem;
}

.ab-row-head > .wp-block-group {
	flex: 1 1 28rem;
	max-width: 44rem;
	gap: 0.625rem;
}

.ab-row-head > .wp-block-group > * {
	margin: 0;
}

/* Meet Adele */
.ab-meet__photo-col {
	position: relative;
}

.ab-meet__photo {
	margin: 0 auto;
	max-width: 380px;
}

.ab-meet__card {
	gap: 1rem;
}

.ab-meet__card > * {
	margin: 0;
}

/* Learning adventures */
.ab-feature {
	height: 100%;
	gap: 0.75rem;
	padding: 1.75rem 1.5rem;
	border-radius: 28px;
	background: var(--wp--preset--color--white);
	box-shadow: 0 6px 0 #EFE6D6;
}

.ab-feature > * {
	margin: 0;
}

.ab-feature__icon {
	margin: 0;
}

/* Parents and teachers */
.ab-parents {
	position: relative;
	overflow: hidden;
	gap: 2.5rem;
	padding: clamp(2rem, 5vw, 4rem);
	border-radius: 36px;
}

.ab-parents::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
}

.ab-parents__text {
	flex: 999 1 26rem;
	gap: 1rem;
}

.ab-parents__text > * {
	margin: 0;
}

.ab-parents__art {
	flex: 1 1 14rem;
	max-width: 300px;
	margin: 0 auto;
}

/* 404 */
.ab-404 {
	text-align: center;
}

/* ---------- Footer ---------- */

.ab-footer {
	position: relative;
	margin-top: 120px !important;
}

.ab-footer::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 120px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 80 C 200 20 380 100 620 60 S 1020 10 1240 60 S 1400 70 1440 50 V120 H0z' fill='%234BC7B1'/%3E%3Cpath d='M0 100 C 260 60 500 120 760 90 S 1200 60 1440 96 V120 H0z' fill='%2325233A'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
	pointer-events: none;
}

.ab-footer a {
	color: inherit;
	text-decoration: none;
}

.ab-footer a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ab-footer__logo {
	margin: 0 0 1rem;
}

/* On the dark footer the full-colour logo sits on a white card, so its dark lettering stays visible. */
.ab-footer__logo a {
	display: inline-block;
	padding: 12px 16px;
	border-radius: 20px;
	background: #FFFFFF;
}

.ab-footer__logo img {
	width: 228px !important;
}

.ab-footer .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0.375rem 0;
}

.ab-footer__heading {
	color: var(--wp--preset--color--yellow) !important;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ab-footer__legal {
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}

/* ---------- Content pages ---------- */

.wp-block-post-content > *:first-child {
	margin-top: 0;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 781px) {

	.ab-hero__media {
		min-height: 420px;
	}

	/* Footer link columns side by side on phones, so the footer stays short. */
	.ab-footer__cols {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ab-footer__cols > .wp-block-column:first-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 520px) {

	.ab-hero__media {
		min-height: 360px;
	}

	.ab-bubble {
		padding: 0.5rem 0.75rem;
		font-size: 1rem;
	}

	.ab-bubble--static {
		right: 0;
	}
}

/* ---------- Language hubs (Stage 4) ---------- */

/* Hub sections sit closer together than homepage bands. */
.ab-hub-content > .ab-hub-section {
	padding-block: clamp(2.25rem, 5vw, 3.5rem);
	padding-inline: 0;
}

.ab-hub-content > .ab-hub-welcome {
	padding-top: clamp(1rem, 3vw, 2rem);
}

/* "Try It!" sits in a warm rounded panel. */
.ab-hub-content > .ab-hub-section.ab-band {
	margin-block: clamp(1rem, 3vw, 2rem);
	padding: clamp(1.75rem, 4vw, 3rem);
	border-radius: 32px;
	background: var(--wp--preset--color--sunshine-wash, #FFF1D6);
}

.ab-hub-content > .ab-hub-section.ab-band > h2 {
	text-align: center;
}

/* The brief's content categories, shown as chips. */
ul.ab-topic-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.ab-topic-list li {
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--lavender-deep, #E8E2FC);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	font-size: 0.9375rem;
}

/* ---------- About Adele and My Language Journey ---------- */

.ab-about-hero__sub {
	margin: 0.75rem 0 0;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	font-size: clamp(1.375rem, 2.6vw, 1.875rem);
	line-height: 1.25;
}

.ab-about-intro p {
	line-height: 1.7;
}

.ab-story-card {
	max-width: 880px;
	margin-inline: auto;
	gap: 0.875rem;
}

.ab-eyebrow--dark {
	color: var(--wp--preset--color--coral-ink);
}

/* ---------- Adele TV (Stage 5) ---------- */

.ab-video-stage {
	padding-left: var(--wp--preset--spacing--20);
	padding-right: var(--wp--preset--spacing--20);
}

.ab-video-stage > * + * {
	margin-top: 1.25rem;
}

.ab-video-stage__title {
	margin-top: 2rem !important;
	font-size: clamp(2rem, 4.5vw, 3.25rem);
}

.ab-video-content:not(:empty) {
	padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

.ab-video-extras {
	padding: clamp(1.5rem, 4vw, 2.5rem) var(--wp--preset--spacing--20) 0;
}

.ab-video-extras:not(:has(*)) {
	display: none;
}

/* ---------- Flashcards and quizzes (Stage 6) ---------- */

.ab-activity-content {
	padding: clamp(1.5rem, 4vw, 2.5rem) var(--wp--preset--spacing--20) 0;
}

.ab-activity-hero > * + * {
	margin-top: 1rem;
}

/* ---------- Parents & Teachers (Stage 8) ---------- */

.ab-howto .wp-block-column {
	padding: 22px;
}

.ab-howto__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--sunshine, #FFB84D);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 900;
	font-size: 1.25rem;
}

.ab-howto h3 {
	margin: 12px 0 6px;
}

.ab-ideas {
	padding: 0;
	list-style: none;
}

.ab-ideas li {
	position: relative;
	margin: 0 0 12px;
	padding-left: 36px;
}

.ab-ideas li::before {
	content: "★";
	position: absolute;
	left: 0;
	top: 0;
	color: #B86E00;
	font-size: 1.25rem;
	line-height: 1.4;
}

.ab-ideas--safe li::before {
	content: "✓";
	color: var(--wp--preset--color--mint-ink, #1F7A6B);
	font-weight: 900;
}

.ab-faq {
	margin: 0 0 12px;
	padding: 0 !important;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 4px 0 #E8E2FC;
}

.ab-faq summary {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 12px 20px;
	list-style: none;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 900;
	font-size: 1.0625rem;
	cursor: pointer;
}

.ab-faq summary::-webkit-details-marker {
	display: none;
}

.ab-faq summary::before {
	content: "+";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #F5F3FF;
	color: var(--wp--preset--color--purple-ink, #6A45C7);
	font-size: 1.25rem;
}

.ab-faq[open] summary::before {
	content: "−";
}

.ab-faq > :not(summary) {
	margin: 0;
	padding: 0 20px 18px;
}

/* ---------- Draft legal pages (Stage 8) ---------- */

.ab-legal h2 {
	margin-top: 2rem;
	font-size: clamp(1.375rem, 3vw, 1.75rem);
}

/* ---------- Footer groups on phones (Stage 8) ---------- */

.ab-footer__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 48px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
}

.ab-footer__toggle svg {
	transition: transform 0.2s ease;
}

.ab-footer__toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.ab-footer nav[hidden] {
	display: none !important;
}

@media (max-width: 600px) {

	/* One group under another, each folded behind its heading. */
	.ab-footer__cols {
		grid-template-columns: minmax(0, 1fr) !important;
		row-gap: 0 !important;
	}

	.ab-footer__cols > .wp-block-column:first-child {
		margin-bottom: 1.5rem;
	}

	.ab-footer__cols > .wp-block-column:not(:first-child) {
		border-top: 1px solid rgba(255, 255, 255, 0.14);
		padding: 4px 0;
	}

	.ab-footer__cols > .wp-block-column:not(:first-child) .ab-footer__heading {
		margin: 0;
	}
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.wp-element-button:hover,
	.wp-block-button__link:hover {
		transform: none;
	}
}
