/* ==========================================================================
   mimirlearn.vn — trang giới thiệu MIMIR Learn
   Cùng hệ thiết kế với app (`MINIR LEARN/app-flutter/lib/design/tokens.dart`):
   nền kem ấm + hai vầng sáng, thương hiệu chàm indigo #4F46E5, thẻ trắng
   bo 24, mực slate. Không phụ thuộc ngoài — mở bằng mọi web server đều chạy.
   ========================================================================== */

:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --line: #e2e8f0;
  --line2: #cbd5e1;
  --field: #f8fafc;
  --ink: #0f172a;
  --ink2: #475569;
  --ink3: #64748b;
  --ac: #4f46e5;
  --ac-ink: #4338ca;
  --ac-soft: #e0e7ff;
  --ac-line: #c7d2fe;
  --grn: #059669;  --grn-ink: #065f46;  --grn-soft: #d1fae5;
  --amb: #92400e;  --amb-soft: #fef3c7;
  --red: #e11d48;  --red-soft: #ffe4e6;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 14px rgba(15, 23, 42, .06);
  --shadow-pop: 0 10px 24px rgba(79, 70, 229, .12);
  --r-md: 12px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;
  --font-sans: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system,
    'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.55;
  /* AppBackground của app: nền kem + vầng sáng hồng/vàng */
  background-color: #fffbf5;
  background-image:
    radial-gradient(circle 560px at -80px -100px, rgba(255, 228, 230, .9), rgba(255, 228, 230, 0) 70%),
    radial-gradient(circle 520px at calc(100% + 60px) -60px, rgba(254, 243, 199, .9), rgba(254, 243, 199, 0) 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--ac); text-decoration: none; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ─────────────────────────── Nút ─────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ac);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: var(--r-lg);
  box-shadow: 0 3px 10px rgba(79, 70, 229, .28), var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79, 70, 229, .32), var(--shadow); }
.btn.small { padding: 9px 16px; font-size: 13.5px; border-radius: var(--r-md); }
.btn.lg { padding: 15px 26px; font-size: 16px; }
.btn.xl { padding: 17px 32px; font-size: 17px; }
.btn.ghost {
  background: var(--card);
  color: var(--ink2);
  border: 1px solid var(--line2);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--ac-line); color: var(--ac-ink); }

/* ─────────────────────────── Header ─────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 245, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 20px; padding: 12px 0; }
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: -.3px;
}
.logo b { color: var(--ac); }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.main-nav > a:not(.btn) { color: var(--ink2); font-weight: 700; font-size: 14.5px; }
.main-nav > a:not(.btn):hover { color: var(--ac); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--card);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav > a:not(.btn) { padding: 10px 6px; }
  .main-nav .btn { margin-top: 6px; }
}

/* ─────────────────────────── Hero ─────────────────────────── */

.hero { padding: 64px 0 40px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: var(--ac-soft);
  color: var(--ac-ink);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -1px;
  font-weight: 800;
}
.hero h1 em { font-style: normal; color: var(--ac); }
.lede {
  margin-top: 18px;
  font-size: 16.5px;
  color: var(--ink2);
  max-width: 54ch;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-stats {
  display: flex;
  gap: 34px;
  list-style: none;
  margin-top: 34px;
  flex-wrap: wrap;
}
.hero-stats b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.hero-stats span { font-size: 13px; color: var(--ink3); font-weight: 600; }

/* ── Mockup điện thoại — thu nhỏ đúng giao diện app ── */

.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone {
  width: min(320px, 100%);
  border-radius: 44px;
  border: 8px solid #0f172a;
  background: #fffbf5;
  box-shadow: var(--shadow-pop), 0 24px 48px rgba(15, 23, 42, .14);
  position: relative;
  overflow: hidden;
}
.phone-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 22px;
  background: #0f172a;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone-screen {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 34px 12px 12px;
  min-height: 560px;
  background-image:
    radial-gradient(circle 200px at -40px -40px, rgba(255, 228, 230, .8), transparent 70%),
    radial-gradient(circle 180px at calc(100% + 30px) -20px, rgba(254, 243, 199, .8), transparent 70%);
}
.p-topbar { display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.p-topbar img { height: 22px; }
.p-topbar > span { font-size: 13px; font-weight: 800; margin-right: auto; }
.p-pill {
  font-style: normal;
  font-size: 10.5px; font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--r-pill);
}
.p-pill.amber { background: var(--amb-soft); color: var(--amb); }
.p-pill.brand { background: var(--ac-soft); color: var(--ac-ink); }

.p-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 11px 12px;
}
.p-row { display: flex; align-items: center; gap: 9px; }
.p-goal-text small { display: block; font-size: 10px; font-weight: 700; color: var(--ink3); }
.p-goal-text b { font-size: 15px; font-weight: 800; }
.p-goal-badge { margin-left: auto; text-align: center; font-size: 16px; }
.p-goal-badge small { display: block; font-size: 9.5px; font-weight: 700; color: var(--ink3); }
.p-bar { height: 7px; border-radius: var(--r-pill); background: var(--line); margin-top: 9px; overflow: hidden; }
.p-bar i { display: block; height: 100%; background: var(--ac); border-radius: var(--r-pill); }

.p-review { display: flex; align-items: center; gap: 9px; background: var(--red-soft); border-color: transparent; }
.p-review > span { font-size: 19px; }
.p-review b { display: block; font-size: 12.5px; font-weight: 800; }
.p-review small { font-size: 10px; color: var(--red); font-weight: 600; }
.p-chip {
  margin-left: auto;
  font-style: normal;
  background: var(--card);
  color: var(--ink2);
  font-size: 10px; font-weight: 800;
  padding: 4px 9px;
  border-radius: var(--r-pill);
}

.p-section { font-size: 11px; font-weight: 800; color: var(--ink2); padding: 2px 4px 0; }
.p-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  border-radius: var(--r-lg);
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 13px rgba(15, 23, 42, .16);
}
.p-tile span { font-size: 19px; }
.p-tile i { margin-left: auto; font-style: normal; opacity: .7; }

.p-tabbar {
  margin-top: auto;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 7px 0 6px;
}
.p-tabbar span {
  flex: 1;
  text-align: center;
  font-size: 14px;
  color: var(--ink3);
}
.p-tabbar span small { display: block; font-size: 8.5px; font-weight: 600; }
.p-tabbar span.on { color: var(--ac); }
.p-tabbar span.on small { font-weight: 800; }

.phone-caption { font-size: 13px; color: var(--ink3); font-weight: 700; }

@media (max-width: 920px) {
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .phone-wrap { order: -1; }
}

/* ─────────────────────────── Các dải nội dung ─────────────────────────── */

.band { padding: 64px 0; }
.band.alt { background: rgba(241, 245, 249, .55); border-block: 1px solid var(--line); }
.band-head { max-width: 640px; margin-bottom: 34px; }
.band-head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ac);
  background: var(--ac-soft);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  margin-bottom: 14px;
}
.band h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.6px; line-height: 1.2; font-weight: 800; }
.band-head p { margin-top: 10px; color: var(--ink2); font-size: 15.5px; }

/* 6 dạng bài */
.qtypes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.qtype {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qtype .ic { font-size: 26px; }
.qtype b { font-size: 15px; font-weight: 800; }
.qtype small { font-size: 12.5px; color: var(--ink3); font-weight: 600; }

/* Tính năng */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 22px;
}
.feature .ic {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  background: var(--ac-soft);
  font-size: 23px;
  margin-bottom: 14px;
}
.feature h3 { font-size: 16.5px; font-weight: 800; letter-spacing: -.2px; }
.feature p { margin-top: 6px; font-size: 14px; color: var(--ink2); }

/* Chương trình theo cấp */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}
.stage {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 22px;
}
.stage header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.stage .em { font-size: 30px; }
.stage h3 { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.stage header small { color: var(--ink3); font-weight: 700; font-size: 12.5px; }
.stage .nums { font-size: 13.5px; color: var(--ink2); }
.stage .nums b { color: var(--ac-ink); font-size: 15px; }
.subj-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.subj-list li {
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--ink2);
  font-size: 12.5px;
  font-weight: 700;
  border-radius: var(--r-pill);
  padding: 5px 11px;
}
.stage-note { margin-top: 12px; font-size: 12.5px; color: var(--grn-ink); background: var(--grn-soft); border-radius: var(--r-md); padding: 9px 12px; }
.extra-note { margin-top: 18px; font-size: 14px; color: var(--ink2); text-align: center; }

/* Ngoại ngữ */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.lang-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: 0 7px 16px rgba(15, 23, 42, .18);
  transition: transform .12s ease;
}
.lang-tile:hover { transform: translateY(-2px); }
.lang-tile .flag { font-size: 34px; }
.lang-tile b { font-size: 17px; font-weight: 800; }
.lang-tile small { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .85); margin-top: 2px; }
.lang-tile i { margin-left: auto; font-style: normal; font-size: 22px; opacity: .7; }

/* Trò chơi + Sisy */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}
.col .kicker { margin-bottom: 10px; }
.col h2 { font-size: clamp(22px, 3vw, 30px); }
.game-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 20px 0 22px; }
.game-list li {
  display: flex;
  gap: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 15px 17px;
}
.game-list .ic { font-size: 25px; }
.game-list b { font-size: 15px; font-weight: 800; }
.game-list small { display: block; font-size: 13px; color: var(--ink2); margin-top: 2px; }

.chat-preview {
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg { display: flex; gap: 9px; align-items: flex-end; }
.msg.user { justify-content: flex-end; }
.msg img { width: 30px; height: 30px; border-radius: 50%; }
.bubble {
  max-width: 82%;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  border-radius: 16px;
}
.msg.bot .bubble { background: var(--field); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.user .bubble { background: var(--ac); color: #fff; border-bottom-right-radius: 5px; }

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 28px; }
}

/* CTA */
.cta-band { padding: 70px 0 76px; }
.cta-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-pop);
  padding: 48px 32px;
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}
.cta-mascot { margin-inline: auto; }
.cta-card h2 { margin-top: 14px; font-size: clamp(22px, 3.2vw, 30px); letter-spacing: -.5px; }
.cta-card p { margin: 12px auto 24px; max-width: 52ch; color: var(--ink2); }

/* ─────────────────────────── Footer ─────────────────────────── */

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 34px; background: rgba(241, 245, 249, .55); }
.footer-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink2); font-weight: 700; }
.footer-nav { margin-left: auto; display: flex; gap: 18px; }
.footer-nav a { color: var(--ink2); font-weight: 700; font-size: 13.5px; }
.footer-nav a:hover { color: var(--ac); }
.footer-row > small { color: var(--ink3); font-size: 12.5px; }

/* ─────────────────────────── Hiệu ứng reveal ─────────────────────────── */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
