/* TwinPare Research final UX polish · 2026-08-27
 * Atmospheric DNA/genetics + twin treatment, persistent scroll background and compact in-page navigation.
 * Scope: Research overview landing only. No content, claim, route or schema changes.
 */

/* Persistent page atmosphere: a fixed layer plus per-section image fallbacks.
 * The section backgrounds deliberately repeat the same approved visual so Safari/iOS
 * still shows the Research atmosphere even if fixed compositing is constrained. */
body.theme-research .research-overview-page {
  position: relative;
  isolation: isolate;
  background: #100e22;
}

body.theme-research .research-overview-page::before {
  content: '';
  position: fixed;
  z-index: 0;
  inset: 70px 0 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13,11,26,.12), rgba(13,11,26,.28) 58%, rgba(13,11,26,.42)),
    radial-gradient(circle at 50% 38%, rgba(92,107,192,.12), transparent 46%),
    url('/images/twins-hub/health/research/final-2026-08-27/research-continuous-bg.webp') center 16% / cover no-repeat;
  opacity: .44;
  filter: saturate(.94) contrast(1.02);
}

body.theme-research .research-overview-page > section {
  position: relative;
  z-index: 1;
}

body.theme-research .research-series-index {
  background:
    linear-gradient(180deg, rgba(13,11,26,.46), rgba(13,11,26,.58)),
    url('/images/twins-hub/health/research/final-2026-08-27/research-continuous-bg.webp') center 42% / cover no-repeat !important;
}

body.theme-research .research-articles-section {
  background:
    linear-gradient(180deg, rgba(13,11,26,.56), rgba(13,11,26,.70)),
    url('/images/twins-hub/health/research/final-2026-08-27/research-continuous-bg.webp') center 74% / cover no-repeat !important;
}

body.theme-research .research-overview-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background:
    radial-gradient(circle at 13% 24%, rgba(0, 229, 255, .07), transparent 28%),
    radial-gradient(circle at 86% 22%, rgba(92, 107, 192, .10), transparent 34%),
    linear-gradient(180deg, rgba(16, 14, 34, .18), rgba(16, 14, 34, .04));
}

/* Left side: crop the owned science hero toward the DNA / genetics portion. */
body.theme-research .research-overview-hero::before {
  content: '';
  position: absolute;
  z-index: -2;
  top: 0;
  left: -2%;
  width: min(54vw, 820px);
  height: 720px;
  max-height: 100%;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(16, 14, 34, .14) 0%,
      rgba(16, 14, 34, .28) 44%,
      rgba(16, 14, 34, .78) 78%,
      rgba(16, 14, 34, 1) 100%),
    linear-gradient(180deg,
      rgba(16, 14, 34, .16) 0%,
      rgba(16, 14, 34, .05) 50%,
      rgba(16, 14, 34, .78) 82%,
      rgba(16, 14, 34, .98) 100%),
    url('/images/twins-hub/science/hero-v2.jpg') left 42% / auto 100% no-repeat;
  opacity: .53;
  filter: saturate(.90) contrast(1.02);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 58%, rgba(0,0,0,.72) 76%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 58%, rgba(0,0,0,.72) 76%, transparent 100%);
}

/* Right side: use the same verified owned asset, cropped toward the female twin pair. */
body.theme-research .research-overview-hero::after {
  content: '';
  position: absolute;
  z-index: -2;
  top: 0;
  right: -2%;
  width: min(54vw, 820px);
  height: 720px;
  max-height: 100%;
  pointer-events: none;
  background:
    linear-gradient(270deg,
      rgba(16, 14, 34, .10) 0%,
      rgba(16, 14, 34, .26) 44%,
      rgba(16, 14, 34, .76) 78%,
      rgba(16, 14, 34, 1) 100%),
    linear-gradient(180deg,
      rgba(16, 14, 34, .16) 0%,
      rgba(16, 14, 34, .05) 50%,
      rgba(16, 14, 34, .78) 82%,
      rgba(16, 14, 34, .98) 100%),
    url('/images/twins-hub/science/hero-v2.jpg') right 42% / auto 100% no-repeat;
  opacity: .48;
  filter: saturate(.82) contrast(.98);
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 60%, rgba(0,0,0,.72) 77%, transparent 100%);
  mask-image: linear-gradient(to left, #000 0%, #000 60%, rgba(0,0,0,.72) 77%, transparent 100%);
}

body.theme-research .research-overview-hero > *,
body.theme-research .research-overview-hero .app-hero__inner {
  position: relative;
  z-index: 1;
}

/* Keep the headline area calm and readable between the two atmospheric crops. */
body.theme-research .research-overview-hero .app-hero__inner {
  text-shadow: 0 2px 28px rgba(8, 8, 24, .40);
}

body.theme-research .research-overview-hero__note {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(18, 16, 40, .66);
  border-color: rgba(187, 134, 252, .20);
  box-shadow: 0 14px 36px rgba(8, 8, 24, .18);
}

/* Quick navigation keeps a long Research landing page understandable without
 * adding another global navigation system. */
body.theme-research .research-quick-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  width: min(100% - 32px, 920px);
  margin: -14px auto 38px;
  padding: 11px 13px;
  border: 1px solid rgba(92, 107, 192, .24);
  border-radius: 18px;
  background: rgba(16, 14, 34, .72);
  box-shadow: 0 14px 38px rgba(8, 8, 24, .18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.theme-research .research-quick-nav__label {
  margin-inline: 3px 4px;
  color: rgba(255, 255, 255, .58);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
}

body.theme-research .research-quick-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: .52rem .78rem;
  border: 1px solid rgba(187, 134, 252, .18);
  border-radius: 999px;
  background: rgba(92, 107, 192, .08);
  color: rgba(255, 255, 255, .86);
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

body.theme-research .research-quick-nav a::after {
  content: '↓';
  margin-left: .38rem;
  color: var(--section-primary);
  font-size: .78rem;
}

body.theme-research .research-quick-nav a:hover {
  transform: translateY(-1px);
  border-color: rgba(187, 134, 252, .42);
  background: rgba(187, 134, 252, .10);
  color: #fff;
}

body.theme-research .research-quick-nav a:focus-visible {
  outline: 2px solid var(--section-primary);
  outline-offset: 2px;
}

body.theme-research #featured-research-series,
body.theme-research #all-research-series,
body.theme-research #all-research-articles {
  scroll-margin-top: 112px;
}

body.theme-research .research-anchor-target {
  display: block;
}

@media (max-width: 760px) {
  body.theme-research .research-overview-page::before {
    inset: 88px 0 0;
    background-position: center 16%;
    background-size: 155vw auto;
    background-repeat: no-repeat;
    opacity: .26;
  }

  body.theme-research .research-series-index {
    background:
      linear-gradient(180deg, rgba(13,11,26,.56), rgba(13,11,26,.68)),
      url('/images/twins-hub/health/research/final-2026-08-27/research-continuous-bg.webp') center 32% / auto 100% no-repeat !important;
  }

  body.theme-research .research-articles-section {
    background:
      linear-gradient(180deg, rgba(13,11,26,.64), rgba(13,11,26,.76)),
      url('/images/twins-hub/health/research/final-2026-08-27/research-continuous-bg.webp') center 72% / auto 100% no-repeat !important;
  }

  body.theme-research .research-overview-hero::before {
    left: -26%;
    width: 82vw;
    height: 590px;
    max-height: 100%;
    background-position: left 28%;
    background-size: auto 88%;
    opacity: .32;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 48%, rgba(0,0,0,.62) 70%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 48%, rgba(0,0,0,.62) 70%, transparent 100%);
  }

  body.theme-research .research-overview-hero::after {
    right: -34%;
    width: 80vw;
    height: 590px;
    max-height: 100%;
    background-position: right 28%;
    background-size: auto 88%;
    opacity: .25;
    -webkit-mask-image: linear-gradient(to left, #000 0%, #000 46%, rgba(0,0,0,.56) 68%, transparent 100%);
    mask-image: linear-gradient(to left, #000 0%, #000 46%, rgba(0,0,0,.56) 68%, transparent 100%);
  }

  body.theme-research .research-quick-nav {
    justify-content: flex-start;
    width: calc(100% - 28px);
    margin-top: -8px;
    margin-bottom: 30px;
    padding: 10px;
    border-radius: 16px;
  }

  body.theme-research .research-quick-nav__label {
    flex-basis: 100%;
    margin: 1px 5px 2px;
  }

  body.theme-research .research-quick-nav a {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 128px;
  }
}

@media (max-width: 430px) {
  body.theme-research .research-overview-page::before {
    background-size: 180vw auto;
    opacity: .22;
  }

  body.theme-research .research-overview-hero::before {
    left: -35%;
    width: 92vw;
    height: 550px;
    opacity: .28;
  }

  body.theme-research .research-overview-hero::after {
    right: -43%;
    width: 88vw;
    height: 550px;
    opacity: .20;
  }

  body.theme-research .research-quick-nav a {
    min-width: 0;
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-research .research-quick-nav a {
    transition: none;
  }
}

/* Light Mode must remain a genuine light surface while preserving the Research
 * atmosphere. The generic Light Mode typography uses dark text, so the overview
 * cannot keep its Dark Mode base/overlays underneath that text. */
html[data-color-mode="light"] body.theme-research .research-overview-page {
  background: #F7F5FC;
}

html[data-color-mode="light"] body.theme-research .research-overview-page::before {
  background:
    linear-gradient(180deg, rgba(247,245,252,.72), rgba(247,245,252,.88) 58%, rgba(247,245,252,.96)),
    radial-gradient(circle at 50% 38%, rgba(92,107,192,.10), transparent 46%),
    url('/images/twins-hub/health/research/final-2026-08-27/research-continuous-bg.webp') center 16% / cover no-repeat;
  opacity: .42;
  filter: saturate(.72) contrast(.90) brightness(1.10);
}

html[data-color-mode="light"] body.theme-research .research-overview-hero {
  background:
    radial-gradient(circle at 13% 24%, rgba(0,126,152,.07), transparent 28%),
    radial-gradient(circle at 86% 22%, rgba(92,107,192,.08), transparent 34%),
    linear-gradient(180deg, rgba(247,245,252,.46), rgba(247,245,252,.12));
}

html[data-color-mode="light"] body.theme-research .research-overview-hero::before {
  background:
    linear-gradient(90deg,
      rgba(247,245,252,.18) 0%,
      rgba(247,245,252,.44) 44%,
      rgba(247,245,252,.88) 78%,
      rgba(247,245,252,1) 100%),
    linear-gradient(180deg,
      rgba(247,245,252,.34) 0%,
      rgba(247,245,252,.20) 50%,
      rgba(247,245,252,.84) 82%,
      rgba(247,245,252,.98) 100%),
    url('/images/twins-hub/science/hero-v2.jpg') left 42% / auto 100% no-repeat;
  opacity: .30;
  filter: saturate(.70) contrast(.90) brightness(1.08);
}

html[data-color-mode="light"] body.theme-research .research-overview-hero::after {
  background:
    linear-gradient(270deg,
      rgba(247,245,252,.16) 0%,
      rgba(247,245,252,.40) 44%,
      rgba(247,245,252,.86) 78%,
      rgba(247,245,252,1) 100%),
    linear-gradient(180deg,
      rgba(247,245,252,.34) 0%,
      rgba(247,245,252,.20) 50%,
      rgba(247,245,252,.84) 82%,
      rgba(247,245,252,.98) 100%),
    url('/images/twins-hub/science/hero-v2.jpg') right 42% / auto 100% no-repeat;
  opacity: .28;
  filter: saturate(.66) contrast(.88) brightness(1.10);
}

html[data-color-mode="light"] body.theme-research .research-overview-hero .app-hero__inner {
  text-shadow: none;
}

html[data-color-mode="light"] body.theme-research .research-overview-hero :is(h1,h2,h3,strong) {
  color: #1C1726;
}

html[data-color-mode="light"] body.theme-research .research-overview-hero :is(.hero-support-copy,.breadcrumbs,.breadcrumbs a) {
  color: #5A5366;
}

html[data-color-mode="light"] body.theme-research .research-overview-hero__note,
html[data-color-mode="light"] body.theme-research .research-quick-nav {
  background: rgba(255,255,255,.82);
  border-color: rgba(92,79,156,.18);
  box-shadow: 0 14px 36px rgba(46,36,78,.08);
}

html[data-color-mode="light"] body.theme-research .research-quick-nav__label {
  color: #6B6477;
}

html[data-color-mode="light"] body.theme-research .research-quick-nav a {
  background: rgba(109,70,182,.055);
  border-color: rgba(109,70,182,.16);
  color: #443B52;
}

html[data-color-mode="light"] body.theme-research .research-quick-nav a:hover {
  background: rgba(109,70,182,.10);
  border-color: rgba(109,70,182,.30);
  color: #221B2E;
}

html[data-color-mode="light"] body.theme-research .research-series-index,
html[data-color-mode="light"] body.theme-research .research-articles-section {
  background:
    linear-gradient(180deg, rgba(247,245,252,.82), rgba(247,245,252,.94)),
    url('/images/twins-hub/health/research/final-2026-08-27/research-continuous-bg.webp') center / cover no-repeat !important;
}

@media (max-width: 760px) {
  html[data-color-mode="light"] body.theme-research .research-overview-page::before {
    opacity: .30;
  }

  html[data-color-mode="light"] body.theme-research .research-series-index,
  html[data-color-mode="light"] body.theme-research .research-articles-section {
    background:
      linear-gradient(180deg, rgba(247,245,252,.88), rgba(247,245,252,.97)),
      url('/images/twins-hub/health/research/final-2026-08-27/research-continuous-bg.webp') center / auto 100% no-repeat !important;
  }
}
