/* AT-Navi — trang giới thiệu. Chủ đề tối vì app dùng lúc lái xe. */

:root {
  --bg:      #080B12;
  --bg-2:    #0D1421;
  --card:    #111A28;
  --line:    rgba(255,255,255,.09);
  --fg:      #EAF0FA;
  --muted:   #93A2B8;
  --accent:  #FF7A29;
  --accent-2:#4FA8FF;
  --ok:      #34D399;
  --radius:  16px;
  --wrap:    1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans",
    "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "Noto Sans Thai",
    "Noto Sans Devanagari", "Noto Sans Myanmar", "Padauk", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

/* ---------- header ---------- */

.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8,11,18,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
.brand img { width: 30px; height: 30px; }

.nav { display: flex; gap: 22px; margin-left: 12px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--fg); }

/* Chọn ngôn ngữ + nút tải luôn nằm sát mép phải, tách khỏi cụm menu. */
.hdr-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* dropdown chọn ngôn ngữ — dùng <select> thật để chạy tốt trên điện thoại */
.lang-pick { position: relative; display: flex; align-items: center; }
.lang-pick svg { position: absolute; left: 9px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.lang-pick select {
  appearance: none;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 30px 8px 31px;
  font: inherit; font-size: 15px;
  cursor: pointer;
}
.lang-pick::after {
  content: ""; position: absolute; right: 12px;
  width: 7px; height: 7px; pointer-events: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}
.lang-pick select option { background: #0D1421; color: var(--fg); }

/* ---------- nút ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 650; font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #1A0B00; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { background: var(--card); }
.btn-sm { padding: 8px 15px; font-size: 15px; border-radius: 10px; }
.btn svg { width: 19px; height: 19px; }

/* ---------- khối chung ---------- */

section { padding: 88px 0; }
.sec-head { max-width: 720px; margin-bottom: 44px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 14px; }
h1 { font-size: clamp(34px, 5.4vw, 56px); }
h2 { font-size: clamp(27px, 3.6vw, 38px); }
h3 { font-size: 19px; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 19px; }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(255,122,41,.32);
  background: rgba(255,122,41,.09);
  border-radius: 999px; padding: 5px 13px;
  margin-bottom: 22px;
}

/* ---------- hero ---------- */

/**
 * Hero chiếm trọn màn hình đầu tiên.
 *
 * Trừ 62px chiều cao header dính ở trên, không thì tổng lại thành 100vh + 62px
 * và đáy hero bị đẩy khuất.
 *
 * Dùng `svh` chứ không phải `vh`: trên điện thoại, `vh` tính theo chiều cao khi
 * thanh địa chỉ ĐÃ ẩn, nên lúc mới vào trang (thanh còn hiện) phần dưới hero bị
 * cắt mất. `svh` lấy trường hợp nhỏ nhất nên luôn vừa. Dòng `vh` phía trên để
 * dự phòng cho trình duyệt cũ chưa biết `svh`.
 *
 * `min-height` chứ không phải `height`: máy màn hình thấp thì hero tự cao thêm
 * cho đủ chỗ, không đè chữ lên nhau.
 */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 62px);
  min-height: calc(100svh - 62px);
  padding: 40px 0;
}
.hero::before {
  content: ""; position: absolute; inset: -30% 0 auto -10%;
  height: 720px; pointer-events: none;
  background:
    radial-gradient(600px 340px at 22% 32%, rgba(255,122,41,.20), transparent 70%),
    radial-gradient(700px 380px at 78% 18%, rgba(79,168,255,.16), transparent 70%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 12px; }
.hero-meta { font-size: 14.5px; color: var(--muted); }

/* Ảnh hero là ảnh chụp cả cảnh trong xe, không phải khung điện thoại.
   Tỉ lệ 800/934 là tỉ lệ ảnh SAU KHI đã cắt bỏ 22% phía trên vốn trong suốt —
   để nguyên thì khung hụt mất một mảng ở đỉnh. */
.hero-art {
  justify-self: center;
  width: min(460px, 86vw);
  aspect-ratio: 800 / 934;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #0B1220;
  box-shadow: 0 40px 90px rgba(0,0,0,.55);
  overflow: hidden;
  position: relative;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- lưới thẻ ---------- */

.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

.ico {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(255,122,41,.12); color: var(--accent);
}
.ico svg { width: 22px; height: 22px; }
.card.blue .ico { background: rgba(79,168,255,.12); color: var(--accent-2); }

/* ---------- ảnh chụp màn hình ---------- */

.shots { background: var(--bg-2); border-block: 1px solid var(--line); }
.shot { text-align: center; }
.shot .frame {
  border-radius: 26px; border: 1px solid var(--line);
  background: linear-gradient(170deg, #16202F, #0B1220);
  aspect-ratio: 9 / 17;
  overflow: hidden; margin-bottom: 14px;
  position: relative;
}
.shot .frame img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { color: var(--muted); font-size: 15px; }

/* ảnh chưa tạo thì hiện khung có tên file, không hiện icon vỡ */
.frame.noimg img, .step-img.noimg img, .hero-art.noimg img { display: none; }
.noimg::after {
  content: attr(data-file);
  position: absolute; inset: 0;
  display: grid; place-items: center; padding: 16px;
  color: rgba(147,162,184,.55); font-size: 13px; text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 12px, transparent 12px 24px);
}
.step-img.noimg { position: relative; }

/* ---------- ngôn ngữ ---------- */

.lang-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.lang-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; padding: 16px;
}
.lang-card b { display: block; font-size: 17px; font-weight: 650; }
.tag {
  display: inline-block; margin-top: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  border-radius: 999px; padding: 3px 9px;
  color: var(--muted); background: rgba(255,255,255,.05);
}
.tag.on { color: var(--ok); background: rgba(52,211,153,.12); }

/* ---------- ba bước ---------- */

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step .step-img {
  aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
  margin-bottom: 16px; position: relative;
}
.step .step-img img { width: 100%; height: 100%; object-fit: cover; }
.step h3::before {
  counter-increment: s; content: counter(s);
  display: inline-grid; place-items: center;
  width: 25px; height: 25px; margin-right: 10px;
  border-radius: 7px; font-size: 14px;
  background: var(--accent); color: #1A0B00;
}
.step p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* ---------- an toàn ---------- */

.safety { background: var(--bg-2); border-block: 1px solid var(--line); }
.safety-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 860px; }
.safety-list li {
  display: flex; gap: 14px; align-items: flex-start;
  color: var(--muted); font-size: 16px;
}
.safety-list svg { flex: none; width: 21px; height: 21px; color: var(--accent); margin-top: 3px; }

/* ---------- tải về ---------- */

.dl-box {
  background: linear-gradient(160deg, rgba(255,122,41,.13), rgba(79,168,255,.08)), var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 46px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
}
.req { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.req li { display: flex; gap: 10px; color: var(--muted); font-size: 15.5px; }
.req li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.warn {
  margin-top: 18px; font-size: 14px; color: var(--muted);
  border-left: 3px solid var(--accent); padding-left: 12px;
}

/* ---------- chân trang ---------- */

footer { border-top: 1px solid var(--line); padding: 42px 0; color: var(--muted); font-size: 14.5px; }
footer .wrap { display: grid; gap: 10px; }
footer .brand { color: var(--fg); margin-bottom: 6px; }
footer .by { color: var(--fg); }
footer .by a { color: var(--accent-2); text-decoration: none; margin-left: 6px; }
footer .by a:hover { text-decoration: underline; }

/* ---------- màn hình nhỏ ---------- */

@media (max-width: 940px) {
  section { padding: 64px 0; }
  .hero { padding: 20px 0 28px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 18px; }
  /* Xếp dọc thì ảnh phải nhường chỗ cho chữ, không thì hero cao quá một màn hình. */
  .hero-art { width: auto; height: min(28svh, 260px); }
  .nav { display: none; }
  .g3, .g2, .steps { grid-template-columns: 1fr; }
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-box { grid-template-columns: 1fr; padding: 30px; }
  .shots .g2 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .shots .g2 { grid-template-columns: 1fr; }

  /* Header vẫn giữ đủ tên AT-Navi + chọn ngôn ngữ + nút tải trên điện thoại.
     Ba thứ đó không tự vừa 360px, nên phải bóp lại từng cái. */
  .hdr .wrap { gap: 8px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand img { width: 26px; height: 26px; }
  .lang-pick svg { left: 8px; width: 15px; height: 15px; }
  .lang-pick select {
    width: 112px; min-width: 0;      /* không thì select rộng bằng tên ngôn ngữ dài nhất */
    padding: 7px 24px 7px 27px;
    font-size: 14px;
    text-overflow: ellipsis;
  }
  .btn-sm { padding: 8px 12px; font-size: 14px; }

  /* Hero vừa đúng một màn hình: chữ và ảnh cùng nhỏ lại, nội dung giữ nguyên. */
  .hero .eyebrow { font-size: 12px; margin-bottom: 16px; }
  .hero h1 { font-size: 28px; }
  .hero .lead { font-size: 15px; line-height: 1.5; }
  .hero-cta { margin: 20px 0 10px; }
  .hero .btn { padding: 11px 18px; font-size: 15px; }
  .hero { padding: 16px 0 20px; }
  .hero .wrap { gap: 14px; }
  .hero-art { height: min(26svh, 215px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
