/* ===== FINTEXA design tokens ===== */
:root {
  --navy: #0b1b3f;
  --navy-2: #102a5c;
  --sky: #0ea5e9;            /* màu thương hiệu theo logo: xanh dương → xanh ngọc + vàng */
  --emerald: #0284c7;        /* màu nhấn (accent) */
  --lime: #00e5ff;
  --gold: #f59e0b;
  --deep: #0369a1;
  --cyan: #22d3ee;
  --grad: linear-gradient(120deg, var(--deep), var(--sky) 50%, var(--lime));
  --grad-gold: linear-gradient(120deg, #d97706, #fde047);

  --bg: #f6f8fc;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef3fb;
  --text: #0b1b3f;
  --muted: #55627d;
  --border: #dde4f0;
  --shadow: 0 10px 30px -12px rgba(11, 27, 63, .18);
  --radius: 20px;
  --maxw: 1200px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060d1f; --bg-2: #0a1530; --surface: #0e1b3b; --surface-2: #13234a;
    --text: #eaf1ff; --muted: #9aa9c7; --border: #1e3160; --emerald: #38bdf8;
    --shadow: 0 10px 40px -12px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060d1f; --bg-2: #0a1530; --surface: #0e1b3b; --surface-2: #13234a;
  --text: #eaf1ff; --muted: #9aa9c7; --border: #1e3160; --emerald: #38bdf8;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, .6); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: min(var(--maxw), 100% - 32px); margin-inline: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--emerald); }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--grad); border-radius: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 640px; }
section { padding: 96px 0; position: relative; }
.section-head { text-align: center; margin: 0 auto 56px; max-width: 760px; }
.section-head .lead { margin-inline: auto; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 700;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; text-shadow: 0 1px 2px rgba(4, 18, 43, .35); box-shadow: 0 10px 30px -8px rgba(2, 132, 199, .55); }
.btn-ghost { background: transparent; border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--emerald); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }

/* ===== Header ===== */
.header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s; }
.header.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.brand img { height: 44px; width: auto; }
.brand { color: var(--text); display: flex; }
.nav-links { display: flex; gap: 28px; font-weight: 600; font-size: .95rem; }
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.menu-btn { display: none; }

/* ===== Hero ===== */
.hero { padding: 150px 0 90px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background:
    radial-gradient(40% 50% at 15% 20%, rgba(3, 105, 161, .20), transparent 70%),
    radial-gradient(35% 45% at 40% 10%, rgba(34, 211, 238, .18), transparent 70%),
    radial-gradient(35% 45% at 85% 25%, rgba(2, 132, 199, .22), transparent 70%),
    radial-gradient(30% 40% at 60% 80%, rgba(245, 158, 11, .14), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(0, -4%, 0) scale(1.05); } }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.3rem); font-weight: 800; }
.hero .lead { font-size: 1.18rem; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.trust { display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap; }
.trust strong { display: block; font-size: 1.9rem; font-weight: 800; }
.trust span { color: var(--muted); font-size: .9rem; }

.hero-visual { position: relative; }
.dash {
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border);
  border-radius: 28px; padding: 24px; box-shadow: var(--shadow); backdrop-filter: blur(10px);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }
.dash-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.dash-top small { color: var(--muted); }
.pill { font-size: .75rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(2, 132, 199, .14); color: var(--emerald); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin: 10px 0 20px; }
.bars i { flex: 1; border-radius: 8px 8px 4px 4px; background: var(--grad); opacity: .85; transform-origin: bottom; animation: grow 1.4s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { transform: scaleY(0); } }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { background: var(--surface-2); border-radius: 14px; padding: 12px; }
.kpi b { display: block; font-size: 1.15rem; }
.kpi small { color: var(--muted); font-size: .75rem; }
.float-card {
  position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 12px 16px; box-shadow: var(--shadow); font-size: .85rem; display: flex; gap: 10px; align-items: center;
}
.float-card.a { left: -36px; bottom: 40px; animation: float 5s ease-in-out infinite reverse; }
.float-card.b { right: -20px; top: -24px; animation: float 7s ease-in-out infinite; }
.dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; }

/* ===== Logo marquee ===== */
.marquee { padding: 26px 0; border-block: 1px solid var(--border); overflow: hidden; background: var(--bg-2); }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scroll 30s linear infinite; color: var(--muted); font-weight: 700; letter-spacing: .06em; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ===== Services ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px;
  transition: transform .3s, border-color .3s, box-shadow .3s; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--emerald) 60%, var(--border)); box-shadow: var(--shadow); }
.card::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; border-radius: 50%; background: var(--grad); opacity: 0; filter: blur(60px); transition: opacity .4s; }
.card:hover::after { opacity: .25; }
.card .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); margin-bottom: 18px; font-size: 1.6rem; }
.card h3 { font-size: 1.25rem; }
.card p { color: var(--muted); margin: 0 0 14px; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .93rem; }
.card .more { display: inline-block; margin-top: 16px; font-weight: 700; color: var(--emerald); }

/* ===== AI section ===== */
.ai-wrap { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #eaf1ff; border-radius: 36px; padding: 56px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; overflow: hidden; position: relative; }
.ai-wrap::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; background: radial-gradient(circle, rgba(2, 132, 199, .35), transparent 65%); }
.ai-wrap .lead { color: #b6c4e3; }
.ai-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.ai-points li { display: flex; gap: 12px; align-items: flex-start; }
.ai-points li::before { content: "✦"; color: var(--lime); }
.ai-form { position: relative; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 24px; padding: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; font-size: .85rem; }
.field.full { grid-column: 1 / -1; }
.field label { opacity: .85; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s;
}
.ai-form .field input, .ai-form .field select, .ai-form .field textarea { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.ai-form .field select option { color: #0b1b3f; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--emerald); box-shadow: 0 0 0 4px rgba(2, 132, 199, .18); }
.ai-result { margin-top: 20px; display: none; background: var(--surface); color: var(--text); border-radius: 18px; padding: 24px; }
.ai-result.show { display: block; animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.score-row { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.gauge { --v: 0; width: 110px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--emerald) calc(var(--v) * 1%), var(--surface-2) 0); }
.gauge span { width: 84px; aspect-ratio: 1; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; }
.pillars { flex: 1; min-width: 220px; display: grid; gap: 6px; font-size: .85rem; }
.pillar { display: grid; grid-template-columns: 150px 1fr 40px; gap: 8px; align-items: center; }
.pillar .track { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.pillar .track i { display: block; height: 100%; background: var(--grad); border-radius: 8px; }
.md h2 { font-size: 1.1rem; margin: 18px 0 6px; }
.md p, .md li { color: var(--muted); }
.md blockquote { margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--surface-2); border-radius: 8px; font-size: .9rem; color: var(--muted); }
.badge-src { font-size: .72rem; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 700; }

/* ===== Tools ===== */
.tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.tab { padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.tool { display: none; grid-template-columns: 1fr 1fr; gap: 24px; }
.tool.active { display: grid; animation: rise .4s ease both; }
.tool .card:hover { transform: none; }
.result-list { display: grid; gap: 10px; margin: 0; }
.result-list div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.result-list dt { color: var(--muted); }
.result-list dd { margin: 0; font-weight: 700; text-align: right; }
.big-num { font-size: 2.2rem; font-weight: 800; margin: 6px 0 18px; }
.note { font-size: .8rem; color: var(--muted); margin-top: 14px; }

/* ===== Showcase ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 30px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: .9rem; font-weight: 600; }
.chip.active { border-color: var(--emerald); color: var(--emerald); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.g-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .3s, box-shadow .3s; text-align: left; padding: 0; }
.g-item:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.g-thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--navy), var(--navy-2)); position: relative; display: grid; place-items: center; color: #fff; font-size: 2.4rem; overflow: hidden; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.g-item:hover .g-thumb img { transform: scale(1.06); }
.g-type { position: absolute; top: 12px; left: 12px; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(6, 13, 31, .7); color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.g-star { position: absolute; top: 12px; right: 12px; background: var(--gold); color: #3b2f00; font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.g-play { position: absolute; width: 62px; height: 62px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--navy); display: grid; place-items: center; font-size: 1.3rem; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
.g-body { padding: 18px 20px 22px; }
.g-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.g-body p { color: var(--muted); font-size: .9rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-cat { font-size: .75rem; color: var(--emerald); font-weight: 700; margin-bottom: 6px; display: block; }
.empty { text-align: center; color: var(--muted); padding: 40px; border: 1px dashed var(--border); border-radius: var(--radius); grid-column: 1 / -1; }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(3, 8, 20, .78); backdrop-filter: blur(6px); display: none; place-items: center; padding: 16px; }
.modal.open { display: grid; animation: rise .3s ease both; }
.modal-box { background: var(--surface); border-radius: 24px; width: min(960px, 100%); max-height: 92vh; overflow: auto; position: relative; }
.modal-media { background: #000; }
.modal-media video, .modal-media img { width: 100%; max-height: 70vh; object-fit: contain; }
.modal-media iframe { width: 100%; aspect-ratio: 16/9; border: 0; }
.modal-media iframe.doc { aspect-ratio: auto; height: 70vh; background: #fff; }
.modal-body { padding: 22px 26px 28px; }
.modal-body p { color: var(--muted); white-space: pre-line; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(255, 255, 255, .9); color: #000; border: 0; }

/* ===== Process / Pricing / FAQ ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.step { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step::before { counter-increment: s; content: "0" counter(s); font-size: 2.4rem; font-weight: 800; display: block; margin-bottom: 8px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step p { color: var(--muted); margin: 0; font-size: .93rem; }
.price { display: flex; flex-direction: column; }
.price.hot { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #eaf1ff; border-color: transparent; transform: scale(1.03); }
.price.hot p, .price.hot li { color: #b6c4e3; }
.price .amount { font-size: 2.1rem; font-weight: 800; margin: 8px 0 4px; }
.price ul { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 10px; flex: 1; }
.price li::before { content: "✓ "; color: var(--emerald); font-weight: 800; }
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--emerald); }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: 12px 0 0; }

/* ===== Contact / Footer ===== */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.contact-info p { color: var(--muted); }
.contact-info .row { display: flex; gap: 14px; align-items: center; margin: 14px 0; }
.form-msg { margin-top: 10px; font-weight: 600; }
.hp { position: absolute; left: -9999px; }
.footer { border-top: 1px solid var(--border); padding: 56px 0 30px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { margin: 0 0 12px; }
.footer a, .footer p { color: var(--muted); display: block; margin: 6px 0; font-size: .93rem; }
.footer .copy { margin-top: 40px; text-align: center; font-size: .85rem; color: var(--muted); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-grid, .ai-wrap, .contact, .tool.active { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ai-wrap { padding: 32px 22px; border-radius: 26px; }
  .float-card.a { left: 0; }
  .float-card.b { right: 0; }
  .price.hot { transform: none; }
}
@media (max-width: 760px) {
  section { padding: 70px 0; }
  .nav-links { position: fixed; inset: 76px 0 auto; flex-direction: column; gap: 0; background: var(--bg); padding: 8px 16px 20px; border-bottom: 1px solid var(--border); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .menu-btn { display: grid; }
  .nav-actions .btn { display: none; }
  .grid-3, .steps, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .pillar { grid-template-columns: 110px 1fr 34px; }
  .hero { padding-top: 120px; }
}
