/* ============================================================
   ZClean — Main Stylesheet
   File: assets/css/main.css
   ============================================================ */

/* ── Google Fonts: Be Vietnam Pro ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --blue-950: #060f2a;
  --blue-900: #0a1f44;
  --blue-800: #0f2d6a;
  --blue-700: #1a3a7e;
  --blue-600: #1e4db7;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-300: #93c5fd;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  /* Neutral */
  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Accents */
  --green-500: #22c55e;
  --amber-400: #fbbf24;

  /* Typography */
  --font: 'Be Vietnam Pro', sans-serif;

  /* Spacing scale */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  /* Layout */
  --container: 1200px;
  --px: clamp(16px, 5vw, 80px);   /* horizontal page padding */

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 6px rgba(10,31,68,.08);
  --shadow-md:  0 4px 20px rgba(10,31,68,.10);
  --shadow-lg:  0 12px 48px rgba(10,31,68,.15);
  --shadow-xl:  0 20px 64px rgba(10,31,68,.20);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur: 240ms;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}
ul, ol { list-style: none; }

/* ── Container ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--px);
}

/* ── Section spacing ───────────────────────────────────────── */
.section { padding-block: var(--sp-20); }
.section--sm { padding-block: var(--sp-12); }
.section--lg { padding-block: clamp(64px, 8vw, 120px); }
.section--dark  { background: var(--blue-900); }
.section--navy  { background: var(--blue-950); }
.section--light { background: var(--gray-50); }

/* ── Section header ────────────────────────────────────────── */
.section-header { margin-bottom: var(--sp-12); }
.section-header--center { text-align: center; }
.section-header--center .section-sub { margin-inline: auto; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue-600);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  padding: 5px 14px;
  border-radius: var(--r-full);
  margin-bottom: var(--sp-4);
}
.section-tag--light {
  color: var(--blue-300);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
}

.section-title {
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 800;
  color: var(--blue-900);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: var(--sp-4);
}
.section-title--light { color: var(--white); }

.section-sub {
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--gray-500);
  line-height: 1.75;
  max-width: 540px;
}
.section-sub--light { color: rgba(255,255,255,.65); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(30,77,183,.35);
}
.btn--primary:hover { background: var(--blue-700); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(30,77,183,.45); }

.btn--white {
  background: var(--white);
  color: var(--blue-700);
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.22); }

.btn--outline {
  border-color: rgba(255,255,255,.4);
  color: var(--white);
}
.btn--outline:hover { border-color: var(--white); background: rgba(255,255,255,.1); }

.btn--outline-blue {
  border-color: var(--blue-600);
  color: var(--blue-600);
}
.btn--outline-blue:hover { background: var(--blue-600); color: var(--white); }

.btn--lg { font-size: 16px; padding: 15px 36px; }
.btn--sm { font-size: 13px; padding: 9px 20px; }

/* ── Grid helpers ──────────────────────────────────────────── */
.grid { display: grid; }
.grid--2 { grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid--3 { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid--4 { grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--blue-200, #bfdbfe); }

/* ── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--r-full);
}
.badge--blue { background: var(--blue-500); color: var(--white); }
.badge--light { background: var(--blue-50); color: var(--blue-600); }

/* ── Icon box ──────────────────────────────────────────────── */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--blue-50);
  transition: background var(--dur) var(--ease);
}
.icon-box--sm { width: 44px; height: 44px; }
.icon-box--md { width: 56px; height: 56px; }
.icon-box--lg { width: 72px; height: 72px; border-radius: var(--r-lg); }
.icon-box svg { width: 24px; height: 24px; stroke: var(--blue-600); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--dur) var(--ease); }
.icon-box--dark { background: var(--blue-700); }
.icon-box--dark svg { stroke: var(--white); }

/* ── Divider ───────────────────────────────────────────────── */
.divider { height: 1px; background: var(--gray-100); margin-block: var(--sp-8); }
.divider--light { background: rgba(255,255,255,.1); }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(30,77,183,.45); }
  50%       { box-shadow: 0 0 0 10px rgba(30,77,183,.0); }
}
.animate-up   { animation: fadeUp var(--dur) var(--ease) both; }
.anim-d1 { animation-delay: .1s; }
.anim-d2 { animation-delay: .2s; }
.anim-d3 { animation-delay: .3s; }
.anim-d4 { animation-delay: .4s; }

/* ── Floating CTA ──────────────────────────────────────────── */
.float-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: flex-end;
}
.float-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--r-full);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.float-btn:hover { transform: translateY(-2px); }
.float-btn svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.5; }
.float-btn--phone { background: var(--blue-600); color: var(--white); animation: pulse-ring 2s infinite; }
.float-btn--zalo  { background: #0068ff; color: var(--white); }
.float-btn--messenger { background: linear-gradient(135deg,#0099ff,#a033ff,#ff5c87); color: var(--white); }

.back-to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  background: var(--white);
  color: var(--blue-700);
  border: 1px solid var(--gray-200);
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.back-to-top svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--blue-600);
  color: var(--white);
  border-color: var(--blue-600);
  box-shadow: var(--shadow-xl);
}

/* ── Scroll reveal (JS-driven) ─────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal-delay="3"] { transition-delay: .3s; }
[data-reveal-delay="4"] { transition-delay: .4s; }

/* ── Responsive breakpoints ────────────────────────────────── */

/* Tablet: ≤ 1024px */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: ≤ 768px */
@media (max-width: 768px) {
  :root { --px: 20px; }
  .section { padding-block: var(--sp-12); }
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
  .float-cta { bottom: 16px; right: 16px; }
  .float-btn span { display: none; }
  .float-btn { padding: 14px; border-radius: 50%; }
}

/* Small mobile: ≤ 480px */
@media (max-width: 480px) {
  :root { --px: 16px; }
  .section-title { letter-spacing: -.5px; }
  .btn--lg { padding: 13px 24px; font-size: 15px; }
}
