/* [05/12] Trang khách (trang chủ + đăng nhập/đăng ký) — sáng, chữ Inter, điểm nhấn xanh ngọc như inkica.
   Hiệu ứng: hiện dần khi cuộn tới (một lần) · chữ chạy ở tiêu đề · dải ảnh kết quả trôi ngang · vạch quét trước/sau.
   Không dùng nhấp nháy/phát sáng lặp, emoji hay chữ in hoa giãn cách (luật trang khách 25/11). Người bật giảm chuyển động ⇒ đứng yên. */
:root { --ink: #0f172a; --mute: #64748b; --line: #e2e8f0; --soft: #f8fafc; --brand: #0891b2; --brand2: #2563eb; --ok: #059669; --r: 18px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.lp { margin: 0; font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
.lp a { color: inherit; text-decoration: none; }
.lp img { display: block; max-width: 100%; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
/* bộ icon chung (icons.js) vẽ bằng NÉT — thiếu dòng này svg tô đặc thành khối đen (đo 05/12) */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
i.ic, span.ic { display: inline-flex; }
.ic svg { width: 100%; height: 100%; }

/* nút */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 15px/1 Inter, sans-serif; cursor: pointer; transition: transform .2s, background .2s, border-color .2s, box-shadow .2s; white-space: nowrap; }
.b:hover { border-color: #cbd5e1; background: var(--soft); }
.b.main { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border: 0; box-shadow: 0 8px 22px rgba(37, 99, 235, .22); }
.b.main:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(37, 99, 235, .28); background: linear-gradient(135deg, #0e7490, #1d4ed8); }
.b.dark { background: var(--ink); color: #fff; border: 0; }
.b.dark:hover { background: #1e293b; }
.b.big { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.b.full { width: 100%; }
.b:disabled { opacity: .55; cursor: default; transform: none; }

/* đầu trang */
.lp-head { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .8); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.lp-head.cuon { border-bottom-color: var(--line); }
.lp-head .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; display: grid; place-items: center; }
.logo-mark .ic { width: 19px; height: 19px; }
.lp-nav { display: flex; gap: 4px; margin-left: 12px; }
.lp-nav a { padding: 8px 12px; border-radius: 10px; color: #334155; font-weight: 500; font-size: 15px; transition: background .2s; }
.lp-nav a:hover { background: var(--soft); }
.lp-head .sp { flex: 1; }
.lp-head .act { display: flex; gap: 10px; align-items: center; }
.lp-head .act .b { height: 40px; }
.lp-menu { display: none; }

/* hero */
.hero { position: relative; padding: 72px 0 40px; text-align: center; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 640px; background: radial-gradient(closest-side, rgba(8, 145, 178, .12), transparent 70%), radial-gradient(closest-side at 70% 40%, rgba(37, 99, 235, .1), transparent 70%); pointer-events: none; }
.hero h1 { position: relative; font-size: clamp(36px, 6vw, 68px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; margin: 0 auto 18px; max-width: 980px; }
.hero h1 .chay { display: block; min-height: 1.1em; }
.hero h1 .chay b { font-weight: 800; border-bottom: 5px solid rgba(8, 145, 178, .35); }
.hero h1 .caret { display: inline-block; width: 3px; height: .9em; background: var(--brand); vertical-align: -.08em; margin-left: 4px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.hero p.sub { position: relative; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: var(--mute); max-width: 720px; margin: 0 auto 30px; }
.hero .cta { position: relative; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .tin { position: relative; margin-top: 16px; color: var(--mute); font-size: 14px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero .tin span { display: inline-flex; gap: 6px; align-items: center; }
.hero .tin .ic { width: 16px; height: 16px; color: var(--ok); }

/* khung trình diễn trước/sau */
.demo { position: relative; margin: 48px auto 0; width: min(880px, 100%); border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(15, 23, 42, .12); padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 18px; align-items: center; }
.demo .o { position: relative; border-radius: 18px; overflow: hidden; background: var(--soft); aspect-ratio: 1 / 1; }
.demo .o img { width: 100%; height: 100%; object-fit: cover; }
.demo .o.ket { background-color: #fff; background-image: linear-gradient(45deg, #eef2f7 25%, transparent 25%), linear-gradient(-45deg, #eef2f7 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eef2f7 75%), linear-gradient(-45deg, transparent 75%, #eef2f7 75%); background-size: 22px 22px; background-position: 0 0, 0 11px, 11px -11px, -11px 0; }
/* vạch quét chạy MỘT lần khi khung cuộn tới (.vao), rê chuột vào thì chạy lại (.lai) — không lặp vô hạn */
.demo .o.ket img { object-fit: contain; padding: 8%; clip-path: inset(0 100% 0 0); }
.demo .o.ket::after { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; left: 0; background: var(--brand); box-shadow: 0 0 0 4px rgba(8, 145, 178, .15); opacity: 0; }
.demo.vao .o.ket img { animation: lo 2.2s cubic-bezier(.6, 0, .3, 1) .5s both; }
.demo.vao .o.ket::after { animation: quet 2.2s cubic-bezier(.6, 0, .3, 1) .5s both; }
/* chạy lại: luân phiên hai tên keyframes (cùng tên thì trình duyệt không chạy lại) */
.demo.vao.lai1 .o.ket img { animation: lo2 1.8s cubic-bezier(.6, 0, .3, 1) both; } .demo.vao.lai1 .o.ket::after { animation: quet2 1.8s cubic-bezier(.6, 0, .3, 1) both; }
.demo.vao.lai2 .o.ket img { animation: lo 1.8s cubic-bezier(.6, 0, .3, 1) both; } .demo.vao.lai2 .o.ket::after { animation: quet 1.8s cubic-bezier(.6, 0, .3, 1) both; }
@keyframes lo { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes lo2 { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes quet { 0% { left: 0; opacity: 1; } 90% { left: 100%; opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes quet2 { 0% { left: 0; opacity: 1; } 90% { left: 100%; opacity: 1; } 100% { left: 100%; opacity: 0; } }
.demo .mui { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; display: grid; place-items: center; }
.demo .nhan { position: absolute; left: 12px; bottom: 12px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }

/* dải ảnh trôi */
.troi { margin: 64px 0 0; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.troi .ray { display: flex; gap: 16px; width: max-content; animation: troi 48s linear infinite; }
.troi:hover .ray { animation-play-state: paused; }
.troi img { width: 200px; height: 250px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); background: var(--soft); }
@keyframes troi { to { transform: translateX(-50%); } }

/* khối mục */
section.muc { padding: 96px 0; }
section.muc.xam { background: var(--soft); }
.muc-dau { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.muc-dau h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 14px; font-weight: 800; }
.muc-dau p { color: var(--mute); font-size: 17px; line-height: 1.6; margin: 0; }

/* lưới công cụ */
.cc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cc a { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; transition: transform .3s, box-shadow .3s, border-color .3s; }
.cc a:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15, 23, 42, .1); border-color: #cbd5e1; }
/* ảnh mẫu là hình in có chữ ⇒ hiện TRỌN (contain), không cắt mất chữ */
.cc .anh { aspect-ratio: 16 / 11; background: radial-gradient(circle at 50% 40%, #fff, var(--soft)); overflow: hidden; }
.cc .anh img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .6s; }
.cc a:hover .anh img { transform: scale(1.05); }
.cc .than { padding: 18px 20px 20px; display: grid; gap: 6px; }
.cc .than b { font-size: 17px; display: flex; justify-content: space-between; gap: 10px; }
.cc .than b small { font-size: 13px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.cc .than span { color: var(--mute); font-size: 14.5px; line-height: 1.5; }

/* các bước */
.buoc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: b; }
.buoc div { border-radius: var(--r); background: #fff; border: 1px solid var(--line); padding: 26px; }
.buoc div::before { counter-increment: b; content: counter(b); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #ecfeff; color: var(--brand); font-weight: 800; margin-bottom: 16px; }
.buoc b { display: block; font-size: 18px; margin-bottom: 8px; }
.buoc span { color: var(--mute); line-height: 1.6; font-size: 15px; }

/* API */
.api { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.api h2 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em; margin: 0 0 14px; }
.api p { color: var(--mute); line-height: 1.6; font-size: 16px; }
.api ul { padding: 0; margin: 18px 0 0; list-style: none; display: grid; gap: 10px; }
.api li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.api li .ic { color: var(--ok); margin-top: 2px; }
.api pre { margin: 0; background: #0b1220; color: #cbd5e1; border-radius: var(--r); padding: 22px; font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow: hidden; white-space: pre-wrap; word-break: break-all; box-shadow: 0 24px 60px rgba(15, 23, 42, .25); }
.api pre .k { color: #7dd3fc; } .api pre .s { color: #86efac; }

/* bảng giá */
.chon { display: flex; justify-content: center; margin-bottom: 30px; }
.chon .seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; flex-wrap: wrap; justify-content: center; }
.chon button { height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; font: 600 14px Inter, sans-serif; color: var(--mute); cursor: pointer; transition: background .2s, color .2s; }
.chon button.on { background: var(--ink); color: #fff; }
.chon button small { font-weight: 600; color: var(--ok); margin-left: 6px; }
.chon button.on small { color: #6ee7b7; }
.gia { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; }
.gia .g { position: relative; border: 1px solid var(--line); border-radius: 22px; background: #fff; padding: 28px; display: flex; flex-direction: column; gap: 14px; transition: transform .3s, box-shadow .3s; }
.gia .g:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(15, 23, 42, .08); }
.gia .g.hot { border: 2px solid var(--brand); box-shadow: 0 20px 50px rgba(8, 145, 178, .14); }
.gia .g .the { position: absolute; top: -13px; left: 28px; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 5px 12px; }
.gia .g h3 { margin: 0; font-size: 20px; }
.gia .g .mo { color: var(--mute); font-size: 14px; margin: 0; min-height: 40px; line-height: 1.45; }
.gia .g .so { display: flex; align-items: baseline; gap: 6px; }
.gia .g .so b { font-size: 44px; letter-spacing: -.03em; }
.gia .g .so span { color: var(--mute); }
.gia .g .phu { font-size: 13.5px; color: var(--mute); min-height: 18px; }
.gia .g .cr { font-weight: 700; background: #ecfeff; color: #0e7490; border-radius: 10px; padding: 8px 12px; font-size: 14.5px; }
.gia .g ul { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 9px; flex: 1; }
.gia .g li { display: flex; gap: 9px; font-size: 14.5px; line-height: 1.45; }
.gia .g li .ic { color: var(--ok); width: 17px; height: 17px; margin-top: 1px; }
.gia .g.nap .so b { font-size: 38px; }
.gia-mien { text-align: center; margin-top: 24px; color: var(--mute); font-size: 14.5px; }
.gia-cc { margin-top: 40px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 20px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 24px; }
.gia-cc div { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; border-bottom: 1px dashed var(--line); padding: 8px 0; min-width: 0; }
.gia-cc div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.gia-cc div b { white-space: nowrap; }

/* hỏi đáp */
.hd { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.hd details { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 0 22px; transition: box-shadow .25s; }
.hd details[open] { box-shadow: 0 12px 30px rgba(15, 23, 42, .06); }
.hd summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; font-size: 16.5px; display: flex; justify-content: space-between; gap: 16px; }
.hd summary::-webkit-details-marker { display: none; }
.hd summary .ic { transition: transform .25s; color: var(--mute); }
.hd details[open] summary .ic { transform: rotate(45deg); }
.hd details p { margin: 0 0 20px; color: var(--mute); line-height: 1.65; }

/* dải kêu gọi cuối + chân trang */
.cuoi { padding: 0 0 96px; }
.cuoi .hop { border-radius: 28px; padding: 56px 40px; text-align: center; color: #fff; background: radial-gradient(800px 300px at 20% 0%, rgba(34, 211, 238, .35), transparent), linear-gradient(135deg, #0b1220, #172554); }
.cuoi h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.03em; margin: 0 0 12px; }
.cuoi p { color: #cbd5e1; margin: 0 0 28px; font-size: 17px; }
.chan { border-top: 1px solid var(--line); padding: 36px 0; color: var(--mute); font-size: 14px; }
.chan .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.chan nav { display: flex; gap: 18px; flex-wrap: wrap; }
.chan a:hover { color: var(--ink); }

/* hiện dần khi cuộn tới — chạy MỘT lần */
.hien { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--tre, 0s); }
.hien.vao { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .cc, .buoc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .api { grid-template-columns: minmax(0, 1fr); }
  .lp-nav { display: none; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .lp-head .wrap { height: 60px; gap: 10px; }
  .lp-head .act .b.an-hep { display: none; }
  .hero { padding: 44px 0 24px; }
  .demo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; gap: 10px; border-radius: 20px; }
  .demo .mui { display: none; }
  .cc, .buoc { grid-template-columns: minmax(0, 1fr); }
  section.muc { padding: 64px 0; }
  .troi img { width: 140px; height: 175px; }
  .cuoi .hop { padding: 40px 22px; }
  .gia .g { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hien { opacity: 1; transform: none; }
  .demo .o.ket img { clip-path: none; }
  .demo .o.ket::after { display: none; }
}

/* ===== trang đăng nhập / đăng ký ===== */
body.au { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; position: relative; background: #f1f5f9; }
.au-nen { position: fixed; inset: -40px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; padding: 10px; filter: blur(3px) saturate(.9); opacity: .55; pointer-events: none; transform: rotate(-4deg) scale(1.08); }
.au-nen img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.au-nen::after { content: ''; position: fixed; inset: 0; background: radial-gradient(closest-side, rgba(248, 250, 252, .92), rgba(241, 245, 249, .6)); }
.au-the { position: relative; z-index: 2; width: min(440px, 100%); background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 30px 80px rgba(15, 23, 42, .14); padding: 34px 34px 26px; animation: noi .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes noi { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.au-the .logo { justify-content: center; margin-bottom: 18px; }
.au-the h1 { text-align: center; font-size: 28px; letter-spacing: -.03em; margin: 0 0 6px; }
.au-the .phu { text-align: center; color: var(--mute); margin: 0 0 22px; font-size: 15px; }
.au-the .qua { display: inline-flex; gap: 6px; align-items: center; margin: -8px auto 18px; padding: 6px 12px; border-radius: 999px; background: #ecfeff; color: #0e7490; font-weight: 600; font-size: 13.5px; }
.au-giua { display: flex; justify-content: center; }
.au-oauth { display: grid; gap: 10px; }
.au-oauth .b { height: 46px; }
.au-oauth svg { width: 19px; height: 19px; }
.au-hoac { display: flex; align-items: center; gap: 12px; color: #94a3b8; font-size: 13px; margin: 18px 0; }
.au-hoac::before, .au-hoac::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.au-o { display: grid; gap: 6px; margin-bottom: 14px; }
.au-o > span { font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; }
.au-o > span a { color: var(--brand); font-weight: 600; }
.au-o > span .au-tuy { font-style: normal; font-weight: 400; color: var(--mute); font-size: 12.5px; }
.au-ts { margin: 2px 0 14px; min-height: 65px; }
.au-nhap { position: relative; }
.au-nhap .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; width: 17px; height: 17px; }
.au-nhap input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding: 0 44px; font: 15px Inter, sans-serif; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s; }
.au-nhap input:focus { outline: 0; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(8, 145, 178, .12); }
.au-nhap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #94a3b8; cursor: pointer; padding: 6px; display: grid; }
.au-ma { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 6px 0 16px; }
.au-ma input { width: 100%; height: 56px; text-align: center; font: 700 24px Inter, sans-serif; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--ink); }
.au-ma input:focus { outline: 0; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(8, 145, 178, .12); }
.au-loi { min-height: 20px; color: #dc2626; font-size: 14px; margin: 2px 0 10px; }
.au-loi.tot { color: var(--ok); }
.au-day { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); flex-wrap: wrap; }
.au-day a { color: var(--brand); font-weight: 600; }
.au-day a.ve { color: var(--mute); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.au-nho { text-align: center; color: var(--mute); font-size: 12.5px; margin: 14px 0 0; line-height: 1.5; }
.au-link { background: none; border: 0; color: var(--brand); font: 600 14px Inter, sans-serif; cursor: pointer; padding: 0; }
.au-link:disabled { color: #94a3b8; cursor: default; }
@media (max-width: 640px) { .au-nen { grid-template-columns: repeat(3, minmax(0, 1fr)); } .au-the { padding: 28px 20px 22px; border-radius: 22px; } }
