/* ============================================================
   Allingo — Base / design tokens
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* neutrals — slightly cool */
  --bg:        #ffffff;
  --bg-subtle: #f6f7f9;
  --bg-sunken: #eef0f4;
  --surface:   #ffffff;
  --border:    #e6e8ee;
  --border-strong: #d6d9e2;

  --text:      #0b1220;
  --text-sec:  #424b5b;
  --text-mut:  #6b7384;
  --text-faint:#969eaf;

  /* accent (electric blue) */
  --accent:        #2563eb;
  --accent-strong: #1d4fd7;
  --accent-press:  #1b46be;
  --accent-soft:   #ecf2fe;
  --accent-soft-2: #dfe9fd;
  --accent-ink:    #14306e;

  /* positive metric green */
  --pos:      #0c9d6e;
  --pos-soft: #e6f6ef;

  /* warning amber for "before" / pain */
  --warn:      #c2410c;
  --warn-soft: #fdeee5;

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(15,23,42,.06);
  --shadow-sm: 0 2px 6px -1px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 10px 28px -8px rgba(15,23,42,.14), 0 2px 6px -2px rgba(15,23,42,.06);
  --shadow-lg: 0 32px 64px -20px rgba(15,23,42,.28), 0 8px 24px -12px rgba(15,23,42,.12);
  --shadow-accent: 0 14px 30px -10px color-mix(in srgb, var(--accent) 48%, transparent);

  --maxw: 1200px;
  --gut: 24px;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --head-font: var(--font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent-soft-2); color: var(--accent-ink); }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.section { padding: 112px 0; position: relative; }
.section--tight { padding: 80px 0; }
.section--sunken { background: var(--bg-subtle); }
.section--ink { background: #0b1220; color: #e7eaf0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1.5px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::before { display: none; }

h1, h2, h3, h4 { font-family: var(--head-font); font-weight: 700; letter-spacing: -0.025em; color: var(--text); margin: 0; }
h1 { font-size: clamp(40px, 5.4vw, 60px); line-height: 1.04; font-weight: 800; }
h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.08; }
h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.02em; }
p  { margin: 0; }

.lead { font-size: clamp(17px, 1.9vw, 20px); line-height: 1.55; color: var(--text-sec); }
.muted { color: var(--text-mut); }

.section-head { max-width: 720px; }
.section-head--center { margin: 0 auto; text-align: center; }
.section-head h2 { margin-bottom: 16px; }
.section-head .lead { font-size: 19px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em;
  padding: 0 20px; height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform .14s ease, box-shadow .2s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 17px; height: 17px; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: 0 18px 34px -10px rgba(37,99,235,.55); }
.btn-primary:active { background: var(--accent-press); }

.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { border-color: #b9bfcc; background: var(--bg-subtle); }

.btn-quiet { background: transparent; color: var(--text-sec); padding: 0 12px; }
.btn-quiet:hover { color: var(--text); background: var(--bg-sunken); }

.btn-lg { height: 54px; font-size: 16.5px; padding: 0 26px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-on-ink { background: #fff; color: #0b1220; box-shadow: none; }
.btn-on-ink:hover { background: #eef0f4; }
.btn-ghost-ink { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost-ink:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 15.5px; color: var(--accent);
}

/* shimmer sweep on primary CTA */
.btn-shimmer { position: relative; overflow: hidden; }
.btn-shimmer::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 46%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg); pointer-events: none;
  animation: btnShimmer 3.4s ease-in-out infinite;
}
@keyframes btnShimmer { 0% { left: -60%; } 32%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .btn-shimmer::after { display: none; } }
.link-arrow svg { transition: transform .18s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.site-header.scrolled { border-color: var(--border); box-shadow: 0 1px 0 rgba(15,23,42,.04); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }

.brand { display: inline-block; width: 99px; height: 30px; flex: none; background: url("logo-allingo.png") left center / contain no-repeat; font-size: 0; line-height: 0; }
.brand-mark, .brand b { display: none !important; }
/* footer renders the wordmark white for contrast on the dark background */
.site-footer .brand { filter: brightness(0) invert(1); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.main-nav a {
  font-size: 15px; font-weight: 500; color: var(--text-sec);
  padding: 8px 13px; border-radius: 8px; transition: color .15s, background .15s;
}
.main-nav a:hover { color: var(--text); background: var(--bg-sunken); }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* language switch — globe toggle */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: none; border-radius: 999px; background: transparent; color: var(--text-sec); cursor: pointer; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; transition: color .15s, background .15s; }
.lang-switch:hover { color: var(--text); background: var(--bg-sunken); }
.lang-switch svg { width: 16px; height: 16px; flex: none; }
.lang-code { line-height: 1; }
.header-cta .btn-primary, .header-cta .btn-primary:hover { box-shadow: none; }
/* compact header buttons (match mobile size) */
.header-cta .btn { height: 40px; padding: 0 16px; font-size: 14px; }

.nav-toggle { display: none; }

.mobile-nav { display: none; }
.mobile-nav.open {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px var(--gut) 20px; border-top: 1px solid var(--border); background: var(--bg);
}
.mobile-nav a { font-size: 16px; font-weight: 500; color: var(--text-sec); padding: 12px 8px; border-radius: 8px; }
.mobile-nav a:hover { background: var(--bg-sunken); }
.mobile-nav .btn { margin-top: 8px; }

/* ---------- footer ---------- */
.site-footer { background: #0b1220; color: #aeb6c6; padding: 76px 0 36px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand p { color: #8b93a6; max-width: 300px; font-size: 15px; }
.footer-social { display: flex; gap: 10px; margin-top: 22px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.06); color: #c2c9d6; transition: background .15s, color .15s;
}
.footer-social a:hover { background: var(--accent); color: #fff; }
.footer-social svg { width: 17px; height: 17px; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col a { display: block; color: #8b93a6; font-size: 14.5px; padding: 6px 0; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding-top: 28px; font-size: 13px; color: #7d8598; }
.footer-legal { max-width: 560px; line-height: 1.6; }
.footer-legal strong { color: #aeb6c6; font-weight: 600; }
.footer-badges { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.compliance-badge {
  display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 500;
  color: #c2c9d6; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  padding: 8px 13px; border-radius: 10px;
}
.compliance-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); flex: none; }
.compliance-badge .moit { width: 16px; height: 16px; border-radius: 4px; background: #c2261c; flex: none; display:grid; place-items:center; }
.compliance-badge .moit::after { content:"★"; color:#ffd34d; font-size:10px; line-height:1; }
/* official Bộ Công Thương "Đã thông báo" badge image */
.moit-badge { display: inline-block; line-height: 0; flex: none; transition: opacity .15s; }
.moit-badge:hover { opacity: .82; }
.moit-badge img { height: 38px; width: auto; display: block; border-radius: 6px; }

/* ---------- scroll reveal (transform-only = capture-safe; content never hidden by opacity) ---------- */
.reveal { transform: translateY(26px); transition: transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { transform: none; }
.reveal[data-d="1"] { transition-delay: .07s; }
.reveal[data-d="2"] { transition-delay: .14s; }
.reveal[data-d="3"] { transition-delay: .21s; }
.reveal[data-d="4"] { transition-delay: .28s; }
.reveal[data-d="5"] { transition-delay: .35s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none !important; transition: none !important; }
}

/* ---------- shared bits ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .02em;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-sec);
  padding: 6px 12px; border-radius: var(--radius-pill);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); }
.pill.pill-accent { background: var(--accent-soft); border-color: var(--accent-soft-2); color: var(--accent-ink); }

.tag {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 6px; text-transform: uppercase;
}

.tabnum { font-variant-numeric: tabular-nums; }

.divider-note { text-align:center; font-family: var(--mono); font-size: 12px; letter-spacing:.1em; text-transform:uppercase; color: var(--text-faint); }

/* placeholder imagery */
.ph {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background:
    repeating-linear-gradient(135deg, var(--bg-sunken) 0 10px, var(--bg-subtle) 10px 20px);
  border: 1px solid var(--border);
  display: grid; place-items: center;
}
.ph span { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mut); background: var(--surface); padding: 5px 10px; border-radius: 6px; border:1px solid var(--border); }
