/*
 * JuntoVerse Cinematic Experience 3.0
 * Atmospheric Section Lighting
 *
 * Static, homepage-only ambient gradients.
 */

body:has(> main > .hero) main > section.jv-discovery-intro,
body:has(> main > .hero) main > section#learning-hub,
body:has(> main > .hero) main > section.v3-founder {
  position: relative;
  isolation: isolate;
}

body:has(> main > .hero) main > section.jv-discovery-intro::before,
body:has(> main > .hero) main > section#learning-hub::before,
body:has(> main > .hero) main > section.v3-founder::before {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
}

/* Violet: discovery and imagination */

body:has(> main > .hero)
main > section.jv-discovery-intro::before {
  width: min(70vw, 850px);
  height: 500px;
  top: -100px;
  right: -20%;
  background: radial-gradient(
    ellipse,
    rgba(170, 141, 255, .12) 0%,
    rgba(105, 104, 220, .05) 42%,
    transparent 72%
  );
}

/* Aqua: learning and exploration */

body:has(> main > .hero)
main > section#learning-hub::before {
  width: min(75vw, 900px);
  height: 550px;
  top: -80px;
  left: -22%;
  background: radial-gradient(
    ellipse,
    rgba(105, 234, 214, .11) 0%,
    rgba(54, 147, 170, .045) 42%,
    transparent 72%
  );
}

/* Coral: community and the founder's mission */

body:has(> main > .hero)
main > section.v3-founder::before {
  width: min(65vw, 780px);
  height: 470px;
  top: -50px;
  right: -18%;
  background: radial-gradient(
    ellipse,
    rgba(255, 173, 152, .10) 0%,
    rgba(170, 105, 150, .04) 42%,
    transparent 72%
  );
}

/* Contain atmospheric overflow on smaller screens. */

@media (max-width: 700px) {
  body:has(> main > .hero)
  main > section.jv-discovery-intro::before,
  body:has(> main > .hero)
  main > section#learning-hub::before,
  body:has(> main > .hero)
  main > section.v3-founder::before {
    width: 100%;
    height: 350px;
    left: 0;
    right: auto;
  }
}

/* =========================================
   ATMOSPHERIC LAYERING CORRECTION
   ========================================= */

/* Place the glow above the section background. */

body:has(> main > .hero) main > section.jv-discovery-intro::before,
body:has(> main > .hero) main > section#learning-hub::before,
body:has(> main > .hero) main > section.v3-founder::before {
  z-index: 0;
}

/* Keep section content above the atmospheric layer. */

body:has(> main > .hero)
main > section.jv-discovery-intro > *,
body:has(> main > .hero)
main > section#learning-hub > *,
body:has(> main > .hero)
main > section.v3-founder > * {
  position: relative;
  z-index: 1;
}

/* Slightly strengthen the light without oversaturating it. */

body:has(> main > .hero)
main > section.jv-discovery-intro::before {
  background: radial-gradient(
    ellipse,
    rgba(170, 141, 255, .19) 0%,
    rgba(105, 104, 220, .08) 42%,
    transparent 72%
  );
}

body:has(> main > .hero)
main > section#learning-hub::before {
  background: radial-gradient(
    ellipse,
    rgba(105, 234, 214, .17) 0%,
    rgba(54, 147, 170, .07) 42%,
    transparent 72%
  );
}

body:has(> main > .hero)
main > section.v3-founder::before {
  background: radial-gradient(
    ellipse,
    rgba(255, 173, 152, .16) 0%,
    rgba(170, 105, 150, .065) 42%,
    transparent 72%
  );
}

/* =========================================
   DIMENSIONAL ATMOSPHERIC DEPTH
   ========================================= */

/* Two complementary light sources per section.
   Static gradients: no animation or additional JavaScript.
   Existing stacking and content layers remain unchanged. */

/* Discovery: violet atmosphere with aqua highlights. */

body:has(> main > .hero)
main > section.jv-discovery-intro::before {
  background:
    radial-gradient(
      ellipse 65% 65% at 28% 32%,
      rgba(170, 141, 255, .21) 0%,
      rgba(120, 104, 220, .075) 48%,
      transparent 100%
    ),
    radial-gradient(
      ellipse 45% 50% at 78% 78%,
      rgba(105, 234, 214, .10) 0%,
      transparent 100%
    );
}

/* Learning Hub: aqua atmosphere with violet highlights. */

body:has(> main > .hero)
main > section#learning-hub::before {
  background:
    radial-gradient(
      ellipse 65% 65% at 30% 38%,
      rgba(105, 234, 214, .19) 0%,
      rgba(54, 147, 170, .07) 48%,
      transparent 100%
    ),
    radial-gradient(
      ellipse 45% 50% at 82% 78%,
      rgba(170, 141, 255, .10) 0%,
      transparent 100%
    );
}

/* Founder: warm coral atmosphere with violet highlights. */

body:has(> main > .hero)
main > section.v3-founder::before {
  background:
    radial-gradient(
      ellipse 65% 65% at 30% 35%,
      rgba(255, 173, 152, .18) 0%,
      rgba(170, 105, 150, .065) 48%,
      transparent 100%
    ),
    radial-gradient(
      ellipse 45% 50% at 80% 78%,
      rgba(170, 141, 255, .10) 0%,
      transparent 100%
    );
}

/* =========================================
   SEAMLESS ATMOSPHERIC REFINEMENT
   ========================================= */

/* Remove the oversized oval footprint.
   Use a contained, softly fading background instead. */

body:has(> main > .hero)
main > section.jv-discovery-intro::before,
body:has(> main > .hero)
main > section#learning-hub::before,
body:has(> main > .hero)
main > section.v3-founder::before {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  opacity: 1;
}

/* Discovery: restrained violet and aqua. */

body:has(> main > .hero)
main > section.jv-discovery-intro::before {
  background:
    radial-gradient(
      ellipse 42% 42% at 70% 40%,
      rgba(170, 141, 255, .095),
      transparent 100%
    ),
    radial-gradient(
      ellipse 32% 35% at 28% 72%,
      rgba(105, 234, 214, .045),
      transparent 100%
    );
}

/* Learning Hub: restrained aqua and violet. */

body:has(> main > .hero)
main > section#learning-hub::before {
  background:
    radial-gradient(
      ellipse 45% 45% at 30% 45%,
      rgba(105, 234, 214, .085),
      transparent 100%
    ),
    radial-gradient(
      ellipse 32% 35% at 78% 72%,
      rgba(170, 141, 255, .045),
      transparent 100%
    );
}

/* Founder: restrained coral and violet. */

body:has(> main > .hero)
main > section.v3-founder::before {
  background:
    radial-gradient(
      ellipse 45% 45% at 70% 40%,
      rgba(255, 173, 152, .08),
      transparent 100%
    ),
    radial-gradient(
      ellipse 32% 35% at 25% 72%,
      rgba(170, 141, 255, .045),
      transparent 100%
    );
}

/* Keep mobile lighting subtle and contained. */

@media (max-width: 700px) {
  body:has(> main > .hero)
  main > section.jv-discovery-intro::before,
  body:has(> main > .hero)
  main > section#learning-hub::before,
  body:has(> main > .hero)
  main > section.v3-founder::before {
    inset: 0;
    width: 100%;
    height: 100%;
  }
}