:root {
  --ground: #F5F4F0;
  --surface: #FFFFFF;
  --ink: #1C1F1D;
  --ink2: #5C625E;
  --line: #E6E4DE;
  --peach: #F8E6DA;
  --peach-ink: #5C4B42;
  --sage: #DCEADF;
  --sage-ink: #45574B;
  --ok: #2E7D69;
  --night: #101412;
  --night-surface: #171C19;
  --night-text: #EDEFEC;
  --night-muted: #9AA39E;
  --radius: 20px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--ok); }

/* Language switching: show only the active language */
html[lang="vi"] [lang="en"]:not(html),
html[lang="en"] [lang="vi"]:not(html) { display: none !important; }

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

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.nav a { color: var(--ink2); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.lang {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface);
}
.lang button {
  border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600;
  padding: 5px 11px; color: var(--ink2); cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Hero */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; background: var(--sage); color: var(--sage-ink);
  font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 18px; font-weight: 800; }
.lead { font-size: 19px; color: var(--ink2); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--ink); color: var(--surface); padding: 14px 22px; border-radius: 14px; font-weight: 600; font-size: 16px;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn small { display: block; font-size: 11px; font-weight: 500; opacity: .7; line-height: 1.1; }
.btn .t { line-height: 1.15; }
.note { font-size: 14px; color: var(--ink2); margin-top: 14px; }

.phone {
  justify-self: center; width: min(320px, 100%); aspect-ratio: 9 / 18.5;
  background: var(--night); border-radius: 44px; padding: 14px; box-shadow: 0 30px 60px -20px rgba(28,31,29,.35);
}
.screen {
  height: 100%; border-radius: 32px; background: var(--night-surface); color: var(--night-text);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 28px 20px 24px; text-align: center;
}
.screen .mode { font-size: 13px; color: var(--night-muted); }
.screen .timer { font-size: 34px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.screen svg { width: 78%; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; background: #1D2320; padding: 8px 14px; border-radius: 999px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #6CC2A8; transition: background .6s; }
.bar { width: 100%; height: 6px; border-radius: 6px; background: #3C4741; overflow: hidden; }
.bar i { display: block; height: 100%; width: 82%; background: #6CC2A8; border-radius: 6px; }
#brow, #mouth { transition: stroke .6s, fill .6s; }

@media (max-width: 860px) {
  .hero { padding: 32px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .phone { width: min(280px, 100%); }
}

/* Sections */
section { padding: 72px 0; }
.section-title { font-size: clamp(28px, 4vw, 38px); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 12px; font-weight: 700; }
.section-lead { color: var(--ink2); margin: 0 0 40px; max-width: 40em; }

.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card.peach { background: var(--peach); border-color: transparent; color: var(--peach-ink); }
.card.sage { background: var(--sage); border-color: transparent; color: var(--sage-ink); }
.card h3 { margin: 0 0 8px; font-size: 22px; color: var(--ink); }
.card p { margin: 0 0 14px; }
.card ul { margin: 0; padding-left: 20px; }
.card li { margin: 4px 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; opacity: .8; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px; background: var(--ground); display: grid; place-items: center; margin-bottom: 16px;
}
.feature .ico svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 18px; }
.feature p { color: var(--ink2); margin: 0; font-size: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--surface); font-weight: 700; font-size: 15px; margin-bottom: 14px;
}
.steps h3 { margin: 0 0 6px; font-size: 18px; }
.steps p { margin: 0; color: var(--ink2); font-size: 16px; }

.privacy-band { background: var(--night); color: var(--night-text); border-radius: 28px; padding: 48px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.privacy-band .section-title { color: var(--night-text); }
.privacy-band p { color: var(--night-muted); margin: 0; max-width: 38em; }
.privacy-band .btn { background: var(--night-text); color: var(--night); }

.pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.price { font-size: 30px; font-weight: 800; color: var(--ink); margin: 4px 0 12px; }
.price span { font-size: 15px; font-weight: 500; color: var(--ink2); }

@media (max-width: 860px) {
  section { padding: 56px 0; }
  .modes, .features, .steps, .pricing { grid-template-columns: 1fr; }
  .privacy-band { grid-template-columns: 1fr; padding: 32px 24px; }
}

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--ink2); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--ink2); }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 8px; }
.legal .meta { color: var(--ink2); margin: 0 0 32px; font-size: 15px; }
.legal h2 { font-size: 22px; margin: 40px 0 10px; }
.legal h3 { font-size: 18px; margin: 24px 0 6px; }
.legal p, .legal li { color: #2E332F; }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.summary { background: var(--sage); color: var(--sage-ink); border-radius: var(--radius); padding: 22px 26px; margin: 0 0 8px; }
.summary ul { margin: 8px 0 0; }
.summary li { color: var(--sage-ink); }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 600; background: var(--surface); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 24px; margin: 24px 0; font-size: 15px; }
.toc ol { margin: 6px 0 0; padding-left: 20px; }

[id] { scroll-margin-top: 80px; }
