/* ============================================================
   APPORION — GLOBAL STYLESHEET
   Dùng chung cho MỌI trang. Import trước CSS riêng của trang.
   <link rel="stylesheet" href="/css/global.css">
   ============================================================ */

/* ───────── RESET & DESIGN TOKENS ───────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Nền */
  --ink:  #0A0E1A;
  --ink2: #0F1628;
  --ink3: #141C35;

  /* Accent chính */
  --cyan:        #67E8F9;
  --cyan2:       #93F0FA;
  --cyan-glow:   rgba(103,232,249,0.10);
  --cyan-border: rgba(103,232,249,0.22);
  --cyan-dim:    rgba(103,232,249,0.06);

  /* Accent phụ (per-vertical) */
  --teal:          #00D4AA;
  --teal-glow:     rgba(0,212,170,0.10);
  --teal-border:   rgba(0,212,170,0.22);
  --purple:        #A78BFA;
  --purple-glow:   rgba(167,139,250,0.10);
  --purple-border: rgba(167,139,250,0.22);
  --coral:         #F87171;
  --coral-glow:    rgba(248,113,113,0.10);
  --coral-border:  rgba(248,113,113,0.22);

  /* Chữ */
  --ice:  #E8EDF8;
  --ice2: #B8C4E0;
  --ice3: #7A8BAD;

  /* Glass */
  --glass:        rgba(255,255,255,0.04);
  --glass2:       rgba(255,255,255,0.07);
  --glass-border: rgba(255,255,255,0.08);

  /* Layout */
  --nav-h: 64px;
  --container: 1100px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--ink);
  color: var(--ice);
  overflow-x: hidden;
  line-height: 1.6;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--cyan-border); border-radius: 3px; }

/* ───────── LOGO (dùng trong nav + footer) ───────── */
.logo-flip { display: inline-block; transform: scaleY(-1); line-height: 1; }

/* ───────── NAV ───────── */
nav#mainNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 5%; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(10,14,26,0.90);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s;
}
nav#mainNav.scrolled { background: rgba(10,14,26,0.98); }
.nav-logo {
  font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: 18px; letter-spacing: -0.5px;
  color: #fff; text-decoration: none;
}
.nav-logo .accent { color: var(--cyan); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 13px; color: var(--ice3);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover  { color: var(--ice); }
.nav-links a.active { color: var(--cyan); }
.nav-cta { display: flex; gap: 10px; }

/* ───────── BUTTONS ───────── */
.btn-ghost {
  padding: 8px 18px; border: 1px solid var(--glass-border); border-radius: 6px;
  font-size: 13px; color: var(--ice2); background: none; cursor: pointer;
  font-family: 'Be Vietnam Pro', sans-serif; transition: all 0.2s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.2); color: #fff; }
.btn-cyan {
  padding: 8px 20px; border: none; border-radius: 6px;
  font-size: 13px; font-weight: 600; color: #0A1A20; background: var(--cyan);
  cursor: pointer; font-family: 'Be Vietnam Pro', sans-serif; transition: all 0.2s;
}
.btn-cyan:hover { background: var(--cyan2); transform: translateY(-1px); }

/* ───────── HAMBURGER ───────── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: #fff; border-radius: 2px; transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ───────── MOBILE DRAWER ───────── */
.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 99;
  background: rgba(10,14,26,0.98); backdrop-filter: blur(24px);
  flex-direction: column; padding: 32px 5%; overflow-y: auto;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu-links {
  list-style: none; display: flex; flex-direction: column;
  gap: 4px; margin-bottom: 32px;
}
.mobile-menu-links a {
  display: block; padding: 14px 0; font-size: 18px; font-weight: 600;
  color: var(--ice2); text-decoration: none;
  border-bottom: 1px solid var(--glass-border); transition: color 0.2s;
}
.mobile-menu-links a:hover,
.mobile-menu-links a.active { color: var(--cyan); }
.mobile-menu-cta { display: flex; flex-direction: column; gap: 10px; }
.mobile-menu-cta .btn-ghost,
.mobile-menu-cta .btn-cyan {
  width: 100%; padding: 14px; font-size: 15px;
  text-align: center; border-radius: 8px; cursor: pointer;
}
.mobile-subnav { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--glass-border); }
.mobile-subnav:empty { display: none; }
.mobile-subnav-title {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ice3); margin-bottom: 12px; font-weight: 600;
}
.mobile-subnav-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; font-size: 14px; color: var(--ice3); text-decoration: none;
  border-bottom: 1px solid var(--glass-border); transition: color 0.2s;
}
.mobile-subnav-links a:hover { color: var(--ice); }

/* ───────── FOOTER ───────── */
footer {
  padding: 48px 5%;
  border-top: 1px solid var(--glass-border); background: var(--ink);
}
.footer-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
}
.footer-brand {
  font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 600;
  color: #fff; letter-spacing: -0.5px; display: flex; align-items: center;
}
.footer-brand .accent { color: var(--cyan); }
.footer-tagline { font-size: 12px; color: var(--ice3); margin-top: 4px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-size: 13px; color: var(--ice3);
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--ice); }
.footer-copy { font-size: 12px; color: var(--ice3); }

/* ───────── ANIMATIONS ───────── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s, transform 0.6s;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.s1 { transition-delay: 0.05s; }
.s2 { transition-delay: 0.12s; }
.s3 { transition-delay: 0.19s; }
.s4 { transition-delay: 0.26s; }

/* ───────── ACCENT UTILITIES ─────────
   Gắn lên bất kỳ container nào — mọi element con
   dùng var(--acc) / var(--acc-border) / var(--acc-soft)
   sẽ tự động đổi màu theo. Dùng được trên MỌI trang. */
.acc-cyan {
  --acc:        var(--cyan);
  --acc-border: var(--cyan-border);
  --acc-soft:   var(--cyan-glow);
  --acc-ink:    #0A1A20;
}
.acc-teal {
  --acc:        var(--teal);
  --acc-border: var(--teal-border);
  --acc-soft:   var(--teal-glow);
  --acc-ink:    #001A14;
}
.acc-purple {
  --acc:        var(--purple);
  --acc-border: var(--purple-border);
  --acc-soft:   var(--purple-glow);
  --acc-ink:    #0A0E1A;
}
.acc-coral {
  --acc:        var(--coral);
  --acc-border: var(--coral-border);
  --acc-soft:   var(--coral-glow);
  --acc-ink:    #0A0E1A;
}

/* ───────── SECTION PRIMITIVES ─────────
   Building blocks cho MỌI trang — dùng ngay từ page-template. */
section { padding: 96px 5%; }
.section-inner { max-width: var(--container); margin: 0 auto; }
.section-header-center { text-align: center; }
.section-header-center .section-title { max-width: 100%; }
.section-header-center .section-desc  { max-width: 480px; margin-left: auto; margin-right: auto; }
.section-eyebrow {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 16px; font-weight: 500;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px); font-weight: 700;
  letter-spacing: -1px; color: #fff; max-width: 640px; line-height: 1.15;
}
.section-desc {
  font-size: 16px; color: var(--ice3); max-width: 520px;
  margin-top: 14px; line-height: 1.7; font-weight: 300;
}

/* ───────── PAGE HEAD ─────────
   Header đơn giản cho trang mới — đã tính offset nav fixed 64px. */
.page-head {
  padding: 140px 5% 60px;
  background: var(--ink);
}
.page-head .section-title { font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -1.5px; }

/* ───────── RESPONSIVE (global) ───────── */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
