/* ===== THEME v2 — Than Hoạt Tính Công Nghiệp =====
   Ý tưởng: tài liệu kỹ thuật (datasheet) hiện đại — nền sáng lạnh, chữ than đen,
   xanh ngọc (teal) cho cấu trúc, cam tín hiệu chỉ dùng cho hành động chính.
   Chữ: Archivo (tiêu đề, bản rộng) + IBM Plex Sans (nội dung). Cả hai đều có tiếng Việt. */
:root {
  --carbon: #0f1417;      /* chữ chính, nền tối */
  --carbon-2: #1a2327;
  --teal: #0b6e6e;        /* màu cấu trúc, liên kết */
  --teal-deep: #0a4f52;
  --teal-soft: #dcebea;
  --mist: #e9f0ef;
  --paper: #f6f8f7;
  --white: #fff;
  --signal: #d7261e;      /* đỏ: chỉ dành cho nút hành động (chữ trắng đạt AA) */
  --signal-hover: #b81d16;
  --ink-2: #49565b;       /* chữ phụ */
  --line: #d5dedd;

  --f-head: "Archivo", "Be Vietnam Pro", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Thang chữ */
  --t-body: 1.0625rem;                         /* 17px */
  --t-small: .875rem;                          /* 14px */
  --t-lead: clamp(1.125rem, 2.2vw, 1.3125rem); /* 18–21px */
  --t-h3: 1.3125rem;                           /* 21px */
  --t-h2: clamp(1.875rem, 4.6vw, 3rem);        /* 30–48px */
  --t-h1: clamp(2.375rem, 6.4vw, 4.125rem);   /* 38–66px */

  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; padding-bottom: 64px; background: var(--paper); color: var(--carbon); font: 400 var(--t-body)/1.6 var(--f-body); font-feature-settings: "tnum" 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; color: var(--carbon); font-family: var(--f-head); font-stretch: 112%; font-weight: 800; letter-spacing: -.025em; line-height: 1.08; text-wrap: balance; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -.015em; }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--carbon); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* ----- Nút ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border: 2px solid transparent; border-radius: 999px; font: 600 1rem/1 var(--f-body); cursor: pointer; transition: background .18s, color .18s, border-color .18s; }
.btn-primary { color: #fff; background: var(--signal); }
.btn-primary:hover { background: var(--signal-hover); }
.btn-ghost { border-color: var(--carbon); color: var(--carbon); }
.btn-ghost:hover { color: #fff; background: var(--carbon); }
.btn-outline { min-height: 46px; border-color: var(--line); color: var(--carbon); background: #fff; }
.btn-outline:hover { border-color: var(--teal); color: #fff; background: var(--teal); }
.btn-block { width: 100%; }

/* ----- Header ----- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246, 248, 247, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: grid; gap: 2px; line-height: 1; }
.brand strong { font: 800 1.5rem/1 var(--f-head); font-stretch: 125%; letter-spacing: -.02em; color: var(--teal); }
.brand small { font-size: .6875rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
.menu-toggle { display: grid; place-content: center; gap: 6px; width: 46px; height: 46px; margin-left: auto; border: 1.5px solid var(--carbon); border-radius: 50%; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--carbon); transition: transform .2s; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.primary-navigation { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; padding: 8px 16px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
.primary-navigation.is-open { display: flex; }
.primary-navigation a { padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 1.125rem; font-weight: 500; }
.primary-navigation a[aria-current="page"], .primary-navigation a:hover { color: var(--teal); }
.header-cta { display: none; }

/* ----- Hero ----- */
.hero { padding-block: 40px 56px; }
.hero-grid { display: grid; gap: 36px; }
.hero h1 { font-size: var(--t-h1); letter-spacing: -.035em; line-height: 1; }
.hero-lede { margin: 22px 0 28px; font-size: var(--t-lead); color: var(--ink-2); }
.hero-actions { display: grid; gap: 12px; }
.hero-media { position: relative; margin: 0; overflow: hidden; border-radius: 28px; background: var(--mist); }
.hero-media::before { content: ""; position: absolute; inset: 0; background: radial-gradient(var(--teal-soft) 1.5px, transparent 1.6px) 0 0 / 14px 14px; opacity: .9; }
.hero-media img { position: relative; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; mix-blend-mode: multiply; }

/* Chọn nhu cầu ngay trong hero */
.use-pick { margin-top: 44px; }
.use-pick-title { margin-bottom: 14px; font: 700 1.0625rem/1.3 var(--f-head); font-stretch: 112%; color: var(--ink-2); }
.use-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.use-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 148px; padding: 18px 16px; border-radius: 20px; color: #fff; background: var(--carbon); transition: background .2s, transform .2s; }
.use-tile:nth-child(2) { background: var(--teal-deep); }
.use-tile:nth-child(3) { background: var(--teal); }
.use-tile:nth-child(4) { background: var(--carbon-2); }
.use-tile:hover { background: var(--signal); color: #fff; transform: translateY(-3px); }
.use-tile strong { font: 800 1.25rem/1.15 var(--f-head); font-stretch: 112%; letter-spacing: -.02em; }
.use-tile span { display: block; margin-top: 6px; font-size: var(--t-small); line-height: 1.4; opacity: .85; }
.use-tile::after { content: ""; align-self: flex-end; width: 34px; height: 34px; margin-top: 12px; border: 1.5px solid currentColor; border-radius: 50%; background: linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat; }

/* ----- Khối chung ----- */
.section { padding-block: 64px; }
.section-white { background: var(--white); }
.section-head { display: grid; gap: 14px; margin-bottom: 32px; }
.section-head p { margin: 0; color: var(--ink-2); font-size: var(--t-lead); }

/* ----- Chọn than ----- */
.finder { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { min-height: 46px; padding: 0 20px; border: 1.5px solid var(--carbon); border-radius: 999px; background: transparent; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; }
.chip:hover { background: var(--teal-soft); }
.chip[aria-pressed="true"] { color: #fff; background: var(--carbon); }
.finder-tip { max-width: none; min-height: 56px; margin-bottom: 28px; padding: 14px 18px; border-radius: 14px; background: var(--teal-soft); color: var(--teal-deep); font-size: 1rem; }
.finder-tip strong { color: var(--carbon); }
.product-grid { display: grid; gap: 16px; }
.product-card { display: flex; flex-direction: column; overflow: hidden; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; transition: border-color .2s; animation: pop .28s ease-out; }
.product-card:hover { border-color: var(--teal); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.product-img { aspect-ratio: 4 / 3; background: var(--mist); }
.product-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.tag { align-self: flex-start; margin-bottom: 10px; padding: 3px 12px; border-radius: 999px; color: #fff; background: var(--teal); font-size: var(--t-small); font-weight: 600; }
.product-card p { color: var(--ink-2); font-size: 1rem; }
.specs { margin: 0 0 18px; border-top: 1.5px solid var(--carbon); font-size: .9375rem; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }
.product-card .btn { margin-top: auto; }
.finder-empty { margin-top: 20px; color: var(--ink-2); }

/* ----- Bảng so sánh ----- */
.table-wrap { overflow-x: auto; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; }
.compare { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 1rem; }
.compare th, .compare td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { color: #fff; background: var(--carbon); font-weight: 600; font-size: .9375rem; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { font: 800 1.125rem/1.3 var(--f-head); font-stretch: 112%; color: var(--teal); }

/* ----- Quy trình ----- */
.steps-layout { display: grid; gap: 32px; align-items: start; }
.steps { display: grid; gap: 0; counter-reset: step; border-top: 1.5px solid var(--carbon); }
.steps li { position: relative; padding: 22px 0 22px 64px; border-bottom: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 16px; font: 800 2.5rem/1 var(--f-head); font-stretch: 125%; color: var(--teal); }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 1rem; }
.steps-media { margin: 0; overflow: hidden; border-radius: 28px; }
.steps-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ----- Báo giá ----- */
.quote { color: #fff; background: var(--carbon); }
.quote h2 { color: #fff; }
.quote-layout { display: grid; gap: 32px; }
.quote-intro p { margin-top: 16px; color: #b9c6c8; font-size: var(--t-lead); }
.quote-contacts { display: grid; gap: 4px; margin-top: 24px; }
.quote-contacts a { display: block; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-weight: 500; word-break: break-word; }
.quote-contacts a:hover { color: #fff; border-bottom-color: #fff; }
.quote-form { display: grid; gap: 16px; padding: 24px; border-radius: 24px; color: var(--carbon); background: var(--paper); }
.field { display: grid; gap: 6px; }
.field label { font-size: .9375rem; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.form-note { margin: 0; min-height: 20px; font-size: var(--t-small); color: var(--teal); }

/* ----- FAQ ----- */
.faq { max-width: 860px; border-top: 1.5px solid var(--carbon); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 20px 48px 20px 0; font: 700 1.125rem/1.35 var(--f-head); font-stretch: 108%; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-52%); font: 400 1.75rem/1 var(--f-body); color: var(--teal); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 20px; margin: 0; color: var(--ink-2); }

/* ----- Footer ----- */
.site-footer { color: #b9c6c8; background: #0a0f11; }
.footer-main { display: grid; gap: 32px; padding-block: 56px 32px; }
.site-footer .brand strong { color: #fff; }
.site-footer .brand small { color: #8aa1a4; }
.footer-main p { margin-top: 14px; font-size: 1rem; }
.footer-col { display: grid; align-content: start; gap: 10px; }
.footer-col h2 { margin-bottom: 6px; font: 700 1rem/1.2 var(--f-head); font-stretch: 112%; letter-spacing: 0; color: #fff; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-phone { color: #fff; font: 800 1.75rem/1.1 var(--f-head); font-stretch: 112%; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-block: 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: var(--t-small); color: #7d9094; }

/* ----- Thanh liên hệ nhanh ----- */
.cta-bar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr 1.3fr; background: var(--signal); }
.cta-bar a { display: grid; place-items: center; min-height: 58px; padding: 6px; color: #fff; font-size: 1rem; font-weight: 600; }
.cta-bar a + a { border-left: 1px solid rgba(255, 255, 255, .35); }
.cta-bar a:hover { background: var(--signal-hover); }
.cta-bar a.cta-main { background: var(--signal-hover); }


/* ----- Thanh tiện ích phía trên (hotline, email, địa chỉ) ----- */
.utility-bar { display: none; color: #cfdadc; background: var(--carbon); font-size: var(--t-small); }
.utility-inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 8px; }
.utility-links { display: flex; gap: 24px; margin-left: auto; }
.utility-links a:hover { color: #fff; text-decoration: underline; }
.price-note { margin: -6px 0 14px; font-size: var(--t-small); font-weight: 600; color: var(--teal); }

/* ----- Khối uy tín (hiện khi config có dữ liệu) ----- */
.stats { color: #fff; background: var(--teal-deep); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 16px; padding-block: 44px; }
.stats-grid strong { display: block; font: 800 clamp(2.25rem, 6vw, 3.5rem)/1 var(--f-head); font-stretch: 125%; letter-spacing: -.03em; }
.stats-grid span { display: block; margin-top: 6px; color: #c5dcdc; font-size: 1rem; }
.cert-grid, .partner-grid, .quote-grid, .article-grid { display: grid; gap: 16px; }
.cert-grid, .partner-grid { grid-template-columns: repeat(2, 1fr); }
.cert-grid li { padding: 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; }
.cert-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; margin-bottom: 10px; border-radius: 4px; }
.cert-grid span { font-size: .9375rem; font-weight: 600; }
.partner-grid li { display: grid; place-items: center; min-height: 96px; padding: 14px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; font-weight: 600; text-align: center; }
.partner-grid img { max-height: 56px; width: auto; object-fit: contain; }
.quote-grid li { padding: 24px; border-top: 1.5px solid var(--carbon); background: #fff; }
.quote-grid blockquote { margin: 0 0 16px; font: 600 1.125rem/1.5 var(--f-body); }
.quote-grid p { margin: 0; color: var(--ink-2); font-size: var(--t-small); }
.article-grid li { overflow: hidden; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; }
.article-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-grid div { padding: 18px; }
.article-grid time { color: var(--teal); font-size: var(--t-small); font-weight: 600; }
.article-grid h3 { margin: 6px 0 8px; }
.article-grid h3 a:hover { color: var(--teal); }
.article-grid p { margin: 0; color: var(--ink-2); font-size: 1rem; }

/* ===== Tablet ===== */
@media (min-width: 640px) {
  .hero-actions { display: flex; flex-wrap: wrap; }
  .use-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1.4fr 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .cert-grid { grid-template-columns: repeat(4, 1fr); }
  .partner-grid { grid-template-columns: repeat(4, 1fr); }
  .quote-grid, .article-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Desktop ===== */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .utility-bar { display: block; }
  .partner-grid { grid-template-columns: repeat(6, 1fr); }
  .section { padding-block: 104px; }
  .menu-toggle { display: none; }
  .header-inner { min-height: 80px; }
  .primary-navigation { position: static; display: flex; flex-direction: row; gap: 30px; margin-left: auto; padding: 0; border: 0; background: transparent; }
  .primary-navigation a { padding: 6px 0; border: 0; font-size: 1rem; }
  .header-cta { display: inline-flex; min-height: 46px; padding-inline: 22px; }
  .hero { padding-block: 72px 88px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 56px; }
  .use-pick { margin-top: 64px; }
  .use-tile { min-height: 176px; padding: 22px 20px; }
  .section-head { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; margin-bottom: 44px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .steps-layout { grid-template-columns: 1.1fr .9fr; gap: 72px; }
  .quote-layout { grid-template-columns: .9fr 1.1fr; align-items: center; gap: 80px; }
  .quote-form { grid-template-columns: 1fr 1fr; padding: 36px; }
  .field-full { grid-column: 1 / -1; }
  .cta-bar { left: auto; right: 24px; bottom: 24px; display: grid; grid-template-columns: 1fr; gap: 8px; width: 176px; background: transparent; }
  .cta-bar a { min-height: 48px; border-radius: 999px; background: var(--signal); box-shadow: 0 8px 24px rgba(215, 38, 30, .35); }
  .cta-bar a.cta-main { background: var(--signal-hover); }
  .cta-bar a + a { border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Country flags in the upper-right utility bar. */
.country-flags { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-shrink:0; margin-left:auto; margin-right:0; order:3; }
.country-flags svg { display:block; width:30px; height:20px; overflow:hidden; border-radius:2px; box-shadow:0 0 0 1px rgba(255,255,255,.3); }
.utility-inner { align-items:center; flex-wrap:wrap; }
.utility-bar { display:block; }
@media (max-width:959px) {
  .utility-inner > :not(.country-flags) { display:none; }
  .utility-inner { padding-block:8px; }
}
/* Accessible links to full-page Japanese translation and Vietnamese original. */
.country-flags .country-language { display:inline-flex; align-items:center; justify-content:center; min-width:36px; min-height:32px; border-radius:4px; }
.country-flags .country-language:hover { background:rgba(255,255,255,.18); }
.country-flags .country-language:focus-visible { outline:2px solid #fff; outline-offset:2px; }