/* landing/assets/bd.css — Website UniDaily "Bạn Đường" (canvas Web-* / M-*, 2026-10-10).
   Dùng chung mọi trang: token màu, chữ Nunito, nút khối, thẻ, menu (desktop + mobile), chân trang, hiệu ứng.
   Bố cục: .wrap tối đa 1200px; ≤ 900px xếp dọc (bản M-*). */

:root {
  --bg: #EEF4FB;
  --bg-2: #F7FAFF;
  --card: #FFFFFF;
  --navy: #0E1B33;
  --navy-2: #16264A;
  --navy-3: #22314F;
  --text: #0E1B33;
  --text-2: #3A4560;
  --text-3: #7A8499;
  --on-dark-2: #9FB0CC;
  --on-dark-3: #BFD4F5;
  --line: #DCE6F2;
  --edge: #D6E6FA;
  --edge-2: #C9D9EE;
  --blue: #3D8BFF;
  --blue-deep: #0B4FC4;
  --blue-soft: #BFE1FF;
  --blue-light: #8FBEFF;
  --action: #1560D6;
  --action-edge: #0A3D96;
  --sun: #FFC233;
  --sun-pale: #FFF1BF;
  --sun-soft: #FFE3A3;
  --green: #2FBF71;
  --green-soft: #CDEFD6;
  --green-ink: #0B5A31;
  --red: #E0263E;
  --red-edge: #8E0F22;
  --red-soft: #FFD3D9;
  --red-ink: #A3122A;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 700; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
.btn, summary, [type="radio"], [type="checkbox"], label:has(> [type="radio"]), label:has(> [type="checkbox"]) { cursor: pointer; }
button:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Bố cục ---------- */
.wrap { width: min(1200px, 100% - 48px); margin: 0 auto; position: relative; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1; }
.section { padding: 110px 0; position: relative; }
.section--white { background: var(--card); }
.section--navy { background: var(--navy); color: #fff; }
.section--round { border-radius: 60px 60px 0 0; }
.deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.deco > * { position: absolute; }
.section > .wrap, .hero > .wrap { z-index: 1; }

/* ---------- Chữ ---------- */
.eyebrow { font-size: 14px; font-weight: 900; letter-spacing: 1.5px; color: var(--blue-deep); text-transform: uppercase; }
.on-dark .eyebrow, .section--navy .eyebrow { color: var(--blue-light); }
.h1 { font-size: clamp(44px, 6vw, 84px); font-weight: 900; line-height: .98; letter-spacing: -2.5px; margin: 0; }
.h1--md { font-size: clamp(40px, 5vw, 72px); letter-spacing: -2px; line-height: 1; }
.h2 { font-size: clamp(32px, 3.6vw, 52px); font-weight: 900; line-height: 1.05; letter-spacing: -1px; margin: 0; }
.h3 { font-size: 24px; font-weight: 900; margin: 0; line-height: 1.2; }
.lead { font-size: clamp(17px, 1.4vw, 21px); font-weight: 700; color: var(--text-2); line-height: 1.55; margin: 0; }
.section--navy .lead, .on-dark .lead { color: var(--on-dark-2); }
.muted { color: var(--text-2); }
.small { font-size: 13px; font-weight: 700; color: var(--text-3); }
.hl { color: var(--blue-deep); }
.section--navy .hl, .on-dark .hl { color: var(--blue-light); }
.crumbs { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 800; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--blue-deep); }
.crumbs [aria-current] { color: var(--blue-deep); font-weight: 900; }
.on-dark .crumbs a { color: var(--on-dark-2); }
.on-dark .crumbs [aria-current] { color: var(--blue-light); }

/* ---------- Nút ---------- */
a, button { transition: transform .18s cubic-bezier(.3,1.4,.5,1), background-color .2s, border-color .2s, box-shadow .2s, color .2s; }
a:active, button:active { transform: scale(.96); }
.btn { min-height: 58px; padding: 0 26px; border-radius: 999px; font-size: 17px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; border: none; line-height: 1.1; }
.btn img { width: 26px; height: 26px; }
.btn--lg { min-height: 64px; font-size: 18px; padding: 0 28px; }
.btn--sm { min-height: 50px; font-size: 16px; padding: 0 22px; }
.btn--p { background: var(--action); color: #fff; box-shadow: 0 5px 0 var(--action-edge); }
.btn--p:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--action-edge); }
.btn--n { background: var(--navy); color: #fff; box-shadow: 0 5px 0 #000; }
.btn--n:hover { transform: translateY(-2px); }
.btn--g { background: var(--card); color: var(--text); box-shadow: 0 5px 0 var(--edge); }
.btn--w { background: #fff; color: var(--navy); box-shadow: 0 5px 0 var(--navy); }
.btn--ghost { background: rgba(255,255,255,.14); color: #fff; }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 5px 0 var(--red-edge); }

/* ---------- Thẻ / chip ---------- */
.card { background: var(--card); border-radius: 32px; box-shadow: 0 4px 0 var(--edge); }
.card--hero { border: 3px solid var(--navy); box-shadow: 0 6px 0 var(--blue-deep); }
.lift:hover { transform: translateY(-6px); box-shadow: 0 10px 0 var(--edge); }
.chip { min-height: 44px; padding: 0 18px; border-radius: 22px; font-size: 15px; font-weight: 900; display: inline-flex; align-items: center; gap: 8px; background: var(--card); box-shadow: 0 3px 0 var(--edge); }
.chip img { width: 24px; height: 24px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 900; padding: 4px 10px; border-radius: 999px; }
.pill--green { background: var(--green-soft); color: var(--green-ink); }
.pill--gray { background: var(--bg); color: var(--text-2); }
.ico { width: 24px; height: 24px; flex-shrink: 0; }
.num { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 20px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- Nhân vật (SVG tĩnh ở assets/char/<who>-<mood>.svg) ---------- */
.char { display: block; flex-shrink: 0; }
.char--bob { animation: bd-bob 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.char--hop { animation: bd-hop .9s ease-in-out infinite; transform-origin: 50% 100%; }
.char--sway { animation: bd-sway 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.char--float { animation: float 4s ease-in-out infinite; }
.halo { border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- Menu ---------- */
.nav { position: relative; z-index: 20; background: var(--card); border-bottom: 2px solid var(--bg); }
.nav--clear { background: transparent; border-bottom: none; }
.nav__bar { height: 92px; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 44px; height: 44px; }
.brand span { font-size: 24px; font-weight: 900; }
.brand b { color: var(--blue-deep); font-weight: 900; }
.nav__links { flex: 1; display: flex; gap: 8px; justify-content: center; }
.nav__links a { font-size: 16px; font-weight: 800; color: var(--text); text-decoration: none; padding: 10px 16px; border-radius: 20px; }
.nav__links a:hover { color: var(--blue-deep); }
.nav__links a[aria-current="page"] { font-weight: 900; color: var(--blue-deep); background: var(--bg); }
.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 14px; border: none; background: #fff; box-shadow: 0 2px 0 var(--edge); align-items: center; justify-content: center; }
.nav__menu { display: none; }

@media (max-width: 900px) {
  .nav__bar { height: 72px; gap: 10px; }
  .brand { flex: 1; }
  .brand img { width: 36px; height: 36px; }
  .brand span { font-size: 20px; }
  .nav__links { display: none; }
  .nav .btn--sm { min-height: 40px; font-size: 14px; padding: 0 14px; box-shadow: 0 3px 0 var(--action-edge); }
  .nav__toggle { display: inline-flex; }
  .nav[data-open="true"] { background: #fff; border-bottom: 2px solid var(--bg); }
  .nav[data-open="true"] .nav__menu { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 18px; }
  .nav__menu a { min-height: 54px; border-radius: 18px; background: var(--bg-2); display: flex; align-items: center; gap: 12px; padding: 0 16px; text-decoration: none; color: var(--text); font-size: 17px; font-weight: 900; }
  .nav__menu a img { width: 26px; height: 26px; }
  .nav__menu a span { flex: 1; }
  .nav__menu a::after { content: "›"; color: var(--text-3); font-size: 20px; }
  .nav__menu a[aria-current="page"] { background: var(--blue-soft); }
}

/* ---------- Chân trang ---------- */
.footer { background: var(--navy); color: #fff; padding: 60px 0 36px; }
.footer__top { display: flex; gap: 60px; }
.footer__about { width: 380px; display: flex; flex-direction: column; gap: 14px; }
.footer__about p { margin: 0; font-size: 16px; color: var(--on-dark-2); line-height: 1.5; }
.footer .brand { color: #fff; }
.footer .brand b { color: var(--blue-light); }
.footer__col { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.footer__col h2 { font-size: 14px; font-weight: 900; letter-spacing: 1px; margin: 0; }
.footer__col a { font-size: 15px; font-weight: 700; color: var(--on-dark-3); text-decoration: none; }
.footer__col a:hover { color: #fff; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--navy-3); padding-top: 22px; margin-top: 40px; font-size: 14px; color: #7A8BAA; }
.footer__bottom .chars { display: flex; align-items: flex-end; gap: 6px; }
@media (max-width: 900px) {
  .footer__top { flex-direction: column; gap: 30px; }
  .footer__about { width: auto; }
  .footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
}
@media (min-width: 901px) { .footer__cols { display: contents; } }

/* ---------- Hỏi đáp (accordion) ---------- */
.faq { background: var(--card); border-radius: 24px; box-shadow: 0 3px 0 var(--edge); overflow: hidden; border: 3px solid #fff; }
.faq[data-open="true"] { border-color: var(--navy); }
.faq > button { display: flex; align-items: center; gap: 14px; width: 100%; border: none; background: none; padding: 22px 26px; text-align: left; color: var(--text); font-size: 19px; font-weight: 900; }
.faq > button > span:first-child { flex: 1; }
.faq__icon { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .3s, background-color .2s; }
.faq[data-open="true"] .faq__icon { transform: rotate(45deg); background: var(--blue); }
.faq__body { padding: 0 26px 22px; font-size: 17px; font-weight: 700; color: var(--text-2); line-height: 1.55; animation: swap .3s both; }
.faq__body[hidden] { display: none; }
@media (max-width: 900px) { .faq > button { font-size: 17px; padding: 18px 18px; } .faq__body { padding: 0 18px 18px; font-size: 16px; } }

/* ---------- Ô nhập ---------- */
.field { min-height: 56px; border-radius: 20px; border: 2px solid var(--line); background: var(--bg-2); padding: 0 18px; font-family: inherit; font-size: 17px; font-weight: 800; color: var(--text); width: 100%; transition: box-shadow .2s, border-color .2s; }
textarea.field { padding: 14px 18px; min-height: 130px; resize: vertical; }
.field:focus { outline: none; box-shadow: 0 0 0 4px rgba(61,139,255,.3); border-color: var(--blue); }
input[type=range] { accent-color: var(--blue-deep); width: 100%; }

/* ---------- Điện thoại minh hoạ ---------- */
.phone { width: 320px; height: 660px; border-radius: 52px; background: var(--navy); padding: 12px; box-shadow: 0 30px 60px rgba(11,79,196,.25); flex-shrink: 0; }
.phone__screen { width: 100%; height: 100%; border-radius: 42px; overflow: hidden; position: relative; background: var(--bg); }
.phone__notch { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: 96px; height: 26px; border-radius: 13px; background: var(--navy); z-index: 5; }
.float-card { position: absolute; background: #fff; border-radius: 22px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; box-shadow: 0 12px 30px rgba(14,27,51,.14); animation: float 4s ease-in-out infinite; z-index: 3; }
.float-card b { display: block; font-size: 14px; font-weight: 900; }
.float-card small { display: block; font-size: 12px; font-weight: 700; color: var(--text-2); }

/* ---------- Hiệu ứng ---------- */
@keyframes bd-bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6%) } }
@keyframes bd-hop { 0%,100% { transform: translateY(0) scale(1,1) } 20% { transform: translateY(0) scale(1.08,.9) } 50% { transform: translateY(-18%) scale(.95,1.05) } 80% { transform: translateY(0) scale(1.05,.95) } }
@keyframes bd-sway { 0%,100% { transform: rotate(-4deg) } 50% { transform: rotate(4deg) } }
@keyframes bd-pop { 0%,100% { transform: scale(1) } 40% { transform: scale(1.12) } }
@keyframes rise { from { transform: translateY(24px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes swap { from { transform: translateY(12px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
@keyframes dash { to { stroke-dashoffset: -48 } }
@keyframes pulse { 0% { transform: scale(.6); opacity: .7 } 100% { transform: scale(2); opacity: 0 } }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes lost { 0%,100% { transform: rotate(-8deg) translateX(-10px) } 50% { transform: rotate(8deg) translateX(10px) } }
@keyframes sos-ring { 0%,100% { box-shadow: 0 10px 0 var(--red-edge), 0 0 0 0 rgba(224,38,62,.5) } 50% { box-shadow: 0 10px 0 var(--red-edge), 0 0 0 22px rgba(224,38,62,0) } }
.rise { animation: rise .6s both; }
.rise-2 { animation: rise .6s .15s both; }
.dash { stroke-dasharray: 14 10; animation: dash 1.4s linear infinite; }
/* Hiện dần khi cuộn tới (bd.js thêm .in) */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s cubic-bezier(.2,.9,.3,1.1); }
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Tiện ích responsive ---------- */
.row { display: flex; gap: 24px; }
.col { display: flex; flex-direction: column; gap: 16px; }
.center { text-align: center; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) {
  .section { padding: 70px 0; }
  .section--round { border-radius: 40px 40px 0 0; }
  .wrap { width: calc(100% - 32px); }
  .row { flex-direction: column; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hide-m { display: none !important; }
}
@media (min-width: 901px) { .hide-d { display: none !important; } }
