/* ==========================================================================
   FIT EZ - LIGHT THEME + THEME TOGGLE
   1. Theme toggle button (both modes)
   2. Light-mode extras: only things the dark redesign introduced that the
      original light palette (style.css + page CSS) does not already cover.
   Light mode = css/theme-dark.css switched off (see js/theme-init.js), so the
   brand's original light design shows through; everything below is scoped to
   html[data-theme="light"] and cannot affect dark mode.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme toggle button
   -------------------------------------------------------------------------- */
.theme-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: 0.75rem;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  color: #95BD3E;
  background: rgba(23, 79, 54, 0.28);
  border: 1px solid rgba(149, 189, 62, 0.30);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  background: rgba(149, 189, 62, 0.20);
  border-color: #95BD3E;
  transform: rotate(-12deg);
}

.theme-toggle:focus-visible {
  outline: 2px solid #95BD3E;
  outline-offset: 3px;
}

/* Show the icon of the mode you would switch TO: sun while dark, moon while light. */
.theme-toggle .theme-icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .theme-icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .theme-icon-moon { display: inline-block; }

html[data-theme="light"] .theme-toggle {
  color: #174F36;
  background: #FFFFFF;
  border-color: #D5DFCC;
  box-shadow: 0 2px 10px rgba(23, 79, 54, 0.10);
}

html[data-theme="light"] .theme-toggle:hover {
  background: #F0F5EA;
  border-color: #174F36;
}

html[data-theme="light"] .theme-toggle:focus-visible {
  outline-color: #174F36;
}

/* Below the desktop breakpoint the nav collapses into the drawer: keep the
   toggle in the header bar, immediately left of the hamburger button. */
@media (max-width: 1023px) {
  .nav-container .theme-toggle {
    order: 9;
    margin-left: auto !important;
    margin-right: 0;
  }

  .nav-container .mobile-nav-toggle {
    margin-left: 0.6rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .theme-toggle:hover {
    transition: none;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   2. LIGHT MODE EXTRAS (everything below only applies in light mode)
   -------------------------------------------------------------------------- */

/* 2a. Page canvas: soft brand-tinted wash instead of the dark video frame.
   The ambient glows and particle canvas from components already supply the
   subtle green life; this just guarantees an even, warm base. */
html[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 50% at 85% -10%, rgba(149, 189, 62, 0.14), transparent 60%),
    radial-gradient(ellipse 70% 45% at 5% 8%, rgba(23, 79, 54, 0.07), transparent 60%),
    #F3F5EF;
  background-attachment: fixed;
}

/* 2b. Home hero (cinematic scroll intro).
   The kettlebell intro stays on its black stage, then fades into the light
   page. The headline card becomes light glass with dark text. */
html[data-theme="light"] .hero-reveal-stage .hero-content {
  background: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(23, 79, 54, 0.14);
  box-shadow: 0 24px 60px rgba(23, 79, 54, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

html[data-theme="light"] .hero-h1.liquid-headline { color: #17231C !important; }

html[data-theme="light"] .hero-h1.liquid-headline em,
html[data-theme="light"] .hero-h1.liquid-headline .liquid-accent {
  color: #5E8C1F !important;
  text-shadow: none;
}

html[data-theme="light"] .liquid-char.is-hovered {
  color: #174F36 !important;
  text-shadow: 0 0 18px rgba(149, 189, 62, 0.45);
}

html[data-theme="light"] .hero-h1.liquid-headline em .liquid-char.is-hovered,
html[data-theme="light"] .hero-h1.liquid-headline .liquid-accent .liquid-char.is-hovered {
  color: #3F6B10 !important;
  text-shadow: 0 0 22px rgba(149, 189, 62, 0.6);
}

html[data-theme="light"] .hero-reveal-stage .hero-tagline,
html[data-theme="light"] .hero-reveal-stage .hero-proof-item { color: #3D5243 !important; }

html[data-theme="light"] .hero-reveal-stage .hero-proof-item i { color: #5E8C1F !important; }

html[data-theme="light"] .hero-reveal-stage .btn-outline-forest {
  color: #174F36;
  border-color: rgba(23, 79, 54, 0.55);
  background: rgba(255, 255, 255, 0.65);
}

html[data-theme="light"] .hero-reveal-stage .btn-outline-forest:hover {
  color: #174F36;
  background: rgba(23, 79, 54, 0.08);
  border-color: #174F36;
}

html[data-theme="light"] .hero-reveal-stage .btn-brochure {
  color: #174F36;
  border-color: rgba(23, 79, 54, 0.30);
  background: rgba(23, 79, 54, 0.05);
}

html[data-theme="light"] .hero-reveal-stage .btn-brochure:hover {
  color: #174F36;
  background: rgba(23, 79, 54, 0.10);
}

html[data-theme="light"] .hero-reveal-stage .hero-pricing-line span { color: #6B7F72; }
html[data-theme="light"] .hero-reveal-stage .hero-pricing-line strong { color: #174F36; }

@media (max-width: 768px) {
  html[data-theme="light"] .hero-reveal-stage .hero-content {
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 15px 45px rgba(23, 79, 54, 0.18) !important;
    border: 1px solid rgba(23, 79, 54, 0.16) !important;
  }
}

/* 2c. Careers page (written for the dark theme, so restate the form colours) */
html[data-theme="light"] #careers-form-wrapper .input-field {
  background: #FFFFFF;
  border: 1px solid #D5DFCC;
  color: var(--text-primary);
}

html[data-theme="light"] #careers-form-wrapper .input-field::placeholder { color: #8A9B8F; }
html[data-theme="light"] #careers-form-wrapper .input-field:hover { border-color: #AABFA0; }

html[data-theme="light"] #careers-form-wrapper .input-field:focus {
  background: #FFFFFF;
  border-color: #174F36;
  box-shadow: 0 0 0 3px rgba(23, 79, 54, 0.12);
}

html[data-theme="light"] #careers-form-wrapper .input-field:focus-visible { outline-color: #174F36; }

html[data-theme="light"] #careers-form-wrapper .input-field:-webkit-autofill,
html[data-theme="light"] #careers-form-wrapper .input-field:-webkit-autofill:hover,
html[data-theme="light"] #careers-form-wrapper .input-field:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset;
  box-shadow: 0 0 0 1000px #FFFFFF inset;
}

html[data-theme="light"] #careers-form-wrapper select.input-field { color-scheme: light; }
html[data-theme="light"] #careers-form-wrapper select.input-field option { background: #FFFFFF; color: #17231C; }

html[data-theme="light"] #careers-form-wrapper input[type="file"].input-field::file-selector-button {
  color: #174F36;
  background: rgba(23, 79, 54, 0.08);
  border-color: rgba(23, 79, 54, 0.28);
}

html[data-theme="light"] #careers-form-wrapper input[type="file"].input-field:hover::file-selector-button {
  background: rgba(23, 79, 54, 0.14);
  border-color: rgba(23, 79, 54, 0.5);
}

html[data-theme="light"] #careers-form-wrapper .form-status.success {
  background: rgba(23, 79, 54, 0.08);
  border-color: rgba(23, 79, 54, 0.40);
  color: #174F36;
}

html[data-theme="light"] #careers-form-wrapper .form-status.error {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #B42318;
}

html[data-theme="light"] .careers-mail-link,
html[data-theme="light"] .careers-job-apply { color: #174F36; }
html[data-theme="light"] .careers-job-apply:hover,
html[data-theme="light"] .careers-job-apply:focus-visible { color: #2A7A52; }
html[data-theme="light"] .careers-job-apply:focus-visible { outline-color: #174F36; }
html[data-theme="light"] .careers-badge { color: #FFFFFF; background: #174F36; }
html[data-theme="light"] .careers-tag { border-color: rgba(23, 79, 54, 0.25); }

/* 2d. Readability tuning (WCAG AA) for the original light palette.
   Only text/tint colours are darkened; hues stay on-brand. */
html[data-theme="light"] {
  --text-dimmed: #566B5E;      /* muted captions: 3.9:1 -> 5.6:1 on the page wash */
  --mint: #1A7350;             /* mint text on its own tint: 2.7:1 -> 5:1 */
  --cyan: #1A7350;
  --lime-hover: #43700E;       /* lime text on its tint: 2.6:1 -> 5:1 */
  --red-accent-hover: #43700E;
}

html[data-theme="light"] .about-member-role { color: #4C7A12; }

/* Lime buttons: dark forest text instead of white (2.2:1 -> 8:1) */
html[data-theme="light"] .btn-lime,
html[data-theme="light"] .btn-red,
html[data-theme="light"] .btn-lime:hover,
html[data-theme="light"] .btn-red:hover { color: #0F2A1D; }
html[data-theme="light"] #about-cta-btn { color: #0F2A1D !important; }

/* WhatsApp CTA: deeper brand green so white text is readable */
html[data-theme="light"] #final-cta-wa {
  background: #0F7B3E !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 16px rgba(15, 123, 62, 0.28) !important;
}

/* Pricing comparison: warm semantic colours, darkened for white cards */
html[data-theme="light"] .cost-comp-price[style*="e74c3c"] { color: #C0392B !important; }
html[data-theme="light"] .cost-comp-price[style*="e67e22"] { color: #AD5A0B !important; }
html[data-theme="light"] .cost-comp-price[style*="f39c12"] { color: #8F6200 !important; }

/* 2e. Mobile call bar: the original bar is dark with dark-green labels
   (unreadable). Light mode gets a light bar with forest / WhatsApp-green labels. */
html[data-theme="light"] #mobile-call-bar {
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-top: 1px solid #D5DFCC;
  box-shadow: 0 -6px 24px rgba(23, 79, 54, 0.12);
}

html[data-theme="light"] #mobile-call-btn { color: #174F36 !important; }
html[data-theme="light"] #mobile-call-btn:hover,
html[data-theme="light"] #mobile-call-btn:active { background: rgba(23, 79, 54, 0.07) !important; }
html[data-theme="light"] #mobile-wa-btn { color: #0F7B3E !important; }
html[data-theme="light"] #mobile-wa-btn:hover,
html[data-theme="light"] #mobile-wa-btn:active { background: rgba(15, 123, 62, 0.08) !important; }
html[data-theme="light"] .mcb-divider { background: #D5DFCC; }

/* 2f. FoodSwap "Popular swaps": the page forces these cards to pure black
   (a dark-mode choice). Give them a light surface in light mode. */
html[data-theme="light"] .instruction-card .quick-swap-card {
  background: #FFFFFF !important;
  border: 1px solid #D5DFCC;
}

html[data-theme="light"] .instruction-card .quick-swap-card:hover {
  background: #F0F5EA !important;
  border-color: #AABFA0;
}

/* 2g. Mobile drawer: dim the page behind it (this colour lived in the dark sheet) */
html[data-theme="light"] .nav-backdrop-overlay {
  background: rgba(23, 35, 28, 0.38);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

@media (max-width: 1023px) {
  html[data-theme="light"] .nav-menu {
    box-shadow: -12px 0 40px rgba(23, 79, 54, 0.18);
  }
}
