/* TwinPare sitewide Light Mode — 2026-08-28
 * Optional accessible light theme. Dark mode remains untouched unless
 * html[data-color-mode="light"] is active. */

html[data-color-mode="light"] {
  color-scheme: light;
  --surface-0: #F8F7FC;
  --surface-1: #FFFFFF;
  --surface-2: #F1EEF8;
  --surface-3: #E7E2F1;
  --text-primary: #171322;
  --text-secondary: #5B5568;
  --text-muted: #7D7589;
  --glass-bg: rgba(255, 255, 255, .78);
  --glass-border: rgba(48, 38, 72, .12);
  --surface-elevated: rgba(255, 255, 255, .82);
  --surface-elevated-border: rgba(48, 38, 72, .12);
  --mesh-a: rgba(187, 134, 252, .18);
  --mesh-b: rgba(0, 180, 210, .14);
  --mesh-c: rgba(255, 110, 199, .12);
  --mesh-d: rgba(29, 191, 180, .12);
}

html[data-color-mode="light"] body {
  background: #F8F7FC;
  color: var(--text-primary);
}

html[data-color-mode="light"] body.theme-core {
  --section-primary: #7B43C6;
  --section-secondary: #D83E9B;
  --section-accent: #008EAA;
  --section-support: #4C5DB8;
  --section-soft: #6C3AB6;
  --section-surface: rgba(255,255,255,.80);
  --section-surface-strong: rgba(255,255,255,.96);
  --section-border: rgba(85, 66, 122, .16);
  --section-glow: rgba(123, 67, 198, .10);
  --section-glow-strong: rgba(216, 62, 155, .14);
  background:
    radial-gradient(circle at 82% 8%, rgba(0, 184, 216, .08), transparent 30%),
    radial-gradient(circle at 16% 42%, rgba(216, 62, 155, .07), transparent 34%),
    #F8F7FC;
}

html[data-color-mode="light"] body.theme-health {
  --section-primary: #007E98;
  --section-secondary: #C93691;
  --section-accent: #7346BC;
  --section-support: #6B43B5;
  --section-soft: #663AAE;
  --section-surface: rgba(247, 253, 255, .86);
  --section-surface-strong: rgba(255,255,255,.96);
  --section-border: rgba(0, 126, 152, .18);
  --section-glow: rgba(0, 126, 152, .10);
  --section-glow-strong: rgba(201, 54, 145, .14);
  --mesh-a: rgba(0, 180, 210, .17);
  --mesh-b: rgba(115, 70, 188, .12);
  --mesh-c: rgba(201, 54, 145, .11);
  --mesh-d: rgba(0, 160, 184, .10);
  background:
    radial-gradient(circle at 80% 9%, rgba(0, 180, 210, .10), transparent 30%),
    radial-gradient(circle at 18% 45%, rgba(201, 54, 145, .07), transparent 35%),
    #F4FBFD;
}

html[data-color-mode="light"] body.theme-research {
  --section-primary: #6D46B6;
  --section-secondary: #4C5DB8;
  --section-accent: #007E98;
  --section-support: #7448BD;
  --section-soft: #6840B0;
  --section-surface: rgba(252, 250, 255, .86);
  --section-surface-strong: rgba(255,255,255,.96);
  --section-border: rgba(92, 79, 156, .18);
  --section-glow: rgba(92, 79, 156, .09);
  --section-glow-strong: rgba(109, 70, 182, .13);
  --mesh-a: rgba(76, 93, 184, .13);
  --mesh-b: rgba(109, 70, 182, .12);
  --mesh-c: rgba(201, 54, 145, .05);
  --mesh-d: rgba(0, 126, 152, .07);
  background:
    radial-gradient(circle at 82% 10%, rgba(76, 93, 184, .09), transparent 32%),
    radial-gradient(circle at 15% 48%, rgba(109, 70, 182, .07), transparent 36%),
    #F7F5FC;
}

html[data-color-mode="light"] body.theme-twins {
  --section-primary: #7549B9;
  --section-secondary: #8755C4;
  --section-accent: #4C5DB8;
  --section-support: #007E98;
  --section-soft: #6C43AF;
  --section-surface: rgba(253, 250, 255, .86);
  --section-surface-strong: rgba(255,255,255,.96);
  --section-border: rgba(117, 73, 185, .15);
  --section-glow: rgba(117, 73, 185, .08);
  --section-glow-strong: rgba(76, 93, 184, .11);
  --mesh-a: rgba(117, 73, 185, .10);
  --mesh-b: rgba(76, 93, 184, .10);
  --mesh-c: rgba(201, 54, 145, .05);
  --mesh-d: rgba(0, 126, 152, .06);
  background:
    radial-gradient(circle at 78% 10%, rgba(117, 73, 185, .08), transparent 34%),
    radial-gradient(circle at 16% 48%, rgba(76, 93, 184, .06), transparent 38%),
    #FBF7FC;
}

/* Shared chrome */
html[data-color-mode="light"] .v2-header {
  background: rgba(255,255,255,.92) !important;
  border-bottom-color: rgba(56,45,82,.12) !important;
  box-shadow: 0 8px 28px rgba(42,31,66,.07) !important;
}
html[data-color-mode="light"] :is(.v2-nav a,.v2-mobile-nav a) { color: #575064 !important; }
html[data-color-mode="light"] :is(.v2-nav a:hover,.v2-mobile-nav a:hover) { color: #171322 !important; }
html[data-color-mode="light"] :is(.v2-search,.v2-theme-toggle,.v2-lang button) {
  color: #241C31 !important;
  background: rgba(255,255,255,.78) !important;
  border-color: rgba(56,45,82,.16) !important;
}
html[data-color-mode="light"] :is(.v2-search,.v2-theme-toggle,.v2-lang button):hover {
  background: #F0ECF7 !important;
}
html[data-color-mode="light"] .v2-lang__menu,
html[data-color-mode="light"] .v2-mobile-nav {
  background: rgba(255,255,255,.98) !important;
  border-color: rgba(56,45,82,.14) !important;
  box-shadow: 0 18px 50px rgba(42,31,66,.12) !important;
}
html[data-color-mode="light"] .v2-lang__menu a { color: #514A5D !important; }
html[data-color-mode="light"] :is(.v2-lang__menu a:hover,.v2-lang__menu a.active) {
  background: #F0ECF7 !important;
  color: #171322 !important;
}
html[data-color-mode="light"] .v2-menu-toggle span { background: #241C31 !important; }

/* Theme toggle */
.v2-theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  flex: 0 0 38px;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.v2-theme-toggle:hover { transform: translateY(-1px); background: rgba(255,255,255,.06); }
.v2-theme-toggle svg { width: 18px; height: 18px; }
.v2-theme-toggle__sun { display: block; }
.v2-theme-toggle__moon { display: none; }
html[data-color-mode="light"] .v2-theme-toggle__sun { display: none; }
html[data-color-mode="light"] .v2-theme-toggle__moon { display: block; }

/* Generic content and surfaces */
html[data-color-mode="light"] :is(h1,h2,h3,h4,h5,h6,strong) { color: #171322; }
html[data-color-mode="light"] :is(p,li,dd,.subtitle,.lead,.app-hero__copy,.section-header p) { color: var(--text-secondary); }
html[data-color-mode="light"] a:not(.btn):not(.brand) { text-underline-offset: 3px; }
html[data-color-mode="light"] :is(.glass-panel,.v2-card,.app-card,.feature-card,.article-card,.link-matrix__card,.twin-category-card,.ecosystem-pillar) {
  background-color: rgba(255,255,255,.82) !important;
  border-color: rgba(67,54,95,.13) !important;
  box-shadow: 0 16px 42px rgba(42,31,66,.07);
}
html[data-color-mode="light"] :is(input,textarea,select) {
  color: #171322 !important;
  background: rgba(255,255,255,.92) !important;
  border-color: rgba(67,54,95,.18) !important;
}
html[data-color-mode="light"] :is(input,textarea)::placeholder { color: #80798B !important; }
html[data-color-mode="light"] hr { border-color: rgba(67,54,95,.12); }

/* Core/homepage sections */
html[data-color-mode="light"] :is(.v2-hero,.v2-value,.v2-product,.v2-together,.v2-origin,.v2-trust) {
  color: #171322;
}
html[data-color-mode="light"] :is(.v2-origin__statement,.v2-product__panel,.v2-featured-product,.v2-health__card) {
  background-color: rgba(255,255,255,.78) !important;
  border-color: rgba(67,54,95,.14) !important;
}

/* Health & Fitness */
html[data-color-mode="light"] body.theme-health :is(.health-v2,.health-v2__section,.health-landing,.health-showcase,.app-page) {
  color: #15202A;
}
html[data-color-mode="light"] body.theme-health :is(.health-v2__card,.health-phone-card,.health-v2__showcase,.health-showcase__hero,.health-v2__device,.health-v2__device-grid > *) {
  background-color: rgba(250,254,255,.84) !important;
  border-color: rgba(0,126,152,.16) !important;
}

/* Research overview, hubs and long-form */
html[data-color-mode="light"] body.theme-research :is(.research-highlights,.research-series-index,.research-series-feature,.research-related) {
  background-color: transparent !important;
}
html[data-color-mode="light"] body.theme-research :is(
  .research-highlights__card,
  .research-series-feature__card,
  .research-series-intro__copy,
  .research-series-intro__note,
  .article-card--research,
  .research-article__header,
  .research-disclaimer,
  .research-takeaways,
  .research-section,
  .research-sources,
  .editorial-review,
  .research-article-nav,
  .research-article__cta,
  .pregnancy-radar-answer,
  .link-matrix__card
) {
  background: rgba(255,255,255,.88) !important;
  border-color: rgba(92,79,156,.16) !important;
  color: #1C1726;
  box-shadow: 0 14px 36px rgba(46,36,78,.06);
}
html[data-color-mode="light"] body.theme-research .research-article-page {
  background: #F7F5FC !important;
}
html[data-color-mode="light"] body.theme-research .research-article-page::before {
  opacity: .10 !important;
  filter: saturate(.72) contrast(.88) brightness(1.12) !important;
}
html[data-color-mode="light"] body.theme-research .research-article-page .research-hero {
  background: linear-gradient(90deg, rgba(247,245,252,.84), rgba(255,255,255,.94) 35%, rgba(255,255,255,.94) 65%, rgba(247,245,252,.84)) !important;
}
html[data-color-mode="light"] body.theme-research .research-article-page .research-related {
  background: linear-gradient(180deg, rgba(247,245,252,.76), rgba(247,245,252,.94)) !important;
}
html[data-color-mode="light"] body.theme-research :is(.research-article,.research-article__body,.research-section) :is(p,li,dd) {
  color: #514B5C;
}
html[data-color-mode="light"] body.theme-research .research-sources a { color: #5540A5; }

/* Twins & Families */
html[data-color-mode="light"] body.theme-twins :is(.twin-category-card,.category-hero__image-shell,.ecosystem-pillar,.glass-panel) {
  background-color: rgba(255,255,255,.84) !important;
  border-color: rgba(117,73,185,.14) !important;
}

/* Footer */
html[data-color-mode="light"] .v2-footer {
  background: linear-gradient(180deg, rgba(117,73,185,.04), transparent 28%), #F0EDF6 !important;
  border-top-color: rgba(67,54,95,.13) !important;
}
html[data-color-mode="light"] .v2-footer h4,
html[data-color-mode="light"] .v2-footer__brand strong { color: #171322 !important; }
html[data-color-mode="light"] .v2-footer :is(a,p),
html[data-color-mode="light"] .v2-footer__bottom { color: #5D5668 !important; }
html[data-color-mode="light"] .v2-footer a:hover { color: #5D35A8 !important; }
html[data-color-mode="light"] .v2-footer__bottom { border-top-color: rgba(67,54,95,.10) !important; }

/* Decorative atmosphere is intentionally calmer on light backgrounds. */
html[data-color-mode="light"] .aurora { opacity: .34; }
html[data-color-mode="light"] .aurora__orb { filter: blur(100px); }

/* Dark media imagery remains untouched; add subtle edge so it reads as content. */
html[data-color-mode="light"] :is(.research-article__image,.category-hero__image-shell,img[class*="hero"],.v2-together__grid)::after {
  border-color: rgba(67,54,95,.12);
}

@media (max-width: 900px) {
  html[data-color-mode="light"] body.theme-research .research-article-page::before { opacity: .075 !important; }
}

@media (max-width: 520px) {
  html[data-color-mode="light"] body.theme-research .research-article-page::before { opacity: .055 !important; }
  .v2-theme-toggle {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    flex-basis: 42px;
  }
}

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