/* Homepage: Mind / Body / Life menu on the left, the original globe on the right. */

.home-explore {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 24px;
  /* The hero's text column is narrow; let this row use the page width. */
  width: min(1300px, 94vw);
  max-width: none;
  margin: 1.25rem 0 0.75rem;
  text-align: left;
  align-items: start;
}

/* Menu: the cards' own badges and chips, as dropdowns */
.mbl-menu { display: flex; flex-direction: column; gap: 10px; }
.mbl-group.smart-category { border-radius: 14px; opacity: 1; transform: none; }
.mbl-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1rem;
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mbl-head .smart-badge { margin: 0; flex-shrink: 0; }
/* Icon in the area's own gradient circle, then the name and what it covers */
.mbl-icon.smart-badge {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  letter-spacing: 0;
}
.mbl-icon svg { width: 28px; height: 28px; }
.mbl-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mbl-name { font-family: var(--font-serif); font-size: 1.45rem; font-weight: 600; line-height: 1.05; letter-spacing: 0.01em; }
.mbl-title { font-family: var(--font-sans); font-size: 0.85rem; font-weight: 400; opacity: 0.75; line-height: 1.3; }
.mbl-chev { transition: transform 0.25s ease; }
.mbl-group.is-open .mbl-chev { transform: rotate(180deg); }
.mbl-chips {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  padding: 0 1rem 1rem;
}
.mbl-group.is-open .mbl-chips { display: grid; }
.mbl-opt {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.25;
  text-decoration: none;
}
.mbl-opt:hover { background: rgba(255, 255, 255, 0.16); }
.mbl-opt.is-on { background: rgba(255, 255, 255, 0.24); border-color: rgba(255, 255, 255, 0.5); }

/* The original globe panel, placed in the page instead of over it */
.globe-slot { position: relative; height: min(70vh, 640px); min-height: 420px; }
#globe-slot .eg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 1;
  pointer-events: auto;
}
#globe-slot .eg-modal { transform: none; padding: 0.5rem 0 2.5rem; max-width: none; }
#globe-slot .eg-close,
#globe-slot .eg-back,
#globe-slot .eg-bar-right { display: none; }

@media (max-width: 860px) {
  /* The page fades the hero while scrolling; on phones the ball sits lower, so keep it visible. */
  .hero-content { opacity: 1 !important; }

  .home-explore { display: block; width: 100vw; margin: 1rem 0 0.5rem; }

  /* Mind | Body | Life as three tabs, the open one's specialties in one swipeable row */
  .mbl-menu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 16px; }
  .mbl-group.smart-category { display: contents; }
  .mbl-head { grid-row: 1; flex-direction: column; justify-content: center; gap: 6px; padding: 4px 0; min-height: 48px; opacity: 0.6; transition: opacity 0.2s ease; }
  .mbl-group.is-open .mbl-head { opacity: 1; }
  .mbl-icon.smart-badge { width: 48px; height: 48px; transition: transform 0.2s ease; }
  .mbl-group.is-open .mbl-icon.smart-badge { transform: scale(1.08); }
  .mbl-icon svg { width: 26px; height: 26px; }
  .mbl-text { align-items: center; flex: none; }
  .mbl-name { font-size: 1.1rem; }
  .mbl-title, .mbl-chev { display: none; }
  .mbl-chips {
    grid-row: 2;
    grid-column: 1 / -1;
    margin: 4px -16px 0;
    padding: 6px 16px 10px;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
  }
  .mbl-chips::-webkit-scrollbar { display: none; }
  .mbl-group.is-open .mbl-chips { display: flex; }
  .mbl-opt { flex: none; white-space: nowrap; scroll-snap-align: start; padding: 0.6rem 0.9rem; border-radius: 999px; font-size: 0.9rem; min-height: 40px; display: inline-flex; align-items: center; }

  .globe-slot { height: clamp(520px, calc(100svh - 170px), 640px); margin-top: 4px; }
  #globe-slot .eg-modal { padding: 0 12px 2.5rem; }
}

/* Desktop: one focal point. The ball is the hero; the menu is a slim rail of the
   same height; both share one top line. Phones keep their own layout above. */
@media (min-width: 861px) {
  .home-explore {
    /* Rail | ball | matching empty column: the ball sits on the page's center line, under the headline */
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(220px, 260px);
    gap: 32px;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    height: clamp(560px, calc(100vh - 230px), 720px);
    margin-top: 0.75rem;
  }

  /* Rail: same height as the ball; the open list scrolls inside it */
  .mbl-menu { height: 100%; min-height: 0; overflow: hidden; gap: 8px; }
  .mbl-group.smart-category:not(.is-open) { flex: none; }
  .mbl-group.smart-category {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: rgba(10, 20, 45, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 0;
    border-top: 2px solid;
    box-shadow: none;
  }
  .mbl-group.smart-category.mind { border-top-color: rgba(129, 140, 248, 0.7); }
  .mbl-group.smart-category.body { border-top-color: rgba(52, 211, 153, 0.7); }
  .mbl-group.smart-category.life { border-top-color: rgba(251, 191, 36, 0.7); }
  .mbl-group.is-open { flex: 1; }
  .mbl-head { padding: 0.75rem 0.9rem; }
  .mbl-icon.smart-badge { width: 42px; height: 42px; }
  .mbl-icon svg { width: 22px; height: 22px; }
  .mbl-name { font-size: 1.25rem; }
  .mbl-title { font-size: 0.78rem; }
  .mbl-group.is-open .mbl-chips {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 0.5rem 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  }
  .mbl-opt {
    background: none;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
    padding: 0.42rem 0.75rem;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.72);
  }
  .mbl-opt:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
  .mbl-opt.is-on { color: #fff; }
  .mind .mbl-opt.is-on { border-left-color: #818cf8; background: rgba(129, 140, 248, 0.14); }
  .body .mbl-opt.is-on { border-left-color: #34d399; background: rgba(52, 211, 153, 0.14); }
  .life .mbl-opt.is-on { border-left-color: #fbbf24; background: rgba(251, 191, 36, 0.14); }

  /* Ball: fills its column, title centered above, quiet pool behind it */
  .globe-slot { grid-column: 2; height: 100%; min-height: 0; overflow: visible; }
  #globe-slot .eg-modal { height: 100%; padding: 0 0 0.25rem; }
  #globe-slot .eg-bar { order: 1; justify-content: center; text-align: center; border-bottom: 0; padding-bottom: 0; }
  #globe-slot .eg-bar-left { align-items: center; }
  #globe-slot .eg-title { font-size: clamp(1.9rem, 2.6vw, 2.5rem); }
  #globe-slot .eg-search-link-below {
    order: 2;
    margin: 0.35rem auto 0;
    padding: 0;
    background: none;
    border: 0;
    color: #bfdbfe;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  #globe-slot .eg-stage { order: 3; flex: 1; height: auto; max-height: none; min-height: 0; margin-top: 0.25rem; background: none; }
  #globe-slot .eg-legend { order: 4; padding: 0.25rem 0 0; }
  #globe-slot .eg-hint { order: 5; font-size: 0.6rem; opacity: 0.5; margin-top: 0.3rem; }
}

/* Phones: ball on the first screen, centered topic header, key under the ball,
   smaller labels, no hint. */
@media (max-width: 860px) {
  .hero-content h1 { margin-bottom: 10px !important; }
  .hero-tagline { margin-top: 4px !important; margin-bottom: 6px !important; }
  .home-explore { margin-top: 10px; }
  .mbl-icon.smart-badge { width: 44px; height: 44px; }
  .mbl-icon svg { width: 24px; height: 24px; }
  .mbl-head { gap: 4px; }

  :root { --eg-label-base: 10px; }
  .globe-slot { height: clamp(500px, calc(100svh - 230px), 600px); }
  #globe-slot .eg-modal { padding: 0 8px 0.75rem; }
  #globe-slot .eg-bar { order: 1; justify-content: center; text-align: center; border-bottom: 0; padding-bottom: 0; }
  #globe-slot .eg-bar-left { align-items: center; }
  #globe-slot .eg-eyebrow { font-size: 0.6rem; }
  #globe-slot .eg-title { font-size: 1.7rem; }
  #globe-slot .eg-blurb { margin-top: 0; font-size: 0.85rem; }
  #globe-slot .eg-search-link-below {
    order: 2;
    margin: 0.25rem auto 0;
    padding: 0.25rem 0;
    background: none;
    border: 0;
    color: #bfdbfe;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  #globe-slot .eg-stage { order: 3; flex: 1; height: auto; max-height: none; min-height: 0; margin-top: 0; background: none; }
  #globe-slot .eg-legend { order: 4; gap: 0.9rem; padding: 0.35rem 0 0; }
  #globe-slot .eg-hint { display: none; }
}

/* One "See all results" pill under the ball (replaces the separate All Providers pill). */
#globe-slot .eg-search-link-below {
  order: 5;
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin: 0.7rem auto 0;
  padding: 0.7rem 1.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#globe-slot .eg-search-link-below:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
#globe-slot .eg-legend { order: 4; }
#globe-slot .eg-hint { order: 6; }

/* Designer icon mark: glass disc, fine gradient ring in the area's color, soft glow. */
.mbl-group { --c1: #818cf8; --c2: #c7d2fe; }
.mbl-group.body { --c1: #34d399; --c2: #a7f3d0; }
.mbl-group.life { --c1: #fbbf24; --c2: #fde68a; }
.mbl-head .mbl-icon.smart-badge {
  position: relative;
  width: 54px;
  height: 54px;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 62%), rgba(10, 20, 45, 0.55);
  box-shadow: 0 0 26px -8px var(--c1), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #fff;
}
.mbl-head .mbl-icon.smart-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 1.5px;
  background: linear-gradient(140deg, var(--c2), var(--c1) 55%, rgba(255, 255, 255, 0.08));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.mbl-head .mbl-icon svg { width: 32px; height: 32px; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c1) 55%, transparent)); }
.mbl-group.is-open .mbl-head .mbl-icon.smart-badge { box-shadow: 0 0 34px -6px var(--c1), inset 0 1px 0 rgba(255, 255, 255, 0.16); }

/* How it works: three steps, so it reads as a search */
.how-steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin: 0.5rem auto 0.25rem;
  padding: 0 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}
.how-steps li { display: inline-flex; align-items: center; gap: 10px; }
.how-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  font-weight: 600;
}

/* The instruction on the ball itself */
#globe-slot .eg-hint.gl-cta {
  order: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  margin: 0.55rem auto 0;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
  animation: gl-cta-pulse 2.6s ease-in-out infinite;
}
#globe-slot .eg-hint.gl-cta svg { width: 18px; height: 18px; }
@keyframes gl-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08); }
}

/* Color key = the approach buttons (Traditional / Alternative / Progressive) */
#globe-slot a.eg-legend-item {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 20, 45, 0.35);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}
#globe-slot a.eg-legend-item:hover { background: rgba(255, 255, 255, 0.14); }

@media (max-width: 860px) {
  .how-steps { flex-direction: column; align-items: flex-start; width: fit-content; margin: 0.25rem auto 0.5rem; gap: 6px; font-size: 0.9rem; }
  .mbl-head .mbl-icon.smart-badge { width: 52px; height: 52px; }
  .mbl-head .mbl-icon svg { width: 30px; height: 30px; }
  #globe-slot .eg-hint.gl-cta { display: inline-flex; font-size: 0.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  #globe-slot .eg-hint.gl-cta { animation: none; }
}

/* The line under the headline (was styled inline before; now wraps on phones) */
.hero-content .hero-sub {
  display: block;
  max-width: 40em;
  margin: 0.75rem auto 0.25rem;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

/* Approach buttons: big, clear pills in each approach's own color */
#globe-slot .eg-legend { gap: 0.75rem; padding-top: 0.6rem; }
#globe-slot a.eg-legend-item {
  --ac: #22d3ee;
  gap: 0.6rem;
  padding: 0.7rem 1.35rem;
  min-height: 46px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--ac) 70%, transparent);
  background: color-mix(in srgb, var(--ac) 16%, rgba(10, 20, 45, 0.55));
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 0 22px -10px var(--ac);
  transition: background 0.2s ease, transform 0.2s ease;
}
#globe-slot a.eg-legend-item[data-a='alternative'] { --ac: #f472b6; }
#globe-slot a.eg-legend-item[data-a='progressive'] { --ac: #fb923c; }
#globe-slot a.eg-legend-item:hover { background: color-mix(in srgb, var(--ac) 30%, rgba(10, 20, 45, 0.55)); transform: translateY(-1px); }
#globe-slot a.eg-legend-item .eg-legend-dot { width: 11px; height: 11px; }
@media (max-width: 860px) {
  #globe-slot .eg-legend { gap: 0.5rem; }
  #globe-slot a.eg-legend-item { padding: 0.6rem 0.95rem; font-size: 0.92rem; min-height: 44px; }
}

/* The page fades the hero while scrolling; the menu and ball live in the hero, so keep it fully visible. */
.hero-content { opacity: 1 !important; }

/* No instruction text on the ball; the first-visit demo shows what to do. */
#globe-slot .eg-hint, #globe-slot .eg-hint.gl-cta { display: none !important; }

/* Demo 1: the three areas light up in turn (long and obvious), then all together */
.mbl-menu.mbl-intro .mbl-group,
.mbl-menu.mbl-intro-all .mbl-group { position: relative; z-index: 2; }
.mbl-menu.mbl-intro .mbl-group { animation: mbl-start 1.5s ease-in-out both; }
.mbl-menu.mbl-intro .mbl-group.body { animation-delay: 0.75s; }
.mbl-menu.mbl-intro .mbl-group.life { animation-delay: 1.5s; }
.mbl-menu.mbl-intro-all .mbl-group { animation: mbl-start 1.1s ease-in-out both; }
@keyframes mbl-start {
  0%, 100% { box-shadow: none; transform: scale(1); }
  40%, 60% {
    box-shadow: 0 0 0 3px var(--c1), 0 0 60px 4px color-mix(in srgb, var(--c1) 70%, transparent);
    transform: scale(1.04);
    background-color: color-mix(in srgb, var(--c1) 22%, rgba(10, 20, 45, 0.3));
  }
}
.mbl-menu.mbl-intro .mbl-group .mbl-icon.smart-badge,
.mbl-menu.mbl-intro-all .mbl-group .mbl-icon.smart-badge { animation: mbl-icon-pop 1.5s ease-in-out both; }
.mbl-menu.mbl-intro .mbl-group.body .mbl-icon.smart-badge { animation-delay: 0.75s; }
.mbl-menu.mbl-intro .mbl-group.life .mbl-icon.smart-badge { animation-delay: 1.5s; }
@keyframes mbl-icon-pop {
  0%, 100% { transform: scale(1); }
  40%, 60% { transform: scale(1.22); box-shadow: 0 0 40px 2px var(--c1); }
}

/* Demo 2 and 3: the hand */
.gl-hand {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 46px;
  height: 46px;
  pointer-events: none;
  opacity: 0;
  transform-origin: 35% 10%;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}
.gl-hand svg { width: 100%; height: 100%; fill: #fff; }
.gl-ripple {
  position: absolute;
  left: 9px;
  top: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  opacity: 0;
}
.gl-hand.gl-tap .gl-ripple { animation: gl-ripple 0.7s ease-out; }
@keyframes gl-ripple { from { transform: scale(0.4); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
#globe-slot .gl-demo-pick { box-shadow: 0 0 0 2px #fff, 0 0 24px rgba(255, 255, 255, 0.55) !important; transform: scale(1.08); transition: transform 0.2s ease, box-shadow 0.2s ease; }

/* Soft, even shade centered on the ball itself (replaces the off-center dark pool). */
#globe-slot .eg-stage::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  height: min(100%, 620px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(8, 18, 42, 0.5) 0%, rgba(8, 18, 42, 0.32) 38%, rgba(8, 18, 42, 0.12) 58%, rgba(8, 18, 42, 0) 70%);
}
#globe-slot .eg-canvas { z-index: 1; }

/* The hand flashes as it appears: two bright pulses and a glowing ring. */
.gl-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.15) 45%, rgba(255, 255, 255, 0) 70%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  opacity: 0;
  pointer-events: none;
}
.gl-hand.gl-hand-in svg { animation: gl-hand-flash 0.5s ease-in-out 2; }
.gl-hand.gl-hand-in .gl-halo { animation: gl-halo-pulse 0.5s ease-out 2; }
@keyframes gl-hand-flash {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
  50% { filter: drop-shadow(0 0 14px rgba(255, 255, 255, 1)) drop-shadow(0 0 28px rgba(191, 219, 254, 0.9)); }
}
@keyframes gl-halo-pulse {
  0% { transform: scale(0.5); opacity: 0.95; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* The demo hand travels across the menu and the ball */
.home-explore { position: relative; }
