/* Glotech theme — dark mode remaps light surfaces only */

html.dark body {
  background-color: #020617;
  color: #e2e8f0;
}

/* Nav */
html.dark #main-nav {
  background-color: #0f172a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

html.dark #main-nav.is-scrolled {
  background-color: rgba(15, 23, 42, 0.88) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

html.dark #theme-toggle {
  border-color: rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
}

html.dark #theme-toggle:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}

/* Backgrounds — skip inside brand-locked zones */
html.dark .bg-white {
  background-color: #0f172a !important;
}

html.dark .bg-slate-50 {
  background-color: #1e293b !important;
}

html.dark .bg-blue-50 {
  background-color: rgba(37, 99, 235, 0.18) !important;
}

html.dark .theme-lock .bg-white,
html.dark .theme-lock.bg-white {
  background-color: transparent !important;
}

/* Text — skip brand-locked zones */
html.dark .text-slate-900 {
  color: #f8fafc !important;
}

html.dark .text-slate-800 {
  color: #f1f5f9 !important;
}

html.dark .text-slate-700 {
  color: #e2e8f0 !important;
}

html.dark .text-slate-600 {
  color: #cbd5e1 !important;
}

html.dark .text-slate-500 {
  color: #94a3b8 !important;
}

html.dark .text-slate-400 {
  color: #94a3b8 !important;
}

html.dark .text-gray-600 {
  color: #cbd5e1 !important;
}

html.dark .text-gray-500 {
  color: #94a3b8 !important;
}

html.dark .theme-lock .text-slate-900,
html.dark .theme-lock .text-slate-800,
html.dark .theme-lock .text-slate-700,
html.dark .theme-lock .text-slate-600,
html.dark .theme-lock .text-slate-500,
html.dark .theme-lock .text-slate-400,
html.dark .theme-lock .text-gray-600,
html.dark .theme-lock .text-gray-500 {
  color: unset !important;
}

html.dark .theme-lock .text-white {
  color: #ffffff !important;
}

html.dark .theme-lock .text-gray-300 {
  color: #d1d5db !important;
}

html.dark .theme-lock .text-gray-400 {
  color: #9ca3af !important;
}

html.dark .theme-lock .text-blue-400 {
  color: #60a5fa !important;
}

/* Accent links stay vivid on dark surfaces */
html.dark #main-nav .text-blue-600 {
  color: #60a5fa !important;
}

html.dark #main-nav .hover\:text-blue-600:hover {
  color: #93c5fd !important;
}

/* Borders */
html.dark .border-slate-100 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .border-slate-200 {
  border-color: rgba(255, 255, 255, 0.14) !important;
}

html.dark .border-slate-900 {
  border-color: #e2e8f0 !important;
}

html.dark .theme-lock .border-slate-100,
html.dark .theme-lock .border-slate-200,
html.dark .theme-lock .border-slate-900 {
  border-color: inherit !important;
}

/* Dropdowns & hovers */
html.dark .hover\:bg-blue-50:hover {
  background-color: rgba(37, 99, 235, 0.22) !important;
}

html.dark .hover\:bg-slate-900:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.dark .shadow-xl {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45) !important;
}

/* Form fields */
html.dark input,
html.dark textarea,
html.dark select {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #64748b !important;
}

html.dark input:focus,
html.dark textarea:focus {
  border-color: transparent !important;
}

/* Card shadows */
html.dark .shadow-md,
html.dark .shadow-sm {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

/* Theme toggle icon visibility */
html.dark .theme-icon-dark {
  display: none;
}

html.dark .theme-icon-light {
  display: inline-block !important;
}

html:not(.dark) .theme-icon-light {
  display: none;
}

html:not(.dark) .theme-icon-dark {
  display: inline-block;
}

/* Mobile menu — dark mode */
html.dark #mobile-menu {
  background-color: #0f172a !important;
}

html.dark #mobile-menu .border-slate-100 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark #mobile-menu .text-slate-900 {
  color: #f8fafc !important;
}

html.dark #mobile-menu .text-slate-700,
html.dark #mobile-menu .text-slate-600 {
  color: #cbd5e1 !important;
}

html.dark #mobile-menu #mobile-menu-close {
  border-color: rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
}
