/* =============================================================
   KhanhNQ Digital Solutions — Hệ thống giao diện
   Bảng màu thương hiệu: Cream #FFF8E7 · Blue #3B6F8F · Wine #7A1F32
   Vai trò: Cream — nền canvas | Blue — cấu trúc & niềm tin
            | Wine — hành động & điểm nhấn
   ============================================================= */

/* ---------------------------------------------------------
   1. Tokens
   --------------------------------------------------------- */
:root {
  /* Surfaces (cream canvas) */
  --bg:            #FFF8E7;
  --bg-2:          #FBEED6;
  --bg-3:          #F7E8CE;
  --bg-elev:       #FFFFFF;
  --surface:       rgba(255, 248, 231, 0.55);
  --surface-2:     rgba(255, 255, 255, 0.66);
  --surface-solid: #FFFFFF;

  /* Text (warm ink tông màu đất cho nền kem) */
  --text:      #251D1E;
  --text-2:    #46383A;
  --text-3:    #6E5E60;
  --text-4:    #988789;

  /* Blue — cấu trúc, liên kết, niềm tin */
  --accent:      #3B6F8F;
  --accent-soft: rgba(59, 111, 143, 0.09);
  --accent-2:    #6E9CB8;
  --accent-grad: linear-gradient(120deg, #3B6F8F 0%, #7A1F32 100%);
  --accent-glow: rgba(59, 111, 143, 0.20);

  /* Wine — hành động, CTA, điểm nhấn */
  --wine:        #7A1F32;
  --wine-soft:   rgba(122, 31, 50, 0.09);
  --wine-glow:   rgba(122, 31, 50, 0.28);
  --wine-grad:   linear-gradient(120deg, #7A1F32 0%, #5E1428 100%);

  /* Lines (ấm) */
  --line:        rgba(70, 56, 58, 0.12);
  --line-2:      rgba(70, 56, 58, 0.18);
  --line-accent: rgba(59, 111, 143, 0.30);

  /* Status */
  --ok:   #3Fa96b;
  --warn: #C77B1E;
  --err:  #7A1F32;

  /* Layout */
  --container: 1240px;
  --container-narrow: 860px;
  --gutter: 24px;
  --section-y: clamp(40px, 4.6vw, 68px);
  --section-y-tight: clamp(32px, 3.8vw, 54px);

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.32s;

  /* Shadow (ấm, theo tông màu) */
  --shadow-sm: 0 1px 3px rgba(70, 56, 58, 0.08);
  --shadow-md: 0 14px 34px -14px rgba(70, 56, 58, 0.30);
  --shadow-lg: 0 34px 70px -30px rgba(70, 56, 58, 0.42);
  --shadow-accent: 0 18px 48px -20px rgba(59, 111, 143, 0.40);
  --shadow-wine: 0 18px 48px -18px rgba(122, 31, 50, 0.45);

  /* Header */
  --header-h: 76px;
}

/* ---------------------------------------------------------
   2. Reset
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background: #FFF8E7;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #FFF8E7 0%, #FFF8E7 60%, #FBEED6 100%);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4, h5 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(1.8rem,1.2rem+2.6vw,2.8rem); letter-spacing: -0.032em; }
h2 { font-size: clamp(1.35rem,1rem+1.8vw,2rem); letter-spacing: -0.028em; }
h3 { font-size: clamp(1.05rem, 0.98rem + 0.6vw, 1.25rem); }
h4 { font-size: 1.06rem; }

p  { margin: 0 0 1.1em; color: var(--text-2); }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--accent); }

img, svg, video { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.hero :focus-visible, .page-hero :focus-visible,
.section--blue :focus-visible, .section--alt :focus-visible {
  outline-color: #FFF8E7;
}

::selection { background: rgba(122, 31, 50, 0.18); color: #fff; }

.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }

/* ---------------------------------------------------------
   3. Layout helpers
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: var(--section-y-tight); }
.section--alt {
  position: relative;
  background: #3B6F8F;
  overflow: hidden;
}
.section--tint { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }

/* Nhịp xen kẽ: nền xanh blue giữ bản sắc — nội dung tổng thể trên nền kem */
.section--blue {
  position: relative;
  background: #3B6F8F;
  overflow: hidden;
}
.section--blue::after,
.section--alt::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(640px 420px at 88% -10%, rgba(255, 248, 231, 0.10), transparent 62%),
    radial-gradient(560px 420px at 6% 110%, rgba(122, 31, 50, 0.16), transparent 62%);
}
.section--blue > *,
.section--alt > * { position: relative; z-index: 1; }

.section-head { max-width: 760px; margin-bottom: clamp(22px, 3vw, 38px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--split {
  display: flex; gap: 28px; align-items: flex-end; justify-content: space-between;
  max-width: none; flex-wrap: wrap;
}
.section-head__title { margin-bottom: 12px; color: var(--wine); }
.section-head__text { font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem); }

/* Trên nền xanh: tiêu đề, các phần tử chính chuyển tông kem để tương phản */
.section--blue .section-head__title,
.section--alt .section-head__title,
.section--blue .page-hero__title,
.section--blue .timeline__title,
.section--alt .timeline__title { color: #FFF8E7; }
.section--blue .section-head__text,
.section--alt .section-head__text { color: rgba(255, 248, 231, 0.86); }
.section--blue .eyebrow,
.section--alt .eyebrow { color: #FFF8E7; }
.section--blue .eyebrow::before,
.section--alt .eyebrow::before,
.section--blue .eyebrow--center::after,
.section--alt .eyebrow--center::after { background: linear-gradient(90deg, transparent, #FFF8E7); }
.section--blue .section-head .btn--ghost,
.section--alt .section-head .btn--ghost {
  --btn-bg: #FFF8E7;
  --btn-color: var(--wine);
  --btn-border: transparent;
}
.section--blue .section-head .btn--ghost:hover,
.section--alt .section-head .btn--ghost:hover { --btn-bg: #FFFFFF; box-shadow: 0 18px 44px -18px rgba(22, 52, 70, 0.55); }

/* Trên nền xanh: các card chuyển thành mặt trắng để giữ độ đọc rõ */
.hero, .page-hero, .section--blue, .section--alt {
  --surface: rgba(255, 255, 255, 0.97);
  --surface-2: rgba(255, 255, 255, 0.9);
  --surface-solid: #FFFFFF;
  --line: rgba(255, 248, 231, 0.20);
  --line-2: rgba(255, 248, 231, 0.30);
  --line-accent: rgba(255, 248, 231, 0.4);
}
.section--blue :is(.svc-card, .pain-card, .proj-card, .price-card, .ai-card,
                   .testi-card, .post-card, .example-item, .flowchain__item,
                   .stat-card, .empty-state, .side-card, .faq-item)
  { box-shadow: 0 18px 44px -22px rgba(22, 52, 70, 0.55); }
.section--blue :is(.pain-card, .svc-card, .proj-card, .price-card, .ai-card,
                   .testi-card, .post-card, .example-item, .flowchain__item, .stat-card):hover
  { box-shadow: var(--shadow-lg); }
.section--blue .notice { background: rgba(255, 248, 231, 0.14); color: #FFF8E7; }
.section--blue .notice .icon { color: #FFF8E7; }

/* flowchain trên nền xanh: card trắng sáng, nhãn/wine để không chìm màu */
.section--blue .flowchain__item,
.section--alt .flowchain__item { background: rgba(255, 255, 255, 0.97); }
.section--blue .flowchain__item .sysnode__meta,
.section--alt .flowchain__item .sysnode__meta { color: var(--text-4); }
.section--blue .flowchain__item--accent,
.section--alt .flowchain__item--accent {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(122, 31, 50, 0.35);
}
.section--blue .flowchain__item--accent .flowchain__label,
.section--alt .flowchain__item--accent .flowchain__label { color: var(--wine); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ''; width: 26px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent));
  border-radius: 2px;
}
.eyebrow--center::after {
  content: ''; width: 26px; height: 2px;
  background: linear-gradient(270deg, transparent, var(--accent));
  border-radius: 2px;
}

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

.text-accent { color: var(--accent); }
.text-wine { color: var(--wine); }
.text-gradient {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff;
  padding: 12px 20px; border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------------------------------------------------------
   4. Background decoration
   --------------------------------------------------------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 111, 143, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 111, 143, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
}
.bg-noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.03; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-glow {
  position: absolute; border-radius: 50%;
  filter: blur(120px); pointer-events: none; z-index: -1;
}
.bg-glow--a {
  width: 620px; height: 620px; top: -220px; right: -160px;
  background: radial-gradient(circle, rgba(59, 111, 143, 0.18), transparent 68%);
}
.bg-glow--b {
  width: 540px; height: 540px; bottom: -200px; left: -180px;
  background: radial-gradient(circle, rgba(122, 31, 50, 0.14), transparent 68%);
}

/* ---------------------------------------------------------
   5. Buttons
   --------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-color: var(--text);
  --btn-border: var(--line-2);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em;
  color: var(--btn-color);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); color: var(--btn-color); }
.btn:active { transform: translateY(0); }
.btn .icon { transition: transform var(--dur) var(--ease); }
.btn:hover .icon { transform: translateX(3px); }

.btn--primary {
  --btn-bg: var(--wine-grad);
  --btn-color: #FFF8E7;
  --btn-border: transparent;
  box-shadow: var(--shadow-wine);
}
.btn--primary::before {
  content: ''; position: absolute; top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 248, 231, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s var(--ease-out);
}
.btn--primary:hover::before { left: 130%; }
.btn--primary:hover { --btn-bg: linear-gradient(120deg, #8A2539 0%, #7A1F32 55%, #5E1428 100%); box-shadow: 0 22px 54px -18px rgba(122, 31, 50, 0.55); }

.btn--blue {
  --btn-bg: var(--accent);
  --btn-color: #FFF8E7;
  --btn-border: transparent;
  box-shadow: var(--shadow-accent);
}
.btn--blue:hover { --btn-bg: #335F7B; box-shadow: 0 22px 54px -18px rgba(59, 111, 143, 0.55); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-border: var(--line-2);
}
.btn--ghost:hover {
  --btn-bg: rgba(255, 255, 255, 0.7);
  --btn-border: var(--line-accent);
  box-shadow: var(--shadow-sm);
}

.btn--outline-accent {
  --btn-bg: transparent;
  --btn-border: var(--line-accent);
  --btn-color: var(--accent);
}
.btn--outline-accent:hover { --btn-bg: var(--accent-soft); }

.btn--outline-wine {
  --btn-bg: transparent;
  --btn-border: rgba(122, 31, 50, 0.35);
  --btn-color: var(--wine);
}
.btn--outline-wine:hover { --btn-bg: var(--wine-soft); box-shadow: var(--shadow-wine); }

.btn--sm { padding: 10px 18px; font-size: 0.87rem; }
.btn--lg { padding: 17px 32px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn__arrow { transition: transform var(--dur) var(--ease); }

/* Text link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.94rem; color: var(--text);
}
.link-arrow .icon { width: 18px; height: 18px; color: var(--accent); transition: transform var(--dur) var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------------------------------------------------------
   6. Header (cream glass)
   --------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 90;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(255, 248, 231, 0.82);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: height var(--dur) var(--ease), background var(--dur) var(--ease),
              border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header a:not(.btn) { color: var(--text-2); }
.site-header.is-stuck {
  height: 64px;
  background: rgba(255, 248, 231, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 40px -24px rgba(70, 56, 58, 0.35);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; width: 100%;
}
.site-header__progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: transparent;
}
.site-header__progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #3B6F8F, #7A1F32);
  box-shadow: 0 0 12px rgba(122, 31, 50, 0.35);
  transition: width 0.1s linear;
}

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
 .brand__mark{width:38px;height:38px;border-radius:10px;background:var(--accent-grad);display:flex;align-items:center;justify-content:center;color:#fff}.brand__mark svg{width:100%;height:100%}
 .brand__logo{width:auto;height:auto;max-height:54px;max-width:280px;object-fit:contain;display:block;flex:none}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-family: 'Manrope', sans-serif; font-weight: 800;
  font-size: 1.06rem; letter-spacing: -0.02em; color: var(--text);
}
.brand__tagline {
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.brand:hover .brand__name { color: var(--accent); }

/* Desktop nav */
.site-nav { display: flex; align-items: center; }
.site-nav__list { display: flex; align-items: center; gap: 4px; }
.site-nav__item { position: relative; }
.site-nav__link {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 14px;
  font-size: 0.9rem; font-weight: 500; color: var(--text-2);
  border-radius: var(--r-sm);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.site-nav__link::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 1px; background: var(--wine);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.site-nav__link:hover { color: var(--wine); }
.site-nav__link:hover::after, .site-nav__link.is-active::after { transform: scaleX(1); }
.site-nav__link.is-active { color: var(--wine); }
.site-nav__chevron { width: 13px; height: 13px; opacity: 0.55; transition: transform var(--dur) var(--ease); }
.site-nav__item:hover .site-nav__chevron { transform: rotate(180deg); }

/* Dropdown (light cream panel) */
.site-nav__dropdown {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translate(-50%, 8px);
  min-width: 380px; padding: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.site-nav__item:hover .site-nav__dropdown,
.site-nav__item:focus-within .site-nav__dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0);
}
.site-nav__dropdown::before {
  content: ''; position: absolute; inset: -12px 0 auto; height: 12px;
}
.site-nav__sublist { display: grid; gap: 2px; }
.site-nav__sublink {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 12px; border-radius: var(--r-md);
  transition: background var(--dur) var(--ease);
}
.site-nav__sublink:hover { background: var(--accent-soft); color: inherit; }
.site-nav__subicon {
  width: 32px; height: 32px; flex: none; padding: 7px;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(59, 111, 143, 0.20); border-radius: var(--r-sm);
}
.site-nav__sublink strong {
  display: block; font-size: 0.9rem; font-weight: 600; color: var(--text);
}
.site-nav__sublink:hover strong { color: var(--accent); }
.site-nav__sublink em {
  display: block; font-style: normal; font-size: 0.79rem;
  color: var(--text-3); line-height: 1.5; margin-top: 2px;
}
.site-nav__mobile-actions { display: none; }

/* Header actions */
.site-header__actions { display: flex; align-items: center; gap: 14px; flex: none; }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.88rem; font-weight: 600; color: var(--text-2);
}
.header-phone .icon { width: 16px; height: 16px; color: var(--accent); }
.header-phone:hover { color: var(--wine); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.5);
}
.nav-toggle__bars { display: block; width: 18px; height: 12px; position: relative; }
.nav-toggle__bars i {
  position: absolute; left: 0; right: 0; height: 1.6px;
  background: var(--text); border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle__bars i:nth-child(1) { top: 0; }
.nav-toggle__bars i:nth-child(2) { top: 5px; }
.nav-toggle__bars i:nth-child(3) { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(70, 56, 58, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.nav-overlay.is-open { opacity: 1; }

/* Floating call button (mobile) */
.fab-call {
  position: fixed; right: 16px; bottom: 16px; z-index: 70;
  display: none; align-items: center; gap: 9px;
  padding: 13px 20px;
  background: var(--wine-grad); color: #FFF8E7;
  font-weight: 700; font-size: 0.88rem;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-wine);
}
.fab-call:hover { color: #FFF8E7; transform: translateY(-2px); box-shadow: 0 22px 54px -18px rgba(122, 31, 50, 0.6); }

/* Flash messages */
.flash-wrap { position: relative; z-index: 60; padding-top: calc(var(--header-h) + 20px); }
.flash {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  animation: slideDown 0.4s var(--ease-out);
}
.flash p { margin: 0; font-size: 0.92rem; color: var(--text); flex: 1; }
.flash__icon { width: 20px; height: 20px; margin-top: 1px; }
.flash--success { border-left: 3px solid var(--ok); }
.flash--success .flash__icon { color: var(--ok); }
.flash--error { border-left: 3px solid var(--wine); }
.flash--error .flash__icon { color: var(--wine); }
.flash--info { border-left: 3px solid var(--accent); }
.flash--info .flash__icon { color: var(--accent); }
.flash__close { color: var(--text-3); padding: 2px; line-height: 0; }
.flash__close:hover { color: var(--text); }
.flash__close .icon { width: 16px; height: 16px; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------
   7. Page hero (nền xanh thương hiệu)
   --------------------------------------------------------- */
.page-hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(40px, 5.5vw, 76px));
  padding-bottom: clamp(34px, 4.2vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(720px 520px at 92% -12%, rgba(255, 248, 231, 0.12), transparent 60%),
    radial-gradient(600px 460px at 0% 120%, rgba(122, 31, 50, 0.18), transparent 62%),
    #3B6F8F;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, rgba(255, 248, 231, 0.5), rgba(122, 31, 50, 0.7));
  opacity: 0.75;
}
.page-hero__inner { position: relative; z-index: 1; max-width: 860px; }
.page-hero__title { margin-bottom: 20px; color: #FFF8E7; }
.page-hero__subtitle {
  font-size: clamp(1.02rem, 0.97rem + 0.35vw, 1.2rem);
  color: rgba(255, 248, 231, 0.88); max-width: 720px; line-height: 1.7;
}
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.page-hero .eyebrow { color: #FFF8E7; margin-bottom: 16px; }
.page-hero .eyebrow::before,
.page-hero .eyebrow--center::after { background: linear-gradient(90deg, transparent, #FFF8E7); }
.page-hero .btn--ghost {
  --btn-bg: #FFF8E7;
  --btn-color: var(--wine);
  --btn-border: transparent;
  box-shadow: 0 14px 34px -18px rgba(22, 52, 70, 0.5);
}
.page-hero .btn--ghost:hover { --btn-bg: #FFFFFF; }

.breadcrumb { margin-bottom: 20px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.82rem; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; color: rgba(255, 248, 231, 0.72); }
.breadcrumb a { color: rgba(255, 248, 231, 0.92); }
.breadcrumb a:hover { color: #FFF8E7; }
.breadcrumb__sep { color: rgba(255, 248, 231, 0.5); }
.breadcrumb [aria-current="page"] { color: #FFF8E7; }

/* ---------------------------------------------------------
   8. Cards
   --------------------------------------------------------- */
.card {
  position: relative;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover {
  border-color: var(--line-accent);
  background: var(--surface-2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card__title { margin-bottom: 10px; }
.card__text { font-size: 0.94rem; color: var(--text-2); margin: 0; }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: 18px;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(59, 111, 143, 0.18); border-radius: var(--r-md);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card__icon .icon { width: 22px; height: 22px; }
.card:hover .card__icon { box-shadow: var(--shadow-accent); transform: translateY(-2px); }
.card__index {
  position: absolute; top: 22px; right: 24px;
  font-family: 'Manrope', sans-serif; font-size: 0.82rem; font-weight: 700;
  color: var(--text-4); letter-spacing: 0.06em;
}

.card--link::after { content: ''; position: absolute; inset: 0; }

/* ---------------------------------------------------------
   9. Badges / chips
   --------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
}
.badge--accent { color: var(--accent); background: var(--accent-soft); border-color: rgba(59, 111, 143, 0.25); }
.badge--wine { color: var(--wine); background: var(--wine-soft); border-color: rgba(122, 31, 50, 0.25); }
.badge__dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--wine);
  box-shadow: 0 0 0 0 var(--wine-glow);
  animation: pulseDot 2.4s infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(122, 31, 50, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(122, 31, 50, 0); }
  100% { box-shadow: 0 0 0 0 rgba(122, 31, 50, 0); }
}

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px;
  font-size: 0.79rem; color: var(--text-2);
  background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.tag .icon { width: 13px; height: 13px; color: var(--accent); }

/* ---------------------------------------------------------
   10. Lists
   --------------------------------------------------------- */
.check-list { display: grid; gap: 11px; }
.check-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 0.94rem; color: var(--text-2); }
.check-list .icon { width: 18px; height: 18px; color: var(--accent); margin-top: 3px; flex: none; }
.check-list--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

.num-list { display: grid; gap: 12px; counter-reset: n; }
.num-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 0.93rem; color: var(--text-2);
}
.num-list li::before {
  counter-increment: n; content: counter(n, decimal-leading-zero);
  font-family: 'Manrope', sans-serif; font-size: 0.74rem; font-weight: 700;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(59, 111, 143, 0.20);
  border-radius: var(--r-xs);
  padding: 3px 7px; flex: none; margin-top: 2px;
}

/* ---------------------------------------------------------
   11. Quotes / callouts
   --------------------------------------------------------- */
.quote-block {
  position: relative;
  padding: 28px 30px 28px 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--wine);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.quote-block p {
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.16rem);
  color: var(--text); font-weight: 500; line-height: 1.62; margin: 0;
}

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px;
  font-size: 0.9rem; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.notice .icon { color: var(--accent); flex: none; margin-top: 2px; }

/* ---------------------------------------------------------
   12. Forms
   --------------------------------------------------------- */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(12, minmax(0,1fr)); }
.field { grid-column: span 12; display: flex; flex-direction: column; gap: 8px; }
.field--6 { grid-column: span 6; }
.field--4 { grid-column: span 4; }
.field--8 { grid-column: span 8; }

.field__label {
  font-size: 0.86rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.field__label .req { color: var(--wine); }
.field__hint { font-size: 0.78rem; color: var(--text-3); }

.input, .select, .textarea {
  width: 100%;
  padding: 13px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  font-size: 0.94rem;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(59, 111, 143, 0.40); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(59, 111, 143, 0.12);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236E5E60' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.select option { background: var(--surface-solid); color: var(--text); }

.checkbox {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 0.89rem; color: var(--text-2); cursor: pointer;
}
.checkbox input[type="checkbox"] {
  appearance: none;
  width: 20px; height: 20px; flex: none; margin-top: 1px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.checkbox input[type="checkbox"]:hover { border-color: var(--line-accent); }
.checkbox input[type="checkbox"]:checked {
  background: var(--accent-grad);
  border-color: transparent;
  background-image: var(--accent-grad), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFF8E7' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  background-size: cover, 12px 12px;
  background-position: center, center;
  background-repeat: no-repeat;
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------
   13. Pagination
   --------------------------------------------------------- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 48px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 12px;
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: all var(--dur) var(--ease);
}
.pagination a:hover { color: var(--text); border-color: var(--line-accent); background: var(--surface-2); transform: translateY(-2px); }
.pagination .is-current { color: #FFF8E7; background: var(--accent-grad); border-color: transparent; }
.pagination .is-disabled { opacity: 0.35; pointer-events: none; }

/* ---------------------------------------------------------
   14. Prose (nội dung bài viết, dịch vụ)
   --------------------------------------------------------- */
.prose { color: var(--text-2); font-size: 1.02rem; line-height: 1.78; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.35rem,1rem+1.8vw,2rem);  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); margin-top: 1.9em; color: var(--text); }
.prose h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); margin-top: 1.6em; color: var(--text); }
.prose h4 { margin-top: 1.4em; color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { display: grid; gap: 10px; padding-left: 0; }
.prose ul li { position: relative; padding-left: 26px; }
.prose ul li::before {
  content: ''; position: absolute; left: 4px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
}
.prose ol { counter-reset: prose-n; }
.prose ol li { position: relative; padding-left: 32px; counter-increment: prose-n; }
.prose ol li::before {
  content: counter(prose-n) '.'; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}
.prose blockquote {
  margin: 1.6em 0; padding: 18px 22px;
  border-left: 2px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text); font-size: 1.05rem;
}
.prose img { border-radius: var(--r-md); border: 1px solid var(--line); margin-block: 1.6em; }
.prose figure { margin: 1.8em 0; }
.prose figcaption { font-size: 0.82rem; color: var(--text-3); text-align: center; margin-top: 10px; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em; padding: 2px 6px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-xs);
  color: var(--accent);
}
.prose pre {
  padding: 18px 20px; overflow-x: auto;
  background: var(--surface-solid); border: 1px solid var(--line-2);
  border-radius: var(--r-md); font-size: 0.86rem; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; color: var(--text-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.prose th, .prose td { padding: 12px 14px; text-align: left; border: 1px solid var(--line); }
.prose th { color: var(--text); background: var(--surface-2); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.2em; }

/* ---------------------------------------------------------
   15. CTA band
   --------------------------------------------------------- */
.cta-band {
  position: relative; overflow: hidden;
  padding: clamp(30px, 4vw, 50px);
  background: linear-gradient(125deg, #3B6F8F 0%, #2E5670 45%, #7A1F32 100%);
  border: 1px solid rgba(255, 248, 231, 0.16);
  border-radius: var(--r-xl);
  text-align: center;
  box-shadow: 0 34px 80px -42px rgba(122, 31, 50, 0.65);
}
/* Khi CTA nằm trong section nền xanh: band chuyển thành "thẻ kem" nổi bật */
.section--blue .cta-band {
  background: linear-gradient(135deg, #FFF8E7 0%, #FFF2D9 100%);
  border-color: rgba(255, 248, 231, 0.55);
  box-shadow: 0 34px 80px -40px rgba(22, 52, 70, 0.6);
}
.section--blue .cta-band .eyebrow { color: var(--accent); }
.section--blue .cta-band .eyebrow::before,
.section--blue .cta-band .eyebrow::after { background: linear-gradient(90deg, transparent, var(--accent)); }
.section--blue .cta-band .cta-band__title { color: var(--wine); }
.section--blue .cta-band .cta-band__text { color: var(--text-2); }
.section--blue .cta-band::before {
  background: radial-gradient(circle, rgba(59, 111, 143, 0.16), transparent 68%);
}
.section--blue .cta-band::after {
  background: radial-gradient(circle, rgba(122, 31, 50, 0.14), transparent 66%);
}
.cta-band .eyebrow { color: rgba(255, 248, 231, 0.9); }
.cta-band .eyebrow::before,
.cta-band .eyebrow::after { background: linear-gradient(90deg, transparent, rgba(255, 248, 231, 0.8)); }
.cta-band__title,
.cta-band__text { color: #FFF8E7; }
.cta-band__title { margin-bottom: 16px; }
.cta-band__text { max-width: 620px; margin: 0 auto 30px; font-size: 1.04rem; opacity: 0.92; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta-band .btn--ghost {
  --btn-color: #FFF8E7;
  --btn-border: rgba(255, 248, 231, 0.42);
  box-shadow: none;
}
.cta-band .btn--ghost:hover { --btn-bg: rgba(255, 248, 231, 0.14); --btn-border: rgba(255, 248, 231, 0.75); box-shadow: none; }
.section--blue .cta-band .btn--ghost {
  --btn-color: var(--wine);
  --btn-border: rgba(122, 31, 50, 0.4);
}
.section--blue .cta-band .btn--ghost:hover { --btn-bg: rgba(122, 31, 50, 0.08); --btn-border: rgba(122, 31, 50, 0.6); }
.cta-band::before {
  content: ''; position: absolute; width: 480px; height: 480px;
  right: -140px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 231, 0.25), transparent 66%);
  filter: blur(50px);
}
.cta-band::after {
  content: ''; position: absolute; width: 420px; height: 420px;
  left: -160px; bottom: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 231, 0.14), transparent 66%);
  filter: blur(60px);
}

/* ---------------------------------------------------------
   16. Animations (scroll reveal)
   --------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal="left"]  { transform: translateX(-30px); }
[data-reveal="right"] { transform: translateX(30px); }
[data-reveal="scale"] { transform: scale(0.96); }
[data-reveal="fade"]  { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .bg-grid, .bg-noise { display: none; }
}

/* ---------------------------------------------------------
   17. Responsive
   --------------------------------------------------------- */
@media (max-width: 1080px) {
  .header-phone { display: none; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 960px) {
  :root { --gutter: 20px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed; inset: 0 0 0 auto;
    width: min(360px, 88vw);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: calc(var(--header-h) + 20px) 20px 28px;
    background: rgba(255, 248, 231, 0.985);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--line-2);
    box-shadow: -30px 0 60px -30px rgba(70, 56, 58, 0.45);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s var(--ease-out), visibility 0.4s;
    overflow-y: auto;
    z-index: 85;
  }
  .site-nav.is-open { transform: translateX(0); visibility: visible; }

  .site-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav__link {
    justify-content: space-between; width: 100%;
    padding: 14px 12px; font-size: 1rem;
    border-bottom: 1px solid var(--line); border-radius: 0;
  }
  .site-nav__link::after { display: none; }
  .site-nav__link.is-active { color: var(--wine); }

  .site-nav__dropdown {
    position: static; transform: none;
    min-width: 0; padding: 4px 0 8px 8px;
    background: transparent; border: 0; box-shadow: none;
    backdrop-filter: none;
    opacity: 1; visibility: visible; pointer-events: auto;
    display: none;
  }
  .site-nav__item.is-open .site-nav__dropdown { display: block; }
  .site-nav__dropdown::before { display: none; }
  .site-nav__sublink { padding: 10px 12px; }
  .site-nav__sublink em { display: none; }
  .site-nav__subicon { width: 28px; height: 28px; }

  .site-nav__mobile-actions { display: grid; gap: 10px; margin-top: 20px; }
  .header-cta { display: none; }
  .fab-call { display: inline-flex; }

  .grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .check-list--2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; --header-h: 68px; }

  body { font-size: 15.5px; }
  h1 { font-size: clamp(1.8rem,1.2rem+2.6vw,2.8rem);  font-size: clamp(2rem, 1.4rem + 3.2vw, 2.75rem); }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .field--6, .field--4, .field--8 { grid-column: span 12; }

  .card { padding: 22px; }
  .section-head--split { flex-direction: column; align-items: flex-start; }
  .cta-band { padding: 32px 22px; border-radius: var(--r-lg); }
  .flash-wrap { padding-top: calc(var(--header-h) + 12px); }
  .fab-call span { display: none; }
  .fab-call { padding: 15px; border-radius: 50%; }
  .fab-call .icon { width: 22px; height: 22px; }
}

@media print {
  .site-header, .site-footer, .fab-call, .nav-overlay, .bg-grid, .bg-noise { display: none !important; }
  body { background: #fff; color: #000; }
}