/*
 * AE-TECH Theme — Design Tokens & Base Layout
 *
 * RULES (do not violate — see Step 21/24 spec):
 * - Exactly 6 approved colors. Do not add gray/yellow/green/orange or new shades.
 * - Heading font: Quicksand (weight 700 preferred). Body/form/button/nav: Open Sans.
 * - No @import for fonts (loaded via wp_enqueue_style in inc/enqueue.php).
 * - If a light border/background is needed, reuse --color-soft-blue, do not invent --color-border.
 */

:root {
	/* Approved palette — exactly 6 colors, nothing else */
	--color-blue: #06348C;      /* brand foundation: hero, footer, section band, heading emphasis */
	--color-red: #DB0000;       /* action/contrast: CTA, selected state, risk accent */
	--color-white: #FFFFFF;
	--color-dark: #111827;
	--color-soft-blue: #EEF4FF;
	--color-soft-red: #FFF1F1;

	/* Typography */
	--font-heading: "Quicksand", sans-serif;
	--font-body: "Open Sans", sans-serif;

	/* Spacing scale */
	--space-4: 4px;
	--space-8: 8px;
	--space-12: 12px;
	--space-16: 16px;
	--space-24: 24px;
	--space-32: 32px;
	--space-40: 40px;
	--space-48: 48px;
	--space-64: 64px;
	--space-80: 80px;
	--space-96: 96px;

	/* Layout */
	--container: 1200px;
	--container-narrow: 840px;

	/* Radius */
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 14px;

	/* Task 23A — two shadow tokens + one neutral border token synced from
	 * the approved static prototype. These did not exist before (the theme
	 * previously wrote the equivalent values inline, e.g.
	 * `box-shadow: 0 8px 28px rgba(6, 52, 140, 0.14)` on the mobile-nav
	 * panel). Adding them as named tokens is additive only — no existing
	 * rule below was rewritten to consume them except the new Task 23A
	 * `.problem-card`/`.solution-card`/`.product-group-card`/`.product-card`
	 * foundation further down this file. */
	--shadow-card: 0 2px 16px rgba(17, 24, 39, 0.08);
	--shadow-card-hover: 0 8px 28px rgba(6, 52, 140, 0.14);
	--border-soft: 1px solid rgba(17, 24, 39, 0.08);
}

/* -----------------------------------------------------------------------
 * Reset (minimal — full reset/normalize can be extended in Phase 4)
 * --------------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-weight: 400;
	color: var(--color-dark);
	background-color: var(--color-white);
	line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: 700;
	color: var(--color-dark);
	line-height: 1.25;
	margin: 0 0 var(--space-16);
}

p {
	margin: 0 0 var(--space-16);
}

/* -----------------------------------------------------------------------
 * Typography scale — per Step 21 §9 (Quicksand headings, Open Sans body)
 * --------------------------------------------------------------------- */

h1 {
	font-size: 32px;
}

h2 {
	font-size: 26px;
}

h3 {
	font-size: 22px;
}

h4 {
	font-size: 18px;
	font-weight: 600;
}

.text-body-large {
	font-family: var(--font-body);
	font-size: 17px;
}

.text-small {
	font-family: var(--font-body);
	font-size: 14px;
}

.text-label {
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

@media (min-width: 768px) {
	h1 {
		font-size: 44px;
	}

	h2 {
		font-size: 32px;
	}

	h3 {
		font-size: 24px;
	}

	h4 {
		font-size: 20px;
	}

	.text-body-large {
		font-size: 18px;
	}
}

@media (min-width: 1280px) {
	h1 {
		font-size: 56px;
	}

	h2 {
		font-size: 40px;
	}

	h3 {
		font-size: 28px;
	}

	h4 {
		font-size: 22px;
	}

	.text-body-large {
		font-size: 20px;
	}
}

a {
	color: var(--color-blue);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--color-red);
	outline-offset: 3px;
}

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

button,
input,
select,
textarea {
	font-family: var(--font-body);
}

/* -----------------------------------------------------------------------
 * Layout primitives
 * --------------------------------------------------------------------- */

.container {
	width: 100%;
	max-width: var(--container);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--space-24);
	padding-right: var(--space-24);
}

.container--narrow {
	max-width: var(--container-narrow);
}

/* Section band rhythm: alternate white / soft-blue / blue per spec §7
 * (do not let long pages stay all-white). Applied via body/section classes
 * once section templates exist (Phase 4/5). */

.section-band--white {
	background-color: var(--color-white);
}

.section-band--soft-blue {
	background-color: var(--color-soft-blue);
}

.section-band--blue {
	background-color: var(--color-blue);
	color: var(--color-white);
}

.section-band--blue h1,
.section-band--blue h2,
.section-band--blue h3 {
	color: var(--color-white);
}

.section-band--soft-red {
	background-color: var(--color-soft-red);
}

/* -----------------------------------------------------------------------
 * Generic section spacing (Task 05A-Fix)
 *
 * `.section-band--*` only ever set background color, never padding —
 * components with their own vertical rhythm (component-hero,
 * component-direct-answer, component-cta-block, etc.) already carry their
 * own padding and combine with a `.section-band--*` class purely for color.
 * Plain content sections written directly in page templates (Problem Entry,
 * Solution Highlights, About/Partner/Contact body sections, 404/search
 * sections, and future Phase 5B archive intros) had NO vertical padding at
 * all, which is the root cause of the uneven/cramped spacing reported in
 * Task 05A-Fix. Add `.section` alongside `.section-band--*` on any raw
 * <section> that isn't already one of the padded components above — never
 * stack `.section` on top of a component that has its own padding.
 * --------------------------------------------------------------------- */

.section {
	padding-top: var(--space-48);
	padding-bottom: var(--space-48);
}

@media (min-width: 1024px) {
	.section {
		padding-top: var(--space-64);
		padding-bottom: var(--space-64);
	}
}

.section--tight {
	padding-top: var(--space-32);
	padding-bottom: var(--space-32);
}

.text-center {
	text-align: center;
}

.stack-gap-top {
	margin-top: var(--space-24);
}

/* -----------------------------------------------------------------------
 * Accessibility helpers
 * --------------------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
	background-color: var(--color-white);
	border-radius: var(--radius-sm);
	box-shadow: none;
	clip: auto !important;
	clip-path: none;
	color: var(--color-blue);
	display: block;
	font-size: 14px;
	font-weight: 700;
	height: auto;
	left: var(--space-8);
	line-height: normal;
	padding: var(--space-12) var(--space-16);
	position: fixed;
	text-decoration: none;
	top: var(--space-8);
	width: auto;
	z-index: 100000;
}

/* -----------------------------------------------------------------------
 * Header — per Step 21 §24 (white bg, soft-blue border, blue hover, red CTA)
 * --------------------------------------------------------------------- */

.site-header {
	background-color: var(--color-white);
	border-bottom: 1px solid var(--color-soft-blue);
	position: relative;
	z-index: 100;
}

.site-header--sticky {
	position: sticky;
	top: 0;
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-16);
	padding-top: var(--space-12);
	padding-bottom: var(--space-12);
}

.site-header__logo,
.site-header__toggle,
.site-language-selector,
.site-header__cta {
	flex-shrink: 0;
}

/* Task 23A — logo must never wrap onto a second line, per the approved
 * static prototype header (design-prototypes/aetech-static-html). */
.site-header__logo {
	white-space: nowrap;
}

.site-header__logo img {
	max-height: 52px;
	width: auto;
}

.site-header__site-title {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 22px;
	color: var(--color-blue);
	white-space: nowrap;
}

.site-header__nav {
	flex: 1;
	min-width: 0;
}

.site-header__menu {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: var(--space-20, 20px);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Task 23A — every top-level menu item needs position:relative so an
 * item with children (.menu-item-has-children, added by wp_nav_menu core
 * when a menu item has a child in Appearance > Menus) can absolutely
 * position its .sub-menu underneath it — see the dropdown block below.
 * This does not change plain items with no children in any way. */
.site-header__menu > li {
	position: relative;
	display: flex;
	align-items: center;
}

.site-header__menu a {
	display: inline-block;
	padding: var(--space-8) 0;
	color: var(--color-dark);
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 14.5px;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
}

.site-header__cta .btn {
	white-space: nowrap;
}

.site-header__menu a {
	transition: border-color 0.15s ease, color 0.15s ease;
}

.site-header__menu a:hover,
.site-header__menu a:focus,
.site-header__menu .current-menu-item > a {
	color: var(--color-blue);
	text-decoration: none;
	border-bottom-color: var(--color-blue);
}

/* -----------------------------------------------------------------------
 * Task 23A — dropdown support for menu items with children (e.g. "Tài
 * nguyên" > Tài liệu kỹ thuật / Bài viết chia sẻ / Tin tức), matching the
 * approved static prototype's simplified nav. This is pure CSS on top of
 * wp_nav_menu's own default markup (`.menu-item-has-children` on the <li>,
 * a nested `<ul class="sub-menu">` inside it) — no custom nav walker
 * needed, so the menu stays fully editable from Appearance > Menus with
 * no template changes required when the owner adds/removes a child item.
 * Reveals on hover AND :focus-within (keyboard access), desktop only —
 * mobile gets its own always-expanded override below.
 * --------------------------------------------------------------------- */

.site-header__menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: var(--space-8);
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translate(-50%, 4px);
	min-width: 240px;
	background-color: var(--color-white);
	border: 1px solid var(--color-soft-blue);
	border-radius: var(--radius-md);
	box-shadow: 0 8px 28px rgba(6, 52, 140, 0.14);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 200;
}

.site-header__menu .menu-item-has-children:hover > .sub-menu,
.site-header__menu .menu-item-has-children:focus-within > .sub-menu,
.site-header__menu .menu-item-has-children.is-submenu-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.site-header__menu .sub-menu a {
	display: block;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	border-bottom: none;
	font-size: 14px;
	white-space: nowrap;
}

.site-header__menu .sub-menu a:hover,
.site-header__menu .sub-menu a:focus {
	background-color: var(--color-soft-blue);
	border-bottom: none;
}

.site-header__submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: var(--color-dark);
	background: transparent;
	border: 0;
	cursor: pointer;
}

.site-header__submenu-toggle::before {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s ease;
}

.site-header__submenu-toggle[aria-expanded="true"]::before {
	transform: translateY(2px) rotate(225deg);
}

.site-header__toggle {
	display: none;
	background: transparent;
	border: 0;
	padding: var(--space-8);
	min-width: 44px;
	min-height: 44px;
	cursor: pointer;
}

/* Task 26A — mobile-only CTA rendered inside #site-primary-nav (header.php).
 * Hidden by default (desktop keeps using .site-header__cta, outside the
 * nav) so the two never render at the same time; the media query below
 * flips which one is visible. Placed after .site-header__menu in the DOM,
 * so it naturally appears below the menu links once the panel is open. */
.site-header__mobile-cta {
	display: none;
}

.site-language-selector {
	position: relative;
	font-family: var(--font-body);
}

.site-language-selector__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-8);
	min-width: 58px;
	min-height: 44px;
	padding: 8px 10px;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--color-dark);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.site-language-selector__trigger:hover,
.site-language-selector__trigger[aria-expanded="true"] {
	border-color: var(--color-soft-blue);
	background-color: var(--color-soft-blue);
	color: var(--color-blue);
}

.site-language-selector__trigger:focus-visible,
.site-language-selector__item:focus-visible {
	outline: 2px solid var(--color-blue);
	outline-offset: 2px;
}

.site-language-selector__chevron {
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s ease;
}

.site-language-selector__trigger[aria-expanded="true"] .site-language-selector__chevron {
	transform: translateY(2px) rotate(225deg);
}

.site-language-selector__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 210;
	width: max-content;
	min-width: 218px;
	padding: var(--space-8);
	border: 1px solid var(--color-soft-blue);
	border-radius: var(--radius-md);
	background-color: var(--color-white);
	box-shadow: 0 8px 24px rgba(6, 52, 140, 0.14);
}

.site-language-selector__menu[hidden] {
	display: none;
}

.site-language-selector__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-12);
	min-height: 44px;
	padding: 9px 10px;
	border-radius: var(--radius-sm);
	color: var(--color-dark);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
}

a.site-language-selector__item:hover,
a.site-language-selector__item:focus {
	background-color: var(--color-soft-blue);
	color: var(--color-blue);
	text-decoration: none;
}

.site-language-selector__item.is-active {
	color: var(--color-blue);
	background-color: var(--color-soft-blue);
}

.site-language-selector__item.is-disabled {
	color: var(--color-dark);
	background-color: var(--color-white);
	cursor: not-allowed;
	opacity: 0.72;
}

.site-language-selector__item small {
	color: inherit;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.site-language-selector__check {
	display: inline-flex;
	color: var(--color-blue);
}

.site-language-selector--mobile {
	display: none;
}

.site-header__toggle-bar {
	display: block;
	width: 24px;
	height: 2px;
	margin: 5px 0;
	background-color: var(--color-dark);
}

@media (max-width: 1200px) {
	.site-header__nav {
		display: block;
		flex-basis: 100%;
		order: 3;
	}

	.has-aetech-nav-js .site-header__nav {
		display: none;
	}

	.has-aetech-nav-js .site-header__nav.is-open {
		display: block;
		max-height: calc(100dvh - 80px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.site-header__menu {
		flex-direction: column;
		gap: var(--space-16);
		padding: var(--space-16) 0;
		border-top: 1px solid var(--color-soft-blue);
		margin-top: var(--space-16);
	}

	.has-aetech-nav-js .site-header__toggle {
		display: block;
	}

	.site-language-selector--desktop {
		display: none;
	}

	.site-language-selector--mobile {
		display: block;
		margin-top: var(--space-8);
		padding-top: var(--space-16);
		border-top: 1px solid var(--color-soft-blue);
	}

	.site-language-selector__mobile-heading {
		margin: 0 0 var(--space-8);
		color: var(--color-blue);
		font-size: 13px;
		font-weight: 700;
		text-transform: uppercase;
	}

	.site-language-selector__mobile-options {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--space-8);
	}

	.site-language-selector--mobile .site-language-selector__item {
		min-width: 0;
		padding: 10px 12px;
		border: 1px solid var(--color-soft-blue);
	}

	/* Task 23A — on mobile the dropdown doesn't rely on hover (no hover on
	 * touch); render each .sub-menu statically expanded inside the stacked
	 * menu instead, right under its parent item. */
	.site-header__menu > li {
		position: static;
		width: 100%;
		flex-wrap: wrap;
		justify-content: center;
	}

	.site-header__submenu-toggle {
		width: 44px;
		height: 44px;
	}

	.site-header__menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: none;
		border-radius: 0;
		background-color: var(--color-soft-blue);
		margin: 4px 0 0;
		padding: 4px 0;
		flex-basis: 100%;
		width: 100%;
	}

	.has-aetech-nav-js .site-header__menu .menu-item-has-children > .sub-menu {
		display: none;
	}

	.has-aetech-nav-js .site-header__menu .menu-item-has-children.is-submenu-open > .sub-menu {
		display: block;
		transform: none;
	}

	.site-header__menu .sub-menu a {
		padding: 8px var(--space-16);
	}

	/* Task 26A — one-row mobile header: hide the desktop CTA (it lives
	 * outside #site-primary-nav and was wrapping onto its own row under the
	 * logo/toggle), show the in-panel CTA instead, placed after the menu
	 * links with a divider so it reads as a distinct, prominent action. */
	.site-header__cta {
		display: none;
	}

	.site-header__mobile-cta {
		display: block;
		margin-top: var(--space-16);
		padding-top: var(--space-16);
	}

	.site-header__mobile-cta .btn {
		display: block;
		width: 100%;
		text-align: center;
	}

	body.aetech-nav-open {
		overflow: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header__menu .sub-menu,
	.site-header__submenu-toggle::before,
	.site-language-selector__chevron {
		transition: none !important;
	}
}

@media (max-width: 480px) {
	.site-header__inner {
		gap: var(--space-12);
	}

	.site-header__cta .btn {
		padding: 10px var(--space-16);
		font-size: 14px;
	}

	.site-language-selector__mobile-options {
		grid-template-columns: 1fr;
	}
}

/* -----------------------------------------------------------------------
 * Footer — per Step 21 §25 (blue bg, white text, soft-blue divider)
 * --------------------------------------------------------------------- */

.site-footer {
	background-color: var(--color-blue);
	color: var(--color-white);
	padding-top: var(--space-64);
	padding-bottom: var(--space-32);
}

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

.site-footer a:hover,
.site-footer a:focus {
	color: var(--color-soft-red);
}

.site-footer__inner {
	display: block;
}

.site-footer__top {
	display: grid;
	grid-template-columns: minmax(280px, 1.55fr) repeat(3, minmax(150px, 1fr));
	gap: var(--space-32);
}

.site-footer__logo {
	display: inline-block;
	line-height: 0;
	margin-bottom: var(--space-24);
}

.site-footer__logo-image {
	display: block;
	width: 220px;
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

.site-footer__logo:focus-visible,
.site-footer a:focus-visible {
	outline: 2px solid var(--color-white);
	outline-offset: 4px;
}

.site-footer__positioning {
	font-size: 14px;
	line-height: 1.7;
	max-width: 36em;
	color: var(--color-soft-blue);
}

.site-footer__menu-title {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 16px;
	color: var(--color-white);
	margin-bottom: var(--space-16);
	padding-left: var(--space-12);
	border-left: 3px solid var(--color-red);
}

.site-footer__links,
.site-footer__legal ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__links {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-12);
	font-size: 14px;
}

.site-footer__links a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
}

.site-footer__contact-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-32);
	margin-top: var(--space-40);
	padding-top: var(--space-32);
	border-top: 1px solid var(--color-soft-blue);
	color: var(--color-soft-blue);
}

.site-footer__contact-title {
	font-family: var(--font-heading);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--color-white);
	margin-bottom: var(--space-12);
}

.site-footer__contact-group address,
.site-footer__contact-group p {
	font-style: normal;
	font-size: 14px;
	line-height: 1.7;
	margin: 0;
	overflow-wrap: anywhere;
}

.site-footer__contact-group p + p {
	margin-top: var(--space-8);
}

.site-footer__pending {
	color: var(--color-soft-blue);
}

.site-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-24);
	margin-top: var(--space-32);
	padding-top: var(--space-24);
	border-top: 1px solid var(--color-soft-blue);
	font-size: 14px;
	color: var(--color-soft-blue);
}

.site-footer__bottom p {
	margin: 0;
}

.site-footer__legal ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: var(--space-16);
}

@media (max-width: 1024px) {
	.site-footer__top {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.site-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 768px) {
	.site-footer {
		padding-top: var(--space-48);
	}

	.site-footer__top,
	.site-footer__contact-grid {
		grid-template-columns: 1fr;
	}

	.site-footer__top {
		gap: var(--space-32);
	}

	.site-footer__brand {
		grid-column: auto;
	}

	.site-footer__contact-grid {
		gap: var(--space-24);
	}

	.site-footer__links a,
	.site-footer__contact-group a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
	}

	.site-footer__bottom {
		align-items: flex-start;
		flex-direction: column;
	}

	.site-footer__legal ul {
		justify-content: flex-start;
	}
}

/* -----------------------------------------------------------------------
 * Button system base — primary/secondary per Step 21 §14.
 * Specialized variants (.btn--text, .btn--resource, .btn--download) are
 * defined in components.css, which is enqueued after this file.
 * --------------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: var(--space-8);
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	border-radius: var(--radius-sm);
	padding: 14px 24px;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	min-height: 44px;
}

/* Defensive: CTA/button text must always be Open Sans at weight 600/700,
 * never Quicksand — h1-h6 set font-family: var(--font-heading), which would
 * cascade onto a .btn if a future template ever nests a button inside a
 * heading element (a real risk once Phase 5B archive/detail templates start
 * copy-pasting card/heading markup). This rule wins on specificity either way. */
h1 .btn,
h2 .btn,
h3 .btn,
h4 .btn,
h5 .btn,
h6 .btn {
	font-family: var(--font-body);
	font-weight: 700;
}

.btn:hover,
.btn:focus {
	text-decoration: none;
}

.btn:focus-visible {
	outline: 2px solid var(--color-blue);
	outline-offset: 2px;
}

.btn--primary {
	background-color: var(--color-red);
	color: var(--color-white);
	border-color: var(--color-red);
}

.btn--primary:hover,
.btn--primary:focus {
	background-color: var(--color-blue);
	border-color: var(--color-blue);
	color: var(--color-white);
}

.btn--secondary {
	background-color: var(--color-white);
	color: var(--color-blue);
	border-color: var(--color-blue);
}

.btn--secondary:hover,
.btn--secondary:focus {
	background-color: var(--color-soft-blue);
	color: var(--color-blue);
}

/* On a blue section background, secondary buttons swap to a light-on-blue
 * treatment per Step 21 §6.6 (CTA section: secondary = white bg, blue text). */
.section-band--blue .btn--secondary {
	background-color: var(--color-white);
	color: var(--color-blue);
	border-color: var(--color-white);
}

/* -----------------------------------------------------------------------
 * Phase 1 placeholder sections (removed once real templates are built)
 * --------------------------------------------------------------------- */

.section-placeholder {
	padding-top: var(--space-64);
	padding-bottom: var(--space-64);
}

.section-placeholder__note {
	color: var(--color-blue);
	font-size: 14px;
}

.archive-list {
	display: grid;
	gap: var(--space-24);
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	margin: var(--space-32) 0;
}

.archive-list__item {
	border: 1px solid var(--color-soft-blue);
	border-radius: var(--radius-md);
	padding: var(--space-24);
}

/* -----------------------------------------------------------------------
 * Layout system (Task 12 — UI/UX rescue). Section rhythm + visual-support
 * primitives shared by every template. Only ever uses the 6 approved
 * tokens declared at the top of this file — no new colors.
 * --------------------------------------------------------------------- */

/* .section--compact is the preferred name going forward; kept equivalent
 * to the existing .section--tight (still used in older markup) rather
 * than duplicating values that could drift apart. */
.section--compact {
	padding-top: var(--space-32);
	padding-bottom: var(--space-32);
}

/* Convenience single-class soft-blue band, so new sections don't need to
 * pair .section with a separate .section-band--soft-blue class. */
.section--soft {
	background-color: var(--color-soft-blue);
}

/* -----------------------------------------------------------------------
 * Task 26C Batch 3 — CTA section wrapper contract.
 *
 * `.cta-band` / `.cta-band--form` (components.css) is an INNER component
 * only: it supplies its own background, text color, padding and rounded
 * corners (`border-radius: var(--radius-lg)` on every variant — it is
 * always a contained card, never a full-bleed band). It has never
 * supplied outer vertical spacing, and was never meant to.
 *
 * `.section--cta` is the required OUTER wrapper for every page-level CTA
 * call site: `<section class="section section--cta"><div
 * class="container">...cta-band...</div></section>`. It adds no new
 * spacing values of its own — it reuses the existing `.section` padding
 * rhythm (var(--space-48), var(--space-64) >=1024px) so CTA sections get
 * exactly the same vertical rhythm as every other section on the page,
 * including the one directly before the footer.
 *
 * It is intentionally always on the page's white ambient background
 * (never paired with `.section-band--blue`/`--soft-blue`) so a
 * `.cta-band--blue` card never sits flush against a same-color
 * `.site-footer` (also blue) with no visible boundary — the white gap
 * around the card is the "deliberate visual transition" call sites need
 * per the approved CTA layout contract
 * (content-import/phase26-runtime-qa/29_global_cta_section_contract.md).
 * Call sites that already wrap their CTA in a colored `.section-band--*`
 * band (Partner's partnership-form section, Warehouse Supply Package's
 * closing form) are left unchanged — they already satisfy the spacing
 * contract via plain `.section`, and their background color is existing
 * approved visual style, out of scope for a spacing-only batch.
 * ------------------------------------------------------------------------- */
.section--cta {
	background-color: var(--color-white);
}

.molykote-contextual-cta {
	margin-top: var(--space-32);
}

.safety-contextual-cta {
	margin-top: var(--space-32);
}

.safety-decision-table {
	min-width: 860px;
}

.safety-decision-table thead th {
	background-color: var(--color-blue);
	color: var(--color-white);
}

.safety-product-groups {
	display: grid;
	gap: var(--space-40);
	min-width: 0;
}

.safety-product-groups .component-product-family {
	margin-bottom: 0;
	min-width: 0;
}

.molykote-decision-table thead th {
	background-color: var(--color-blue);
	color: var(--color-white);
}

.molykote-decision-table tbody th {
	background-color: var(--color-soft-blue);
	color: var(--color-blue);
	font-family: var(--font-heading);
	font-weight: 700;
}

@media (max-width: 767px) {
	.molykote-decision-table {
		min-width: 680px;
	}
}

.section__header {
	max-width: 46em;
	margin-bottom: var(--space-32);
}

.section__header--center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.section__eyebrow {
	display: inline-block;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-red);
	margin-bottom: var(--space-12);
}

.section__title {
	margin-bottom: var(--space-12);
}

.section__intro {
	font-family: var(--font-body);
	font-size: 17px;
	color: var(--color-dark);
	margin-bottom: 0;
}

.section-band--blue .section__intro,
.section-band--blue .section__eyebrow {
	color: var(--color-white);
}

.section-band--blue .section__eyebrow {
	color: var(--color-soft-red);
}

/* Split layout — text column + media/visual column, used for hero-like
 * sections and detail-page "content + visual panel" blocks. */
.split-layout {
	display: grid;
	gap: var(--space-32);
	align-items: center;
	grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
	.split-layout {
		grid-template-columns: 1.05fr 0.95fr;
	}

	.split-layout--media-first .split-layout__media {
		order: -1;
	}
}

.split-layout__media {
	display: flex;
}

/* content-media — semantic wrapper for a section that pairs a text block
 * with a media/illustration panel (wraps .split-layout inside). */
.content-media {
	width: 100%;
}

/* illustration-panel — the visual "canvas" box used by the live, wired
 * Task 19/20 SVG-illustration component (template-parts/components/
 * illustration-panel.php, used across ~13 templates). Rules below are
 * UNCHANGED by Task 23A — only the formerly-shared `.media-panel` selector
 * was split out (see the new, independent `.media-panel` block a few lines
 * down) so that syncing the prototype's media-panel look cannot alter this
 * already-live component. */
.illustration-panel {
	background-color: var(--color-soft-blue);
	border-radius: var(--radius-lg);
	padding: var(--space-24);
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	width: 100%;
}

.illustration-panel--blue {
	background-color: var(--color-blue);
}

.illustration-panel--soft-red {
	background-color: var(--color-soft-red);
}

.illustration-panel--white {
	background-color: var(--color-white);
	border: 1px solid var(--color-soft-blue);
}

.illustration-panel svg {
	width: 100%;
	height: auto;
	max-width: 420px;
}

/* -------------------------------------------------------------------------
 * TASK 23A — media-panel, synced from the approved static prototype
 * (design-prototypes/aetech-static-html/assets/css/prototype.css). This
 * class is NOT currently emitted by any template (confirmed via repo-wide
 * grep) — it exists only as an aliasing target for the Task 21 image-first
 * workflow (`.media-panel__image` / `.media-panel__fallback`, defined
 * further below and left untouched). Redefining its base rules here is
 * therefore safe and does not change any page currently rendered. Task 23B
 * can wire this into hero/card templates as an alternative to
 * illustration-panel where a photographic "canvas" placeholder (rather
 * than line-art) is wanted, while the real Featured Image fallback logic
 * keeps working exactly as before (an <img class="media-panel__image">
 * still renders on top of / instead of the placeholder body below).
 * ------------------------------------------------------------------------- */
.media-panel {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 55%),
		var(--color-blue);
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-white);
	width: 100%;
}

.media-panel--soft {
	background: var(--color-soft-blue);
	color: var(--color-blue);
}

.media-panel--blue {
	background: var(--color-blue);
	color: var(--color-white);
}

.media-panel--soft-red {
	background: var(--color-soft-red);
	color: var(--color-red);
}

.media-panel--white {
	background: var(--color-white);
	color: var(--color-blue);
	border: 1px solid var(--color-soft-blue);
}

.media-panel--card {
	aspect-ratio: 3 / 2;
	border-radius: var(--radius-md);
}

.media-panel--wide {
	aspect-ratio: 16 / 9;
}

/* Task 23B-3C — .media-panel__image (single-insight.php Featured Image
 * block) otherwise always forces its own 4:3 ratio (see the shared rule
 * below), which would fight `.media-panel--wide`'s 16:9 panel. Only the
 * combination needs the override; every other `.media-panel__image` usage
 * elsewhere in the theme is unaffected. */
.media-panel--wide .media-panel__image {
	aspect-ratio: 16 / 9;
}

.media-panel--square {
	aspect-ratio: 1 / 1;
}

.media-panel__pattern {
	position: absolute;
	inset: 0;
	opacity: 0.5;
	background-image:
		repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 18px);
}

.media-panel--soft .media-panel__pattern,
.media-panel--white .media-panel__pattern {
	background-image:
		repeating-linear-gradient(45deg, rgba(6, 52, 140, 0.08) 0 2px, transparent 2px 18px);
	opacity: 1;
}

.media-panel__icon {
	position: relative;
	z-index: 1;
	width: 56px;
	height: 56px;
	border-radius: var(--radius-md);
	background: rgba(255, 255, 255, 0.16);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: var(--space-12);
}

.media-panel--soft .media-panel__icon,
.media-panel--white .media-panel__icon {
	background: rgba(6, 52, 140, 0.1);
}

.media-panel__icon svg {
	width: 28px;
	height: 28px;
	stroke: currentColor;
}

.media-panel__body {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 0 var(--space-24);
}

.media-panel__label {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 0.9375rem;
	margin-bottom: 4px;
}

.media-panel__note {
	font-size: 0.75rem;
	opacity: 0.75;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.media-panel__accent {
	position: absolute;
	width: 90px;
	height: 90px;
	border: 3px solid var(--color-red);
	border-radius: 18px;
	right: -20px;
	bottom: -20px;
	z-index: 0;
}

/* Task 21 — Media / Featured Image Workflow: standardized media class
 * names, grouped as aliases onto the classes every hero/card component
 * already renders (.component-hero__visual, .component-card__image) so no
 * template markup had to change to adopt them — a future/new component can
 * use `.hero__media` / `.card__media` / `.archive-card__media` /
 * `.product-card__media` / `.media-panel__image` / `.media-panel__fallback`
 * directly and automatically get the same "no distortion, no broken card,
 * stable aspect ratio, mobile-safe" rules as everything else. */
.hero__media,
.component-hero__visual {
	background-color: var(--color-soft-blue);
	border-radius: var(--radius-lg);
	min-height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.media-panel__image,
.hero__media img,
.component-hero__visual-image {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--radius-lg);
	display: block;
}

.media-panel__fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

/* Note: .card__media / .archive-card__media / .product-card__media aliases
 * for the card image box live in components.css (aliased directly onto
 * .component-card__image there), since components.css is enqueued after
 * this file and is the file that actually owns card visual rules — see
 * inc/enqueue.php load order and the components.css file header. */

@media (max-width: 480px) {
	.hero__media,
	.component-hero__visual {
		min-height: 0;
	}
}

/* Visual grid — generic responsive grid for panels that combine an icon
 * with a short label/description (problem entries, application cues). */
.visual-grid {
	display: grid;
	gap: var(--space-24);
	grid-template-columns: 1fr;
}

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

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

/* Metric strip — short factual counts/labels about site structure (e.g.
 * "5 nhóm sản phẩm"), never a fabricated performance/marketing claim. */
.metric-strip {
	display: grid;
	gap: var(--space-24);
	grid-template-columns: repeat(2, 1fr);
	text-align: center;
}

@media (min-width: 768px) {
	.metric-strip {
		grid-template-columns: repeat(4, 1fr);
	}
}

.metric-strip__item {
	padding: var(--space-16);
}

.metric-strip__value {
	display: block;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 28px;
	color: var(--color-blue);
	margin-bottom: var(--space-4);
}

.section-band--blue .metric-strip__value {
	color: var(--color-white);
}

.metric-strip__label {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--color-dark);
}

.section-band--blue .metric-strip__label {
	color: var(--color-white);
}

/* Process flow — real diagram (Task 13): horizontal flow with connector
 * arrows on desktop, vertical timeline with a connecting line on mobile.
 * Replaces plain <ol> lists AND the earlier "loose card grid" version —
 * uses flexbox with `flex: 1` per step (not CSS Grid auto-fit), so any
 * number of steps distributes evenly across a single row with no orphan
 * wrap, no explicit count class needed. */
.process-flow {
	display: flex;
	flex-direction: column;
	gap: var(--space-24);
}

.process-flow__step {
	position: relative;
	display: flex;
	gap: var(--space-16);
}

.process-flow__marker {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.process-flow__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	background-color: var(--color-blue);
	color: var(--color-white);
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 15px;
	flex-shrink: 0;
}

.process-flow__line {
	flex: 1;
	width: 2px;
	min-height: var(--space-24);
	background-color: var(--color-soft-blue);
	margin-top: var(--space-8);
}

.process-flow__step:last-child .process-flow__line {
	display: none;
}

.process-flow__content {
	padding-bottom: var(--space-8);
}

.process-flow__title {
	font-size: 16px;
	margin-bottom: var(--space-8);
}

.process-flow__body {
	font-size: 14px;
	color: var(--color-dark);
	margin-bottom: 0;
}

.section-band--blue .process-flow__body {
	color: var(--color-soft-blue);
}

.process-flow--single {
	max-width: 42rem;
	margin-left: auto;
	margin-right: auto;
}

.process-flow--single .process-flow__step {
	background-color: var(--color-white);
	border: 1px solid var(--color-soft-blue);
	border-radius: var(--radius-md);
	padding: var(--space-24);
}

.process-flow--single .process-flow__line {
	display: none;
}

/* Desktop: switch to a horizontal flow, one row, arrows between steps. */
@media (min-width: 900px) {
	.process-flow {
		flex-direction: row;
		align-items: flex-start;
	}

	.process-flow__step {
		flex: 1;
		flex-direction: column;
	}

	.process-flow__marker {
		flex-direction: row;
		width: 100%;
	}

	.process-flow__line {
		height: 2px;
		width: auto;
		min-height: 0;
		margin-top: 15px;
		margin-left: var(--space-8);
		position: relative;
	}

	.process-flow__line::after {
		content: "";
		position: absolute;
		right: -1px;
		top: 50%;
		transform: translateY(-50%);
		border-style: solid;
		border-width: 4px 0 4px 6px;
		border-color: transparent transparent transparent var(--color-soft-blue);
	}

	.process-flow__content {
		padding-bottom: 0;
		padding-top: var(--space-12);
	}

	.process-flow--single .process-flow__step {
		flex: none;
		width: 100%;
		flex-direction: row;
	}

	.process-flow--single .process-flow__marker {
		flex: 0 0 32px;
		width: 32px;
		align-self: flex-start;
	}

	.process-flow--single .process-flow__content {
		flex: 1;
		min-width: 0;
		padding-top: var(--space-4);
	}
}

/* Card rail — horizontal scroll-snap row (Task 13). Used instead of a
 * fixed-column grid whenever the item count would leave an orphan card
 * alone on the last row. Pure CSS, no JS carousel dependency. */
.card-rail {
	display: flex;
	gap: var(--space-24);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: var(--space-16);
	margin: 0 calc(-1 * var(--space-24));
	padding-left: var(--space-24);
	padding-right: var(--space-24);
	-webkit-overflow-scrolling: touch;
}

.card-rail__item {
	flex: 0 0 260px;
	scroll-snap-align: start;
	display: flex;
}

.card-rail__item > * {
	width: 100%;
}

@media (min-width: 640px) {
	.card-rail__item {
		flex-basis: 300px;
	}
}

/* Problem grid — "bài toán vận hành" entry cards with an icon slot. */
.problem-grid {
	display: grid;
	gap: var(--space-24);
	grid-template-columns: 1fr;
}

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

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

.problem-grid--single {
	grid-template-columns: minmax(0, 42rem);
	justify-content: center;
}

.problem-grid--pair {
	max-width: 56rem;
	margin-left: auto;
	margin-right: auto;
}

@media (min-width: 1024px) {
	.problem-grid--pair {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.problem-grid__item {
	display: flex;
	flex-direction: column;
	background-color: var(--color-white);
	border: 1px solid var(--color-soft-blue);
	border-radius: var(--radius-lg);
	padding: var(--space-24);
	height: 100%;
}

.problem-grid__icon {
	color: var(--color-blue);
	margin-bottom: var(--space-16);
}

.problem-grid__title {
	font-size: 17px;
	color: var(--color-blue);
	margin-bottom: var(--space-8);
}

.problem-grid__body {
	font-size: 14px;
	color: var(--color-dark);
	margin-bottom: var(--space-16);
	flex: 1;
}

/* Shared section-level CTA (Task 13 §10): one CTA per section instead of a
 * CTA inside every card — used after problem-grid and similar informational
 * grids where a per-card CTA doesn't help the user decide anything. */
.section__footer-cta {
	display: flex;
	justify-content: center;
	margin-top: var(--space-32);
}

/* Application grid — denser icon + label cues (factory application areas). */
.application-grid {
	display: grid;
	gap: var(--space-16);
	grid-template-columns: repeat(2, 1fr);
}

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

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

.application-grid__item {
	text-align: center;
	background-color: var(--color-soft-blue);
	border-radius: var(--radius-md);
	padding: var(--space-24) var(--space-16);
}

.application-grid__icon {
	color: var(--color-blue);
	margin: 0 auto var(--space-12);
}

.application-grid__label {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 14px;
	color: var(--color-dark);
	margin-bottom: 0;
}

.application-grid__description,
.application-grid__context {
	font-size: 13px;
	line-height: 1.55;
	color: var(--color-dark);
	margin-top: var(--space-8);
	margin-bottom: 0;
}

.application-grid__context {
	font-weight: 600;
	color: var(--color-blue);
}

.application-grid__image {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--radius-sm);
	margin-bottom: var(--space-12);
}

/* Problem -> Risk -> Solution step block (3 cards + connector). */
.solution-flow {
	display: grid;
	gap: var(--space-24);
	grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
	.solution-flow {
		grid-template-columns: repeat(3, 1fr);
	}
}

.solution-flow__item {
	position: relative;
	background-color: var(--color-white);
	border-radius: var(--radius-lg);
	padding: var(--space-24);
	border-top: 4px solid var(--color-blue);
}

.solution-flow__item--risk {
	border-top-color: var(--color-red);
	background-color: var(--color-soft-red);
}

.solution-flow__eyebrow {
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-blue);
	margin-bottom: var(--space-8);
	display: block;
}

.solution-flow__item--risk .solution-flow__eyebrow {
	color: var(--color-red);
}

.solution-flow__title {
	font-size: 17px;
	margin-bottom: var(--space-8);
}

.solution-flow__body {
	font-size: 14px;
	color: var(--color-dark);
	margin-bottom: 0;
}

/* =========================================================================
 * TASK 23A — Card system + layout foundation synced from the approved
 * static prototype (design-prototypes/aetech-static-html/assets/css/
 * prototype.css). Additive only: the theme's existing `.component-card`
 * system (components.css) and every template-part that already renders it
 * (archive/product/product-group/resource/brand cards) are untouched. The
 * classes below are new, unwired, prototype-named siblings for Task 23B to
 * choose from per template — see content-import/phase23-theme-sync/
 * 04_component_mapping_from_prototype.md.
 *
 * `.container`, `.section`, `.section-band--*`, `.section__header`,
 * `.section__eyebrow`, `.section__title` are NOT duplicated here: the
 * theme's existing versions (defined earlier in this file) already match
 * the prototype 1:1 in both naming and value. Only `.section__lead` is
 * added below as an alias, since the theme's equivalent is named
 * `.section__intro` instead.
 * ========================================================================= */

/* Alias: prototype calls this `.section__lead`, theme calls it
 * `.section__intro`. Both now work; templates can use either. */
.section__lead {
	font-size: 17px;
	color: rgba(17, 24, 39, 0.7);
	max-width: 640px;
}

.section-band--blue .section__lead {
	color: rgba(255, 255, 255, 0.86);
}

.card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-24);
}

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

.card-grid--4 {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
	.card-grid,
	.card-grid--2,
	.card-grid--4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.card-grid,
	.card-grid--2,
	.card-grid--4 {
		grid-template-columns: 1fr;
	}
}

/* Shared base for the 4 prototype card kinds. Deliberately not merged with
 * `.component-card` — see the mapping doc for which one Task 23B should
 * standardize on per archive/section. */
.problem-card,
.solution-card,
.product-group-card,
.product-card {
	background: var(--color-white);
	border-radius: var(--radius-md);
	border: var(--border-soft);
	padding: var(--space-24);
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
	gap: var(--space-12);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.problem-card:hover,
.solution-card:hover,
.product-group-card:hover,
.product-card:hover {
	box-shadow: var(--shadow-card-hover);
	transform: translateY(-2px);
}

.card__icon {
	width: 48px;
	height: 48px;
	border-radius: var(--radius-sm);
	background: var(--color-soft-blue);
	color: var(--color-blue);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}

.card__icon svg {
	width: 24px;
	height: 24px;
	stroke: currentColor;
}

.card__icon--risk {
	background: var(--color-soft-red);
	color: var(--color-red);
}

.card__title {
	font-size: 1.0625rem;
	margin-bottom: 0;
}

.card__body {
	color: rgba(17, 24, 39, 0.68);
	font-size: 0.9375rem;
	margin-bottom: 0;
}

.card__link {
	margin-top: auto;
	font-weight: 700;
	font-size: 0.875rem;
	color: var(--color-blue);
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.card__link:hover {
	color: var(--color-red);
}

.card__badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--color-blue);
	background: var(--color-soft-blue);
	padding: 3px 10px;
	border-radius: 999px;
	align-self: flex-start;
}

/* When a `.media-panel` (Task 23A) is placed as the first child of one of
 * these cards, bleed it to the card edges and square off its top corners —
 * matches the prototype's card-with-photo layout. */
.solution-card .media-panel,
.product-group-card .media-panel,
.product-card .media-panel {
	margin: calc(var(--space-24) * -1) calc(var(--space-24) * -1) 0;
	border-radius: var(--radius-md) var(--radius-md) 0 0;
	aspect-ratio: 3 / 2;
}

/* `.card-rail` already exists earlier in this file (Task 23A #50 research
 * confirmed it already matches the prototype's horizontal-rail behavior —
 * flex, gap, scroll-snap). This just teaches it to size the two new
 * prototype card kinds the same way it already sizes existing cards. */
.card-rail .product-card,
.card-rail .product-group-card {
	flex: 0 0 260px;
	scroll-snap-align: start;
}

/* =========================================================================
 * TASK 23A — Motion base CSS, pairing the JS added to assets/js/main.js
 * (initHeaderScrollState / initScrollReveal / initMarquee / initAutoCarousel
 * / initArticleToc / initReadingProgress). All classes here are only ever
 * added BY that JS — if JS never runs, [data-reveal] elements simply never
 * receive `.reveal-init` and stay fully visible; `.marquee__track` never
 * animates; `.site-header` never gets `.is-scrolled`. Nothing here is
 * required for a page to render or read correctly.
 * ========================================================================= */

.reveal-init {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-init.reveal-in {
	opacity: 1;
	transform: none;
}

/* Optional sequential reveal for steps/cards sharing a row. */
.reveal-init[data-reveal-delay="1"] { transition-delay: 0.08s; }
.reveal-init[data-reveal-delay="2"] { transition-delay: 0.16s; }
.reveal-init[data-reveal-delay="3"] { transition-delay: 0.24s; }
.reveal-init[data-reveal-delay="4"] { transition-delay: 0.32s; }
.reveal-init[data-reveal-delay="5"] { transition-delay: 0.4s; }

/* Header scroll state — targets the theme's actual header markup
 * (.site-header__inner), not the prototype's .site-header__bar. */
.site-header__inner {
	transition: padding 0.2s ease;
}

.site-header.is-scrolled {
	box-shadow: 0 4px 20px rgba(17, 24, 39, 0.1);
}

.site-header.is-scrolled .site-header__inner {
	padding-top: var(--space-8);
	padding-bottom: var(--space-8);
}

/* Logo / customer proof marquee. */
.marquee {
	position: relative;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.marquee__track {
	display: flex;
	gap: var(--space-16);
	width: max-content;
}

.marquee--animating .marquee__track {
	animation: marquee-scroll 32s linear infinite;
}

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

@keyframes marquee-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

.logo-tile {
	flex: none;
	width: 168px;
	height: 76px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-white);
	border: var(--border-soft);
	border-radius: var(--radius-sm);
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1rem;
	color: rgba(17, 24, 39, 0.62);
	text-align: center;
	padding: 0 var(--space-12);
}

.customer-tile {
	flex: none;
	width: 208px;
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--color-white);
	border: var(--border-soft);
	border-radius: var(--radius-sm);
	padding: var(--space-16);
}

.customer-tile__icon {
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--color-soft-blue);
	color: var(--color-blue);
	display: flex;
	align-items: center;
	justify-content: center;
}

.customer-tile__icon svg {
	width: 18px;
	height: 18px;
}

.customer-tile__label {
	font-size: 0.875rem;
	font-weight: 700;
	color: rgba(17, 24, 39, 0.82);
}

.proof-section__note {
	font-size: 0.8125rem;
	color: rgba(17, 24, 39, 0.56);
	margin-top: var(--space-16);
	margin-bottom: 0;
}

.proof-section__note--on-blue {
	color: rgba(255, 255, 255, 0.66);
}

/* Reading progress bar — thin bar pinned to the bottom edge of the sticky
 * header. Starts at 0% width; only ever grows via JS on scroll, so if JS
 * fails to load it simply stays an invisible 0-width sliver (fail-open). */
.reading-progress {
	position: absolute;
	top: 100%;
	left: 0;
	height: 3px;
	width: 0%;
	background: var(--color-red);
	transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
	.reveal-init {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.marquee__track {
		animation: none !important;
	}

	.site-header__inner {
		transition: none;
	}

	.btn,
	.problem-card,
	.solution-card,
	.product-group-card,
	.product-card,
	.intent-card {
		transition: none !important;
	}

	html {
		scroll-behavior: auto;
	}

	.reading-progress {
		transition: none !important;
	}
}
