/* Màu lấy từ docs/gplx-redesign/tokens/design_tokens.json. Font hệ thống —
   không tải font ngoài để trang pháp lý không gửi IP người đọc cho bên thứ ba. */
:root {
  --ground: #F4F6F9;
  --surface: #FFFFFF;
  --ink: #0D1B2E;
  --ink-muted: #4A5568;
  --line: #E2E7EE;
  --navy: #0B2A6B;
  --navy-muted: #C9D6F2;
  --primary: #1747B8;
  --primary-tint: #EAF0FC;
  --on-primary: #FFFFFF;
  --signal: #F6C21C;
  --on-signal: #0D1B2E;
  --signal-tint: #FFF6D6;
  --signal-ink: #7A5900;
  --radius-card: 16px;
  --radius-button: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0A1220;
    --surface: #111A2B;
    --ink: #E8EDF5;
    --ink-muted: #A3AEC2;
    --line: #22304A;
    --navy: #15264A;
    --primary: #8FB0FF;
    --primary-tint: #1C2B47;
    --on-primary: #0A1220;
    --signal-tint: #2E2714;
    --signal-ink: #F2C94C;
    color-scheme: dark;
  }
}

/* Song ngữ: mỗi khối nội dung có class .vi hoặc .en; lang.js đặt data-lang. */
html[data-lang="vi"] .en,
html[data-lang="en"] .vi { display: none !important; }

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.6 "Be Vietnam Pro", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--primary); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: #fff;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--navy-muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.lang-toggle {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font: 700 13px/1.4 inherit;
  font-family: inherit;
  cursor: pointer;
  min-height: 32px;
}
.lang-toggle:hover { background: rgba(255, 255, 255, 0.12); }

/* ── Hero (landing) ─────────────────────────────────── */
/* Cố định đúng màu nền ảnh (cả dark mode) để không lộ khung quanh điện thoại. */
.hero { background: #0A2A69; color: #fff; padding: 48px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: end; }
.hero-text { align-self: center; padding-bottom: 56px; }
.hero-icon { display: block; width: 72px; height: 72px; border-radius: 18px; margin-bottom: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.hero h1 { font-size: 40px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; }
.hero p { margin: 0 0 24px; color: var(--navy-muted); font-size: 18px; }
.hero .hero-note { margin: 16px 0 0; font-size: 14px; }
/* Ảnh điện thoại cắt ở mép dưới, nền ảnh (#0A2A69) trùng nền hero. */
.hero-shot img { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; }
.badge-new {
  display: inline-block;
  background: var(--signal);
  color: var(--on-signal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-button);
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { background: var(--primary-tint); }
.btn svg { width: 20px; height: 20px; }

/* Nút tải 2 store. Nút của hệ điều hành đang dùng lên trước (platform.js);
   Play còn "sắp có" thì để App Store (tải được) đứng đầu. */
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .store-buttons { justify-content: center; }
.btn-label { display: flex; flex-direction: column; line-height: 1.15; font-size: 17px; text-align: left; }
.btn-label small { font-size: 11px; font-weight: 600; opacity: 0.8; }
html[data-os="android"]:not([data-play="soon"]) .store-android { order: -1; }
.btn-soon { background: transparent; color: #fff; border: 1px dashed rgba(255, 255, 255, 0.5); cursor: default; }
.btn-soon:hover { background: transparent; }
/* Google Play còn chờ duyệt: data-play="soon" trên <html>. Lên store thì xoá
   attribute đó (xem website/README.md). */
html[data-play="soon"] .play-live,
html:not([data-play="soon"]) .play-soon { display: none !important; }

/* ── Số liệu (landing) ──────────────────────────────── */
.stats { background: var(--surface); border-bottom: 1px solid var(--line); padding: 24px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stat strong { display: block; font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; color: var(--primary); }
.stat span { font-size: 14px; color: var(--ink-muted); }

.section-title.section-gap { margin-top: 40px; }
.chips { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { margin: 0; min-width: 44px; text-align: center; padding: 6px 12px; border-radius: 999px; background: var(--primary-tint); color: var(--primary); font-weight: 700; font-size: 15px; }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.platform-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-muted); }

/* ── Showcase (landing) ─────────────────────────────── */
.showcase { padding: 56px 0 8px; }
.show-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 56px; }
.show-row.reverse .show-shot { order: 2; }
/* Ảnh tự làm "thẻ": lấp đầy ô và bo góc, để bóng đổ của khung máy trong ảnh
   design không bị cắt cụt thành đường viền giữa ô. */
.show-shot {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #F3F5F8;
}
.show-shot.navy { background: #0A2A69; border-color: transparent; }
.show-shot img { display: block; width: 100%; height: auto; }
/* Hero: nền ảnh trùng nền hero; làm mờ mép trái/phải/trên cho liền hẳn. */
.hero-shot img {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent),
    linear-gradient(to bottom, transparent, #000 2.5%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent),
    linear-gradient(to bottom, transparent, #000 2.5%);
  mask-composite: intersect;
}
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }
.show-text h3 { font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 12px; }
.show-text p { margin: 0; color: var(--ink-muted); font-size: 17px; }

/* ── CTA (landing) ──────────────────────────────────── */
.cta { background: var(--navy); color: #fff; text-align: center; padding: 48px 0 56px; }
.cta h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.02em; }
.cta p { margin: 0 0 24px; color: var(--navy-muted); }

/* ── Main ───────────────────────────────────────────── */
main { padding: 32px 0 48px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
}
.card + .card { margin-top: 16px; }

h1.page-title { font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.meta { color: var(--ink-muted); font-size: 14px; margin: 0 0 24px; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 800; margin: 32px 0 8px; }
h2:first-child { margin-top: 0; }
h3 { font-size: 17px; font-weight: 700; margin: 20px 0 4px; }
p, ul, ol { margin: 0 0 12px; }
li + li { margin-top: 4px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; }
.feature .ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--primary-tint); color: var(--primary);
  margin-bottom: 12px;
}
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 4px; }
.feature p { margin: 0; color: var(--ink-muted); font-size: 15px; }

.section-title { font-size: 22px; font-weight: 800; margin: 8px 0 16px; letter-spacing: -0.01em; }

.note {
  background: var(--signal-tint);
  color: var(--ink);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
}
.note strong { color: var(--signal-ink); }

.table-scroll { overflow-x: auto; margin: 0 0 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 0; }

.contact-line { font-size: 18px; font-weight: 700; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--ink-muted); font-size: 14px; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.site-footer a { color: var(--ink-muted); }
.site-footer p { margin: 4px 0 0; }

@media (max-width: 760px) {
  .hero-grid, .show-row { grid-template-columns: 1fr; gap: 24px; }
  .hero-text { padding-bottom: 0; }
  .hero-shot img { max-width: 280px; }
  .show-row { margin-bottom: 40px; }
  .show-row.reverse .show-shot { order: 0; }
  .show-shot { max-width: 340px; }
}

@media (max-width: 560px) {
  .hero { padding-top: 28px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .store-buttons .btn { flex: 1 1 100%; justify-content: center; }
  .hero h1 { font-size: 30px; }
  .hero-icon { width: 60px; height: 60px; border-radius: 15px; }
  .show-text h3 { font-size: 24px; }
  .card { padding: 20px 16px; }
  .nav { margin-left: 0; width: 100%; order: 3; padding-bottom: 10px; }
  .lang-toggle { margin-left: auto; }

  /* Bảng → thẻ xếp dọc để không phải vuốt ngang. */
  table { min-width: 0; }
  thead { display: none; }
  tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  td { display: block; border: 0; padding: 2px 0; }
  td:first-child { font-weight: 700; }
  td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-muted);
  }
}
