/* ==========================================================================
   Components (.c-*): button, pill link, eyebrow, section head, stamp frame, wave,
   postcard, story card, slider, page hero, breadcrumb, sub-page grid, prose, placeholder.
   Planned (docs/05): .c-book, .c-faq.
   ========================================================================== */

/* --- Button ----------------------------------------------------------- */
.c-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: var(--tap-min);
	padding: var(--space-2) var(--space-5);
	border: var(--border-w) solid transparent;
	border-radius: var(--radius-pill);
	font-weight: var(--fw-bold);
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

/* Hover lift + press (header button stays put: it sits on the bar). */
.c-btn--primary:hover,
.c-btn--secondary:hover {
	transform: translateY(var(--lift));
}

.c-btn:active {
	transform: none;
}

.c-btn--primary,
.c-btn--header {
	background: var(--c-primary);
	color: var(--c-on-primary);
	box-shadow: var(--shadow-btn);
}

.c-btn--primary:hover,
.c-btn--header:hover {
	background: var(--c-primary-dark);
}

.c-btn--secondary {
	background: rgba(255, 255, 255, 0.74);
	border-color: var(--c-primary);
	color: var(--c-primary);
}

.c-btn--secondary:hover {
	background: var(--c-primary);
	color: var(--c-on-primary);
}

.c-btn--block {
	width: 100%;
}

.c-btn .c-icon {
	display: inline-flex;
	width: 0.9em;
	transition: transform var(--transition-fast);
}

.c-btn:hover .c-icon {
	transform: translateX(3px);
}

.c-btn .c-icon svg {
	width: 100%;
	height: auto;
}

.c-btn--primary .c-icon path {
	stroke: currentColor;
}

/* --- Pill link: "Xem câu chuyện ⟶" (Figma: outline pill + blue round arrow) */
.c-pill-link {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3);
	min-height: var(--tap-min);
	padding: 4px 4px 4px var(--space-5);
	background: var(--c-surface);
	border: 1px solid var(--c-primary);
	border-radius: var(--radius-pill);
	color: var(--c-primary);
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background var(--transition-fast);
}

.c-pill-link[href]:hover {
	background: var(--c-pastel-ice);
}

.c-pill-link .c-icon {
	display: inline-flex;
	flex: none;
	width: 36px;
	height: 36px;
	transition: transform var(--transition-fast);
}

.c-pill-link .c-icon svg {
	width: 100%;
	height: 100%;
}

.c-pill-link[href]:hover .c-icon {
	transform: rotate(45deg);
}

/* --- Eyebrow + section head ------------------------------------------ */
.c-eyebrow {
	margin-bottom: var(--space-2);
	font-family: var(--font-eyebrow);
	font-size: var(--fs-eyebrow);
	font-weight: var(--fw-semibold);   /* Figma: 700 on most section heads, 500 on two — one weight for all */
	color: var(--c-text-eyebrow);
}

.c-section-head {
	max-width: 76rem;              /* Figma H2 boxes up to ~1450px at 1920 */
	margin-bottom: var(--head-gap);
}

.c-section-head--center {
	margin-inline: auto;
	text-align: center;
}

.c-section-head__title {
	font-family: var(--font-display);
	font-size: var(--fs-h2);
	font-weight: var(--fw-bold);
	color: var(--c-primary);
}

h1.c-section-head__title {
	font-size: var(--fs-h1);
}

.c-section-head__accent {
	display: block;
	color: var(--c-accent);
}

.c-section-head--inline .c-section-head__accent {
	display: inline;
}

.c-section-head__lead {
	margin-top: var(--space-4);
	font-size: var(--fs-lead);
}

/* --- Stamp frame (Figma: blue postage-stamp edge around a pastel panel) ---
   Pure CSS: 4 masks (one per edge) cut the perforation, intersected. `round` spaces the holes
   evenly whatever the box size, so the frame works for any content height. */
.c-stamp {
	--stamp-color: var(--c-primary);
	--stamp-fill: var(--c-surface);
	--stamp-frame: clamp(12px, 0.2rem + 1.1vw, 26px);       /* Figma ≈ 70 */
	--stamp-r: clamp(5px, 0.267rem + 0.194vw, 8px);          /* hole radius, Figma ≈ 21 */
	--stamp-step: calc(var(--stamp-r) * 3.6);
	--stamp-radius: 2px;
	padding: var(--stamp-frame);
	background: var(--stamp-color);
	-webkit-mask:
		radial-gradient(circle var(--stamp-r) at 50% 0, #0000 calc(100% - 0.5px), #000) 0 0 / var(--stamp-step) 100% round no-repeat,
		radial-gradient(circle var(--stamp-r) at 50% 100%, #0000 calc(100% - 0.5px), #000) 0 0 / var(--stamp-step) 100% round no-repeat,
		radial-gradient(circle var(--stamp-r) at 0 50%, #0000 calc(100% - 0.5px), #000) 0 0 / 100% var(--stamp-step) no-repeat round,
		radial-gradient(circle var(--stamp-r) at 100% 50%, #0000 calc(100% - 0.5px), #000) 0 0 / 100% var(--stamp-step) no-repeat round;
	-webkit-mask-composite: source-in;
	mask:
		radial-gradient(circle var(--stamp-r) at 50% 0, #0000 calc(100% - 0.5px), #000) 0 0 / var(--stamp-step) 100% round no-repeat,
		radial-gradient(circle var(--stamp-r) at 50% 100%, #0000 calc(100% - 0.5px), #000) 0 0 / var(--stamp-step) 100% round no-repeat,
		radial-gradient(circle var(--stamp-r) at 0 50%, #0000 calc(100% - 0.5px), #000) 0 0 / 100% var(--stamp-step) no-repeat round,
		radial-gradient(circle var(--stamp-r) at 100% 50%, #0000 calc(100% - 0.5px), #000) 0 0 / 100% var(--stamp-step) no-repeat round;
	mask-composite: intersect;
}

.c-stamp__inner {
	height: 100%;
	background: var(--stamp-fill);
	border-radius: var(--stamp-radius);
}

.c-stamp--pink { --stamp-fill: var(--c-pastel-pink); }
.c-stamp--ice { --stamp-fill: var(--c-pastel-ice); }
.c-stamp--green { --stamp-fill: var(--c-pastel-green); }
.c-stamp--lavender { --stamp-fill: var(--c-pastel-purple); }
.c-stamp--yellow { --stamp-fill: var(--c-pastel-yellow); }
.c-stamp--sky { --stamp-fill: var(--c-pastel-sky); }
.c-stamp--cyan { --stamp-fill: var(--c-pastel-cyan); }
.c-stamp--orange { --stamp-fill: var(--c-pastel-orange); }
.c-stamp--mist { --stamp-fill: var(--c-surface-mist); --stamp-radius: var(--radius-xl); }

/* --- Wave edge on top of a section (sanankids_wave()) -----------------------
   Sits in the previous section's bottom padding, painted in this section's colour (--wave-color). */
.c-wave {
	position: absolute;
	right: 0;
	bottom: calc(100% - 1px);
	left: 0;
	height: clamp(24px, 0.9rem + 2.9vw, 72px);
	color: var(--wave-color, var(--c-bg));
	pointer-events: none;
}

.c-wave svg {
	display: block;
	width: 100%;
	height: 100%;
}

.c-wave path {
	fill: currentColor;
}

.c-wave--flip svg {
	transform: scaleX(-1);
}

/* Bottom edge: drawn inside the section's bottom in the NEXT section's colour (--wave-next). */
.c-wave--bottom {
	bottom: -1px;
	color: var(--wave-next, var(--c-bg));
}

/* --- Postcard (8 tính năng, Figma "image 13–28") ----------------------- */
.c-postcard {
	height: 100%;
	transition: transform var(--transition-base);
}

.c-postcard:hover,
.c-postcard:focus-within {
	transform: translateY(-4px);
}

.c-postcard__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: var(--space-5) clamp(12px, 0.2rem + 0.9vw, 22px) var(--space-5);
	text-align: center;
}

.c-postcard__media {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: clamp(112px, 6.2rem + 1.6vw, 150px);
	margin-bottom: var(--space-4);
}

.c-postcard__img {
	width: auto;
	max-width: 100%;
	height: 100%;
	object-fit: contain;
}

.c-postcard__title {
	font-family: var(--font-display);
	font-size: var(--fs-card-title);
	font-weight: var(--fw-bold);
	line-height: 1.25;
	color: var(--c-primary);
}

.c-postcard__sub {
	margin-top: var(--space-1);
	font-family: var(--font-display);
	font-size: var(--fs-sm);
	font-weight: var(--fw-semibold);
	line-height: 1.3;
	color: var(--c-primary-dark);
}

.c-postcard__list {
	display: grid;
	gap: var(--space-3);
	width: 100%;
	font-family: var(--font-eyebrow);
	font-size: var(--fs-sm);
	font-weight: var(--fw-medium);
	line-height: 1.45;
	color: var(--c-primary-dark);
	text-align: left;
}

.c-postcard .c-postcard__list {
	margin-top: var(--space-5);        /* beats reset.css ul[class] { margin: 0 } */
}

.c-postcard__list li {
	position: relative;
	padding-left: 14px;
}

.c-postcard__list li::before {
	content: "";
	position: absolute;
	top: 0.6em;
	left: 1px;
	width: 5px;
	height: 5px;
	background: currentColor;
	border-radius: 50%;
}

.c-postcard__foot {
	margin-top: auto;
	padding-top: var(--space-5);
}

.c-postcard__more {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-height: 40px;
	padding: var(--space-2) var(--space-5);
	background: rgba(255, 255, 255, 0.92);
	border-radius: var(--radius-pill);
	box-shadow: 0 3px 9px -1px rgba(102, 102, 102, 0.33);   /* Figma 0 9 23.9 -1 */
	color: var(--c-primary);
	font-size: var(--fs-sm);           /* type scale: link buttons = 15px Mona Sans bold (as .c-pill-link) */
	font-weight: var(--fw-bold);
	text-decoration: none;
	transition: background var(--transition-fast), color var(--transition-fast);
}

.c-postcard__more .c-icon {
	display: inline-flex;
	width: 10px;
	transition: transform var(--transition-fast);
}

.c-postcard__more .c-icon svg {
	width: 100%;
	height: auto;
}

.c-postcard__more:hover {
	background: var(--c-surface);
}

.c-postcard__more:hover .c-icon {
	transform: translateX(3px);
}

/* --- Story card (Sẻ chia chân thành, Figma "Group 87–89") --------------- */
.c-story-card {
	--card-head: var(--c-surface-ice);
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: var(--c-surface);
	border: var(--border-w) solid var(--c-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-card);
	transition: transform var(--transition-base);
}

/* Same lift as the feature postcards. */
.c-story-card:hover,
.c-story-card:focus-within {
	transform: translateY(-4px);
}

.c-story-card--peach { --card-head: var(--c-pastel-peach); }
.c-story-card--green { --card-head: var(--c-pastel-green); }

.c-story-card__head {
	position: relative;
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: var(--space-5) var(--space-5) var(--space-5);
	background: var(--card-head);
}

.c-story-card__kicker,
.c-story-card__title {
	padding-right: 52px;               /* room for the badge */
}

.c-story-card__kicker {
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	color: var(--c-primary);
}

.c-story-card__title {
	margin-top: var(--space-1);
	font-family: var(--font-display);  /* type scale: card titles = Montserrat Alternates 19px */
	font-size: var(--fs-card-title);
	font-weight: var(--fw-bold);
	line-height: 1.3;
	color: var(--c-primary-dark);
}

.c-story-card__badge {
	position: absolute;
	top: var(--space-5);
	right: var(--space-5);
	display: inline-flex;
	width: 40px;
	height: 40px;
}

.c-story-card__badge svg {
	width: 100%;
	height: 100%;
}

.c-story-card__text {
	margin-top: var(--space-4);
	font-family: var(--font-text);
	font-size: var(--fs-sm);
	font-weight: var(--fw-medium);
	line-height: 1.7;
}

.c-story-card__author {
	margin-top: var(--space-3);
	font-family: var(--font-text);
	font-size: var(--fs-sm);
	font-weight: var(--fw-medium);
	text-align: right;
}

.c-story-card__media {
	position: relative;
	padding: var(--space-4) clamp(16px, 0.6rem + 1.6vw, 44px) 40px;
}

.c-story-card__img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border: var(--border-w) solid var(--c-border);
	border-radius: var(--radius-md);
}

.c-story-card__more {
	position: absolute;
	right: clamp(10px, 0.3rem + 1.4vw, 36px);
	bottom: 14px;
	box-shadow: 0 0 0 6px var(--c-surface);   /* white notch around the pill (Figma) */
}

/* --- Slider (hero) — fade + dots (no pause button: Figma 18/11), data-slider in main.js -------- */
.c-slider {
	position: relative;
}

.c-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.8s ease;
}

.c-slider__slide.is-active {
	z-index: 1;
	opacity: 1;
}

.c-slider__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.c-slider__controls {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	padding: 7px 10px;
	background: rgba(255, 255, 255, 0.92);
	border-radius: var(--radius-pill);
	box-shadow: 0 3px 9px -1px rgba(102, 102, 102, 0.33);
}

.c-slider__dot {
	position: relative;
	flex: none;
	width: 26px;
	height: 26px;
	padding: 0;
	background: var(--c-surface);
	border: 1.5px solid var(--c-ring);
	border-radius: var(--radius-pill);
	cursor: pointer;
	transition: width var(--transition-base), background var(--transition-base), border-color var(--transition-base);
}

/* 44px touch target without changing the drawn size */
.c-slider__dot::after {
	content: "";
	position: absolute;
	inset: -9px -4px;
}

.c-slider__dot[aria-current="true"] {
	width: 68px;
	background: var(--c-primary);
	border-color: var(--c-primary);
}

/* --- Page hero + breadcrumb ------------------------------------------ */
.c-page-hero {
	padding-block: var(--space-6) var(--space-7);
}

.c-breadcrumb {
	margin-bottom: var(--space-5);
	font-size: var(--fs-xs);
}

.c-breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1) var(--space-2);
}

.c-breadcrumb__item:not(:last-child)::after {
	content: "›";
	margin-left: var(--space-2);
	color: var(--c-text-eyebrow);
}

.c-breadcrumb a {
	color: var(--c-primary);
	text-decoration: none;
}

.c-breadcrumb a:hover {
	text-decoration: underline;
}

.c-page-hero__title {
	font-family: var(--font-display);
	font-size: var(--fs-h1);
	font-weight: var(--fw-bold);
	color: var(--c-primary);
}

.c-page-hero__lead {
	max-width: 48rem;
	margin-top: var(--space-4);
	font-size: var(--fs-lead);
}

/* --- Sub-page grid ---------------------------------------------------- */
.c-subpage-grid {
	margin-top: var(--space-7);
}

.c-subpage-grid__title {
	margin-bottom: var(--space-4);
	font-size: var(--fs-h3);
}

.c-subpage-grid__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--space-4);
}

.c-subpage-grid__link {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	height: 100%;
	padding: var(--space-4) var(--space-5);
	background: var(--c-surface);
	border: var(--border-w) solid var(--c-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-card);
	text-decoration: none;
	transition: border-color var(--transition-fast);
}

.c-subpage-grid__link:hover {
	border-color: var(--c-primary);
}

.c-subpage-grid__name {
	font-weight: var(--fw-bold);
	color: var(--c-primary-dark);
}

.c-subpage-grid__desc {
	font-size: var(--fs-sm);
}

/* --- Prose (block editor content) ------------------------------------ */
.c-prose > * + * {
	margin-top: 1em;
}

.c-prose a {
	color: var(--c-primary);
}

/* --- Placeholder (skeleton phase only) -------------------------------- */
.c-placeholder {
	display: grid;
	place-content: center;
	gap: var(--space-1);
	min-height: 160px;
	padding: var(--space-5);
	background: repeating-linear-gradient(-45deg, var(--c-pastel-ice) 0 12px, var(--c-bg) 12px 24px);
	border: var(--border-w) dashed var(--c-border);
	border-radius: var(--radius-md);
	text-align: center;
}

.c-placeholder__label {
	font-weight: var(--fw-bold);
	color: var(--c-primary-dark);
}

.c-placeholder__note {
	font-size: var(--fs-sm);
}

/* --- Post list (index.php) ------------------------------------------- */
.c-post-list {
	display: grid;
	gap: var(--space-3);
}

.c-post-list__item {
	display: flex;
	justify-content: space-between;
	gap: var(--space-4);
	padding-bottom: var(--space-3);
	border-bottom: 1px solid var(--c-border);
}

/* --- Marquee: endless logo row (template-parts/components/marquee.php) --
   CSS only: the track holds the list twice and slides by -50%. Edges fade out.
   Pauses on hover / keyboard focus; with reduced motion it becomes a plain horizontal scroller. */
.c-marquee {
	--marquee-gap: clamp(10px, 0.4rem + 0.6vw, 18px);
	--marquee-fade: clamp(28px, 6vw, 110px);  /* fixed width, not % — a % fade is too thin on phones and slices the pills */
	overflow: hidden;
	padding-block: 6px;                       /* room for the pill shadow / hover lift */
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--marquee-fade), #000 calc(100% - var(--marquee-fade)), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 var(--marquee-fade), #000 calc(100% - var(--marquee-fade)), transparent);
}

.c-marquee__track {
	display: flex;
	width: max-content;
	animation: sk-marquee var(--marquee-duration, 40s) linear infinite;
}

.c-marquee--right .c-marquee__track {
	animation-direction: reverse;
}

.c-marquee:hover .c-marquee__track,
.c-marquee:focus-within .c-marquee__track {
	animation-play-state: paused;
}

.c-marquee .c-marquee__group {         /* parent prefix beats reset.css ul[class] { padding: 0 } */
	display: flex;
	flex: none;
	gap: var(--marquee-gap);
	padding-right: var(--marquee-gap);     /* same gap at the seam between the two copies */
}

.c-marquee__item {
	flex: none;
}

@keyframes sk-marquee {
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.c-marquee {
		overflow-x: auto;
		scrollbar-width: thin;
		-webkit-mask-image: none;
		mask-image: none;
	}

	.c-marquee__track {
		animation: none;
	}

	.c-marquee [data-dup] {
		display: none;
	}
}

/* --- Logo pill (inside the marquee) ------------------------------------- */
.c-logo-pill {
	display: flex;
	gap: var(--space-3);
	align-items: center;
	min-height: clamp(48px, 2.6rem + 0.5vw, 58px);
	padding: var(--space-2) var(--space-5) var(--space-2) 9px;
	background: var(--c-surface);
	border-radius: var(--radius-pill);
	box-shadow: 0 2px 8px rgba(35, 115, 19, 0.08);
	color: var(--c-text-strong);
	text-decoration: none;
	white-space: nowrap;
	transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

/* Logo-only card (marquee variant "logo", home "Đối tác" — 42 logos from SanAn, 18/11). The <img> box
   size is set inline by marquee.php (same visual weight for square and wide logos). */
.c-logo-card {
	display: flex;
	align-items: center;
	justify-content: center;
	height: clamp(72px, 3.8rem + 1.2vw, 88px);
	padding-inline: clamp(16px, 0.8rem + 0.6vw, 26px);
	background: var(--c-surface);
	border-radius: var(--radius-md);
	box-shadow: 0 2px 8px rgba(35, 115, 19, 0.08);
	transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.c-logo-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(35, 115, 19, 0.14);
}

.c-logo-card__img {
	flex: none;
	max-width: none;
	object-fit: contain;
}

@media (max-width: 767px) {
	.c-logo-card__img {
		scale: 0.85;                      /* phones: a touch smaller, more logos on screen */
	}
}

.c-logo-pill:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(35, 115, 19, 0.14);
}

.c-logo-pill__mark,
.c-logo-pill__img {
	flex: none;
	width: clamp(32px, 1.8rem + 0.3vw, 40px);
	height: clamp(32px, 1.8rem + 0.3vw, 40px);
}

.c-logo-pill__mark {
	display: grid;
	place-items: center;
	background: var(--mark, var(--c-primary));
	border-radius: 50%;
	color: #FFF;
	font-size: 12px;
	font-weight: var(--fw-bold);
	letter-spacing: 0.02em;
}

.c-logo-pill__img {
	border-radius: 10px;
	object-fit: contain;
}

.c-logo-pill__text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.c-logo-pill__name {
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
}

.c-logo-pill__desc {
	color: var(--c-text-eyebrow);
	font-size: var(--fs-xs);
}
/* --- Postcard opening the feature board in place (home page) -------------- */
.c-postcard__more--stretch {
	border: 0;
	cursor: pointer;
}

/* whole card clickable — the stamp is the containing block (transform/position) */
.c-postcard {
	position: relative;
}

.c-postcard__more--stretch::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* --- Feature board (home "Nền tảng công nghệ", Figma Section 20–27) ---------
   Left: stack of 8 colour tabs — the chosen one opens (illustration + name + sub-line).
   Stacking fans out from the chosen tab (z-index set by main.js). Right: tab panels. */
.c-feature-board[hidden],
.c-feature-panel[hidden] {
	display: none;
}

.c-feature-board__top {
	margin-bottom: var(--space-5);
}

.c-feature-board__back {
	display: inline-flex;
	gap: var(--space-2);
	align-items: center;
	min-height: var(--tap-min);
	padding: var(--space-2) var(--space-5) var(--space-2) var(--space-3);
	background: var(--c-surface);
	border: 1px solid var(--c-primary);
	border-radius: var(--radius-pill);
	color: var(--c-primary);
	font: inherit;
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	cursor: pointer;
	transition: background var(--transition-fast);
}

.c-feature-board__back:hover {
	background: var(--c-pastel-ice);
}

.c-feature-board__back-icon {
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("../img/icons/arrow-right.svg") center / 12px no-repeat;
	mask: url("../img/icons/arrow-right.svg") center / 12px no-repeat;
	transform: scaleX(-1);
}

.c-feature-board__layout {
	display: grid;
	gap: var(--space-5);
	align-items: start;
}

/* Tabs — mobile / tablet: a row of colour chips scrolling sideways */
.c-feature-board__tabs {
	display: flex;
	gap: var(--space-2);
	margin-inline: calc(var(--container-gutter) * -1);
	padding: 4px var(--container-gutter) 8px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}

.c-feature-board__tabs::-webkit-scrollbar {
	display: none;
}

.c-feature-tab {
	--tab-bg: var(--c-pastel-ice);
	position: relative;
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: var(--space-2) var(--space-5);
	background: var(--tab-bg);
	border: 0;
	border-radius: var(--radius-pill);
	color: var(--c-primary);
	font-family: var(--font-display);
	text-align: center;
	cursor: pointer;
	scroll-snap-align: start;
	transition: box-shadow var(--transition-fast), transform var(--transition-base);
}

.c-feature-tab--pink { --tab-bg: var(--c-pastel-pink); }
.c-feature-tab--ice { --tab-bg: var(--c-pastel-ice); }
.c-feature-tab--green { --tab-bg: var(--c-pastel-green); }
.c-feature-tab--lavender { --tab-bg: var(--c-pastel-purple); }
.c-feature-tab--yellow { --tab-bg: var(--c-pastel-yellow); }
.c-feature-tab--sky { --tab-bg: var(--c-pastel-sky); }
.c-feature-tab--cyan { --tab-bg: var(--c-pastel-cyan); }
.c-feature-tab--orange { --tab-bg: var(--c-pastel-orange); }

.c-feature-tab:focus-visible {
	outline: 3px solid var(--c-primary-dark);
	outline-offset: -6px;
}

.c-feature-tab[aria-selected="true"] {
	box-shadow: inset 0 0 0 2px var(--c-primary);
}

.c-feature-tab__name {
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	line-height: 1.25;
	white-space: nowrap;
}

/* extra content of the open tab (picture above, sub-line below) — grid-rows trick animates height */
.c-feature-tab__more {
	display: none;
}

/* Desktop: the Figma card stack */
@media (min-width: 1024px) {
	.c-feature-board__layout {
		grid-template-columns: minmax(240px, 342px) minmax(0, 1fr);
		gap: clamp(28px, 2.6vw, 48px);
	}

	.c-feature-board__tabs {
		flex-direction: column;
		gap: 0;
		margin: 0;
		padding: 0 0 12px;
		overflow: visible;
	}

	/* Motion (main.js): the stack moves with FLIP transforms, the opening card is revealed with a
	   clip-path, its picture + sub-line rise in — only transform / opacity / clip-path are animated. */
	.c-feature-tab {
		--tab-overlap: 34px;
		--tab-r: clamp(36px, 3vw, 57px);
		width: 100%;
		margin-top: calc(var(--tab-overlap) * -1);  /* cards overlap like the Figma stack */
		padding: 42px var(--space-5);
		border-radius: var(--tab-r);
		box-shadow: 0 5px 9px -2px rgba(0, 0, 0, 0.22);   /* Figma 0 13 24 -4 rgba(0,0,0,.25) ÷ 2.625 */
		transition: box-shadow 0.25s ease, filter 0.25s ease;
	}

	.c-feature-tab:first-child {
		margin-top: 0;
	}

	.c-feature-tab:not([aria-selected="true"]):hover {
		filter: brightness(1.04) saturate(1.06);
		box-shadow: 0 9px 18px -4px rgba(0, 0, 0, 0.26);
	}

	.c-feature-tab[aria-selected="true"] {
		box-shadow: 0 10px 22px -6px rgba(0, 0, 0, 0.3);
	}

	.c-feature-tab.is-opening {
		animation: sk-tab-open 0.55s var(--ease-out) both;
	}

	@keyframes sk-tab-open {
		from { clip-path: inset(0 0 var(--grow, 0px) 0 round var(--tab-r)); }
		to { clip-path: inset(0 0 0 0 round var(--tab-r)); }
	}

	.c-feature-tab__name {
		font-size: var(--fs-tab);
		white-space: normal;
		transition: transform 0.5s var(--ease-out);
	}

	/* Name centred in the part that shows: a card above the open one has its bottom under the next card,
	   a card below has its top under the previous one (data-pos set by main.js). */
	.c-feature-tab[data-pos="above"] .c-feature-tab__name {
		transform: translateY(calc(var(--tab-overlap) / -2));
	}

	.c-feature-tab[data-pos="below"] .c-feature-tab__name {
		transform: translateY(calc(var(--tab-overlap) / 2));
	}

	.c-feature-tab[aria-selected="true"] .c-feature-tab__more {
		display: block;
		width: 100%;
	}

	.c-feature-tab.is-opening .c-feature-tab__more--top {
		animation: sk-rise-in 0.55s var(--ease-out) 0.12s both;
	}

	.c-feature-tab.is-opening .c-feature-tab__more--bottom {
		animation: sk-rise-in 0.55s var(--ease-out) 0.2s both;
	}

	.c-feature-tab__img {
		display: block;
		width: auto;
		height: clamp(120px, 6.4rem + 2vw, 190px);
		margin: 0 auto var(--space-4);
	}

	.c-feature-tab__sub {
		display: block;
		padding-top: var(--space-2);
		color: var(--c-primary-dark);
		font-size: clamp(0.875rem, 0.8rem + 0.2vw, 1.0625rem);
		font-weight: var(--fw-semibold);
		line-height: 1.3;
	}
}

/* Panels — all 8 sit in the same grid cell, so the area keeps the height of the tallest one and
   the page never jumps. The leaving panel fades out; the arriving one fades in, then its title,
   text, board and each device rise in one after another (.is-entering, main.js). */
.c-feature-board__panels {
	display: grid;
}

.c-feature-panel {
	grid-area: 1 / 1;
	min-width: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.c-feature-panel.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.25s ease;
}

.c-feature-panel.is-entering .c-feature-panel__title,
.c-feature-panel.is-entering .c-feature-panel__text,
.c-feature-panel.is-entering .c-feature-panel__board,
.c-feature-panel.is-entering .c-device {
	animation: sk-rise-in 0.6s var(--ease-out) both;
}

.c-feature-panel.is-entering .c-feature-panel__text { animation-delay: 0.05s; }
.c-feature-panel.is-entering .c-feature-panel__board { animation-delay: 0.1s; }
.c-feature-panel.is-entering .c-device { animation-delay: calc(0.18s + var(--i, 0) * 0.07s); }
.c-screen:nth-child(2),
.c-device:nth-child(2) { --i: 1; }
.c-screen:nth-child(3),
.c-device:nth-child(3) { --i: 2; }

@keyframes sk-rise-in {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

/* Grid ⇄ board morph (View Transitions API, main.js): the clicked postcard becomes the open tab. */
::view-transition-group(sk-feature) {
	animation-duration: 0.6s;
	animation-timing-function: var(--ease-out);
}

/* The rest of the page dissolves in sequence (old out, then new in) instead of a double exposure. */
::view-transition-old(root) {
	animation: sk-vt-out 0.18s ease-out both;
}

::view-transition-new(root) {
	animation: sk-vt-in 0.42s var(--ease-out) 0.12s both;
}

@keyframes sk-vt-out {
	to { opacity: 0; }
}

@keyframes sk-vt-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}

.c-feature-panel:focus-visible {
	outline: 3px solid rgba(var(--c-primary-rgb), 0.35);
	outline-offset: 6px;
	border-radius: var(--radius-md);
}

@keyframes sk-panel-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

.c-feature-panel__title {
	color: var(--c-primary);
	font-family: var(--font-display);
	font-size: var(--fs-block-title);
	font-weight: var(--fw-bold);
	line-height: 1.2;
}

.c-feature-panel__accent {
	color: var(--c-accent);
}

.c-feature-panel__text {
	max-width: 46em;
	margin-top: var(--space-3);
	color: var(--c-primary-dark);
	font-family: var(--font-text);
	font-size: var(--fs-lead);                              /* type scale: body text in large blocks */
	font-weight: var(--fw-medium);
	line-height: 1.5;
}

.c-feature-panel__board {
	--board-px: clamp(12px, 0.4rem + 2vw, 48px);
	position: relative;
	margin-top: clamp(20px, 0.8rem + 1.6vw, 48px);
	padding: clamp(24px, 1rem + 2vw, 60px) var(--board-px) clamp(20px, 0.8rem + 1.2vw, 40px);
	overflow: hidden;
	background: var(--board, var(--c-pastel-ice));
	border-radius: clamp(24px, 1rem + 1.6vw, 46px);         /* Figma 122 */
}

.c-feature-panel__deco {
	position: absolute;
	width: clamp(56px, 2.5rem + 3.4vw, 126px);
	height: auto;
	opacity: 0.43;
	pointer-events: none;
}

.c-feature-panel__deco--smile {
	top: 3%;
	left: 1.5%;
	transform: rotate(15deg);
}

.c-feature-panel__deco--triangle {
	right: 2%;
	bottom: 3%;
	transform: rotate(-26deg);
}

/* Devices of a board (Figma 26/11/2026, docs/07 §6i). Each picture = one Figma device (frame + screen,
   transparent PNG → webp). Same scale for all: one grid column per device = its Figma width ÷ 2900 of the row
   (--cols, from PHP), so a phone stays as tall next to a laptop as in Figma. Subgrid rows: the pictures
   stand on one line, the captions start on one line, however many lines a caption takes. */
.c-feature-panel .c-feature-panel__devices {      /* prefix beats reset.css ul[class] */
	position: relative;
	container-type: inline-size;                     /* captions are capped in cqi (below) */
	display: grid;
	grid-template-columns: var(--cols, 1fr 1fr);
	grid-template-rows: auto auto;
	column-gap: clamp(8px, 0.2rem + 1vw, 24px);
	justify-content: space-evenly;
}

.c-device {
	display: grid;
	grid-row: span 2;
	grid-template-rows: subgrid;
	justify-items: center;
	min-width: 0;
	text-align: center;
}

.c-device__media {
	display: flex;
	align-self: end;
	justify-content: center;
	width: 100%;
}

.c-device__img {
	display: block;
	width: 100%;
	height: auto;
}

.c-device__caption {
	/* a narrow phone still gets a readable caption; 21cqi ≈ the distance between two neighbouring phones,
	   so two captions never meet */
	width: max(100%, min(14em, 21cqi));
	max-width: 22em;
	margin-top: var(--space-4);
	color: var(--c-primary-dark);
	font-family: var(--font-display);
	font-size: clamp(0.8125rem, 0.72rem + 0.38vw, 1.1875rem);   /* 13 → 19 (Figma 49.6) */
	font-weight: var(--fw-bold);
	line-height: 1.35;
	text-wrap: balance;
}

.c-feature-panel__dots {
	display: none;
}

.c-screen {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.c-screen--phone {
	width: calc(var(--dev-h) * 0.4959);              /* phone body 243 / 490 (PNG margins cropped) */
}

.c-screen--tablet {
	width: calc(var(--dev-h) * 1.3062);              /* frame: 1 / 0.7656 */
}

.c-screen__device {
	position: relative;
	width: 100%;
}

.c-screen__img {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 10px 18px rgba(19, 61, 115, 0.16));
}

/* Tablet: the source PNGs (media/tablets/*.png, 588 × 474) carry a frame cut off on the left and bottom.
   Only the screen area (x 15–573, y 41–461 → 558 × 420) is shown, inside a frame drawn in CSS. */
.c-screen--tablet .c-screen__device {
	padding: 2.6%;
	background: #1C1D21;
	border-radius: 5.5% / 7.3%;
	box-shadow: inset 0 0 0 1.5px #3A3C42, 0 12px 26px -6px rgba(19, 61, 115, 0.28);
}

.c-screen--tablet .c-screen__device::before {          /* front camera dot */
	content: "";
	position: absolute;
	top: 1.1%;
	left: 50%;
	width: 5px;
	height: 5px;
	background: #3A3C42;
	border-radius: 50%;
	transform: translate(-50%, 0);
}

.c-screen__crop {
	position: relative;
	overflow: hidden;
}

.c-screen__crop .c-screen__img {
	max-width: none;
	filter: none;
}

.c-screen__crop--tablet {
	aspect-ratio: 558 / 420;
	background: #F4F6FB;
	border-radius: 1.6% / 2.1%;
}

.c-screen__crop--tablet .c-screen__img {
	width: 105.376%;          /* 588 / 558 */
	margin-top: -7.348%;      /* -41 / 558 (margins % = width of the crop box) */
	margin-left: -2.688%;     /* -15 / 558 */
}

/* Phone PNG 247 × 534: the body is x 2–244, y 13–502 (243 × 490); the rest is transparent margin.
   Cropping it lets the phone BODY match the tablet frame height exactly. */
.c-screen__crop--phone {
	display: flow-root;       /* own formatting context: the image's negative margin must not leak out (margin collapsing) */
	aspect-ratio: 243 / 490;
	min-height: 0;            /* keep the ratio even though the (transparent) PNG margins overflow */
	overflow: visible;        /* the overflow is transparent — no clipping, so the shadow stays */
	filter: drop-shadow(0 10px 18px rgba(19, 61, 115, 0.16));
}

.c-screen__crop--phone .c-screen__img {
	width: 101.646%;          /* 247 / 243 */
	margin-top: -5.35%;       /* -13 / 243 */
	margin-left: -0.823%;     /* -2 / 243 */
}

/* Camera: live classroom picture on the phone screen + LIVE badge (Figma image 54 / Rectangle 137),
   positions relative to the phone body. */
.c-screen__live-img {          /* = the phone screen: x 14–233, y 21–492 of the PNG, relative to the body box */
	position: absolute;
	top: 1.63%;
	left: 4.94%;
	width: 90.1%;
	height: 96.12%;
	object-fit: cover;
	object-position: 87% 50%;
	border-radius: 9% / 4.4%;
}

.c-screen__live {
	position: absolute;
	top: 5.5%;
	right: 12%;
	display: inline-flex;
	gap: 4px;
	align-items: center;
	padding: 2px 8px;
	background: #E0383E;
	border-radius: var(--radius-pill);
	color: #FFF;
	font-size: 11px;
	font-weight: var(--fw-bold);
	letter-spacing: 0.04em;
}

.c-screen__live::before {
	content: "";
	width: 6px;
	height: 6px;
	background: #FFF;
	border-radius: 50%;
	animation: sk-live 1.4s ease-in-out infinite;
}

@keyframes sk-live {
	50% { opacity: 0.3; }
}

/* Phones (user 26/11/2026): ONE device at a time — swipe sideways (native scroll-snap), dots below
   (main.js "Device carousel" keeps them in step and makes them clickable). */
@media (max-width: 767px) {
	.c-feature-panel .c-feature-panel__devices {
		display: flex;
		gap: 0;
		justify-content: flex-start;
		margin-inline: calc(var(--board-px) * -1);
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.c-feature-panel__devices::-webkit-scrollbar {
		display: none;
	}

	.c-device {
		display: flex;
		flex: 0 0 100%;
		flex-direction: column;
		align-items: center;
		width: 100%;
		padding-inline: var(--board-px);
		scroll-snap-align: center;
		scroll-snap-stop: always;
	}

	.c-device__media {
		flex: none;
		align-self: stretch;                         /* the grid "end" alignment above does not apply here */
		align-items: center;
		height: clamp(220px, 70vw, 340px);              /* same box for phone and laptop: dots never jump */
	}

	.c-device__img {
		width: auto;
		max-width: 100%;
		max-height: 100%;
	}

	.c-device__caption {
		width: 100%;
		min-height: calc(2 * 1.35em);                 /* captions are 1–2 lines here: dots stay put */
	}

	.c-feature-panel__dots {
		display: flex;
		gap: var(--space-2);
		justify-content: center;
		margin-top: var(--space-4);
	}

	.c-feature-panel__dot {
		position: relative;
		width: 8px;
		height: 8px;
		padding: 0;
		background: rgba(var(--c-primary-rgb), 0.25);
		border: 0;
		border-radius: var(--radius-pill);
		cursor: pointer;
		transition: width var(--transition-base), background var(--transition-base);
	}

	.c-feature-panel__dot::after {                   /* 32 × 28 touch target, drawn size unchanged */
		content: "";
		position: absolute;
		inset: -10px -12px;
	}

	.c-feature-panel__dot[aria-current="true"] {
		width: 24px;
		background: var(--c-primary);
	}

	.c-feature-panel__dot:focus-visible {
		outline: 2px solid var(--c-primary-dark);
		outline-offset: 3px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.c-screen__live::before,
	.c-feature-tab.is-opening,
	.c-feature-tab.is-opening .c-feature-tab__more,
	.c-feature-panel.is-entering .c-feature-panel__title,
	.c-feature-panel.is-entering .c-feature-panel__text,
	.c-feature-panel.is-entering .c-feature-panel__board,
	.c-feature-panel.is-entering .c-device,
	.c-feature-panel__dot {
		animation: none;
	}

	.c-feature-tab,
	.c-feature-tab__name,
	.c-feature-panel {
		transition: none;
	}
}
/* --- Notebook with 3 tabs ("3 tính năng vượt trội", template-parts/sections-top/why-choose.php) ---------
   Figma Group 68 / 72 / 112 (÷ 2.625): big blue stamp frame (Figma 4096 × 2398, frame 72) around an open
   notebook photo (only its two pages are shown: book-notebook.webp = Figma crop of image c9ca73), 3 colour
   tabs stuck on the left edge (Figma 492 × 200, open one 56 further out), left page = text, right page = screen.
   The tabs stay inside the content box (decision 18/11): the frame starts --tab-out to the right.
   Layer order as in Figma: blue frame < tabs < paper — the tabs are cut at the paper edge, so they
   look tucked under the pages. Behaviour: main.js [data-book]. Below 1024px: chips on top, one cream page. */
.c-book {
	--frame: clamp(12px, 0.2rem + 1.1vw, 26px);     /* = .c-stamp --stamp-frame (Figma 72) */
	--tab-out: clamp(142px, 8.9vw, 170px);         /* open tab, left of the frame (Figma 382 — a bit wider: 22px labels) */
	--tab-shift: clamp(12px, 1.1vw, 21px);          /* closed tabs sit this much further in (Figma 56) */
	--paper: #F8F6F1;
	position: relative;
	margin-top: clamp(28px, 1rem + 2.4vw, 72px);
}

.c-book__tabs {
	display: flex;
	gap: var(--space-2);
}

.c-book__tab {
	--tab-bg: #F8BAD2;
	--tab-ink: #8E2C5B;
	padding: 10px 18px;
	background: var(--tab-bg);
	border: 2px solid #FFF;
	border-radius: var(--radius-pill);
	box-shadow: 0 2px 8px rgba(19, 61, 115, 0.16);
	color: var(--tab-ink);
	font-family: var(--font-display);
	font-size: var(--fs-tab);
	font-weight: var(--fw-bold);
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 0.45s var(--ease-out), box-shadow 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
}

.c-book__tab--blue { --tab-bg: #CBDFFA; --tab-ink: #254D80; }
.c-book__tab--green { --tab-bg: #DEFACA; --tab-ink: #446F4C; }

.c-book__tab:focus-visible {
	outline: 3px solid rgba(var(--c-primary-rgb), 0.45);
	outline-offset: 3px;
}

.c-book__frame {
	--stamp-frame: var(--frame);
	--stamp-radius: var(--radius-md);               /* Figma 39 */
	margin-top: var(--space-4);
}

.c-book__inner {
	position: relative;
	overflow: clip;                                  /* not "hidden": a scroll container would stop aspect-ratio from growing */
	background: var(--paper);
}

.c-book__paper {
	display: none;
}

.c-book__panels {
	position: relative;
	display: grid;
}

.c-book__panel {
	grid-area: 1 / 1;
	display: grid;
	gap: var(--space-6);
	min-width: 0;
	padding: clamp(24px, 1rem + 2vw, 48px) clamp(20px, 0.8rem + 2vw, 44px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.c-book__panel.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.25s ease;
}

.c-book__panel:not(.is-active) {
	pointer-events: none;                            /* panels share one grid cell: only the open one takes clicks */
}

.c-book__panel:focus-visible {
	outline: 3px solid rgba(var(--c-primary-rgb), 0.35);
	outline-offset: -8px;
}

.c-book__page--text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.c-book__num {                                       /* Figma "TÍNH NĂNG 01": white pill, soft shadow */
	padding: 10px 24px;
	background: rgba(255, 255, 255, 0.92);
	border-radius: var(--radius-pill);
	box-shadow: 0 7px 17px rgba(102, 102, 102, 0.3);
	color: var(--c-primary-dark);
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.c-book__title {
	margin-top: clamp(16px, 0.6rem + 1.2vw, 36px);
	color: var(--c-primary);
	font-family: var(--font-display);
	font-size: var(--fs-block-title);
	font-weight: var(--fw-bold);
	line-height: 1.2;
}

.c-book .c-book__list {                              /* prefix beats reset.css ul[class] */
	display: grid;
	gap: clamp(10px, 0.4rem + 0.8vw, 22px);
	margin-top: clamp(16px, 0.6rem + 1.2vw, 32px);
	color: var(--c-primary-dark);
	font-family: var(--font-text);
	font-size: var(--fs-lead);
	font-weight: var(--fw-medium);
	line-height: 1.5;
	list-style: none;
}

.c-book__list li {
	position: relative;
	padding-left: 1.7em;
}

.c-book__list li::before {                           /* Figma pink marker "Vector" 81 × 55 */
	content: "";
	position: absolute;
	top: 0.4em;
	left: 0;
	width: 1.1em;
	height: 0.75em;
	background: url("../img/top/bullet-smile.svg") no-repeat center / contain;
}

.c-book__more {
	display: inline-flex;
	gap: var(--space-2);
	align-items: center;
	align-self: flex-end;
	margin-top: auto;                                /* Figma: bottom-right corner of the left page */
	padding-top: clamp(20px, 0.8rem + 1.4vw, 40px);
	color: var(--c-primary);
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	text-decoration: none;
}

.c-book__more .c-icon {
	display: inline-flex;
	width: 12px;
	transition: transform var(--transition-fast);
}

.c-book__more .c-icon svg {
	width: 100%;
	height: auto;
}

.c-book__more[href]:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.c-book__more[href]:hover .c-icon {
	transform: translateX(3px);
}

.c-book__page--media {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

/* App screens on the right page: label pill above the device, ▶ next, dots below (Figma Group 129, 143–146,
   151, 94, 141, 142). Slides share one grid cell: the page keeps the height of the tallest one. */
.c-shots {
	--phone-h: 340px;
	--tablet-w: min(100%, 420px);
	position: relative;
	width: 100%;
	touch-action: pan-y;
}

.c-shots__stage {
	display: grid;
	padding-inline: 44px;                            /* room for ▶ */
}

.c-shots__slide {
	grid-area: 1 / 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;                         /* a shorter screen (tablet) sits in the middle (decision 18/11) */
	gap: var(--space-4);
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.c-shots__slide.is-active {
	opacity: 1;
	visibility: inherit;                             /* not "visible": it would show through a hidden tab panel and catch its clicks */
	transition: opacity 0.3s ease;
}

.c-shots__slide.is-in .c-screen {
	animation: sk-shot-in 0.5s var(--ease-out) both;
}

.c-shots__slide.is-in.is-back .c-screen {
	animation-name: sk-shot-back;
}

@keyframes sk-shot-in {
	from { opacity: 0; transform: translateX(28px); }
	to { opacity: 1; transform: none; }
}

@keyframes sk-shot-back {
	from { opacity: 0; transform: translateX(-28px); }
	to { opacity: 1; transform: none; }
}

.c-shots__label {                                    /* Figma 494 × 116, #0066EC 92% */
	padding: 9px 22px;
	background: rgba(0, 102, 236, 0.92);
	border-radius: var(--radius-pill);
	box-shadow: 0 5px 12px rgba(102, 102, 102, 0.33);
	color: #FFF;
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	line-height: 1.3;
	white-space: nowrap;
}

.c-shots .c-screen--phone { --dev-h: var(--phone-h); }
.c-shots .c-screen--tablet { width: var(--tablet-w); }
.c-shots .c-screen--tablet .c-screen__device { width: 100%; }

.c-shots__img {                                      /* iPhone mock-ups (brand-app): own frame, transparent edges */
	display: block;
	width: auto;
	height: var(--phone-h);
	filter: drop-shadow(0 10px 18px rgba(19, 61, 115, 0.16));
}

.c-shots .c-screen--iphone,
.c-shots .c-screen--laptop {
	position: relative;                              /* LIVE badge */
}

.c-shots .c-screen--laptop {                         /* MacBook (Figma image 85): fills the right page like in Figma, ▶ keeps its room */
	width: 100%;
	max-width: 600px;
}

.c-shots .c-screen--laptop .c-shots__img {
	width: 100%;
	height: auto;
}

.c-shots .c-screen--iphone .c-screen__live {         /* iPhone 17 frame: below the Dynamic Island, right side */
	top: 8.5%;
	right: 11%;
}

.c-shots__img[src*="theme-tin-nhan"] {               /* small source with its frame on white: round off the corners */
	border-radius: 13% / 6.3%;
}

.c-shots__next {                                     /* Figma ▶ 52.5 × 70, ≈ 40px right of the device */
	position: absolute;
	top: 50%;
	left: min(calc(50% + var(--dev-half, 130px) + 14px), calc(100% - 44px));   /* --dev-half: main.js */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
	color: var(--c-primary);
	cursor: pointer;
	transform: translateY(-50%);
	transition: transform var(--transition-fast), background var(--transition-fast);
}

.c-shots__next .c-icon {
	display: inline-flex;
	width: 20px;
}

.c-shots__next .c-icon svg {
	width: 100%;
	height: auto;
}

.c-shots__next:hover {
	background: rgba(var(--c-primary-rgb), 0.08);   /* no nudge: ▶ never moves (decision 18/11) */
}

.c-shots__next:focus-visible,
.c-shots__dot:focus-visible {
	outline: 3px solid rgba(var(--c-primary-rgb), 0.45);
	outline-offset: 2px;
}

.c-shots__dots {
	display: flex;
	gap: 2px;
	justify-content: center;
	margin-top: var(--space-3);
}

.c-shots__dot {                                      /* 24px hit area, Figma dot 36 → 14px, active pill 96 → 37px */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 24px;
	padding: 0 3px;
	background: none;
	border: 0;
	cursor: pointer;
}

.c-shots__dot::before {
	content: "";
	width: 14px;
	height: 14px;
	background: #D9D9D9;
	border-radius: var(--radius-pill);
	transition: width 0.35s var(--ease-out), background 0.25s ease;
}

.c-shots__dot[aria-current="true"]::before {
	width: 37px;
	background: var(--c-primary);
}

.c-book__panel.is-entering .c-book__num,
.c-book__panel.is-entering .c-book__title,
.c-book__panel.is-entering .c-book__list li,
.c-book__panel.is-entering .c-book__more,
.c-book__panel.is-entering .c-book__page--media > * {
	animation: sk-rise-in 0.6s var(--ease-out) both;
}

.c-book__panel.is-entering .c-book__title { animation-delay: 0.05s; }
.c-book__panel.is-entering .c-book__list li:nth-child(1) { animation-delay: 0.1s; }
.c-book__panel.is-entering .c-book__list li:nth-child(2) { animation-delay: 0.15s; }
.c-book__panel.is-entering .c-book__list li:nth-child(3) { animation-delay: 0.2s; }
.c-book__panel.is-entering .c-book__list li:nth-child(4) { animation-delay: 0.25s; }
.c-book__panel.is-entering .c-book__more { animation-delay: 0.3s; }
.c-book__panel.is-entering .c-book__page--media > * { animation-delay: 0.14s; }

/* Small screens: the chips scroll sideways, the chosen one is fully coloured */
@media (max-width: 1023px) {
	.c-book__tabs {
		gap: 6px;
		margin-inline: calc(var(--container-padding) * -1);
		padding: 6px var(--container-padding) 8px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.c-book__tabs::-webkit-scrollbar { display: none; }

	.c-book__tab {
		padding: 8px 14px;
	}

	.c-book__tab:not([aria-selected="true"]) {
		background: #FFF;
		border-color: var(--tab-bg);
		box-shadow: none;
	}
}

/* Desktop: the notebook — tabs on its left edge, two pages */
@media (min-width: 1024px) {
	.c-book {
		padding-left: var(--tab-out);
	}

	.c-book__tabs {
		position: absolute;
		top: 12.5%;                                  /* Figma tab 1 at y 300 of 2398 */
		left: 0;
		z-index: 2;
		flex-direction: column;
		gap: clamp(8px, 0.62vw, 12px);
		width: calc(var(--tab-out) + var(--frame));  /* ends at the paper edge … */
		clip-path: inset(-40px 0 -40px -40px);       /* … and only that side is cut (shadows stay) */
	}

	.c-book__tab {
		display: flex;
		align-items: center;
		width: calc(100% + var(--tab-shift));
		min-height: clamp(56px, 3.96vw, 76px);       /* Figma 200 */
		padding: 0 0 0 clamp(14px, 1.25vw, 24px);
		border-radius: 18px 0 0 18px;
		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
		transform: translateX(var(--tab-shift));
	}

	.c-book__tab:hover {
		filter: brightness(1.03) saturate(1.08);
		transform: translateX(calc(var(--tab-shift) * 0.5));
	}

	.c-book__tab[aria-selected="true"] {
		z-index: 1;
		box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.24);
		transform: none;
	}

	.c-book__frame {
		margin-top: 0;
		container-type: inline-size;
	}

	.c-book__inner {
		display: grid;                               /* the panel row fills the notebook, or grows it */
		min-height: calc((100cqi - 2 * var(--stamp-frame)) / 1.7564);   /* Figma notebook 3952 × 2250 */
	}

	.c-book__paper {                                 /* paper texture only — scales to any height */
		position: absolute;
		inset: 0;
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		pointer-events: none;
	}

	.c-book__panel {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);   /* split exactly on the spine (50%) */
		gap: 0;
		padding: 0;
	}

	.c-book__page {
		padding: clamp(36px, 1rem + 3.4vw, 96px) clamp(32px, 0.8rem + 3vw, 84px);   /* Figma pill at 11.7% / 4.4% */
	}

	.c-book__page--text {
		padding-right: clamp(28px, 0.6rem + 2.6vw, 72px);
	}

	/* Devices follow the notebook size (cqi = frame width): phone ≈ 68% of the notebook height
	   (Figma 1851 / 2250 incl. label + dots), tablet ≈ 74% of the right page width (room for ▶). */
	.c-book .c-shots {
		--nb-w: calc(100cqi - 2 * var(--frame));
		--phone-h: calc(var(--nb-w) / 1.7564 * 0.68);
		--tablet-w: calc(var(--nb-w) / 2 * 0.74);
	}

	.c-book__page--media {
		padding-inline: clamp(12px, 1.4vw, 32px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.c-book__tab,
	.c-book__panel,
	.c-shots__slide,
	.c-shots__dot::before {
		transition: none;
	}

	.c-shots__slide.is-in .c-screen {
		animation: none;
	}

	.c-book__panel.is-entering .c-book__num,
	.c-book__panel.is-entering .c-book__title,
	.c-book__panel.is-entering .c-book__list li,
	.c-book__panel.is-entering .c-book__more,
	.c-book__panel.is-entering .c-book__page--media > * {
		animation: none;
	}
}

/* --- "Bạn là ai?" — rotating row of 3 role stamps (template-parts/sections-top/roles.php) ---------------
   Figma (÷ 2.625): centre card 1392 × 1741 → ≈ 530px wide at 1920, side cards 1345 × 1076 tilted ±5.5°,
   pink smile icons 85px between them (rotated ∓19°, the raised side towards the centre card).
   The row fits the 1560px content box (the Figma row is 1868px wide and would run under the outline).
   ≥ 1280px: 3 cards. Below: only the centre card, the icons beside it (26/11). Behaviour: main.js [data-roles]. */
.c-roles {
	margin-top: clamp(24px, 1rem + 2vw, 56px);
}

.c-roles__stage {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-4) var(--space-5);
	align-items: center;
	touch-action: pan-y;
}

.c-role {
	position: relative;
	grid-column: 1 / -1;
	grid-row: 1;
	justify-self: center;
	width: min(100%, 520px);
	transition: transform 0.35s var(--ease-out), filter 0.25s ease;
}

.c-role:not([data-slot="center"]) {
	display: none;
}

.c-role__stamp {
	--stamp-radius: var(--radius-md);
	height: 100%;
}

.c-role__inner {
	display: flex;
	flex-direction: column;
	padding: clamp(14px, 0.6rem + 1vw, 28px) clamp(14px, 0.6rem + 1vw, 28px) clamp(16px, 0.7rem + 1vw, 28px);
}

.c-role__photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1114 / 692;
	object-fit: cover;
	border-radius: clamp(14px, 1.1vw, 21px);
}

.c-role__title {                                    /* Figma Mona Sans Bold caps (Alternates caps read oddly) */
	margin-top: clamp(16px, 0.6rem + 0.8vw, 28px);
	color: var(--c-primary);
	font-family: var(--font-sans);
	font-size: var(--fs-card-title);
	font-weight: var(--fw-bold);
	line-height: 1.25;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.c-role__detail {
	display: flex;
	flex-direction: column;
}

.c-role__points {
	display: grid;
	gap: var(--space-3);
	margin: var(--space-4) 0 0;
}

.c-role__point dt {
	color: var(--c-primary-dark);
	font-family: var(--font-display);
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	line-height: 1.35;
}

.c-role__point dd {
	margin: 2px 0 0;
	color: var(--c-text);
	font-family: var(--font-text);
	font-size: var(--fs-sm);
	font-weight: var(--fw-medium);
	line-height: 1.55;
}

.c-role__link {                                      /* Figma white pill, bottom-right (as .c-postcard__more) */
	display: inline-flex;
	gap: var(--space-2);
	align-items: center;
	align-self: flex-end;
	min-height: 40px;
	margin-top: var(--space-4);
	padding: var(--space-2) var(--space-5);
	background: rgba(255, 255, 255, 0.92);
	border-radius: var(--radius-pill);
	box-shadow: 0 3px 9px -1px rgba(102, 102, 102, 0.33);
	color: var(--c-primary);
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	text-decoration: none;
	transition: background var(--transition-fast);
}

.c-role__link .c-icon {
	display: inline-flex;
	width: 10px;
	transition: transform var(--transition-fast);
}

.c-role__link .c-icon svg {
	width: 100%;
	height: auto;
}

.c-role__link[href]:hover {
	background: var(--c-surface);
}

.c-role__link[href]:hover .c-icon {
	transform: translateX(3px);
}

.c-role__pick {                                      /* side cards: the whole card is a button */
	position: absolute;
	inset: 0;
	display: none;
	width: 100%;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.c-role__pick:focus-visible {
	outline: 3px solid rgba(var(--c-primary-rgb), 0.5);
	outline-offset: 4px;
	border-radius: var(--radius-md);
}

.c-roles__nav {
	grid-row: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: clamp(56px, 4.4vw, 84px);
	height: clamp(56px, 4.4vw, 84px);
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background var(--transition-fast);
}

.c-roles__nav svg {
	width: 78%;
	height: auto;
	transition: transform 0.3s var(--ease-out);
}

.c-roles__nav--prev {
	grid-column: 1;
	justify-self: end;
}

.c-roles__nav--next {
	grid-column: 2;
	justify-self: start;
}

.c-roles__nav--prev svg { transform: rotate(-19deg); }
.c-roles__nav--next svg { transform: rotate(19deg); }
.c-roles__nav--prev:hover svg { transform: rotate(-19deg) translateX(-3px); }
.c-roles__nav--next:hover svg { transform: rotate(19deg) translateX(3px); }

.c-roles__nav:hover {
	background: rgba(248, 186, 210, 0.18);
}

.c-roles__nav:focus-visible {
	outline: 3px solid rgba(var(--c-primary-rgb), 0.45);
	outline-offset: 2px;
}

/* Phones / tablets (Figma HOME - PHONE "Group 741", user 26/11/2026): one card, ≈ ¾ of the screen, the two
   smile buttons in white circles on its left and right, level with its middle (they use the page gutter).
   Bigger stamp perforation; type kept readable (Figma phone text ≈ 9px → 13–16px). Pink band unchanged. */
@media (max-width: 1279px) {
	.c-roles__stage {
		grid-template-columns: auto minmax(0, 520px) auto;
		gap: 0 clamp(6px, 2vw, 16px);
		justify-content: center;
		margin-inline: calc(4px - var(--container-gutter));
	}

	.c-role {
		grid-column: 2;
		width: 100%;
	}

	.c-role__stamp {
		--stamp-frame: 14px;
		--stamp-r: 6px;
	}

	.c-role__inner {
		padding: 12px 12px 14px;
	}

	.c-role__photo {
		border-radius: 14px;
	}

	.c-role__title {
		margin-top: 14px;
		font-size: clamp(0.875rem, 4.1vw, 1rem);     /* "DÀNH CHO CHỦ TRƯỜNG" on one line from 360px */
	}

	.c-role__points {
		gap: 10px;
		margin-top: 12px;
	}

	.c-role__point dt {
		font-size: 0.875rem;
	}

	.c-role__point dd {
		font-size: 0.8125rem;
		line-height: 1.5;
	}

	.c-role__link {
		min-height: 36px;
		margin-top: 14px;
		padding: 6px 14px;
		font-size: 0.8125rem;
	}

	.c-roles__nav {
		position: relative;
		grid-row: 1;
		align-self: center;
		width: 36px;
		height: 36px;
		background: var(--c-surface);
		box-shadow: 0 2px 8px rgba(19, 61, 115, 0.16);
	}

	.c-roles__nav::after {                           /* 48px touch target, drawn size unchanged */
		content: "";
		position: absolute;
		inset: -6px;
	}

	.c-roles__nav svg {
		width: 70%;
	}

	.c-roles__nav:hover {
		background: var(--c-surface);
	}

	.c-roles__nav--prev {
		grid-column: 1;
		justify-self: center;
	}

	.c-roles__nav--next {
		grid-column: 3;
		justify-self: center;
	}
}

/* Desktop: 3 cards — side · icon · centre · icon · side */
@media (min-width: 1280px) {
	.c-roles__stage {
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr) auto minmax(0, 1fr);
		gap: 0 clamp(4px, 0.6vw, 12px);
	}

	.c-role {
		width: auto;
		justify-self: stretch;
	}

	.c-role:not([data-slot="center"]) {
		display: block;
		align-self: center;
	}

	.c-role[data-slot="left"] {
		grid-column: 1;
		transform: translateY(30px) rotate(-5.5deg);
	}

	.c-role[data-slot="center"] {
		grid-column: 3;
	}

	.c-role[data-slot="right"] {
		grid-column: 5;
		transform: translateY(30px) rotate(5deg);
	}

	/* Side card = photo + label only (landscape, Figma 1182 × 868 photo) */
	.c-role:not([data-slot="center"]) .c-role__photo {
		aspect-ratio: 1182 / 868;
		border-radius: clamp(10px, 0.7vw, 13px);
	}

	.c-role:not([data-slot="center"]) .c-role__detail {
		display: none;
	}

	.c-role:not([data-slot="center"]) .c-role__title {   /* one line on the narrower side cards */
		font-size: clamp(14px, 0.4rem + 0.66vw, 19px);
		white-space: nowrap;
	}

	.c-role:not([data-slot="center"]) .c-role__pick {
		display: block;
	}

	.c-role[data-slot="left"]:hover {
		transform: translateY(22px) rotate(-3.5deg);
		filter: brightness(1.03);
	}

	.c-role[data-slot="right"]:hover {
		transform: translateY(22px) rotate(3deg);
		filter: brightness(1.03);
	}

	.c-roles__nav {
		grid-row: 1;
		align-self: center;
	}

	.c-roles__nav--prev {
		grid-column: 2;
		justify-self: center;
	}

	.c-roles__nav--next {
		grid-column: 4;
		justify-self: center;
	}
}

/* Card morph (View Transitions, main.js): the page itself does not fade */
html.is-roles-vt::view-transition-old(root),
html.is-roles-vt::view-transition-new(root) {
	animation: none;
}

::view-transition-group(role-chu-truong),
::view-transition-group(role-giao-vien),
::view-transition-group(role-phu-huynh) {
	animation-duration: 0.6s;
	animation-timing-function: var(--ease-out);
}

.c-role.is-entering .c-role__inner > * {             /* fallback (no View Transitions) + mobile */
	animation: sk-rise-in 0.5s var(--ease-out) both;
}

.c-role.is-entering .c-role__title { animation-delay: 0.05s; }
.c-role.is-entering .c-role__detail { animation-delay: 0.1s; }

@media (prefers-reduced-motion: reduce) {
	.c-role,
	.c-roles__nav svg {
		transition: none;
	}

	.c-role.is-entering .c-role__inner > * {
		animation: none;
	}
}


/* --- Scroll reveal (main.js "Scroll reveal") ------------------------------------------------
   [data-reveal] blocks fade + rise once when they reach the screen; items entering together are
   staggered by main.js (--reveal-delay). Only opacity / transform → no layout shift, GPU-cheap.
   Safe by default: hidden only when JS runs (html.js); if main.js never arrives the failsafe shows
   everything after 2.5s; main.js shows everything at once when it starts late, with reduced motion
   or without IntersectionObserver (html.is-reveal-off). Never used on the hero (LCP). */
.js [data-reveal]:not(.is-in) {
	opacity: 0;
	transform: translateY(var(--reveal-shift));
	animation: sk-reveal-failsafe 0s 2.5s forwards;
}

.js.is-reveal-ready [data-reveal]:not(.is-in) {
	animation: none;
}

.js [data-reveal].is-in {
	transition:
		opacity var(--dur-reveal) var(--ease-out) var(--reveal-delay, 0s),
		transform var(--dur-reveal) var(--ease-out) var(--reveal-delay, 0s);
}

/* A block inside a revealed block moves with its parent. */
.js [data-reveal] [data-reveal]:not(.is-in),
.js.is-reveal-off [data-reveal]:not(.is-in) {
	opacity: 1;
	transform: none;
	animation: none;
}

@keyframes sk-reveal-failsafe {
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.js [data-reveal]:not(.is-in) {
		opacity: 1;
		transform: none;
		animation: none;
	}
}

@media print {
	.js [data-reveal]:not(.is-in) {
		opacity: 1;
		transform: none;
		animation: none;
	}
}

/* --- Roadmap: 6 puzzle steps + "leading" dotted line (Figma image 77, docs/07 §6f) -----------
   Sizes are in column units: --u = 1% of the step's width (container query), capped at 2.6px
   (= a 260px column, the 1920 layout). Piece px from the Figma picture × 0.16 → u, so every photo
   keeps its Figma size and height. ≥1280: 6 columns, even steps lower, SVG line in the same units.
   768–1279: 3 × 2, middle step lower, no line. <768: one column, photo left, dotted line down. */
.c-roadmap {
	position: relative;
	margin-top: clamp(32px, 1rem + 2.6vw, 80px);
}

.c-roadmap .c-roadmap__steps {        /* beats reset.css ol[class] */
	position: relative;
	z-index: 1;
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
}

.c-roadmap__step {
	position: relative;
	container-type: inline-size;
	text-align: center;
}

.c-roadmap__step > * {
	--u: min(1cqi, 2.6px);
}

.c-roadmap__piece {
	position: relative;
	height: calc(89.6 * var(--u));
}

.c-roadmap__img {
	position: absolute;
	top: calc(var(--py) * 0.16 * var(--u));
	left: 50%;
	width: calc(var(--pw) * 0.16 * var(--u));
	max-width: none;
	height: auto;
	translate: -50% 0;
}

.c-roadmap__body {
	padding-inline: 4%;
}

.c-roadmap__title {
	margin: 0 -6%;                       /* a little wider than the column, like Figma (neighbours sit higher / lower) */
	text-wrap: balance;
	color: var(--c-text-strong);
	font-family: var(--font-display);
	font-size: var(--fs-tab);
	font-weight: var(--fw-bold);
	line-height: var(--lh-heading);
}

.c-roadmap__text {
	margin: var(--space-2) auto 0;
	max-width: 30ch;
	color: var(--c-text);
	font-family: var(--font-text);
	font-size: var(--fs-sm);
	line-height: 1.6;
}

/* Dotted line — only in the 6-column layout. viewBox: 1 column = 100 units, x −60…660. */
.c-roadmap__line {
	display: none;
}

.c-roadmap__line path {
	fill: none;
	stroke: var(--c-pastel-pink);
	stroke-width: 1.76;                  /* Figma dot 11px */
	stroke-linecap: round;
	stroke-dasharray: 0 5.41;            /* Figma dot spacing 34px */
}

@media (min-width: 768px) {
	.c-roadmap .c-roadmap__steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: clamp(32px, 1rem + 2vw, 56px);
	}

	.c-roadmap__step:nth-child(3n + 2) > .c-roadmap__piece {
		margin-top: calc(60.8 * var(--u));     /* Figma: lower row 380px below */
	}
}

@media (min-width: 1280px) {
	.c-roadmap .c-roadmap__steps {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.c-roadmap__step:nth-child(3n + 2) > .c-roadmap__piece {
		margin-top: 0;
	}

	.c-roadmap__step:nth-child(even) > .c-roadmap__piece {
		margin-top: calc(60.8 * var(--u));
	}

	.c-roadmap__line {
		position: absolute;
		top: 0;
		left: -10%;
		z-index: 0;
		display: block;
		width: 120%;
		max-width: none;
		height: auto;
		aspect-ratio: 720 / 150;
		overflow: visible;
		pointer-events: none;
		/* layer 1: soft ends · layer 2: the travelling edge (animated by mask-position) */
		-webkit-mask-image: linear-gradient(90deg, transparent 6%, #000 10.5%, #000 89.5%, transparent 94%), linear-gradient(90deg, #000 45%, transparent 55%);
		mask-image: linear-gradient(90deg, transparent 6%, #000 10.5%, #000 89.5%, transparent 94%), linear-gradient(90deg, #000 45%, transparent 55%);
		-webkit-mask-size: 100% 100%, 220% 100%;
		mask-size: 100% 100%, 220% 100%;
		-webkit-mask-repeat: no-repeat;
		mask-repeat: no-repeat;
		-webkit-mask-position: 0 0, 0 0;
		mask-position: 0 0, 0 0;
		-webkit-mask-composite: source-in;
		mask-composite: intersect;
	}
}

/* Phones: photo left, text right, dotted line between the photos. */
@media (max-width: 767px) {
	.c-roadmap .c-roadmap__steps {
		row-gap: var(--space-6);
	}

	.c-roadmap__step {
		display: grid;
		grid-template-columns: 112px minmax(0, 1fr);
		gap: var(--space-4);
		align-items: start;
		text-align: start;
	}

	.c-roadmap__step > * {
		--u: 1.4px;
	}

	.c-roadmap__piece {
		height: 112px;
	}

	.c-roadmap__img {
		top: 50%;
		translate: -50% -50%;
	}

	.c-roadmap__body {
		padding: var(--space-2) 0 0;
	}

	.c-roadmap__title {
		margin-inline: 0;
	}

	.c-roadmap__text {
		margin-inline: 0;
		max-width: none;
	}

	.c-roadmap__step:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 124px;
		bottom: calc(var(--space-6) * -1 + 8px);
		left: 56px;
		width: 6px;
		translate: -50% 0;
		background: radial-gradient(circle, var(--c-pastel-pink) 2.4px, transparent 2.9px) center top / 6px 13px repeat-y;
	}
}

/* --- Roadmap motion: the line leads, each step appears as it is reached (main.js [data-roadmap]).
   Hidden only with JS; failsafe after 2.5s like [data-reveal]; html.is-reveal-off = show at once. */
@keyframes sk-roadmap-draw {
	from { -webkit-mask-position: 0 0, 100% 0; mask-position: 0 0, 100% 0; }
	to { -webkit-mask-position: 0 0, 0 0; mask-position: 0 0, 0 0; }
}

@keyframes sk-roadmap-down {
	from { clip-path: inset(0 0 100% 0); }
	to { clip-path: inset(0); }
}

@media (min-width: 768px) {
	.js .c-roadmap:not(.is-drawn) .c-roadmap__piece,
	.js .c-roadmap:not(.is-drawn) .c-roadmap__body {
		opacity: 0;
		transform: translateY(var(--reveal-shift));
		animation: sk-reveal-failsafe 0s 2.5s forwards;
	}

	.js .c-roadmap:not(.is-drawn) .c-roadmap__line {
		animation: sk-roadmap-draw 0s 2.5s both;
	}

	.js.is-reveal-ready .c-roadmap:not(.is-drawn) .c-roadmap__piece,
	.js.is-reveal-ready .c-roadmap:not(.is-drawn) .c-roadmap__body {
		animation: none;
	}

	.js.is-reveal-ready .c-roadmap:not(.is-drawn) .c-roadmap__line {
		-webkit-mask-position: 0 0, 100% 0;
		mask-position: 0 0, 100% 0;
		animation: none;
	}

	.js .c-roadmap.is-drawn .c-roadmap__piece,
	.js .c-roadmap.is-drawn .c-roadmap__body {
		transition:
			opacity var(--dur-reveal) var(--ease-out) var(--d, 0ms),
			transform var(--dur-reveal) var(--ease-out) var(--d, 0ms);
	}

	.js .c-roadmap.is-drawn .c-roadmap__body {
		transition-delay: calc(var(--d, 0ms) + 100ms);
	}

	.js .c-roadmap.is-drawn .c-roadmap__line {
		animation: sk-roadmap-draw 1.5s cubic-bezier(0.4, 0.15, 0.6, 0.85) both;
	}

	/* 3 × 2: simple stagger */
	.c-roadmap__step:nth-child(2) { --d: 90ms; }
	.c-roadmap__step:nth-child(3) { --d: 180ms; }
	.c-roadmap__step:nth-child(4) { --d: 270ms; }
	.c-roadmap__step:nth-child(5) { --d: 360ms; }
	.c-roadmap__step:nth-child(6) { --d: 450ms; }
}

@media (min-width: 1280px) {
	/* the moment the line's edge reaches each photo (1.5s, same curve) */
	.c-roadmap__step:nth-child(1) { --d: 370ms; }
	.c-roadmap__step:nth-child(2) { --d: 520ms; }
	.c-roadmap__step:nth-child(3) { --d: 650ms; }
	.c-roadmap__step:nth-child(4) { --d: 775ms; }
	.c-roadmap__step:nth-child(5) { --d: 900ms; }
	.c-roadmap__step:nth-child(6) { --d: 1035ms; }
}

@media (max-width: 767px) {
	.js .c-roadmap__step:not(.is-in) > .c-roadmap__piece,
	.js .c-roadmap__step:not(.is-in) > .c-roadmap__body {
		opacity: 0;
		transform: translateY(var(--reveal-shift));
		animation: sk-reveal-failsafe 0s 2.5s forwards;
	}

	.js .c-roadmap__step:not(.is-in)::after {
		animation: sk-roadmap-down 0s 2.5s both;
	}

	.js.is-reveal-ready .c-roadmap__step:not(.is-in) > .c-roadmap__piece,
	.js.is-reveal-ready .c-roadmap__step:not(.is-in) > .c-roadmap__body {
		animation: none;
	}

	.js.is-reveal-ready .c-roadmap__step:not(.is-in)::after {
		clip-path: inset(0 0 100% 0);
		animation: none;
	}

	.js .c-roadmap__step.is-in > .c-roadmap__piece,
	.js .c-roadmap__step.is-in > .c-roadmap__body {
		transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
	}

	.js .c-roadmap__step.is-in > .c-roadmap__body {
		transition-delay: 100ms;
	}

	.js .c-roadmap__step.is-in::after {
		animation: sk-roadmap-down 0.8s var(--ease-out) 0.3s both;
	}
}

/* Shown at once: reduced motion, late / missing JS support (main.js), print. */
.js.is-reveal-off .c-roadmap .c-roadmap__piece,
.js.is-reveal-off .c-roadmap .c-roadmap__body {
	opacity: 1 !important;
	transform: none !important;
	animation: none !important;
	transition: none !important;
}

.js.is-reveal-off .c-roadmap .c-roadmap__line,
.js.is-reveal-off .c-roadmap .c-roadmap__step::after {
	-webkit-mask-position: 0 0, 0 0 !important;
	mask-position: 0 0, 0 0 !important;
	clip-path: none !important;
	animation: none !important;
}

@media (prefers-reduced-motion: reduce), print {
	.js .c-roadmap .c-roadmap__piece,
	.js .c-roadmap .c-roadmap__body {
		opacity: 1 !important;
		transform: none !important;
		animation: none !important;
		transition: none !important;
	}

	.js .c-roadmap .c-roadmap__line,
	.js .c-roadmap .c-roadmap__step::after {
		-webkit-mask-position: 0 0, 0 0 !important;
		mask-position: 0 0, 0 0 !important;
		clip-path: none !important;
		animation: none !important;
	}
}

/* --- Contact dock (template-parts/common/contact-dock.php, docs/07 §6h) ------------------------
   Figma 18/11: Messenger (#0066EC), Zalo (white, pale-blue rim #A5CBFF), phone (#F8BAD2) stuck to the
   right edge, left corners rounded. 52px (Figma 110px — too big for web), 46px on phones.
   Hover (mouse): the button slides out with its label. */
.c-dock {
	position: fixed;
	right: 0;
	bottom: max(24px, env(safe-area-inset-bottom));
	z-index: var(--z-dock);
}

.c-dock .c-dock__list {          /* beats reset.css ul[class] */
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Hover = the button slides out 8px (stays stuck to the edge), no label (user 18/11). The name is for
   screen readers only (.u-visually-hidden in the template). */
.c-dock__btn {
	--size: 46px;
	--rim: 0 0 #0000;                    /* Zalo: pale-blue rim drawn as inset shadows (no layout shift) */
	display: flex;
	align-items: center;
	width: var(--size);
	height: var(--size);
	overflow: hidden;
	border-radius: 12px 0 0 12px;
	box-shadow: var(--rim), 0 4px 14px rgba(19, 61, 115, 0.18);
	text-decoration: none;
	transition: width 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.c-dock__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: var(--size);
	height: var(--size);
}

.c-dock__icon svg {
	width: 52%;
	height: auto;
}

.c-dock__btn--messenger {
	background: var(--c-primary);
}

.c-dock__btn--zalo {
	--rim: inset 3px 3px 0 #A5CBFF, inset 0 -3px 0 #A5CBFF;   /* Figma Rectangle 148: left, top, bottom */
	background: var(--c-surface);
}

.c-dock__btn--zalo .c-dock__icon svg {
	width: 72%;
}

.c-dock__btn--phone {
	background: var(--c-pastel-pink);
}

.c-dock__btn--phone .c-dock__icon svg {
	width: 46%;
}

.c-dock__btn:focus-visible {
	width: calc(var(--size) + 8px);
	outline: 2px solid var(--c-primary-dark);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.c-dock__btn:hover {
		width: calc(var(--size) + 8px);
		box-shadow: var(--rim), 0 6px 18px rgba(19, 61, 115, 0.24);
	}
}

@media (min-width: 1024px) {
	.c-dock__btn {
		--size: 52px;
	}
}

/* Phones, home page: ride above the bottom tab bar (layout.css "Home outline"), drop back when it hides. */
@media (max-width: 767px) {
	body:has(.c-outline) .c-dock {
		bottom: calc(var(--obar-h) + 8px + 16px + env(safe-area-inset-bottom));
		transition: bottom 0.35s var(--ease-out);
	}

	html.is-obar-hidden body:has(.c-outline) .c-dock {
		bottom: max(24px, env(safe-area-inset-bottom));
	}
}

@media (prefers-reduced-motion: reduce) {
	.c-dock__btn {
		transition: none;
	}
}

@media print {
	.c-dock {
		display: none;
	}
}