/* ============================================
   QTC SI — Smart Infrastructure
   Shared Design System
   ============================================ */
:root {
  --ink: #0A1628;
  --ink-2: #102236;
  --ink-3: #1B2F47;
  --paper: #F5F2EC;
  --paper-2: #ECE7DC;
  --rule: #D9D2C2;
  /* Accent màu khớp với logo QTC (gradient từ cyan sáng → navy) */
  --accent: #3DA9FC;
  --accent-deep: #1E5A9F;
  --accent-bright: #62D0FF;
  --accent-2: #FF6B35;
  --muted: #6B7280;
  --gold: #C8A56A;
  --success: #10B981;
  --danger: #EF4444;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max: 1280px;
  --pad-x: clamp(20px, 5vw, 60px);
  --nav-h: 78px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }

/* ============================================
   NAVIGATION (shared all pages)
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 242, 236, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, padding .3s ease;
  min-height: var(--nav-h);
}
.nav.scrolled {
  border-bottom-color: var(--rule);
  padding-top: 10px;
  padding-bottom: 10px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-brand img {
  height: 44px;
  width: auto;
  transition: height .25s;
}
.nav.scrolled .nav-brand img { height: 38px; }

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  position: relative;
  transition: color .2s;
  color: var(--ink-3);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
  color: var(--ink);
  position: relative;
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
}
.nav-cta {
  padding: 11px 22px !important;
  background: var(--ink);
  color: var(--paper) !important;
  font-size: 13px;
  margin-left: 12px;
  transition: background .2s !important;
}
.nav-cta:hover { background: var(--accent-deep); color: var(--paper) !important; }
.nav-cta.active::after { display: none; }

.menu-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    padding: 30px var(--pad-x);
    gap: 6px;
    border-bottom: 1px solid var(--rule);
    transform: translateY(-120%);
    transition: transform .35s ease;
    align-items: stretch;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 0; font-size: 16px; }
  .nav-links a.active::after { left: 0; right: auto; width: 30px; bottom: 6px; }
  .nav-cta { margin-left: 0; margin-top: 14px; text-align: center; }
  .menu-toggle {
    display: grid; place-items: center;
    width: 42px; height: 42px;
    border: 1px solid var(--ink);
    background: transparent;
    cursor: pointer;
  }
  .menu-toggle span {
    display: block;
    width: 18px; height: 1.5px;
    background: var(--ink);
    position: relative;
  }
  .menu-toggle span::before,
  .menu-toggle span::after {
    content: ''; position: absolute; left: 0; width: 18px; height: 1.5px;
    background: var(--ink);
    transition: transform .25s;
  }
  .menu-toggle span::before { top: -6px; }
  .menu-toggle span::after { top: 6px; }
}

/* ============================================
   PAGE HEADER (inner pages only)
   ============================================ */
.page-header {
  padding: calc(var(--nav-h) + 80px) var(--pad-x) 80px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
.page-header-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(10,22,40,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,22,40,0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 80% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 50%, black 20%, transparent 70%);
  pointer-events: none;
}
.page-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 30px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--rule); }
.breadcrumb .current { color: var(--accent-deep); }

.page-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 900px;
}
.page-title em { font-style: italic; }
.page-title .accent-word {
  position: relative;
  display: inline-block;
}
.page-title .accent-word::after {
  content: '';
  position: absolute;
  bottom: 0.1em; left: 0; right: 0;
  height: 6px;
  background: var(--accent);
  opacity: 0.5;
  z-index: -1;
}
.page-lede {
  max-width: 680px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* ============================================
   SECTION BASE
   ============================================ */
.section {
  padding: 100px var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}
.section-wide {
  padding: 100px var(--pad-x);
  max-width: none;
  margin: 0;
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-tag::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--ink);
}
.services .section-tag,
.contact-page .section-tag,
.dark-section .section-tag {
  color: rgba(245,242,236,0.5);
}
.services .section-tag::before,
.contact-page .section-tag::before,
.dark-section .section-tag::before {
  background: var(--accent);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
  max-width: 900px;
}
.section-title em { font-style: italic; }
.section-intro {
  max-width: 680px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-3);
  margin-bottom: 50px;
}
.dark-section .section-title { color: var(--paper); }
.dark-section .section-intro { color: rgba(245,242,236,0.7); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary, .btn-ghost, .btn-accent {
  padding: 15px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all .25s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-accent {
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
}
.btn-accent:hover { background: var(--accent-bright); }
.btn-primary svg, .btn-ghost svg, .btn-accent svg { transition: transform .25s; }
.btn-primary:hover svg, .btn-ghost:hover svg, .btn-accent:hover svg { transform: translateX(4px); }

/* ============================================
   FOOTER (shared all pages)
   ============================================ */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px var(--pad-x) 30px;
  position: relative;
  overflow: hidden;
}
.footer-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 20% 100%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 20% 100%, black 0%, transparent 70%);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-brand img {
  height: 56px;
  width: auto;
  margin-bottom: 22px;
  filter: brightness(0) invert(1);
}
.footer-brand p {
  font-size: 14px;
  color: rgba(245,242,236,0.65);
  line-height: 1.6;
  max-width: 320px;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14px;
  color: rgba(245,242,236,0.75);
  transition: color .2s, padding-left .2s;
  display: inline-block;
}
.footer-col a:hover { color: var(--accent); padding-left: 4px; }
.footer-col p {
  font-size: 14px;
  color: rgba(245,242,236,0.75);
  margin-bottom: 10px;
  line-height: 1.55;
}
.footer-col p a:hover { color: var(--accent); padding-left: 0; }

.footer-bottom {
  border-top: 1px solid rgba(245,242,236,0.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(245,242,236,0.5);
  letter-spacing: 0.05em;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom-meta { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================
   FLOATING CONTACT BUTTONS
   Cố định góc dưới-phải. Hiện trên mọi page.
   Tùy chỉnh số điện thoại / Zalo trong assets/script.js
   ============================================ */
.float-contact {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}
.float-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  position: relative;
  box-shadow: 0 8px 24px -6px rgba(10,22,40,0.35);
  transition: transform .25s ease, box-shadow .25s ease, width .3s ease;
  overflow: hidden;
}
.float-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 32px -8px rgba(10,22,40,0.5);
}
.float-btn svg { width: 26px; height: 26px; position: relative; z-index: 2; }
.float-btn-call {
  background: linear-gradient(135deg, #1E5A9F 0%, #0A1628 100%);
}
.float-btn-zalo {
  background: #0068FF; /* Màu xanh đặc trưng của Zalo */
}
/* Pulsing ring để thu hút sự chú ý */
.float-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: float-pulse 2.4s ease-out infinite;
  z-index: 1;
  opacity: 0;
}
.float-btn-call::before { background: #1E5A9F; }
.float-btn-zalo::before { background: #0068FF; }
@keyframes float-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
/* Tooltip hiện khi hover (desktop only) */
.float-btn-tip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.float-btn-tip::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--ink);
}
.float-btn:hover .float-btn-tip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
/* Mobile: nhỏ hơn, sát lề hơn, ẩn tooltip */
@media (max-width: 600px) {
  .float-contact { right: 16px; bottom: 16px; gap: 12px; }
  .float-btn { width: 52px; height: 52px; }
  .float-btn svg { width: 24px; height: 24px; }
  .float-btn-tip { display: none; }
}

/* ============================================
   UTILITY
   ============================================ */
.placeholder-img {
  background:
    linear-gradient(135deg, var(--ink-2) 0%, var(--ink) 100%);
  position: relative;
  overflow: hidden;
}
.placeholder-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(61,169,252,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(61,169,252,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}
.placeholder-img::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(245,242,236,0.4);
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
}
