/* Light theme overrides and premium tweaks */
html[data-theme="light"] {
  color-scheme: light;
  /* Premium light tokens */
  --text: #000000;          /* true black for max readability */
  --text-muted: #000000;    /* no gray, use black */
  --surface: rgba(255,255,255,0.42);
  --surface-strong: rgba(255,255,255,0.58);
  --border: rgba(15,23,42,0.08);
  --bg-grad: linear-gradient(180deg, #ffffff, #ffffff);
  /* Re-map legacy color vars used in dark CSS */
  --white: var(--text);
  --black: #ffffff;
  --muted: var(--text-muted);
}

/* Smooth palette + text transitions */
html[data-theme="light"] body {
  color: var(--text);
  transition: background .35s ease, color .2s ease;
}

/* Header and nav (glassy) */
html[data-theme="light"] .site-header {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
html[data-theme="light"] .nav a { color: var(--text); opacity: .88; }
html[data-theme="light"] .nav a:hover { opacity: 1; text-shadow: none; }

/* Ticker (lighter, readable) */
html[data-theme="light"] .top-ticker {
  color: var(--text);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

/* Section titles: black with green accent (no gradients) */
html[data-theme="light"] .section-title {
  color: #000;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  text-shadow: none;
}
html[data-theme="light"] .section-title .accent { color: var(--green); }

/* Hero overrides: High contrast and clarity */
html[data-theme="light"] .hero-video { display: block; opacity: 1; mix-blend-mode: normal; filter: contrast(1.05); z-index: 0; }
html[data-theme="light"] .hero { background: #ffffff; }
html[data-theme="light"] .hero::before, html[data-theme="light"] .hero::after { display: none; }

html[data-theme="light"] .pane--before { background: rgba(241, 245, 249, 0.02); border-right: 1px solid rgba(0,0,0,0.05); position: relative; z-index: 2; }
html[data-theme="light"] .pane--after { background: rgba(255, 255, 255, 0.02); position: relative; z-index: 2; }
html[data-theme="light"] .pane-content { backdrop-filter: none; position: relative; z-index: 3; }

html[data-theme="light"] .headline { color: #ffffff !important; text-shadow: 0 2px 10px rgba(0,0,0,0.3) !important; font-weight: 800; }
html[data-theme="light"] .sub-h { color: #ffffff !important; opacity: 0.95; }
html[data-theme="light"] .ticks li { color: #ffffff !important; text-shadow: 0 1px 4px rgba(0,0,0,0.3) !important; }
html[data-theme="light"] .accent { text-shadow: 0 0 20px rgba(0,255,65,0.4) !important; color: var(--green) !important; }
html[data-theme="light"] .divider .fifty { color: #ffffff !important; text-shadow: none !important; background: rgba(0,0,0,0.2); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; padding: 10px; }
html[data-theme="light"] .divider-core { opacity: 0.4; filter: none; }

/* Labels and metrics in hero */
html[data-theme="light"] .hero .label { color: #ffffff !important; opacity: 0.85; }
html[data-theme="light"] .hero .counter { color: #ffffff !important; }
html[data-theme="light"] .hero .counter--green { color: var(--green) !important; }

/* Flags and specific hero text */
html[data-theme="light"] .flag--smooth { color: #ffffff !important; background: rgba(0,255,65,0.15); border-color: rgba(255,255,255,0.3); }
html[data-theme="light"] .main-h { color: #ffffff !important; text-shadow: 0 2px 15px rgba(0,0,0,0.4) !important; }
html[data-theme="light"] .hero-seo p.sub-h { color: #ffffff !important; opacity: 0.9; }

/* Bottom bar in hero */
html[data-theme="light"] .hero-ctas + p, 
html[data-theme="light"] .cta-actions + p { color: #ffffff !important; opacity: 0.95; font-weight: 500; }

/* No-grays overrides for labels/meta text */
html[data-theme="light"] .label,
html[data-theme="light"] .control label,
html[data-theme="light"] .stat-label,
html[data-theme="light"] .holo-card p.muted,
html[data-theme="light"] .footer-brand .sub,
html[data-theme="light"] .newsletter label { color: #000 !important; }

/* Accent emphasis stays green */
html[data-theme="light"] .accent,
html[data-theme="light"] .stat-value--green { color: var(--green) !important; text-shadow: none; }

/* Links readable on white */
html[data-theme="light"] a { color: #000; }
html[data-theme="light"] .nav a.pill.cta { color: #00110a; }

/* Mobile nav overrides for light mode */
@media (max-width: 850px) {
  html[data-theme="light"] .nav a { color: #ffffff !important; }
  html[data-theme="light"] .menu-toggle span { background-color: #ffffff !important; }
}

html[data-theme="light"] .pane--before::after { background: linear-gradient(90deg, transparent, rgba(255,0,81,.05)); }
html[data-theme="light"] .pane--after::before { background: linear-gradient(90deg, rgba(0,255,65,.05), transparent); }

/* Final CTA section: use white copy on dark image overlay */
html[data-theme="light"] .section--final .section-title,
html[data-theme="light"] .section--final .lead,
html[data-theme="light"] .section--final .ticks li,
html[data-theme="light"] .section--final .wrap > p { color: #fff !important; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
html[data-theme="light"] .section--final .btn--ghost { color: #fff; border-color: rgba(255,255,255,.8); background: transparent; }
html[data-theme="light"] .section--final .cta-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
html[data-theme="light"] .section--final .badge-pill { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.85); color: #fff; background: rgba(255,255,255,.08); font-weight: 600; font-size: 13px; }
html[data-theme="light"] .section--final { isolation: isolate; position: relative; }
html[data-theme="light"] .section--final .cta-badges { position: relative; z-index: 3; margin-top: 16px; }
html[data-theme="light"] .hero { position: relative; z-index: 0; }

/* Divider / fifty treatment to read on light */
html[data-theme="light"] .divider-core { filter: drop-shadow(0 0 6px rgba(20,140,255,.25)); }
html[data-theme="light"] .divider .fifty { color: #0b1b2b; text-shadow: 0 0 10px rgba(0,255,65,.25), 0 0 8px rgba(20,140,255,.2); }

/* Theme toggle */
.theme-toggle { margin-left: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.75); color: var(--text); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; width: 100px; }
html[data-theme="dark"] .theme-toggle { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #e3eaec; }
.theme-toggle:hover { filter: brightness(1.02); }
.theme-toggle .icon { font-size: 18px; line-height: 1; }
.theme-toggle .label { transform: translateY(2.5px); }

/* Forms and ghost buttons tuned for light */
html[data-theme="light"] .btn--ghost { color: var(--text); border: 1px solid var(--border); background: rgba(255,255,255,.7); }
html[data-theme="light"] .control input[type=number],
html[data-theme="light"] .control select,
html[data-theme="light"] .pricing-calc input,
html[data-theme="light"] .newsletter input {
  background: rgba(255,255,255,.9);
  color: var(--text);
  border: 1.5px solid rgba(0,0,0,0.25);
}
html[data-theme="light"] .flag--glitch { color: var(--text); border-color: rgba(15,23,42,0.2); }
html[data-theme="light"] .stat-value { color: #000; text-shadow: none; }
html[data-theme="light"] .stat { border: 1.5px solid rgba(0,0,0,0.35); background: rgba(255,255,255,0.8); }
html[data-theme="light"] .section--bleed .bleed-item,
html[data-theme="light"] .drain-item,
html[data-theme="light"] .drain-total { border: 1.5px solid rgba(0,0,0,0.25); background: rgba(255,255,255,0.6); }
/* Services cards: force black copy in light mode */
html[data-theme="light"] .holo-card h4,
html[data-theme="light"] .holo-card p,
html[data-theme="light"] .holo-card li { color: #000; }
/* Bleed section light styles */
html[data-theme="light"] .section--bleed .bleed-item { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); }
html[data-theme="light"] .section--bleed label { color: #000; }
html[data-theme="light"] .section--bleed input[type=number] { background: #fff; color: #000; border-color: rgba(0,0,0,.12); }
html[data-theme="light"] .section--bleed .bleed-total .total { color: var(--green); }
/* AI Report light styles */
html[data-theme="light"] .section--ai .btn--ghost { border-color: rgba(0,0,0,0.6); color: #000; font-weight: 700; border-width: 2px; }
html[data-theme="light"] .section--ai .btn--ghost:hover { background: rgba(0,0,0,0.05); border-color: #000; }
html[data-theme="light"] .section--ai .ai-controls textarea { background: #fff; color: #000; border-color: rgba(0,0,0,.12); }
html[data-theme="light"] .section--ai .ai-field input[type=text],
html[data-theme="light"] .section--ai .ai-field select { background: #fff; color: #000; border-color: rgba(0,0,0,.12); }
html[data-theme="light"] .section--ai .ai-key input { background: #fff; color: #000; border-color: rgba(0,0,0,.12); }
html[data-theme="light"] .section--ai .ai-loading { border-color: rgba(0,0,0,.2); }
html[data-theme="light"] .section--ai .ai-card { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.08); color: #000; }
html[data-theme="light"] .section--ai .ai-error { color: #a40000; background: rgba(255,0,0,.08); border-color: rgba(255,0,0,.25); }
html[data-theme="light"] .section--ai .chips label { border-color: rgba(0,0,0,.12); background: rgba(0,0,0,.03); color: #000; }
/* Footer social links */
html[data-theme="light"] .site-footer .social-link { color: #000; text-decoration: none; font-weight: 600; }
html[data-theme="light"] .site-footer .social-link:hover { color: var(--green); text-decoration: underline; }
html[data-theme="light"] .site-footer .dot { color: #000; margin: 0 6px; }
/* Footer light mode visibility (Dark variation) */
html[data-theme="light"] .site-footer { background: #060606 !important; border-top: 1px solid rgba(255,255,255,0.1) !important; color: #cbd3d7 !important; }
html[data-theme="light"] .site-footer h5 { color: #ffffff !important; }
html[data-theme="light"] .site-footer a { color: #cbd3d7 !important; opacity: 0.8; }
html[data-theme="light"] .site-footer a:hover { opacity: 1; color: var(--cyan) !important; }
html[data-theme="light"] .site-footer .bottom { border-top: 1px solid rgba(255,255,255,0.05); color: #9aa0a6; }
html[data-theme="light"] .site-footer .sub { color: #9aa0a6 !important; }
html[data-theme="light"] .site-footer .logo-glyph { color: var(--green); }

/* Case studies: force black text for readability */
html[data-theme="light"] .case .case-head,
html[data-theme="light"] .case .case-before,
html[data-theme="light"] .case .case-after,
html[data-theme="light"] .case .case-foot { color: #000; }

/* Diff cards (Guarantee section) light mode */
html[data-theme="light"] .diff-card h4,
html[data-theme="light"] .diff-card p { color: #000000 !important; }

/* Testimonials light mode */
html[data-theme="light"] .testimonial-card blockquote { color: #000000 !important; opacity: 1; }
html[data-theme="light"] .testimonial-card cite { color: #000000 !important; font-weight: 700; }

/* FAQ light mode */
html[data-theme="light"] .faq summary { color: #000000 !important; font-weight: 700; }
html[data-theme="light"] .faq p { color: #000000 !important; opacity: 1; }

/* Lead text light mode */
html[data-theme="light"] .lead { color: #000000 !important; opacity: 1; }
html[data-theme="light"] .bold-line { color: #000000 !important; opacity: 1; }
html[data-theme="light"] .section--guarantee li { color: #000000 !important; font-weight: 500; }
