/* ============ RESET & BASE ============ */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0369a1;
  --primary-light: #38bdf8;
  --accent: #22c55e;
  --dark: #0f172a;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --bg: #ffffff;
  --bg-alt: #f1f5f9;
  --bg-soft: #f8fafc;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(2, 8, 23, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(2, 8, 23, 0.28);
  --container: 1200px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  color: var(--dark);
  line-height: 1.65;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.text-gradient {
  background: linear-gradient(120deg, var(--primary-light), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 30px; border-radius: 50px;
  font-weight: 600; font-size: 15px; cursor: pointer;
  border: none; transition: var(--transition); white-space: nowrap;
}
.btn--primary { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 10px 24px -8px rgba(14, 165, 233, 0.6); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -8px rgba(14, 165, 233, 0.7); }
.btn--ghost { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.5); }
.btn--ghost:hover { background: #fff; color: var(--primary-dark); }
.btn--white { background: #fff; color: var(--primary-dark); }
.btn--white:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn--block { width: 100%; }

/* ============ TOPBAR ============ */
.topbar { background: var(--dark); color: #cbd5e1; font-size: 13.5px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.topbar__contact a, .topbar__social a { color: #cbd5e1; margin-right: 18px; transition: color 0.2s; }
.topbar__contact a:hover, .topbar__social a:hover { color: var(--primary-light); }
.topbar__social a { margin: 0 0 0 16px; }

/* ============ HEADER ============ */
.header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: var(--shadow); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 24px; letter-spacing: -0.5px; }
.logo__mark { font-size: 26px; }
.logo__text span { color: var(--primary); }
.logo--light { color: #fff; }
.logo--light .logo__text span { color: var(--primary-light); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link { padding: 10px 16px; font-weight: 500; font-size: 15px; color: var(--dark); border-radius: 10px; transition: var(--transition); position: relative; }
.nav__link:hover { color: var(--primary); background: var(--bg-alt); }
.nav__link--btn { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: #fff !important; margin-left: 8px; padding: 10px 22px; }
.nav__link--btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -6px rgba(14,165,233,0.6); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 26px; height: 2.5px; background: var(--dark); border-radius: 2px; transition: var(--transition); }
.nav__toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============ HERO ============ */
.hero { position: relative; overflow: hidden; color: #fff; padding: 90px 0 140px; }
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 45%, #0ea5e9 100%);
}
.hero__bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(56,189,248,0.5), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(34,197,94,0.25), transparent 45%);
}
.hero__inner { position: relative; z-index: 1; }
.hero__content { max-width: 720px; }
.hero__badge {
  display: inline-block; padding: 8px 18px; background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25); border-radius: 50px; font-size: 14px;
  font-weight: 500; margin-bottom: 24px; backdrop-filter: blur(6px);
}
.hero__title { font-size: clamp(36px, 5.5vw, 62px); line-height: 1.1; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 22px; }
.hero__title .text-gradient { background: linear-gradient(120deg, #bae6fd, #86efac); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__desc { font-size: 18px; color: rgba(255,255,255,0.9); max-width: 620px; margin-bottom: 34px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }

.hero__stats { display: flex; gap: 48px; flex-wrap: wrap; }
.stat__num { font-size: 40px; font-weight: 800; line-height: 1; display: block; }
.stat__num::after { content: "+"; }
.stat__label { font-size: 14.5px; color: rgba(255,255,255,0.8); }

.hero__wave {
  position: absolute; bottom: -1px; left: 0; width: 100%; height: 90px; z-index: 0;
  background: var(--bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0 90 L0 40 Q360 0 720 30 T1440 30 L1440 90 Z'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0 90 L0 40 Q360 0 720 30 T1440 30 L1440 90 Z'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}

/* ============ TRUST ============ */
.trust { padding: 40px 0; background: var(--bg); border-bottom: 1px solid var(--border); }
.trust__label { text-align: center; color: var(--gray); font-size: 15px; margin-bottom: 20px; }
.trust__logos { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.trust__logos span { font-weight: 700; color: var(--gray-light); font-size: 15px; letter-spacing: 0.5px; opacity: 0.8; }

/* ============ SECTION COMMON ============ */
.section { padding: 96px 0; }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section__tag {
  display: inline-block; padding: 6px 16px; background: rgba(14,165,233,0.1); color: var(--primary-dark);
  border-radius: 50px; font-size: 13.5px; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px;
}
.section__title { font-size: clamp(28px, 3.5vw, 40px); font-weight: 700; line-height: 1.2; letter-spacing: -0.8px; margin-bottom: 16px; }
.section__sub { color: var(--gray); font-size: 17px; }

/* ============ ABOUT ============ */
.about { background: var(--bg); }
.about__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.about__media { position: relative; }
.about__img {
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 90px;
  box-shadow: var(--shadow);
}
.about__img--1 { height: 340px; background: linear-gradient(135deg, #e0f2fe, #bae6fd); }
.about__img--2 { position: absolute; bottom: -40px; right: -20px; width: 180px; height: 180px; font-size: 64px; background: linear-gradient(135deg, #dcfce7, #bbf7d0); border: 6px solid #fff; }
.about__badge {
  position: absolute; top: -24px; left: -24px; background: var(--primary-dark); color: #fff;
  padding: 18px 24px; border-radius: 14px; box-shadow: var(--shadow-lg); text-align: center;
}
.about__badge strong { font-size: 28px; display: block; line-height: 1; }
.about__badge span { font-size: 13px; opacity: 0.9; }

.about__content > p { color: var(--gray); margin-bottom: 16px; font-size: 16.5px; }
.about__content strong { color: var(--dark); }
.about__values { display: grid; gap: 20px; margin-top: 28px; }
.value { display: flex; gap: 16px; align-items: flex-start; }
.value__icon { font-size: 28px; flex-shrink: 0; width: 52px; height: 52px; background: var(--bg-alt); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.value h4 { font-size: 17px; margin-bottom: 2px; }
.value p { color: var(--gray); font-size: 15px; }

/* ============ PRODUCTS ============ */
.products { background: var(--bg-soft); }
.products__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pcard {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 30px; transition: var(--transition); overflow: hidden;
}
.pcard:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.pcard--featured { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.pcard__tag { position: absolute; top: 20px; right: 20px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 50px; }
.pcard__icon { font-size: 44px; width: 78px; height: 78px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e0f2fe, #f0f9ff); border-radius: 18px; margin-bottom: 22px; }
.pcard h3 { font-size: 21px; margin-bottom: 12px; }
.pcard > p { color: var(--gray); font-size: 15px; margin-bottom: 18px; }
.pcard__list { margin-bottom: 24px; }
.pcard__list li { position: relative; padding-left: 26px; color: var(--gray); font-size: 14.5px; margin-bottom: 10px; }
.pcard__list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.pcard__link { color: var(--primary); font-weight: 600; font-size: 15px; transition: gap 0.2s; }
.pcard__link:hover { color: var(--primary-dark); }

/* ============ CHIPS (core values) ============ */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  background: rgba(14,165,233,0.1); color: var(--primary-dark); border-radius: 50px;
  font-weight: 600; font-size: 14.5px;
}

/* ============ PRODUCTS NOTE ============ */
.products__note { text-align: center; color: var(--gray-light); font-size: 13.5px; margin-top: 28px; font-style: italic; }

/* ============ SOLUTIONS ============ */
.solutions { background: var(--bg); }

/* ============ CONTACT MAP ============ */
.contact__map { margin-top: 40px; }
.contact__map-ph {
  height: 240px; border-radius: var(--radius); border: 2px dashed var(--border);
  background: var(--bg-alt); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; font-size: 40px; color: var(--gray);
}
.contact__map-ph span { font-size: 15px; max-width: 480px; text-align: center; }

/* ============ WHY ============ */
.why { background: var(--bg); }
.why__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why__item { padding: 30px 26px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--border); transition: var(--transition); }
.why__item:hover { background: #fff; box-shadow: var(--shadow); transform: translateY(-4px); }
.why__icon { font-size: 34px; display: block; margin-bottom: 14px; }
.why__item h4 { font-size: 18px; margin-bottom: 8px; }
.why__item p { color: var(--gray); font-size: 15px; }

/* ============ PROCESS ============ */
.process { background: var(--bg-soft); }
.process__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pstep { position: relative; padding: 34px 26px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.pstep__num { font-size: 42px; font-weight: 800; color: transparent; -webkit-text-stroke: 1.5px var(--primary-light); display: block; margin-bottom: 14px; }
.pstep h4 { font-size: 18px; margin-bottom: 8px; }
.pstep p { color: var(--gray); font-size: 14.5px; }

/* ============ CTA ============ */
.cta { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; padding: 60px 0; }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.cta p { opacity: 0.92; font-size: 16.5px; }

/* ============ NEWS ============ */
.news { background: var(--bg); }
.news__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.ncard { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.ncard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.ncard__img { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 64px; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.ncard__body { padding: 24px; }
.ncard__date { font-size: 13px; color: var(--gray-light); font-weight: 500; }
.ncard h3 { font-size: 18px; margin: 8px 0 10px; line-height: 1.4; }
.ncard > .ncard__body > p { color: var(--gray); font-size: 14.5px; margin-bottom: 14px; }
.ncard__link { color: var(--primary); font-weight: 600; font-size: 14.5px; }

/* ============ CONTACT ============ */
.contact { background: var(--bg-soft); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; }
.contact__info { display: grid; gap: 22px; align-content: start; }
.cinfo { display: flex; gap: 16px; align-items: flex-start; background: #fff; padding: 22px; border-radius: 14px; border: 1px solid var(--border); }
.cinfo__icon { font-size: 24px; width: 50px; height: 50px; flex-shrink: 0; background: var(--bg-alt); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.cinfo h4 { font-size: 16px; margin-bottom: 2px; }
.cinfo p { color: var(--gray); font-size: 15px; }
.cinfo a:hover { color: var(--primary); }

.contact__form { background: #fff; padding: 34px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: 14.5px; font-weight: 500; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 15px; color: var(--dark); transition: var(--transition); background: var(--bg-soft);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(14,165,233,0.1); }
.field textarea { resize: vertical; }
.field input.error, .field select.error { border-color: #ef4444; }
.form__note { margin-top: 14px; font-size: 14.5px; text-align: center; }
.form__note.success { color: var(--accent); }
.form__note.fail { color: #ef4444; }

/* ============ FOOTER ============ */
.footer { background: var(--dark); color: #cbd5e1; padding-top: 64px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer__col h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.footer__col a, .footer__col p { display: block; color: #94a3b8; font-size: 14.5px; margin-bottom: 10px; transition: color 0.2s; }
.footer__col a:hover { color: var(--primary-light); }
.footer__col--brand p { max-width: 320px; margin-top: 14px; }
.footer__col--brand .logo { margin-bottom: 4px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; }
.footer__bottom p { text-align: center; color: #64748b; font-size: 14px; }

/* ============ FLOATING & BACK TOP ============ */
.floating { position: fixed; right: 20px; bottom: 24px; display: flex; flex-direction: column; gap: 12px; z-index: 90; }
.floating__btn { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; box-shadow: var(--shadow-lg); transition: var(--transition); }
.floating__btn--phone { background: var(--accent); animation: pulse 2s infinite; }
.floating__btn--zalo { background: var(--primary); }
.floating__btn:hover { transform: scale(1.1); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); } 50% { box-shadow: 0 0 0 12px rgba(34,197,94,0); } }

.backtop {
  position: fixed; left: 20px; bottom: 24px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-dark); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: var(--transition); z-index: 90;
}
.backtop.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ============ ANIMATIONS ON SCROLL ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .about__grid { grid-template-columns: 1fr; gap: 80px; }
  .products__grid, .news__grid, .why__grid { grid-template-columns: repeat(2, 1fr); }
  .process__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .topbar__social { display: none; }
  .nav {
    position: fixed; top: 0; right: -100%; width: 78%; max-width: 320px; height: 100vh;
    background: #fff; flex-direction: column; align-items: stretch; padding: 90px 24px 24px;
    gap: 6px; box-shadow: -10px 0 40px rgba(0,0,0,0.15); transition: right 0.35s ease; z-index: 99;
  }
  .nav.open { right: 0; }
  .nav__link { font-size: 16px; padding: 14px 16px; }
  .nav__link--btn { margin-left: 0; margin-top: 8px; text-align: center; }
  .nav__toggle { display: flex; z-index: 100; }
  .hero { padding: 60px 0 110px; }
  .hero__stats { gap: 32px; }
  .stat__num { font-size: 32px; }
  .section { padding: 68px 0; }
  .cta__inner { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  .products__grid, .news__grid, .why__grid, .process__grid, .footer__grid, .field-row { grid-template-columns: 1fr; }
  .trust__logos { gap: 18px; }
  .trust__logos span { font-size: 13px; }
  .about__img--2 { width: 130px; height: 130px; font-size: 48px; right: 0; }
  .hero__actions .btn { flex: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
