/* Vietnamoi web: same palette and typeface as the app (navy ink, purple to blue glow, Be Vietnam Pro). */
:root {
  --bg: #ffffff;
  --soft: #f4f6fd;
  --soft-2: #eee9ff;
  --ink: #16182e;
  --text: #2b2f4d;
  --muted: #4e5680;
  --faint: #7c84a8;
  --line: rgba(22, 24, 46, 0.08);
  --purple: #8b6cff;
  --purple-deep: #6a4bea;
  --blue: #3d7bff;
  --navy: #05061f;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(42, 27, 122, 0.08);
  --shadow-lg: 0 24px 60px rgba(42, 27, 122, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--purple-deep); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
.container.narrow { max-width: 780px; }

/* ---------- Top bar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 4px 12px rgba(42, 27, 122, 0.25); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 10px; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.nav-links a:hover { background: var(--soft); color: var(--ink); }
.nav-links a.active { color: var(--purple-deep); background: var(--soft-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 0;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(61, 123, 255, 0.18), transparent 70%),
    radial-gradient(900px 460px at 10% -20%, rgba(139, 108, 255, 0.26), transparent 70%),
    linear-gradient(180deg, #f6f3ff 0%, #ffffff 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 24px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(42, 27, 122, 0.06);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--purple-deep);
  margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--blue)); }
h1 {
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--ink);
}
h1 .grad { background: linear-gradient(90deg, var(--purple-deep), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px; border-radius: 16px;
  font-family: inherit; font-weight: 700; font-size: 15.5px; text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--purple) 0%, var(--blue) 100%); box-shadow: 0 12px 28px rgba(95, 82, 235, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(95, 82, 235, 0.45); }
.btn-ghost { color: var(--ink); background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(42, 27, 122, 0.06); }
.btn-ghost:hover { transform: translateY(-2px); background: var(--soft); }

.hero-phones { position: relative; height: 520px; }
.phone {
  position: absolute; width: 230px; border-radius: 34px; overflow: hidden;
  background: #fff; border: 7px solid var(--navy); box-shadow: var(--shadow-lg);
}
.phone img { width: 100%; height: auto; }
.phone.p1 { left: 6%; top: 40px; transform: rotate(-6deg); animation: float 7s ease-in-out infinite; }
.phone.p2 { right: 0; top: 0; transform: rotate(5deg); width: 250px; z-index: 2; animation: float 7s ease-in-out -3.5s infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- Sections ---------- */
.section { padding: 72px 0 8px; }
.section-title { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); margin: 0 0 10px; }
.section-sub { color: var(--muted); max-width: 620px; margin: 0 0 32px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(42, 27, 122, 0.14); }
.card .icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px;
  font-size: 22px; background: linear-gradient(135deg, var(--soft-2), #e4edff);
}
.card h2, .card h3 { margin: 0 0 6px; font-size: 18px; color: var(--ink); letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
.shot { border-radius: 26px; overflow: hidden; border: 6px solid var(--navy); box-shadow: var(--shadow-lg); background: #fff; transition: transform 0.4s var(--ease); }
.shot:hover { transform: translateY(-6px); }

.banner {
  margin: 72px 0 0; padding: 44px 32px; border-radius: 28px; text-align: center; color: #fff;
  background: radial-gradient(600px 240px at 50% 0%, rgba(139, 108, 255, 0.55), transparent 70%), linear-gradient(135deg, #0b0a45 0%, var(--navy) 100%);
  box-shadow: var(--shadow-lg);
}
.banner h2 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 32px); letter-spacing: -0.02em; }
.banner p { margin: 0 auto 22px; color: rgba(255, 255, 255, 0.75); max-width: 520px; }
.banner .btn-ghost { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.22); box-shadow: none; }
.banner .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }

/* ---------- Legal pages ---------- */
.page-head {
  padding: 56px 0 40px;
  background:
    radial-gradient(800px 300px at 80% -20%, rgba(61, 123, 255, 0.16), transparent 70%),
    radial-gradient(800px 340px at 10% -30%, rgba(139, 108, 255, 0.24), transparent 70%),
    linear-gradient(180deg, #f6f3ff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(32px, 6vw, 48px); margin-bottom: 8px; }
.page-head .meta { margin: 0; color: var(--faint); font-size: 14.5px; font-weight: 500; }

.legal { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding: 40px 0 24px; align-items: start; }
.toc { position: sticky; top: 88px; padding: 18px; border-radius: 18px; background: var(--soft); border: 1px solid var(--line); }
.toc-title { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.toc a { display: block; padding: 7px 10px; border-radius: 10px; font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--muted); text-decoration: none; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.toc a:hover { background: #fff; color: var(--ink); }
.toc a.on { background: #fff; color: var(--purple-deep); font-weight: 700; box-shadow: 0 4px 12px rgba(42, 27, 122, 0.08); }

.prose { min-width: 0; }
.prose section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 16px; box-shadow: 0 6px 20px rgba(42, 27, 122, 0.05); }
.prose h2 { display: flex; align-items: center; gap: 12px; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 12px; }
.prose h2 .num { flex: none; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--purple), var(--blue)); }
.prose p, .prose li { color: var(--text); font-size: 16px; }
.prose p { margin: 0 0 12px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 12px; padding-left: 22px; }
.prose ul:last-child { margin-bottom: 0; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--purple); }
.prose strong { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { margin-top: 56px; padding: 32px 0 48px; border-top: 1px solid var(--line); background: var(--soft); color: var(--faint); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.footer a { color: var(--muted); text-decoration: none; font-weight: 600; margin-left: 18px; }
.footer a:first-child { margin-left: 0; }
.footer a:hover { color: var(--purple-deep); }
.footer p { margin: 0; }

/* ---------- Entrance motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone { animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero-phones { height: 440px; margin-top: 8px; }
  .phone { width: 190px; }
  .phone.p2 { width: 210px; }
  .phone.p1 { left: 4%; }
  .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .shot { border-width: 4px; border-radius: 18px; }
  .legal { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; }
}
@media (max-width: 600px) {
  /* Phones: blocks sit 12px from the screen edges. */
  .container { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 520px) {
  .nav-links a.hide-sm { display: none; }
  .prose section { padding: 20px 18px; }
  .hero-phones { height: 390px; }
  .phone { width: 160px; border-width: 5px; border-radius: 26px; }
  .phone.p2 { width: 176px; }
  .btn { width: 100%; }
  .footer a { margin-left: 0; margin-right: 18px; }
}
