/* ===================== TOKENS (theo logo Nexor Tech #0025CC) ===================== */
:root {
  --brand: #0025cc;          /* xanh logo */
  --brand-600: #001ea6;      /* hover */
  --brand-50: #eef2ff;       /* nền xanh rất nhạt */
  --brand-100: #dfe6ff;
  --sky: #3b82f6;            /* xanh da trời phụ */
  --sky-300: #7cb4ff;
  --navy: #071447;           /* footer / chữ đậm */

  --bg: #ffffff;
  --bg-2: #f5f8ff;
  --panel: #ffffff;
  --line: #e3e9f7;
  --line-2: #cdd7f0;
  --text: #0b1530;
  --muted: #5a6685;
  --amber: #f59e0b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(7, 20, 71, .04), 0 10px 30px -12px rgba(7, 20, 71, .12);
  --shadow-lg: 0 30px 70px -25px rgba(0, 37, 204, .28);
  --font: "Be Vietnam Pro", Inter, system-ui, Arial, sans-serif;
  --display: "Inter Tight", "Be Vietnam Pro", Arial, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand); color: #fff; }
[hidden] { display: none !important; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 12px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 28px -10px rgba(0, 37, 204, .65); }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--brand); }
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-50); }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.btn-block { width: 100%; }

/* ===================== BRAND ===================== */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { height: 34px; width: auto; }
.wordmark { display: inline-flex; align-items: stretch; border: 2px solid var(--brand); font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: .08em; line-height: 1; }
.wordmark b { background: var(--brand); color: #fff; padding: 5px 7px; font-weight: 800; }
.wordmark i { font-style: normal; color: var(--brand); padding: 5px 8px; }

/* ===================== HEADER ===================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgba(255, 255, 255, .94); border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(7, 20, 71, .35); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover, .nav a.active { color: var(--brand); background: var(--brand-50); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { width: 18px; height: 2px; background: var(--brand); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== HERO ===================== */
.hero { position: relative; padding: calc(var(--header-h) + 64px) 0 0; overflow: hidden; background: linear-gradient(180deg, var(--brand-50), #fff 85%); }
.hero-grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(55% 50% at 78% 28%, rgba(59, 130, 246, .22), transparent 70%),
    radial-gradient(40% 40% at 8% 85%, rgba(0, 37, 204, .10), transparent 70%),
    linear-gradient(rgba(0, 37, 204, .06) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(0, 37, 204, .06) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.hero > .container, .hero > .marquee { position: relative; z-index: 1; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--brand-100); border-radius: 999px; font-size: 13px; font-weight: 600; background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 4px rgba(59, 130, 246, .25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); } }
.hero h1 { font-size: clamp(48px, 8vw, 104px); font-weight: 900; margin: 22px 0 22px; line-height: .98; color: var(--navy); }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand), var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-lg); }
.hc-tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--sky); }
.hc-head h3 { font-size: 26px; margin: 6px 0 8px; color: var(--navy); }
.hc-head p { color: var(--muted); font-size: 14px; min-height: 44px; }
.hc-head, .hc-meta { transition: opacity .35s; }
.hero-card.swap .hc-head, .hero-card.swap .hc-meta { opacity: 0; }
.hc-orbit { position: relative; height: 150px; margin: 10px 0; display: grid; place-items: center; }
.ring { position: absolute; border: 1px solid rgba(0, 37, 204, .22); border-radius: 50%; }
.r1 { width: 92%; height: 110px; }
.r2 { width: 60%; height: 70px; border-color: rgba(59, 130, 246, .35); }
.core { width: 64px; height: 64px; border-radius: 16px; background: var(--brand); display: grid; place-items: center; font-size: 28px; color: #fff; box-shadow: 0 12px 30px -10px rgba(0, 37, 204, .6); }
.sat { position: absolute; width: 14px; height: 14px; border-radius: 50%; }
.s1 { background: var(--brand); offset-path: ellipse(46% 55px at 50% 50%); animation: orbit 9s linear infinite; }
.s2 { background: var(--sky-300); offset-path: ellipse(30% 35px at 50% 50%); animation: orbit 6s linear infinite reverse; }
@supports not (offset-path: ellipse(1px 1px at 50% 50%)) { .sat { display: none; } }
@keyframes orbit { to { offset-distance: 100%; } }
.hc-meta { display: grid; gap: 8px; margin: 0; }
.hc-meta div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); font-size: 13px; }
.hc-meta dt { color: var(--muted); text-transform: uppercase; font-weight: 700; font-size: 11px; letter-spacing: .06em; padding-top: 2px; }
.hc-meta dd { margin: 0; font-weight: 600; color: var(--navy); }
.hc-progress { height: 3px; background: var(--line); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.hc-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--sky)); }
.hc-progress span.run { animation: fill 5s linear forwards; }
@keyframes fill { to { width: 100%; } }

.marquee { margin-top: 64px; border-block: 1px solid var(--line); overflow: hidden; padding: 14px 0; background: rgba(255, 255, 255, .7); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: scroll 50s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.m-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; white-space: nowrap; }
.m-item small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--sky); }
.m-item b { font-size: 14px; color: var(--navy); }

/* thumbnail placeholder (dùng khi chưa có ảnh) — các sắc xanh */
.thumb { width: 44px; height: 44px; border-radius: 9px; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: #fff; }
.cat-embedded { background: linear-gradient(135deg, #0025cc, #2a4dff); }
.cat-ai { background: linear-gradient(135deg, #1e3a8a, #3b5bdb); }
.cat-mobile { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.cat-design { background: linear-gradient(135deg, #0284c7, #38bdf8); }

/* ===================== STATS ===================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 56px 0 24px; }
.stat { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border-top: 3px solid var(--brand); }
.stat strong { display: block; font-family: var(--display); font-size: clamp(32px, 4vw, 46px); font-weight: 900; color: var(--brand); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* ===================== SECTIONS ===================== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.section-head h2, .contact-info h2 { font-size: clamp(32px, 4.5vw, 52px); font-weight: 800; margin-bottom: 16px; color: var(--navy); }
.section-head p, .contact-info p { color: var(--muted); font-size: 17px; }

/* services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc { position: relative; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); transition: border-color .25s, transform .25s, box-shadow .25s; overflow: hidden; }
.svc::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; background: radial-gradient(circle, rgba(59, 130, 246, .14), transparent 70%); opacity: 0; transition: opacity .3s; }
.svc:hover { border-color: var(--brand-100); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.svc:hover::after { opacity: 1; }
.svc-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--brand-50); color: var(--brand); margin-bottom: 18px; }
.svc h3 { font-size: 21px; margin-bottom: 8px; color: var(--navy); }
.svc p { color: var(--muted); font-size: 15px; }
.svc .tag { display: inline-block; margin-top: 16px; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-50); border-radius: 6px; padding: 3px 8px; }

.stack { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; padding: 24px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--bg-2); }
.stack h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 12px; }
.stack ul { display: flex; flex-wrap: wrap; gap: 6px; }
.stack li { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }

/* work */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--muted); font: 600 14px var(--font); cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--brand); border-color: var(--brand); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wcard { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); color: inherit; font: inherit; cursor: pointer; overflow: hidden; transition: border-color .25s, transform .25s, box-shadow .25s; animation: fadeUp .45s both; }
.wcard:hover { border-color: var(--brand-100); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.wcard-cover { height: 150px; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 40px; color: rgba(255, 255, 255, .92); position: relative; }
.wcard-cover img { width: 100%; height: 100%; object-fit: cover; }
.wcard-body { padding: 18px 20px 22px; }
.wcard-body small { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--sky); }
.wcard-body h3 { font-size: 19px; margin: 6px 0 6px; color: var(--navy); }
.wcard-body p { color: var(--muted); font-size: 14px; }
.wcard.featured { grid-column: span 2; flex-direction: row; }
.wcard.featured .wcard-cover { height: auto; min-height: 240px; flex: 1; font-size: 64px; }
.wcard.featured .wcard-body { flex: 1; align-self: center; padding: 28px; }
.wcard.featured h3 { font-size: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span { font-size: 12px; padding: 3px 9px; border-radius: 6px; background: var(--brand-50); color: var(--brand); font-weight: 600; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

/* method */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { position: relative; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.step .num { font-family: var(--display); font-weight: 900; font-size: 44px; color: transparent; -webkit-text-stroke: 1.5px var(--brand); display: block; margin-bottom: 10px; }
.step h3 { font-size: 20px; margin-bottom: 8px; color: var(--navy); }
.step p { color: var(--muted); font-size: 14px; }
.step:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); color: var(--brand); font-weight: 800; z-index: 1; }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.member { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); text-align: center; }
.avatar { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 26px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--sky)); object-fit: cover; }
.member h3 { font-size: 17px; color: var(--navy); }
.member p { color: var(--muted); font-size: 14px; }
.member span { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--brand); }

/* contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.contact-list { margin: 28px 0; display: grid; gap: 10px; }
.contact-list li { display: grid; grid-template-columns: 90px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list span { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.contact-list a { color: var(--brand); font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }
.brief { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-lg); display: grid; gap: 18px; }
.brief-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--muted); padding-bottom: 14px; border-bottom: 1px dashed var(--line-2); }
.brief-head code { color: #fff; background: var(--brand); padding: 4px 8px; border-radius: 6px; font-size: 13px; letter-spacing: .05em; }
fieldset { border: 0; margin: 0; padding: 0; }
legend, .brief label { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--muted); font: 600 13px var(--font); cursor: pointer; transition: all .2s; }
.seg button:hover { color: var(--brand); border-color: var(--brand); }
.seg button.active { color: var(--brand); border-color: var(--brand); background: var(--brand-50); }
.brief label { display: grid; gap: 6px; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 500 15px var(--font); transition: border-color .2s, box-shadow .2s, background .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(0, 37, 204, .12); }
textarea { resize: vertical; }
.form-msg { font-size: 14px; min-height: 1px; }
.form-msg.err { color: #dc2626; }
.form-msg.ok { color: var(--brand); }

/* footer (navy) */
.site-footer { padding: 56px 0 28px; background: var(--navy); color: #c9d3f2; }
.site-footer .brand-mark { background: #fff; border-radius: 8px; padding: 4px 6px; height: 36px; }
.site-footer .wordmark { border-color: #fff; }
.site-footer .wordmark b { background: #fff; color: var(--navy); }
.site-footer .wordmark i { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-inner h5 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--sky-300); margin-bottom: 14px; }
.footer-inner li { font-size: 14px; padding: 4px 0; }
.footer-inner a:hover { color: #fff; }
.site-footer .muted { color: #8f9cc6; margin-top: 12px; font-size: 14px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }

/* modal */
.modal { width: min(640px, 100% - 32px); max-height: 85vh; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--text); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(7, 20, 71, .55); backdrop-filter: blur(4px); }
.modal-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--navy); font-size: 22px; cursor: pointer; line-height: 1; z-index: 1; }
.modal .wcard-cover { height: 200px; font-size: 64px; }
.modal-content { padding: 26px; display: grid; gap: 14px; }
.modal-content h3 { font-size: 28px; color: var(--navy); }
.modal-content dl { display: grid; gap: 8px; margin: 0; }
.modal-content dl div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; font-size: 14px; }
.modal-content dt { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; padding-top: 2px; }
.modal-content dd { margin: 0; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .services-grid, .work-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .stack { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; padding: 12px 16px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px -20px rgba(7, 20, 71, .3); transform: translateY(-120%); transition: transform .3s; z-index: -1; }
  .nav.open { transform: none; }
  .nav a { padding: 14px 12px; font-size: 17px; }
  .hero-inner, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--header-h) + 40px); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .wordmark { font-size: 11px; }
  .services-grid, .work-grid, .steps, .stack { grid-template-columns: 1fr; }
  .wcard.featured { grid-column: auto; flex-direction: column; }
  .wcard.featured .wcard-cover { min-height: 160px; }
  .row2 { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .hero-cta .btn { flex: 1; }
}
@media (max-width: 360px) { .wordmark { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
