/* MoveLet — trang giới thiệu tĩnh, phục vụ tại /movelet.
   Tranh của bộ asset có viền nâu sẫm + mảng màu phẳng, nên giao diện dùng viền nâu
   và bóng cứng (không blur). Màu cam lấy từ nền icon, xanh lá từ chiếc lá trên đầu Momo. */

:root {
  --ink: #4a2c17;        /* nét viền nâu của tranh */
  --text: #4f3626;
  --orange: #f08a4b;     /* nền icon */
  --orange-dark: #d86f30;
  --leaf: #7dbb4a;
  --leaf-soft: #e6f3d6;
  --cream: #fff4e6;      /* nền trang */
  --paper: #fffaf3;
  --peach: #ffe3cc;
  --line: 2.5px solid var(--ink);
  --drop: 0 5px 0 var(--ink);
  --display: "Baloo 2", "Be Vietnam Pro", system-ui, sans-serif;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.25rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
:focus-visible { outline: 3px solid var(--orange-dark); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 2.5rem, 1120px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Thanh trên ---------- */
.top { padding: 1rem 0 0; }
.top-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 800 1.35rem/1 var(--display); color: var(--ink); text-decoration: none;
}
.brand img { border-radius: 11px; border: 2px solid var(--ink); }
.top-links { display: flex; align-items: center; gap: 1.5rem; font-weight: 500; font-size: .98rem; }
.top-links a { text-decoration: none; }
.top-links a:hover, .top-links a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
.wide-only { display: none; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: 700 1.2rem/1 var(--display); text-decoration: none; cursor: pointer;
  padding: .9rem 1.5rem; border: var(--line); border-radius: 18px; box-shadow: var(--drop);
  transition: transform .08s, box-shadow .08s, background-color .15s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn-main { flex: 1; background: var(--orange); color: #fff; }
.btn-main:hover { background: var(--orange-dark); }
.btn-ghost { background: var(--paper); color: var(--ink); font-size: 1.05rem; padding-inline: 1.1rem; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1rem;
  font-weight: 600; font-size: .95rem; color: var(--ink);
  background: var(--leaf-soft); border: 2px solid var(--ink); border-radius: 999px; padding: .3rem .9rem .3rem .4rem;
}
.lead { margin-top: 1.25rem; font-size: 1.2rem; max-width: 34em; }
.try-hint {
  display: flex; gap: .6rem; align-items: flex-start; margin-top: 1.5rem;
  max-width: 30em; font-size: .98rem; font-weight: 500; color: var(--ink);
}
.try-hint img { flex: none; margin-top: .15rem; }

/* ---------- Demo: bàn của Momo ---------- */
.demo {
  background: var(--paper); border: var(--line); border-radius: 28px;
  box-shadow: 0 8px 0 var(--ink); overflow: hidden;
}
/* Mọi lớp đặt theo % của khung phòng 1200×800, khớp với bố cục trong app. */
.scene { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-bottom: var(--line); container-type: inline-size; }
.scene > img { position: absolute; }
.room { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.momo {
  left: 30%; width: 40%; top: 26.25%;
  transition: left .5s ease, width .5s ease, top .5s ease;
}
.desk { left: 0; bottom: 0; width: 100%; transition: transform .5s ease; }
.thing { bottom: 18.1%; transition: transform .5s ease, opacity .3s; transform-origin: bottom center; }
.laptop { left: 10.4%; width: 20.8%; }
.mug { left: 68.5%; width: 9.2%; }
.plant { left: 83.5%; width: 9.2%; }

/* Khi tập: bàn trượt xuống, Momo đứng lên cho thấy cả người. */
.demo[data-state="ready"] .desk,
.demo[data-state="move"] .desk,
.demo[data-state="done"] .desk { transform: translateY(105%); }
.demo[data-state="ready"] .thing,
.demo[data-state="move"] .thing,
.demo[data-state="done"] .thing { transform: translateY(160%); opacity: 0; }
.demo[data-state="ready"] .momo,
.demo[data-state="move"] .momo { left: 27%; width: 46%; top: 21%; }
.demo[data-state="done"] .momo { opacity: 0; }

.cheer { left: 8%; width: 46%; bottom: -1%; animation: hop .6s ease-out; }
@keyframes hop { from { transform: translateY(12%) scale(.92); } to { transform: none; } }

.count-big {
  position: absolute; right: 7%; top: 8%;
  font: 800 clamp(3rem, 16cqw, 7rem)/1 var(--display); color: #fff;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--ink);
}
.count-big.pop { animation: pop .5s ease-out; }
@keyframes pop { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.reveal {
  position: absolute; right: 6%; top: 12%; width: 36%;
  display: grid; justify-items: center; gap: .2rem;
  background: var(--paper); border: var(--line); border-radius: 20px; box-shadow: var(--drop);
  padding: .5rem .5rem .7rem; animation: rise .5s cubic-bezier(.2, 1.4, .5, 1);
}
.reveal img { width: 78%; animation: bob 2.4s ease-in-out infinite; }
.reveal p { font: 700 clamp(.85rem, 3.2cqw, 1.3rem)/1.1 var(--display); color: var(--ink); text-align: center; }
.reveal p span { font-weight: 600; color: var(--text); }
@keyframes rise { from { transform: translateY(30%) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bob { 50% { transform: translateY(-6%); } }

.bubble {
  position: absolute; left: 4%; top: 5%; max-width: 46%;
  background: #fff; border: var(--line); border-radius: 18px; padding: .5rem .8rem;
  font: 600 clamp(.78rem, 2.5cqw, 1.02rem)/1.35 var(--body); color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.demo[data-state="done"] .bubble { left: auto; right: 4%; top: auto; bottom: 5%; max-width: 50%; }
.demo[data-state="done"] .reveal:not([hidden]) ~ .bubble { bottom: auto; top: 4%; right: auto; left: 4%; }

.panel { padding: 1.1rem 1.2rem 1.2rem; display: grid; gap: .85rem; }
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.now { font-size: .95rem; }
.now-label { display: block; font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.now b { font: 800 1.45rem/1.1 var(--display); color: var(--ink); }
.chip {
  padding: .3rem .8rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--peach);
  font-size: .88rem; font-weight: 600; color: var(--ink);
}
.bar { height: 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--leaf); transition: width .12s linear; }
.actions { display: flex; gap: .6rem; }
.rooms { display: flex; gap: .45rem; overflow-x: auto; padding: .2rem .1rem .45rem; scrollbar-width: thin; }
.rooms button {
  flex: none; width: 66px; padding: 0; cursor: pointer; background: none;
  border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; opacity: .7;
  transition: opacity .15s, transform .15s;
}
.rooms button:hover { opacity: 1; }
.rooms button[aria-pressed="true"] { opacity: 1; outline: 3px solid var(--orange); outline-offset: 1px; }
.fine { font-size: .82rem; opacity: .75; }

/* ---------- Dải nền ---------- */
.band { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.band-cream { background: var(--paper); border-block: var(--line); }
.band-leaf { background: var(--leaf-soft); border-block: var(--line); }
.band-deep { background: var(--orange); color: #fff; border-top: var(--line); }
.band-deep h2 { color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.head { max-width: 40em; margin-bottom: 2.5rem; }
.head p { margin-top: .75rem; font-size: 1.12rem; }

/* ---------- Các bước ---------- */
.steps { display: grid; gap: 1.5rem; }
.steps li {
  background: var(--cream); border: var(--line); border-radius: 24px; box-shadow: var(--drop);
  padding: 1rem 1.4rem 1.5rem; display: grid; gap: .5rem;
}
.steps img { width: 150px; height: 160px; object-fit: contain; object-position: bottom; margin: 0 auto .4rem; }

/* ---------- Bài tập ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filters button, .cards button { cursor: pointer; }
.filters button {
  padding: .45rem 1.05rem; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper); font-weight: 600; box-shadow: 0 3px 0 var(--ink);
}
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.breaks { display: grid; gap: 1.5rem; align-items: start; }
.preview {
  display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 1rem; align-items: center;
  background: var(--paper); border: var(--line); border-radius: 24px; box-shadow: var(--drop);
  padding: 1rem 1.2rem; scroll-margin-top: 1rem;
}
.preview-stage { background: var(--peach); border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; aspect-ratio: 7 / 8; }
.preview-stage img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.preview-body { display: grid; gap: .5rem; justify-items: start; }
.preview-tag { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-dark); }
.preview-body h3 { font-size: 1.55rem; }
.moves { display: grid; gap: .3rem; margin: .2rem 0 .5rem; counter-reset: mv; }
.moves li {
  counter-increment: mv; display: flex; gap: .5rem; align-items: center;
  font-size: .95rem; font-weight: 500; opacity: .6; transition: opacity .2s;
}
.moves li::before {
  content: counter(mv); flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem;
  border: 2px solid var(--ink); border-radius: 50%; font: 700 .8rem/1 var(--display); background: #fff;
}
.moves li.on { opacity: 1; color: var(--ink); }
.moves li.on::before { background: var(--leaf); color: #fff; }
.preview .btn { font-size: 1.02rem; padding: .7rem 1.1rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .9rem; }
.cards button {
  width: 100%; height: 100%; display: grid; justify-items: center; gap: .1rem; text-align: center;
  background: #fff; border: 2px solid var(--ink); border-radius: 20px; padding: .7rem .5rem .9rem;
  box-shadow: 0 4px 0 var(--ink); transition: transform .12s;
}
.cards button:hover { transform: translateY(-3px); }
.cards button[aria-pressed="true"] { background: var(--peach); outline: 3px solid var(--orange); outline-offset: 2px; }
.cards img { width: 96px; height: 96px; margin-bottom: .3rem; }
.cards b { font: 700 1.08rem/1.15 var(--display); color: var(--ink); }
.cards span { font-size: .82rem; opacity: .75; }

/* ---------- Sprite ---------- */
.sprites-grid { display: grid; gap: 2.5rem; align-items: center; }
.sprites-copy p { margin-top: .9rem; font-size: 1.1rem; max-width: 30em; }
.sprites-count { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--ink); }
.sprites-count b { font: 800 1.6rem/1 var(--display); }
.fine-dark { font-size: .92rem !important; opacity: .8; }
.sprites { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
.sprites li { display: grid; justify-items: center; gap: .15rem; text-align: center; }
.sprites img { width: 100%; max-width: 110px; }
.sprites span { font: 700 .95rem/1.1 var(--display); color: var(--ink); }
.sprites .unmet img { filter: brightness(0) opacity(.18); }
.sprites .unmet span { opacity: .5; letter-spacing: .1em; }
.sprites .met img { animation: bob 3s ease-in-out infinite; }
.sprites li:nth-child(2n) img { animation-delay: -1.2s; }

/* ---------- Bàn ---------- */
.display { position: relative; max-width: 900px; margin: 0 auto; }
.display-items {
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(.3rem, 1.5vw, 1.2rem);
  padding-inline: 4%; margin-bottom: -2.2%;
}
.display-items img { width: auto; height: clamp(52px, 11vw, 120px); min-width: 0; flex: 0 1 auto; object-fit: contain; }
.display-items img:nth-child(3) { height: clamp(62px, 13vw, 140px); }
.display-desk { width: 100%; position: relative; }
.room-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin-top: 2.5rem; }
.room-strip li { display: grid; gap: .35rem; text-align: center; font-weight: 600; font-size: .9rem; color: var(--ink); }
.room-strip img { border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }

/* ---------- Huy hiệu ---------- */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 1.2rem .8rem; }
.badges li { display: grid; justify-items: center; gap: .35rem; text-align: center; }
.badges img { width: 96px; transition: transform .2s; }
.badges li:hover img { transform: rotate(-6deg) scale(1.06); }
.badges span { font: 700 .98rem/1.15 var(--display); color: var(--ink); }

/* ---------- Ra mắt ---------- */
.launch { display: grid; gap: 1.5rem; align-items: center; justify-items: center; text-align: center; }
.launch img { width: 220px; }
.launch p { margin: .8rem 0 1.5rem; font-size: 1.15rem; max-width: 30em; }

/* ---------- Chân trang ---------- */
.foot { background: var(--ink); color: #f5e6d6; padding: 2rem 0 2.5rem; }
.foot .brand { color: #fff; }
.foot .brand img { border-color: #f5e6d6; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.foot-row ul { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .95rem; }
.foot-note { margin-top: 1.25rem; font-size: .85rem; opacity: .8; }

/* ---------- Trang văn bản (privacy, support) ---------- */
.doc { padding: 2rem 0 5rem; }
.doc .wrap { max-width: 780px; }
.doc-head { position: relative; padding: 1rem 0 2rem; padding-right: 150px; min-height: 170px; }
.doc-head img { position: absolute; right: 0; top: 0; width: 140px; }
.meta { margin-top: .75rem; opacity: .85; }
.doc h2 { font-size: 1.6rem; margin: 2.4rem 0 .7rem; scroll-margin-top: 1rem; }
.doc h3 { font-size: 1.15rem; margin: 1.4rem 0 .4rem; }
.doc p, .doc ul, .doc table { margin-bottom: .9rem; }
.doc ul:not(.toc) { list-style: disc; padding-left: 1.3rem; }
.doc ul li { margin-bottom: .35rem; }
.doc a { color: var(--orange-dark); font-weight: 500; }
.note-card {
  background: var(--paper); border: var(--line); border-radius: 22px; box-shadow: var(--drop);
  padding: 1.3rem 1.5rem; margin: .5rem 0 2rem;
}
.note-card h2 { margin-top: 0; font-size: 1.35rem; }
.toc { list-style: decimal !important; padding-left: 1.3rem; columns: 2 220px; gap: 2rem; margin-bottom: 1rem; }
.toc li { margin-bottom: .25rem; }
table { width: 100%; border-collapse: collapse; font-size: .96rem; background: #fff; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; }
th, td { text-align: left; vertical-align: top; padding: .65rem .8rem; border-bottom: 1.5px solid #e8d6c4; }
th { background: var(--peach); color: var(--ink); font-family: var(--display); font-size: 1.02rem; }
.faq h2 { font-size: 1.4rem; margin-top: 2rem; }
.faq details {
  background: #fff; border: 2px solid var(--ink); border-radius: 16px; margin-bottom: .6rem;
  box-shadow: 0 3px 0 var(--ink);
}
.faq summary { cursor: pointer; padding: .85rem 1.1rem; font-weight: 600; color: var(--ink); }
.faq details p { padding: 0 1.1rem 1rem; margin: 0; }

/* ---------- Màn rộng ---------- */
@media (min-width: 720px) {
  .wide-only { display: list-item; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .launch { grid-template-columns: auto 1fr; justify-items: start; text-align: left; gap: 3rem; }
  .launch img { width: 260px; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1fr 1.08fr; gap: 3.5rem; }
  .breaks { grid-template-columns: minmax(300px, 380px) 1fr; }
  .preview { position: sticky; top: 1rem; grid-template-columns: 1fr; }
  .preview-stage { max-width: 260px; width: 100%; justify-self: center; }
  .sprites-grid { grid-template-columns: .9fr 1.1fr; gap: 3.5rem; }
}
@media (max-width: 560px) {
  .room-strip { grid-template-columns: repeat(3, 1fr); }
  .room-strip li:nth-child(n + 4) { display: none; }
  .sprites { grid-template-columns: repeat(4, 1fr); }
  .doc-head { padding-right: 0; min-height: 0; }
  .doc-head img { position: static; width: 110px; margin-top: 1rem; }
  .preview { grid-template-columns: 1fr; }
  .preview-stage { max-width: 200px; width: 100%; justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
