/* HSVM Design System — built from the real design plan, not a template default */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600&display=swap');

:root {
  --ink: #1C1C1C;
  --navy: #1B2A4A;
  --navy-deep: #121E36;
  --gold: #8A6420;
  --gold-soft: #E4D3A8;
  --lacquer: #8B2E2E;
  --paper: #FAFAF7;
  --paper-warm: #F3EFE6;
  --muted: #6B6B6B;
  --line: #E3DFD4;

  --green: #2E7D4F;
  --green-bg: #E8F3EC;
  --yellow: #8A6106;
  --yellow-bg: #FBF3DF;
  --red: #A63A3A;
  --red-bg: #F7E9E9;

  --display: 'Fraunces', serif;
  --body: 'IBM Plex Sans', -apple-system, sans-serif;

  --radius: 3px;
  --shadow: 0 1px 3px rgba(27, 42, 74, 0.08), 0 4px 16px rgba(27, 42, 74, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy-deep);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 600; margin-bottom: 16px; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); font-weight: 500; }

p { color: var(--ink); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; line-height: 1.55; }

a { color: var(--navy); text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }

/* --- Header / Nav --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: 1120px; margin: 0 auto;
}
.brand {
  font-family: var(--display); font-weight: 700; font-size: 1.35rem;
  color: var(--navy-deep); display: flex; align-items: center; gap: 8px;
}
.brand .seal {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--navy); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; font-family: var(--body);
  border: 2px solid var(--gold);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 0.95rem; font-weight: 500; color: var(--ink);
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { border-bottom-color: var(--gold); }

.lang-toggle {
  display: flex; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; font-size: 0.85rem; font-weight: 600;
}
.lang-toggle button {
  background: transparent; border: none; padding: 6px 12px; cursor: pointer;
  color: var(--muted); font-family: var(--body); font-weight: 600;
}
.lang-toggle button.active { background: var(--navy); color: var(--paper); }
.lang-toggle button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--navy-deep); margin: 5px 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius);
  font-family: var(--body); font-weight: 600; font-size: 0.98rem;
  cursor: pointer; border: none; transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-primary { background: var(--navy); color: var(--paper); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-large { padding: 16px 32px; font-size: 1.05rem; }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--paper); }

/* --- Status pill system (the site's signature element — reused directly from the real Core vocabulary) --- */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600;
}
.status-green { background: var(--green-bg); color: var(--green); }
.status-yellow { background: var(--yellow-bg); color: var(--yellow); }
.status-red { background: var(--red-bg); color: var(--red); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-green .status-dot { background: var(--green); }
.status-yellow .status-dot { background: var(--yellow); }
.status-red .status-dot { background: var(--red); }

/* --- Hero --- */
.hero {
  padding: 88px 0 64px;
  background: linear-gradient(180deg, var(--paper-warm) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-focused { padding: 104px 0 72px; text-align: center; }
.hero-single { max-width: 640px; margin: 0 auto; }
.hero-single .eyebrow { display: block; margin-bottom: 20px; }
.hero-single h1 { margin-bottom: 22px; }
.hero-single .lede { margin: 0 auto 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px; display: block;
}
.hero-cta { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.hero-reassure { margin-top: 18px; font-size: 0.92rem; color: var(--muted); }

.hero-card {
  background: white; border-radius: 6px; box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 28px;
}
.hero-card-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hero-card-row:last-child { border-bottom: none; }
.hero-card-label { color: var(--muted); font-size: 0.9rem; }
.hero-card-value { font-weight: 600; color: var(--navy-deep); }

/* --- Question map grid (homepage service finder, real content structure) --- */
.finder-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px; margin-top: 44px;
}
.finder-card {
  background: white; border: 1px solid var(--line); border-radius: 6px;
  padding: 26px 24px; transition: border-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}
.finder-card:hover, .finder-card:focus-visible { border-color: var(--gold); transform: translateY(-2px); }
.finder-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.finder-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

/* --- Trust bar (5 real, specific reassurances) --- */
.trust-bar {
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.trust-bar-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px 32px;
}
.trust-bar-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; color: var(--ink); white-space: nowrap;
}
.trust-bar-icon {
  color: #256B41; font-weight: 700; font-size: 0.95rem;
}
@media (max-width: 720px) {
  .trust-bar-grid { justify-content: flex-start; }
  .trust-bar-item { white-space: normal; }
  .trust-bar { padding: 20px 0; }
}

/* --- Trust strip --- */
.trust-strip {
  display: flex; justify-content: space-around; flex-wrap: wrap; gap: 24px;
  padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--paper-warm);
}
.trust-item { text-align: center; max-width: 220px; }
.trust-item .num { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.trust-item .label { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

/* --- Service Facts block (canonical field structure, reused across all 20 window templates) --- */
.service-facts {
  background: white; border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 24px; margin: 24px 0;
}
.service-facts .hero-card-row:last-child { border-bottom: none; }
.service-facts-row-label { color: var(--muted); font-size: 0.9rem; }

.service-facts-value {
  font-size: 0.9rem; font-weight: 600; color: var(--navy-deep);
  text-align: right; max-width: 60%;
}
.service-why {
  font-size: 0.94rem; color: var(--muted); line-height: 1.6;
  margin: 20px 0; padding-left: 16px; border-left: 2px solid var(--gold-soft);
}

.service-cta-btn { width: 100%; justify-content: center; }
.pending-inline {
  font-size: 0.85rem; color: var(--yellow); font-weight: 500;
}

/* --- Peace of Mind block (Website Communication Standard, applied consistently before every CTA) --- */
.peace-of-mind {
  background: var(--paper-warm); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 6px; padding: 16px 20px; margin: 16px 0 20px;
}
.peace-of-mind h4 {
  font-size: 0.85rem; font-weight: 600; color: var(--navy-deep); margin-bottom: 8px;
}
.peace-of-mind ul {
  list-style: none; font-size: 0.88rem; color: var(--muted); line-height: 1.6;
}
.peace-of-mind li {
  padding-left: 16px; position: relative; margin-bottom: 4px;
}
.peace-of-mind li::before {
  content: '·'; position: absolute; left: 0; color: var(--gold); font-weight: 700;
}

/* --- Window/Service page --- */
.window-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--navy); }

.doc-list { list-style: none; margin: 16px 0; }
.doc-list li {
  padding: 12px 0 12px 28px; border-bottom: 1px solid var(--line);
  position: relative; font-size: 0.98rem;
}
.doc-list li::before {
  content: '○'; position: absolute; left: 0; color: var(--gold); font-size: 0.8rem; top: 15px;
}

.info-card {
  background: white; border: 1px solid var(--line); border-radius: 6px;
  padding: 24px; margin: 20px 0;
}
.info-card.warn { border-left: 3px solid var(--yellow); }
.info-card.original-required { border-left: 3px solid var(--red); }
.info-card.original-may-be-needed { border-left: 3px solid var(--yellow); }
.info-card.original-not-needed { border-left: 3px solid var(--green); }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }

/* --- Service Window Standard v1.0: seven-step flow grid ---
   DOM order is always: Dành cho, Cần gửi, Vì sao, Tình trạng bản gốc,
   Thời gian an toàn, Giá khởi điểm, CTA. Named grid-areas (not the CSS
   `order` property) control visual placement only, so mobile, keyboard,
   and screen-reader order always match the DOM. */
.window-flow-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-areas:
    "cangui   danhcho"
    "visao    bangoc"
    "visao    thoigian"
    "visao    gia"
    "visao    cta";
  column-gap: 48px;
  row-gap: 24px;
  align-items: start;
}
.flow-danhcho  { grid-area: danhcho; }
.flow-cangui   { grid-area: cangui; }
.flow-visao    { grid-area: visao; }
.flow-bangoc   { grid-area: bangoc; }
.flow-thoigian { grid-area: thoigian; }
.flow-gia      { grid-area: gia; }
.flow-cta      { grid-area: cta; }

@media (max-width: 860px) {
  .window-flow-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "danhcho"
      "cangui"
      "visao"
      "bangoc"
      "thoigian"
      "gia"
      "cta";
    row-gap: 20px;
  }
}

/* --- FAQ --- */
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-q { font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-a { margin-top: 12px; color: var(--muted); display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q .chevron { transform: rotate(180deg); }
.chevron { transition: transform 0.15s ease; }

/* --- Footer --- */
.site-footer { background: var(--navy-deep); color: var(--paper-warm); padding: 56px 0 32px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-grid a { color: var(--paper-warm); opacity: 0.85; display: block; padding: 4px 0; font-size: 0.92rem; }
.footer-grid a:hover { opacity: 1; color: var(--gold-soft); }
.footer-bottom { border-top: 1px solid rgba(250,250,247,0.15); margin-top: 40px; padding-top: 24px; font-size: 0.82rem; opacity: 0.6; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* --- Pending page state (legal pages honestly incomplete, not faked) --- */
.pending-notice {
  background: var(--yellow-bg); border: 1px solid var(--gold-soft);
  border-radius: 6px; padding: 24px; margin: 32px 0;
}

/* --- Language visibility --- */
[lang-en] { display: none; }
html[data-lang="en"] [lang-vi] { display: none; }
html[data-lang="en"] [lang-en] { display: block; }
html[data-lang="en"] span[lang-en], html[data-lang="en"] strong[lang-en] { display: inline; }
html[data-lang="vi"] span[lang-vi], html[data-lang="vi"] strong[lang-vi] { display: inline; }

/* --- Accessibility --- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: var(--paper);
  padding: 12px 20px; border-radius: 0 0 var(--radius) 0;
  font-weight: 600; font-size: 0.95rem;
}
.skip-link:focus {
  left: 0;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* --- Mobile --- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.mobile-open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 16px 24px; box-shadow: var(--shadow);
  }
  .mobile-toggle { display: block; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-focused { padding: 56px 0 40px; }
  .hero-single .lede { margin-bottom: 28px; }
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-strip { gap: 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .service-facts .hero-card-row {
    flex-direction: column; align-items: flex-start; gap: 4px;
  }
  .service-facts .hero-card-row .hero-card-value,
  .service-facts .hero-card-row .service-facts-value,
  .service-facts .hero-card-row .status-pill,
  .service-facts .hero-card-row .pending-inline {
    max-width: 100% !important; text-align: left !important;
  }
}
