/* =========================================================
   ThemeBox – CSS dùng chung cho tất cả các trang
   Bảng màu lấy theo icon app: hồng pastel + tím lavender
   ========================================================= */
:root {
  --pink-50: #fff5f9;
  --pink-100: #ffe4ef;
  --pink-200: #fdc7dd;
  --pink-400: #f472b6;
  --pink-500: #ec4899;
  --pink-600: #db2777;
  --lavender: #c4b5fd;
  --lavender-50: #f5f3ff;
  --ink: #2a1b2e;          /* chữ chính */
  --ink-soft: #6b5870;     /* chữ phụ */
  --line: #f3d6e3;
  --card: #ffffff;
  --bg: var(--pink-50);
  --radius: 22px;
  --shadow: 0 18px 50px -20px rgba(219, 39, 119, .35);
  --grad: linear-gradient(135deg, #f9a8d4 0%, #f472b6 45%, #c4b5fd 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--pink-600); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--pink-500); outline-offset: 3px; border-radius: 8px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 245, 249, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 6px 16px -6px rgba(219,39,119,.5); }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a { color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--pink-600); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  border: 0; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--pink-600); color: #fff; box-shadow: 0 10px 24px -10px rgba(219,39,119,.7); }
.btn-primary:hover { background: #be185d; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.menu-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 12px 4px; }
  .nav-links .btn { justify-content: center; margin-top: 8px; color: #fff; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 90px; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1;
}
.hero::before { width: 480px; height: 480px; background: #fbcfe8; top: -120px; right: -80px; }
.hero::after { width: 380px; height: 380px; background: #ddd6fe; bottom: -140px; left: -100px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); color: var(--pink-600);
  padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; margin: 18px 0 18px; letter-spacing: -.02em; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.13rem; color: var(--ink-soft); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 30px; }
.gp-badge img { height: 62px; width: auto; }
.gp-badge:hover { transform: translateY(-2px); }
.gp-badge { display: inline-block; transition: transform .2s; }
.stats { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.stats div strong { display: block; font-size: 1.5rem; }
.stats div span { color: var(--ink-soft); font-size: .88rem; }

/* Mockup điện thoại bằng CSS */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone {
  width: 280px; aspect-ratio: 9 / 19; border-radius: 42px; padding: 10px;
  background: #1f1422; box-shadow: var(--shadow), 0 0 0 2px #3a2a3e inset;
  position: relative; z-index: 2;
}
.phone::before { /* notch */
  content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 20px; border-radius: 20px; background: #1f1422; z-index: 3;
}
.phone .screen { width: 100%; height: 100%; border-radius: 33px; overflow: hidden; background: var(--grad); }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; }
.phone.back {
  position: absolute; width: 230px; transform: rotate(-9deg) translate(-120px, 30px);
  opacity: .9; z-index: 1;
}
.float-chip {
  position: absolute; z-index: 4; background: #fff; border-radius: 16px; padding: 10px 14px;
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem;
  box-shadow: 0 14px 30px -14px rgba(42,27,46,.35);
}
.float-chip i, .float-chip svg { color: var(--pink-600); width: 18px; height: 18px; }
.chip-1 { top: 12%; right: 2%; }
.chip-2 { bottom: 14%; left: 4%; }

@media (max-width: 900px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-cta, .stats { justify-content: center; }
  .phone { width: 240px; }
  .phone.back { display: none; }
  .chip-1 { right: 0; } .chip-2 { left: 0; }
}

/* ---------- Section chung ---------- */
section.block { padding: 88px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 50px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.2; letter-spacing: -.01em; }
.section-head p { color: var(--ink-soft); margin-top: 12px; font-size: 1.05rem; }
.alt { background: #fff; }

/* ---------- Features ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--pink-200); }
.card .ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--pink-100); color: var(--pink-600); margin-bottom: 18px;
}
.card:nth-child(even) .ico { background: var(--lavender-50); color: #7c3aed; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: .97rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span { font-size: .78rem; font-weight: 600; background: var(--pink-50); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; color: var(--ink-soft); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; background: var(--pink-50); border-radius: var(--radius); padding: 34px 28px 28px; border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: 2.6rem; font-weight: 800; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: 14px;
}
.step h3 { font-size: 1.12rem; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: .96rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Screenshots slider ---------- */
.slider { position: relative; }
.track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 10px 4px 24px; scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.shot {
  flex: 0 0 auto; width: 240px; aspect-ratio: 9 / 16; scroll-snap-align: center;
  border-radius: 26px; overflow: hidden; background: var(--grad);
  box-shadow: 0 16px 36px -18px rgba(219,39,119,.55); border: 4px solid #fff;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.slider-btns { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: background .2s;
}
.icon-btn:hover { background: var(--pink-100); }
@media (max-width: 520px) { .shot { width: 70vw; } }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 4px 22px; transition: border-color .2s; }
.faq details[open] { border-color: var(--pink-200); box-shadow: 0 12px 30px -20px rgba(219,39,119,.5); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 0; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--pink-600); transition: transform .25s; flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 18px; }

/* ---------- Legal hub (trang chủ) ---------- */
.legal-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.legal-cards a.card { display: block; color: var(--ink); }
.legal-cards a.card:hover { text-decoration: none; }
.legal-cards .more { color: var(--pink-600); font-weight: 700; font-size: .92rem; margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 820px) { .legal-cards { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--grad); border-radius: 32px; padding: 56px 32px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: #fff; text-shadow: 0 2px 12px rgba(190,24,93,.3); }
.cta-band p { margin: 10px auto 26px; max-width: 520px; opacity: .95; }

/* ---------- Footer ---------- */
.footer { background: #2a1b2e; color: #e9dcea; padding: 60px 0 28px; margin-top: 0; }
.footer a { color: #fbcfe8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.footer .brand { color: #fff; }
.footer p.small { color: #bfaec2; font-size: .92rem; margin-top: 12px; max-width: 360px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 8px; font-size: .94rem; }
.footer-bottom { border-top: 1px solid #44324a; margin-top: 40px; padding-top: 22px; font-size: .86rem; color: #a998ad; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Trang pháp lý ---------- */
.legal-hero { padding: 56px 0 30px; text-align: center; }
.legal-hero h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); letter-spacing: -.01em; }
.legal-hero p { color: var(--ink-soft); margin-top: 8px; }
.legal-body {
  background: #fff; border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(24px, 5vw, 56px); max-width: 860px; margin: 0 auto 80px;
}
.legal-body h2 { font-size: 1.35rem; margin: 34px 0 10px; padding-top: 6px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.legal-body p, .legal-body li { color: #4d3d52; }
.legal-body p + p { margin-top: 10px; }
.legal-body ul, .legal-body ol { padding-left: 22px; margin: 10px 0; display: grid; gap: 6px; }
.toc { background: var(--pink-50); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; margin-bottom: 28px; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; columns: 2; column-gap: 28px; display: block; }
.toc li { margin-bottom: 4px; }
@media (max-width: 620px) { .toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 14px 0; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 520px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--pink-50); font-weight: 700; }
.note {
  background: var(--lavender-50); border-left: 4px solid #8b5cf6; border-radius: 12px;
  padding: 14px 18px; margin: 16px 0; color: #4c3b6b;
}
.note.pink { background: var(--pink-50); border-color: var(--pink-500); color: #6b2146; }

/* Form xóa dữ liệu */
.form { display: grid; gap: 16px; margin-top: 18px; }
.form label { font-weight: 700; font-size: .93rem; display: grid; gap: 6px; }
.form input, .form select, .form textarea {
  font: inherit; padding: 12px 14px; border-radius: 14px; border: 1px solid #ecc5d6; background: #fff; color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--pink-500); box-shadow: 0 0 0 4px var(--pink-100); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.form .check input { margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.form-msg { display: none; }
.form-msg.show { display: block; }

/* Hiệu ứng xuất hiện khi cuộn */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}
