/* ──────────────────────────────────────────────────────────────
   TPF — SHARED THEME (light/dark toggle + light mode overrides)
   Loaded on every page. Toggle button is auto-injected by theme.js.
   ────────────────────────────────────────────────────────────── */

/* ── Toggle button ───────────────────────────────────────────── */
@keyframes subtle-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.nav-theme {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.9);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  animation: subtle-pulse 2.5s ease-in-out infinite;
}
.nav-theme:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.32); }
.nav-theme:active {
  animation-play-state: paused;
  transform: scale(0.94) !important;
}
.nav-theme-icon {
  width: 15px; height: 15px;
  position: absolute;
  transition: opacity 0.2s ease, transform 0.25s ease;
}
.nav-theme-sun  { opacity: 0; transform: rotate(-40deg) scale(0.7); }
body.theme-light .nav-theme-moon { opacity: 0; transform: rotate(40deg) scale(0.7); }
body.theme-light .nav-theme-sun  { opacity: 1; transform: rotate(0) scale(1); }

/* Desktop placement: sits inline before "Join TPF" CTA group */
.nav-theme-slot {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
}

/* Mobile placement: tighter spacing next to hamburger */
@media (max-width: 900px) {
  .nav-theme { width: 36px; height: 36px; }
  .nav-theme-slot { margin-right: 6px; }
}

/* ── LIGHT MODE — surface inversions ─────────────────────────── */
body.theme-light {
  --ink: #0a0a0a;
  --ink-soft: #2a2a2a;
  --grey-1: #454545;
  --grey-2: #666666;
  --grey-3: #d2d2cd;
  --line: rgba(0,0,0,0.08);
  --bg: #fafaf7;
  --bg-soft: #f4f4f1;
  --bg-card: #ffffff;
  --accent: #000000;
  background: #fafaf7;
  color: #0a0a0a;
}

/* Page-level surfaces */
body.theme-light .stage,
body.theme-light .panel-right,
body.theme-light .panel-left { background: #fafaf7; }

/* Hero text */
body.theme-light .brand-white,
body.theme-light .brand-layer { color: #0a0a0a; }
body.theme-light .brand-sub { color: rgba(10,10,10,0.7); }

/* Nav — text always reads against page bg */
body.theme-light .nav,
body.theme-light .nav-trigger,
body.theme-light .nav-brand,
body.theme-light .nav-brand .brand-name,
body.theme-light .mi-title,
body.theme-light .mi-sub { color: #0a0a0a; }
body.theme-light .nav-trigger:hover,
body.theme-light .nav-item:hover .nav-trigger {
  color: #0a0a0a;
  background: rgba(0,0,0,0.06);
}
body.theme-light .nav-trigger:focus,
body.theme-light .nav-trigger:active { color: #0a0a0a; }
body.theme-light .nav-brand .brand-mark { background: #0a0a0a; color: #fafaf7; }
body.theme-light .nav-menu {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
body.theme-light .nav-menu a { color: #0a0a0a; }
body.theme-light .nav-menu a:hover { background: rgba(0,0,0,0.04); color: #0a0a0a; }
body.theme-light .nav-menu a:active,
body.theme-light .nav-menu a:focus { color: #0a0a0a; }
body.theme-light .nav-menu .mi-title { color: #0a0a0a; }
body.theme-light .nav-menu .mi-sub { color: rgba(10,10,10,0.55); }
body.theme-light .nav-login { color: rgba(10,10,10,0.7); }
body.theme-light .nav-login:hover,
body.theme-light .nav-login:active,
body.theme-light .nav-login:focus { color: #0a0a0a; }

/* Nav back arrow (subpages) */
body.theme-light .nav-back { color: #0a0a0a; }
body.theme-light .nav-back:active { background: rgba(0,0,0,0.06); }

/* Toggle button — inverted */
body.theme-light .nav-theme {
  color: #0a0a0a;
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
}
body.theme-light .nav-theme:hover {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.35);
}

/* Burger lines */
body.theme-light .nav-burger span { background: #0a0a0a; }
body.theme-light .nav-burger.open span { background: #0a0a0a; }

/* Mobile menu drawer */
body.theme-light .mobile-menu { background: rgba(250,250,247,0.98); }
body.theme-light .mm-link,
body.theme-light .mm-sublink,
body.theme-light .mm-group-trigger,
body.theme-light .mm-back-btn,
body.theme-light .mm-global-back { color: #0a0a0a; }
body.theme-light .mm-link:active,
body.theme-light .mm-group-trigger:active { color: rgba(10,10,10,0.5); }
body.theme-light .mm-sublink:active { color: rgba(10,10,10,0.5); }
body.theme-light .mm-sublink-desc { color: rgba(10,10,10,0.5); }
body.theme-light .mm-group-content { border-left-color: rgba(0,0,0,0.08); }
body.theme-light .mm-group-trigger .caret { color: #0a0a0a; }
body.theme-light .mm-cta { background: #0a0a0a; color: #fff; }
body.theme-light .mm-cta:hover { background: #1a1a1a; }
body.theme-light .mm-login { color: rgba(10,10,10,0.6); }

/* ── Subpage nav (.lnav) — light mode ────────────────────────── */
body.theme-light .lnav {
  background: rgba(250,250,247,0.72);
  border-bottom-color: rgba(0,0,0,0.08);
}
body.theme-light .lnav-brand,
body.theme-light .lnav-brand .mark { color: #0a0a0a; }
body.theme-light .lnav-brand .mark { background: #0a0a0a; color: #fafaf7; }
body.theme-light .lnav-trig { color: rgba(10,10,10,0.7); }
body.theme-light .lnav-trig:hover {
  color: #0a0a0a;
  background: rgba(0,0,0,0.05);
}
body.theme-light .lnav-trig:active,
body.theme-light .lnav-trig:focus { color: #0a0a0a; }
body.theme-light .lnav-menu {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}
body.theme-light .lnav-menu a:hover { background: rgba(0,0,0,0.04); }
body.theme-light .lmi-title { color: #0a0a0a; }
body.theme-light .lmi-sub { color: rgba(10,10,10,0.55); }
body.theme-light .lnav-login { color: rgba(10,10,10,0.7); }
body.theme-light .lnav-login:hover {
  color: #0a0a0a;
  background: rgba(0,0,0,0.05);
}
body.theme-light .lnav-signup { background: #0a0a0a; color: #fff; }
body.theme-light .lnav-signup:hover { background: #1a1a1a; }

/* Hero glow + 3D — hide glow in light mode for a clean look. */
body.theme-light .hero-glow { opacity: 0; }
body.theme-light #hero-three { opacity: 1; }
body.theme-light .film-grain { opacity: 0; }      /* grain is dark, hide on light */

/* Intro band (homepage) */
body.theme-light .ib-headline { color: #0a0a0a; }
body.theme-light .ib-body p { color: rgba(10,10,10,0.62); }
body.theme-light .ib-body p:last-of-type { color: rgba(10,10,10,0.88); }
body.theme-light .ib-signature { color: #0a0a0a; }
body.theme-light .ib-cta {
  color: #0a0a0a;
  border-color: rgba(0,0,0,0.22);
  background: transparent;
}
body.theme-light .ib-cta:hover {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.45);
}
body.theme-light .ib-divider-line { background: rgba(0,0,0,0.1); }
body.theme-light .ib-divider-label { color: rgba(0,0,0,0.4); }
body.theme-light .ib-grid { border-color: rgba(0,0,0,0.1); }
body.theme-light .ib-card {
  background: transparent;
  border-right-color: rgba(0,0,0,0.08);
  border-bottom-color: rgba(0,0,0,0.08);
}
body.theme-light .ib-card-icon { color: rgba(10,10,10,0.8); border-color: rgba(0,0,0,0.15); }
body.theme-light .ib-card:hover .ib-card-icon { color: #000; border-color: rgba(0,0,0,0.4); }
body.theme-light .ib-card-tag { color: rgba(10,10,10,0.42); }
body.theme-light .ib-arrow { color: rgba(10,10,10,0.4); }
body.theme-light .ib-card-title { color: rgba(10,10,10,0.92); }
body.theme-light .ib-card-desc { color: rgba(10,10,10,0.55); }

/* Social strip (Watch a few videos) */
body.theme-light .ss-title { color: #0a0a0a; }
body.theme-light .ss-sub { color: rgba(10,10,10,0.55); }
body.theme-light .ss-frame {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}
body.theme-light .ss-card.is-active .ss-frame {
  border-color: rgba(0, 0, 0, 0.18) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08) !important;
}

/* Welcome video card (homepage hero) */
body.theme-light .wv-title { color: #0a0a0a; }
body.theme-light .wv-label { color: rgba(10,10,10,0.55); }
body.theme-light .wv-watch-btn {
  color: #0a0a0a;
  border-color: rgba(0,0,0,0.25);
}
body.theme-light .wv-watch-btn:hover {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.55);
}
body.theme-light .wv-watch-btn.wv-watch-btn--fill {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}
body.theme-light .wv-watch-btn.wv-watch-btn--fill:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

/* Inline footer nav */
body.theme-light .footer-nav,
body.theme-light .fn-link,
body.theme-light .fn-trigger,
body.theme-light .fn-sublink { color: #0a0a0a; }
body.theme-light .fn-sub-desc { color: rgba(10,10,10,0.55); }
body.theme-light .fn-content { border-color: rgba(0,0,0,0.08); }

/* Connect strip */
body.theme-light .tpf-connect,
body.theme-light .connect-eyebrow { color: rgba(10,10,10,0.45); }
body.theme-light .mc-socials a { color: #0a0a0a; }

/* ── Discord community page ──────────────────────────────────── */
body.theme-light .discord-hero { background: transparent; }
body.theme-light .discord-hero h1 { color: #0a0a0a; }
body.theme-light .discord-hero .lead { color: rgba(10,10,10,0.62); }
body.theme-light .get-started-text { color: #0a0a0a; }

body.theme-light .ti-title,
body.theme-light .ti-title-accent { color: #0a0a0a; }
body.theme-light .ti-sub { color: rgba(10,10,10,0.6); }
body.theme-light .ti-eyebrow {
  color: rgba(10,10,10,0.6);
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.02);
}
body.theme-light .ti-values {
  background: transparent;
}
body.theme-light .ti-value-box {
  border-left-color: rgba(0,0,0,0.15);
}
body.theme-light .ti-value-box h4 {
  color: #0a0a0a;
}
body.theme-light .ti-value-box p {
  color: rgba(10,10,10,0.62);
}
@media (max-width: 768px) {
  body.theme-light .ti-value-box {
    border-left-color: transparent;
    border-top-color: rgba(0,0,0,0.12);
  }
}

/* Bento */
body.theme-light .bento-ico { color: rgba(10,10,10,0.85); }
body.theme-light .bn-from { color: rgba(10,10,10,0.4); }
body.theme-light .bn-to { color: #0a0a0a; }
body.theme-light .scale-card .bn-to { color: #16a34a; }   /* keep the green pop */
body.theme-light .bn-arrow { color: rgba(10,10,10,0.5); }
body.theme-light .with-vline::after,
body.theme-light .with-hline::before { background: rgba(0,0,0,0.1); }
body.theme-light .bento-foot { border-top-color: rgba(0,0,0,0.18); }
body.theme-light .bento-foot h3 { color: #0a0a0a; }
body.theme-light .bento-foot p { color: rgba(10,10,10,0.6); }
body.theme-light .milly-head { border-bottom-color: rgba(0,0,0,0.18); }
body.theme-light .milly-pre { color: rgba(10,10,10,0.5); }
body.theme-light .milly-name { color: #0a0a0a; }
body.theme-light .milly-tag { color: rgba(10,10,10,0.6); }
body.theme-light .milly-sub h4 { color: #0a0a0a; }
body.theme-light .milly-sub p { color: rgba(10,10,10,0.6); }
body.theme-light .milly-sub { border-left-color: rgba(0,0,0,0.18); border-top-color: rgba(0,0,0,0.18); }

/* Live Q&A pill — keep magenta */
body.theme-light .live-schedule { color: rgba(10,10,10,0.65); }

/* Pricing — Pro is BLACK, Starter is WHITE (handled in pricing.css);
   light-mode tweak only the dark text/borders so it still reads */
body.theme-light .pricing-grid .price-box.starter-card {
  /* starter is the white card by default — leave alone */
}
body.theme-light .pricing-grid .price-box.pro-card {
  /* pro is the black card by default — leave alone */
}

/* FAQ */
body.theme-light .faq-eyebrow { color: rgba(10,10,10,0.5); }
body.theme-light .faq-title { color: #0a0a0a; }
body.theme-light .faq-item { border-color: rgba(0,0,0,0.1); }
body.theme-light .faq-item summary { color: #0a0a0a; }
body.theme-light .faq-item summary:hover { color: rgba(10,10,10,0.65); }
body.theme-light .faq-caret { color: rgba(10,10,10,0.5); }
body.theme-light .faq-item[open] .faq-caret { color: #0a0a0a; }
body.theme-light .faq-item p { color: rgba(10,10,10,0.6); }

/* ── Generic subpages (about, partners, etc.) ───────────────── */
body.theme-light .page-hero h1,
body.theme-light .page-hero p,
body.theme-light h1, body.theme-light h2, body.theme-light h3,
body.theme-light h4, body.theme-light h5 { color: #0a0a0a; }
body.theme-light .eyebrow { color: rgba(10,10,10,0.5); }
body.theme-light p { color: rgba(10,10,10,0.65); }
body.theme-light .btn-w { background: #0a0a0a; color: #fff; }
body.theme-light .btn-w:hover { background: #1a1a1a; }
body.theme-light .link-arrow { color: #0a0a0a; }

/* ── Welcome page ────────────────────────────────────────────── */
body.theme-light .wlc-stage { background: #fafaf7; }
body.theme-light .wlc-stage::before { opacity: 0.4; }
body.theme-light .wlc-brand { color: #0a0a0a; }
body.theme-light .wlc-brand-mark { background: #0a0a0a; color: #fafaf7; }
body.theme-light .wlc-help { color: rgba(10,10,10,0.5); }
body.theme-light .wlc-help:hover { color: #0a0a0a; }
body.theme-light h1.wlc-title { color: #0a0a0a; }
body.theme-light .wlc-title .serif { color: rgba(10,10,10,0.65); }
body.theme-light .wlc-lead { color: rgba(10,10,10,0.62); }
body.theme-light .wlc-cta-card {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}
body.theme-light .wlc-cta-body h3 { color: #0a0a0a; }
body.theme-light .wlc-cta-body p { color: rgba(10,10,10,0.6); }
body.theme-light .wlc-cta-btn { background: #0a0a0a; color: #fff; }
body.theme-light .wlc-cta-btn:hover { background: #1a1a1a; }
body.theme-light .wlc-cta-note { color: rgba(10,10,10,0.5); }
body.theme-light .wlc-steps-head { color: rgba(10,10,10,0.5); }
body.theme-light .wlc-steps { border-color: rgba(0,0,0,0.08); }
body.theme-light .wlc-step { border-color: rgba(0,0,0,0.08); }
body.theme-light .wlc-step-num { color: #0a0a0a; border-color: rgba(0,0,0,0.2); }
body.theme-light .wlc-step-body h4 { color: #0a0a0a; }
body.theme-light .wlc-step-body p { color: rgba(10,10,10,0.6); }
body.theme-light .wlc-step-body a { color: #0a0a0a; border-bottom-color: rgba(0,0,0,0.3); }
body.theme-light .wlc-sign { color: rgba(10,10,10,0.6); border-color: rgba(0,0,0,0.08); }
body.theme-light .wlc-sign strong { color: #0a0a0a; }

/* ── Mobile Theme Toggle Placement & Sizing overrides ───────────────── */
@media (max-width: 768px) {
  .nav-theme {
    position: fixed !important;
    top: 23px !important;
    right: 68px !important;
    width: 30px !important;
    height: 30px !important;
    z-index: 1600 !important;
    border-radius: 999px !important;
    animation: subtle-pulse 2.5s ease-in-out infinite !important;
  }
  .nav-theme-icon {
    width: 13px !important;
    height: 13px !important;
  }
}

/* ── Mobile view light mode contrast overrides ──────────────────────── */
@media (max-width: 900px) {
  body.theme-light .brand-sub {
    color: rgba(10, 10, 10, 0.75) !important;
  }
  body.theme-light .wv-label {
    color: rgba(10, 10, 10, 0.55) !important;
  }
}

/* ── Light Mode Join TPF Button outline styling ──────────────────────── */
body.theme-light .nav-signup {
  border: 1.5px solid #000000 !important;
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}
body.theme-light .nav-signup:hover {
  background: #000000 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12) !important;
}
