/*
 * Giao dien trang tich diem tu viet (tools/templates/site-page.html), thay ban clone Elementor.
 * Mobile-first; mau thuong hieu Phuc Sang: xanh rung + vang dong tren nen kem giay.
 */
:root {
  --forest: #173d2a;
  --forest-2: #245a3e;
  --leaf: #e8efe4;
  --gold: #c9a24a;
  --gold-ink: #7a5b14; /* vang dam cho chu tren nen sang (contrast >= 4.5:1) */
  --cream: #f8f4ea;
  --paper: #fffdf8;
  --ink: #1d2a22;
  --muted: #3f4b43; /* xam dam: chu phu van ro tren nen kem (~9:1) */
  --line: #e4dcc8;
  --error: #b42318;
  --error-soft: #fef3f2;
  --zalo: #0068ff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(23, 61, 42, .12);
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Lora", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 500 16px/1.65 var(--sans); /* Be Vietnam Pro 500: net day hon 400, de doc tren dien thoai */
  /* chua cho thanh lien he day man hinh tren dien thoai */
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest-2); text-underline-offset: .22em; text-decoration-thickness: 1px; } /* gach chan khong cat vao dau nang (ạ, ợ, ậ) */
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--forest); color: #fff; }
.skip:focus { top: 8px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(248, 244, 234, .92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; padding: 3px; border-radius: 10px; background: var(--forest); }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-family: var(--serif); font-size: 18px; color: var(--forest); }
.brand small { margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.top-nav { display: none; gap: 4px; }
.top-nav a { padding: 8px 12px; border-radius: 99px; color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; transition: background-color .2s ease; }
.top-nav a:hover { background: var(--leaf); }
.top-call { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 99px; background: var(--forest); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; }
.top-call span { display: none; }

/* ---------- Hero + the tich diem ---------- */
.hero { position: relative; padding: 20px 0 36px; overflow: hidden; }
/* hoa van la tra mo o goc, chi trang tri */
.hero::before {
  content: ""; position: absolute; inset: -20% -30% auto auto; width: 520px; height: 520px; z-index: -1;
  background: radial-gradient(closest-side, rgba(201, 162, 74, .22), transparent 70%);
}
.hero-in { display: grid; gap: 20px; }
.eyebrow { margin: 0 0 8px; color: var(--gold-ink); font-size: 13px; line-height: 1.45; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hero-title { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 8vw, 54px); line-height: 1.24; color: var(--forest); }
.hero-title em { font-style: normal; color: var(--gold-ink); }
.hero-lead { margin: 12px 0 0; font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 34em; }
.hero-lead strong { color: var(--ink); }
.hero-facts { display: none; list-style: none; margin: 24px 0 0; padding: 0; gap: 12px; }
.hero-facts li { flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.hero-facts b { display: block; font-size: 18px; font-weight: 700; color: var(--forest); font-variant-numeric: tabular-nums; }
.hero-facts span { font-size: 14px; color: var(--muted); }
.hero-art { display: none; margin-top: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }

.card { background: var(--paper); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 76px; border: 1px solid var(--line); }
.card-head {
  position: relative; padding: 16px 20px 18px; color: #fff;
  background:
    radial-gradient(120px 120px at 92% 20%, rgba(201, 162, 74, .45), transparent 70%),
    linear-gradient(135deg, var(--forest), var(--forest-2));
}
/* duong rang cua nhu ve/tem cat roi o day dau the */
.card-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 12px;
  background: radial-gradient(circle at 6px 6px, var(--paper) 5px, transparent 5.5px) 0 0 / 16px 12px repeat-x;
}
.card-kicker { display: block; font-size: 13px; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.card-title { font-family: var(--serif); font-size: 22px; line-height: 1.35; margin-top: 2px; }
.card-body { padding: 18px 16px 20px; }

/* Tab dang gach chan */
.td-tabs { display: flex; margin-bottom: 18px; border-bottom: 2px solid var(--line); }
.td-tab {
  flex: 1; min-height: 46px; margin-bottom: -2px; padding: 0 8px;
  border: 0; border-bottom: 3px solid transparent; background: none;
  color: var(--muted); font: 600 16px/1.2 var(--sans); cursor: pointer; touch-action: manipulation;
  transition: color .2s ease, border-color .2s ease;
}
.td-tab:hover { color: var(--forest); }
.td-tab[aria-selected="true"] { color: var(--forest); border-bottom-color: var(--gold); }

.td-form { margin: 0; }
.td-field { margin-bottom: 14px; }
.td-field label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.td-field input {
  display: block; width: 100%; min-height: 52px; margin: 0; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  /* >= 16px de iOS khong tu phong to khi focus */
  font: 500 18px/1.3 var(--sans); letter-spacing: .02em;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.td-field input::placeholder { color: #6b756e; font-weight: 400; font-size: 16px; letter-spacing: 0; }
.td-field input:focus { outline: none; border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(36, 90, 62, .18); }
#td-code { text-transform: uppercase; }
#td-code::placeholder { text-transform: none; }

.td-saved { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; padding: 8px 12px; background: var(--leaf); border-radius: 12px; font-size: 15px; }
.td-saved strong { color: var(--forest); letter-spacing: .02em; }
.td-link { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--forest-2); font: 600 15px var(--sans); text-decoration: underline; cursor: pointer; }

.td-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 12px 16px;
  border: 0; border-radius: 12px; background: var(--forest); color: #fff;
  font: 700 17px/1.2 var(--sans); text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: background-color .15s ease, transform .1s ease;
}
.td-btn:hover { background: var(--forest-2); }
.td-btn:active { transform: scale(.98); }
.td-btn:disabled { opacity: .6; cursor: wait; }
.td-btn-zalo { margin-top: 12px; background: var(--zalo); }
.td-btn-zalo:hover { background: #0052cc; }

.result-message { display: none; margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 15px; line-height: 1.5; font-weight: 500; }
.result-message.success { display: block; background: var(--leaf); color: var(--forest); border-left: 4px solid var(--forest-2); }
.result-message.error { display: block; background: var(--error-soft); color: var(--error); border-left: 4px solid var(--error); }

/* Diem + thanh tien do toi moc qua ke tiep */
.td-progress { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--cream); border: 1px dashed var(--gold); }
.td-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 15px; color: var(--muted); }
.td-progress-head strong { color: var(--ink); letter-spacing: .02em; }
.td-points-wrap { white-space: nowrap; }
.td-points-wrap .td-points { font-size: 34px; font-weight: 700; line-height: 1; color: var(--forest); font-variant-numeric: tabular-nums; }
.td-bar { height: 10px; margin: 12px 0 8px; background: #e7e1d1; border-radius: 99px; overflow: hidden; }
.td-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--forest-2)); border-radius: inherit; transition: width .4s ease-out; }
.td-progress-text { margin: 0; font-size: 15px; line-height: 1.5; }

/* ---------- Khoi noi dung ---------- */
.block { padding: 44px 0; }
.block-tint { background: var(--leaf); }
.block-head { margin-bottom: 24px; }
.block-title { font-family: var(--serif); font-weight: 700; font-size: clamp(26px, 6vw, 36px); line-height: 1.3; color: var(--forest); }
.block-lead { margin: 8px 0 0; color: var(--muted); max-width: 40em; }

/* Bac thang qua: doc tren mobile (duong noi ben trai), ngang tren desktop */
.ladder { position: relative; list-style: none; margin: 0; padding: 0 0 0 28px; display: grid; gap: 14px; }
.ladder::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.td-gift {
  position: relative; display: grid; grid-template-columns: 72px 1fr; grid-template-areas: "img pts" "img name";
  align-items: center; column-gap: 14px; padding: 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line);
  transition: border-color .2s ease, background-color .2s ease;
}
/* cham moc tren duong noi */
.td-gift::before {
  content: ""; position: absolute; left: -26px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--line);
}
.td-gift img { grid-area: img; width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.ladder-pts { grid-area: pts; align-self: end; font-size: 14px; color: var(--gold-ink); font-weight: 600; }
.ladder-pts b { font-size: 22px; font-weight: 700; color: var(--forest); margin-right: 2px; font-variant-numeric: tabular-nums; }
.td-gift-name { grid-area: name; align-self: start; font-weight: 600; line-height: 1.35; }
.td-gift-name small { display: block; font-weight: 500; font-size: 14px; color: var(--muted); }
/* Du diem: doi mau + chu "Du diem" (khong chi dua vao mau) */
.td-gift.is-ok { border-color: var(--forest-2); background: #f1f6ee; }
.td-gift.is-ok::before { background: var(--gold); border-color: var(--forest-2); }
.td-gift.is-ok .td-gift-name::after { content: "✓ Đủ điểm đổi"; display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 99px; background: var(--forest); color: #fff; font-size: 13px; font-weight: 700; }

/* Cac buoc + video */
.how { display: grid; gap: 28px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--paper); counter-increment: s; }
.steps svg { flex: none; padding: 10px; width: 48px; height: 48px; border-radius: 14px; background: var(--forest); color: var(--gold); }
.steps h3 { font-size: 18px; line-height: 1.35; font-weight: 700; color: var(--forest); }
.steps h3::before { content: counter(s) ". "; color: var(--gold-ink); }
.steps p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.steps a { font-weight: 600; }
.video { margin: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0c1f15; box-shadow: var(--shadow); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* The le dang hoi dap */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.faq summary {
  position: relative; list-style: none; cursor: pointer; padding: 16px 48px 16px 18px; min-height: 52px;
  font-weight: 600; color: var(--forest);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details > p, .faq details > ul { margin: 0; padding: 0 18px 16px; color: var(--muted); }
.faq details > ul { padding-left: 36px; }
.faq li + li { margin-top: 4px; }

/* ---------- Footer ---------- */
.foot { background: var(--forest); color: #eef3ee; padding: 36px 0 20px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-in { display: grid; gap: 24px; }
.foot-brand { display: flex; gap: 14px; align-items: center; }
.foot-brand img { width: 56px; height: 56px; padding: 4px; border-radius: 14px; border: 1px solid rgba(201, 162, 74, .5); }
.foot-brand strong { display: block; color: #fff; font-family: var(--serif); font-size: 18px; }
.foot-brand span { font-size: 15px; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 15px; }
.foot-list span { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.foot-copy { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 14px; color: #cdd8d0; }

/* ---------- Thanh lien he nhanh ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(23, 61, 42, .08);
}
.dock a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px;
  border-radius: 12px; color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none;
}
.dock a:active { background: var(--leaf); }
.dock img { width: 22px; height: 22px; }
.dock-call { color: var(--forest) !important; }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 768px) {
  .wrap { padding: 0 24px; }
  .top-call span { display: inline; }
  .hero { padding: 40px 0 56px; }
  .hero-facts { display: flex; }
  .card-body { padding: 22px 24px 24px; }
  .block { padding: 64px 0; }
  .ladder { padding: 0; grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .ladder::before { left: 12%; right: 12%; top: 9px; bottom: auto; width: auto; height: 2px; }
  .td-gift { grid-template-columns: 1fr; grid-template-areas: "pts" "img" "name"; align-content: start; text-align: center; margin-top: 30px; padding: 16px; row-gap: 10px; }
  .td-gift::before { left: 50%; top: -30px; margin: 0 0 0 -8px; }
  .td-gift img { width: 100%; height: auto; aspect-ratio: 1; justify-self: center; }
  .ladder-pts, .td-gift-name { align-self: auto; }
  .foot-in { grid-template-columns: 1fr 1.4fr; align-items: start; }
  .foot-list { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .top-nav { display: flex; }
  .brand { margin-right: 0; }
  .top-nav { margin-left: auto; }
  .hero-in { grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start; }
  .hero-art { display: block; }
  .how { grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
  /* desktop: thanh lien he thu gon thanh cot nut tron goc phai */
  .dock { left: auto; right: 20px; bottom: 20px; grid-template-columns: 1fr; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 18px; }
  .dock a { min-height: 56px; width: 76px; font-size: 12px; }
  .dock a:hover { background: var(--leaf); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Dien thoai: can giua phan tieu de / gioi thieu cho can doi ----------
   Giu can trai cho o nhap, thong bao ket qua, the le hoi dap va bac thang qua (de doc, de nhap). */
@media (max-width: 767px) {
  .hero-copy { text-align: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .card-head { text-align: center; }
  .block-head { text-align: center; }
  .block-lead { margin-left: auto; margin-right: auto; }
  .steps li { flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 20px 16px; }
  .video figcaption { text-align: center; }
  .foot-in { text-align: center; }
  .foot-brand { flex-direction: column; gap: 10px; }
  .foot-copy { text-align: center; }
}
/* so dien thoai khong bi ngat giua chung ("0934 030 / 088") */
a[href^="tel:"] { white-space: nowrap; }
@media (max-width: 767px) {
  /* bo duong noi + cham moc ben trai de the qua rong deu 2 ben; trang thai du diem van hien bang vien + nhan "Du diem doi" */
  .ladder { padding-left: 0; }
  .ladder::before, .td-gift::before { display: none; }
}
