/* =====================================================
   MH Theme — Phase 29 Global Light Mode + Component Hardening

   Root cause fixed here:
   several legacy .mht-* section files still painted hardcoded dark surfaces,
   hardcoded black/white overlays, local button/card colors, and section-only
   animations after the token layer was added. This file loads last and maps
   those legacy pieces back to the product tokens without renaming the old
   classes or redesigning the sections.
   ===================================================== */

/* ──────────────────────────────────────────────
   Global token roles for light mode
────────────────────────────────────────────── */
html[data-mht-theme-effective="light"],
html[data-mht-theme="light"] {
  --mht-light-page: #F6F2F7;
  --mht-light-page-soft: #FBF8FD;
  --mht-light-surface: rgba(255,255,255,.68);
  --mht-light-surface-solid: #FDFBFF;
  --mht-light-surface-tint: rgba(230,216,255,.42);
  --mht-light-card: rgba(255,255,255,.62);
  --mht-light-card-strong: rgba(246,242,247,.84);
  --mht-light-border: rgba(76,52,93,.18);
  --mht-light-border-strong: rgba(76,52,93,.28);
  --mht-light-text: #2F1F3A;
  --mht-light-text-soft: #4C345D;
  --mht-light-text-muted: #7C7284;
  --mht-light-glow: rgba(183,140,255,.20);

  --bg-primary: var(--mht-light-page);
  --bg-surface: var(--mht-light-surface-solid);
  --bg-elevated: #E6D8FF;
  --text-primary: var(--mht-light-text);
  --text-secondary: var(--mht-light-text-soft);
  --text-muted: var(--mht-light-text-muted);
  --text-faint: rgba(76,52,93,.58);
  --border: var(--mht-light-border);
  --border-faint: rgba(76,52,93,.12);
  --border-glass: rgba(76,52,93,.16);
}

/* ──────────────────────────────────────────────
   Header: keep it glass in every appearance mode
────────────────────────────────────────────── */
.mht-nav__inner {
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  backdrop-filter: saturate(140%) blur(18px);
  background:
    linear-gradient(180deg, rgba(20,16,23,.72), rgba(13,13,13,.56)),
    rgba(20,16,23,.54);
  border: 1px solid rgba(197,166,211,.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 18px 44px rgba(0,0,0,.26),
    0 0 38px rgba(183,140,255,.08);
}
html[data-mht-theme-effective="light"] .mht-nav__inner,
html[data-mht-theme="light"] .mht-nav__inner {
  background:
    linear-gradient(180deg, rgba(255,255,255,.58), rgba(246,242,247,.40)),
    rgba(246,242,247,.44);
  border-color: rgba(76,52,93,.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 18px 44px rgba(76,52,93,.12),
    0 0 34px rgba(183,140,255,.14);
}
html[data-mht-theme-effective="light"] .mht-nav__link,
html[data-mht-theme="light"] .mht-nav__link { color: rgba(47,31,58,.70); }
html[data-mht-theme-effective="light"] .mht-nav__link:hover,
html[data-mht-theme-effective="light"] .mht-nav__link.is-active,
html[data-mht-theme="light"] .mht-nav__link:hover,
html[data-mht-theme="light"] .mht-nav__link.is-active { color: #2F1F3A; }

/* ──────────────────────────────────────────────
   Global button system: one calm light-mode button family
────────────────────────────────────────────── */
html[data-mht-theme-effective="light"] .mht-u-btn--primary,
html[data-mht-theme="light"] .mht-u-btn--primary,
html[data-mht-theme-effective="light"] .mht-u-btn--secondary,
html[data-mht-theme="light"] .mht-u-btn--secondary,
html[data-mht-theme-effective="light"] .mht-u-btn--ghost,
html[data-mht-theme="light"] .mht-u-btn--ghost {
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(246,242,247,.68)) !important;
  border-color: rgba(142,99,163,.34) !important;
  color: #2F1F3A !important;
  box-shadow: 0 12px 30px rgba(76,52,93,.07), inset 0 1px 0 rgba(255,255,255,.84) !important;
}
html[data-mht-theme-effective="light"] .mht-u-btn--primary:hover,
html[data-mht-theme="light"] .mht-u-btn--primary:hover,
html[data-mht-theme-effective="light"] .mht-u-btn--secondary:hover,
html[data-mht-theme="light"] .mht-u-btn--secondary:hover,
html[data-mht-theme-effective="light"] .mht-u-btn--ghost:hover,
html[data-mht-theme="light"] .mht-u-btn--ghost:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(230,216,255,.74)) !important;
  border-color: rgba(142,99,163,.46) !important;
  color: #2F1F3A !important;
}
html[data-mht-theme-effective="light"] .mht-u-btn--primary .mht-u-btn__orb,
html[data-mht-theme="light"] .mht-u-btn--primary .mht-u-btn__orb {
  background: #E6D8FF !important;
  color: #2F1F3A !important;
}
/* Kill one-off pale CTA buttons trying to invent their own style. */
html[data-mht-theme-effective="light"] .mht-work__footer .mht-u-btn--primary,
html[data-mht-theme="light"] .mht-work__footer .mht-u-btn--primary,
html[data-mht-theme-effective="light"] .mht-footer .mht-u-btn--primary,
html[data-mht-theme="light"] .mht-footer .mht-u-btn--primary,
html[data-mht-theme-effective="light"] .mht-page-cta .mht-u-btn--primary,
html[data-mht-theme="light"] .mht-page-cta .mht-u-btn--primary { width: auto; }

/* ──────────────────────────────────────────────
   Light-mode component visibility
────────────────────────────────────────────── */
html[data-mht-theme-effective="light"] .mht-build__tab,
html[data-mht-theme="light"] .mht-build__tab { color: rgba(47,31,58,.62); }
html[data-mht-theme-effective="light"] .mht-build__tab.is-active,
html[data-mht-theme="light"] .mht-build__tab.is-active { color: #F6F2F7; }
html[data-mht-theme-effective="light"] .mht-build__grid,
html[data-mht-theme="light"] .mht-build__grid {
  background: rgba(76,52,93,.14);
  box-shadow: 0 18px 70px rgba(76,52,93,.10);
}
html[data-mht-theme-effective="light"] .mht-service-card,
html[data-mht-theme="light"] .mht-service-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(246,242,247,.66)),
    radial-gradient(circle at 88% 10%, rgba(230,216,255,.42), transparent 48%);
  color: #2F1F3A;
}
html[data-mht-theme-effective="light"] .mht-service-card:hover,
html[data-mht-theme="light"] .mht-service-card:hover { background-color: rgba(255,255,255,.86); }
html[data-mht-theme-effective="light"] .mht-service-card::before,
html[data-mht-theme="light"] .mht-service-card::before { background: linear-gradient(90deg, transparent, rgba(76,52,93,.18), transparent); }
html[data-mht-theme-effective="light"] .mht-service-card__tag,
html[data-mht-theme="light"] .mht-service-card__tag {
  background: rgba(230,216,255,.34);
  border-color: rgba(76,52,93,.10);
  color: rgba(76,52,93,.68);
}
html[data-mht-theme-effective="light"] .mht-service-card__footer,
html[data-mht-theme="light"] .mht-service-card__footer { border-top-color: rgba(76,52,93,.12); }
html[data-mht-theme-effective="light"] .mht-service-card__arrow,
html[data-mht-theme="light"] .mht-service-card__arrow { border-color: rgba(76,52,93,.18); color: #4C345D; background: rgba(255,255,255,.36); }
html[data-mht-theme-effective="light"] .mht-service-card:hover .mht-service-card__arrow,
html[data-mht-theme="light"] .mht-service-card:hover .mht-service-card__arrow { background: #8E63A3; border-color: #8E63A3; color: #F6F2F7; }

html[data-mht-theme-effective="light"] .mht-modal,
html[data-mht-theme="light"] .mht-modal { background: rgba(47,31,58,.42); }
html[data-mht-theme-effective="light"] .mht-build .mht-modal__dialog,
html[data-mht-theme="light"] .mht-build .mht-modal__dialog,
html[data-mht-theme-effective="light"] .mht-modal__dialog,
html[data-mht-theme="light"] .mht-modal__dialog {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,242,247,.86)),
    radial-gradient(circle at 78% 10%, rgba(230,216,255,.56), transparent 54%);
  border: 1px solid rgba(76,52,93,.16);
  box-shadow: 0 28px 90px rgba(47,31,58,.24), inset 0 1px 0 rgba(255,255,255,.80);
}
html[data-mht-theme-effective="light"] .mht-modal__close,
html[data-mht-theme="light"] .mht-modal__close { background: rgba(47,31,58,.10); color: #4C345D; border-color: rgba(76,52,93,.14); }

/* ──────────────────────────────────────────────
   Selected Work: remove heavy dark overlay in light mode
────────────────────────────────────────────── */
html[data-mht-theme-effective="light"] .mht-work-tile,
html[data-mht-theme="light"] .mht-work-tile { background: #E6D8FF; }
html[data-mht-theme-effective="light"] .mht-work-tile::after,
html[data-mht-theme="light"] .mht-work-tile::after {
  background:
    linear-gradient(to bottom, rgba(255,255,255,.03), rgba(47,31,58,.10)),
    radial-gradient(ellipse at center, transparent 36%, rgba(76,52,93,.14) 100%);
}
html[data-mht-theme-effective="light"] .mht-work-tile::before,
html[data-mht-theme="light"] .mht-work-tile::before { mix-blend-mode: multiply; }
html[data-mht-theme-effective="light"] .mht-work-tile.mht-work-card.has-image,
html[data-mht-theme="light"] .mht-work-tile.mht-work-card.has-image {
  box-shadow: inset 0 0 0 1px rgba(76,52,93,.10), 0 18px 42px rgba(76,52,93,.10);
}

/* ──────────────────────────────────────────────
   Section description alignment contract
────────────────────────────────────────────── */
@media (min-width: 981px) {
  .mht-build__copy,
  .mht-proof__copy,
  .mht-thinking__copy,
  [data-mht-component="section-head"] > .mht-content-body:last-child {
    justify-self: end;
    text-align: right;
  }
}
@media (max-width: 980px) {
  .mht-build__copy,
  .mht-proof__copy,
  .mht-thinking__copy,
  [data-mht-component="section-head"] > .mht-content-body:last-child { text-align: left; }
}

/* ──────────────────────────────────────────────
   Client Words / proof cards
────────────────────────────────────────────── */
html[data-mht-theme-effective="light"] .mht-testimonial,
html[data-mht-theme="light"] .mht-testimonial {
  background:
    linear-gradient(180deg, rgba(255,255,255,.76), rgba(246,242,247,.66)),
    radial-gradient(circle at 88% 8%, rgba(230,216,255,.42), transparent 54%);
  border-color: rgba(76,52,93,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68), 0 16px 42px rgba(76,52,93,.07);
}
html[data-mht-theme-effective="light"] .mht-testimonial__quote p,
html[data-mht-theme="light"] .mht-testimonial__quote p { color: #4C345D; }
html[data-mht-theme-effective="light"] .mht-testimonial__name,
html[data-mht-theme="light"] .mht-testimonial__name { color: #2F1F3A; }
html[data-mht-theme-effective="light"] .mht-testimonial__company,
html[data-mht-theme="light"] .mht-testimonial__company { color: rgba(76,52,93,.64); }
html[data-mht-theme-effective="light"] .mht-testimonial__footer,
html[data-mht-theme="light"] .mht-testimonial__footer { border-top-color: rgba(76,52,93,.12); }
html[data-mht-theme-effective="light"] .mht-testimonial__pill,
html[data-mht-theme="light"] .mht-testimonial__pill { color: #4C345D; background: rgba(230,216,255,.42); border-color: rgba(76,52,93,.12); }
/* Hand animation back to the global motion preset. */
.mht-proof__grid.mht-cards-animate .mht-testimonial { animation: none !important; }

/* ──────────────────────────────────────────────
   Logo wall and section separator noise
────────────────────────────────────────────── */
html[data-mht-theme-effective="light"] .mht-logo-mark,
html[data-mht-theme="light"] .mht-logo-mark { color: #8E63A3; opacity: .48; }
html[data-mht-theme-effective="light"] .mht-logo-item.is-visible .mht-logo-mark,
html[data-mht-theme="light"] .mht-logo-item.is-visible .mht-logo-mark { opacity: .48; }
html[data-mht-theme-effective="light"] .mht-logo-item:hover .mht-logo-mark,
html[data-mht-theme="light"] .mht-logo-item:hover .mht-logo-mark { color: #B78CFF; opacity: .92; }
html[data-mht-theme-effective="light"] .mht-stat__divider,
html[data-mht-theme="light"] .mht-stat__divider,
html[data-mht-theme-effective="light"] .mht-hero__stats,
html[data-mht-theme="light"] .mht-hero__stats,
html[data-mht-theme-effective="light"] .mht-footer__bottom,
html[data-mht-theme="light"] .mht-footer__bottom,
html[data-mht-theme-effective="light"] .mht-footer__links-cta,
html[data-mht-theme="light"] .mht-footer__links-cta { border-color: rgba(76,52,93,.12) !important; }

/* ──────────────────────────────────────────────
   FAQ / Before you decide
────────────────────────────────────────────── */
html[data-mht-theme-effective="light"] .mht-faq__item,
html[data-mht-theme="light"] .mht-faq__item {
  background: rgba(255,255,255,.62);
  border-color: rgba(76,52,93,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62);
}
html[data-mht-theme-effective="light"] .mht-faq__item.is-open,
html[data-mht-theme="light"] .mht-faq__item.is-open { background: rgba(246,242,247,.78); border-color: rgba(142,99,163,.42); }
html[data-mht-theme-effective="light"] .mht-faq__question,
html[data-mht-theme="light"] .mht-faq__question { color: #2F1F3A; }
html[data-mht-theme-effective="light"] .mht-faq__item.is-open .mht-faq__question,
html[data-mht-theme="light"] .mht-faq__item.is-open .mht-faq__question { color: #4C345D; }
html[data-mht-theme-effective="light"] .mht-faq__answer-body,
html[data-mht-theme="light"] .mht-faq__answer-body { color: #4C345D; }
html[data-mht-theme-effective="light"] .mht-faq__icon,
html[data-mht-theme="light"] .mht-faq__icon { color: #8E63A3; border-color: rgba(142,99,163,.38); background: rgba(230,216,255,.28); }

/* ──────────────────────────────────────────────
   Footer: light mode should not become a grey fog
────────────────────────────────────────────── */
.mht-footer { border-top: 0 !important; border-image: none !important; }
html[data-mht-theme-effective="light"] .mht-footer,
html[data-mht-theme="light"] .mht-footer {
  background:
    radial-gradient(ellipse 46% 26% at 50% 0%, rgba(230,216,255,.62), transparent 70%),
    linear-gradient(180deg, rgba(246,242,247,0) 0%, rgba(246,242,247,.74) 32%, rgba(230,216,255,.42) 100%);
  color: #4C345D;
}
html[data-mht-theme-effective="light"] .mht-footer::before,
html[data-mht-theme="light"] .mht-footer::before { opacity: .56; }
html[data-mht-theme-effective="light"] .mht-footer__brand-line,
html[data-mht-theme-effective="light"] .mht-footer__social-title,
html[data-mht-theme-effective="light"] .mht-footer__big-link,
html[data-mht-theme="light"] .mht-footer__brand-line,
html[data-mht-theme="light"] .mht-footer__social-title,
html[data-mht-theme="light"] .mht-footer__big-link { color: #2F1F3A; }
html[data-mht-theme-effective="light"] .mht-footer__social-title em,
html[data-mht-theme-effective="light"] .mht-modal__title em,
html[data-mht-theme="light"] .mht-footer__social-title em,
html[data-mht-theme="light"] .mht-modal__title em {
  background: none;
  -webkit-text-fill-color: #8E63A3;
  color: #8E63A3;
}
html[data-mht-theme-effective="light"] .mht-footer__social-icon,
html[data-mht-theme="light"] .mht-footer__social-icon {
  background: rgba(255,255,255,.46);
  border-color: rgba(76,52,93,.14);
  color: #8E63A3;
}
html[data-mht-theme-effective="light"] .mht-footer__social-icon:hover,
html[data-mht-theme="light"] .mht-footer__social-icon:hover { background: #B78CFF; color: #141017; border-color: #B78CFF; }
html[data-mht-theme-effective="light"] .mht-footer__links-cta-note,
html[data-mht-theme-effective="light"] .mht-footer__copyright-bottom,
html[data-mht-theme-effective="light"] .mht-footer__policy-link,
html[data-mht-theme="light"] .mht-footer__links-cta-note,
html[data-mht-theme="light"] .mht-footer__copyright-bottom,
html[data-mht-theme="light"] .mht-footer__policy-link { color: rgba(76,52,93,.62); }
html[data-mht-theme-effective="light"] .mht-footer__policy-link:hover,
html[data-mht-theme="light"] .mht-footer__policy-link:hover { color: #2F1F3A; }

/* ──────────────────────────────────────────────
   Motion preset compliance for legacy hardcoded keyframes
────────────────────────────────────────────── */
html[data-mht-motion="none"] .mht-hero__eyebrow,
html[data-mht-motion="none"] .mht-hero__headline,
html[data-mht-motion="none"] .mht-hero__subline,
html[data-mht-motion="none"] .mht-hero__cta,
html[data-mht-motion="none"] .mht-hero__stats,
html[data-mht-motion="none"] .mht-hero__visual,
html[data-mht-motion="none"] .mht-service-card,
html[data-mht-motion="none"] .mht-testimonial,
html[data-mht-motion="none"] .mht-logo-mark,
html[data-mht-motion="none"] .mht-footer * {
  animation: none !important;
  transition-duration: 1ms !important;
  transform: none !important;
  opacity: 1 !important;
}
