/* TÔI ĐI — trang giới thiệu & chính sách. Màu thương hiệu khớp app (lib/ui/theme.dart). */
:root {
  --lime: #c6f24e;
  --lime-deep: #5b7a00;
  --ink: #14161a;
  --paper: #f5f4ef;
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #ecebe4;
  --text: #14161a;
  --muted: #5d6168;
  --line: #dcdad2;
  --link: #3d5a00;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(20, 22, 26, 0.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1013;
    --surface: #1a1d22;
    --surface-2: #23272d;
    --text: #f1f2f3;
    --muted: #a3a8b0;
    --line: #2c3037;
    --link: #c6f24e;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1013;
  --surface: #1a1d22;
  --surface-2: #23272d;
  --text: #f1f2f3;
  --muted: #a3a8b0;
  --line: #2c3037;
  --link: #c6f24e;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-top: 1.6em; }
h3 { font-size: 1.1rem; font-weight: 700; margin-top: 1.4em; }
p, li { max-width: 72ch; }

/* ngôn ngữ: chỉ hiện phần đúng ngôn ngữ đang chọn */
html[data-lang="vi"] [data-l="en"], html[data-lang="en"] [data-l="vi"] { display: none !important; }

.wrap { width: min(1100px, 100% - 32px); margin: 0 auto; }
.narrow { width: min(760px, 100% - 32px); margin: 0 auto; }

/* thanh trên */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); }
.toggles { display: flex; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 6px 12px; border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.chip:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

/* phần mở đầu */
.hero { padding: 56px 0 24px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero > *, .grid > *, .dl > * { min-width: 0; } /* ảnh lớn không được nong cột lưới -> tràn ngang trên điện thoại */
.hero .lead { font-size: 1.2rem; color: var(--muted); }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 26px; }
.badge { background: var(--surface-2); border-radius: 999px; padding: 6px 12px; font-size: .9rem; font-weight: 600; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 14px 22px;
  font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
}
.btn.primary { background: var(--lime); color: var(--ink); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.phones { position: relative; display: flex; justify-content: center; gap: 16px; }
.phones img { width: 46%; border-radius: 26px; box-shadow: var(--shadow); }
.phones { padding-bottom: 36px; }
.phones img:nth-child(2) { transform: translateY(36px); }
.theme-shot-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-shot-light { display: none; } :root:not([data-theme="light"]) .theme-shot-dark { display: block; } }
:root[data-theme="dark"] .theme-shot-light { display: none; }
:root[data-theme="dark"] .theme-shot-dark { display: block; }

.notice {
  background: var(--lime); color: var(--ink); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; font-size: .95rem;
}
.notice a { color: var(--ink); font-weight: 700; }

/* thẻ tính năng */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 20px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card .ico { font-size: 1.6rem; }
.card h3 { margin-top: .4em; }
.card p { color: var(--muted); margin: 0; }

.shots { display: flex; gap: 14px; overflow-x: auto; padding: 8px 0 20px; scroll-snap-type: x mandatory; }
.shots img { width: 220px; flex: none; border-radius: 18px; scroll-snap-align: start; box-shadow: var(--shadow); }

/* tải về */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.dl .card { display: flex; flex-direction: column; gap: 8px; }
.dl .card .soon { color: var(--muted); font-size: .9rem; }
.small { font-size: .88rem; color: var(--muted); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85em; word-break: break-all; }

/* văn bản chính sách */
.doc { padding: 40px 0 60px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .95rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface-2); }
.table-scroll { overflow-x: auto; }
.updated { color: var(--muted); }

/* biểu mẫu */
form { display: grid; gap: 12px; max-width: 520px; }
label { font-weight: 600; display: grid; gap: 6px; }
input, textarea {
  font: inherit; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
}
.msg { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.msg.err { background: #ffe1d6; color: #7a2100; }
.danger { background: #d93a2b; color: #fff; }

footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 28px 0 40px; color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; gap: 16px 28px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .phones img { width: 44%; }
  .nav { order: 3; width: 100%; margin: 0 0 8px; }
  .toggles { margin-left: auto; }
}
