/* ==========================================================================
   Long Equity: Universal Dark Mode Design System
   Provides cohesive dark mode tokens, typography, and component styling.
   ========================================================================== */

:root {
  --le-bg: #ffffff;
  --le-surface: #ffffff;
  --le-surface-hover: #f9fafb;
  --le-surface-card: #ffffff;
  --le-border: #e4e4e7;
  --le-border-subtle: rgba(228, 228, 231, 0.6);
  --le-text: #18181b;
  --le-text-muted: #71717a;
  --le-text-subtle: #a1a1aa;
  --le-brand-teal: #34B59D;
  --le-brand-teal-hover: #2CA48D;
  --le-brand-teal-soft: #E6F7F3;
  --le-brand-teal-text: #1B7C69;
}

html.dark,
[data-theme="dark"] {
  --le-bg: #09090b;
  --le-surface: #121215;
  --le-surface-hover: #1c1c21;
  --le-surface-card: #151518;
  --le-border: #27272a;
  --le-border-subtle: rgba(255, 255, 255, 0.08);
  --le-text: #f4f4f5;
  --le-text-muted: #a1a1aa;
  --le-text-subtle: #71717a;
  --le-brand-teal: #34B59D;
  --le-brand-teal-hover: #38D4B7;
  --le-brand-teal-soft: rgba(52, 181, 157, 0.15);
  --le-brand-teal-text: #38D4B7;
  color-scheme: dark;
}

/* Base Body Transition */
body {
  transition: background-color 0.2s ease, color 0.2s ease;
}

html.dark body {
  background-color: var(--le-bg) !important;
  color: var(--le-text) !important;
}

/* ── Universal Theme Toggle Button (Hidden for now) ──────────────────── */
.lq-theme-toggle {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: 1px solid #e4e4e7;
  background-color: #ffffff;
  color: #52525b;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  flex-shrink: 0;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.lq-theme-toggle:hover {
  background-color: #f4f4f5;
  color: #18181b;
  border-color: #d4d4d8;
  transform: translateY(-0.5px);
}

.lq-theme-toggle:active {
  transform: scale(0.95);
}

.lq-theme-toggle svg {
  width: 17px;
  height: 17px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.lq-theme-toggle .lq-icon-sun {
  display: none;
}

.lq-theme-toggle .lq-icon-moon {
  display: block;
}

/* Dark Mode Toggle Button State */
html.dark .lq-theme-toggle,
[data-theme="dark"] .lq-theme-toggle {
  background-color: #18181b;
  border-color: #27272a;
  color: #e4e4e7;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);
}

html.dark .lq-theme-toggle:hover,
[data-theme="dark"] .lq-theme-toggle:hover {
  background-color: #27272a;
  color: #ffffff;
  border-color: #3f3f46;
}

html.dark .lq-theme-toggle .lq-icon-sun,
[data-theme="dark"] .lq-theme-toggle .lq-icon-sun {
  display: block;
  color: #fbbf24;
}

html.dark .lq-theme-toggle .lq-icon-moon,
[data-theme="dark"] .lq-theme-toggle .lq-icon-moon {
  display: none;
}

/* ── Header in Dark Mode ──────────────────────────────────────────────── */
html.dark .lq-site-header,
[data-theme="dark"] .lq-site-header {
  background: rgba(9, 9, 11, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: #27272a !important;
  color: #f4f4f5 !important;
}

html.dark .lq-header-top,
[data-theme="dark"] .lq-header-top {
  border-bottom-color: #27272a !important;
}

html.dark .lq-header-logo img,
[data-theme="dark"] .lq-header-logo img {
  filter: brightness(0) invert(1) !important;
}

html.dark .lq-signin,
[data-theme="dark"] .lq-signin {
  color: #a1a1aa !important;
}

html.dark .lq-signin:hover,
[data-theme="dark"] .lq-signin:hover {
  color: #ffffff !important;
}

html.dark .lq-nav-link,
[data-theme="dark"] .lq-nav-link {
  color: #d4d4d8 !important;
}

html.dark .lq-nav-link:hover,
[data-theme="dark"] .lq-nav-link:hover,
html.dark .lq-nav-link[aria-current="page"],
[data-theme="dark"] .lq-nav-link[aria-current="page"] {
  color: #ffffff !important;
}

html.dark .lq-burger,
[data-theme="dark"] .lq-burger {
  color: #f4f4f5 !important;
}

html.dark .lq-drawer,
[data-theme="dark"] .lq-drawer {
  background: #09090b !important;
  border-bottom-color: #27272a !important;
}

html.dark .lq-drawer-inner,
[data-theme="dark"] .lq-drawer-inner {
  background: #09090b !important;
}

html.dark .lq-drawer-buttons,
[data-theme="dark"] .lq-drawer-buttons {
  border-top-color: #27272a !important;
}

html.dark .lq-drawer-btn.is-outline,
[data-theme="dark"] .lq-drawer-btn.is-outline {
  background: #18181b !important;
  border-color: #27272a !important;
  color: #f4f4f5 !important;
}

/* ── Footer in Dark Mode ──────────────────────────────────────────────── */
html.dark .lq-site-footer,
[data-theme="dark"] .lq-site-footer {
  background-color: #09090b !important;
  border-top-color: #27272a !important;
  color: #f4f4f5 !important;
}

html.dark .lq-footer-title,
[data-theme="dark"] .lq-footer-title {
  color: #f4f4f5 !important;
}

html.dark .lq-footer-disclaimer-body,
[data-theme="dark"] .lq-footer-disclaimer-body {
  color: #a1a1aa !important;
}

html.dark .lq-footer-disclaimer-body strong,
[data-theme="dark"] .lq-footer-disclaimer-body strong {
  color: #e4e4e7 !important;
}

html.dark .lq-footer-divider,
[data-theme="dark"] .lq-footer-divider {
  background: linear-gradient(to right, transparent, #27272a, transparent) !important;
}

html.dark .lq-footer-logo,
[data-theme="dark"] .lq-footer-logo {
  filter: brightness(0) invert(1) !important;
}

html.dark .lq-footer-copyright,
[data-theme="dark"] .lq-footer-copyright {
  color: #71717a !important;
}

/* ── Posts / Article Reading Layout in Dark Mode ───────────────────────── */
html.dark body.lq-post-page,
[data-theme="dark"] body.lq-post-page {
  background-color: #09090b !important;
  color: #f4f4f5 !important;
}

html.dark .lq-post-card,
[data-theme="dark"] .lq-post-card,
html.dark article,
[data-theme="dark"] article {
  color: #f4f4f5;
}

html.dark .lq-post-meta,
[data-theme="dark"] .lq-post-meta {
  color: #a1a1aa;
}

html.dark .lq-back,
[data-theme="dark"] .lq-back {
  color: #a1a1aa !important;
}

html.dark .lq-back:hover,
[data-theme="dark"] .lq-back:hover {
  color: #ffffff !important;
}

html.dark .lq-tag,
[data-theme="dark"] .lq-tag {
  background-color: #18181b !important;
  border-color: #27272a !important;
  color: #a1a1aa !important;
}

/* ── Generic Dark Mode Utility Enhancements ───────────────────────────── */
html.dark .bg-white {
  background-color: #121215 !important;
}

/* Sections on index.html take deep dark background */
html.dark section,
html.dark section.bg-white,
html.dark #features,
html.dark #book,
html.dark #pricing,
html.dark #faq {
  background-color: #09090b !important;
  border-color: #27272a !important;
}

/* Index header & navigation */
html.dark header {
  background-color: rgba(9, 9, 11, 0.95) !important;
  border-bottom-color: #27272a !important;
}

html.dark header > div:first-child {
  border-bottom-color: #27272a !important;
}

html.dark header img {
  filter: brightness(0) invert(1) !important;
}

html.dark .nav-link {
  color: #d4d4d8 !important;
}

html.dark .nav-link:hover {
  color: #ffffff !important;
}

html.dark header button {
  color: #f4f4f5 !important;
}

/* Index mobile drawer */
html.dark #mobile-drawer {
  background-color: #09090b !important;
  border-bottom-color: #27272a !important;
}

html.dark #mobile-drawer a {
  color: #f4f4f5 !important;
}

html.dark #mobile-drawer a:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

html.dark #mobile-drawer .border-t {
  border-top-color: #27272a !important;
}

html.dark #mobile-drawer a.border {
  background-color: #18181b !important;
  border-color: #27272a !important;
  color: #f4f4f5 !important;
}

/* Index footer */
html.dark footer,
html.dark footer.bg-white {
  background-color: #09090b !important;
  border-top-color: #27272a !important;
}

html.dark footer img {
  filter: brightness(0) invert(1) !important;
}

/* Index frames, badges and cards */
html.dark .browser-window-frame {
  background-color: #121215 !important;
  box-shadow: 0 0 0 1px #27272a, 0 20px 60px -12px rgba(0, 0, 0, 0.6) !important;
}

html.dark .badge-pill {
  background-color: #18181b !important;
  border-color: #27272a !important;
  color: #f4f4f5 !important;
}

html.dark .bg-\[\#FAF9F7\] {
  background-color: #151518 !important;
  border-color: #27272a !important;
}

html.dark .divide-neutral-200\/70 > * {
  border-color: #27272a !important;
}

html.dark .text-neutral-900,
html.dark .text-neutral-800,
html.dark .text-neutral-700 {
  color: #f4f4f5 !important;
}

html.dark .text-neutral-600,
html.dark .text-neutral-500 {
  color: #a1a1aa !important;
}

html.dark .border-neutral-200,
html.dark .border-neutral-200\/90,
html.dark .border-neutral-200\/80,
html.dark .border-neutral-200\/70,
html.dark .border-neutral-200\/60,
html.dark .border-neutral-200\/50,
html.dark .border-neutral-100,
html.dark .border-neutral-100\/90,
html.dark .border-neutral-100\/80 {
  border-color: #27272a !important;
}

html.dark .border-neutral-300,
html.dark .border-neutral-300\/70 {
  border-color: #3f3f46 !important;
}

html.dark .bg-neutral-50,
html.dark .bg-neutral-100 {
  background-color: #18181b !important;
  color: #f4f4f5 !important;
}

html.dark .bg-neutral-200\/80 {
  background-color: #1f1f23 !important;
}

/* Pricing cards in dark mode */
html.dark #pricing .bg-white {
  background-color: #121215 !important;
  border-color: #27272a !important;
}

html.dark #pricing svg.text-neutral-800 {
  color: #34B59D !important;
}

/* Testimonial cards */
html.dark section .bg-white.rounded-\[20px\] {
  background-color: #121215 !important;
  border-color: #27272a !important;
}

html.dark input,
html.dark select,
html.dark textarea {
  background-color: #18181b !important;
  color: #f4f4f5 !important;
  border-color: #27272a !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #71717a !important;
}

/* Subscribe button in dark mode */
html.dark .lq-subscribe,
[data-theme="dark"] .lq-subscribe,
html.dark .lq-drawer-btn.is-solid,
[data-theme="dark"] .lq-drawer-btn.is-solid {
  background: #18181b !important;
  color: #f4f4f5 !important;
  border-color: #27272a !important;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.4);
}

html.dark .lq-subscribe:hover,
[data-theme="dark"] .lq-subscribe:hover,
html.dark .lq-drawer-btn.is-solid:hover,
[data-theme="dark"] .lq-drawer-btn.is-solid:hover {
  background: #27272a !important;
  color: #ffffff !important;
  border-color: #3f3f46 !important;
}
