/* ══════════════════════════════════════════
   Dark Mode
   ══════════════════════════════════════════ */

/* ── Base ── */
[data-theme="dark"] body,
[data-theme="dark"] html {
  background-color: #0A1628;
  color: #F1F5F9;
}

/* ── Backgrounds ── */
[data-theme="dark"] .bg-white {
  background-color: #1A1A2E !important;
}

[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-100,
[data-theme="dark"] .bg-altis-cream {
  background-color: #0F1729 !important;
}

[data-theme="dark"] .bg-altis-navy {
  background-color: #060D18 !important;
}

[data-theme="dark"] .bg-altis-blue {
  background-color: #001A6B !important;
}

/* ── Cards ── */
[data-theme="dark"] .card,
[data-theme="dark"] [class*="rounded-2xl"][class*="bg-white"],
[data-theme="dark"] [class*="rounded-xl"][class*="bg-white"] {
  background-color: #1A1A2E !important;
  border-color: #1E293B !important;
}

/* ── Text: brand colors → visible on dark ── */
[data-theme="dark"] .text-altis-slate {
  color: #F1F5F9 !important;
}

[data-theme="dark"] .text-altis-slate\/70 {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .text-altis-blue {
  color: #7EB0FF !important;
}

[data-theme="dark"] .text-altis-blue\/60 {
  color: #7EB0FF !important;
  opacity: 0.8 !important;
}

[data-theme="dark"] .text-altis-red {
  color: #FF6B81 !important;
}

[data-theme="dark"] .text-altis-gray {
  color: #94A3B8 !important;
}

/* Tailwind gray scale */
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-700 {
  color: #F1F5F9 !important;
}

[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-400 {
  color: #94A3B8 !important;
}

[data-theme="dark"] .text-white {
  color: #F1F5F9 !important;
}

[data-theme="dark"] .text-white\/20 {
  color: rgba(241,245,249,0.25) !important;
}

[data-theme="dark"] .text-white\/30,
[data-theme="dark"] .text-white\/35 {
  color: rgba(241,245,249,0.35) !important;
}

[data-theme="dark"] .text-white\/40 {
  color: rgba(241,245,249,0.5) !important;
}

/* ── Borders ── */
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-gray-100 {
  border-color: #1E293B !important;
}

[data-theme="dark"] .border {
  border-color: #1E293B !important;
}

/* ── Shadows ── */
[data-theme="dark"] .shadow-lg,
[data-theme="dark"] .shadow-xl,
[data-theme="dark"] .shadow-2xl {
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}

/* ── Nav ── */
[data-theme="dark"] header:not(.header-scrolled) .nav-link {
  color: #CBD5E1 !important;
}

[data-theme="dark"] header:not(.header-scrolled) .nav-link:hover,
[data-theme="dark"] header:not(.header-scrolled) .nav-link.active {
  color: #C41E3A !important;
}

[data-theme="dark"] header:not(.header-scrolled) .header-hamburger {
  color: #CBD5E1;
}

/* ── Nav scrolled in dark mode ── */
[data-theme="dark"] .header-scrolled {
  background-color: rgba(10, 22, 40, 0.95) !important;
  border-bottom-color: rgba(255,255,255,0.06) !important;
}

[data-theme="dark"] .header-scrolled .nav-link {
  color: #E2E8F0 !important;
}

[data-theme="dark"] .header-scrolled .nav-link:hover,
[data-theme="dark"] .header-scrolled .nav-link.active {
  color: #C41E3A !important;
}

[data-theme="dark"] .header-scrolled .header-hamburger {
  color: #E2E8F0 !important;
}

[data-theme="dark"] .header-scrolled .header-logo-altis {
  color: #E2E8F0 !important;
}

[data-theme="dark"] .header-scrolled .header-logo-group {
  color: rgba(255,255,255,0.4) !important;
}

[data-theme="dark"] .header-scrolled .header-logo-plus {
  color: rgba(255,255,255,0.3) !important;
}

[data-theme="dark"] .header-scrolled .nav-link::after {
  background-color: #C41E3A !important;
}

/* ── Theme toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 9999px;
  padding: 6px;
  color: #CBD5E1;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.1);
  border-color: #C41E3A;
  color: #C41E3A;
}

.header-scrolled .theme-toggle {
  border-color: var(--altis-slate);
  color: var(--altis-slate);
}

.header-scrolled .theme-toggle:hover {
  border-color: var(--altis-blue);
  color: var(--altis-blue);
}

[data-theme="dark"] .theme-toggle {
  border-color: #C41E3A;
  color: #C41E3A;
}

[data-theme="dark"] .header-scrolled .theme-toggle {
  border-color: #E2E8F0;
  color: #E2E8F0;
}

[data-theme="dark"] .header-scrolled .theme-toggle:hover {
  border-color: #C41E3A;
  color: #C41E3A;
}

.menu-theme-toggle {
  display: none;
}

/* ── Buttons dark mode ── */
[data-theme="dark"] .btn-outline {
  border-color: #CBD5E1;
  color: #CBD5E1;
}

[data-theme="dark"] .btn-outline:hover {
  background-color: #CBD5E1;
  color: #0A1628;
}

[data-theme="dark"] .btn-primary {
  opacity: 0.95;
}

[data-theme="dark"] [class*="bg-gradient-to"] {
  opacity: 0.95;
}

/* ── Mobile menu ── */
[data-theme="dark"] .mobile-menu {
  background-color: #0A1628 !important;
}

[data-theme="dark"] .mobile-menu a,
[data-theme="dark"] .menu-nav a {
  color: #CBD5E1 !important;
}

[data-theme="dark"] .mobile-menu a:hover,
[data-theme="dark"] .menu-nav a:hover {
  color: #C41E3A !important;
}

[data-theme="dark"] .menu-close-btn {
  color: #CBD5E1;
}

/* ── Accents ── */
[data-theme="dark"] .section-label {
  color: #C41E3A !important;
}

[data-theme="dark"] .blue-rule {
  background-color: #C41E3A !important;
}

/* ── Selection ── */
[data-theme="dark"] ::selection {
  background-color: rgba(196, 30, 58, 0.3);
  color: #F1F5F9;
}

/* ── Inputs / Forms ── */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: #1A1A2E !important;
  border-color: #1E293B !important;
  color: #E2E8F0 !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #64748B !important;
}

/* ── Grain ── */
[data-theme="dark"] .grain-overlay {
  opacity: 0.03;
}
