/* ==========================================================================
   RESET, TYPOGRAPHY & LƯỚI 12 CỘT CƠ BẢN (BASE STYLES - ĐÃ FIX CHO PC)
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  padding-top: var(--navbar-height);
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
}

/* Hiển thị viền focus rõ ràng cho điều hướng bàn phím (WCAG AA) */
:focus-visible {
  outline: 2.5px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Typography có thứ bậc, giới hạn độ dài dòng dưới 75 ký tự */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

html[lang="zh"] h1,
html[lang="zh"] h2,
html[lang="zh"] h3 {
  letter-spacing: 0;
  line-height: 1.28;
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-xl);
  font-weight: 700;
}

h4 {
  font-size: var(--text-lg);
  font-weight: 700;
}

p {
  color: var(--color-text-muted);
  max-width: 68ch;
}

/* Khung chứa và Lưới 12 cột chuẩn */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: var(--space-20);
  position: relative;
}

.section--alt {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section__header {
  max-width: 720px;
  margin-bottom: var(--space-12);
}

.section__header--center {
  margin-inline: auto;
  text-align: center;
}

.section__header--center p {
  margin-inline: auto;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  background-color: var(--color-primary-soft);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-4);
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__desc {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

/* Hệ thống lưới 12 cột */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-6);
}

/* Lớp tiện ích trợ năng */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tối ưu GPU cho các phần tử chuyển động */
.hero-word,
.mockup-browser,
.mockup-layer,
.card--interactive,
.btn {
  will-change: transform, opacity;
}