/* ═══════════════════════════════════════════════════════════
   EXCHANGE OFFERING — THEME OVERRIDES
   Dark is default (defined in each page's :root).
   Light mode activates when html[data-theme="light"].
   ═══════════════════════════════════════════════════════════ */

:root { color-scheme: dark; }

:root[data-theme="light"] {
  color-scheme: light;
  /* Shared semantic tokens */
  --bg: #f6f3ea;
  --bg-card: #ffffff;
  --bg-card-hover: #ece7d6;
  --gold: #8a6508;
  --gold-light: #a57a09;
  --gold-dim: rgba(138,101,8,0.12);
  --gold-glow: rgba(138,101,8,0.25);
  --text: #1a1d24;
  --text-dim: #5a5e68;
  --text-faint: #8a8e9a;
  --border: #d8d2c0;
  --floor-gray: #c8c2b2;
  --floor-gray-side: #b4ae9e;
  --floor-gray-bottom: #9a9484;
  --unit-2br: #8a6508;
  --unit-1br: #8a90a4;
  --unit-1br-hover: #6a7088;
  --corridor: #e8e3d2;

  /* Madison-corridor page tokens */
  --surface: #ffffff;
  --surface-2: #f0ece0;
  --surface-3: #e6e1d0;
  --border-light: #c4bea8;
  --text-muted: #5a5e68;
  --accent: #3558c5;
  --accent-light: #4a6fd8;
  --green: #148a5c;
  --green-dim: rgba(20,138,92,0.12);
  --hifi-orange: #b84420;
  --hifi-orange-dim: rgba(184,68,32,0.10);
  --hifi-teal: #0c5966;
  --hifi-teal-dim: rgba(12,89,102,0.10);
}

/* Nav glass backgrounds that were hardcoded in dark */
:root[data-theme="light"] nav {
  background: rgba(246,243,234,0.88) !important;
  border-bottom-color: var(--border) !important;
}
:root[data-theme="light"] .mobile-menu {
  background: rgba(246,243,234,0.97) !important;
  border-bottom-color: var(--border) !important;
}
:root[data-theme="light"] .mobile-menu a {
  border-bottom-color: rgba(0,0,0,0.06) !important;
}

/* Images: tame the historical photos that can feel harsh on cream */
:root[data-theme="light"] .hero-photo,
:root[data-theme="light"] img {
  filter: none;
}

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 32px; height: 32px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--gold-light);
  border-color: var(--gold);
  background: var(--gold-dim);
}
.theme-toggle svg { width: 15px; height: 15px; display: block; }
.theme-toggle .sun  { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme="light"] .theme-toggle .sun  { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

/* ── NAV RIGHT WRAPPER (holds links, toggle, hamburger) ── */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* On mobile, shrink gap for toggle beside hamburger */
@media (max-width: 768px) {
  .nav-controls { gap: 8px; }
  .theme-toggle { width: 30px; height: 30px; }
  .theme-toggle svg { width: 14px; height: 14px; }
}
