/* theme.css — Easy Intelligence light/dark theme */

/* ───────── DARK (default — current site) ───────── */
:root, html[data-theme="dark"] {
  --t-page: #151835;
  --t-page-2: #161766;
  --t-surface: #ffffff;
  --t-surface-on-dark: rgba(255,255,255,0.04);
  --t-surface-elev: var(--ei-slate-50);
  --t-section-immersive-bg: linear-gradient(135deg,#151835 0%,#161766 100%);
  --t-section-immersive-fg: #ffffff;
  --t-section-immersive-fg-2: rgba(255,255,255,0.85);
  --t-section-immersive-fg-3: rgba(255,255,255,0.65);
  --t-section-immersive-fg-4: rgba(255,255,255,0.45);
  --t-section-immersive-border: rgba(255,255,255,0.10);
  --t-section-immersive-border-2: rgba(255,255,255,0.06);
  --t-section-light-bg: #ffffff;
  --t-section-subtle-bg: var(--ei-slate-50);
  --t-section-indigo-bg: var(--ei-navy-indigo);
  --t-section-navy-bg: var(--ei-navy-deep);
  --t-card-light-bg: #ffffff;
  --t-card-light-border: var(--ei-slate-100);
  --t-card-dark-bg: var(--ei-navy-deep);
  --t-card-dark-border: rgba(0,169,255,0.30);
  --t-fg-headline: var(--ei-ink);
  --t-fg-body: var(--ei-slate-700);
  --t-fg-muted: var(--ei-slate-500);
  --t-network-opacity: 0.55;
}

/* ───────── LIGHT ───────── */
html[data-theme="light"] {
  --t-page: #ffffff;
  --t-page-2: #f4f6fb;
  --t-surface: #ffffff;
  --t-surface-on-dark: rgba(21,24,53,0.04);
  --t-surface-elev: #ffffff;
  /* Hero / methodology / contact in light: cool white with cyan glow, navy text */
  --t-section-immersive-bg: linear-gradient(135deg,#ffffff 0%,#f4f6fb 100%);
  --t-section-immersive-fg: var(--ei-ink);
  --t-section-immersive-fg-2: var(--ei-slate-700);
  --t-section-immersive-fg-3: var(--ei-slate-500);
  --t-section-immersive-fg-4: var(--ei-slate-300);
  --t-section-immersive-border: rgba(21,24,53,0.10);
  --t-section-immersive-border-2: rgba(21,24,53,0.06);
  --t-section-light-bg: #ffffff;
  --t-section-subtle-bg: var(--ei-slate-50);
  --t-section-indigo-bg: var(--ei-slate-50);
  --t-section-navy-bg: #ffffff;
  --t-card-light-bg: #ffffff;
  --t-card-light-border: var(--ei-slate-100);
  --t-card-dark-bg: #ffffff;
  --t-card-dark-border: rgba(0,169,255,0.30);
  --t-fg-headline: var(--ei-ink);
  --t-fg-body: var(--ei-slate-700);
  --t-fg-muted: var(--ei-slate-500);
  --t-network-opacity: 0.18;
}

html[data-theme="light"] body { background: #ffffff; }
html[data-theme="dark"]  body { background: #151835; }

/* Light-mode tweaks for elements that hard-code dark colors */
html[data-theme="light"] [data-immersive] {
  background: var(--t-section-immersive-bg) !important;
  color: var(--t-section-immersive-fg) !important;
  border-bottom: 1px solid var(--t-section-immersive-border-2);
}
html[data-theme="light"] [data-immersive] [data-immersive-fg-2] { color: var(--t-section-immersive-fg-2) !important; }
html[data-theme="light"] [data-immersive] [data-immersive-fg-3] { color: var(--t-section-immersive-fg-3) !important; }
html[data-theme="light"] [data-immersive] [data-immersive-fg-4] { color: var(--t-section-immersive-fg-4) !important; }
html[data-theme="light"] [data-immersive] [data-immersive-border] { border-color: var(--t-section-immersive-border) !important; }
html[data-theme="light"] [data-immersive] [data-immersive-fg]  { color: var(--t-section-immersive-fg) !important; }
html[data-theme="light"] [data-network] { opacity: var(--t-network-opacity); }

/* Nav becomes white-glass in light when scrolled */
html[data-theme="light"] [data-nav-scrolled="true"] {
  background: rgba(255,255,255,0.85) !important;
  border-bottom-color: var(--ei-slate-100) !important;
}
html[data-theme="light"] [data-nav-link] { color: var(--ei-slate-700) !important; }
html[data-theme="light"] [data-nav-wordmark] { color: var(--ei-ink) !important; }

/* Stats section indigo → subtle in light */
html[data-theme="light"] [data-section-indigo] {
  background: var(--t-section-subtle-bg) !important;
  color: var(--ei-ink) !important;
}
html[data-theme="light"] [data-section-indigo] [data-stats-label] { color: var(--ei-ink) !important; }
html[data-theme="light"] [data-section-indigo] [data-stats-sub]   { color: var(--ei-slate-500) !important; }
html[data-theme="light"] [data-section-indigo] [data-stats-eyebrow]{ color: var(--ei-slate-700) !important; }
html[data-theme="light"] [data-section-indigo] [data-stats-headline]{ color: var(--ei-ink) !important; }
html[data-theme="light"] [data-section-indigo] [data-stats-divider]{ border-color: var(--ei-slate-100) !important; }

/* Methodology featured card on dark → on light */
html[data-theme="light"] [data-phase-circle] {
  background: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(0,169,255,0.30), 0 0 24px rgba(0,169,255,0.18) !important;
}

/* Footer adapts */
html[data-theme="light"] [data-footer] {
  background: var(--ei-slate-50) !important;
  color: var(--ei-ink) !important;
  border-top: 1px solid var(--ei-slate-100) !important;
}
html[data-theme="light"] [data-footer] [data-footer-link]   { color: var(--ei-slate-700) !important; }
html[data-theme="light"] [data-footer] [data-footer-head]   { color: var(--ei-ink) !important; }
html[data-theme="light"] [data-footer] [data-footer-muted]  { color: var(--ei-slate-500) !important; }

/* Featured (dark) service card in light mode → indigo accent on white */
html[data-theme="light"] [data-card-featured] {
  background: linear-gradient(180deg,#161766 0%,#151835 100%) !important;
}

/* Trusted strip */
html[data-theme="light"] [data-trusted] {
  background: var(--ei-slate-50) !important;
  border-top: 1px solid var(--ei-slate-100) !important;
}
html[data-theme="light"] [data-trusted] [data-trusted-logo] { color: var(--ei-slate-500) !important; border-color: var(--ei-slate-100) !important; }
html[data-theme="light"] [data-trusted] [data-trusted-label] { color: var(--ei-slate-700) !important; }

/* Nav theme + lang controls in light mode */
html[data-theme="light"] [data-nav-theme-toggle] {
  border-color: var(--ei-slate-100) !important;
  color: var(--ei-ink) !important;
  background: #ffffff !important;
}
html[data-theme="light"] [data-nav-theme-toggle]:hover {
  border-color: var(--ei-cyan) !important;
  color: var(--ei-cyan) !important;
}
html[data-theme="light"] [data-nav-lang] {
  border-color: var(--ei-slate-100) !important;
  background: #ffffff !important;
}
html[data-theme="light"] [data-nav-lang] button {
  color: var(--ei-slate-500) !important;
}
html[data-theme="light"] [data-nav-lang] button[aria-pressed="true"] {
  background: var(--ei-cyan) !important;
  color: var(--ei-navy-deep) !important;
}

/* Form inputs in light mode (contact) */
html[data-theme="light"] [data-form-input] {
  background: #ffffff !important;
  border-color: var(--ei-slate-100) !important;
  color: var(--ei-ink) !important;
}
html[data-theme="light"] [data-form-label] { color: var(--ei-slate-700) !important; }
html[data-theme="light"] [data-form-card]  {
  background: rgba(255,255,255,0.7) !important;
  border-color: var(--ei-slate-100) !important;
  box-shadow: 0 1px 2px rgba(21,24,53,0.04), 0 24px 48px -16px rgba(22,23,102,0.12);
}
