/* LP1 – trang giới thiệu TraderVN Hub. Ưu tiên điện thoại (từ 360 px), chế độ tối theo hệ thống. */
:root {
  --bg: #f7f9f8;
  --surface: #ffffff;
  --text: #13201f;
  --muted: #55625f;
  --line: #dde4e2;
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --accent: #b45309;
  --accent-bg: #fff7ed;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 5%);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1416;
    --surface: #121e20;
    --text: #e6eeec;
    --muted: #9fb0ac;
    --line: #23332f;
    --brand: #2dd4bf;
    --brand-ink: #062320;
    --accent: #fbbf24;
    --accent-bg: #2a2111;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 620px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.35rem, 4.5vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 12px; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

section { padding: 48px 0; }

/* Thanh trên cùng */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand span { color: var(--brand); }

/* Nút */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 2px solid var(--brand);
  background: var(--brand); color: var(--brand-ink);
  font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:focus-visible, .term:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 0.9rem; }

/* Phần mở đầu */
.hero { padding-top: 40px; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; }
.lead { font-size: 1.1rem; max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 12px; }
.cta-row .btn { flex: 1 1 220px; }
.note { color: var(--muted); font-size: 0.9rem; }

/* Thẻ tính năng */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card-accent { border-color: var(--accent); background: var(--accent-bg); }

.step-list { padding-left: 1.25rem; margin: 0; }
.step-list li { margin-bottom: 10px; }

/* Bảng giá */
.badge {
  display: inline-block; vertical-align: middle;
  font-size: 0.75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent);
}
.term-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 8px 0 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.term {
  min-height: 40px; padding: 6px 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text); font: inherit; cursor: pointer;
}
.term[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.price-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .price-grid { grid-template-columns: repeat(4, 1fr); } }
.price-group h3 { margin-bottom: 4px; }
.price-group .group-note { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.price-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px dashed var(--line); }
.price-row:first-of-type { border-top: 0; }
.price-amount { font-weight: 800; white-space: nowrap; }
.price-sub { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.features-list { margin: 10px 0 0; padding-left: 1.1rem; font-size: 0.9rem; color: var(--muted); }

/* Đăng ký chờ */
.waitlist { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.slot { padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Form đăng ký chờ */
.form { display: grid; gap: 16px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, legend { display: block; font-weight: 700; margin-bottom: 6px; padding: 0; }
.req { color: var(--accent); }
input[type="email"], input[type="text"], select {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit;
}
input:focus-visible, select:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; flex: 1 1 96px; justify-content: center;
}
.choice:has(input:checked) { border-color: var(--brand); font-weight: 700; }
.field > label.consent { display: flex; font-weight: 400; margin: 0; }
.consent { align-items: flex-start; gap: 10px; font-size: 0.9rem; line-height: 1.5; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; }
.consent a { color: var(--brand); }
.error { color: #dc2626; font-size: 0.85rem; margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }
@media (prefers-color-scheme: dark) { .error { color: #f87171; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { min-height: 65px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.status { margin: 0; font-weight: 700; }
.status.ok { color: var(--brand); }
.status.fail { color: #dc2626; }
@media (prefers-color-scheme: dark) { .status.fail { color: #f87171; } }

/* Hộp đồng ý cookie: 2 nút cùng kiểu, cùng kích thước, cùng độ nổi bật */
.cookie-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20;
  max-width: 560px; margin: 0 auto; padding: 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 32px rgb(0 0 0 / 25%);
}
.cookie-title { font-weight: 700; margin-bottom: 6px; }
.cookie-text { font-size: 0.9rem; margin-bottom: 12px; }
.cookie-text a { color: var(--brand); }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cookie-btn { width: 100%; background: transparent; color: var(--text); border-color: var(--text); }

/* Chân trang */
.footer { padding: 32px 0 48px; }
.disclaimer { font-size: 0.9rem; color: var(--muted); }
#policy-link-slot:empty, #cookie-settings-slot:empty { display: none; }
.footer a { color: var(--brand); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
