/*
Theme Name: TrucPro
Theme URI: https://truc.pro/
Author: Truc Production
Description: Theme classic cho truc.pro — giới thiệu dòng thiết bị IoT TrucLink cho máy tự phục vụ. Song ngữ qua Polylang, SEO qua Rank Math, không dùng page builder.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trucpro
Tags: custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
	--tp-bg: #ffffff;
	--tp-bg-alt: #f4f6fa;
	--tp-panel: #ffffff;
	--tp-panel-2: #eef1f6;
	--tp-line: #e1e6ee;
	--tp-line-soft: #edf0f6;
	/* Ba màu lấy trực tiếp từ file logo, không phải ước lượng bằng mắt. */
	--tp-brand-navy: #07182d;
	--tp-brand-blue: #015bb7;
	--tp-brand-cyan: #03acc3;

	--tp-ink: #07182d;
	--tp-ink-dim: #33445c;
	--tp-muted: #64748b;

	/* Cyan của logo trên nền trắng chỉ đạt khoảng 2,5:1 — không đủ để làm màu
	   chữ. Màu nhấn vì thế lấy xanh dương của logo (≈5,6:1), còn cyan để dành
	   cho dải chuyển màu và mảng nền nhạt. */
	--tp-accent: #015bb7;
	--tp-accent-rgb: 1, 91, 183;
	--tp-accent-ink: #ffffff;

	/* A light page needs elevation, not just hairlines — borders alone read
	   flat once the background stops doing the separating. */
	--tp-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 26px -14px rgba(16, 24, 40, 0.18);
	--tp-shadow-lift: 0 2px 4px rgba(16, 24, 40, 0.05), 0 18px 38px -16px rgba(16, 24, 40, 0.22);

	--tp-wrap: 1200px;
	--tp-gap: 24px;
	--tp-radius: 14px;
	--tp-radius-sm: 9px;

	--tp-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--tp-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

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

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

body {
	margin: 0;
	background: var(--tp-bg);
	color: var(--tp-ink);
	font-family: var(--tp-font);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

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

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

h1,
h2,
h3,
h4 {
	margin: 0 0 0.5em;
	line-height: 1.22;
	font-weight: 650;
	letter-spacing: -0.015em;
}

p {
	margin: 0 0 1em;
}

ul,
ol {
	margin: 0 0 1em;
	padding-left: 1.3em;
}

table {
	border-collapse: collapse;
	width: 100%;
}

:focus-visible {
	outline: 2px solid var(--tp-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 999;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 16px;
	background: var(--tp-accent);
	color: var(--tp-accent-ink);
	border-radius: 8px;
}

.wrap {
	width: 100%;
	max-width: var(--tp-wrap);
	margin-inline: auto;
	padding-inline: 20px;
}

.narrow {
	max-width: 780px;
}

.tp-icon {
	flex: none;
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

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

.btn-primary {
	background: var(--tp-accent);
	border-color: var(--tp-accent);
	color: var(--tp-accent-ink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
	background: #014892;
	border-color: #014892;
}

.btn-ghost {
	background: transparent;
	border-color: var(--tp-line);
	color: var(--tp-ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
	border-color: var(--tp-accent);
	color: var(--tp-accent);
}

/* ==========================================================================
   4. Header
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--tp-line-soft);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 20px;
	min-height: 68px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 11px;
	color: var(--tp-ink);
	margin-right: auto;
}

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

.brand-logo {
	display: block;
	margin-right: auto;
	line-height: 0;
}

.brand-logo-img {
	width: auto;
	height: 38px;
}

.brand-mark {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: rgba(var(--tp-accent-rgb), 0.13);
	border: 1px solid rgba(var(--tp-accent-rgb), 0.3);
	color: var(--tp-accent);
}

.brand-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.brand-name {
	font-weight: 680;
	font-size: 16px;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.brand-sub {
	font-size: 12px;
	color: var(--tp-muted);
	line-height: 1.35;
	/* The tagline is long in Vietnamese; one line only, never wrapping the bar. */
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 30ch;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.nav-list {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-list a {
	display: block;
	padding: 9px 13px;
	border-radius: 8px;
	color: var(--tp-ink-dim);
	font-size: 15px;
	font-weight: 550;
	white-space: nowrap;
}

.nav-list a:hover,
.nav-list a:focus-visible {
	background: var(--tp-panel-2);
	color: var(--tp-ink);
	text-decoration: none;
}

.nav-list .current-menu-item > a,
.nav-list .current_page_item > a {
	color: var(--tp-accent);
}

.lang-switch {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0 0 0 8px;
	padding: 3px;
	list-style: none;
	background: var(--tp-panel-2);
	border-radius: 999px;
}

.lang-switch a {
	display: block;
	padding: 5px 10px;
	border-radius: 999px;
	color: var(--tp-muted);
	font-size: 12.5px;
	font-weight: 650;
	letter-spacing: 0.04em;
}

.lang-switch a:hover {
	color: var(--tp-ink);
	text-decoration: none;
}

.lang-switch a.is-current {
	background: var(--tp-panel);
	color: var(--tp-ink);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.nav-cta {
	margin-left: 10px;
	padding: 9px 18px;
}

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: 10px;
	color: var(--tp-ink);
	cursor: pointer;
}

.nav-toggle-bars {
	display: grid;
	gap: 4px;
}

.nav-toggle-bars span {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

/* ==========================================================================
   5. Sections
   ========================================================================== */

.section {
	padding-block: 72px;
}

.section-alt {
	background: var(--tp-bg-alt);
	border-block: 1px solid var(--tp-line-soft);
}

.section-head {
	max-width: 720px;
	margin-bottom: 38px;
}

.kicker {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 650;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--tp-accent);
}

.section-title {
	margin: 0 0 12px;
	font-size: clamp(26px, 3.4vw, 36px);
}

.section-sub {
	margin: 0;
	color: var(--tp-muted);
	font-size: 17px;
}

.lead {
	font-size: 18px;
	color: var(--tp-ink-dim);
}

.empty {
	color: var(--tp-muted);
}

/* ==========================================================================
   6. Hero
   ========================================================================== */

.hero {
	position: relative;
	padding-block: 78px 96px;
	overflow: hidden;
	background:
		radial-gradient(900px 520px at 78% 8%, rgba(var(--tp-accent-rgb), 0.13), transparent 62%),
		radial-gradient(700px 460px at 8% 100%, rgba(3, 172, 195, 0.13), transparent 60%),
		linear-gradient(180deg, #ffffff 0%, #f3f6fa 100%);
	border-bottom: 1px solid var(--tp-line-soft);
}

/* Luoi mo phia sau, du de mat thay co gi do chu khong du de doc ra. */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(14, 22, 32, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(14, 22, 32, 0.045) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(120% 90% at 50% 10%, #000 20%, transparent 78%);
	mask-image: radial-gradient(120% 90% at 50% 10%, #000 20%, transparent 78%);
}

.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
	gap: 54px;
	align-items: center;
}

.hero-title-accent {
	display: block;
	color: var(--tp-accent);
}

.hero-title {
	margin: 0 0 16px;
	font-size: clamp(32px, 4.6vw, 52px);
	letter-spacing: -0.025em;
}

.hero-sub {
	margin: 0 0 28px;
	max-width: 56ch;
	font-size: 17.5px;
	color: var(--tp-ink-dim);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 36px;
}

.hero-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hero-chips li {
	display: flex;
	align-items: center;
	gap: 7px;
	color: var(--tp-ink-dim);
	font-size: 14px;
}

.hero-chips .tp-icon {
	color: var(--tp-accent);
}

.hero-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 40px;
	margin: 0;
	padding-top: 26px;
	border-top: 1px solid var(--tp-line-soft);
}

.hero-stats div {
	min-width: 0;
}

.hero-stats dt {
	font-size: 13px;
	color: var(--tp-muted);
	margin-bottom: 2px;
}

.hero-stats dd {
	margin: 0;
	font-size: 27px;
	font-weight: 680;
	letter-spacing: -0.02em;
	color: var(--tp-accent);
}

.hero-media img {
	width: 100%;
	border-radius: var(--tp-radius);
	border: 1px solid var(--tp-line);
}

/* --- 3D assembly viewer in the hero ------------------------------------ */

.v3d {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: visible;
	/* Khong vien, khong nen: thiet bi noi thang tren nen cua hero. */
	filter: drop-shadow(0 26px 34px rgba(16, 24, 40, 0.13));
}

.v3d-poster,
.v3d-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.v3d-poster {
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.35s;
	/* Ảnh tĩnh nằm đè lên canvas nên nó nuốt hết chuột: rê không xoay được,
	   lăn không phóng được. Nó chỉ là ảnh thay thế, không cần nhận sự kiện. */
	pointer-events: none;
}

/* Trình tự: đang tải → mô hình 3D, hoặc đang tải → ảnh tĩnh. Ảnh chỉ hiện khi
   không dựng được mô hình, chứ không loé lên trước rồi bị thay. */
.v3d.is-fallback .v3d-poster {
	opacity: 1;
}

.v3d-loading {
	position: absolute;
	inset: 0;
	display: none;
	place-items: center;
}

.v3d.is-loading .v3d-loading {
	display: grid;
}

.v3d-loading > span {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 2px solid rgba(var(--tp-accent-rgb), 0.18);
	border-top-color: var(--tp-accent);
	animation: v3d-spin 0.75s linear infinite;
}

@keyframes v3d-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.v3d-loading > span { animation-duration: 2.4s; }
}

.v3d-canvas {
	cursor: grab;
	/* Không chặn cử chỉ nào của trình duyệt: lăn chuột và vuốt dọc vẫn cuộn trang. */
	touch-action: auto;
}

.v3d.is-dragging .v3d-canvas {
	cursor: grabbing;
}

.v3d.is-dragging .hero-media-empty,
.card-media-empty {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 10;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	color: var(--tp-muted);
}

/* ==========================================================================
   6b. Stat band
   ========================================================================== */

/* Dải số liệu đè lên ranh giới giữa hero và phần dưới, nên nó đọc như một lớp
   riêng chứ không phải phần đuôi của hero. */
.statband {
	position: relative;
	z-index: 3;
	margin-top: -44px;
	padding-bottom: 10px;
}

.statband-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
}

.statband-item {
	position: relative;
	padding: 20px 22px 20px 26px;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	box-shadow: var(--tp-shadow);
	overflow: hidden;
}

.statband-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: linear-gradient(180deg, var(--tp-brand-blue), var(--tp-brand-cyan));
}

.statband-num {
	margin: 0 0 2px;
	font-size: 34px;
	font-weight: 720;
	letter-spacing: -0.03em;
	line-height: 1.05;
	color: var(--tp-ink);
}

.statband-label {
	margin: 0;
	color: var(--tp-muted);
	font-size: 14px;
	line-height: 1.45;
}

/* ==========================================================================
   7. Cards
   ========================================================================== */

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--tp-gap);
}

.card {
	display: flex;
	flex-direction: column;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	overflow: hidden;
	box-shadow: var(--tp-shadow);
	transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.card:hover {
	border-color: rgba(var(--tp-accent-rgb), 0.45);
	transform: translateY(-2px);
	box-shadow: var(--tp-shadow-lift);
}

.card-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--tp-panel-2);
	overflow: hidden;
}

.card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-media-empty {
	height: 100%;
	border: 0;
	border-radius: 0;
}

.stage {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 11px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.86);
	border: 1px solid var(--tp-line);
	color: var(--tp-ink-dim);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.01em;
	backdrop-filter: blur(4px);
}

.stage-mau-thu {
	color: var(--tp-accent);
	border-color: rgba(var(--tp-accent-rgb), 0.45);
}

.stage-inline {
	position: static;
	display: inline-block;
	margin: 0 0 14px;
	backdrop-filter: none;
}

.card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 20px;
}

.card-title {
	margin: 0 0 8px;
	font-size: 19px;
}

.card-title a {
	color: var(--tp-ink);
}

.card-title a:hover,
.card-title a:focus-visible {
	color: var(--tp-accent);
	text-decoration: none;
}

.card-tagline {
	margin: 0 0 14px;
	color: var(--tp-muted);
	font-size: 14.5px;
	line-height: 1.55;
}

.card-meta {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 16px;
	color: var(--tp-ink-dim);
	font-family: var(--tp-mono);
	font-size: 12.5px;
	/* Part numbers are long and must not push the card wider than its column. */
	min-width: 0;
}

.card-meta span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.card-meta .tp-icon {
	color: var(--tp-accent);
}

.card-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	color: var(--tp-accent);
	font-size: 14.5px;
	font-weight: 600;
}

/* ==========================================================================
   7b. Chọn thiết bị theo tình huống
   ========================================================================== */

/* Tiêu đề mục kiểu hai cột: tên mục bên trái, đoạn giải thích bên phải. Ở khổ
   rộng nó đọc như một trang tạp chí thay vì một chồng chữ căn trái. */
.section-head-split {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 12px 56px;
	align-items: end;
	max-width: none;
}

.section-head-split .section-sub {
	margin-bottom: 4px;
}

.pick-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
	gap: var(--tp-gap);
}

.pick {
	display: flex;
	flex-direction: column;
	padding: 24px 22px 22px;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	box-shadow: var(--tp-shadow);
	position: relative;
	overflow: hidden;
}

.pick::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--tp-brand-blue), var(--tp-brand-cyan));
}

/* Thẻ cuối là bản đầy đủ nhất, đảo màu để nó không chìm giữa ba thẻ trắng. */
.pick-feature {
	background: var(--tp-brand-navy);
	border-color: var(--tp-brand-navy);
}

.pick-feature .pick-title,
.pick-feature .pick-go a {
	color: #ffffff;
}

.pick-feature .pick-desc,
.pick-feature .pick-points li {
	color: #a9b6cb;
}

.pick-feature .pick-kicker,
.pick-feature .tp-icon {
	color: var(--tp-brand-cyan);
}

.pick-feature .pick-points {
	border-top-color: rgba(255, 255, 255, 0.14);
}

.pick-kicker {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tp-accent);
}

.pick-title {
	margin: 0 0 8px;
	font-size: 17.5px;
	line-height: 1.3;
}

.pick-desc {
	margin: 0 0 16px;
	color: var(--tp-muted);
	font-size: 14.5px;
}

.pick-points {
	margin: 0 0 18px;
	padding: 16px 0 0;
	border-top: 1px solid var(--tp-line-soft);
	list-style: none;
	display: grid;
	gap: 9px;
}

.pick-points li {
	display: flex;
	gap: 9px;
	color: var(--tp-ink-dim);
	font-size: 14px;
	line-height: 1.5;
}

.pick-points .tp-icon {
	color: var(--tp-accent);
	margin-top: 3px;
}

.pick-go {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
	margin: auto 0 0;
}

.pick-go a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 650;
	color: var(--tp-ink);
}

.pick-go a:hover,
.pick-go a:focus-visible {
	color: var(--tp-accent);
	text-decoration: none;
}

.pick-feature .pick-go a:hover {
	color: var(--tp-brand-cyan);
}

.pick-alt {
	font-weight: 550 !important;
	font-size: 14px !important;
	color: var(--tp-muted) !important;
}

.pick-note {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: var(--tp-gap) 0 0;
	padding: 16px 20px;
	background: rgba(var(--tp-accent-rgb), 0.05);
	border: 1px solid rgba(var(--tp-accent-rgb), 0.18);
	border-radius: var(--tp-radius);
	color: var(--tp-ink-dim);
	font-size: 15px;
}

.pick-note .tp-icon {
	color: var(--tp-accent);
	margin-top: 3px;
}

@media (max-width: 860px) {
	.section-head-split {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
		align-items: start;
	}
}

/* ==========================================================================
   8. Flow, stack, rules
   ========================================================================== */

.flow {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: var(--tp-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: flow;
}

.flow-step {
	position: relative;
	padding: 22px 20px;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	box-shadow: var(--tp-shadow);
}

.flow-num {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	margin-bottom: 14px;
	border-radius: 8px;
	background: rgba(var(--tp-accent-rgb), 0.13);
	color: var(--tp-accent);
	font-size: 14px;
	font-weight: 700;
}

.flow-step h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	font-size: 17px;
}

.flow-step h3 .tp-icon {
	color: var(--tp-accent);
}

.flow-step p {
	margin: 0;
	color: var(--tp-muted);
	font-size: 14.5px;
}

/* Same reason as .pay-grid: both places that use this hold six items. */
.stack-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: var(--tp-gap);
}

.stack-item {
	padding: 20px;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	box-shadow: var(--tp-shadow);
}

.stack-icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin-bottom: 14px;
	border-radius: 9px;
	background: rgba(var(--tp-accent-rgb), 0.12);
	color: var(--tp-accent);
}

.stack-item h3 {
	margin: 0 0 4px;
	font-size: 16.5px;
}

.stack-tech {
	margin: 0 0 8px;
	font-family: var(--tp-mono);
	font-size: 13px;
	color: var(--tp-accent);
}

.stack-desc {
	margin: 0;
	color: var(--tp-muted);
	font-size: 14.5px;
}

.rule-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--tp-gap);
}

.rule {
	padding: 22px;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	box-shadow: var(--tp-shadow);
}

.rule-icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin-bottom: 14px;
	border-radius: 10px;
	background: rgba(var(--tp-accent-rgb), 0.12);
	color: var(--tp-accent);
}

.rule h3 {
	margin: 0 0 8px;
	font-size: 17px;
}

.rule p {
	margin: 0;
	color: var(--tp-muted);
	font-size: 14.5px;
}

.callout {
	margin-top: 32px;
	padding: 20px 24px;
	background: rgba(var(--tp-accent-rgb), 0.07);
	border: 1px solid rgba(var(--tp-accent-rgb), 0.24);
	border-radius: var(--tp-radius);
}

.callout p {
	margin: 0;
	color: var(--tp-ink-dim);
}

.callout strong {
	color: var(--tp-ink);
}

/* ==========================================================================
   8b. Ảnh xen giữa các lưới chữ
   ========================================================================== */

/* Ba màn hình thật của thiết bị. Chúng vốn là ảnh chụp màn hình nền tối, nên
   khung tối ở đây là đúng chất chứ không phải chọn màu tuỳ hứng. */
.ui-strip {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--tp-gap);
	margin-top: var(--tp-gap);
}

.ui-strip figure {
	margin: 0;
}

.ui-strip img {
	width: 100%;
	border-radius: var(--tp-radius);
	border: 1px solid var(--tp-line);
	box-shadow: var(--tp-shadow);
	background: var(--tp-brand-navy);
}

.ui-strip figcaption {
	margin-top: 10px;
	color: var(--tp-muted);
	font-size: 13.5px;
	text-align: center;
}

/* "Từ con chip tới cái app" — nói vậy thì phải cho thấy cả hai đầu. */
.c2a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 22px;
	margin-bottom: 38px;
}

.c2a-item {
	margin: 0;
}

/* Ảnh bo mạch là 16:10, ảnh màn hình là 16:9 — cover sẽ cắt mất mép phải của
   cái sau, đúng chỗ có số liệu. Contain giữ trọn cả hai. */
.c2a-item img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: contain;
	border-radius: var(--tp-radius);
	border: 1px solid var(--tp-line);
	box-shadow: var(--tp-shadow);
	background: var(--tp-panel-2);
}

.c2a-item.c2a-screen img {
	background: var(--tp-brand-navy);
	padding: 10px;
}

.c2a-item figcaption {
	margin-top: 12px;
}

.c2a-item strong {
	display: block;
	font-size: 16px;
	color: var(--tp-ink);
}

.c2a-item span {
	display: block;
	margin-top: 2px;
	color: var(--tp-muted);
	font-size: 14px;
}

.c2a-link {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(var(--tp-accent-rgb), 0.10);
	color: var(--tp-accent);
}

@media (max-width: 720px) {
	.c2a {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.c2a-link {
		transform: rotate(90deg);
		justify-self: center;
	}
}

/* Monogram chìm phía sau dải kêu gọi liên hệ. */
.cta-mark {
	position: absolute;
	right: -40px;
	top: 50%;
	transform: translateY(-50%);
	width: 300px;
	height: 300px;
	opacity: 0.06;
	pointer-events: none;
	user-select: none;
}

@media (max-width: 900px) {
	.cta-mark {
		right: -90px;
		width: 240px;
		height: 240px;
		opacity: 0.05;
	}
}

/* ==========================================================================
   9. CTA
   ========================================================================== */

.cta {
	position: relative;
	overflow: hidden;
	padding-block: 60px;
	background:
		radial-gradient(700px 300px at 80% 120%, rgba(var(--tp-accent-rgb), 0.12), transparent 70%),
		var(--tp-bg);
	border-top: 1px solid var(--tp-line-soft);
}

.cta-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.cta h2 {
	margin: 0 0 8px;
	font-size: clamp(22px, 2.8vw, 30px);
}

.cta p {
	margin: 0;
	max-width: 62ch;
	color: var(--tp-muted);
}

.cta-actions {
	margin: 0;
}

/* ==========================================================================
   10. Banner, breadcrumbs
   ========================================================================== */

.banner {
	padding-block: 46px 40px;
	background: var(--tp-bg-alt);
	border-bottom: 1px solid var(--tp-line-soft);
}

.banner-title {
	margin: 0 0 8px;
	font-size: clamp(28px, 3.6vw, 40px);
}

.banner-sub {
	margin: 0;
	max-width: 68ch;
	color: var(--tp-muted);
	font-size: 17px;
}

.crumbs {
	margin-bottom: 14px;
	font-size: 13.5px;
}

.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--tp-muted);
}

.crumbs li + li::before {
	content: "/";
	margin-right: 6px;
	color: var(--tp-line);
}

.crumbs a {
	color: var(--tp-muted);
}

.crumbs a:hover {
	color: var(--tp-accent);
}

/* ==========================================================================
   11. Product archive groups
   ========================================================================== */

.group + .group {
	margin-top: 52px;
}

.group-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--tp-line-soft);
	font-size: 20px;
}

.group-count {
	display: grid;
	place-items: center;
	min-width: 24px;
	height: 24px;
	padding-inline: 7px;
	border-radius: 999px;
	background: rgba(var(--tp-accent-rgb), 0.13);
	color: var(--tp-accent);
	font-size: 13px;
	font-weight: 700;
}

/* ==========================================================================
   12. Single product
   ========================================================================== */

.product-head {
	padding-block: 44px 52px;
	background: var(--tp-bg-alt);
	border-bottom: 1px solid var(--tp-line-soft);
}

.product-head-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	gap: 48px;
	align-items: center;
}

.product-title {
	margin: 0 0 10px;
	font-size: clamp(30px, 4vw, 44px);
}

.product-tagline {
	margin: 0 0 14px;
	font-size: 18px;
	color: var(--tp-accent);
}

.product-excerpt {
	margin: 0 0 24px;
	color: var(--tp-ink-dim);
	max-width: 54ch;
}

.product-actions {
	margin: 0;
}

.product-media img {
	width: 100%;
	border-radius: var(--tp-radius);
	border: 1px solid var(--tp-line);
}

.product-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 48px;
	padding-block: 60px;
	align-items: start;
}

.product-section {
	margin-top: 40px;
}

.product-section h2,
.panel h2 {
	font-size: 20px;
	margin: 0 0 16px;
}

.points {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 14px;
}

.points li {
	display: flex;
	gap: 12px;
	color: var(--tp-ink-dim);
}

.points-mark {
	display: grid;
	place-items: center;
	flex: none;
	width: 26px;
	height: 26px;
	margin-top: 2px;
	border-radius: 8px;
	background: rgba(var(--tp-accent-rgb), 0.13);
	color: var(--tp-accent);
}

.points strong {
	display: block;
	color: var(--tp-ink);
}

.points-desc {
	display: block;
	margin-top: 2px;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.gallery figure {
	margin: 0;
}

/* The gallery mixes 16:10 renders, portrait exploded views and 16:9 UI grabs.
   A fixed box with contain keeps the grid tidy without cropping any of them. */
.gallery a {
	display: block;
	aspect-ratio: 16 / 10;
	padding: 8px;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius-sm);
}

.gallery img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 4px;
}

.product-aside {
	position: sticky;
	top: 88px;
	display: grid;
	gap: 20px;
}

.panel {
	padding: 22px;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	box-shadow: var(--tp-shadow);
}

.panel h3 {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 10px;
	font-size: 17px;
}

.panel h3 .tp-icon {
	color: var(--tp-accent);
}

.panel p {
	color: var(--tp-muted);
	font-size: 15px;
}

.panel p:last-child {
	margin-bottom: 0;
}

.spec-table {
	font-size: 14.5px;
}

.spec-table th,
.spec-table td {
	padding: 10px 0;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--tp-line-soft);
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
	border-bottom: 0;
}

.spec-table th {
	width: 42%;
	padding-right: 16px;
	font-weight: 550;
	color: var(--tp-muted);
}

.spec-table td {
	color: var(--tp-ink-dim);
}

.spec-wide {
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	font-size: 15px;
}

.spec-wide th,
.spec-wide td {
	padding: 14px 22px;
}

.spec-wide th {
	width: 24%;
	color: var(--tp-ink);
	font-weight: 600;
}

.doc-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 10px;
}

.doc-list a {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 14.5px;
}

/* ==========================================================================
   12b. Payment
   ========================================================================== */

/* Six items. 320px lands on three columns at desktop, so the rows come out
   3 + 3 instead of 4 + 2 with two empty cells. */
.pay-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: var(--tp-gap);
	margin-bottom: var(--tp-gap);
}

.pay-way {
	padding: 20px;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	box-shadow: var(--tp-shadow);
}

.pay-icon {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin-bottom: 12px;
	border-radius: 9px;
	background: rgba(var(--tp-accent-rgb), 0.12);
	color: var(--tp-accent);
}

.pay-way h3 {
	margin: 0 0 5px;
	font-size: 16.5px;
}

.pay-way p {
	margin: 0;
	color: var(--tp-muted);
	font-size: 14.5px;
}

.pay-block h2 {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pay-block h2 .tp-icon {
	color: var(--tp-accent);
}

.pay-lead {
	margin: 0 0 18px;
	padding-left: 16px;
	border-left: 3px solid rgba(var(--tp-accent-rgb), 0.5);
	color: var(--tp-ink);
	font-size: 16.5px;
}

.pay-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 2px;
}

.pay-list li {
	padding: 14px 0;
	border-bottom: 1px solid var(--tp-line-soft);
	color: var(--tp-muted);
	font-size: 15px;
}

.pay-list li:last-child {
	border-bottom: 0;
}

.pay-list strong {
	display: block;
	margin-bottom: 3px;
	color: var(--tp-ink);
	font-size: 15.5px;
}

/* ==========================================================================
   13. Platform page bits
   ========================================================================== */

.two-col {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: var(--tp-gap);
}

.panel-stat {
	text-align: center;
	padding-block: 34px;
}

.stat-value {
	margin: 0 0 6px;
	font-size: clamp(34px, 5vw, 48px);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.stat-label {
	margin: 0;
	color: var(--tp-muted);
	font-size: 15px;
}

.panel-accent {
	border-color: rgba(var(--tp-accent-rgb), 0.4);
	background: rgba(var(--tp-accent-rgb), 0.07);
}

.panel-accent .stat-value {
	color: var(--tp-accent);
}

/* ==========================================================================
   14. Prose
   ========================================================================== */

.prose {
	color: var(--tp-ink-dim);
	font-size: 16.5px;
}

.prose h2 {
	margin-top: 1.7em;
	font-size: 24px;
	color: var(--tp-ink);
}

.prose h3 {
	margin-top: 1.5em;
	font-size: 19px;
	color: var(--tp-ink);
}

.prose strong {
	color: var(--tp-ink);
}

.prose ul,
.prose ol {
	padding-left: 1.25em;
}

.prose li {
	margin-bottom: 0.4em;
}

.prose img {
	border-radius: var(--tp-radius-sm);
}

.prose blockquote {
	margin: 1.4em 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--tp-accent);
	color: var(--tp-ink);
}

.prose code {
	padding: 2px 6px;
	background: var(--tp-panel-2);
	border-radius: 5px;
	font-family: var(--tp-mono);
	font-size: 0.9em;
}

/* ==========================================================================
   15. Forms
   ========================================================================== */

.contact-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 48px;
	align-items: start;
}

.contact-side {
	display: grid;
	gap: 20px;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0 20px;
}

.field {
	margin: 0 0 18px;
}

.field label {
	display: block;
	margin-bottom: 7px;
	font-size: 14px;
	font-weight: 600;
	color: var(--tp-ink);
}

.req {
	color: var(--tp-accent);
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="search"],
select,
textarea {
	width: 100%;
	padding: 11px 14px;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius-sm);
	color: var(--tp-ink);
	font-family: inherit;
	font-size: 15.5px;
	line-height: 1.5;
}

textarea {
	resize: vertical;
}

input::placeholder,
textarea::placeholder {
	color: var(--tp-muted);
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--tp-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(var(--tp-accent-rgb), 0.16);
}

/* The honeypot must be reachable by a bot parsing the DOM but invisible and
   unreachable for a person — display:none would let some bots skip it. */
.tp-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-actions {
	margin: 6px 0 0;
}

.notice {
	display: flex;
	gap: 12px;
	margin-bottom: 24px;
	padding: 16px 18px;
	border-radius: var(--tp-radius-sm);
	border: 1px solid var(--tp-line);
	background: var(--tp-panel);
}

.notice p {
	margin: 0;
}

.notice ul {
	margin: 8px 0 0;
}

.notice-ok {
	border-color: rgba(var(--tp-accent-rgb), 0.45);
	background: rgba(var(--tp-accent-rgb), 0.09);
	color: var(--tp-ink);
}

.notice-ok .tp-icon {
	color: var(--tp-accent);
}

.notice-bad {
	border-color: rgba(199, 42, 42, 0.35);
	background: rgba(199, 42, 42, 0.06);
	color: #7f1d1d;
	display: block;
}

.contact-list,
.hint-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 16px;
}

.contact-list li {
	display: flex;
	gap: 12px;
}

.contact-list strong {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--tp-muted);
}

.contact-icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: rgba(var(--tp-accent-rgb), 0.12);
	color: var(--tp-accent);
}

.hint-list {
	gap: 10px;
}

.hint-list li {
	position: relative;
	padding-left: 20px;
	color: var(--tp-muted);
	font-size: 14.5px;
}

.hint-list li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 9px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--tp-accent);
}

.search-form {
	display: flex;
	gap: 10px;
	max-width: 460px;
}

/* ==========================================================================
   16. Post list, pagination
   ========================================================================== */

.post-list {
	display: grid;
	gap: 28px;
}

.post-item h2 {
	font-size: 21px;
	margin-bottom: 4px;
}

.post-item h2 a {
	color: var(--tp-ink);
}

.post-meta {
	margin: 0 0 8px;
	color: var(--tp-muted);
	font-size: 13.5px;
}

.pagination {
	margin-top: 40px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding-inline: 12px;
	background: var(--tp-panel);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius-sm);
	color: var(--tp-ink-dim);
	font-size: 14.5px;
}

.pagination .page-numbers.current {
	background: var(--tp-accent);
	border-color: var(--tp-accent);
	color: var(--tp-accent-ink);
	font-weight: 650;
}

/* ==========================================================================
   17. Footer
   ========================================================================== */

.site-footer {
	padding-top: 56px;
	background: var(--tp-bg-alt);
	border-top: 1px solid var(--tp-line-soft);
}

.footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
	gap: 40px;
	padding-bottom: 40px;
}

.footer-brand .brand-mark,
.footer-mark {
	margin-bottom: 14px;
}

.footer-mark {
	width: 44px;
	height: 44px;
}

.footer-name {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 650;
	color: var(--tp-ink);
}

.footer-note {
	margin: 0;
	max-width: 42ch;
	color: var(--tp-muted);
	font-size: 14.5px;
}

.footer-col h3 {
	margin: 0 0 14px;
	font-size: 14px;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tp-muted);
}

.footer-col ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 9px;
}

.footer-col a {
	color: var(--tp-ink-dim);
	font-size: 14.5px;
}

.footer-col a:hover {
	color: var(--tp-accent);
}

.footer-contact li {
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--tp-ink-dim);
	font-size: 14.5px;
}

.footer-contact .tp-icon {
	color: var(--tp-accent);
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-block: 20px;
	border-top: 1px solid var(--tp-line-soft);
	color: var(--tp-muted);
	font-size: 13.5px;
}

.footer-bottom p {
	margin: 0;
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-menu a {
	color: var(--tp-muted);
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */

@media (max-width: 1080px) {
	.product-body {
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: 36px;
	}

	.contact-grid {
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 36px;
	}
}

@media (max-width: 980px) {
	.hero-grid,
	.product-head-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}

	.hero {
		padding-block: 52px 60px;
	}

	.product-body,
	.contact-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 44px;
	}

	.product-aside {
		position: static;
	}

	.footer-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 32px;
	}

	.footer-brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 900px) {
	.nav-toggle {
		display: inline-flex;
	}

	.brand-sub {
		display: none;
	}

	.site-nav {
		position: fixed;
		inset: 68px 0 auto;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
		padding: 16px 20px 24px;
		background: var(--tp-bg);
		border-bottom: 1px solid var(--tp-line);
		max-height: calc(100vh - 68px);
		overflow-y: auto;
	}

	body.nav-open .site-nav {
		display: flex;
	}

	.nav-list {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.nav-list a {
		padding: 12px 14px;
		font-size: 16px;
		white-space: normal;
	}

	.nav-cta {
		margin: 10px 0 0;
		justify-content: center;
	}
}

@media (max-width: 640px) {
	.section {
		padding-block: 52px;
	}

	.section-head {
		margin-bottom: 28px;
	}

	.card-grid,
	.stack-grid,
	.rule-grid,
	.flow {
		grid-template-columns: minmax(0, 1fr);
	}

	.hero-stats {
		gap: 18px 28px;
	}

	.hero-stats dd {
		font-size: 23px;
	}

	.banner {
		padding-block: 32px 30px;
	}

	.footer-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.spec-wide th,
	.spec-wide td {
		padding: 12px 16px;
	}

	.spec-table th {
		width: 46%;
	}

	.cta-inner {
		display: block;
	}

	.cta-actions {
		margin-top: 20px;
	}
}

/* The stat table on the platform page is the one place where a stacked layout
   reads better than a two-column one at phone width. */
@media (max-width: 460px) {
	.spec-wide tr {
		display: grid;
	}

	.spec-wide th,
	.spec-wide td {
		width: auto;
		border-bottom: 0;
		padding-block: 10px 0;
	}

	.spec-wide td {
		padding-bottom: 14px;
		border-bottom: 1px solid var(--tp-line-soft);
	}
}
