/* Dark mode for the light marketing site.
   Surfaces use the new void / card palette. Emerald (#00B050) and blue (#2563EB) stay. */

html[data-theme='dark'] {
  color-scheme: dark;
  --color-canvas: #090d14;
  --color-paper: #141c2e;
  --color-border-light: rgba(255, 255, 255, 0.1);
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
}

html[data-theme='dark'] body {
  background-color: #090d14;
  color: #e2e8f0;
}

html[data-theme='dark'] .bg-grid-pattern {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
}

html[data-theme='dark'] .bg-white { background-color: #141c2e; }
html[data-theme='dark'] .bg-white\/80 { background-color: rgba(9, 13, 20, 0.82); }
html[data-theme='dark'] .bg-white\/95 { background-color: rgba(9, 13, 20, 0.94); }
html[data-theme='dark'] .bg-slate-50 { background-color: #0f1624; }
html[data-theme='dark'] .bg-slate-100,
html[data-theme='dark'] .bg-slate-100\/70,
html[data-theme='dark'] .bg-slate-200\/80 { background-color: #1a2438; }
html[data-theme='dark'] .bg-slate-900 { background-color: #10192b; }
html[data-theme='dark'] .bg-slate-950 { background-color: #070b12; }

html[data-theme='dark'] .text-slate-900,
html[data-theme='dark'] .text-slate-800 { color: #f8fafc; }
html[data-theme='dark'] .text-slate-700 { color: #e2e8f0; }
html[data-theme='dark'] .text-slate-600,
html[data-theme='dark'] .text-slate-500 { color: #94a3b8; }

html[data-theme='dark'] .border-slate-100,
html[data-theme='dark'] .border-slate-200,
html[data-theme='dark'] .border-slate-200\/60,
html[data-theme='dark'] .border-slate-200\/70,
html[data-theme='dark'] .border-slate-200\/80,
html[data-theme='dark'] .border-slate-300 { border-color: rgba(255, 255, 255, 0.1); }

html[data-theme='dark'] .from-white {
  --tw-gradient-from: #090d14 var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(9 13 20 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
html[data-theme='dark'] .via-slate-50 {
  --tw-gradient-to: rgb(15 22 36 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), #0f1624 var(--tw-gradient-via-position), var(--tw-gradient-to);
}
html[data-theme='dark'] .to-slate-50 { --tw-gradient-to: #0f1624 var(--tw-gradient-to-position); }
html[data-theme='dark'] .to-slate-100 { --tw-gradient-to: #141c2e var(--tw-gradient-to-position); }
html[data-theme='dark'] .via-emerald-50\/20 {
  --tw-gradient-to: rgb(0 176 80 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), rgb(0 176 80 / 0.12) var(--tw-gradient-via-position), var(--tw-gradient-to);
}
html[data-theme='dark'] .via-blue-50\/20 {
  --tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), rgb(37 99 235 / 0.14) var(--tw-gradient-via-position), var(--tw-gradient-to);
}

html[data-theme='dark'] .bg-emerald-50,
html[data-theme='dark'] .bg-emerald-50\/40 { background-color: rgba(0, 176, 80, 0.12); }
html[data-theme='dark'] .bg-emerald-100 { background-color: rgba(0, 176, 80, 0.18); }
html[data-theme='dark'] .border-emerald-100,
html[data-theme='dark'] .border-emerald-200 { border-color: rgba(0, 176, 80, 0.35); }
html[data-theme='dark'] .text-emerald-950,
html[data-theme='dark'] .text-emerald-900,
html[data-theme='dark'] .text-emerald-800 { color: #86efac; }
html[data-theme='dark'] .text-emerald-700,
html[data-theme='dark'] .text-emerald-600 { color: #4ade80; }

html[data-theme='dark'] .bg-blue-100 { background-color: rgba(37, 99, 235, 0.2); }
html[data-theme='dark'] .border-blue-200 { border-color: rgba(96, 165, 250, 0.4); }
html[data-theme='dark'] .text-blue-800,
html[data-theme='dark'] .text-blue-700 { color: #93c5fd; }

html[data-theme='dark'] .bg-amber-100 { background-color: rgba(245, 158, 11, 0.16); }
html[data-theme='dark'] .text-amber-800 { color: #fcd34d; }
html[data-theme='dark'] .validation-tag {
  background-color: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.35);
}

html[data-theme='dark'] .hover\:bg-slate-100:hover,
html[data-theme='dark'] .hover\:bg-slate-200:hover,
html[data-theme='dark'] .hover\:bg-emerald-50:hover,
html[data-theme='dark'] .hover\:bg-blue-50:hover { background-color: #243044; }
html[data-theme='dark'] .hover\:text-slate-900:hover,
html[data-theme='dark'] .hover\:text-black:hover,
html[data-theme='dark'] .hover\:text-slate-700:hover { color: #ffffff; }
html[data-theme='dark'] .hover\:text-emerald-800:hover,
html[data-theme='dark'] .hover\:text-emerald-700:hover { color: #86efac; }
html[data-theme='dark'] .hover\:text-blue-800:hover { color: #93c5fd; }

html[data-theme='dark'] .btn-secondary {
  background-color: #141c2e;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme='dark'] .btn-secondary:hover {
  background-color: #1a2438;
  border-color: rgba(0, 176, 80, 0.45);
  color: #ffffff;
}

html[data-theme='dark'] input,
html[data-theme='dark'] select,
html[data-theme='dark'] textarea {
  background-color: #0f1624;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme='dark'] input::placeholder,
html[data-theme='dark'] textarea::placeholder { color: #94a3b8; }

html[data-theme='dark'] input[type='range'] { background: #243044; }
html[data-theme='dark'] input[type='range']::-webkit-slider-thumb { border-color: #141c2e; }

html[data-theme='dark'] ::-webkit-scrollbar-track { background: #0f1624; }
html[data-theme='dark'] ::-webkit-scrollbar-thumb { background: #334155; }

html[data-theme='dark'] .glass-panel {
  background: rgba(15, 22, 36, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .prose { color: #cbd5e1; }
html[data-theme='dark'] .prose h1,
html[data-theme='dark'] .prose h2,
html[data-theme='dark'] .prose strong { color: #f8fafc; }
