/* ============================================================
   TuAI Vietnam — main.css
   Base / layout / typography / buttons / nav / hero / footer
   Token: xem tokens.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--navy-950); color: var(--white);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: var(--tracking-heading); line-height: var(--lh-heading); }
:focus-visible { outline: 3px solid var(--cyan-400); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); overflow: clip; }
.section--night { background: var(--navy-950); }
.section--dark { background: var(--navy-900); }
.section--white { background: var(--white); color: #0B1020; --color-text-muted: #4B5563; }
.section--white h2, .section--white h3, .section--white h4 { color: #0B1020; }
.section--white .muted, .section--white .lead { color: #4B5563; }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--cyan-400); margin: 0 0 var(--sp-4);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: var(--grad-brand); flex: none; }
.section--white .eyebrow { color: var(--blue-600); }
.h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.1; letter-spacing: var(--tracking-display); }
.h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.15; letter-spacing: var(--tracking-display); }
.h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; }
.lead { font-size: var(--fs-lead); line-height: 1.62; color: var(--color-text-muted); max-width: 64ch; }
.muted { color: var(--color-text-muted); }
.sm { font-size: var(--fs-sm); }
.mono { font-family: var(--font-mono); }
.section-head { max-width: 840px; margin-bottom: clamp(32px, 5vw, 64px); }
.section-head .lead { margin-top: var(--sp-4); }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px; border: 0; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 600; line-height: 1; cursor: pointer;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.btn--primary { background: var(--grad-cta); color: var(--navy-950); font-weight: 700; }
.btn--primary:hover { box-shadow: var(--glow-yellow); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.btn--ghost:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.btn--blue { background: var(--blue-600); color: var(--white); }
.btn--blue:hover { background: var(--blue-700); box-shadow: 0 12px 34px rgba(0,80,248,.35); transform: translateY(-2px); }
.btn--ink { background: var(--navy-950); color: var(--white); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 17px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .ico { width: 18px; height: 18px; flex: none; }

/* ---------- Cards / chips ---------- */
.card {
  position: relative; border-radius: var(--r-lg); padding: clamp(22px, 3vw, 32px);
  background: var(--navy-800); border: var(--bd-hair);
}
.card--glass { background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.card--light { background: var(--white); border: var(--bd-ink); box-shadow: var(--sh-sm); color: #0B1020; }
.card--light h3 { color: #0B1020; }
.card__num { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--cyan-400); letter-spacing: .06em; }
.card p { color: var(--color-text-muted); font-size: 15px; line-height: 1.62; margin-top: 10px; }
.card--light p { color: #4B5563; }
.card__ico { width: 40px; height: 40px; color: var(--cyan-400); margin-bottom: 18px; }
.card--light .card__ico { color: var(--blue-600); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  font-size: 14px; color: rgba(255,255,255,.86);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-400); flex: none; }
.chip--plain::before { display: none; }
.section--white .chip { background: var(--blue-50); border-color: #D8E4FD; color: #16233D; }
.section--white .chip::before { background: var(--blue-600); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Textures ---------- */
.night {
  background:
    radial-gradient(900px 620px at 8% -10%, rgba(0,80,248,.42), transparent 62%),
    radial-gradient(760px 560px at 92% 8%, rgba(0,184,248,.24), transparent 60%),
    var(--navy-950);
}
.night::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 25%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 30%, #000 25%, transparent 78%);
}
.night > .container { position: relative; z-index: 1; }
.grain {
  position: absolute; inset: 0; z-index: 0; opacity: .035; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: 16px; top: -80px; z-index: var(--z-toast);
  background: var(--white); color: var(--navy-950); padding: 12px 18px;
  border-radius: var(--r-sm); font-weight: 600; transition: top var(--dur) var(--ease-out);
}
.skip:focus { top: 12px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: var(--z-nav); height: 72px;
  display: flex; align-items: center;
  transition: height var(--dur) var(--ease-out), background var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out), backdrop-filter var(--dur) var(--ease-out);
}
.nav::after {
  content: ""; position: absolute; inset: auto 0 0; height: 1px;
  background: rgba(255,255,255,.08); opacity: 0; transition: opacity var(--dur);
}
.nav.is-stuck {
  height: 64px; background: rgba(5,11,30,.72);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 10px 30px rgba(5,11,30,.35);
}
.nav.is-stuck::after { opacity: 1; }
.nav__inner { display: flex; align-items: center; gap: 28px; width: 100%; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand__plate {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--white); border-radius: 12px; padding: 6px 10px;
  box-shadow: 0 2px 10px rgba(5,11,30,.22);
}
.brand__plate img { height: 32px; width: auto; border-radius: 4px; }
.nav__links { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav__links a {
  position: relative; padding: 10px 14px; border-radius: var(--r-pill);
  font-size: 15px; color: rgba(255,255,255,.78); transition: color var(--dur), background var(--dur);
}
.nav__links a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav__links a.is-active { color: var(--white); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--grad-brand);
}
.nav__actions { display: flex; align-items: center; gap: 14px; flex: none; }
.lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: rgba(255,255,255,.06); }
.lang a, .lang span { padding: 5px 10px; font-size: 12px; font-weight: 600; letter-spacing: .04em; border-radius: var(--r-pill); color: rgba(255,255,255,.62); }
.lang .is-on { background: rgba(255,255,255,.14); color: var(--white); }
.nav__login { font-size: 15px; color: rgba(255,255,255,.82); padding: 10px 6px; }
.nav__login:hover { color: var(--white); }
.burger {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: var(--bd-soft);
  background: rgba(255,255,255,.06); align-items: center; justify-content: center; cursor: pointer;
}
.burger i { position: relative; width: 18px; height: 1.5px; background: var(--white); display: block; }
.burger i::before, .burger i::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--white); }
.burger i::before { top: -6px; }
.burger i::after { top: 6px; }

.drawer {
  position: fixed; inset: 0; z-index: var(--z-modal); background: var(--navy-950);
  display: flex; flex-direction: column; padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  transform: translateX(100%); visibility: hidden;
  transition: transform 340ms var(--ease-out), visibility 340ms;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.drawer__close { width: 44px; height: 44px; border-radius: 12px; border: var(--bd-soft); background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
.drawer__links { display: flex; flex-direction: column; gap: 2px; }
.drawer__links a { font-size: 20px; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.07); }
.drawer__cta { margin-top: auto; display: grid; gap: 12px; padding-top: 28px; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(104px, 13vh, 156px); padding-bottom: 0; }
.hero__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero__title { font-size: var(--fs-display); font-weight: 800; line-height: var(--lh-display); letter-spacing: var(--tracking-display); margin-bottom: var(--sp-5); }
.hero__title span { display: block; }
.hero__sub { font-size: var(--fs-lead); line-height: 1.6; color: rgba(255,255,255,.72); max-width: 620px; margin-bottom: var(--sp-5); }
.hero .chips { margin-bottom: var(--sp-7); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.matrix {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 18px; border-radius: var(--r-xl);
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -14px, 0) scale(1.012); }
}
.job {
  min-height: 92px; padding: 12px 12px 10px; border-radius: 14px;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.09);
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  font-size: 12.5px; line-height: 1.35; color: rgba(255,255,255,.78);
}
.job__tag { display: flex; align-items: center; gap: 6px; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(0,184,248,.9); }
.job__tag i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan-400); }
.job:nth-child(2) { transform: translateY(-10px); }
.job:nth-child(4) { transform: translateY(-6px); }
.job:nth-child(8) { transform: translateY(6px); }
.job--on {
  background: linear-gradient(150deg, rgba(0,80,248,.42), rgba(0,184,248,.14));
  border-color: rgba(0,184,248,.5); color: var(--white); box-shadow: var(--glow-blue);
  animation: breathe 3.6s ease-in-out infinite;
}
.job--on .job__tag { color: var(--white); }
.job--on .job__tag i { background: var(--tuai-yellow); box-shadow: 0 0 0 4px rgba(248,192,8,.18); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(248,192,8,.02); } }
@keyframes breathe { 50% { box-shadow: 0 0 0 1px rgba(0,184,248,.55), 0 22px 70px rgba(0,80,248,.45); } }

.numbers {
  margin-top: clamp(48px, 7vw, 88px); position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 40px);
  padding-top: 34px;
  background-image: var(--grad-line); background-repeat: no-repeat; background-size: 100% 1px;
}
.stat__num { font-size: clamp(30px, 3.2vw, 48px); font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__label { margin-top: 10px; font-size: 14px; color: rgba(255,255,255,.62); }
.stat--accent .stat__num { color: var(--tuai-yellow); }

/* ---------- Mobile CTA ---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: none; gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(5,11,30,.92); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid rgba(255,255,255,.1);
  transform: translateY(110%); transition: transform 300ms var(--ease-out);
}
.mobile-cta.is-on { transform: none; }
.mobile-cta .btn { flex: 1; min-height: 52px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-950); padding-top: clamp(56px, 7vw, 96px); position: relative; }
.footer::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, rgba(0,80,248,0), rgba(0,184,248,.55), rgba(248,192,8,.35), rgba(0,80,248,0));
}
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.footer__brand img { height: 34px; }
.footer__blurb { margin-top: 18px; font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.6); max-width: 320px; }
.footer__col h4 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 16px; font-weight: 600; }
.footer__col a { display: block; padding: 7px 0; font-size: 15px; color: rgba(255,255,255,.78); }
.footer__col a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--tuai-yellow); }
.footer__meta { border-top: 1px solid rgba(255,255,255,.08); padding-block: 22px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.5); }
.footer__meta-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer__legal { font-size: 12px; color: rgba(255,255,255,.38); padding-bottom: 28px; line-height: 1.7; }

/* ---------- Global responsive ---------- */
@media (max-width: 1180px) {
  .nav__links a { padding: 10px 10px; font-size: 14px; }
}
@media (max-width: 1023px) {
  .hero__grid { grid-template-columns: 1fr; }
  .matrix { max-width: 460px; }
  .nav__links, .nav__login, .nav .lang { display: none; }
  .burger { display: inline-flex; }
  .nav__actions { margin-left: auto; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 767px) {
  .numbers { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .mobile-cta { display: flex; }
  .matrix { grid-template-columns: repeat(2, 1fr); max-width: 100%; padding: 12px; }
  .job:nth-child(n+5) { display: none; }
  .job:nth-child(2), .job:nth-child(4), .job:nth-child(8) { transform: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__meta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 479px) {
  .numbers { grid-template-columns: 1fr; }
  .stat { display: flex; align-items: baseline; gap: 12px; }
  .stat__num { font-size: 34px; }
  .stat__label { margin-top: 0; }
}
