:root {
  --bg: #0b111c;
  --bg-2: #111a2a;
  --panel: #152034;
  --panel-2: #1a2740;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef2f8;
  --muted: #9aa8bf;
  --mango: #ffc83d;
  --mango-2: #ff9f1c;
  --leaf: #4fb35a;
  --radius: 18px;
  --max: 1120px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--mango); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Language switching: elements tagged data-lang are shown only for the active language */
html[data-ui-lang="vi"] [data-lang="en"],
html[data-ui-lang="en"] [data-lang="vi"] { display: none !important; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 17, 28, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.brand span b { color: var(--mango); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 600; }
.nav a:hover, .nav a.active { color: var(--text); text-decoration: none; }
.lang-toggle {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--panel);
}
.lang-toggle button {
  border: 0; background: transparent; color: var(--muted); font: 700 12px var(--font);
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
}
html[data-ui-lang="vi"] .lang-toggle [data-set-lang="vi"],
html[data-ui-lang="en"] .lang-toggle [data-set-lang="en"] { background: var(--mango); color: #1a1205; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--mango), var(--mango-2)); color: #1a1205; box-shadow: 0 8px 28px rgba(255, 170, 40, .28); }
.btn-youtube { background: #ff0033; color: #fff; box-shadow: 0 8px 28px rgba(255, 0, 51, .25); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.03); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 78% 40%, rgba(255, 200, 61, .16), transparent 70%),
    radial-gradient(500px 360px at 10% 0%, rgba(80, 120, 220, .18), transparent 70%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--mango);
  background: rgba(255, 200, 61, .1); border: 1px solid rgba(255, 200, 61, .25); padding: 6px 12px; border-radius: 999px;
}
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.08; letter-spacing: -0.03em; margin: 18px 0 18px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--mango), var(--mango-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 560px; margin: 0 0 30px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; justify-self: center; width: min(400px, 100%); aspect-ratio: 1; }
.hero-art .ring {
  position: absolute; inset: -14px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--mango), transparent 30%, var(--mango-2) 55%, transparent 80%, var(--mango));
  animation: spin 9s linear infinite; opacity: .55; filter: blur(2px);
}
.hero-art img { position: relative; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-art .ring { animation: none; } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.stat { background: var(--bg-2); padding: 22px 20px; }
.stat b { display: block; font-size: 28px; font-weight: 800; color: var(--mango); letter-spacing: -0.02em; white-space: nowrap; }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- Sections ---------- */
section.block { padding: 84px 0; }
section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 10px 0 12px; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mango); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 200, 61, .12); color: var(--mango); margin-bottom: 16px;
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Pipeline steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: inline-block; font-weight: 800; font-size: 13px; color: #1a1205; background: var(--mango);
  border-radius: 8px; padding: 3px 9px; margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.step .tag { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }

/* Genres */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 9px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }

/* TikTok integration */
.split-title { margin: 10px 0 18px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; letter-spacing: -0.02em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: var(--muted); }
.checklist li b { color: var(--text); }
.checklist li::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%; margin-top: 2px;
  background: rgba(79, 179, 90, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234fb35a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/13px no-repeat;
}
.scope-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.scope-table th, .scope-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scope-table tr:last-child td { border-bottom: 0; }
.scope-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--panel-2); }
.scope-table code { color: var(--mango); font-size: 14px; overflow-wrap: anywhere; }

/* CTA */
.cta {
  text-align: center; padding: 56px 24px; border-radius: 28px;
  background: radial-gradient(500px 220px at 50% 0%, rgba(255, 200, 61, .2), transparent 70%), var(--panel);
  border: 1px solid rgba(255, 200, 61, .2);
}
.cta h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; letter-spacing: -0.02em; }
.cta p { color: var(--muted); margin: 0 auto 26px; max-width: 520px; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Legal pages ---------- */
.legal-hero { padding: 64px 0 28px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.legal-hero h1 { font-size: clamp(30px, 4.4vw, 46px); margin: 10px 0 8px; letter-spacing: -0.02em; line-height: 1.15; }
.legal-hero p { color: var(--muted); margin: 0; }
.legal { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding: 48px 0 84px; }
.toc { position: sticky; top: 88px; align-self: start; font-size: 14px; }
.toc b { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--text); }
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; margin: 40px 0 10px; letter-spacing: -0.01em; scroll-margin-top: 84px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17px; margin: 22px 0 6px; }
.prose p, .prose li { color: #c8d2e2; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
.note {
  background: rgba(255, 200, 61, .08); border: 1px solid rgba(255, 200, 61, .25);
  border-radius: 14px; padding: 16px 18px; margin: 18px 0; color: #e9dcb8;
}
.note a { color: var(--mango); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer nav a { color: var(--muted); }
.site-footer nav a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container, .split { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .hero-art { width: min(300px, 80%); grid-row: 1; }
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .legal { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
}
@media (max-width: 640px) {
  .nav .nav-link { display: none; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  section.block { padding: 60px 0; }
  .stat { padding: 18px 16px; }
  .stat b { font-size: 22px; }
  .container { padding: 0 16px; }
  .scope-table th, .scope-table td { padding: 12px; }
}
