/* ============================================================
   Human Capital Vietnam — humancapitalvietnam.com
   Palette from brand logo: burgundy #6C0B1F · gray #626262
   ============================================================ */

:root {
  --brand: #6C0B1F;
  --brand-dark: #4C0715;
  --brand-tint: #F6EDEF;
  --ink: #1E2126;
  --body: #4A4F57;
  --muted: #767B83;
  --line: #E7E4E0;
  --bg: #FFFFFF;
  --bg-alt: #F7F6F4;
  --radius: 6px;
  --max: 1180px;
  --font-display: "Archivo", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Language toggle ---------- */
html[data-lang="en"] .vi { display: none !important; }
html[data-lang="vi"] .en { display: none !important; }

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 650;
}

h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

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

section { padding: 88px 0; }
section.tight { padding: 64px 0; }
.bg-alt { background: var(--bg-alt); }

/* Pennant — the flag from the logo, used as the brand marker */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 12px;
  background: var(--brand);
  clip-path: polygon(0 100%, 0 45%, 100% 0, 62% 100%);
}

.lead { font-size: 1.15rem; color: var(--body); max-width: 62ch; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--ink);
  color: #C9CCD1;
  font-size: 0.8rem;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 36px;
}
.topbar a { color: #C9CCD1; }
.topbar a:hover { color: #fff; }
.topbar .contact-mini { display: flex; gap: 22px; }

.lang-switch { display: flex; gap: 2px; }
.lang-switch button {
  background: none; border: 0; color: #9BA0A8; cursor: pointer;
  font: 600 0.78rem var(--font-body); letter-spacing: 0.06em;
  padding: 4px 8px;
}
.lang-switch button.active { color: #fff; }
.lang-switch button:hover { color: #fff; }
.lang-switch span { color: #565B63; align-self: center; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.logo img { height: 44px; width: auto; }

nav.main { display: flex; align-items: center; gap: 34px; }
nav.main a {
  color: var(--ink); font-weight: 500; font-size: 0.95rem;
  position: relative; padding: 6px 0;
}
nav.main a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--brand);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.22s ease;
}
nav.main a:hover::after, nav.main a.active::after { transform: scaleX(1); }
nav.main a.active { color: var(--brand); }

.btn {
  display: inline-block;
  background: var(--brand); color: #fff;
  font: 600 0.95rem var(--font-body);
  padding: 13px 28px; border-radius: var(--radius);
  border: 1px solid var(--brand);
  transition: background 0.2s ease;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-tint); }
.btn.light { background: #fff; color: var(--brand); border-color: #fff; }
.btn.light:hover { background: #F1E8EA; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: 0.2s; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 104px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { margin: 24px 0 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { position: relative; }
.hero-visual .panel {
  aspect-ratio: 4 / 3.4;
  background:
    linear-gradient(155deg, rgba(108,11,31,0.92) 0%, rgba(76,7,21,0.96) 100%);
  clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 94%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 40px;
  color: #fff;
}
.hero-visual .panel .big {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.02em;
}
.hero-visual .panel .small { margin-top: 12px; color: #E8D6DA; font-size: 0.95rem; max-width: 34ch; }
.hero-visual::before {
  content: "";
  position: absolute; top: -18px; right: -18px;
  width: 110px; height: 60px;
  background: var(--line);
  clip-path: polygon(0 100%, 0 45%, 100% 0, 62% 100%);
  z-index: -1;
}

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding: 72px 0;
}
.page-hero h1 { max-width: 20ch; }
.page-hero p { margin-top: 18px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -18px rgba(30,33,38,0.22);
}
.card .flag {
  width: 30px; height: 16px; margin-bottom: 20px;
  background: var(--brand);
  clip-path: polygon(0 100%, 0 45%, 100% 0, 62% 100%);
}
.card h3 { margin-bottom: 12px; }
.card p { font-size: 0.96rem; }
.card .more { display: inline-block; margin-top: 16px; font-weight: 600; font-size: 0.9rem; }
.card .more::after { content: " →"; }

/* ---------- Split rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split ul.checks { list-style: none; margin-top: 22px; }
.split ul.checks li {
  padding-left: 34px; position: relative; margin-bottom: 14px;
}
.split ul.checks li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 20px; height: 11px;
  background: var(--brand);
  clip-path: polygon(0 100%, 0 45%, 100% 0, 62% 100%);
}
.split ul.checks strong { color: var(--ink); }

/* ---------- Stats band ---------- */
.stats {
  background: var(--brand);
  color: #fff;
  padding: 72px 0;
}
.stats .grid { grid-template-columns: repeat(4, 1fr); gap: 40px; }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  font-weight: 700; letter-spacing: -0.02em;
}
.stat .lbl { color: #E3CCD1; font-size: 0.92rem; margin-top: 6px; }

/* ---------- Service detail blocks ---------- */
.service-block {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px;
  padding: 64px 0; border-top: 1px solid var(--line);
}
.service-block:first-of-type { border-top: 0; }
.service-block .steps { list-style: none; counter-reset: step; margin-top: 8px; }
.service-block .steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 44px 1fr; gap: 18px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.service-block .steps li:last-child { border-bottom: 0; }
.service-block .steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.2rem; color: var(--brand);
}
.service-block .steps h4 { font-size: 1.02rem; margin-bottom: 4px; }
.service-block .steps p { font-size: 0.93rem; }

/* ---------- Values ---------- */
.value-list { list-style: none; }
.value-list li {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  display: grid; grid-template-columns: 220px 1fr; gap: 32px;
}
.value-list li:last-child { border-bottom: 1px solid var(--line); }
.value-list h3 { font-size: 1.1rem; }

/* ---------- Clients ---------- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.clients-grid .client {
  background: #fff;
  min-height: 92px;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 16px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.08rem;
  color: #9298A0; letter-spacing: 0.01em;
  text-align: center;
  transition: color 0.2s ease;
}
.clients-grid .client:hover { color: var(--brand); }
.clients-grid .client img {
  max-height: 44px; width: auto; max-width: 150px;
  filter: grayscale(1); opacity: 0.75;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.clients-grid .client:hover img { filter: none; opacity: 1; }
@media (max-width: 960px) { .clients-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .clients-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  padding: 84px 0;
}
.cta-band h2 { color: #fff; max-width: 24ch; }
.cta-band p { color: #B9BDC4; margin: 18px 0 32px; max-width: 56ch; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; }
.contact-item { margin-bottom: 26px; }
.contact-item .k {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.contact-item .v { color: var(--ink); font-weight: 500; font-size: 1.05rem; }

form.contact { display: grid; gap: 18px; }
form.contact .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
form.contact label {
  display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink);
  margin-bottom: 6px;
}
form.contact input, form.contact textarea, form.contact select {
  width: 100%;
  font: 400 0.98rem var(--font-body);
  color: var(--ink);
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
form.contact input:focus, form.contact textarea:focus, form.contact select:focus {
  outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}
form.contact textarea { min-height: 140px; resize: vertical; }

/* ---------- Footer ---------- */
footer.site {
  background: var(--ink);
  color: #A8ACB3;
  padding: 64px 0 32px;
  font-size: 0.92rem;
}
footer.site .cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid #33373D;
}
footer.site .brand-blurb { max-width: 34ch; margin-top: 14px; }
footer.site h4 {
  color: #fff; font-size: 0.85rem; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 18px; font-weight: 600;
}
footer.site ul { list-style: none; }
footer.site li { margin-bottom: 10px; }
footer.site a { color: #A8ACB3; }
footer.site a:hover { color: #fff; }
footer.site .legal {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 28px; font-size: 0.82rem; color: #7B8087;
}
.footer-flag {
  width: 26px; height: 14px; background: var(--brand);
  clip-path: polygon(0 100%, 0 45%, 100% 0, 62% 100%);
  margin-bottom: 14px;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  section { padding: 64px 0; }
  .hero .container, .split, .contact-grid, .service-block { grid-template-columns: 1fr; gap: 44px; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .stats .grid { grid-template-columns: repeat(2, 1fr); }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  .value-list li { grid-template-columns: 1fr; gap: 8px; }

  nav.main {
    position: fixed; inset: 78px 0 auto 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start;
    padding: 24px; gap: 18px;
    transform: translateY(-130%);
    transition: transform 0.25s ease;
  }
  nav.main.open { transform: none; }
  .nav-toggle { display: block; }
}

@media (max-width: 600px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  form.contact .row2 { grid-template-columns: 1fr; }
  .topbar .contact-mini { display: none; }
  .hero { padding: 64px 0; }
}
