/* Chăm luyện: marketing home page. Loaded after style.css; only pages with <body class="home">. */
body.home { padding: 0 0 56px; background: var(--bg); }
.home main { max-width: none; margin: 0; }
.home .wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
:root {
  --g1: #22b865; --g2: #1c8fdb;
  --grad: linear-gradient(135deg, var(--g1), var(--g2));
  --sun: #ffb52e; --rose: #f4a6c0;
  --soft: #e3f5ea; --soft2: #e0effb;
  --shadow: 0 18px 44px rgba(20, 90, 80, .16);
}
@media (prefers-color-scheme: dark) {
  :root { --soft: #1a2d22; --soft2: #172836; --shadow: 0 18px 44px rgba(0, 0, 0, .45); }
}
.home h1, .home h2, .home h3 { letter-spacing: -.02em; line-height: 1.12; }
.home h2 { font-size: clamp(28px, 4.4vw, 42px); margin: 0 0 14px; }
.home p { font-size: 18px; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--soft); border-radius: 999px; padding: 6px 14px; margin-bottom: 14px; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; max-width: 1060px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand img { width: 40px; height: 40px; clip-path: circle(44.5%); }
.topbar nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.topbar nav a:hover { background: var(--soft); color: var(--ink); }
.topbar nav a.cta { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(28, 143, 219, .3); }
.family-lang { font-size: 15px; }

/* hero */
.hero2 { position: relative; overflow: hidden; padding: 30px 0 70px;
  background: radial-gradient(900px 420px at 85% -10%, rgba(28,143,219,.20), transparent 70%),
              radial-gradient(700px 380px at 5% 10%, rgba(34,184,101,.22), transparent 70%); }
.hero2 .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero2 h1 { font-size: clamp(38px, 6vw, 64px); margin: 0 0 18px; }
.hero2 h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero2 .lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 34em; margin: 0 0 26px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; text-decoration: none;
  padding: 15px 26px; border-radius: 999px; transition: transform .15s; }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(28,143,219,.32); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: 15px; font-weight: 600; }
.trust li { margin: 0; color: inherit; }
.trust li::before { content: "✓ "; color: var(--g1); font-weight: 800; }
.hero2 .family-stores { justify-content: flex-start; margin-top: 18px; }

/* device frame */
.device { background: #14261c; border-radius: 30px; padding: 11px; box-shadow: var(--shadow); position: relative; }
.device img { display: block; width: 100%; height: auto; border-radius: 20px; }
.device.tilt { transform: rotate(2deg); }
.hero-art { position: relative; }
.float { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px 16px;
  font-weight: 700; font-size: 15px; box-shadow: var(--shadow); }
.float.a { left: -14px; bottom: 34px; } .float.b { right: -8px; top: 22px; }
.float span { color: var(--sun); }

/* strip */
.strip { background: var(--grad); color: #fff; padding: 22px 0; }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; text-align: center; }
.strip b { display: block; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; }
.strip span { font-size: 15px; opacity: .92; }

/* feature rows */
.home .section.wrap { margin: 76px auto 0; }
.row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.row.flip .text { order: 2; }
.row .text p { color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 0; }
.steps .n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps b { display: block; font-size: 17px; }
.steps span { color: var(--muted); font-size: 16px; }

.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { margin: 0; padding-left: 30px; position: relative; color: var(--ink); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff;
  font-size: 13px; font-weight: 800; display: grid; place-items: center; top: 4px; }

/* cards grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.fcard { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.fcard .ico { width: 52px; height: 52px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; box-shadow: 0 8px 18px rgba(28,143,219,.25); }
.fcard h3 { font-size: 20px; margin: 0 0 8px; }
.fcard p { margin: 0; font-size: 16.5px; color: var(--muted); }
.center { text-align: center; max-width: 720px; margin: 0 auto; }
.center p { color: var(--muted); }

/* games */
.games { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 16px; }
.chip.on { background: var(--soft); }

/* grades */
.grades { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; margin: 28px 0 8px; }
.grade { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 4px; text-align: center; font-weight: 800; }
.grade small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.grade b { font-size: 26px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subjects { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.subjects span { background: var(--soft2); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 15.5px; }

/* trust band */
.band { margin-top: 76px; background: var(--soft); padding: 64px 0; }
.band .cards { margin-top: 28px; }
.band .fcard { background: var(--card); }

/* faq */
.faq { max-width: 780px; margin: 28px auto 0; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; color: var(--accent); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); font-size: 17px; }

/* final cta */
.final { margin: 76px auto 0; max-width: 1060px; padding: 0 22px; }
.final .box { background: var(--grad); color: #fff; border-radius: 32px; padding: 56px 28px; text-align: center; box-shadow: var(--shadow); }
.final h2 { color: #fff; margin-bottom: 10px; }
.final p { color: rgba(255,255,255,.92); max-width: 34em; margin: 0 auto 24px; }
.final .btn.primary { background: #fff; color: #11753f; box-shadow: none; }
.final .btn.ghost { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.45); }
.final .family-stores { justify-content: center; }
.home .family { max-width: 1060px; margin: 88px auto 32px; padding: 0 22px; }
.home footer { padding: 0 22px; }

@media (max-width: 860px) {
  .hero2 .wrap, .row, .games { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .row.flip .text { order: 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .strip .wrap { grid-template-columns: repeat(2, 1fr); }
  .grades { grid-template-columns: repeat(3, 1fr); }
  .float.a { left: 6px; } .float.b { right: 6px; }
  /* Owner 2026-10-27: phones and narrow tablets keep the menu (Hỏi đáp, Hỗ trợ, Ứng dụng khác, language) on a
     wrapped row under the brand, like the support page; only the two in-page section links step aside. */
  .topbar { flex-wrap: wrap; justify-content: center; }
  .topbar nav { justify-content: center; width: 100%; }
  .topbar nav a.wide { display: none; }
  .home .section.wrap { margin-top: 56px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

.home .wrap > *, .row > *, .games > * { min-width: 0; }
.home main { overflow-x: clip; }
.device img { max-width: 100%; }
@media (max-width: 520px) {
  .topbar nav a { padding: 7px 10px; font-size: 14px; }
  .home p { font-size: 17px; }
  .btn { padding: 14px 22px; }
  .grades { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .float { font-size: 13px; padding: 8px 12px; }
}

.strip b.book { font-size: clamp(20px, 2.6vw, 28px); line-height: 1.15; padding-top: 6px; }
.strip .wrap { align-items: start; }

/* videos */
.videos { display: grid; grid-template-columns: .8fr .8fr 1.5fr; gap: 20px; align-items: end; margin-top: 30px; }
.vcard { display: block; position: relative; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; background: #14261c; }
.vcard img { display: block; width: 100%; height: auto; transition: transform .3s; }
.vcard:hover img { transform: scale(1.03); }
.vcard .play { position: absolute; left: 50%; top: 46%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%;
  background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.vcard .play::after { content: ""; position: absolute; left: 33px; top: 24px; border-left: 28px solid var(--g1); border-top: 18px solid transparent; border-bottom: 18px solid transparent; }
.vcard .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px; color: #fff; font-weight: 800; font-size: 19px; line-height: 1.2;
  background: linear-gradient(to top, rgba(10,30,20,.78), transparent); }
.vcard .cap small { display: block; font-weight: 600; font-size: 14px; opacity: .85; margin-top: 3px; }
.vcard:focus-visible { outline: 4px solid var(--g2); outline-offset: 3px; }
.vbox { position: fixed; inset: 0; z-index: 50; background: rgba(8, 20, 14, .86); display: grid; place-items: center; padding: 20px; }
.vbox[hidden] { display: none; }
.vbox video { max-width: 94vw; max-height: 88vh; border-radius: 18px; background: #000; }
.vbox video.tall { width: min(94vw, 88vh * 9 / 16, 720px); height: auto; aspect-ratio: 9 / 16; }
.vclose { position: absolute; top: 14px; right: 14px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; color: var(--ink, #14261c);
  font-size: 34px; line-height: 1; cursor: pointer; }
body.vopen { overflow: hidden; }
@media (max-width: 860px) {
  .videos { display: flex; overflow-x: auto; gap: 14px; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-right: -22px; padding-right: 22px; }
  .vcard { flex: none; scroll-snap-align: start; width: 62vw; max-width: 300px; }
  .vcard.wide { width: 86vw; max-width: 520px; }
}

/* video links inside the feature rows, and the grades video */
.vlink { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 18px 10px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 17px; text-decoration: none; box-shadow: var(--shadow); }
.vlink small { font-weight: 600; font-size: 14px; color: var(--muted, #5b6b62); }
.vlink .vplay { flex: none; position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); }
.vlink .vplay::after { content: ""; position: absolute; left: 14px; top: 11px; border-left: 12px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.vlink:hover { border-color: var(--g1); }
.vlink:active { transform: scale(.97); }
.vlink:focus-visible { outline: 4px solid var(--g2); outline-offset: 3px; }
.vwide { max-width: 720px; margin: 30px auto 0; }
.vwide .vcard { width: auto; max-width: none; }
.vbox video.feed { width: min(94vw, 88vh * 4 / 5, 864px); height: auto; aspect-ratio: 4 / 5; }

/* Break games showcase */
.games-shelf { margin-top: 36px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 28px 24px; box-shadow: var(--shadow); }
.games-shelf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.games-shelf-head h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.01em; color: var(--ink); }
.games-shelf-head p { margin: 0; font-size: 15px; color: var(--muted); }


.games-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}
.game-badge-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 12px 6px 10px; border-radius: 18px;
  background: var(--bg); border: 1.5px solid transparent;
  cursor: pointer; transition: all .2s cubic-bezier(0.2, 0.8, 0.2, 1);
  color: var(--ink); text-decoration: none; user-select: none;
}
.game-badge-item:hover, .game-badge-item:focus-visible {
  background: var(--soft); border-color: var(--g1);
  transform: translateY(-4px); box-shadow: 0 8px 18px rgba(0, 0, 0, .06);
}
.game-badge-item.active {
  background: var(--soft); border-color: var(--g1);
  box-shadow: 0 6px 16px rgba(34, 184, 101, .25);
  transform: translateY(-2px);
}
.game-badge-item img {
  width: 62px; height: 62px; object-fit: contain;
  transition: transform .25s ease; filter: drop-shadow(0 4px 6px rgba(90, 62, 54, .15));
}
.game-badge-item:hover img {
  transform: scale(1.12) rotate(3deg);
}
.game-badge-item span {
  font-size: 13px; font-weight: 700; line-height: 1.25;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.games-device-wrap { position: relative; }
#game-showcase-img { transition: opacity .15s ease; }
.game-screen-caption {
  margin-top: 14px; padding: 12px 18px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px;
  font-size: 15px; color: var(--muted); box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
.game-screen-caption b { color: var(--ink); font-weight: 800; margin-right: 4px; }

@media (max-width: 860px) {
  .games-badges-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
  }
  .game-badge-item { padding: 8px 4px; }
  .game-badge-item img { width: 50px; height: 50px; }
  .game-badge-item span { font-size: 12px; }
  .games-shelf { padding: 20px 16px; margin-top: 24px; }
  .games-shelf-head { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-badge-item, .game-badge-item img, #game-showcase-img { transition: none; transform: none !important; }
}

