/* footer.css — mega footer nền tối cho `/` và `/tutorial`.
 *
 * ⚠️ VÌ SAO FILE NÀY TỰ KHAI BÁO MÀU, trong khi shell.css thì không:
 * hai trang mang footer này KHÔNG dùng chung bộ token nào cả.
 *   · `/`         nạp landing.css VÀ CHỈ THẾ THÔI (xem chú thích LANDING_ASSETS
 *                 trong main.py) — nó có --ls-*, KHÔNG có --ink-*, --crimson,
 *                 --slate-*, --space-*.
 *   · `/tutorial` nạp style.css + he-b.css — nó có đủ bộ token của app.
 * Một component đi chung hai trang như vậy thì phải tự mang màu của nó, nếu
 * không nó sẽ vẽ bằng giá trị dự phòng ở đúng một trong hai — đúng cái bẫy mà
 * `--accent` đã gây ra suốt cả tầng guide/bank/thư viện.
 *
 * Mỗi giá trị dưới đây CHÉP từ một token có thật, và ghi rõ chép từ đâu. Đổi
 * ngôn ngữ thị giác thì đổi ở nguồn, rồi đồng bộ xuống đây.
 *
 * Nền tối là điểm gặp nhau của hai ngôn ngữ: landing đã có --ls-ink #000000,
 * còn app đã dùng --ink-950 cho hero /history và nền màn đăng nhập.
 */

.mega-foot {
  --mf-ground: #0A0A0A;   /* = --ink-950 (style.css) */
  --mf-raise:  #161616;   /* = --ink-900 */
  --mf-line:   #232323;   /* = --ink-700 */
  --mf-dim:    #9a9a9a;   /* = --slate-400 */
  --mf-soft:   #d2d2d2;   /* = --slate-300 */
  --mf-bright: #ffffff;
  --mf-accent: #e11d48;   /* = --ls-red (landing.css), cũng là màu ô đỏ trong brand-mark.svg */

  --mf-font-head: 'Space Grotesk', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mf-font-body: 'Be Vietnam Pro', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  background: var(--mf-ground);
  color: var(--mf-dim);
  font-family: var(--mf-font-body);
  /* Cả hai trang đều có nền sáng ở trên, nên footer tự tách ra bằng chính màu
     của nó — không cần viền trên. */
  border-top: 0;
}

.mf-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 76px) clamp(20px, 4vw, 48px) clamp(28px, 3vw, 36px);
}

/* Một cột trên điện thoại → hai cột từ 620px → bốn cột tỉ lệ 4/2/2/4 từ
   1024px, đúng tỉ lệ bản mockup. */
.mf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 32px;
}
@media (min-width: 620px) {
  .mf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .mf-grid { grid-template-columns: 4fr 3fr 4fr; gap: 32px; }
}

.mf-col { min-width: 0; }

/* ---------- cột thương hiệu ---------- */

.mf-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.mf-mark { width: 38px; height: 38px; flex: none; display: block; }
.mf-brand-copy { display: block; min-width: 0; }
.mf-brand-name {
  display: block;
  font-family: var(--mf-font-head); font-weight: 700;
  font-size: 1.2rem; line-height: 1.15; letter-spacing: -0.01em;
  color: var(--mf-bright);
}
.mf-brand-sub {
  display: block; margin-top: 3px;
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mf-dim);
}

.mf-desc {
  margin: 20px 0 0;
  font-size: 0.95rem; line-height: 1.7;
  color: var(--mf-dim);
  max-width: 42ch;
}

.mf-contact { list-style: none; margin: 20px 0 0; padding: 0; }
.mf-contact li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.mf-contact svg { flex: none; color: var(--mf-dim); }

/* ---------- cột liên kết ---------- */

.mf-head {
  margin: 0 0 20px;
  font-family: var(--mf-font-head); font-weight: 700;
  font-size: 0.95rem; letter-spacing: 0.02em;
  color: var(--mf-bright);
}

.mf-links { list-style: none; margin: 0; padding: 0; }
.mf-links li + li { margin-top: 14px; }

.mf-link {
  color: var(--mf-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.mf-link:hover { color: var(--mf-bright); }

/* Trượt sang phải 4px khi rê chuột, đúng như mockup.
   Gated on (hover: hover) để thiết bị cảm ứng không kẹt ở trạng thái hover —
   cùng idiom landing.css:1013 đang dùng.
   KHÔNG bọc trong @media (prefers-reduced-motion): máy của chủ dự án luôn báo
   reduce-motion nên khối đó sẽ luôn kích hoạt và xoá mất hiệu ứng cho tất cả
   mọi người (CLAUDE.md quy tắc 4 — đã trả giá bằng một spinner đứng hình). */
@media (hover: hover) {
  .mf-links .mf-link {
    display: inline-block;
    transition: transform 0.15s ease, color 0.15s ease;
  }
  .mf-links .mf-link:hover { transform: translateX(4px); }
}

/* ---------- cột kêu gọi ---------- */

.mf-cta-note {
  margin: 0 0 20px;
  font-size: 0.95rem; line-height: 1.7; color: var(--mf-dim);
  max-width: 40ch;
}

/* Nút đặc, bo góc nhẹ. Đây là nút duy nhất trong footer, và nó là hành động
   của cả trang — nên nó được phép là thứ sáng nhất ở đây. */
.mf-cta {
  display: inline-block;
  background: var(--mf-accent); color: var(--mf-bright);
  font-family: var(--mf-font-head); font-weight: 700;
  font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none;
  padding: 13px 26px; border-radius: 6px;
  transition: background 0.15s ease;
}
.mf-cta:hover { background: #f0284f; }

.mf-cta-alt { margin: 16px 0 0; font-size: 0.9rem; color: var(--mf-dim); }
.mf-cta-alt .mf-link { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- dải đáy ---------- */

.mf-bottom {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px;
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: 26px;
  border-top: 1px solid var(--mf-line);
}
.mf-copy { margin: 0; font-size: 0.82rem; color: #6b6b6b; }  /* = --slate-500 */

.mf-social {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--mf-dim); text-decoration: none;
  font-size: 0.88rem;
  padding: 7px 13px;
  border: 1px solid var(--mf-line); border-radius: 999px;
  background: var(--mf-raise);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.mf-social:hover { color: var(--mf-bright); border-color: #454444; }  /* = --slate-600 */
