/* ==========================================================
   KIEN VIET CONSTRUCTION CONSULTANCY COMPANY LIMITED
   Global Stylesheet (HTML5 + CSS3)
   Theme: Navy Blue + Construction Gold
   ========================================================== */

:root {
  --navy-950: #071427;
  --navy-900: #0b1f3a;
  --navy-800: #112c52;
  --gold-500: #d6a21e;
  --gold-400: #f0c54d;
  --slate-50: #f7f9fc;
  --slate-100: #eef3f9;
  --slate-200: #dbe6f3;
  --slate-500: #5a6b82;
  --slate-700: #2c3c52;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(7, 20, 39, 0.18);
  --shadow-soft: 0 12px 28px rgba(7, 20, 39, 0.10);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1140px;
  --ring: 0 0 0 4px rgba(214, 162, 30, 0.25);

  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--navy-950);
  background: linear-gradient(180deg, var(--slate-50), #fff);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection {
  background: rgba(214, 162, 30, 0.35);
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--white);
  color: var(--navy-950);
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 9999;
}
.skip-link:focus { left: 12px; outline: none; box-shadow: var(--ring), var(--shadow); }

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(245, 248, 252, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17, 44, 82, 0.18);
  box-shadow: 0 8px 24px rgba(7, 20, 39, 0.06);
}

.topbar {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 13px;
}
.topbar a {
  color: var(--white);
  font-weight: 800;
}
.topbar a:hover { text-decoration: underline; }
.topbar-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(240,197,77,0.35);
  background: rgba(240,197,77,0.12);
  color: rgba(255,255,255,0.96);
  font-size: 12px;
  font-weight: 900;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ffffff;
  border: 2px solid rgba(7, 20, 39, 0.18);
  box-shadow: 0 10px 24px rgba(214, 162, 30, 0.2);
  padding: 6px;
  box-sizing: border-box;
  object-fit: contain;
  display: block;
}
.brand-text { display: grid; }
.brand-text strong {
  letter-spacing: 0.2px;
  font-size: 14px;
  color: var(--navy-950);
  line-height: 1.1;
}
.brand-text span {
  font-size: 12px;
  color: var(--slate-500);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--navy-900);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}
.nav-link:hover {
  background: rgba(17, 44, 82, 0.06);
  border-color: rgba(17, 44, 82, 0.10);
}
.nav-link.is-active {
  background: rgba(214, 162, 30, 0.12);
  border-color: rgba(214, 162, 30, 0.35);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { box-shadow: var(--shadow); }
.btn-outline {
  background: rgba(255,255,255,0.9);
  border-color: rgba(17, 44, 82, 0.18);
  color: var(--navy-900);
}
.btn-outline:hover { border-color: rgba(17, 44, 82, 0.32); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #1b1b1b;
  box-shadow: 0 14px 28px rgba(214, 162, 30, 0.22);
}
.btn-gold:hover { box-shadow: 0 18px 34px rgba(214, 162, 30, 0.28); }

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(17, 44, 82, 0.18);
  background: rgba(255,255,255,0.9);
  display: none;
  align-items: center;
  justify-content: center;
}
.icon-btn:focus { outline: none; box-shadow: var(--ring); }

/* Hero */
.hero {
  padding: 32px 0 14px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: stretch;
}

.hero-card {
  background: linear-gradient(135deg, rgba(7, 20, 39, 0.02), rgba(17, 44, 82, 0.04));
  border: 1px solid rgba(17, 44, 82, 0.10);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.hero-card:before {
  content: "";
  position: absolute;
  inset: -120px -120px auto auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 35% 35%, rgba(214,162,30,0.60), rgba(214,162,30,0.0) 70%);
  transform: rotate(12deg);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(214, 162, 30, 0.14);
  border: 1px solid rgba(214, 162, 30, 0.30);
  color: var(--navy-900);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold-500);
  box-shadow: 0 0 0 6px rgba(214, 162, 30, 0.18);
}

.hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.3px;
  color: var(--navy-950);
}
.hero p {
  margin: 0 0 16px;
  color: var(--slate-700);
  font-size: 15px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.hero-stats {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.stat {
  border-radius: 16px;
  padding: 12px 12px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(17, 44, 82, 0.10);
}
.stat strong {
  display: block;
  font-size: 18px;
  color: var(--navy-950);
}
.stat span {
  display: block;
  font-size: 12px;
  color: var(--slate-500);
}

.hero-aside {
  display: grid;
  gap: 12px;
}

.info-card {
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: var(--white);
  padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.info-card:before {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 35% 35%, rgba(240,197,77,0.42), rgba(240,197,77,0.0) 70%);
  transform: rotate(-8deg);
}

.info-card h3 { margin: 0 0 6px; font-size: 16px; }
.info-card p { margin: 0; opacity: 0.92; font-size: 13px; }

.ticker {
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.10);
  overflow: hidden;
}
.ticker-row {
  display: flex;
  width: max-content;
  gap: 18px;
  padding: 10px 12px;
  animation: marquee 18s linear infinite;
}
.ticker:hover .ticker-row { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2px;
}
.ticker-badge {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold-400);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Sections */
.section {
  padding: 34px 0;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.section-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.2px;
  color: var(--navy-950);
}
.section-header p {
  margin: 0;
  color: var(--slate-500);
  max-width: 62ch;
  font-size: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(17, 44, 82, 0.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.feature {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(214, 162, 30, 0.14);
  border: 1px solid rgba(214, 162, 30, 0.30);
}
.feature h3 { margin: 0; font-size: 16px; }
.feature p { margin: 0; color: var(--slate-500); font-size: 14px; }

/* Project cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(17, 44, 82, 0.10);
  background: #0b1f3a;
  box-shadow: var(--shadow-soft);
  position: relative;
  min-height: 220px;
}
.project-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(214,162,30,0.18), rgba(214,162,30,0.0) 55%),
    radial-gradient(circle at 30% 30%, rgba(240,197,77,0.20), rgba(240,197,77,0.0) 60%),
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
  transform: scale(1.02);
  transition: transform 260ms var(--ease), filter 260ms var(--ease);
}
.project-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  padding: 16px;
  background: linear-gradient(180deg, rgba(7,20,39,0.0) 0%, rgba(7,20,39,0.70) 72%, rgba(7,20,39,0.88) 100%);
}
.project-overlay h3 {
  margin: 0 0 6px;
  color: var(--white);
  font-size: 16px;
}
.project-overlay p {
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
}
.project-tag {
  display: inline-flex;
  margin-bottom: 10px;
  align-self: start;
  justify-self: start;
  background: rgba(214,162,30,0.18);
  border: 1px solid rgba(214,162,30,0.40);
  color: var(--white);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.project-card:hover .project-media {
  transform: scale(1.08);
  filter: saturate(1.05);
}
.project-card:hover { box-shadow: var(--shadow); }

/* Page hero */
.page-hero {
  padding: 24px 0 10px;
}
.page-hero-inner {
  border-radius: var(--radius);
  border: 1px solid rgba(17, 44, 82, 0.10);
  box-shadow: var(--shadow-soft);
  background:
    radial-gradient(circle at 10% 10%, rgba(214,162,30,0.18), rgba(214,162,30,0.0) 55%),
    linear-gradient(135deg, rgba(7, 20, 39, 0.02), rgba(17, 44, 82, 0.06));
  padding: 20px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--slate-500);
}
.page-hero h1 {
  margin: 10px 0 6px;
  font-size: 28px;
  letter-spacing: -0.3px;
}
.page-hero p {
  margin: 0;
  color: var(--slate-700);
  max-width: 72ch;
}

/* Forms */
.form {
  display: grid;
  gap: 12px;
}
.field {
  display: grid;
  gap: 6px;
}
label {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy-900);
}
input, textarea, select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(17, 44, 82, 0.18);
  background: rgba(255,255,255,0.92);
  font: inherit;
  color: var(--navy-950);
  transition: box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: var(--ring);
  border-color: rgba(214, 162, 30, 0.55);
}
.help {
  font-size: 12px;
  color: var(--slate-500);
}
.error {
  font-size: 12px;
  color: #b42318;
  display: none;
}
.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: rgba(180, 35, 24, 0.55);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12);
}
.field.has-error .error { display: block; }

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2000;
  max-width: min(420px, calc(100% - 28px));
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 44, 82, 0.14);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  display: none;
}
.toast.is-showing { display: block; }
.toast strong { display: block; margin-bottom: 2px; }
.toast p { margin: 0; color: var(--slate-700); font-size: 13px; }

/* Footer */
.site-footer {
  padding: 26px 0;
  border-top: 1px solid rgba(17, 44, 82, 0.10);
  background: rgba(255,255,255,0.75);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 14px;
  align-items: start;
}
.footer-grid p { margin: 8px 0 0; color: var(--slate-500); font-size: 13px; }
.footer-links {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.footer-links a {
  color: var(--navy-900);
  font-weight: 700;
  font-size: 13px;
}
.footer-links a:hover { text-decoration: underline; }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Utilities */
.muted { color: var(--slate-500); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 44, 82, 0.12);
  background: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 800;
}

/* Project detail */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 44, 82, 0.12);
  background: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 800;
  color: var(--navy-900);
}
.chip--gold {
  background: rgba(214, 162, 30, 0.14);
  border-color: rgba(214, 162, 30, 0.30);
}
.chip--navy {
  background: rgba(17, 44, 82, 0.08);
  border-color: rgba(17, 44, 82, 0.18);
}
.chip--ok {
  background: rgba(20, 174, 92, 0.10);
  border-color: rgba(20, 174, 92, 0.22);
}
.chip--warn {
  background: rgba(214, 162, 30, 0.14);
  border-color: rgba(214, 162, 30, 0.30);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}
.detail-cover {
  height: 220px;
  border-radius: 16px;
  border: 1px solid rgba(17, 44, 82, 0.10);
  background:
    linear-gradient(135deg, rgba(214,162,30,0.18), rgba(214,162,30,0.0) 55%),
    radial-gradient(circle at 30% 30%, rgba(240,197,77,0.20), rgba(240,197,77,0.0) 60%),
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
}

.kv-table {
  display: grid;
  gap: 10px;
}
.kv-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(17, 44, 82, 0.10);
}
.kv-key {
  font-weight: 900;
  color: var(--navy-900);
  font-size: 13px;
}
.kv-val {
  color: var(--slate-700);
  font-size: 13px;
}

.kv-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy-900);
}

.bullets {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--slate-700);
}
.bullets li { margin: 6px 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.gallery-item {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(17, 44, 82, 0.10);
  background: rgba(255,255,255,0.75);
}
.gallery-media {
  height: 160px;
  background:
    linear-gradient(135deg, rgba(214,162,30,0.18), rgba(214,162,30,0.0) 55%),
    radial-gradient(circle at 30% 30%, rgba(240,197,77,0.20), rgba(240,197,77,0.0) 60%),
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
  transition: transform 260ms var(--ease);
}
.gallery-item:hover .gallery-media { transform: scale(1.05); }
.gallery-caption {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--slate-700);
}

.detail-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .icon-btn { display: inline-flex; }
  .nav {
    position: relative;
  }
  .nav-links {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(280px, calc(100vw - 32px));
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(17, 44, 82, 0.12);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-cta { display: none; }

  .section-header { flex-direction: column; align-items: flex-start; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .kv-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; }
  .ticker-row { animation: none; }
  .btn, .nav-link, .project-media { transition: none; }
}
