/* Trang chờ của Mibi. Nền phẳng, ô trắng, màu chỉ nằm ở biểu tượng; mọi giá trị lấy từ biến bên dưới. */
:root {
  --bg: #eef0f5;
  --surface: #ffffff;
  --ink: #15151b;
  --ink-2: #33363f;
  --muted: #5b5e69;
  --faint: #646775;
  --line: #dcdfe7;
  --line-soft: #e6e8ee;
  --accent: #4b51d1;
  --accent-ink: #373b98;
  --ok: #237a52;
  --err: #c93c45;

  --violet-bg: #ecebff; --violet-fg: #4d4590;
  --green-bg: #e3f4ea; --green-fg: #2f6b4f;
  --yellow-bg: #fff1c2; --yellow-fg: #6a4c00;
  --blue-bg: #e3f1ff; --blue-fg: #245a78;
  --red-bg: #ffe6e1; --red-fg: #7b3328;

  --font: "Be Vietnam Pro", -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 13px; --fs-s: 14px; --fs-m: 16px; --fs-l: 17px; --fs-xl: 20px;
  --fs-h2: 26px; --fs-h1: 36px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s24: 96px;

  --r-s: 12px; --r-m: 16px; --r-l: 24px; --r-pill: 999px;
  --shadow-float: 0 1px 2px rgb(30 32 52 / 6%), 0 8px 20px rgb(30 32 52 / 10%), 0 24px 48px rgb(30 32 52 / 12%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 150ms; --t-mid: 240ms;

  --gutter: 24px;
  --container: 1120px;
}

@media (min-width: 960px) {
  :root { --fs-h2: 34px; --fs-h1: 48px; --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-m);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.flow-open { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; }
a { color: var(--accent-ink); }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgb(75 81 209 / 55%); outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 60;
  padding: var(--s3) var(--s4); border-radius: var(--r-s);
  background: var(--ink); color: #fff; text-decoration: none;
}
.skip-link:focus { top: var(--s3); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow > * { max-width: 760px; }
.closing .container > * { margin-left: auto; margin-right: auto; }

/* Thanh trên cùng */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgb(238 240 245 / 92%);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid) var(--ease);
}
.topbar.is-scrolled { border-bottom-color: var(--line-soft); }
.topbar-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 30px; width: auto; }
.topbar-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s5);
  border-radius: var(--r-pill); background: var(--ink); color: #fff;
  font-size: var(--fs-s); font-weight: 700; text-decoration: none;
}
.topbar-cta:hover { background: #2b2b35; }

/* Màn đầu */
.hero { padding: var(--s2) 0 var(--s16); }
.hero-grid { display: grid; gap: var(--s12); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2);
  height: 30px; padding: 0 var(--s3); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-2);
  font-size: var(--fs-s); font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.h1-line { display: block; }
.hero h1 {
  margin-top: var(--s3);
  font-size: var(--fs-h1); line-height: 1.06; font-weight: 800; letter-spacing: -.025em;
}
.lead { margin-top: var(--s3); font-size: var(--fs-l); color: var(--muted); max-width: 34ch; }

.signup { margin-top: var(--s5); max-width: 480px; outline: none; }
.field-wrap + .field-wrap { margin-top: var(--s3); }
.field {
  position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(75 81 209 / 22%); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field.is-invalid { border-color: var(--err); }
.field label { position: absolute; top: 9px; left: var(--s4); right: var(--s4); pointer-events: none; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.optional { font-weight: 500; }
.field input { display: block; width: 100%; height: 60px; padding: 24px var(--s4) 6px; border: 0; border-radius: 14px; background: transparent; font-size: var(--fs-l); }
.field input:focus { outline: none; }
.other label { display: block; margin: 0 0 var(--s1) 2px; font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); }
.other input, .flow textarea {
  width: 100%; height: 54px; padding: 0 var(--s4);
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  font-size: var(--fs-l);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field input::placeholder, .other input::placeholder, .flow textarea::placeholder { color: #767987; }
.other input:focus, .flow textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(75 81 209 / 22%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field-msg { min-height: 0; margin: var(--s1) 2px 0; font-size: var(--fs-xs); color: var(--faint); }
.field-msg:empty { display: none; }
.field-msg.is-error { color: var(--err); }

.consent { display: flex; gap: var(--s3); align-items: flex-start; margin-top: var(--s4); }
.consent .link-btn { font-size: inherit; }
.consent input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.consent-text { font-size: var(--fs-s); line-height: 1.45; color: var(--ink-2); }
.consent-text label { cursor: pointer; }
.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--accent-ink); font-size: var(--fs-s); text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--accent); }
.turnstile { margin-top: var(--s4); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 56px; padding: 0 var(--s6); border-radius: var(--r-m); border: 0;
  font-size: var(--fs-l); font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.btn:active { transform: scale(.99); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { width: 100%; margin-top: var(--s4); background: var(--ink); color: #fff; }
.btn-primary:hover:not([disabled]) { background: #2b2b35; }
.btn-primary.is-loading { opacity: .7; cursor: progress; }
.btn-inline { width: auto; min-width: 240px; }
.btn-ghost { width: 100%; margin-top: var(--s6); background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: #c7cad4; }

.form-msg { margin-top: var(--s3); font-size: var(--fs-s); color: var(--err); }
.form-msg:empty { display: none; }
.form-msg.is-info { color: var(--ink-2); }
.signup-note { margin-top: var(--s4); font-size: var(--fs-s); color: var(--muted); }
.signup-note strong { color: var(--ink); font-weight: 600; }

.already { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s5); border-radius: var(--r-m); background: var(--surface); }
.already-title { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.01em; }
.already-text { margin-top: var(--s1); color: var(--muted); }
.tick {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--green-bg); color: var(--ok);
}
.tick svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tick.big { width: 56px; height: 56px; background: var(--surface); }
.tick.big svg { width: 28px; height: 28px; }

/* Ảnh minh họa app, vẽ bằng HTML để nét trên mọi màn hình */
.hero-visual { display: flex; justify-content: center; }
.demo { position: relative; width: 100%; max-width: 380px; }
.demo-total { position: relative; overflow: hidden; padding: 18px; border-radius: var(--r-l); background: #22243b; color: #fff; }
.demo-total::after {
  content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
  right: -70px; top: -80px; background: rgb(174 232 134 / 20%);
}
.demo-total-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; }
.demo-label { font-size: 12px; font-weight: 600; color: #c8cad7; }
.demo-amount { margin-top: 2px; font-size: 34px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.demo-delta { margin-top: var(--s1); font-size: 12px; font-weight: 600; color: #bdf0a0; }
.demo-chart-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: rgb(255 255 255 / 10%); color: #dfe3ff; }
.demo-chart-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.demo-bars { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 6px; height: 56px; margin-top: var(--s3); }
.demo-bars i { flex: 1; border-radius: 5px 5px 2px 2px; background: rgb(255 255 255 / 18%); }
.demo-bars i.today { background: #aee886; }
/* Chiều cao cột biểu đồ minh họa, đặt trong CSS để trang chạy được với CSP không cho style inline. */
.demo-bars i:nth-child(1) { height: 36%; } .demo-bars i:nth-child(2) { height: 58%; }
.demo-bars i:nth-child(3) { height: 44%; } .demo-bars i:nth-child(4) { height: 82%; }
.demo-bars i:nth-child(5) { height: 62%; } .demo-bars i:nth-child(6) { height: 48%; }
.demo-bars i:nth-child(7) { height: 70%; }

.demo-notif {
  position: relative; z-index: 2; margin: -22px -10px 0; padding: 14px 16px;
  border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-float);
}
.demo-notif-head { display: flex; gap: var(--s3); align-items: center; }
.demo-notif-head img { width: 40px; height: 40px; border-radius: 11px; }
.demo-notif-head > div { flex: 1; }
.demo-notif-app { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--faint); }
.demo-notif-app span + span { font-weight: 500; letter-spacing: 0; }
.demo-notif-title { font-size: 15px; font-weight: 700; }
.demo-notif-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-top: var(--s3); }
.demo-notif-amount { font-size: 24px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.demo-place { padding: 5px 10px; border-radius: var(--r-pill); background: #fff8df; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.demo-notif-time { margin-top: 2px; font-size: 12.5px; color: var(--faint); }
.demo-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); margin-top: var(--s3); }
.demo-cats span { padding: 9px 4px; border-radius: var(--r-s); text-align: center; font-size: 11.5px; font-weight: 700; }
.c-food { background: var(--yellow-bg); color: var(--yellow-fg); }
.c-move { background: var(--violet-bg); color: var(--violet-fg); }
.c-shop { background: var(--blue-bg); color: var(--blue-fg); }
.c-other { background: #eff0f4; color: var(--ink-2); }

.demo-list-title { margin: var(--s4) 4px var(--s2); font-size: 12px; font-weight: 700; }
.demo-list { list-style: none; margin: 0; padding: 0; border-radius: 20px; background: var(--surface); overflow: hidden; }
.demo-list li { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 14px; }
.demo-list li + li { border-top: 1px solid var(--line-soft); }
.demo-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; }
.demo-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-shop-bg { background: var(--yellow-bg); color: var(--yellow-fg); }
.c-in-bg { background: #eff0f4; color: var(--ink-2); }
.demo-row-main { flex: 1; min-width: 0; }
.demo-row-main strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 700; }
.demo-row-main small { display: block; font-size: 11.5px; color: var(--faint); }
.demo-row-amt { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.demo-row-amt.is-in { color: var(--ok); }

@media (min-width: 960px) {
  .hero { padding: var(--s12) 0 var(--s24); }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: center; gap: var(--s16); }
  .lead { font-size: var(--fs-xl); }
  .hero-visual { justify-content: flex-end; }
}

/* Các phần bên dưới: không bọc thẻ, chỉ biểu tượng có màu */
.section { padding: var(--s12) 0; }
.section h2 { font-size: var(--fs-h2); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.section-lead { margin-top: var(--s3); font-size: var(--fs-l); color: var(--muted); max-width: 60ch; }
.section-foot { margin-top: var(--s8); font-size: var(--fs-s); color: var(--muted); }

.steps { list-style: none; margin: var(--s8) 0 0; padding: 0; display: grid; gap: var(--s8); }
.step-no {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: var(--fs-s); font-weight: 700;
}
.step h3, .item h3 { margin-top: var(--s3); font-size: var(--fs-l); font-weight: 700; letter-spacing: -.01em; }
.step p, .item p { margin-top: var(--s1); color: var(--muted); max-width: 46ch; }

.grid-list { list-style: none; margin: var(--s8) 0 0; padding: 0; display: grid; gap: var(--s8) var(--s10); }
.item { display: flex; gap: var(--s4); align-items: flex-start; }
.item h3 { margin-top: 0; }
.ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-s); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-violet { background: var(--violet-bg); color: var(--violet-fg); }
.ico-green { background: var(--green-bg); color: var(--green-fg); }
.ico-yellow { background: var(--yellow-bg); color: var(--yellow-fg); }
.ico-blue { background: var(--blue-bg); color: var(--blue-fg); }
.ico-red { background: var(--red-bg); color: var(--red-fg); }

.offer .btn-inline, .closing .btn-inline { margin-top: var(--s6); }

.faq { margin-top: var(--s6); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  min-height: 56px; padding: var(--s3) 0; cursor: pointer; list-style: none;
  font-size: var(--fs-l); font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint);
  transform: rotate(45deg) translateY(-3px); transition: transform var(--t-mid) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding: 0 0 var(--s5); color: var(--muted); max-width: 64ch; }

.founder { margin: 0; }
.founder blockquote { margin: 0; }
.founder blockquote p { font-size: var(--fs-xl); line-height: 1.55; font-weight: 500; color: var(--ink-2); }
.founder figcaption { display: flex; gap: var(--s3); align-items: center; margin-top: var(--s5); }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
.founder figcaption strong { display: block; font-size: var(--fs-m); }
.founder figcaption small { display: block; font-size: var(--fs-s); color: var(--faint); }

.closing { text-align: center; padding-bottom: var(--s16); }
.closing-note { margin-top: var(--s3); font-size: var(--fs-s); color: var(--muted); }

.footer { border-top: 1px solid var(--line); padding: var(--s8) 0 calc(var(--s8) + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: var(--s2); font-size: var(--fs-s); color: var(--muted); }

@media (min-width: 640px) {
  .grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .section { padding: var(--s16) 0; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s10); }
  .grid-list:not(.two) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .founder blockquote p { font-size: 24px; }
  .footer-inner { grid-template-columns: 1fr auto; }
}

/* Màn câu hỏi sau khi giữ chỗ: phủ cả trang, một cột giữa màn hình */
.flow { position: fixed; inset: 0; z-index: 50; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); }
.flow-top, .flow-body { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 var(--gutter); }
.flow-bar { height: 64px; display: flex; align-items: center; }
.flow-bar img { height: 30px; width: auto; }
.flow-progress { display: flex; gap: 6px; margin: var(--s1) 0 var(--s8); }
.flow-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background-color var(--t-mid) var(--ease); }
.flow-progress i.is-on { background: var(--ink); }
.flow-progress.is-hidden { visibility: hidden; }
.flow-body { padding-bottom: var(--s16); }
.flow-step { display: none; }
.flow-step.is-active { display: block; animation: step-in var(--t-mid) var(--ease) both; }
.flow-step.is-center { text-align: center; padding-top: var(--s6); }
.flow-step.is-center .tick, .flow-step.is-center .thanks-icon { margin: 0 auto var(--s5); }
.thanks-icon { width: 64px; height: 64px; border-radius: 16px; }
.flow-title { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.015em; outline: none; }
.flow-text { margin-top: var(--s2); color: var(--muted); }
.flow-q { margin-bottom: var(--s5); font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -.015em; outline: none; }
.flow-q label { cursor: text; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  min-height: 46px; padding: 0 var(--s4); border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  font-size: var(--fs-m); font-weight: 600; color: var(--ink-2);
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.chip.big { min-height: 54px; padding: 0 var(--s6); font-size: var(--fs-l); }
.chip:hover { border-color: #c2c5d0; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.other { margin-top: var(--s5); }
.flow textarea { height: auto; min-height: 120px; padding: var(--s3) var(--s4); resize: vertical; line-height: 1.5; }
.skip {
  display: block; min-height: 44px; margin: var(--s3) auto 0; padding: 0 var(--s4);
  border: 0; background: none; cursor: pointer; color: var(--muted); font-size: var(--fs-m);
}
.skip:hover { color: var(--ink); text-decoration: underline; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (min-width: 960px) {
  .flow-body { padding-top: 6vh; }
  .flow-q { font-size: 30px; }
  .flow-title { font-size: 34px; }
}

/* Cách Mibi dùng thông tin đăng ký */
.policy {
  width: min(560px, calc(100% - 2 * var(--s4))); max-height: calc(100dvh - 2 * var(--s8));
  padding: var(--s6); border: 0; border-radius: 20px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-float);
}
.policy::backdrop { background: rgb(21 21 27 / 45%); }
.policy-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); }
.policy h2 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.01em; }
.close-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -10px 0 0; border: 0; border-radius: 50%; background: none; cursor: pointer; color: var(--muted); }
.close-btn:hover { background: var(--bg); color: var(--ink); }
.close-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.policy dl { margin: var(--s4) 0 0; }
.policy dt { margin-top: var(--s4); font-size: var(--fs-s); font-weight: 700; }
.policy dd { margin: var(--s1) 0 0; font-size: 15px; color: var(--muted); }

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