/* Gom — website. Màu thương hiệu khớp lib/theme.dart (Iris #5546E0, vàng #FFE14D). */
:root {
  --bg: #F5F4EF;
  --ink: #17171A;
  --muted: #6B6B73;
  --line: rgba(23, 23, 26, .09);
  --card: rgba(255, 255, 255, .72);
  --card-solid: #FFFFFF;
  --accent: #5546E0;
  --accent-text: #4A3CD0;
  --accent-soft: #ECEAFD;
  --leaf: #FFE14D;
  --heart: #E5484D;
  --shadow: 0 1px 2px rgba(20, 20, 40, .05), 0 12px 32px rgba(40, 30, 120, .08);
  --shadow-lg: 0 2px 6px rgba(20, 20, 40, .06), 0 30px 70px rgba(40, 30, 120, .16);
  --r: 22px;
  --max: 1120px;
  --k-link: #3B82F6; --k-video: #E5484D; --k-product: #F59E0B; --k-shot: #10B981; --k-idea: #8B5CF6; --k-note: #EAB308;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0F12; --ink: #F1F1F3; --muted: #9A9AA6; --line: rgba(255, 255, 255, .09);
    --card: rgba(30, 31, 38, .72); --card-solid: #1A1B21;
    --accent: #6658EE; --accent-text: #B0A8FF; --accent-soft: #23214A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 70px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0F12; --ink: #F1F1F3; --muted: #9A9AA6; --line: rgba(255, 255, 255, .09);
  --card: rgba(30, 31, 38, .72); --card-solid: #1A1B21;
  --accent: #6658EE; --accent-text: #B0A8FF; --accent-soft: #23214A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 70px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Giảm chuyển động (cài đặt máy). Thêm ?motion=1 vào địa chỉ để xem hiệu ứng khi máy đang tắt (class force-motion). */
@media (prefers-reduced-motion: reduce) { html:not(.force-motion) { scroll-behavior: auto; } html:not(.force-motion) *, html:not(.force-motion) *::before, html:not(.force-motion) *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(38px, 6.4vw, 68px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.muted { color: var(--muted); }
.hl { background: linear-gradient(transparent 58%, var(--leaf) 58%, var(--leaf) 92%, transparent 92%); color: inherit; padding: 0 .06em; }
:root[data-theme="dark"] .hl { --leaf: rgba(255, 225, 77, .42); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hl { --leaf: rgba(255, 225, 77, .42); } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--card-solid); padding: 8px 14px; border-radius: 10px; }

/* nền vệt màu loang (như AppBackground) */
.blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blobs i { position: absolute; border-radius: 50%; opacity: .55; }
.blobs i:nth-child(1) { width: 720px; height: 720px; left: -260px; top: -260px; background: radial-gradient(closest-side, rgba(85, 70, 224, .22), transparent); }
.blobs i:nth-child(2) { width: 620px; height: 620px; right: -220px; top: 120px; background: radial-gradient(closest-side, rgba(255, 225, 77, .30), transparent); }
.blobs i:nth-child(3) { width: 680px; height: 680px; left: 30%; top: 70%; background: radial-gradient(closest-side, rgba(16, 185, 129, .14), transparent); }

/* thanh trên */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 15px; }
.nav-links a.btn-primary { color: #fff; }
.nav-links a.lang { border: 1px solid var(--line); padding: 4px 10px; border-radius: 99px; font-size: 13px; }
@media (max-width: 760px) { .nav-links a:not(.lang):not(.cta) { display: none; } }

/* nút */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 14px; font-weight: 600; font-size: 15.5px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(85, 70, 224, .32); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.btn small { display: block; font-weight: 500; font-size: 11.5px; opacity: .75; line-height: 1.1; }
.btn .t { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.nav .btn { min-height: 38px; padding: 0 14px; border-radius: 11px; font-size: 14px; }

/* hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 22px 0 30px; max-width: 34em; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .note { margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 99px; padding: 5px 12px 5px 6px; margin-bottom: 20px; }
.eyebrow img { width: 22px; height: 22px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 36px; } }

/* điện thoại minh hoạ */
.phone { position: relative; width: min(330px, 86vw); aspect-ratio: 9 / 19.2; margin: 0 auto; border-radius: 48px; background: #111; padding: 11px; box-shadow: var(--shadow-lg); }
.screen { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background: #F5F4EF; color: #17171A; display: flex; flex-direction: column; font-size: 12px; }
:root[data-theme="dark"] .screen { background: #F5F4EF; }
.screen::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px 260px at 0 0, rgba(85, 70, 224, .18), transparent), radial-gradient(240px 240px at 100% 30%, rgba(255, 225, 77, .32), transparent); }
.island { position: absolute; top: 10px; left: 50%; width: 92px; height: 26px; transform: translateX(-50%); background: #000; border-radius: 20px; z-index: 3; }
.scr-top { position: relative; padding: 48px 18px 0; display: flex; align-items: center; justify-content: space-between; }
.scr-top b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.scr-top .av { width: 30px; height: 30px; border-radius: 50%; background: #FFE14D; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.scr-sub { position: relative; padding: 0 18px; color: #6B6B73; font-size: 11.5px; }
.scr-sub span { color: #4A3CD0; font-weight: 600; }
.scr-tabs { position: relative; display: flex; gap: 6px; padding: 12px 18px 0; }
.scr-tabs i { font-style: normal; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .7); font-size: 11px; font-weight: 600; color: #55555E; }
.scr-tabs i.on { background: #17171A; color: #fff; }
.deck { position: relative; flex: 1; margin: 14px 18px 0; }
.gcard { position: absolute; inset: 0 6px 34px; background: #fff; border-radius: 22px; box-shadow: 0 10px 30px rgba(40, 30, 120, .14); padding: 10px; display: flex; flex-direction: column; transform-origin: 50% 100%; }
.gcard.c3 { transform: rotate(6deg) translate(14px, 4px) scale(.93); opacity: .9; }
.gcard.c2 { transform: rotate(-4deg) translate(-10px, 2px) scale(.96); }
.gcard.c1 { animation: swipe 6.5s ease-in-out 1.2s infinite; animation-iteration-count: 2; }
@keyframes swipe {
  0%, 40% { transform: none; }
  52% { transform: translateX(14px) rotate(3deg); }
  64%, 100% { transform: none; }
}
.thumb { flex: 1; border-radius: 15px; position: relative; overflow: hidden; background: linear-gradient(140deg, #6E61F0, #5546E0 60%, #3D32A1); }
.thumb .kind { position: absolute; left: 8px; top: 8px; background: rgba(255, 255, 255, .92); color: #17171A; border-radius: 99px; padding: 3px 8px; font-size: 10px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.thumb .kind::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--k, #3B82F6); }
.thumb .art { position: absolute; inset: 34px 14px 14px; display: grid; gap: 7px; align-content: end; }
.thumb .art u { display: block; height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .5); text-decoration: none; }
.thumb .art u:nth-child(1) { width: 62%; height: 14px; background: rgba(255, 255, 255, .9); }
.thumb .art u:nth-child(2) { width: 88%; }
.thumb .art u:nth-child(3) { width: 70%; }
.gcard h4 { margin: 10px 4px 2px; font-size: 13.5px; line-height: 1.3; }
.gcard .src { margin: 0 4px; color: #6B6B73; font-size: 10.5px; }
.gcard .nt { margin: 8px 4px 0; background: #F1F0EC; border-radius: 10px; padding: 6px 8px; font-size: 10.5px; color: #3A3A42; }
.gcard .tags { display: flex; gap: 5px; margin: 8px 4px 2px; flex-wrap: wrap; }
.gcard .tags i { font-style: normal; font-size: 10px; background: #ECEAFD; color: #4A3CD0; border-radius: 99px; padding: 2px 8px; font-weight: 600; }
.deck-hint { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; color: #6B6B73; font-size: 10.5px; }
.tabbar { position: relative; margin: 8px 14px 14px; height: 54px; border-radius: 22px; background: rgba(255, 255, 255, .85); box-shadow: 0 8px 20px rgba(40, 30, 120, .12); display: flex; align-items: center; justify-content: space-around; padding: 0 6px; }
.tabbar span { width: 22px; height: 22px; border-radius: 7px; background: #D9D8D3; }
.tabbar span.gom { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8B80F5, #5546E0 60%, #3D32A1); box-shadow: 0 2px 5px rgba(85, 70, 224, .4); }
.tabbar span.add { width: 42px; height: 42px; border-radius: 15px; background: #5546E0; position: relative; }
.tabbar span.add::before, .tabbar span.add::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 2.6px; background: #fff; border-radius: 2px; transform: translate(-50%, -50%); }
.tabbar span.add::after { transform: translate(-50%, -50%) rotate(90deg); }
.float-mascot { position: absolute; width: 112px; right: -34px; bottom: 64px; filter: drop-shadow(0 12px 18px rgba(40, 30, 120, .25)); }
@media (max-width: 420px) { .float-mascot { width: 84px; right: -10px; } }

/* các khối */
section { padding: 72px 0; }
.sec-head { max-width: 680px; margin-bottom: 40px; }
.sec-head p { margin-top: 14px; color: var(--muted); font-size: 17.5px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g3, .g2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; background: var(--accent-soft); color: var(--accent-text); }
.ico svg { width: 24px; height: 24px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } .split.rev > :first-child { order: 0; } }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat; }

/* minh hoạ tìm kiếm */
.search-demo { background: var(--card-solid); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-lg); }
.search-box { display: flex; align-items: center; gap: 10px; border-radius: 14px; background: var(--bg); padding: 12px 14px; font-weight: 500; }
.search-box svg { width: 20px; height: 20px; color: var(--muted); }
.search-box .caret { width: 2px; height: 20px; background: var(--accent); animation: blink 1s steps(1) 6; }
@keyframes blink { 50% { opacity: 0; } }
.res { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.res:last-child { border-bottom: 0; }
.res .sq { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.res b { display: block; font-size: 15px; font-weight: 600; }
.res span { font-size: 13px; color: var(--muted); }
.res mark { background: var(--leaf); color: #17171A; border-radius: 3px; padding: 0 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.chips i { font-style: normal; font-size: 13px; font-weight: 600; border-radius: 99px; padding: 5px 12px; background: var(--bg); color: var(--muted); }
.chips i.on { background: var(--ink); color: var(--bg); }

/* cửa sổ máy tính minh hoạ */
.desk { border-radius: 18px; overflow: hidden; background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.desk .bar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.desk .bar i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.desk .bar i:nth-child(2) { background: #FEBC2E; } .desk .bar i:nth-child(3) { background: #28C840; }
.desk .bar kbd { margin-left: auto; }
.desk .body { display: grid; grid-template-columns: 150px 1fr; min-height: 260px; }
.desk .side { border-right: 1px solid var(--line); padding: 14px 10px; display: grid; gap: 6px; align-content: start; font-size: 13px; }
.desk .side span { padding: 6px 10px; border-radius: 9px; color: var(--muted); }
.desk .side span.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.desk .tiles { padding: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.desk .tiles div { border-radius: 12px; aspect-ratio: 1 / 1.05; }
@media (max-width: 520px) { .desk .body { grid-template-columns: 1fr; } .desk .side { display: none; } }
kbd { font: 600 12.5px/1 "Be Vietnam Pro", system-ui, sans-serif; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 7px; padding: 4px 7px; background: var(--bg); color: var(--ink); }

/* bảng giá */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 2px; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan .per { font-size: 13.5px; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; font-size: 15px; }
.plan li { padding-left: 24px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 12px; height: 7px; border-left: 2.4px solid var(--accent-text); border-bottom: 2.4px solid var(--accent-text); transform: rotate(-45deg); }
.plan.best { border: 2px solid var(--accent); position: relative; }
.plan .badge { position: absolute; top: -13px; left: 24px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 4px 11px; }
.price-note { margin-top: 18px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* tải về */
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .dl { grid-template-columns: 1fr; } }
.dl .card { display: flex; flex-direction: column; gap: 6px; }
.dl .card.me { border: 2px solid var(--accent); }
.dl .os { display: flex; align-items: center; gap: 12px; }
.dl .os svg { width: 34px; height: 34px; }
.dl .req { font-size: 13.5px; color: var(--muted); }
.dl .btn { margin-top: 14px; justify-content: center; }
.dl .sub { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 6px; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p, details ul { color: var(--muted); margin-top: 10px; }

/* khối kêu gọi cuối */
.final { text-align: center; background: var(--accent); color: #fff; border-radius: 32px; padding: 56px 24px; position: relative; overflow: hidden; }
.final img { width: 120px; margin: 0 auto 18px; }
.final p { opacity: .85; margin: 12px auto 26px; max-width: 32em; }
.final .btn-ghost { background: #fff; color: #17171A; border: 0; }

/* trang chữ (chính sách, hỗ trợ) */
.doc { max-width: 760px; padding-top: 56px; padding-bottom: 80px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); }
.doc .updated { color: var(--muted); margin: 12px 0 36px; }
.doc h2 { font-size: 24px; margin: 40px 0 12px; }
.doc h3 { margin: 24px 0 8px; }
.doc p, .doc li { color: color-mix(in srgb, var(--ink) 82%, var(--bg)); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 700; }
.table-scroll { overflow-x: auto; }
.callout { background: var(--accent-soft); border-radius: 16px; padding: 16px 18px; margin: 18px 0; }

footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
footer a { color: var(--muted); }

/* ---------- Hiệu ứng cuộn ---------- */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }
section[id], [id].card { scroll-margin-top: 80px; } /* nhảy tới mục không bị thanh trên che */

/* hiện dần khi cuộn tới; --d = độ trễ so le (JS đặt cho phần tử cùng nhóm) */
.reveal { opacity: 0; transform: translate3d(0, 28px, 0) scale(.985); filter: blur(6px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out);
  transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.no-js .reveal { opacity: 1; transform: none; filter: none; }
.no-js .stagger > * { opacity: 1; transform: none; }
.final.reveal { transform: translate3d(0, 40px, 0) scale(.94); }
.final.reveal.in { transform: none; }

/* danh sách con hiện lần lượt khi khối cha hiện */
.stagger > * { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1) { transition-delay: 120ms; } .stagger.in > *:nth-child(2) { transition-delay: 200ms; }
.stagger.in > *:nth-child(3) { transition-delay: 280ms; } .stagger.in > *:nth-child(4) { transition-delay: 360ms; }
.stagger.in > *:nth-child(5) { transition-delay: 440ms; } .stagger.in > *:nth-child(6) { transition-delay: 520ms; }
.stagger.in > *:nth-child(7) { transition-delay: 600ms; }

/* hero vào trang */
.hero-in > * { animation: heroIn 1s var(--ease-out) both; }
.hero-in > *:nth-child(2) { animation-delay: 80ms; } .hero-in > *:nth-child(3) { animation-delay: 160ms; }
.hero-in > *:nth-child(4) { animation-delay: 240ms; } .hero-in > *:nth-child(5) { animation-delay: 320ms; }
@keyframes heroIn { from { opacity: 0; transform: translate3d(0, 24px, 0); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.hero-art { animation: phoneIn 1.2s var(--ease-out) .15s both; }
@keyframes phoneIn { from { opacity: 0; transform: translate3d(0, 60px, 0) rotate(4deg) scale(.94); } to { opacity: 1; transform: none; } }

/* phần tử chạy theo vị trí cuộn (JS đặt --p: 0 → 1 khi cuộn qua hero) */
.hero-art .phone { transform: translate3d(0, calc(var(--p, 0) * -70px), 0) rotate(calc(var(--p, 0) * -3deg)); will-change: transform; }
.hero-art .float-mascot { transform: translate3d(calc(var(--p, 0) * 24px), calc(var(--p, 0) * -150px), 0) rotate(calc(var(--p, 0) * 14deg)); will-change: transform; }
.gcard.c3 { transform: rotate(calc(6deg + var(--p, 0) * 6deg)) translate(calc(14px + var(--p, 0) * 22px), 4px) scale(.93); }
.gcard.c2 { transform: rotate(calc(-4deg - var(--p, 0) * 5deg)) translate(calc(-10px - var(--p, 0) * 20px), 2px) scale(.96); }
.blobs { transform: translate3d(0, calc(var(--sy, 0) * -0.15px), 0); will-change: transform; }

/* thanh trên: nổi khối khi đã cuộn, thanh tiến độ đọc */
.nav { transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease; }
.nav.scrolled { box-shadow: 0 6px 24px rgba(20, 20, 40, .08); }
.nav .wrap { transition: height .35s var(--ease-out); }
.nav.scrolled .wrap { height: 56px; }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%;
  transform: scaleX(var(--read, 0)); background: linear-gradient(90deg, var(--accent), #8B80F5 60%, var(--leaf)); }
.nav-links a.active { color: var(--accent-text); }

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) :is(.reveal, .stagger > *, .hero-in > *, .hero-art) { opacity: 1 !important; transform: none !important; filter: none !important; }
  html:not(.force-motion) :is(.hero-art .phone, .hero-art .float-mascot, .blobs) { transform: none !important; }
}

/* minh hoạ: link gốc mất, Gom vẫn giữ */
.keep-demo { position: relative; padding: 18px 8px 8px 30px; }
.keep-demo .gone { position: absolute; left: 0; top: 0; width: 72%; border-radius: 16px; overflow: hidden; background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow); transform: rotate(-5deg); opacity: .92; }
.keep-demo .gone .url { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); background: var(--bg); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keep-demo .gone .url s { text-decoration-color: #D93A3A; }
.keep-demo .gone .err { display: flex; align-items: center; gap: 14px; padding: 18px 16px 40px; }
.keep-demo .gone .err b { font-size: 38px; font-weight: 800; color: #D93A3A; letter-spacing: -.03em; line-height: 1; }
.keep-demo .gone .err span { font-size: 14px; color: var(--muted); line-height: 1.35; }
.keep-card { position: relative; margin: 96px 0 0 auto; width: 84%; background: var(--card-solid); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 16px; box-shadow: var(--shadow-lg); }
.keep-card .img { height: 160px; border-radius: 14px; background: #C9DCEB url("demo-santorini.jpg") center 60% / cover; }
.keep-card .kind { display: inline-block; margin: 12px 4px 0; font-size: 12px; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); border-radius: 99px; padding: 3px 10px; }
.keep-card h4 { margin: 8px 4px 0; font-size: 17px; line-height: 1.3; }
.keep-card p { margin: 6px 4px 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.keep-card .note { margin: 10px 4px 0; font-size: 13.5px; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.keep-card .saved { position: absolute; right: -10px; top: -14px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #fff; background: #1F9D57; border-radius: 99px; padding: 6px 12px; box-shadow: 0 8px 20px rgba(31, 157, 87, .35); }
.keep-card .saved svg { width: 14px; height: 14px; }

/* minh hoạ: Ôn lại thứ lâu không xem */
.review-demo { display: grid; gap: 14px; }
.notif { display: flex; gap: 12px; align-items: center; background: var(--card-solid); border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px; box-shadow: var(--shadow-lg); }
.notif img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.notif div { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.notif b { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; }
.notif b small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.rev-card { background: var(--card-solid); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 14px; box-shadow: var(--shadow); }
.rev-card .img { height: 130px; border-radius: 14px; background: #9FB5C2 url("demo-islands.jpg") center 70% / cover; }
.rev-card .tags { display: flex; gap: 6px; margin: 12px 4px 0; flex-wrap: wrap; }
.rev-card .tags i { font-style: normal; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; background: var(--accent-soft); color: var(--accent-text); }
.rev-card .tags i.old { background: #FFF2D6; color: #9A5B00; }
.rev-card h4 { margin: 8px 4px 0; font-size: 16px; }
.rev-card .acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.rev-card .acts span { text-align: center; font-size: 13px; font-weight: 600; border-radius: 12px; padding: 9px 6px; background: var(--bg); color: var(--ink); }
.rev-card .acts span.go { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rev-card .tags i.old { background: #3A2E12; color: #F5C46B; } }
:root[data-theme="dark"] .rev-card .tags i.old { background: #3A2E12; color: #F5C46B; }
