@font-face { font-family: Nunito; src: url(/assets/fonts/Nunito-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Nunito; src: url(/assets/fonts/Nunito-Bold.ttf); font-weight: 700 900; font-display: swap; }
:root {
  --bg: #f7f3ff;
  --card: #ffffff;
  --ink: #2f2545;
  --muted: #625a75;
  --heading: #6b4fbb;
  --link: #6b4fbb;
  --brand: #6b4fbb;
  --brand-dark: #523a96;
  --hero: #7a5cc9;
  --purple: #6b4fbb;
  --purple-dark: #523a96;
  --orange: #f5a623;
  --green: #8cc63f;
  --pink: #ee5f8b;
  --blue: #4a9fe0;
  --tile: #fbf8f2;
  --tile-edge: #cba8d8;
  --line: #ffc93c;
  --border: #e3dcf3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17131f;
    --card: #211b2d;
    --ink: #eee9f8;
    --muted: #b0a7c3;
    --heading: #c9b7ff;
    --link: #b9a3ff;
    --border: #3a3050;
    --tile-edge: #6d5a86;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Nunito, system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
.wrap { margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.top img { height: 44px; width: auto; }
.lang { display: flex; gap: 4px; background: var(--card); border: 2px solid var(--border); border-radius: 999px; padding: 3px; }
.lang button { font: inherit; font-weight: 800; font-size: 14px; border: 0; background: none; color: var(--muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; min-height: 40px; min-width: 44px; }
.lang button[aria-pressed="true"] { background: var(--brand); color: #fff; }

.hero { position: relative; color: #fff; background: var(--hero); border-radius: 32px; padding: 56px 48px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: end; }
.hero h1 { word-break: auto-phrase; margin: 0 0 14px; font-size: clamp(36px, 5vw, 58px); line-height: 1.05; font-weight: 900; text-shadow: 0 4px 0 var(--brand-dark); }
.hero .lead { margin: 0 0 26px; font-size: 20px; font-weight: 700; max-width: 30ch; }
.hero .copy { padding-bottom: 56px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 8px 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.14); border: 2px solid rgba(255, 255, 255, 0.65); color: #fff; text-decoration: none; line-height: 1.2; }
a.store { background: #fff; color: var(--brand-dark); border-color: #fff; box-shadow: 0 4px 0 var(--brand-dark); }
a.store:hover { background: #fff7e6; }
.store small { font-size: 13px; font-weight: 700; }
.store b { font-size: 18px; font-weight: 900; }
.note { margin: 14px 0 0; font-size: 15px; font-weight: 700; }
.device { position: relative; }
.device .shot { border-radius: 22px 22px 0 0; border: 8px solid #fff; border-bottom: 0; box-shadow: 0 -10px 40px rgba(40, 20, 80, 0.35); }
.device .mascot { position: absolute; width: 150px; left: -70px; bottom: 10px; filter: drop-shadow(0 6px 10px rgba(40, 20, 80, 0.35)); }

section { padding: 72px 0 0; }
h2 { margin: 0 0 8px; font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; color: var(--heading); line-height: 1.15; }
.sub { margin: 0 0 32px; color: var(--muted); font-size: 18px; font-weight: 600; max-width: 62ch; }

.steps, .features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step, .feature { background: var(--card); border: 2px solid var(--border); border-radius: 24px; padding: 24px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.step h3, .feature h3 { margin: 0; font-size: 20px; font-weight: 900; }
.step p, .feature p { margin: 0; color: var(--muted); }
.mini { position: relative; width: 288px; max-width: 100%; aspect-ratio: 6 / 5; }
.mini .grid { position: absolute; left: 16.6667%; top: 20%; width: 66.6667%; height: 60%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
.mini .cell { margin: 3px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.mini .t { background: var(--tile); box-shadow: 0 3px 0 var(--tile-edge); }
.mini .on { outline: 3px solid var(--line); }
.mini .cell img { width: 72%; height: 72%; object-fit: contain; }
.mini svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mini polyline { fill: none; stroke: var(--line); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

.feature .icon { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 14px; }
.feature .icon svg { width: 28px; height: 28px; }
.feature h3 { margin-bottom: 6px; }

.slider { position: relative; max-width: 1280px; margin: 0 auto; }
.slides { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; border-radius: 24px; border: 2px solid var(--border); scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides img { scroll-snap-align: center; width: 100%; }
.slider .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 3px solid #fff; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 0 var(--brand-dark); }
.slider .nav svg { width: 22px; height: 22px; }
.slider .prev { left: -24px; }
.slider .next { right: -24px; }
.dots { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.dots button { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dots button::before { content: ""; width: 10px; height: 10px; border-radius: 5px; background: var(--border); transition: width 0.2s; }
.dots button[aria-current="true"]::before { width: 26px; background: var(--orange); }
@media (prefers-reduced-motion: reduce) { .slides { scroll-behavior: auto; } }

.cta { margin-top: 72px; background: var(--card); border: 2px solid var(--border); border-radius: 32px; padding: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.cta > img { width: 120px; border-radius: 28px; }
.cta .text { flex: 1 1 320px; }
.cta p { margin: 0; color: var(--muted); font-size: 18px; }
.cta a.play { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--green); color: #fff; font-size: 20px; font-weight: 900; text-decoration: none; border: 3px solid #fff; box-shadow: 0 4px 0 #6ba32b; }
.cta a.play:hover { background: #7fb935; }
.cta .pals { display: flex; width: 220px; }
.cta .pals img { width: 50%; }

footer { padding: 40px 0 48px; color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

html[data-lang="vi"] [data-l="en"], html[data-lang="en"] [data-l="vi"] { display: none !important; }
.top .home { display: flex; align-items: center; gap: 12px; color: var(--heading); text-decoration: none; font-size: 28px; font-weight: 900; }
.top .home .icon { height: 48px; width: 48px; border-radius: 14px; }
.device.portrait { justify-self: center; width: min(320px, 100%); max-height: 460px; overflow: hidden; }
.device.portrait .shot { border-radius: 30px 30px 0 0; }
.slider.portrait .slides { grid-auto-columns: 78%; gap: 16px; border: 0; border-radius: 0; }
.slider.portrait .slides img { border-radius: 22px; border: 2px solid var(--border); }
@media (min-width: 600px) { .slider.portrait .slides { grid-auto-columns: calc((100% - 32px) / 3); } }
@media (min-width: 1100px) { .slider.portrait .slides { grid-auto-columns: calc((100% - 80px) / 6); } }
.steps.text .step { align-items: flex-start; text-align: left; }
.step .num { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; font-size: 20px; display: flex; align-items: center; justify-content: center; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 36px 24px 0; }
  .hero .copy { padding-bottom: 8px; }
  .device .mascot { width: 84px; left: -10px; bottom: 6px; }
  .steps, .features { grid-template-columns: minmax(0, 1fr); }
  .cta { padding: 28px; }
  .slider .prev { left: 8px; }
  .slider .next { right: 8px; }
  .slider .nav { width: 44px; height: 44px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .hero { border-radius: 24px; padding: 32px 20px 0; }
  .hero .lead { font-size: 18px; }
  .top img { height: 34px; }
  .lang button { padding: 6px 7px; min-width: 38px; font-size: 13px; white-space: nowrap; }
}
@media (max-width: 360px) {
  .top { gap: 8px; }
  .top img { height: 28px; }
  .lang { gap: 0; }
  .lang button { padding: 6px 5px; min-width: 34px; font-size: 12px; }
}
