/* ============ TOKENS ============ */
:root {
  --navy: #1e3a8a;
  --navy-deep: #16265c;
  --orange: #f47a1f;
  --orange-soft: #ffb066;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --text: #1a1f2e;
  --text-soft: #59617a;
  --border: #e5e8f0;
  --shadow: 0 12px 40px rgba(22, 38, 92, 0.10);
  --radius: 16px;
  --maxw: 1120px;
}
[data-theme="dark"] {
  --bg: #0e1424;
  --surface: #161d33;
  --surface-2: #1d2745;
  --text: #eef1f8;
  --text-soft: #a7afc7;
  --border: #2a3352;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  /* Be Vietnam Pro: full Vietnamese diacritic coverage + clean Latin for English */
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: .6rem;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 24px rgba(244, 122, 31, .35); }
.btn-primary:hover { background: #e56d10; }
.btn-ghost { border-color: currentColor; color: #fff; }
.btn-block { width: 100%; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 1rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font-size: 1.02rem; color: var(--navy); }
[data-theme="dark"] .brand-name { color: #fff; }
.nav-links { margin-left: auto; display: flex; gap: 1.6rem; }
.nav-links a { font-weight: 500; color: var(--text-soft); transition: color .2s; }
.nav-links a:hover { color: var(--orange); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }

.pill {
  display: flex; align-items: center; gap: .3rem;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: .35rem .7rem; font: inherit;
  font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--text-soft);
}
.lang-opt.is-active { color: var(--orange); }
.lang-sep { opacity: .4; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; cursor: pointer; font-size: 1rem; color: var(--text);
}
.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: inline; }
.nav-burger { display: none; }

/* ============ CAROUSEL ============ */
.carousel {
  position: relative; overflow: hidden;
  background: var(--surface-2);
}
.carousel::before {
  content: ""; position: absolute; inset: 0;
  background: url("assets/background.jpg") center/cover no-repeat;
  opacity: .13;
}
[data-theme="dark"] .carousel::before { opacity: .10; }
.carousel-stage { position: relative; }
.carousel-track { display: flex; transition: transform .6s cubic-bezier(.6,.1,.2,1); }
.slide { min-width: 100%; }
.slide-inner {
  min-height: 460px; display: flex; align-items: center; justify-content: center;
  padding: 4rem 20px;
}
.slide-copy {
  width: 72%; max-width: 820px; position: relative;
  margin: 0 auto; text-align: center;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  padding: 2.4rem; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.slide-copy .lead { color: var(--text-soft); margin-top: .8rem; font-size: 1.05rem; }
.slide-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; justify-content: center; }
.slide-cta .btn-ghost { color: var(--navy); }
[data-theme="dark"] .slide-cta .btn-ghost { color: #fff; }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px;
  border: none; background: var(--surface); color: var(--text);
  font-size: 1.5rem; cursor: pointer; box-shadow: var(--shadow); z-index: 3;
}
.carousel-arrow.prev { left: 16px; }
.carousel-arrow.next { right: 16px; }
.carousel-dots {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: .5rem; z-index: 3;
}
.carousel-dots button {
  width: 9px; height: 9px; border-radius: 999px; border: none;
  background: var(--text-soft); opacity: .4; cursor: pointer;
}
.carousel-dots button.is-active { opacity: 1; background: var(--orange); width: 26px; }

.carousel-note {
  position: relative; z-index: 1;
  text-align: center; margin: 0; padding: 1.3rem 0 1.7rem;
  font-size: .9rem; color: var(--text-soft);
}
.carousel-note a {
  color: var(--orange); font-weight: 600; text-decoration: none;
  transition: color .2s;
}
.carousel-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============ SECTIONS ============ */
.section { padding: 4.5rem 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.8rem; }
.section-sub { color: var(--text-soft); margin-top: .6rem; }

/* ============ SERVICE CARDS ============ */
.cards {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(4, 1fr);
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--orange-soft); }
.card-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  font-size: 1.6rem; border-radius: 14px;
  background: var(--surface-2); margin-bottom: 1rem;
}
.card h3 { color: var(--navy); margin-bottom: .4rem; }
[data-theme="dark"] .card h3 { color: #fff; }
.card p { color: var(--text-soft); font-size: .92rem; }
.card-unit {
  display: inline-block; margin-top: .9rem; font-weight: 600;
  font-size: .82rem; color: var(--orange);
}
.addon-note {
  text-align: center; margin-top: 2rem; color: var(--text-soft);
}
.addon-note strong { color: var(--orange); }

/* ============ BUILDER ============ */
.section-builder { background: var(--surface-2); }
.builder-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: 1.1fr 1fr;
  align-items: start;
}
.builder-panel, .contact-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
}
.builder-panel h2, .contact-panel h2 { color: var(--navy); }
[data-theme="dark"] .builder-panel h2, [data-theme="dark"] .contact-panel h2 { color: #fff; }

.budget-row { margin: 1.4rem 0 1rem; }
input[type="range"] {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--orange); border: 3px solid var(--surface);
  box-shadow: 0 2px 8px rgba(244,122,31,.5);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border: 3px solid var(--surface);
  border-radius: 999px; background: var(--orange);
}
.budget-value { font-size: 1.6rem; font-weight: 800; color: var(--navy); margin-top: .6rem; }
[data-theme="dark"] .budget-value { color: #fff; }
.budget-value span:last-child { font-size: .9rem; font-weight: 500; color: var(--text-soft); }

.package-list { list-style: none; margin: 1.2rem 0; }
.package-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 0; border-bottom: 1px dashed var(--border);
}
.pk-name { font-weight: 500; }
.pk-qty { display: flex; align-items: center; gap: .55rem; font-weight: 600; }
.pk-qty button {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 1rem; line-height: 1;
}
.pk-qty .pk-count { min-width: 68px; text-align: right; color: var(--orange); }

.package-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 1rem; padding-top: 1rem; border-top: 2px solid var(--border);
}
.package-total strong { font-size: 1.5rem; color: var(--navy); }
[data-theme="dark"] .package-total strong { color: #fff; }
.builder-hint { font-size: .82rem; color: var(--text-soft); margin-top: .8rem; }

/* ============ CONTACT FORM ============ */
.contact-form { display: grid; gap: 1rem; margin-top: 1.2rem; }
.contact-form label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 500; color: var(--text-soft); }
.contact-form input, .contact-form textarea {
  font: inherit; padding: .7rem .9rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--orange-soft); outline-offset: 1px; border-color: var(--orange);
}
.form-status {
  display: inline-flex; align-items: center;
  font-size: .84rem; font-weight: 600; line-height: 1.35;
  padding: .5rem .8rem; border-radius: 12px;
  background: rgba(26, 157, 90, .12); color: #1a9d5a;
}
.form-status.error { background: rgba(210, 59, 59, .12); color: #d23b3b; }
.form-status.info { background: rgba(30, 58, 138, .12); color: var(--navy); }
[data-theme="dark"] .form-status.info { color: #9db4ff; }
.form-status[hidden] { display: none; }

/* ============ CTA BAND ============ */
.cta-band {
  margin-top: 3rem; text-align: center;
  background: linear-gradient(120deg, var(--navy), var(--navy-deep));
  border-radius: 22px; padding: 3rem 2rem; color: #fff;
}
.cta-band h2 { margin-bottom: 1.4rem; }

/* ============ FOOTER ============ */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-top: 3rem; }
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1.6fr 1fr 1fr;
  padding-bottom: 2rem;
}
.footer-brand img { width: 56px; margin-bottom: .8rem; }
.footer-brand p { color: var(--text-soft); font-size: .9rem; max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: .5rem; }
.footer-col h4 { color: var(--navy); margin-bottom: .3rem; }
[data-theme="dark"] .footer-col h4 { color: #fff; }
.footer-col a { color: var(--text-soft); font-size: .9rem; transition: color .2s; }
.footer-col a:hover { color: var(--orange); }
.footer-col a.with-icon { display: inline-flex; align-items: center; gap: .45rem; }
.footer-col a.with-icon svg { width: 15px; height: 15px; flex-shrink: 0; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  border-top: 1px solid var(--border); padding: 1.2rem 20px 2rem;
  font-size: .82rem; color: var(--text-soft);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .builder-grid { grid-template-columns: 1fr; }
  .slide-copy { width: 84%; }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 260px; }
  .nav-links a { padding: .9rem 20px; border-bottom: 1px solid var(--border); }
  .nav-burger { display: grid; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-name { display: none; }
  .slide-copy { width: 92%; padding: 1.4rem; }
}
