/* ==========================================================================
   marketify.io.vn — design tokens
   Nguồn chân lý: docs/BRAND-SYSTEM.md §3–§11. Không thêm token mới ngoài đây.
   ========================================================================== */
:root {
  /* Neutral / dark */
  --ink-950: #070B18;
  --ink-900: #0B1122;
  --ink-800: #111A30;
  --ink-700: #182444;
  --line: rgba(148, 168, 214, .14);
  --line-strong: rgba(148, 168, 214, .26);
  --text-hi: #F2F6FF;
  --text: #C3CDE4;
  --text-dim: #8494B4;
  --white: #FFFFFF;

  /* Brand */
  --brand: #2E6BFF;
  --brand-hi: #5B8DFF;
  --brand-deep: #1B3FCC;
  --brand-soft: rgba(46, 107, 255, .14);
  --cyan: #22D3EE;
  --mint: #38E8A8;
  --amber: #FFB84D;
  --red: #FF6B6B;
  --grad-brand: linear-gradient(135deg, #5B8DFF 0%, #2E6BFF 45%, #22D3EE 100%);
  --grad-text: linear-gradient(100deg, #FFFFFF 0%, #B9CCFF 45%, #7FE8FF 100%);

  /* Light sections */
  --light-bg: #F6F8FD;
  --light-card: #FFFFFF;
  --light-line: #E3E9F4;
  --light-text: #1A2438;
  --light-dim: #5A6884;
  --light-soft: #EAF0FF;

  /* Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Misc */
  --wrap: 1200px;
  --gutter: 24px;
  --section-y: 112px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-card: 0 24px 60px -20px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .05);
  --shadow-btn: 0 10px 30px -8px rgba(46, 107, 255, .65);
  --shadow-light: 0 18px 40px -24px rgba(23, 43, 99, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
}

@media (max-width: 1023px) {
  :root { --section-y: 88px; --gutter: 22px; }
}

@media (max-width: 640px) {
  :root { --section-y: 64px; --gutter: 20px; --header-h: 64px; }
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--ink-900);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-locked { overflow: hidden; }

img,
svg { display: block; max-width: 100%; }

a { color: var(--brand-hi); text-decoration: none; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }

ul[role="list"] { list-style: none; padding: 0; }

::selection { background: rgba(46, 107, 255, .38); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  transition: top .16s var(--ease);
}

.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--dark { background: var(--ink-900); color: var(--text); }
.section--darker { background: var(--ink-950); color: var(--text); }
.section--light { background: var(--light-bg); color: var(--light-text); }
.section--light h1,
.section--light h2,
.section--light h3 { color: var(--light-text); }
.section--light p { color: var(--light-dim); }

.section-head {
  max-width: 760px;
  margin-bottom: 56px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .lede { margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-hi);
  margin-bottom: 18px;
}

.eyebrow .i { width: 15px; height: 15px; }

.section--light .eyebrow { color: var(--brand); }

h2.h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -.025em;
  font-weight: 750;
  color: var(--text-hi);
  text-wrap: balance;
}

.lede {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 62ch;
}

.section--light .lede { color: var(--light-dim); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1023px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { margin-bottom: 40px; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .lede { font-size: 17px; }
}

/* ---------- Icons ---------- */
.i {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand-hi);
  border: 1px solid rgba(91, 141, 255, .22);
}

.icon-box .i { width: 22px; height: 22px; }

.icon-box--sm { width: 34px; height: 34px; border-radius: var(--r-xs); }
.icon-box--sm .i { width: 18px; height: 18px; }

.section--light .icon-box {
  background: var(--light-soft);
  color: var(--brand);
  border-color: #D5E1FF;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.005em;
  cursor: pointer;
  text-align: center;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}

.btn .i { width: 18px; height: 18px; transition: transform .16s var(--ease); }

.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(46, 107, 255, .8); }
.btn--primary:hover .i { transform: translateX(2px); }

.btn--ghost {
  background: rgba(255, 255, 255, .04);
  border-color: var(--line-strong);
  color: var(--text-hi);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(148, 168, 214, .42); transform: translateY(-2px); }

.btn--light {
  background: #fff;
  color: #14213D;
  box-shadow: var(--shadow-light);
}

.btn--light:hover { transform: translateY(-2px); }

.btn--sm { min-height: 40px; padding: 9px 18px; font-size: 14px; }
.btn--block { width: 100%; }

.btn[disabled] { opacity: .55; cursor: progress; transform: none !important; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 36, 68, .62) 0%, rgba(12, 19, 36, .75) 100%);
  box-shadow: var(--shadow-card);
  padding: 28px;
  transition: transform .24s var(--ease), border-color .24s var(--ease), background .24s var(--ease);
}

.card:hover { transform: translateY(-2px); border-color: var(--line-strong); }

.card h3 {
  font-size: 19px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--text-hi);
  margin-bottom: 10px;
}

.card p { font-size: 15px; color: var(--text-dim); }

.card--light {
  background: var(--light-card);
  border-color: var(--light-line);
  box-shadow: var(--shadow-light);
}

.card--light h3 { color: var(--light-text); }
.card--light p { color: var(--light-dim); }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
  white-space: nowrap;
}

.chip .i { width: 15px; height: 15px; }

.chip--live { border-color: rgba(56, 232, 168, .3); background: rgba(56, 232, 168, .08); color: #9FF3D0; }
.chip--live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(56, 232, 168, .18); }

.chip--brand { border-color: rgba(91, 141, 255, .32); background: var(--brand-soft); color: #BFD2FF; }

/* ---------- Check list ---------- */
.checklist { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 15px;
  color: var(--text);
}

.section--light .checklist li { color: var(--light-text); }

.checklist .i { width: 19px; height: 19px; margin-top: 3px; color: var(--mint); }
.section--light .checklist .i { color: var(--brand); }

.checklist--no .i { color: var(--red); }
.section--light .checklist--no .i { color: #D64545; }

/* ---------- Utility ---------- */
.text-hi { color: var(--text-hi); }
.text-dim { color: var(--text-dim); }
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mono-num { font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.section > .wrap { position: relative; z-index: 1; }

/* ---------- Scroll reveal (JS adds .is-in) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-in { opacity: 1; transform: none; }

/* no-js fallback */
.no-js [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
