:root {
  --primary: #ff4e6a;
  --primary-dark: #e23a55;
  --secondary: #3bbfff;
  --accent: #ffb547;
  --bg: #ffffff;
  --bg-alt: #fafbff;
  --text: #0f1024;
  --text-muted: #5b5d7a;
  --border: #ececf3;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(15, 16, 36, 0.05);
  --shadow: 0 10px 40px rgba(255, 78, 106, 0.12);
  --shadow-lg: 0 30px 80px rgba(15, 16, 36, 0.18);
  --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; text-decoration: none; }

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(236, 236, 243, 0.6);
  z-index: 100;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { opacity: 1; }
.brand-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 12px rgba(255, 78, 106, 0.25);
}
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--primary); }
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: white;
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  font-family: inherit;
}
.lang-toggle button.active {
  background: linear-gradient(135deg, var(--primary), #ff6b8a);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 78, 106, 0.3);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: white;
  padding: 15px 26px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; opacity: 1; box-shadow: 0 10px 30px rgba(15, 16, 36, 0.25); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #ff6b8a); }
.btn-primary:hover { box-shadow: 0 14px 36px rgba(255, 78, 106, 0.45); }
.btn-ghost { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn svg { width: 22px; height: 22px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 90px 0 100px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #fff0f4 0%, transparent 70%),
              radial-gradient(ellipse 60% 50% at 100% 30%, #e6f6ff 0%, transparent 70%),
              #ffffff;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}
.hero::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255, 78, 106, 0.3), transparent 70%);
  top: -100px; left: -100px;
  animation: floatBlob 18s ease-in-out infinite;
}
.hero::after {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59, 191, 255, 0.25), transparent 70%);
  bottom: -200px; right: -150px;
  animation: floatBlob 22s ease-in-out infinite reverse;
}
@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hero-eyebrow .dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: grid; place-items: center;
  font-size: 11px;
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 540px;
  line-height: 1.6;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.app-meta {
  display: flex;
  gap: 18px;
  margin: 26px 0 0;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
  align-items: center;
}
.app-meta .pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: var(--shadow-sm);
}
.app-meta strong { color: var(--text); font-weight: 700; }

/* ===== Hero phones (3D stack) ===== */
.hero-phones {
  position: relative;
  height: 600px;
  perspective: 1500px;
}
.phone {
  position: absolute;
  width: 260px;
  border-radius: 36px;
  padding: 8px;
  background: linear-gradient(160deg, #1a1a2e, #2a2a48);
  box-shadow: 0 40px 80px -20px rgba(15, 16, 36, 0.35), 0 0 0 1px rgba(255,255,255,0.08) inset;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}
.phone img {
  display: block;
  width: 100%;
  border-radius: 28px;
}
.phone-1 {
  top: 30px; left: 50%;
  transform: translateX(-50%) rotate(-8deg) translateZ(0);
  z-index: 2;
}
.phone-2 {
  top: 80px; left: 12%;
  transform: rotate(-14deg) scale(0.85);
  z-index: 1;
  opacity: 0.95;
}
.phone-3 {
  top: 80px; right: 10%;
  transform: rotate(8deg) scale(0.85);
  z-index: 1;
  opacity: 0.95;
}
.phone-1:hover { transform: translateX(-50%) rotate(-6deg) translateY(-8px); }
.phone-2:hover { transform: rotate(-12deg) scale(0.88) translateY(-8px); }
.phone-3:hover { transform: rotate(6deg) scale(0.88) translateY(-8px); }

/* Floating sparkles */
.sparkle {
  position: absolute;
  width: 50px; height: 50px;
  border-radius: 14px;
  background: white;
  box-shadow: 0 12px 30px rgba(15, 16, 36, 0.12);
  display: grid; place-items: center;
  font-size: 24px;
  z-index: 3;
  animation: bob 4s ease-in-out infinite;
}
.sparkle.s1 { top: 12%; left: 5%; animation-delay: 0s; }
.sparkle.s2 { top: 4%; right: 8%; animation-delay: 1s; }
.sparkle.s3 { bottom: 8%; left: 18%; animation-delay: 2s; }
.sparkle.s4 { bottom: 18%; right: 6%; animation-delay: 0.5s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-12px) rotate(4deg); }
}

/* ===== Stats ===== */
.stats {
  padding: 50px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat .num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

/* ===== Sections ===== */
section { padding: 90px 0; position: relative; }
section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 60px; }
.section-head .kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  font-weight: 800;
  line-height: 1.15;
}
.section-head p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.6;
}

/* ===== Features ===== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  overflow: hidden;
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(255, 78, 106, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.feature:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature:hover::before { opacity: 1; }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff0f4, #e6f6ff);
  display: grid; place-items: center;
  font-size: 26px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.feature h3 { font-size: 19px; margin-bottom: 8px; font-weight: 700; letter-spacing: -0.01em; }
.feature p { color: var(--text-muted); font-size: 15px; }

/* ===== Screenshots gallery ===== */
.screenshots-section {
  padding: 90px 0;
  background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
  overflow: hidden;
}
.ss-track {
  display: flex;
  gap: 22px;
  padding: 20px 24px 40px;
  margin: 0 calc(50% - 50vw);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ss-track::-webkit-scrollbar { display: none; }
.ss-track::before, .ss-track::after { content: ""; flex: 0 0 calc(50vw - 600px); min-width: 24px; }
.ss-phone {
  flex: 0 0 auto;
  width: 250px;
  border-radius: 36px;
  padding: 8px;
  background: linear-gradient(160deg, #1a1a2e, #2a2a48);
  box-shadow: 0 30px 60px -20px rgba(15, 16, 36, 0.25);
  scroll-snap-align: center;
  transition: transform 0.3s;
}
.ss-phone:hover { transform: translateY(-8px) scale(1.02); }
.ss-phone img {
  display: block;
  width: 100%;
  border-radius: 28px;
}

/* ===== Compliance cards ===== */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.comp-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.comp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.comp-card .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff0f4, #e6f6ff);
  display: grid; place-items: center;
  font-size: 22px;
  margin-bottom: 6px;
}
.comp-card h3 { font-size: 17px; font-weight: 700; }
.comp-card p { color: var(--text-muted); font-size: 14.5px; }
.comp-card a.cta {
  font-size: 14px;
  font-weight: 700;
  margin-top: auto;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== CTA banner ===== */
.cta-banner {
  background: linear-gradient(135deg, #ff4e6a 0%, #ff6b8a 40%, #3bbfff 100%);
  color: white;
  padding: 70px 24px;
  border-radius: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 60px auto;
  max-width: var(--max);
}
.cta-banner::before, .cta-banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.cta-banner::before { width: 300px; height: 300px; top: -150px; left: -100px; }
.cta-banner::after { width: 400px; height: 400px; bottom: -200px; right: -150px; }
.cta-banner h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  position: relative;
}
.cta-banner p {
  font-size: 17px;
  opacity: 0.95;
  margin-bottom: 28px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}
.cta-banner .btn {
  position: relative;
  background: white;
  color: var(--text);
}
.cta-banner .btn:hover { background: #fff; transform: translateY(-2px) scale(1.02); }

/* ===== Footer ===== */
.footer {
  background: #0f1024;
  color: #b8b8d1;
  padding: 70px 0 30px;
}
.footer a { color: #b8b8d1; }
.footer a:hover { color: white; opacity: 1; }
.footer .brand { color: white; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer h4 { color: white; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px; font-weight: 700; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; }
.footer-bottom {
  border-top: 1px solid #20213a;
  padding-top: 28px;
  text-align: center;
  font-size: 13px;
  color: #7a7a99;
}

/* ===== i18n ===== */
[data-lang-en], [data-lang-vi] { display: none; }
html[lang="en"] [data-lang-en] { display: revert; }
html[lang="vi"] [data-lang-vi] { display: revert; }

/* ===== Legal pages (unchanged structure, refreshed look) ===== */
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}
.legal h1 { font-size: 40px; margin-bottom: 8px; letter-spacing: -0.02em; font-weight: 800; }
.legal .updated { color: var(--text-muted); font-size: 14px; margin-bottom: 36px; }
.legal h2 { font-size: 22px; margin: 38px 0 14px; font-weight: 700; letter-spacing: -0.01em; }
.legal h3 { font-size: 17px; margin: 22px 0 8px; font-weight: 700; }
.legal p, .legal li { color: var(--text); font-size: 15.5px; line-height: 1.8; }
.legal ul, .legal ol { padding-left: 22px; margin: 12px 0; }
.legal li { margin-bottom: 8px; }
.legal .callout {
  background: linear-gradient(135deg, #fff5f7, #fff0f4);
  border-left: 4px solid var(--primary);
  padding: 18px 20px;
  border-radius: 12px;
  margin: 20px 0;
}
.legal .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.legal .back:hover { color: var(--primary); }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps li {
  counter-increment: step;
  padding: 16px 18px 16px 60px;
  position: relative;
  background: var(--bg-alt);
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), #ff6b8a);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(255, 78, 106, 0.35);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .compliance-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 720px) {
  .hero { padding: 60px 0 70px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-phones { height: 460px; }
  .phone { width: 200px; }
  .features, .compliance-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .nav-links { gap: 12px; }
  .nav-links a:not(.lang-toggle button) { display: none; }
  section { padding: 60px 0; }
  .cta-banner { padding: 50px 24px; margin: 40px 16px; }
  .ss-phone { width: 200px; }
  .ss-track::before, .ss-track::after { flex: 0 0 12px; }
}
