/* ========================================================
   VietBIMcoder — Light theme overrides
   Dark is default. When <html data-theme="light">, swap palette.
   ======================================================== */

/* ---------- Base ---------- */
html[data-theme="light"] body {
  background: #ffffff;
  color: #0A0A0B;
}

html[data-theme="light"] ::-webkit-scrollbar-track { background: #f4f4f6; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #d0d0d5; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #f36c4f; }

/* ---------- Backgrounds (brand) ---------- */
html[data-theme="light"] .bg-brand-ink     { background-color: #ffffff !important; }
html[data-theme="light"] .bg-brand-char    { background-color: #f4f4f6 !important; }
html[data-theme="light"] .bg-brand-ash     { background-color: #e8e8ec !important; }
html[data-theme="light"] .bg-brand-line    { background-color: #d6d6dc !important; }

/* Translucent dark surfaces (sticky nav etc.) */
html[data-theme="light"] .bg-brand-ink\/85  { background-color: rgba(255,255,255,0.92) !important; }
html[data-theme="light"] .bg-brand-ink\/90  { background-color: rgba(255,255,255,0.94) !important; }
html[data-theme="light"] .bg-brand-ink\/95  { background-color: rgba(255,255,255,0.95) !important; }

/* ---------- Header nav text: dual-state ---------- */
/* Default (header is transparent over dark hero) — text stays LIGHT for legibility on dark hero */
html[data-theme="light"] header#nav:not(.bg-brand-ink\/85) .text-white\/80,
html[data-theme="light"] header#nav:not(.bg-brand-ink\/85) .text-white {
  color: rgba(255,255,255,0.90) !important;
}
html[data-theme="light"] header#nav:not(.bg-brand-ink\/85) a.hover\:text-white:hover {
  color: #ffffff !important;
}
html[data-theme="light"] header#nav:not(.bg-brand-ink\/85) .text-brand-mist {
  color: rgba(255,255,255,0.6) !important;
}
/* Once scrolled (header gets bg-brand-ink/85 class) — flip nav text to dark */
html[data-theme="light"] header#nav.bg-brand-ink\/85 .text-white\/80 {
  color: rgba(10,10,11,0.78) !important;
}
html[data-theme="light"] header#nav.bg-brand-ink\/85 .text-white {
  color: #0A0A0B !important;
}
html[data-theme="light"] header#nav.bg-brand-ink\/85 a.hover\:text-white:hover {
  color: #0A0A0B !important;
}
html[data-theme="light"] header#nav.bg-brand-ink\/85 .text-brand-mist {
  color: #6b6b73 !important;
}

/* Sub-pages and article pages: header always has solid bg → always dark text */
/* (handled by default text-white/X overrides above) */

/* ---------- Text (white & opacity variants) ---------- */
html[data-theme="light"] .text-white         { color: #0A0A0B !important; }
html[data-theme="light"] .text-white\/30     { color: rgba(10,10,11,0.30) !important; }
html[data-theme="light"] .text-white\/40     { color: rgba(10,10,11,0.45) !important; }
html[data-theme="light"] .text-white\/45     { color: rgba(10,10,11,0.50) !important; }
html[data-theme="light"] .text-white\/50     { color: rgba(10,10,11,0.55) !important; }
html[data-theme="light"] .text-white\/55     { color: rgba(10,10,11,0.60) !important; }
html[data-theme="light"] .text-white\/60     { color: rgba(10,10,11,0.65) !important; }
html[data-theme="light"] .text-white\/65     { color: rgba(10,10,11,0.65) !important; }
html[data-theme="light"] .text-white\/70     { color: rgba(10,10,11,0.70) !important; }
html[data-theme="light"] .text-white\/75     { color: rgba(10,10,11,0.75) !important; }
html[data-theme="light"] .text-white\/80     { color: rgba(10,10,11,0.78) !important; }
html[data-theme="light"] .text-white\/85     { color: rgba(10,10,11,0.82) !important; }
html[data-theme="light"] .text-white\/90     { color: rgba(10,10,11,0.88) !important; }
html[data-theme="light"] .text-brand-mist    { color: #6b6b73 !important; }

/* hover:text-white still flips */
html[data-theme="light"] .hover\:text-white:hover { color: #0A0A0B !important; }

/* ---------- Translucent overlays (white) ---------- */
html[data-theme="light"] .bg-white\/5    { background-color: rgba(10,10,11,0.04) !important; }
html[data-theme="light"] .bg-white\/10   { background-color: rgba(10,10,11,0.06) !important; }
html[data-theme="light"] .bg-white\/15   { background-color: rgba(10,10,11,0.08) !important; }
html[data-theme="light"] .bg-white\/20   { background-color: rgba(10,10,11,0.10) !important; }
html[data-theme="light"] .bg-white\/95   { background-color: rgba(255,255,255,1) !important; }
html[data-theme="light"] .hover\:bg-white\/10:hover { background-color: rgba(10,10,11,0.10) !important; }
html[data-theme="light"] .hover\:bg-white\/20:hover { background-color: rgba(10,10,11,0.14) !important; }
html[data-theme="light"] .hover\:bg-white:hover     { background-color: #ffffff !important; }

/* ---------- Borders ---------- */
html[data-theme="light"] .border-white\/5    { border-color: rgba(10,10,11,0.06) !important; }
html[data-theme="light"] .border-white\/10   { border-color: rgba(10,10,11,0.08) !important; }
html[data-theme="light"] .border-white\/15   { border-color: rgba(10,10,11,0.10) !important; }
html[data-theme="light"] .border-white\/20   { border-color: rgba(10,10,11,0.14) !important; }
html[data-theme="light"] .border-white\/30   { border-color: rgba(10,10,11,0.18) !important; }
html[data-theme="light"] .border-t.border-white\/5,
html[data-theme="light"] .border-b.border-white\/5 { border-color: rgba(10,10,11,0.06) !important; }
html[data-theme="light"] .focus\:border-brand-orange:focus { border-color: #f36c4f !important; }
html[data-theme="light"] .hover\:border-brand-orange:hover { border-color: #f36c4f !important; }
html[data-theme="light"] .hover\:border-white:hover { border-color: #0A0A0B !important; }

/* ---------- Image-overlay gradients (kept dark — overlays always read white text) ---------- */
/* bg-black/X overlays remain dark since they sit on top of images */

/* ---------- Hero zone — keeps a near-dark hero in light mode for brand drama ---------- */
html[data-theme="light"] #hero .bg-brand-ink {
  background: linear-gradient(180deg, #0A0A0B 0%, #141416 60%, #1a1a1f 100%) !important;
}
html[data-theme="light"] #hero .hero-glow {
  /* keep glow on dark */
}
/* All hero text stays white — override forced light text-white above */
html[data-theme="light"] #hero .text-white,
html[data-theme="light"] #hero [class*="text-white\/"] {
  color: #ffffff !important;
}
html[data-theme="light"] #hero .text-white\/55  { color: rgba(255,255,255,0.55) !important; }
html[data-theme="light"] #hero .text-white\/60  { color: rgba(255,255,255,0.60) !important; }
html[data-theme="light"] #hero .text-white\/70  { color: rgba(255,255,255,0.70) !important; }
html[data-theme="light"] #hero .text-white\/75  { color: rgba(255,255,255,0.75) !important; }
html[data-theme="light"] #hero .text-white\/85  { color: rgba(255,255,255,0.85) !important; }
html[data-theme="light"] #hero .text-white\/90  { color: rgba(255,255,255,0.90) !important; }
html[data-theme="light"] #hero .text-white\/40  { color: rgba(255,255,255,0.40) !important; }
html[data-theme="light"] #hero .text-white\/30  { color: rgba(255,255,255,0.30) !important; }
html[data-theme="light"] #hero .border-white\/30 { border-color: rgba(255,255,255,0.30) !important; }
html[data-theme="light"] #hero .border-white\/10 { border-color: rgba(255,255,255,0.10) !important; }
html[data-theme="light"] #hero .bg-white\/5     { background-color: rgba(255,255,255,0.05) !important; }

/* CTA section is also a dramatic dark hero with video — keep dark */
html[data-theme="light"] #cta .text-white,
html[data-theme="light"] #cta [class*="text-white\/"] { color: #ffffff !important; }
html[data-theme="light"] #cta .text-white\/70 { color: rgba(255,255,255,0.70) !important; }
html[data-theme="light"] #cta .text-white\/75 { color: rgba(255,255,255,0.75) !important; }
html[data-theme="light"] #cta .text-white\/90 { color: rgba(255,255,255,0.90) !important; }
html[data-theme="light"] #cta .border-white\/20 { border-color: rgba(255,255,255,0.20) !important; }

/* ---------- Cards in light mode — white, with border + shadow for clear elevation ---------- */
html[data-theme="light"] .service-card,
html[data-theme="light"] .blog-card {
  background: #ffffff !important;
  border: 1px solid rgba(10,10,11,0.10) !important;
  box-shadow: 0 1px 3px rgba(10,10,11,0.04), 0 6px 18px -8px rgba(10,10,11,0.06);
}
html[data-theme="light"] .service-card:hover,
html[data-theme="light"] .blog-card:hover {
  background: #ffffff !important;
  border-color: rgba(243,108,79,0.55) !important;
  box-shadow: 0 14px 32px -10px rgba(243,108,79,0.25),
              0 6px 14px -4px rgba(10,10,11,0.08) !important;
}

/* Why-cards — sit on light grey section, become white tiles */
html[data-theme="light"] .why-card {
  background: #ffffff !important;
}
html[data-theme="light"] .why-card.hover\:bg-brand-char:hover,
html[data-theme="light"] .why-card:hover {
  background-color: #fafafa !important;
}
/* Why grid container in light: borders between tiles use light ash */
html[data-theme="light"] #why .grid {
  background: rgba(10,10,11,0.10) !important;
  border-color: rgba(10,10,11,0.08) !important;
}

/* Hero service mini-cards stay on dark hero — keep light */
html[data-theme="light"] .hero-svc {
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border-color: rgba(255,255,255,0.10);
}
html[data-theme="light"] .hero-svc h3,
html[data-theme="light"] .hero-svc p {
  color: #fff !important;
}
html[data-theme="light"] .hero-svc .text-white\/55 { color: rgba(255,255,255,0.55) !important; }

/* Partner logo grid — bg gap colour adjusted */
html[data-theme="light"] #clients .grid {
  background: rgba(10,10,11,0.10) !important;
  border-color: rgba(10,10,11,0.08) !important;
}

/* Process dot circles get clearer borders in light */
html[data-theme="light"] .process-dot {
  background: #ffffff !important;
  box-shadow: 0 0 0 6px rgba(243,108,79,0.10), 0 0 0 14px rgba(243,108,79,0.04),
              0 2px 6px rgba(10,10,11,0.06);
}

/* ---------- Article prose ---------- */
html[data-theme="light"] .prose {
  color: rgba(10,10,11,0.82);
}
html[data-theme="light"] .prose strong,
html[data-theme="light"] .prose h2,
html[data-theme="light"] .prose h3,
html[data-theme="light"] .prose h4 {
  color: #0A0A0B;
}
html[data-theme="light"] .prose p {
  color: rgba(10,10,11,0.78);
}
html[data-theme="light"] .prose blockquote {
  background: rgba(243,108,79,0.06);
  color: rgba(10,10,11,0.92);
}
html[data-theme="light"] .prose code {
  background: rgba(10,10,11,0.06);
  color: #c44a2c;
}
html[data-theme="light"] .prose pre {
  background: #f4f4f6;
  border-color: rgba(10,10,11,0.06);
}
html[data-theme="light"] .prose pre code {
  color: #0A0A0B;
}
html[data-theme="light"] .callout {
  background: linear-gradient(90deg, rgba(243,108,79,0.12), rgba(243,108,79,0.03));
}

/* ---------- Article hero (sub-pages) — keep light text on white-ish background ---------- */
html[data-theme="light"] .article-hero {
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}
html[data-theme="light"] .article-hero h1 { color: #0A0A0B; }

/* ---------- Filter buttons (bai-viet sub-page) ---------- */
html[data-theme="light"] .filter-btn {
  border-color: rgba(10,10,11,0.15);
  color: rgba(10,10,11,0.78);
}
html[data-theme="light"] .filter-btn:hover { border-color: #f36c4f; }
html[data-theme="light"] .filter-btn.active {
  background: #f36c4f;
  color: #fff;
  border-color: #f36c4f;
}

/* ---------- Form inputs ---------- */
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="text"],
html[data-theme="light"] textarea {
  background: rgba(10,10,11,0.04) !important;
  border-color: rgba(10,10,11,0.10) !important;
  color: #0A0A0B !important;
}
html[data-theme="light"] input::placeholder { color: rgba(10,10,11,0.40) !important; }

/* ---------- Custom dot cursor — invert mix-blend mode bg ---------- */
html[data-theme="light"] .dot-cursor {
  /* mix-blend-mode: difference still works on white bg, just becomes black ring */
}

/* ---------- Particle ring section / About / Why etc — adjust ambient feel ---------- */
html[data-theme="light"] .marquee-xl {
  background: #f4f4f6;
}
html[data-theme="light"] .marquee-xl-track span {
  color: rgba(10,10,11,0.10);
  -webkit-text-stroke-color: rgba(10,10,11,0.30);
}

/* Stats numbers and big display text — keep readable */
html[data-theme="light"] .num-parallax {
  color: rgba(10,10,11,0.04) !important;
}

/* Decorative orange-bar (keep) */

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  color: rgba(255,255,255,0.85);
}
.theme-toggle:hover {
  background: rgba(243,108,79,0.15);
  border-color: rgba(243,108,79,0.5);
  transform: rotate(20deg);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="light"] .theme-toggle {
  background: rgba(10,10,11,0.06);
  border-color: rgba(10,10,11,0.12);
  color: rgba(10,10,11,0.78);
}
html[data-theme="light"] .theme-toggle:hover {
  background: rgba(243,108,79,0.15);
  border-color: rgba(243,108,79,0.5);
}
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun  { display: block; }

/* ---------- Smooth color transitions when toggling ---------- */
body, .blog-card, .service-card, .why-card, .hero-svc, header, footer, section, article {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
