/* Sayfully trang chủ: bố cục từng khối và hiệu ứng chuyển động.
   Token màu, header, footer, nút dùng chung nằm trong site.css. */

/* ---------- hiện dần khi cuộn tới (đặt đầu file để các :hover phía sau thắng khi trùng độ ưu tiên) ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal="left"] { transform: translateX(-64px) rotate(-1.5deg); }
[data-reveal="right"] { transform: translateX(64px) rotate(1.5deg); }
[data-reveal="zoom"] { transform: scale(.82) translateY(16px); }
[data-reveal="flip"] { transform: perspective(900px) rotateX(24deg) translateY(36px); transform-origin: 50% 0; }
[data-reveal].in { opacity: 1; transform: none; }
/* Phần tử chờ trượt vào từ hai bên không được làm trang rộng hơn màn hình (điện thoại sẽ thu nhỏ cả trang). */
main { overflow-x: clip; }
@media (max-width: 760px) { [data-reveal="left"], [data-reveal="right"] { transform: translateY(28px); } }

/* ---------- lớp nền: thanh tiến trình, cực quang, vệt sao theo con trỏ, header nổi ---------- */
.progress { position: fixed; left: 0; top: 0; z-index: 60; height: 3px; width: 100%; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #6C4CF6, #B455F5, #FF6B57); }
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 52vmin; height: 52vmin; border-radius: 50%; filter: blur(70px); opacity: .6; animation: aurora 24s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { left: -10vmin; top: 10vh; background: #D9CFFF; }
.aurora i:nth-child(2) { right: -12vmin; top: 40vh; background: #FFDAD2; animation-delay: -8s; animation-duration: 30s; }
.aurora i:nth-child(3) { left: 30vw; bottom: -20vmin; background: #CDEFE3; animation-delay: -16s; animation-duration: 27s; }
@keyframes aurora { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(14vw, -10vh) scale(1.25); } 100% { transform: translate(-8vw, 12vh) scale(.9); } }
.cursor-trail { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }
.site-header { position: fixed; left: 0; right: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: transparent; }
.site-header.scrolled { background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); border-bottom-color: rgba(231, 228, 244, .9); }
.nav .link { position: relative; }
.nav .link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--violet); transform: scaleX(0); transform-origin: 0 50%; transition: transform .25s; }
.nav .link:hover::after { transform: scaleX(1); }

.glass { background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85), 0 16px 40px -20px rgba(52, 32, 140, .45); }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.btn { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .5); transform: scale(0); pointer-events: none; animation: ripple .65s ease-out forwards; }
@keyframes ripple { to { transform: scale(5); opacity: 0; } }

/* ---------- hero: Long vẫy tay trên đảo mây ---------- */
.hero { position: relative; height: clamp(700px, 100vh, 920px); overflow: hidden; background: #E9ECFF; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; animation: scene-in 1.8s cubic-bezier(.2, .8, .2, 1) backwards; transform: translate3d(0, calc(var(--sy, 0) * .22px), 0) scale(calc(1 + var(--sy, 0) * .00022)); }
@keyframes scene-in { from { opacity: 0; transform: scale(1.12); } }
.scene-box { position: absolute; top: 0; right: 0; height: 100%; aspect-ratio: 16 / 9; }
.scene-box > .scene { position: absolute; inset: -3%; width: 106%; height: 106%; max-width: none; object-fit: cover; will-change: transform; }
.hero .scene-box { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%); mask-image: linear-gradient(90deg, transparent 0, #000 24%); }
.hero::before { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(236, 238, 255, .96) 0%, rgba(236, 238, 255, .82) 30%, rgba(236, 238, 255, 0) 56%); }
.hero::after { content: ""; position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 180px; pointer-events: none; background: linear-gradient(180deg, rgba(246, 245, 255, 0), var(--canvas)); }
.cloud { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0)); opacity: .55; animation: cloud-drift var(--t, 26s) ease-in-out infinite alternate; }
.cloud-1 { left: 8%; bottom: 8%; width: 46vmin; height: 16vmin; --t: 30s; }
.cloud-2 { left: 38%; top: 58%; width: 34vmin; height: 12vmin; --t: 22s; animation-delay: -9s; }
.cloud-3 { right: -4%; top: 10%; width: 36vmin; height: 13vmin; --t: 34s; animation-delay: -17s; }
@keyframes cloud-drift { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
/* Mây cắt từ tranh, trôi ngang qua cảnh ở hai độ sâu: một đám sau Long, một đám trước chân đảo. */
.cloud-layer { position: absolute; left: 0; width: 100%; pointer-events: none; }
.cloud-back { top: 30%; }
.cloud-front { top: 66%; }
.cloud-img { position: absolute; left: 0; height: auto; max-width: none; opacity: .92; animation: cloud-pass var(--t, 70s) linear infinite; animation-delay: var(--d, 0s); }
.cloud-back .cloud-img { width: 30%; }
.cloud-front .cloud-img { width: 22%; opacity: .96; }
@keyframes cloud-pass { from { transform: translateX(-40%); } to { transform: translateX(340%); } }

.hero .wrap { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; padding-top: var(--header-h); pointer-events: none; }
.hero-copy { max-width: 620px; padding-bottom: 48px; pointer-events: auto; transform: translateY(calc(var(--sy, 0) * .38px)); opacity: calc(1 - var(--sy, 0) / 560); }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px 8px 11px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(18, 161, 107, .5); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 161, 107, .5); } 100% { box-shadow: 0 0 0 9px rgba(18, 161, 107, 0); } }
.rise { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero h1 { margin: 22px 0 20px; font-size: clamp(46px, 6vw, 78px); font-weight: 900; line-height: 1.02; letter-spacing: -.045em; color: #1B1452; }
.hero h1 .w { display: inline-block; opacity: 0; transform: translateY(.5em) rotate(3deg) scale(.92); animation: word-in 1s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(.25s + var(--i, 0) * 90ms); }
@keyframes word-in { to { opacity: 1; transform: none; } }
.grad { position: relative; background: linear-gradient(90deg, #6C4CF6 0%, #B455F5 30%, #FF6B57 50%, #B455F5 70%, #6C4CF6 100%); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: grad-shift 7s linear infinite; }
@keyframes grad-shift { to { background-position: 240% 0; } }
.hero .lead { font-size: 19px; color: #4A4470; max-width: 30em; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.glow-wrap { position: relative; display: inline-flex; border-radius: 16px; isolation: isolate; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.glow-wrap::before { content: ""; position: absolute; z-index: -1; inset: -3px; border-radius: 19px; opacity: .8; filter: blur(10px); background: conic-gradient(from var(--a), #6C4CF6, #FF6B57, #FBBF24, #B455F5, #6C4CF6); animation: spin-angle 5s linear infinite; }
@keyframes spin-angle { to { --a: 360deg; } }
.btn-play::after { content: ""; position: absolute; top: -40%; bottom: -40%; left: -70%; width: 36%; transform: skewX(-20deg); background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .32), transparent); animation: shine 4.5s ease-in-out infinite; }
@keyframes shine { 0%, 55% { left: -70%; } 100% { left: 150%; } }
.btn-glass { min-height: 60px; border-radius: 16px; color: var(--ink); padding: 0 22px; }
.btn-glass:hover { color: var(--violet-700); }
.access-note { margin-top: 16px; font-size: 14px; color: var(--muted); max-width: 40em; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border-radius: 14px; border: 2px solid rgba(28, 24, 56, .3); opacity: calc(1 - var(--sy, 0) / 120); }
.scroll-cue::before { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--violet); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* Long dựng từ các lớp cứng của một ảnh gốc; mọi toạ độ tính theo % khung 1024×1536. */
.long { position: absolute; left: 56.1%; top: 12.2%; width: 24%; aspect-ratio: 1024 / 1536; pointer-events: auto; cursor: pointer; will-change: transform; touch-action: manipulation; }
.long-glow { position: absolute; left: 46%; top: 12%; width: 44%; height: 66%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 244, 200, .55), rgba(255, 244, 200, 0)); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.long-shadow { position: absolute; left: 57%; top: 73.3%; width: 22%; height: 3.2%; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 20, 80, .38), transparent); filter: blur(3px); transform: scaleX(calc(1 - var(--lift, 0) * .005)); opacity: calc(1 - var(--lift, 0) * .007); }
.long-mascot { position: absolute; inset: 0; opacity: 0; }
.long-mascot.is-ready { animation: long-in 1.3s cubic-bezier(.34, 1.56, .64, 1) .15s both; }
@keyframes long-in { from { opacity: 0; transform: translateY(-7%) scale(.96); } to { opacity: 1; transform: none; } }
.lm-body { position: absolute; inset: 0; transform-origin: 50% 96.875%; will-change: transform; }
.lm-base { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.lm-lid { position: absolute; height: auto; max-width: none; display: none; pointer-events: none; }
.long-mascot[data-lid="0"] .lid-0, .long-mascot[data-lid="1"] .lid-1, .long-mascot[data-lid="2"] .lid-2, .long-mascot[data-lid="3"] .lid-3, .long-mascot[data-lid="4"] .lid-4 { display: block; }
/* Thưởng bật lên cạnh tay Long: XP, tim, xu. */
.pop { position: absolute; z-index: 4; left: 50%; top: 44%; padding: 7px 14px; border-radius: 999px; background: #fff; color: var(--violet-700); font-weight: 900; font-size: 16px; white-space: nowrap; box-shadow: 0 14px 30px -14px rgba(52, 32, 140, .6), inset 0 0 0 1.5px #E7E1FF; opacity: 0; pointer-events: none; }
.pop.go { animation: pop-up 2.3s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes pop-up { 0% { opacity: 0; transform: translate(-50%, 0) scale(.5); } 14% { opacity: 1; transform: translate(-50%, -14px) scale(1.12); } 30% { transform: translate(-50%, -22px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -110px) scale(1); } }

/* Thẻ kính nổi quanh Long: điểm phát âm, lời Long, chuỗi ngày học. */
.fc { position: absolute; z-index: 3; will-change: transform; }
.fc-in { border-radius: 20px; animation: bob 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(-1deg); } }
.fc-score { left: 78%; top: 36%; width: 236px; }
.fc-chat { left: 80%; top: 12%; width: 232px; }
.fc-streak { left: 81%; top: 62%; }
.card-score { padding: 14px 16px 12px; }
.card-score .row { display: flex; align-items: center; gap: 10px; }
.card-score .mic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--coral); color: #fff; box-shadow: 0 8px 16px -8px var(--coral); animation: mic-pulse 1.6s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 8px 16px -8px var(--coral), 0 0 0 0 rgba(255, 107, 87, .45); } 60% { box-shadow: 0 8px 16px -8px var(--coral), 0 0 0 8px rgba(255, 107, 87, 0); } }
.card-score b { display: block; font-size: 14px; }
.card-score small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.wave { display: flex; align-items: center; gap: 3px; height: 28px; margin: 10px 0 8px; }
.wave i { flex: 1; height: 100%; border-radius: 3px; background: linear-gradient(180deg, #FF6B57, #B455F5); transform-origin: 50% 50%; animation: wave 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * 70ms); }
@keyframes wave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.card-score .score { display: flex; align-items: baseline; justify-content: space-between; }
.card-score .score b { font-size: 26px; font-weight: 900; letter-spacing: -.03em; color: var(--mint); }
.card-score .score span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.bubble { padding: 12px 14px 12px; border-radius: 22px 22px 22px 6px; }
.bubble .who { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.bubble .who img { width: 22px; height: 22px; border-radius: 7px; }
.bubble p { margin-top: 6px; font-weight: 700; font-size: 16px; line-height: 1.35; min-height: 2.7em; }
.bubble .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--violet); animation: caret 1s steps(2) infinite; }
@keyframes caret { to { opacity: 0; } }
.chip { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 999px; font-weight: 800; font-size: 15px; white-space: nowrap; }
.chip .flame { font-size: 22px; animation: flicker 1.6s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.15) rotate(4deg); } }
.chip small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }

/* ---------- dải số liệu ---------- */
.ribbon { position: relative; z-index: 2; margin-top: -66px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 26px; }
.ribbon div { padding: 22px 26px; }
.ribbon div + div { border-left: 1px solid rgba(231, 228, 244, .9); }
.ribbon b { display: block; font-size: 32px; font-weight: 900; letter-spacing: -.035em; line-height: 1.15; color: var(--violet-700); font-variant-numeric: tabular-nums; }
.ribbon span { font-size: 15px; color: var(--muted); }

/* ---------- băng câu mẫu chạy ngang, hơi nghiêng như dải ruy băng ---------- */
.ticker { position: relative; margin: 64px 0 -16px; padding: 18px 0; width: 108vw; margin-left: -4vw; transform: rotate(-1.6deg); overflow: hidden; background: linear-gradient(90deg, #ECE7FF, #FFF1EC 50%, #E3F6EE); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker .track { display: flex; gap: 14px; width: max-content; animation: ticker 52s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
.pill { display: flex; flex-direction: column; gap: 1px; padding: 12px 18px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); white-space: nowrap; border-left: 4px solid var(--c, var(--violet)); transition: transform .25s; }
.pill:hover { transform: translateY(-4px) rotate(1deg); }
.pill b { font-size: 15px; }
.pill i { font-style: normal; font-family: var(--ipa); font-size: 12.5px; color: var(--violet-700); }
.pill span { font-size: 13px; color: var(--muted); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- khung chung ---------- */
section.block { position: relative; padding: 112px 0; }
.section-head { max-width: 760px; margin: 0 auto 64px; text-align: center; }
.section-head h2 { font-size: clamp(34px, 4.8vw, 56px); font-weight: 900; letter-spacing: -.04em; line-height: 1.1; }
.section-head p { margin-top: 18px; font-size: 19px; color: var(--muted); }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--accent, var(--violet-700)); background: var(--accent-bg, var(--violet-50)); }

/* ---------- showcase ghim: sân khấu tranh bên trái, nội dung cuộn bên phải ---------- */
.showcase { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.show-stage { position: sticky; top: calc(var(--header-h) + 20px); height: min(calc(100vh - var(--header-h) - 40px), 720px); border-radius: 40px; overflow: hidden; isolation: isolate; background: #1B1452; box-shadow: 0 40px 80px -40px rgba(30, 16, 90, .6); perspective: 1200px; }
.show-bg { position: absolute; inset: 0; overflow: hidden; opacity: 0; transform: scale(1.08); transition: opacity .9s ease, transform 1.6s ease; }
.show-bg::before { content: ""; position: absolute; inset: -6%; background: var(--scene) var(--pos, center) / cover no-repeat; animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.1) translate(-2%, 1.5%); } }
.show-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 55% at 50% 62%, var(--glow, rgba(255, 255, 255, .42)), transparent 70%); }
.show-bg.is-active { opacity: 1; transform: none; }
.bg-speak { --scene: url(/assets/scene/echo-valley.webp); --pos: center 8%; }
.bg-tutor { --scene: url(/assets/scene/cosmic.webp); --pos: center 40%; --glow: rgba(190, 150, 255, .45); }
.bg-video { --scene: url(/assets/scene/night-stage.webp); --pos: center 78%; --glow: rgba(255, 200, 120, .3); }
.bg-path { --scene: url(/assets/scene/echo-valley.webp); --pos: center 88%; }
.phone { padding: 9px; border-radius: 46px; background: #fff; box-shadow: 0 0 0 1px rgba(28, 24, 56, .08), 0 50px 80px -30px rgba(20, 10, 70, .6); }
.phone .screen { position: relative; overflow: hidden; border-radius: 37px; background: var(--canvas); aspect-ratio: 620 / 1253; }
.phone .screen::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .28) 50%, transparent 58%); transform: translateX(-130%); animation: glass-sweep 7s ease-in-out infinite; }
@keyframes glass-sweep { 0%, 60% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.show-stage .phone { position: absolute; left: 50%; top: 50%; width: min(300px, 50%); transform: translate(-50%, -50%) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform .18s ease-out; }
.shot { position: absolute; inset: 0; opacity: 0; transform: translateY(20px) scale(.98); transition: opacity .55s ease, transform .55s ease; }
.shot.is-active { opacity: 1; transform: none; }
.shot > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.note { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 11px 15px 11px 11px; border-radius: 18px; font-size: 13px; line-height: 1.3; color: var(--muted); max-width: 260px; opacity: 0; transform: translateY(14px) scale(.9); transition: opacity .4s ease .25s, transform .6s cubic-bezier(.34, 1.56, .64, 1) .25s; }
.note.is-active { opacity: 1; transform: none; }
.note b { display: block; color: var(--ink); font-size: 14px; }
.note .ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.note-speak { left: 24px; bottom: 34px; }
.note-tutor { right: 24px; bottom: 40px; }
.note-video { left: 24px; top: 28px; }
.note-path { right: 24px; top: 28px; }
.dots { position: absolute; z-index: 2; right: 18px; top: 50%; transform: translateY(-50%); display: grid; gap: 8px; }
.dots i { display: block; width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .5); transition: height .3s, background .3s; }
.dots i.is-active { height: 28px; background: #fff; }
.show-list { display: grid; }
.show-pic { display: none; }
.show-item { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.show-item h3 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 900; letter-spacing: -.035em; line-height: 1.12; }
.show-item > p { margin-top: 18px; font-size: 18px; color: var(--muted); }
.checks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; font-weight: 500; color: var(--ink-2); }
.checks li::before { content: ""; flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--accent-bg) var(--tick) center / 14px no-repeat; }
.f-speak { --accent: #D9432F; --accent-bg: #FFE8E3; --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9432F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E"); }
.f-tutor { --accent: var(--violet-700); --accent-bg: var(--violet-50); --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C4CF6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E"); }
.f-video { --accent: #1F63D1; --accent-bg: #E3EEFF; --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F63D1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E"); }
.f-path { --accent: #0E8358; --accent-bg: #DDF5EA; --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E8358' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E"); }
.ladder { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.ladder span { padding: 8px 15px; border-radius: 12px; font-weight: 800; font-size: 15px; background: #fff; box-shadow: var(--shadow-sm); color: var(--ink-2); transition: transform .2s; }
.ladder span:hover { transform: translateY(-3px); }
.ladder span:first-child { background: #E3F5EC; color: #0E8358; }
.ladder span:last-child { background: var(--violet); color: #fff; }

/* Màn hình video vẽ bằng HTML để không lộ khung hình phim của bên thứ ba. */
.vscreen { display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; font-size: 11px; line-height: 1.4; color: var(--ink); background: var(--canvas); }
.vscreen > * { flex-shrink: 0; }
.vtop { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 13px; padding: 2px 4px; }
.vtop .speed { font-size: 10px; font-weight: 700; color: var(--violet-700); background: var(--violet-50); padding: 3px 8px; border-radius: 999px; }
.vplayer { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: url(/assets/scene/sky-reading.webp) 60% 40% / cover; }
.vplayer::before { content: ""; position: absolute; left: 50%; top: 42%; width: 38px; height: 38px; border-radius: 50%; transform: translate(-50%, -50%); background: rgba(20, 10, 60, .35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.vplayer::after { content: ""; position: absolute; left: 50%; top: 42%; transform: translate(-35%, -50%); border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; }
.vplayer .cap { position: absolute; left: 10px; right: 10px; bottom: 8px; text-align: center; color: #fff; font-weight: 700; font-size: 10.5px; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.vplayer .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 38%; background: var(--coral); animation: vbar 9s linear infinite; }
@keyframes vbar { from { width: 12%; } to { width: 92%; } }
.vtoggles { display: flex; gap: 6px; }
.vtoggles span { padding: 4px 9px; border-radius: 999px; font-weight: 700; font-size: 10px; background: var(--violet); color: #fff; }
.vtoggles span.off { background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.vtoggles span.off::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); margin-right: 5px; vertical-align: 1px; }
.vhead { font-weight: 800; font-size: 13px; padding: 2px 4px; }
.vline { background: #fff; border-radius: 14px; padding: 9px 11px; border-left: 3px solid transparent; }
.vline.cur { border-left-color: var(--violet); box-shadow: 0 8px 18px -12px rgba(108, 76, 246, .6); }
.vline .en { font-weight: 700; font-size: 12px; }
.vline .en .w { border-radius: 4px; transition: background .2s, color .2s; }
.vline .en .w.on { background: var(--violet-100); color: var(--violet-700); }
.vline .ipa { font-family: var(--ipa); color: var(--muted); font-size: 10.5px; }
.vline .vi { color: var(--muted); }

/* ---------- công cụ khác: thẻ có đèn rọi theo chuột ---------- */
.tools { margin-top: 120px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.tools h3 { font-size: clamp(28px, 3vw, 38px); font-weight: 900; letter-spacing: -.035em; line-height: 1.15; }
.tools .copy p { margin-top: 14px; font-size: 18px; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-sm); font-weight: 700; font-size: 16px; line-height: 1.35; transition: transform .25s, box-shadow .25s; }
.tool::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c) 20%, transparent), transparent 65%); }
.tool:hover { transform: translateY(-5px) scale(1.02); box-shadow: var(--shadow-md); }
.tool:hover::before { opacity: 1; }
.tool > span:last-child { position: relative; }
.tool small { display: block; font-weight: 400; font-size: 13.5px; color: var(--muted); }
.tool .ic { position: relative; width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 10px 18px -10px var(--c); transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.tool:hover .ic { transform: rotate(-10deg) scale(1.15); }

/* ---------- trò chơi: rừng đèn lồng, đom đóm, thẻ lơ lửng và nghiêng 3D ---------- */
.games-band { position: relative; color: #fff; isolation: isolate; overflow: hidden; background: linear-gradient(180deg, rgba(20, 10, 60, .78), rgba(20, 10, 60, .55) 40%, rgba(20, 10, 60, .86)), url(/assets/scene/night-valley.webp) center / cover; }
.games-band .fx-canvas { z-index: 0; }
.games-band .wrap { position: relative; z-index: 1; }
.wave-edge { position: absolute; left: 0; width: 100%; height: 42px; z-index: 2; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 42' preserveAspectRatio='none'%3E%3Cpath fill='%23F6F5FF' d='M0 20C150 0 300 42 450 22S750 0 900 22s225 20 300 0V0H0z'/%3E%3C/svg%3E") repeat-x; background-size: 1200px 42px; animation: wave-slide 16s linear infinite; }
.wave-top { top: 0; }
.wave-bottom { bottom: 0; transform: scaleY(-1); animation-direction: reverse; }
@keyframes wave-slide { to { background-position-x: 1200px; } }
.games-band .kicker { color: #3B2200; background: linear-gradient(90deg, #FFD666, #FBBF24); }
.games-band .section-head p { color: rgba(255, 255, 255, .8); }
.game-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.game-in { animation: game-float 6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.2s); }
@keyframes game-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.game-card { position: relative; border-radius: 26px; overflow: hidden; background: rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 30px 50px -30px rgba(0, 0, 0, .7); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform .2s ease-out, box-shadow .3s; }
.game-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(300px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .28), transparent 60%); }
.game-card:hover { --ty: -8px; box-shadow: inset 0 0 0 1px rgba(255, 214, 102, .6), 0 30px 60px -24px rgba(255, 190, 60, .55); }
.game-card:hover::after { opacity: 1; }
.game .pic { position: relative; overflow: hidden; }
.game .pic img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.game-card:hover .pic img { transform: scale(1.08) rotate(-1deg); }
.game .pic::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -80%; width: 40%; transform: skewX(-20deg); background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transition: left .7s ease; }
.game-card:hover .pic::after { left: 140%; }
.game .body { padding: 14px 16px 18px; }
.game h3 { font-size: 18px; font-weight: 800; letter-spacing: -.015em; }
.game p { margin-top: 4px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .78); }
.game .tag { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #3B2200; background: #FFD666; }

/* ---------- một buổi học: đường nối tự vẽ khi cuộn tới, đốm sáng chạy dọc đường ---------- */
.steps-wrap { position: relative; }
.steps-path { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 90; margin-bottom: -14px; overflow: visible; }
.steps-path path { fill: none; stroke: var(--violet); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s ease .2s; vector-effect: non-scaling-stroke; }
.steps-path circle.dot { fill: #fff; stroke: var(--c); stroke-width: 4; transform-origin: center; transform-box: fill-box; transform: scale(0); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.steps-path .spark { fill: #FBBF24; filter: drop-shadow(0 0 6px #FBBF24) drop-shadow(0 0 14px rgba(251, 191, 36, .7)); opacity: 0; transition: opacity .6s 1.6s; }
.steps-wrap.in .steps-path path { stroke-dashoffset: 0; }
.steps-wrap.in .steps-path circle.dot { transform: scale(1); }
.steps-wrap.in .steps-path circle.dot:nth-of-type(2) { transition-delay: .7s; }
.steps-wrap.in .steps-path circle.dot:nth-of-type(3) { transition-delay: 1.4s; }
.steps-wrap.in .steps-path .spark { opacity: 1; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step { position: relative; padding: 30px 28px 28px; border-radius: 28px; background: #fff; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s; }
.step:hover { transform: translateY(-6px) rotate(-.5deg); box-shadow: var(--shadow-md); }
.step .num { display: block; font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: -.05em; background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 45%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 14px; }
.step h3 { font-size: 21px; font-weight: 800; }
.step p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.step .min { position: absolute; top: 30px; right: 26px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--canvas); color: var(--ink-2); }

/* ---------- hỏi đáp: mở xếp mượt ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: 22px; box-shadow: var(--shadow-sm); transition: box-shadow .3s; }
.faq details:hover, .faq details.is-open { box-shadow: var(--shadow-md); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; font-weight: 800; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--violet-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C4CF6' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .35s, background-color .3s; }
.faq details.is-open summary::after { transform: rotate(135deg); background-color: var(--violet-100); }
.faq .ans { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.2, .8, .2, 1); }
.faq details.is-open .ans { grid-template-rows: 1fr; }
.faq .ans > div { overflow: hidden; }
.faq .ans p { padding: 0 24px 22px; color: var(--muted); }

/* ---------- lời mời cuối: Long đọc sách giữa biển mây ---------- */
.final { position: relative; isolation: isolate; overflow: hidden; min-height: 640px; display: flex; align-items: center; background: #EEEDFF; }
.final .scene-box { z-index: -1; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 25%); mask-image: linear-gradient(90deg, transparent 0, #000 25%); animation: kenburns-soft 26s ease-in-out infinite alternate; transform-origin: 70% 60%; }
@keyframes kenburns-soft { to { transform: scale(1.06); } }
.final::before { content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(238, 237, 255, .97) 0%, rgba(238, 237, 255, .8) 34%, rgba(238, 237, 255, 0) 56%); }
.final::after { content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: 140px; pointer-events: none; background: linear-gradient(180deg, var(--canvas), rgba(246, 245, 255, 0)); }
.final .wrap { position: relative; z-index: 1; }
.final .copy { max-width: 560px; padding: 120px 0 110px; }
.final h2 { font-size: clamp(36px, 5vw, 62px); font-weight: 900; letter-spacing: -.045em; line-height: 1.06; color: #1B1452; }
.final p.lead { margin-top: 18px; font-size: 19px; color: #4A4470; }
.final .sun { position: absolute; z-index: 0; left: 34%; top: 54%; width: 42vmin; height: 42vmin; border-radius: 50%; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(closest-side, rgba(255, 236, 170, .75), rgba(255, 236, 170, 0)); animation: breathe 7s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], .hero h1 .w, .rise, .shot, .show-bg, .note, .long-mascot, .steps-path .spark { opacity: 1; transform: none; filter: none; }
  .steps-path path { stroke-dashoffset: 0; } .steps-path circle.dot { transform: scale(1); }
  .hero-bg, .hero-copy { transform: none; opacity: 1; }
}

/* ---------- màn hình vừa và nhỏ ---------- */
@media (max-width: 1320px) {
  .long { left: 58%; width: 23%; top: 13.5%; }
  .fc-score { left: 79%; top: 34%; }
}
@media (max-width: 1100px) {
  .hero::before { background: linear-gradient(90deg, rgba(236, 238, 255, .97) 0%, rgba(236, 238, 255, .9) 40%, rgba(236, 238, 255, 0) 70%); }
  .fc-score { display: none; }
  .showcase { display: block; }
  /* Màn hẹp không ghim sân khấu (nó che chữ); mỗi tính năng có thẻ tranh riêng, home.js chuyển ảnh màn hình vào. */
  .show-stage { display: none; }
  .show-item { min-height: 0; padding: 0 0 64px; }
  .show-pic { position: relative; display: grid; place-items: center; height: 420px; margin-bottom: 24px; border-radius: 28px; overflow: hidden; isolation: isolate; background: var(--scene) var(--pos, center) / cover no-repeat; box-shadow: 0 30px 60px -36px rgba(30, 16, 90, .6); }
  .show-pic::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 55% at 50% 60%, var(--glow, rgba(255, 255, 255, .42)), transparent 70%); }
  .show-pic .phone { width: 190px; }
  .show-pic .shot { opacity: 1; transform: none; }
  .tools { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 88px; }
  .game-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(220px, 40%); overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 0 10px; scrollbar-width: none; }
  .game-row::-webkit-scrollbar { display: none; }
  .game { scroll-snap-align: start; }
  .steps-path { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .aurora i { filter: blur(40px); width: 70vmin; height: 70vmin; }
  .aurora i:nth-child(3) { display: none; }
  .hero { height: auto; background: linear-gradient(180deg, #F3F0FF 0%, #E9ECFF 100%); }
  .hero::before, .hero::after, .cloud, .scroll-cue { display: none; }
  .hero .wrap { display: block; padding-top: calc(var(--header-h) + 28px); }
  .hero-copy { text-align: center; max-width: none; padding-bottom: 0; transform: none; opacity: 1; }
  .hero .lead { font-size: 17px; margin-inline: auto; }
  .ctas { justify-content: center; margin-top: 28px; }
  .access-note { margin-inline: auto; }
  .hero-bg { position: relative; z-index: 0; height: 440px; width: 100vw; margin-inline: calc(50% - 50vw); margin-top: 6px; overflow: hidden; transform: none; }
  .hero .scene-box { right: auto; left: 50%; transform: translateX(-66%); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 84%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 84%, transparent 100%); }
  .long { left: 58%; width: 23%; top: 13.5%; }
  .fc-score { display: block; left: 42%; top: 68%; width: 176px; }
  .fc-chat { left: 71%; top: 3%; width: 150px; }
  .fc-streak { left: 43%; top: 5%; }
  .card-score small { max-width: 110px; }
  .bubble p { font-size: 14px; }
  .pop { font-size: 14px; }
  .ribbon { margin-top: -28px; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 22px; }
  .ribbon div { padding: 16px 18px; }
  .ribbon div:nth-child(3) { border-left: 0; }
  .ribbon div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ribbon b { font-size: 25px; }
  .ticker { margin: 40px 0 -8px; margin-left: -4vw; padding: 14px 0; }
  section.block { padding: 80px 0; }
  .section-head { margin-bottom: 44px; }
  .section-head p { font-size: 17px; }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .game-row { grid-auto-columns: 74%; }
  .wave-edge { height: 26px; background-size: 800px 26px; }
  .faq summary { padding: 18px; font-size: 16px; }
  .faq .ans p { padding: 0 18px 18px; }
  .final { display: block; min-height: 0; background: linear-gradient(180deg, var(--canvas), #E3E9FF); }
  .final::before, .final::after, .final .sun { display: none; }
  .final .copy { padding: 72px 0 8px; text-align: center; margin: 0 auto; }
  .final .ctas { justify-content: center; }
  .final .scene-box { position: relative; z-index: 0; height: 340px; width: 100%; aspect-ratio: auto; animation: none; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); }
  .final .scene-box > .scene { inset: 0; width: 100%; height: 100%; object-position: 66% 50%; }
}
