/* ============================================================
   Vayai — Design System
   Premium consumer-lending landing (navy + gold), 2026-grade
   ============================================================ */

:root {
  /* Palette */
  --navy-900: #071527;
  --navy-800: #0B1F3A;
  --navy-700: #123356;
  --navy-600: #1B4573;
  --gold-500: #C6A24C;
  --gold-400: #D9BC72;
  --gold-300: #E8D5A0;
  --gold-700: #84622A; /* text-safe deep bronze for light backgrounds (AA) */
  --ink: #122130;
  --ink-soft: #51606f;
  --paper: #FFFFFF;
  --paper-warm: #F7F5F0;
  --line: #E7E4DD;
  --success: #1F9D6B;
  --error: #C0392B;
  --zalo: #0068FF;

  /* Type scale */
  --fs-xs: 0.8rem;
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.35rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 2.9rem;
  --fs-hero: clamp(2rem, 4vw, 3.2rem);

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  /* Radii / shadows */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(7,21,39,0.06), 0 4px 12px rgba(7,21,39,0.06);
  --shadow-md: 0 6px 20px rgba(7,21,39,0.10);
  --shadow-lg: 0 24px 60px rgba(7,21,39,0.16);
  --shadow-gold: 0 8px 24px rgba(7,21,39,0.18);

  --container: 1180px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
:focus-visible { outline: 3px solid var(--gold-700); outline-offset: 2px; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Grid/flex children must be allow shrink so no-wrap content can't force
   horizontal overflow inside a 1fr track (minmax(auto,1fr) grows to min-content). */
.grid > *, .hero-inner > *, .final-inner > * { min-width: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: var(--fs-base);
  padding: 14px 26px; border-radius: 999px; border: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap; text-align: center; line-height: 1;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900);
  box-shadow: var(--shadow-md);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(7,21,39,0.24); }
.btn-gold:active { transform: translateY(0); }

.btn-outline { background: transparent; color: var(--navy-800); box-shadow: inset 0 0 0 1.5px var(--navy-700); }
.btn-outline:hover { background: var(--navy-800); color: #fff; }

.btn-ghost { background: rgba(255,255,255,0.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
.btn-ghost:hover { background: rgba(255,255,255,0.2); }

.btn-zalo { background: var(--zalo); color: #fff; box-shadow: 0 8px 24px rgba(7,21,39,0.18); }
.btn-zalo:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(7,21,39,0.24); }

.btn-icon { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 5px; }
.btn-block { width: 100%; }
.btn-sm { padding: 11px 20px; font-size: var(--fs-sm); }
.btn-lg { padding: 16px 34px; font-size: var(--fs-md); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-weight: 800; font-size: var(--fs-xl); letter-spacing: -0.02em; color: var(--navy-800); }
.brand-name::first-letter { color: var(--gold-700); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 6px 0; transition: color .16s;
}
.main-nav a:hover { color: var(--navy-800); }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--gold-500); transition: width .22s ease; border-radius: 2px;
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--navy-800); font-size: var(--fs-sm); padding: 10px; margin: -10px 0; border-radius: 999px; }
.header-phone svg { color: var(--gold-500); flex-shrink: 0; }

.nav-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy-800); border-radius: 2px; transition: transform .22s, opacity .22s; }
.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;
  background: var(--navy-800);
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: -8% 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(198,162,76,0.22), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(27,69,115,0.55), transparent 55%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 48px; align-items: center;
  padding-top: 72px; padding-bottom: 84px;
}
.eyebrow {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-300);
  margin-bottom: 16px;
}
.hero h1 { font-size: var(--fs-hero); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.hero h1 .accent { color: var(--gold-400); }
.hero-sub { margin-top: 20px; font-size: var(--fs-md); color: rgba(255,255,255,0.82); max-width: 34rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); font-weight: 500; color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  padding: 9px 14px; border-radius: 999px;
}
.trust-chip svg { color: var(--gold-400); flex-shrink: 0; }

.hero-stats { display: flex; gap: 32px; margin-top: 34px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: var(--fs-2xl); font-weight: 800; color: #fff; line-height: 1.1; }
.stat strong em { font-style: normal; font-size: var(--fs-base); color: var(--gold-300); margin-left: 2px; }
.stat span { font-size: var(--fs-xs); color: rgba(255,255,255,0.66); margin-top: 4px; }

/* ---------- Lead form card ---------- */
.hero-form {
  background: var(--paper); color: var(--ink);
  border-radius: var(--radius-lg); padding: 34px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(198,162,76,0.35);
  position: relative;
}
.hero-form::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg);
  padding: 2px; background: linear-gradient(160deg, var(--gold-500), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.form-title { font-size: var(--fs-xl); font-weight: 800; color: var(--navy-800); }
.form-sub { font-size: var(--fs-sm); color: var(--ink-soft); margin: 6px 0 20px; }

/* Multi-step form */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.form-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.fstep {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft);
  background: var(--paper-warm); border: 1.5px solid var(--line); transition: all .2s ease;
}
.fstep.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.fstep.done { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-900); }
.fbar { flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.fbar.progress { background: var(--gold-500); }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fstep-pane[hidden] { display: none; }

.amount-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.amount-options.invalid .amount-opt span { border-color: var(--error); }
.amount-opt { position: relative; }
.amount-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.amount-opt span {
  display: block; text-align: center; padding: 12px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #FBFBF9; font-size: var(--fs-sm); font-weight: 500;
  cursor: pointer; transition: all .16s ease; color: var(--ink);
}
.amount-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--gold-700); }
.amount-opt input:checked + span { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.amount-opt input:checked + span::after {
  content: "✓"; margin-left: 8px; color: var(--gold-400); font-weight: 700;
}

.req { color: var(--error); font-weight: 700; margin-left: 3px; }
.form-nav { display: flex; gap: 12px; margin-top: 4px; }
.btn-grow { flex: 1; }
.form-nav .btn-outline { padding-left: 18px; padding-right: 18px; }

.field { margin-bottom: 16px; }
.field label, .field-label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  border: 1.5px solid #8C8678; background: #FBFBF9; font-family: var(--font);
  font-size: var(--fs-base); color: var(--ink); transition: border-color .16s, box-shadow .16s, background .16s;
  appearance: none; -webkit-appearance: none;
}
.field input:focus, .field select:focus {
  outline: 2px solid transparent;
  border-color: var(--gold-700); background: #fff;
  box-shadow: 0 0 0 3px rgba(132,98,42,0.45);
}
.field input.invalid, .field select.invalid { border-color: var(--error); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.select-wrap select { padding-right: 40px; cursor: pointer; }
.field input::placeholder { color: var(--ink-soft); opacity: 1; }
.field select:invalid { color: var(--ink-soft); }

.error-msg { display: block; color: var(--error); font-size: 0.875rem; margin-top: 5px; min-height: 0; }
.error-msg:empty { display: none; }

.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; line-height: 1.5; color: var(--ink-soft); cursor: pointer; margin: 4px 0 6px; }
.consent input { width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; accent-color: var(--navy-700); }
.consent a { color: var(--navy-700); font-weight: 600; text-decoration: underline; }

.form-secure { display: flex; align-items: flex-start; justify-content: center; gap: 6px; font-size: 0.8125rem; color: var(--ink-soft); margin-top: 12px; text-align: center; }
.form-secure svg { color: var(--success); }

.btn-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(7,21,39,0.3); border-top-color: var(--navy-900);
  animation: spin .7s linear infinite; display: none;
}
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading .btn-label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success state */
.lead-success { text-align: center; padding: 20px 8px; }
.lead-success[hidden] { display: none; }
.success-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
  background: rgba(31,157,107,0.12); color: var(--success);
  display: flex; align-items: center; justify-content: center;
}
.lead-success h3 { font-size: var(--fs-lg); color: var(--navy-800); margin-bottom: 8px; }
.lead-success p { color: var(--ink-soft); font-size: var(--fs-sm); margin-bottom: 20px; }
.success-actions { display: flex; gap: 12px; justify-content: center; }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--gold-500); color: var(--navy-900); }
.trust-bar-inner {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; text-align: center;
  padding-top: 26px; padding-bottom: 26px;
}
.tb-item strong { display: block; font-size: var(--fs-2xl); font-weight: 800; line-height: 1.1; }
.tb-item span { font-size: var(--fs-xs); font-weight: 600; opacity: 1; }

/* ---------- Sections ---------- */
.section { padding: var(--space-6) 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head .eyebrow { color: var(--gold-700); }
.section-head h2 { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.02em; color: var(--navy-800); line-height: 1.15; }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: var(--fs-md); }

/* ---------- Partners ---------- */
.partners { background: var(--paper); }
.partner-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
}
.partner-list span {
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft);
  padding: 14px 26px; background: var(--paper-warm); border: 1px solid var(--line);
  border-radius: 999px;
}

/* ---------- Features ---------- */
.features { background: var(--paper); }
.grid { display: grid; gap: 24px; }
.features-grid { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--paper-warm); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 30px 28px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card:hover .card-icon { transform: scale(1.12) rotate(-3deg); }
.card-icon { transition: transform .25s cubic-bezier(.34,1.4,.4,1); }
.card-icon {
  width: 52px; height: 52px; margin-bottom: 18px;
  color: var(--gold-700);
  display: flex; align-items: center; justify-content: flex-start;
}
.card h3 { font-size: var(--fs-lg); color: var(--navy-800); margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: var(--fs-sm); }

/* ---------- Requirements ---------- */
.requirements { background: var(--paper-warm); }
.requirements-grid { grid-template-columns: repeat(4, 1fr); }
.req {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 26px 24px; text-align: center;
}
.req span { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-700); margin-bottom: 8px; }
.req strong { display: block; font-size: var(--fs-md); color: var(--navy-800); margin-bottom: 8px; }
.req p { font-size: var(--fs-sm); color: var(--ink-soft); }
.requirements-note { text-align: center; margin-top: 28px; font-size: var(--fs-xs); color: var(--ink-soft); }

/* ---------- Process ---------- */
.process { background: var(--navy-900); color: #fff; }
.process .section-head h2 { color: #fff; }
.process .section-head p { color: rgba(255,255,255,0.7); }
.process .section-head .eyebrow { color: var(--gold-300); }
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { text-align: center; padding: 8px; }
.step-num {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900); font-weight: 800; font-size: var(--fs-lg);
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: var(--fs-md); color: var(--gold-300); margin-bottom: 8px; }
.step p { color: rgba(255,255,255,0.72); font-size: var(--fs-sm); }

/* ---------- Products ---------- */
.products { background: var(--paper-warm); }
.products-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.product {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 34px 30px;
  display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product.featured { border-color: var(--gold-500); }
.product-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900); font-size: var(--fs-xs); font-weight: 700;
  padding: 5px 16px; border-radius: 999px; white-space: nowrap; letter-spacing: 0.02em;
}
.product h3 { font-size: var(--fs-lg); color: var(--navy-800); margin-bottom: 8px; }
.product-amount { margin-bottom: 16px; }
.product-amount strong { font-size: var(--fs-xl); color: var(--gold-700); font-weight: 800; }
.product ul { margin-bottom: 24px; }
.product ul li { position: relative; padding: 8px 0 8px 26px; color: var(--ink-soft); font-size: var(--fs-sm); border-bottom: 1px dashed var(--line); }
.product ul li:last-child { border-bottom: none; }
.product ul li::before {
  content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--gold-500);
}
.product .btn { margin-top: auto; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--paper-warm); }
.testimonial {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
}
.stars { color: var(--gold-700); letter-spacing: 2px; font-size: var(--fs-base); }
.testimonial p { color: var(--ink); font-size: var(--fs-sm); flex: 1; font-style: italic; }
.testimonial footer { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
  color: var(--gold-300); font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.testimonial footer strong { display: block; color: var(--navy-800); font-size: var(--fs-sm); }
.testimonial footer cite { font-style: normal; color: var(--ink-soft); font-size: var(--fs-xs); }

/* ---------- FAQ ---------- */
.faq { background: var(--paper); }
.faq-inner { max-width: 780px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 20px 24px; font-weight: 600; color: var(--navy-800);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: var(--fs-base);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; width: 12px; height: 12px; flex-shrink: 0;
  border-right: 2.5px solid var(--gold-700); border-bottom: 2.5px solid var(--gold-700);
  transform: rotate(45deg); transition: transform .22s ease; margin-top: -4px;
}
.faq-item[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.faq-body { padding: 0 24px 22px; }
.faq-body p { color: var(--ink-soft); font-size: var(--fs-sm); }

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--navy-800); color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.final-cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 380px at 50% 120%, rgba(198,162,76,0.3), transparent 65%);
}
.final-inner { position: relative; z-index: 1; padding: 72px 24px; }
.final-inner h2 { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.02em; }
.final-inner p { margin: 16px auto 30px; max-width: 470px; color: rgba(255,255,255,0.8); font-size: var(--fs-md); }
.final-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.75); padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { font-size: var(--fs-sm); max-width: 280px; margin-bottom: 18px; }
.footer-contact a { display: block; font-size: var(--fs-sm); padding: 6px 0; }
.footer-contact span { color: var(--gold-300); font-weight: 600; margin-right: 6px; }
.footer-contact .footer-addr { display: block; font-size: var(--fs-sm); padding: 6px 0; color: rgba(255,255,255,0.82); }
.footer-contact .footer-addr span { margin-right: 6px; }
.footer-col .footer-head { color: #fff; font-size: var(--fs-sm); font-weight: 700; margin-bottom: 8px; letter-spacing: 0.02em; }
.footer-col a { display: block; font-size: var(--fs-sm); padding: 6px 0; color: rgba(255,255,255,0.82); transition: color .16s; }
.footer-col a:hover { color: var(--gold-300); }

.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); padding: 28px 0; font-size: var(--fs-xs); line-height: 1.7; }
.legal-title { color: var(--gold-300); font-size: var(--fs-sm); margin-bottom: 12px; }
.footer-legal p { margin-bottom: 12px; color: rgba(255,255,255,0.82); }
.footer-legal strong { color: #fff; }
.legal-meta { color: rgba(255,255,255,0.66); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: var(--fs-xs);
}
.footer-links a { opacity: 0.7; display: inline-block; padding: 8px 4px; }
.footer-links a:hover { opacity: 1; }

/* ---------- Floating widgets ---------- */
.floating {
  position: fixed; right: 20px; bottom: 24px; z-index: 60;
  display: flex; flex-direction: column; gap: 14px; align-items: flex-end;
}
.float-btn {
  position: relative; width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: var(--shadow-md); transition: transform .18s ease;
  border: none; color: #fff;
}
.float-btn:hover { transform: scale(1.07); }
.float-call { background: #fff; color: var(--success); border: 2px solid var(--success); animation: bob 2.6s ease-in-out infinite; }
.float-zalo { background: #fff; box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(11,31,58,0.08); }
.float-zalo img { width: 38px; height: 38px; border-radius: 10px; display: block; }
.float-pulse {
  position: absolute; top: -3px; right: -3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--error); border: 2.5px solid #fff;
}
.float-pulse::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: rgba(214,69,69,0.4); animation: ping 1.6s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.zalo-popup {
  position: absolute; right: 0; bottom: 150px; width: 300px;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden; border: 1px solid var(--line);
  animation: popup-in .22s ease-out;
}
.zalo-popup[hidden] { display: none; }
@keyframes popup-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.zalo-popup-head { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--navy-800); color: #fff; }
.zalo-avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.zalo-avatar img { width: 28px; height: 28px; border-radius: 8px; display: block; }
.zalo-popup-head strong { display: block; font-size: var(--fs-sm); }
.zalo-popup-head span { font-size: var(--fs-xs); color: rgba(255,255,255,0.72); }
.zalo-popup-body { padding: 16px; }
.zalo-msg { background: var(--paper-warm); border-radius: 14px 14px 14px 4px; padding: 12px 14px; font-size: var(--fs-sm); color: var(--ink); }
.zalo-popup .btn { border-radius: 12px; margin: 0 16px 16px; width: calc(100% - 32px); }

/* ---------- Reveal animation ---------- */
html.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .hero .reveal { opacity: 1; transform: none; } /* hero = LCP: never hidden */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, html.js .reveal { opacity: 1; transform: none; transition: none; }
  .float-call, .float-pulse::after, .btn-spinner { animation: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-trust, .hero-stats { justify-content: center; }
  .hero-form { max-width: 480px; margin: 0 auto; width: 100%; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .requirements-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 72px; left: 0; right: 0; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px; transform: translateY(-12px); opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity .22s, transform .22s, visibility .22s;
    box-shadow: var(--shadow-md);
  }
  .main-nav.nav-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--paper-warm); font-weight: 600; color: var(--ink); }
  .main-nav a::after { display: none; }
  .header-cta { display: none; }
  .header-phone span { display: none; }

  .section { padding: var(--space-5) 0; }
  .section-head h2 { font-size: var(--fs-2xl); }
  .features-grid { grid-template-columns: 1fr; }
  .requirements-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .tb-item strong { font-size: var(--fs-xl); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .floating { right: 14px; bottom: 18px; }
  .float-btn { width: 52px; height: 52px; }
  .zalo-popup { width: 280px; right: 0; }
  .hero-form { padding: 26px 22px; }
}

@media (max-width: 440px) {
  .container { padding-left: 18px; padding-right: 18px; }
  .hero-stats { gap: 20px; }
  .tb-item span { display: inline-block; max-width: 110px; }
  .zalo-popup { width: 250px; }
}