/* ─────────────────────────────────────────────────────────────
   FLUID® light mode
   Activated by <html data-theme="light"> (set by js/theme.js).
   Dark remains the default. Every rule is scoped to the light
   attribute, so dark mode is untouched.

   Lime / cyan are split into two roles in light mode:
     · ink  — when used as TEXT, they darken (#4A7300 / #00739E)
              so they stay readable on white (≥ 4.5:1 contrast)
     · fill — when used as a BACKGROUND (buttons, progress bar,
              cursor, pips) they stay bright brand lime, via
              var(--fill-lime, …) in the page styles.
   ───────────────────────────────────────────────────────────── */

html[data-theme="light"] {
  color-scheme: light;

  /* main site tokens (style.css / nav-footer.css) */
  --bg: #FFFFFF;
  --charcoal: #F6F6F3;
  --surface: #F4F4F1;
  --surface-2: #ECECE7;
  --text: #0B0B0B;
  --text-muted: rgba(11,11,11,0.70);
  --text-faint: rgba(11,11,11,0.58);
  --border: rgba(0,0,0,0.10);
  --border-strong: rgba(0,0,0,0.22);
  --lime: #4A7300;
  --cyan: #00739E;
  --orange: #B8400D;
  --red: #C62828;
  --purple: #5B3FD9;

  /* case-study tokens */
  --fluid-black: #FFFFFF;
  --fluid-bg: #FFFFFF;
  --fluid-charcoal: #F6F6F3;
  --fluid-surface: #F4F4F1;
  --fluid-surface-2: #ECECE7;
  --fluid-border: rgba(0,0,0,0.10);
  --fluid-border-strong: rgba(0,0,0,0.22);
  --fluid-text: #0B0B0B;
  --fluid-text-muted: rgba(11,11,11,0.70);
  --fluid-text-faint: rgba(11,11,11,0.58);
  --fluid-lime: #4A7300;
  --fluid-cyan: #00739E;
  --fluid-orange: #B8400D;
  --fluid-red: #C62828;
  --fluid-purple: #5B3FD9;

  /* no bright lime in light mode: fills, tints and glows use the olive accent */
  --fill-lime: #4A7300;
  --glow-lime: 74,115,0;

  /* Webflow-exported pages (blog, categories, fellows) */
  --background-color--background-black: #FFFFFF;
  --background-color--background-grey: #F2F2EF;
  --background-color--border: #E4E4DF;
  --text-color--text-white: #0B0B0B;
}

html[data-theme="light"] body { background-color: var(--bg); color: var(--text); }

/* ── Nav ──────────────────────────────────────────────────── */
html[data-theme="light"] nav { background: rgba(255,255,255,0.78); }
html[data-theme="light"] .nav-logo img { filter: brightness(0); }
html[data-theme="light"] .hover\:text-white:hover { color: #000; }
html[data-theme="light"] .nav-backdrop { background: rgba(0,0,0,0.25); }
@media (max-width: 767px) {
  html[data-theme="light"] .nav-links { background: rgba(255,255,255,0.98); }
}

/* ── Things that sit on top of photos/video stay light-on-dark ── */
html[data-theme="light"] .card-tag { background: rgba(8,8,8,0.72); }
html[data-theme="light"] .card-tag,
html[data-theme="light"] .card-tag.tag-lime,
html[data-theme="light"] .card-tag.tag-cyan { color: #F5F5F0 !important; }

html[data-theme="light"] .explore-card .card-meta .title { color: #F5F5F0; }
html[data-theme="light"] .explore-card .card-meta .cat,
html[data-theme="light"] .explore-card .card-meta .desc { color: rgba(245,245,240,0.78); }
html[data-theme="light"] .explore-card .card-meta .arrow { color: #fff; }

/* Sections laid over photos/video keep their dark-mode colours */
html[data-theme="light"] .on-media {
  --text: #F5F5F0; --text-muted: rgba(245,245,240,0.62); --text-faint: rgba(245,245,240,0.32);
  --lime: #F5F5F0; --cyan: #00D4FF; --border: rgba(255,255,255,0.08); --border-strong: rgba(255,255,255,0.18);
  color: #F5F5F0;
}

/* ── Case-study details ───────────────────────────────────── */
html[data-theme="light"] .stage-frame img,
html[data-theme="light"] .explore-card img { filter: none; }
html[data-theme="light"] body::before { opacity: .035; mix-blend-mode: multiply; }
html[data-theme="light"] .cursor { mix-blend-mode: normal; background: #0B0B0B; }
html[data-theme="light"] .cursor.big { background: rgba(74,115,0,0.35); }
html[data-theme="light"] ::selection { background: #4A7300; color: #fff; }
html[data-theme="light"] .vplayer .poster { background-color: #E6E6E1; }
html[data-theme="light"] .shot-ph {
  background: repeating-linear-gradient(135deg, rgba(0,0,0,.035) 0 12px, transparent 12px 24px), var(--fluid-surface);
}

/* soft brand glows read too faint on white — give them a touch more body */
html[data-theme="light"] .cover::before,
html[data-theme="light"] .anchor::before,
html[data-theme="light"] .closing::before { opacity: .9; }

/* ── Theme toggle button (in the nav) ─────────────────────── */
.theme-toggle {
  justify-self: start;
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text);
  border: 0.5px solid var(--border-strong);
  cursor: pointer; padding: 0;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.theme-toggle:hover { background: #C6FF00; color: #000; border-color: #C6FF00; transform: rotate(-12deg); }
html[data-theme="light"] .theme-toggle:hover { background: #4A7300; color: #fff; border-color: #4A7300; }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* smooth switch, without animating on first paint */
html.theme-anim, html.theme-anim * {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease !important;
}

/* Olive fills carry white text (black-on-lime becomes white-on-olive, 5.6:1) */
html[data-theme="light"] .btn-pill,
html[data-theme="light"] .filter-pill.active,
html[data-theme="light"] .card-arrow,
html[data-theme="light"] .explore-link,
html[data-theme="light"] .explore-card:hover .card-meta .arrow,
html[data-theme="light"] a.footer-cta:hover,
html[data-theme="light"] .outlets a:hover,
html[data-theme="light"] .vplayer:hover .play,
html[data-theme="light"] .vplayer .fs-btn:hover,
html[data-theme="light"] .feature-frame:hover .play,
html[data-theme="light"] .feature-frame .fs-btn:hover { color: #fff; }
html[data-theme="light"] a.footer-cta:hover,
html[data-theme="light"] .outlets a:hover { border-color: #4A7300; }
html[data-theme="light"] .explore-link:hover { box-shadow: 0 8px 28px rgba(74,115,0,.22); }
