/* Bút Thuận — trang quảng bá.
   Token màu/bo góc/chữ lấy đúng từ theme của app (lib/core/design/tokens.dart)
   để trang web và app trông cùng một thương hiệu: giấy ấm, mực đen, dấu triện
   đỏ, bo góc mềm, KHÔNG dùng bóng cứng (app chỉ đổ bóng mềm cho sheet/dialog
   nổi — xem AppShadows.sheetDialog). */

:root {
  /* Nền & mực — 1:1 với AppColors */
  --bg: #f5f2ec;
  --surface: #fffdf8;
  --ink: #1b1a17;
  --ink2: #403d37;
  --muted: #8c877c;
  --border: #e3ded2;
  --divider: #efe9dc;
  --accent: #b23a2e;
  --accent-soft: #fbf1ee;
  --accent-soft-border: #e8cfc8;
  --correct: #2f6f5e;
  --stroke-ghost: #dcd4c3;

  --tint-green: #e6efea;
  --tint-gold: #f5ebdd;
  --tint-peach: #f3e5e2;

  --on-accent: #fffdf8;

  /* Bo góc — AppRadius */
  --r-sm: 11px;
  --r-btn: 16px;
  --r-card: 18px;
  --r-card-lg: 20px;
  --r-pill: 999px;

  /* App không đổ bóng, trừ sheet/dialog nổi (AppShadows.sheetDialog) */
  --shadow-elevated: 0 14px 40px rgba(27, 26, 23, 0.16);

  --maxw: 1120px;
  --font: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-hanzi: "Noto Serif SC", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140f;
    --surface: #211d17;
    --ink: #f5f2ec;
    --ink2: #d8d2c4;
    --muted: #948d7f;
    --border: #362f26;
    --divider: #2b2519;
    --accent: #e0685a;
    --accent-soft: #2c1e1a;
    --accent-soft-border: #4a3129;
    --correct: #6fbfa1;
    --stroke-ghost: #4a4436;
    --tint-green: #1d2b23;
    --tint-gold: #2f2718;
    --tint-peach: #2f211c;
    --on-accent: #1b1a17;
    --shadow-elevated: 0 14px 40px rgba(0, 0, 0, 0.45);
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.12; margin: 0; font-weight: 700; }
h2 { font-size: clamp(26px, 3.6vw, 36px); }
h3 { font-size: 19px; }
p { margin: 0; }

/* ---------- nút & chip ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--muted); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.btn--primary:hover { border-color: var(--accent); opacity: 0.92; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink2);
}

/* ---------- header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}
.nav { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; text-decoration: none; }
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: block;
}
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--ink2); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.nav .btn { padding: 9px 17px; font-size: 14px; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

/* ---------- hero ---------- */

.hero { padding: 60px 0 36px; position: relative; overflow: hidden; }
.hero-watermark {
  position: absolute;
  top: -60px;
  right: -40px;
  font-family: var(--font-hanzi);
  font-size: 420px;
  color: var(--ink);
  opacity: 0.035;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  position: relative;
}
.hero h1 { font-size: clamp(36px, 5.4vw, 56px); }
.hero h1 .accent-line {
  color: var(--accent);
  position: relative;
  display: inline-block;
}
.hero-sub { margin-top: 18px; font-size: 18px; color: var(--ink2); max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-note { margin-top: 15px; font-size: 14px; color: var(--muted); }
.sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; align-items: center; }
.sources span:first-child { font-size: 13px; color: var(--muted); margin-right: 4px; }
.sources .chip { background: var(--tint-gold); border-color: var(--border); font-size: 11.5px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-watermark { font-size: 260px; top: -20px; }
}

/* ---------- mô phỏng màn hình app ---------- */

.phone {
  width: 300px;
  margin: 0 auto;
  border: 8px solid var(--ink);
  border-radius: 34px;
  background: var(--ink);
  box-shadow: var(--shadow-elevated);
}
.phone-screen {
  background: var(--surface);
  border-radius: 26px;
  padding: 18px 16px;
  display: grid;
  gap: 12px;
  overflow: hidden;
}
.p-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.p-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px;
}
.p-card-title { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

.write-grid {
  width: 108px;
  height: 108px;
  margin: 0 auto;
  border: 1.5px solid var(--stroke-ghost);
  border-radius: var(--r-sm);
  position: relative;
  background:
    linear-gradient(var(--stroke-ghost) 1px, transparent 1px) 0 0 / 100% 50%,
    linear-gradient(90deg, var(--stroke-ghost) 1px, transparent 1px) 0 0 / 50% 100%;
}
.write-grid .hanzi-ghost {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-hanzi);
  font-size: 74px;
  color: var(--accent);
  opacity: 0.9;
}
.stroke-order {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.stroke-order span {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  display: grid; place-items: center;
}
.stroke-order span.done { background: var(--tint-green); border-color: var(--correct); color: var(--correct); }

.p-streak {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--tint-gold);
  border: 1.5px solid var(--border);
  border-radius: var(--r-card);
  padding: 11px 14px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink2);
}
.p-bar {
  height: 46px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}
.p-bar b { color: var(--accent); }

/* ---------- section chung ---------- */

section { padding: 58px 0; scroll-margin-top: 84px; }
.section-head { max-width: 40rem; margin-bottom: 32px; }
.section-head p { margin-top: 12px; color: var(--ink2); }

/* ---------- 3 bước ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-card-lg);
  padding: 24px 20px 22px;
}
.step-num {
  font-family: var(--font-hanzi);
  font-size: 40px;
  font-weight: 700;
  color: var(--accent-soft-border);
  line-height: 1;
}
.step h3 { margin: 12px 0 8px; }
.step p { color: var(--ink2); font-size: 15px; }

/* ---------- tính năng ---------- */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-card-lg);
  padding: 22px 20px;
}
.feature .ico {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  font-size: 20px;
  margin-bottom: 14px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink2); font-size: 14.5px; }

@media (max-width: 880px) {
  .steps, .features { grid-template-columns: 1fr; }
}

/* ---------- dải chuỗi ngày ---------- */

.band {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-card-lg);
  padding: 36px 30px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  align-items: center;
}
.band h2 { color: var(--bg); }
.band p { margin-top: 12px; color: #c9c3b6; }
.band-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.band-stat {
  background: rgba(245, 242, 236, 0.08);
  border: 1.5px solid rgba(245, 242, 236, 0.22);
  border-radius: var(--r-card);
  padding: 14px 12px;
  text-align: center;
}
.band-stat b { display: block; font-size: 23px; letter-spacing: -0.02em; color: #f0a99c; }
.band-stat span { font-size: 12px; color: #c9c3b6; }
@media (max-width: 880px) { .band { grid-template-columns: 1fr; } }

/* ---------- bảng giá ---------- */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.plan {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-card-lg);
  padding: 26px 24px;
}
.plan--pro { background: var(--accent-soft); border-color: var(--accent-soft-border); }
.plan-name { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.price { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; margin: 10px 0 2px; }
.price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan-note { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink2); }
.plan li::before { content: "✓"; color: var(--correct); font-weight: 700; }
.plan--pro li::before { color: var(--accent); }
.referral-note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 780px) { .plans { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */

.faq { display: grid; gap: 10px; max-width: 46rem; }
details {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-card);
  padding: 16px 18px;
}
summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin-top: 12px; color: var(--ink2); font-size: 14.5px; }

/* ---------- cta cuối + footer ---------- */

.cta-final {
  text-align: center;
  background: var(--tint-gold);
  border: 1.5px solid var(--border);
  border-radius: var(--r-card-lg);
  padding: 46px 26px;
}
.cta-final h2 { max-width: 18em; margin: 0 auto; }
.cta-final p { margin: 14px auto 24px; max-width: 32em; color: var(--ink2); }

footer {
  border-top: 1px solid var(--divider);
  margin-top: 56px;
  padding: 32px 0 44px;
  font-size: 14px;
  color: var(--muted);
}
.foot { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* ---------- trang văn bản (điều khoản / quyền riêng tư) ---------- */

.doc { max-width: 42rem; padding: 52px 0 60px; }
.doc h1 { font-size: 36px; }
.doc h2 { margin-top: 36px; font-size: 21px; }
.doc h3 { margin-top: 28px; font-size: 17px; }
.doc p, .doc li { color: var(--ink2); margin-top: 12px; font-size: 15px; }
.doc ul { padding-left: 20px; margin-top: 12px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-top: 6px; }
