/* Dang Jack Qbit — Nordic minimal. Token màu ở :root, dark mode theo hệ thống. */
:root {
  --bg: #F5F3EE;
  --bg-alt: #ECE9E1;
  --surface: #FFFFFF;
  --ink: #15171A;
  --ink-2: #4A4F57;
  --ink-3: #7D828A;
  --line: #DAD6CC;
  --accent: #2448C9;        /* xanh hồ nước Bắc Âu */
  --accent-ink: #FFFFFF;
  --accent-soft: #DCE3FA;
  --dark-bg: #14171C;
  --dark-ink: #F2F0EB;
  --dark-ink-2: #A9AEB6;
  --phone-frame: #1B1D21;
  --shadow: 0 30px 60px -30px rgba(20, 23, 28, .35), 0 12px 24px -16px rgba(20, 23, 28, .18);
  --radius: 18px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101214;
    --bg-alt: #16191C;
    --surface: #1C1F23;
    --ink: #F2F0EB;
    --ink-2: #B4B8BE;
    --ink-3: #868B93;
    --line: #2B2F35;
    --accent: #7F9BFF;
    --accent-ink: #0E1220;
    --accent-soft: #1E2847;
    --dark-bg: #0A0B0D;
    --phone-frame: #000000;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), 0 12px 24px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.brand b { font-weight: 700; }
.brand-mark { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark circle { fill: var(--accent); stroke: none; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; transition: color .15s; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button {
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  border: 0; background: none; color: var(--ink-3); padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
html[data-lang="vi"] .lang [data-set-lang="vi"],
html[data-lang="en"] .lang [data-set-lang="en"] { background: var(--ink); color: var(--bg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 16px; font-weight: 600;
  padding: 14px 24px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--bg); text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-small { padding: 8px 16px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 10vw, 120px) 0 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); margin-bottom: 28px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-title { font-size: clamp(44px, 8.4vw, 112px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.0; }
.hero-title .muted { color: var(--ink-3); }
.hero-bottom { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-top: clamp(32px, 5vw, 56px); }
.lead { font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-2); max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

.hero-shots {
  position: relative; display: flex; justify-content: center; align-items: flex-end;
  gap: clamp(12px, 3vw, 40px);
  margin-top: clamp(56px, 8vw, 96px);
  height: clamp(300px, 46vw, 560px);
  overflow: hidden;
}
.hero-shots::after { /* mờ dần đáy để ảnh “chìm” vào dải số liệu */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.hero-shots .phone { width: clamp(150px, 22vw, 270px); flex: none; }
.hero-shots .phone-a { transform: translateY(14%); }
.hero-shots .phone-b { transform: translateY(2%); }
.hero-shots .phone-c { transform: translateY(14%); }

/* ---------- Khung thiết bị ---------- */
.phone {
  margin: 0; aspect-ratio: 390 / 844;
  border-radius: clamp(22px, 3.2vw, 40px);
  background: var(--phone-frame);
  padding: clamp(5px, .7vw, 9px);
  box-shadow: var(--shadow);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: calc(clamp(22px, 3.2vw, 40px) - clamp(5px, .7vw, 9px)); background: var(--bg-alt); }
.browser {
  margin: 0; border-radius: 12px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.browser::before { /* thanh tiêu đề trình duyệt 3 chấm */
  content: ""; display: block; height: 28px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 16px 14px, #E5655B 4px, transparent 4.5px),
    radial-gradient(circle at 32px 14px, #E8B64C 4px, transparent 4.5px),
    radial-gradient(circle at 48px 14px, #5DBB63 4px, transparent 4.5px),
    var(--bg-alt);
}
.browser img { width: 100%; aspect-ratio: 1440 / 900; object-fit: cover; object-position: top; background: var(--bg-alt); }

/* ---------- Số liệu ---------- */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; z-index: 1; background: var(--bg); }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 32px 24px 32px 0; display: flex; flex-direction: column; gap: 6px; }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact b { font-size: clamp(34px, 4vw, 52px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.fact span { color: var(--ink-2); font-size: 15px; }

/* ---------- Section chung ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 820px; margin-bottom: clamp(48px, 6vw, 80px); }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.section h2 { font-size: clamp(34px, 5vw, 64px); letter-spacing: -0.035em; }
.section-lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); margin-top: 22px; max-width: 680px; }
.num { font-size: 13px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: .06em; }

/* ---------- Dịch vụ ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.service { padding: 40px 40px 44px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.service:nth-child(even) { padding-left: 40px; padding-right: 0; border-left: 1px solid var(--line); }
.service h3 { font-size: clamp(22px, 2.2vw, 28px); }
.service p { color: var(--ink-2); }
.tags { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 13px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }

/* ---------- Sản phẩm ---------- */
.product {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px);
  align-items: center; padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--line);
}
.product:last-child { padding-bottom: 0; }
.product-flip .product-text { order: 2; }
.product-label { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-3); margin-bottom: 18px; flex-wrap: wrap; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill-quiet { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.product h3 { font-size: clamp(32px, 3.6vw, 46px); letter-spacing: -0.035em; }
.product-lead { color: var(--ink-2); margin-top: 16px; font-size: 18px; }
.checks { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; font-size: 16px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 14px; height: 8px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translateY(-3px);
}
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }
.link-arrow::after { content: " →"; transition: margin .15s; }
.link-arrow:hover::after { margin-left: 4px; }

.product-media { position: relative; }
.media-mixed { padding: 0 8% 14% 0; }
.media-mixed .phone-float { position: absolute; right: 0; bottom: 0; width: 26%; }
.product-flip .media-mixed { padding: 0 0 14% 8%; }
.product-flip .media-mixed .phone-float { right: auto; left: 0; }
.media-phones { display: flex; justify-content: center; gap: clamp(16px, 3vw, 36px); }
.media-phones .phone { width: min(44%, 270px); }
.media-phones .phone-raise { transform: translateY(-8%); }

/* ---------- Quy trình ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.step { padding: 24px 24px 0 0; display: flex; flex-direction: column; gap: 10px; }
.step h3 { font-size: 21px; }
.step p { color: var(--ink-2); font-size: 15px; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(56px, 7vw, 96px); }
.principle { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.principle h3 { font-size: 22px; margin-bottom: 10px; }
.principle p { color: var(--ink-2); font-size: 15px; }

/* ---------- Đội ngũ (nền tối) ---------- */
.section-dark { background: var(--dark-bg); color: var(--dark-ink); }
.section-dark .section-lead { color: var(--dark-ink-2); }
.section-dark .kicker { color: #9DB2FF; }
.team { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.cities { display: grid; gap: 16px; }
.city {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 20px;
  padding: 28px 32px; border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius);
  background: rgba(255, 255, 255, .03);
}
.city-name { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.city-country { grid-row: 2; color: var(--dark-ink-2); font-size: 15px; }
.clock { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: clamp(32px, 3.6vw, 44px); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ---------- Liên hệ ---------- */
.contact { text-align: left; }
.contact-title { font-size: clamp(40px, 7vw, 96px) !important; letter-spacing: -0.045em !important; max-width: 14ch; }
.contact-mail {
  display: inline-block; margin: 40px 0 32px; font-size: clamp(22px, 3.4vw, 40px); font-weight: 500;
  letter-spacing: -0.02em; text-decoration: none; color: var(--accent);
  border-bottom: 2px solid currentColor; overflow-wrap: anywhere;
}
.contact .hero-cta { justify-content: flex-start; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--ink-3); }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-row a { text-decoration: none; }
.footer-row a:hover { color: var(--ink); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px;
  transition: opacity .2s, transform .2s; z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Hiệu ứng xuất hiện ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero-shots.reveal { transform: translateY(40px); transition-duration: 1s; }
.js .hero-shots.reveal.in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .hero-shots.reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; border-top: 0; }
  .step { border-top: 1px solid var(--ink); }
  .step:nth-child(odd) { padding-right: 24px; }
  .principles { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .hero-bottom { grid-template-columns: 1fr; gap: 28px; }
  .hero-cta { justify-content: flex-start; }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .services { grid-template-columns: 1fr; }
  .service, .service:nth-child(even) { padding: 32px 0; border-left: 0; }
  .product { grid-template-columns: 1fr; }
  .product-flip .product-text { order: 0; }
  .product-media { order: 2; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .header-row { gap: 12px; height: 60px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 24px; height: 24px; }
  .header-actions .btn-small { display: none; }
  .hero-shots { gap: 10px; height: 340px; }
  .hero-shots .phone { width: 40vw; }
  .hero-shots .phone-a, .hero-shots .phone-c { width: 32vw; }
  .fact { padding: 24px 12px 24px 0; }
  .fact + .fact { padding-left: 12px; }
  .fact:nth-child(3) { padding-left: 0; }
  .steps { grid-template-columns: 1fr; }
  .step, .step:nth-child(odd) { padding-right: 0; }
  .principle { padding: 24px; }
  .city { padding: 22px 20px; }
  .city-name { font-size: 22px; }
  .btn { padding: 13px 20px; }
}

/* ---------- Built with Claude ---------- */
.section-ai .kicker { color: var(--accent); }
.ai-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ai-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column; gap: 12px;
}
.ai-card h3 { font-size: 23px; }
.ai-card p { color: var(--ink-2); font-size: 16px; }
.ai-card .ai-status { margin-bottom: 6px; }
.ai-card-wide { grid-column: 1 / -1; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ai-card-wide p { color: color-mix(in srgb, var(--bg) 72%, var(--ink)); max-width: 760px; }
.ai-card-wide .pill-quiet { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, var(--ink)); }
.ai-points { list-style: none; padding: 0; margin: clamp(40px, 5vw, 64px) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.ai-points li { padding: 24px 24px 0 0; display: flex; flex-direction: column; gap: 6px; }
.ai-points li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.ai-points b { font-weight: 600; font-size: 17px; }
.ai-points span { color: var(--ink-2); font-size: 15px; }
@media (max-width: 1000px) {
  .ai-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .ai-points { grid-template-columns: 1fr; }
  .ai-points li, .ai-points li + li { padding: 20px 0; border-left: 0; }
  .ai-points li + li { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .ai-grid { grid-template-columns: 1fr; }
  .ai-card { padding: 24px; }
}
