:root {
  --bg: #0B1020;
  --bg-2: #111831;
  --surface: rgba(255, 255, 255, .04);
  --line: rgba(255, 255, 255, .09);
  --text: #E8ECF8;
  --muted: #98A2C0;
  --coral: #FF7A9C;
  --violet: #8B7CFF;
  --teal: #35E0C8;
  --grad: linear-gradient(100deg, var(--coral), var(--violet) 50%, var(--teal));
  --radius: 20px;
  --max: 1180px;
  --font-d: "Space Grotesk", system-ui, sans-serif;
  --font: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-d); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }
em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
p { margin: 0 0 1em; }

/* nền mạng lưới + đốm sáng theo con trỏ */
#net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .55; }
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px; pointer-events: none; z-index: -1;
  border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(139, 124, 255, .16), transparent 65%);
  transition: opacity .3s;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.5em; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 1rem var(--font); color: #0B1020; background: var(--grad); background-size: 200% 100%;
  box-shadow: 0 10px 30px -10px rgba(139, 124, 255, .7);
  transition: transform .25s, box-shadow .25s, background-position .6s;
}
.btn:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 14px 40px -10px rgba(53, 224, 200, .7); }
.btn span { transition: transform .25s; }
.btn:hover span { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .3); box-shadow: none; }
.btn-sm { padding: .6em 1.1em; font-size: .9rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(var(--max), calc(100% - 32px));
  display: flex; align-items: center; gap: 24px; padding: 10px 12px 10px 20px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(11, 16, 32, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background .3s, top .3s;
}
.nav.scrolled { background: rgba(11, 16, 32, .88); top: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.2rem var(--font-d); letter-spacing: -.01em; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: .93rem; color: var(--muted); }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.nav-links a.active::after, .nav-links a:hover::after { transform: scaleX(1); }
.menu-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); transition: transform .3s, top .3s; }
.menu-toggle span:first-child { top: 15px; }
.menu-toggle span:last-child { top: 23px; }
.nav.open .menu-toggle span:first-child { top: 19px; transform: rotate(45deg); }
.nav.open .menu-toggle span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- layout ---------- */
main > section { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.section { padding: 120px 0 40px; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 .8rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: 18px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(53, 224, 200, .6); } 100% { box-shadow: 0 0 0 12px rgba(53, 224, 200, 0); } }
.sub, .lead { color: var(--muted); font-size: 1.12rem; max-width: 620px; }

/* ---------- hero ---------- */
.hero { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; padding: 120px 0 40px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 28px; }
.hero-pills { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.hero-pills li { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; color: var(--muted); }
.hero-pills i { width: 8px; height: 8px; border-radius: 50%; }
.c-ops { background: var(--coral); } .c-ai { background: var(--violet); } .c-auto { background: var(--teal); }
.hero-visual { position: relative; aspect-ratio: 1; }
.hero-visual img { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 71%); mask-image: radial-gradient(circle, #000 55%, transparent 71%);
  animation: floaty 9s ease-in-out infinite; }
.orb { position: absolute; inset: 8%; border-radius: 50%; background: conic-gradient(from 0deg, var(--coral), var(--violet), var(--teal), var(--coral)); filter: blur(70px); opacity: .35; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.float-card {
  position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px;
  background: rgba(17, 24, 49, .72); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: .8rem; color: var(--muted); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8);
  animation: floaty 7s ease-in-out infinite;
}
.float-card b { color: var(--text); font-size: .88rem; }
.fc-1 { top: 10%; left: -4%; border-left: 3px solid var(--coral); }
.fc-2 { top: 44%; right: -6%; border-left: 3px solid var(--violet); animation-delay: -2s; }
.fc-3 { bottom: 8%; left: 6%; border-left: 3px solid var(--teal); animation-delay: -4s; min-width: 150px; }
.bar { display: block; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); animation: fill 3s ease-out 1s forwards; }
@keyframes fill { to { width: 99.9%; } }

/* chữ tiêu đề tách từng từ */
.split .w { display: inline-block; vertical-align: top; }
.split .w > span { display: inline-block; opacity: 0; transform: translateY(.45em); filter: blur(8px); animation: rise .9s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }
/* Chrome không vẽ background-clip:text trên chữ đang animate transform → tô từng từ theo dải màu gradient */
.split em { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--violet); }
.split em .w:nth-child(1) > span { color: var(--coral); }
.split em .w:nth-child(2) > span { color: #C57BD0; }
.split em .w:nth-child(3) > span { color: #6FA8E8; }
.split em .w:nth-child(4) > span { color: var(--teal); }

/* ---------- marquee ---------- */
.stack { padding: 40px 0 0; text-align: center; }
.stack > p { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { font: 600 1.15rem var(--font-d); color: rgba(232, 236, 248, .45); white-space: nowrap; transition: color .2s; }
.marquee-track span:hover { color: var(--text); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; padding: 18px 22px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transform-style: preserve-3d; transition: transform .2s ease-out, border-color .3s; will-change: transform;
}
.card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, var(--accent), transparent 50%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; }
.card:hover::before { opacity: 1; }
.card-img { aspect-ratio: 3/2; border-radius: 14px; overflow: hidden; margin-bottom: 18px; background: var(--bg-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card-img img { transform: scale(1.06); }
.tag { font: 600 .75rem var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.card h3 { margin-top: 8px; }
.card p { color: var(--muted); font-size: .98rem; }
.card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.card li::before { content: "→"; color: var(--accent); margin-right: 8px; }

/* ---------- flow ---------- */
.flow { position: relative; padding: 10px 0 30px; }
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow-line { fill: none; stroke: url(#fl); stroke-width: 2; stroke-dasharray: 6 8; animation: dash 1.2s linear infinite; opacity: .7; }
.flow-loop { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 1.5; stroke-dasharray: 3 7; animation: dash 2s linear infinite reverse; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.pulses circle { filter: drop-shadow(0 0 6px currentColor); }
.flow-nodes { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.node {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px; cursor: pointer;
  border-radius: var(--radius); border: 1px solid var(--line); background: rgba(17, 24, 49, .85); color: var(--text); font: inherit;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.node:hover { transform: translateY(-4px); }
.node.is-active { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 20px 50px -20px var(--c); }
.node-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; font-size: 1.5rem; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent); margin-bottom: 8px; transition: transform .4s; }
.node.is-active .node-ic { transform: scale(1.1) rotate(-6deg); }
.node b { font: 600 1.1rem var(--font-d); }
.node small { color: var(--muted); font-size: .82rem; }
.loop-label { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.flow-detail { position: relative; margin-top: 56px; min-height: 210px; padding: 32px 36px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.flow-panel { position: absolute; inset: 32px 36px; opacity: 0; transform: translateY(12px); transition: opacity .45s, transform .45s; pointer-events: none; }
.flow-panel.is-active { position: relative; inset: auto; opacity: 1; transform: none; pointer-events: auto; }
.flow-panel p { color: var(--muted); max-width: 820px; }
.flow-panel .example { color: var(--text); font-size: .95rem; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .04); border-left: 3px solid var(--violet); margin: 0; }
.flow-progress { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--grad); border-radius: 3px; width: 0; }

/* ---------- process steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; position: relative; counter-reset: s; }
.steps::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--line); transform: translateX(-50%); }
.steps::after { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: var(--progress, 0%); background: var(--grad); transform: translateX(-50%); }
.step { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.step:nth-child(even) .step-img { order: 2; }
.step-img { aspect-ratio: 3/2; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.step-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.step.in .step-img img { transform: scale(1); }
.step-no { font: 700 3.4rem var(--font-d); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; display: block; margin-bottom: 10px; }
.step-body p { color: var(--muted); }
.step-meta { display: inline-block; font-size: .82rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--teal); }

/* ---------- why ---------- */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.why-story p:not(.eyebrow) { color: var(--muted); }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.why-item { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.why-item .num { font: 700 2.4rem var(--font-d); display: block; margin-bottom: 6px; }
.why-item p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- faq ---------- */
.faq-list { display: grid; gap: 12px; max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 0 22px; transition: border-color .3s; }
.faq details[open] { border-color: rgba(139, 124, 255, .5); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font: 600 1.05rem var(--font-d); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 1.4rem; line-height: 1; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; margin: 0; animation: fadeDown .35s ease; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- cta ---------- */
.cta { padding-bottom: 100px; }
.cta-box {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 56px;
  border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(600px 300px at 0% 0%, rgba(255, 122, 156, .18), transparent 60%), radial-gradient(600px 300px at 100% 100%, rgba(53, 224, 200, .16), transparent 60%), var(--bg-2);
}
.cta-box p { color: var(--muted); }
.cta-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cta-form label { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.cta-form .full { grid-column: 1 / -1; }
.cta-form input, .cta-form textarea {
  font: inherit; font-size: .95rem; color: var(--text); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical;
  transition: border-color .2s, background .2s;
}
.cta-form input:focus, .cta-form textarea:focus { outline: none; border-color: var(--violet); background: rgba(255, 255, 255, .08); }

/* ---------- footer ---------- */
.footer { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 32px 0 48px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; color: var(--muted); font-size: .9rem; }
.footer p { margin: 0; }
.footer .copy { margin-left: auto; }
.footer a:hover { color: var(--text); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 130px; }
  .hero-visual { max-width: 520px; width: 100%; margin: 0 auto; }
  .cards { grid-template-columns: 1fr; max-width: 560px; }
  .why, .cta-box { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 20px; }
  .step:nth-child(even) .step-img { order: 0; }
  .steps::before, .steps::after { display: none; }
}
@media (max-width: 820px) {
  .nav { gap: 12px; }
  .nav-links { position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px; border-radius: 20px; background: rgba(11, 16, 32, .96); border: 1px solid var(--line); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
  .nav-links a { padding: 12px 14px; }
  .nav-links a::after { display: none; }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; transform: none; }
  .nav .btn-sm { margin-left: auto; }
  .menu-toggle { display: block; }
  .flow-nodes { grid-template-columns: 1fr 1fr; }
  .flow-svg, .loop-label { display: none; }
  .flow-detail { padding: 24px; }
  .flow-panel { inset: 24px; }
  .section { padding-top: 88px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cta-box { padding: 28px 20px; }
  .cta-form { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .why-item { padding: 18px; }
  .why-item .num { font-size: 1.7rem; }
  .fc-1 { left: 0; } .fc-2 { right: 0; }
  .float-card { font-size: .72rem; padding: 8px 12px; }
  .footer .copy { margin-left: 0; }
  .nav .btn-sm { display: none; }
  .menu-toggle { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .split .w > span { opacity: 1; transform: none; filter: none; }
}
