/* Drawgic website — màu lấy từ lib/core/theme.dart (AppColors / AppGradients) */
@font-face { font-family: "Be Vietnam Pro"; src: url("fonts/BeVietnamPro-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("fonts/BeVietnamPro-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("fonts/BeVietnamPro-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("fonts/BeVietnamPro-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --purple: #7C3AED;
  --purple-deep: #6D28D9;
  --indigo: #4F46E5;
  --blue: #2563EB;
  --grad: linear-gradient(135deg, #7C3AED 0%, #2563EB 100%);
  --grad-deep: linear-gradient(135deg, #6D28D9 0%, #4F46E5 50%, #2563EB 100%);
  --bg: #F5F3FF;
  --bg-grad: linear-gradient(180deg, #F5F3FF 0%, #EEF4FF 55%, #E0EDFF 100%);
  --surface: #FFFFFF;
  --surface-2: #EDE9FE;
  --ink: #2A1B4A;
  --muted: #6B5B86;
  --border: #EADCFB;
  --accent: #7C3AED;
  --link: #6D28D9;
  --shadow: 0 10px 30px rgba(76, 29, 149, .10);
  --ph-bg: #FEF3C7;
  --ph-ink: #92400E;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120C24;
    --bg-grad: linear-gradient(180deg, #140D29 0%, #111A33 60%, #0E1A38 100%);
    --surface: #1D1535;
    --surface-2: #2A1F4A;
    --ink: #F1ECFF;
    --muted: #B3A6D1;
    --border: #33275A;
    --accent: #A78BFA;
    --link: #C4B5FD;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --ph-bg: #4A3510;
    --ph-ink: #FCD34D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120C24;
  --bg-grad: linear-gradient(180deg, #140D29 0%, #111A33 60%, #0E1A38 100%);
  --surface: #1D1535;
  --surface-2: #2A1F4A;
  --ink: #F1ECFF;
  --muted: #B3A6D1;
  --border: #33275A;
  --accent: #A78BFA;
  --link: #C4B5FD;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --ph-bg: #4A3510;
  --ph-ink: #FCD34D;
  color-scheme: dark;
}

/* ---------- Song ngữ: phần tử có lang="vi"/lang="en" bên trong body ---------- */
html[lang="vi"] body [lang="en"],
html[lang="en"] body [lang="vi"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .grad-text { background: linear-gradient(135deg, #C4B5FD, #93C5FD); -webkit-background-clip: text; background-clip: text; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grad-text { background: linear-gradient(135deg, #C4B5FD, #93C5FD); -webkit-background-clip: text; background-clip: text; } }
.muted { color: var(--muted); }
.ph { background: var(--ph-bg); color: var(--ph-ink); padding: 0 .3em; border-radius: 4px; font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; margin-right: auto; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface-2); color: var(--accent); }
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; min-width: 38px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; padding: 8px 16px 16px; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 16px; font-weight: 600; text-decoration: none;
  border: 0; cursor: pointer; font: inherit; font-weight: 600;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 0 rgba(79, 70, 229, .28); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.store-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px;
  border-radius: 14px; background: #0B0717; color: #fff; text-decoration: none; min-width: 180px;
  border: 1px solid rgba(255,255,255,.18);
}
.store-btn svg { width: 28px; height: 28px; flex: none; }
.store-btn small { display: block; font-size: .7rem; opacity: .8; line-height: 1.1; }
.store-btn strong { display: block; font-size: 1.1rem; line-height: 1.2; }
.store-btn:hover { transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-logo { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--surface-2); color: var(--accent); font-weight: 600; font-size: .85rem; margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; color: var(--muted); font-size: .9rem; }
.hero-badges span::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.hero-phones { position: relative; display: flex; justify-content: center; min-height: 460px; }
.phone {
  width: 230px; border-radius: 34px; overflow: hidden; background: var(--surface);
  border: 6px solid #1A1230; box-shadow: 0 24px 60px rgba(46, 16, 101, .30);
}
.hero-phones .phone:first-child { transform: rotate(-6deg) translateX(30px); z-index: 1; }
.hero-phones .phone:last-child { transform: rotate(5deg) translate(-30px, 30px); z-index: 2; }
.hero-glow { position: absolute; inset: 10% 5%; background: var(--grad); filter: blur(70px); opacity: .35; border-radius: 50%; z-index: 0; }
@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phones { min-height: 0; padding: 0 0 8px; }
  .hero-logo { width: 68px; height: 68px; border-radius: 18px; }
  .phone { width: 46%; max-width: 220px; border-width: 4px; border-radius: 24px; }
}

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 22px; box-shadow: var(--shadow);
}
.feature-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad); color: #fff; margin-bottom: 14px;
}
.feature-icon svg { width: 24px; height: 24px; }
.card p:last-child { margin-bottom: 0; }

/* Screenshots */
.shots { display: flex; gap: 18px; overflow-x: auto; padding: 8px 16px 24px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shot { margin: 0; flex: none; width: 200px; scroll-snap-align: start; text-align: center; }
.shot .phone { width: 100%; border-width: 5px; border-radius: 30px; margin-bottom: 10px; }
.shot figcaption { font-size: .9rem; color: var(--muted); font-weight: 500; }
@media (min-width: 1100px) { .shots { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 720px; gap: 32px; margin: 0 auto; overflow: visible; } .shot { width: auto; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }
.plan { display: flex; flex-direction: column; position: relative; }
.plan .price { font-size: 2rem; font-weight: 700; margin: 6px 0 2px; }
.plan .price small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%; background: var(--grad); -webkit-mask: radial-gradient(circle, #000 0 100%); }
.plan li::after { content: ""; position: absolute; left: 5px; top: calc(.35em + 4px); width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.plan.featured { border: 2px solid var(--accent); }
.tag { position: absolute; top: -12px; right: 18px; background: var(--grad); color: #fff; font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.fine { font-size: .85rem; color: var(--muted); margin-top: 16px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 18px; }
summary { cursor: pointer; padding: 16px 28px 16px 0; font-weight: 600; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.4rem; color: var(--accent); font-weight: 500; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 16px; color: var(--muted); }
details > div p:last-child { margin: 0; }

/* CTA band */
.cta { background: var(--grad-deep); color: #fff; border-radius: 28px; padding: 40px 24px; text-align: center; }
.cta h2 { color: #fff; }
.cta .store-btns { justify-content: center; }
.cta p { opacity: .9; }

/* ---------- Doc pages (privacy / terms / support / delete) ---------- */
.doc-hero { padding-top: 40px; padding-bottom: 8px; }
.doc { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: clamp(20px, 4vw, 44px); box-shadow: var(--shadow); margin-bottom: 48px; }
.doc h2 { font-size: 1.35rem; margin-top: 1.8em; padding-top: .2em; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin-top: 1.3em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: .4em; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { background: var(--surface-2); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.doc td a { word-break: break-word; overflow-wrap: anywhere; }
@media (max-width: 560px) { .doc th, .doc td { padding: 8px 6px; font-size: .88rem; } .doc { border-radius: 18px; } }
.meta { color: var(--muted); font-size: .92rem; }
.toc { background: var(--surface-2); border-radius: 16px; padding: 14px 20px; margin-bottom: 24px; }
.toc ol { margin: 6px 0 0; }
.note { border-left: 4px solid var(--accent); background: var(--surface-2); padding: 12px 16px; border-radius: 0 12px 12px 0; margin: 0 0 1em; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 12px 14px 12px 54px; background: var(--surface-2); border-radius: 14px; margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 12px; top: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.contact-cards { margin-bottom: 8px; }
.contact-cards .card { box-shadow: none; }
kbd, .ui { font-family: inherit; font-weight: 600; background: var(--surface-2); color: var(--accent); padding: 1px 7px; border-radius: 6px; font-size: .92em; white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 28px; margin-top: 24px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h4 { margin: 0 0 10px; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.copyright { margin-top: 24px; color: var(--muted); font-size: .85rem; }
code { white-space: nowrap; }

/* Contact form (support.html) — chỉ soạn email, không gửi dữ liệu đi đâu */
.contact-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; align-items: end; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--bg);
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form :focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.form-hint { font-size: .9rem; }
@media (max-width: 700px) { .contact-form { grid-template-columns: 1fr; } }
.store-btn[href="#"] { cursor: default; }
.store-btn[href="#"]:hover { transform: none; }
.not-found { text-align: center; padding-top: 72px; padding-bottom: 48px; }
.not-found .code { font-size: clamp(4rem, 18vw, 8rem); font-weight: 700; line-height: 1; margin-bottom: 8px; }
[id] { scroll-margin-top: 80px; }
