/* ===== Light-mode corrections that will NOT affect dark mode ===== */

/* 0) Base text contrast for normal content */
[data-theme="light"] .site-main {
  color: #0f172a; /* slate-900 */
}
[data-theme="light"] .site-main p,
[data-theme="light"] .site-main li {
  color: #334155; /* slate-700 */
}

/* 1) Cards / panels that appear on EVERY page */
[data-theme="light"] .content-card,
[data-theme="light"] .content-section,
[data-theme="light"] .panel,
[data-theme="light"] .panel--content,
[data-theme="light"] .section {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.10);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .page-section {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
}

/* Ensure headings inside normal sections are dark */
[data-theme="light"] .content-section h1,
[data-theme="light"] .content-section h2,
[data-theme="light"] .content-section h3,
[data-theme="light"] .content-section h4,
[data-theme="light"] .content-card h1,
[data-theme="light"] .content-card h2,
[data-theme="light"] .content-card h3,
[data-theme="light"] .content-card h4,
[data-theme="light"] .section h1,
[data-theme="light"] .section h2,
[data-theme="light"] .section h3,
[data-theme="light"] .section h4 {
  color: #0f172a;
}
[data-theme="light"] .page-section h1,
[data-theme="light"] .page-section h2,
[data-theme="light"] .page-section h3,
[data-theme="light"] .page-section h4 {
  color: #0f172a;
}

/* 2) HERO is the *only* block that stays white-on-dark in light mode */
[data-theme="light"] .hero,
[data-theme="light"] .hero-panel,
[data-theme="light"] .hero .hero-panel,
[data-theme="light"] .hero .hero-inner {
  background: radial-gradient(120% 140% at 0% 0%, #0b1220 0%, #0f1c2e 45%, #122033 100%);
  color: #f8fafc;
  border: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .hero .hero-text h1,
[data-theme="light"] .hero .hero-text h2,
[data-theme="light"] .hero .hero-text h3,
[data-theme="light"] .hero .hero-text p,
[data-theme="light"] .hero .hero-subtitle,
[data-theme="light"] .hero .hero-sub,
[data-theme="light"] .hero .hero-stat-label,
[data-theme="light"] .hero .hero-stat-value,
[data-theme="light"] .hero a.btn {
  color: #f8fafc;
}

[data-theme="light"] .section--footer {
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .site-contact {
  background: linear-gradient(120deg, #e0f2fe 0%, #f8fafc 90%);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .site-contact .contact-buttons .btn {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

[data-theme="light"] .button,
[data-theme="light"] .btn,
[data-theme="light"] .btn-secondary {
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
  background: #ffffff;
}

[data-theme="light"] .button--primary,
[data-theme="light"] .btn-primary {
  background: var(--brand);
  color: #ffffff;
  border-color: transparent;
}

[data-theme="light"] .button--primary:hover,
[data-theme="light"] .btn-primary:hover {
  background: #2563eb;
  color: #ffffff;
}

[data-theme="light"] .btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.18);
}

[data-theme="light"] .btn-secondary:hover {
  background: #f8fafc;
  border-color: rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .hero-actions .btn-primary {
  box-shadow: 0 18px 35px rgba(58, 122, 254, 0.25);
  color: #ffffff;
}

[data-theme="light"] .hero-actions .btn-secondary {
  background: linear-gradient(140deg, rgba(255,255,255,0.98), rgba(243, 247, 255, 0.94));
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.25);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  text-shadow: none;
  font-weight: 600;
}

[data-theme="light"] .campus-map {
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.15), transparent 65%), #0f172a;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
}

[data-theme="light"] .campus-map__pin {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(30, 64, 175, 0.25);
  color: #0f172a;
  text-shadow: none;
}

[data-theme="light"] .campus-map__pin:hover,
[data-theme="light"] .campus-map__pin:focus-visible {
  background: rgba(37, 99, 235, 0.9);
  color: #ffffff;
  border-color: transparent;
}

[data-theme="light"] .stat-chip {
  background: linear-gradient(145deg, #ffffff, #eff6ff);
  border-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .stat-chip__label {
  color: #2563eb;
}

[data-theme="light"] .stat-chip__subtext {
  color: #475569;
}

[data-theme="light"] .hospitality-callout {
  background: linear-gradient(150deg, #eef2ff, #ffffff);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .hospitality-grid article {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .hero--campus .hero-actions .btn-secondary {
  color: #1e3a8a;
  border-color: rgba(30, 58, 138, 0.3);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.15);
  background: linear-gradient(145deg, #eef3ff, #ffffff);
}

[data-theme="light"].page-home .hero .hero-actions .btn-secondary {
  background: linear-gradient(145deg, #e0f2ff, #ffffff);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.15);
  font-weight: 600;
}

[data-theme="light"] .hero-actions .btn-secondary:hover {
  background: #eef2ff;
  border-color: rgba(15, 23, 42, 0.25);
}

[data-theme="light"] .auth-tab {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .auth-tab.is-active {
  color: #ffffff;
}

[data-theme="light"] .admin-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .flash {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0f172a;
}

[data-theme="light"] .flash-success {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

[data-theme="light"] .flash-error {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

[data-theme="light"] .contact-modal__panel {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.25);
}

[data-theme="light"] .contact-modal__copy {
  color: #475569;
}

[data-theme="light"] .form-field input,
[data-theme="light"] .form-field textarea {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #0f172a;
}

[data-theme="light"] .admin-subnav__item {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .admin-subnav__item.is-active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #031525;
}

[data-theme="light"] .btn-secondary {
  background-color: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.35);
  color: #0f172a;
}

[data-theme="light"] .btn-secondary:hover {
  background-color: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.55);
}

[data-theme="light"] .capital-table div {
  background: #ffffff;
  border-color: rgba(15,23,42,0.12);
}

[data-theme="light"] .pillar-summary__card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .image-gallery__grid img {
  border-color: rgba(15, 23, 42, 0.12);
}


/* Prevent hero styles from leaking elsewhere */
[data-theme="light"] .hero ~ * {
  color: inherit;
}

[data-theme="light"] .hero--splash {
  border-color: rgba(15, 23, 42, 0.18);
}

/* 3) “Muted” classes must NOT use opacity in light mode (were washing content) */
[data-theme="light"] .text-muted,
[data-theme="light"] .muted,
[data-theme="light"] .section-muted {
  color: #475569 !important; /* slate-600 */
  opacity: 1 !important;
}

/* 4) Content links (not buttons) */
[data-theme="light"] .site-main a:not(.btn):not(.btn-pill):not(.pill-button) {
  color: #1d4ed8; /* blue-700 */
  text-decoration: underline;
}
[data-theme="light"] .site-main a:not(.btn):not(.btn-pill):not(.pill-button):hover {
  color: #1e40af; /* blue-800 */
}

/* 5) Pill/button chips keep their palette */
[data-theme="light"] .btn,
[data-theme="light"] .btn-pill,
[data-theme="light"] .pill-button {
  text-decoration: none;
}

/* 6) Footer must be light in light mode */
[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
  color: #1f2937; /* gray-800 */
  border-top: 1px solid rgba(15,23,42,0.08);
}
[data-theme="light"] .site-footer a { color: #1f2937; }
[data-theme="light"] .site-footer a:hover { color: #111827; }

/* 7) Home page guardrails – never let global overrides break the home hero */
.page-home [data-theme="light"] .hero,
.page-home [data-theme="light"] .hero-panel,
.page-home [data-theme="light"] .hero .hero-inner {
  background: radial-gradient(120% 140% at 0% 0%, #0b1220 0%, #0f1c2e 45%, #122033 100%);
  color: #f8fafc;
}
.page-home [data-theme="light"] .hero .hero-text * { color: #f8fafc; }
.page-home [data-theme="light"] .hero .hero-actions .btn-primary {
  color: #ffffff;
}
.page-home [data-theme="light"] .hero .hero-actions .btn-secondary {
  color: #0f172a;
}

/* 8) Investors page readability (worst prior washout) */
[data-theme="light"] .page-investors .content-section p,
[data-theme="light"] .page-investors .content-section li {
  color: #334155; /* slate-700 */
}
[data-theme="light"] .page-investors .content-section h2 {
  color: #0f172a;
}

/* 9) Impact page – same protection */
[data-theme="light"] .page-impact .content-section p,
[data-theme="light"] .page-impact .content-section li {
  color: #334155;
}
[data-theme="light"] .page-impact .content-section h2 {
  color: #0f172a;
}
[data-theme="light"] .emergency-callout {
  background: #e0f2fe;
  border-color: #1d4ed8;
}

[data-theme="light"] .emergency-callout.is-active {
  background: #dcfce7;
  border-color: #15803d;
}

[data-theme="light"] .emergency-callout__badge {
  border-color: rgba(15,23,42,0.2);
  color: #0f172a;
}
[data-theme="light"] .hero-actions .btn-secondary:visited {
  color: #0f172a;
}

[data-theme="light"] .hero-actions .btn-primary:visited {
  color: #ffffff;
}
