/* Trang chủ nhiều tab. Dùng chung biến màu và các khối .panel/.drop/.adv/.steps… của style.css;
   tệp này chỉ thêm phần khung trang (thanh tab, các tab nội dung, chân trang). */

.home { --head-h: 68px; }
.home h1, .home h2, .home h3 { text-wrap: balance; }
.home h3 { margin: 0; font-size: 17px; line-height: 1.35; letter-spacing: -.01em; }
.home .wrap.narrow { width: min(820px, 100% - 32px); }
.center { text-align: center; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { left: 16px; }

/* ---------- Thanh điều hướng ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(246, 243, 236, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-head.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(18, 51, 47, .35); }
.head-in { display: flex; align-items: center; gap: 20px; min-height: var(--head-h); }
.site-head .brand { flex: none; }
.tabs { display: flex; gap: 4px; margin-inline: auto; padding: 4px; border-radius: 99px; background: rgba(18, 51, 47, .05); }
.tabs a { padding: 8px 15px; border-radius: 99px; font-size: 14.5px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 51, 47, .12); }
.button.small { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.head-cta { flex: none; }

/* ---------- Các tab ---------- */
.view { display: none; }
.view.on { display: block; animation: view-in .28s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.home .hero { padding: 28px 0 40px; }
.home .pitch { padding-top: 36px; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px 6px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--brand-dark); }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f9e55; box-shadow: 0 0 0 4px rgba(47, 158, 85, .16); }
.pitch-more { margin: 26px 0 0; }
.arrow-link { font-weight: 700; text-decoration: none; }
.arrow-link::after { content: " →"; transition: margin .15s; }
.arrow-link:hover::after { margin-left: 4px; }
.panel.pulse { animation: pulse 1s ease; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(242, 180, 65, .8), var(--shadow); } 100% { box-shadow: 0 0 0 18px rgba(242, 180, 65, 0), var(--shadow); } }

.facts { list-style: none; margin: 0 0 56px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.facts li { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; }
.facts b { flex: none; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.facts li > span { font-size: 13.5px; line-height: 1.4; color: var(--muted); }

.band { background: var(--ink); color: #fff; padding: 64px 0 60px; }
.band .eyebrow { color: var(--amber); }
.band .arrow-link { color: #fff; }
.sec-head { margin: 0 0 28px; }
.sec-head h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; }
.sec-head .eyebrow { margin-bottom: 10px; }
.flow { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.flow li { padding: 24px; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.flow-num { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 10px; background: var(--amber); color: #3d2a00; font-weight: 800; }
.flow b { font-size: 17px; }
.flow p { margin: 6px 0 0; font-size: 15px; color: rgba(255, 255, 255, .72); }

.page-head { padding: 48px 0 36px; max-width: 720px; }
.page-head h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; }
.page-head .lead { max-width: 36em; }

/* ---------- Tính năng: thẻ mẫu ---------- */
.demo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; margin-bottom: 72px; }
.demo { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 18px; box-shadow: var(--shadow); }
.demo header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 12px; }
.demo-note { color: #9aa8a4; }
.demo .front { margin: 0; font-size: 16px; }
.demo .back p { font-size: 15px; }
.demo .flip { align-self: flex-start; }
.demo .blank.shown { font-weight: 700; }
.demo .options { margin-top: 14px; }
.demo .option { font-size: 14.5px; padding: 9px 12px; }
.demo .option-note { margin: 5px 0 2px 50px; font-size: 13px; }
.demo-why { margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13.5px; color: var(--muted); }

.bento { list-style: none; margin: 0 0 72px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bento li { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.bento .wide { grid-column: span 2; }
.bento .wide:first-child { background: var(--brand); border-color: var(--brand); color: #fff; }
.bento .wide:first-child p { color: rgba(255, 255, 255, .84); }
.bento .wide:first-child .ico { background: rgba(255, 255, 255, .16); color: #fff; }
.bento .soft { background: var(--amber-soft); border-color: #f1e2b4; }
.bento .soft .ico { background: #fff; color: #8a5a00; }
.bento p { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.ico { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cách hoạt động ---------- */
.timeline { list-style: none; margin: 0 0 40px; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding-bottom: 30px; }
.timeline li::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.tl-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); color: var(--brand); font-weight: 800; }
.timeline h3 { padding-top: 9px; font-size: 19px; }
.timeline h3 small { margin-left: 8px; padding: 2px 9px; border-radius: 99px; background: var(--amber-soft); color: #8a5a00; font-size: 12px; font-weight: 600; letter-spacing: 0; white-space: nowrap; vertical-align: 2px; }
.timeline p { margin: 6px 0 0; color: var(--muted); }
.note-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 72px; }
.note { padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.note ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.note p { margin: 10px 0 0; color: var(--muted); }

/* ---------- Hướng dẫn Anki ---------- */
.guide { list-style: none; margin: 0 0 64px; padding: 0; display: grid; gap: 14px; }
.guide li { padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.guide h3 { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.guide h3 span { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-dark); font-size: 14px; font-weight: 800; }
.guide p { margin: 10px 0 0 42px; color: var(--muted); }
.guide p b { color: var(--ink); }
.tips { list-style: none; margin: 0 0 72px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tips li { padding: 18px 20px; border-radius: 14px; background: var(--amber-soft); border: 1px solid #f1e2b4; font-size: 15px; color: #5c4a1c; }
.tips b { display: block; margin-bottom: 4px; color: #3d2a00; }

/* ---------- Hỏi đáp ---------- */
.faq-group { margin-bottom: 36px; }
.faq-group h2 { margin-bottom: 6px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.faq-group details { border-bottom: 1px solid var(--line); }
.faq-group summary { display: flex; justify-content: space-between; gap: 16px; padding: 17px 0; font-size: 17px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-group summary::-webkit-details-marker { display: none; }
.faq-group summary::after { content: "+"; flex: none; color: var(--brand); font-size: 22px; font-weight: 600; line-height: 1.1; }
.faq-group details[open] summary::after { content: "–"; }
.faq-group summary:hover { color: var(--brand-dark); }
.faq-group details p { margin: -4px 0 18px; max-width: 42em; color: var(--muted); }

/* ---------- Lời kêu gọi cuối tab + chân trang ---------- */
.cta { margin: 0 0 72px; padding: 44px 24px; border-radius: 24px; background: var(--ink); color: #fff; text-align: center; }
.cta h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; }
.cta p { margin: 10px 0 22px; color: rgba(255, 255, 255, .74); }
.cta .button { background: var(--amber); color: #3d2a00; }
.cta .button:hover { background: #f7c35c; }

.site-foot { border-top: 1px solid var(--line); background: #efeadf; }
.foot-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding: 44px 0 28px; }
.foot-brand p { margin: 12px 0 0; max-width: 24em; font-size: 14px; color: var(--muted); }
.site-foot nav { display: grid; gap: 8px; align-content: start; font-size: 14.5px; }
.site-foot nav b { margin-bottom: 4px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.site-foot nav a { color: var(--ink); text-decoration: none; }
.site-foot nav a:hover { color: var(--brand); text-decoration: underline; }
.foot-fine { padding: 18px 0 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Màn hình nhỏ ---------- */
@media (max-width: 980px) {
  .head-in { flex-wrap: wrap; gap: 0 16px; padding-top: 12px; }
  .site-head .brand { margin-right: auto; }
  .tabs { order: 3; width: calc(100% + 32px); margin: 10px -16px 0; padding: 0 16px 10px; border-radius: 0; background: none; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: 7px 13px; border: 1px solid var(--line); background: var(--surface); }
  .tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
  .demo-grid, .bento { grid-template-columns: 1fr 1fr; }
  .bento .wide { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .home .hero { padding: 12px 0 32px; }
  .home .pitch { padding-top: 12px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(3) { border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .flow, .note-grid, .tips { grid-template-columns: 1fr; }
  .band { padding: 48px 0 44px; }
  .page-head { padding: 32px 0 28px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .head-cta { display: none; }
  .demo-grid, .bento { grid-template-columns: 1fr; }
  .facts li { padding: 14px; gap: 10px; }
  .facts b { font-size: 24px; }
  .timeline li { grid-template-columns: 36px 1fr; gap: 14px; }
  .tl-num { width: 36px; height: 36px; }
  .timeline li::before { left: 17px; top: 36px; }
  .timeline h3 { padding-top: 5px; }
  .guide p { margin-left: 0; }
  .cta { padding: 36px 20px; border-radius: 20px; }
}
