/* A consistent constellation language across the site, never in place of content. */
.hero, .learning, .family-moment, .program-section, .admission-page .admission-hero {
  position: relative; isolation: isolate; overflow: hidden;
}
.hero > .shell, .learning > .shell, .family-moment > .shell,
.program-section > .shell, .admission-page .admission-hero > .shell {
  position: relative; z-index: 1;
}
.sky-twinkles { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sky-twinkles i {
  position: absolute; left: var(--star-x); top: var(--star-y);
  width: var(--star-size); height: var(--star-size);
  border-radius: 50%; background: #fff8df;
  box-shadow: 0 0 8px 2px #ffe5a556;
  opacity: .38; transform: scale(.8);
}
.sky-twinkles i:nth-child(3n) { background: #d7ddff; box-shadow: 0 0 8px 2px #bdb4ec52; }
.sky-twinkles i:nth-child(4n)::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px;
  transform: translate(-50%,-50%);
  background: linear-gradient(90deg,transparent,#fff8e0,transparent) center/100% 1px no-repeat,
              linear-gradient(transparent,#fff8e0,transparent) center/1px 100% no-repeat;
}
.program-section .sky-twinkles i {
  background: #7c63a0; box-shadow: 0 0 7px 2px #8965a436; opacity: .24;
}
.program-section .sky-twinkles i:nth-child(3n) { background: #bd9550; }
.program-section .sky-twinkles i:nth-child(4n)::after {
  background: linear-gradient(90deg,transparent,#9071ac,transparent) center/100% 1px no-repeat,
              linear-gradient(transparent,#9071ac,transparent) center/1px 100% no-repeat;
}
.hero-orbit-inner {
  width: 70%;
  border-color: #d9cbeb5e;
  box-shadow: 0 0 0 15px #ffffff05, inset 0 0 0 1px #ffffff0d;
  transform: rotate(24deg) scaleY(.88);
}
.orbit-traveler-violet::before {
  width: 13px; height: 13px;
  background: radial-gradient(circle at 31% 26%,#fff1ff 0 10%,#b997dc 48%,#7552b1 100%);
  box-shadow: 0 0 0 4px #c39df02b, 0 0 20px #d5b1edab;
}
.orbit-traveler-green::before {
  width: 17px; height: 17px;
  background: radial-gradient(circle at 30% 26%,#eaffd8 0 10%,#92c978 45%,#478775 100%);
  box-shadow: 0 0 0 4px #9fd88b26, 0 0 23px #b7e89b8a;
}
.orbit-traveler-pearl::before {
  width: 10px; height: 10px;
  background: radial-gradient(circle at 28% 27%,#fff 0 10%,#f5e3ac 55%,#c5a86a 100%);
  box-shadow: 0 0 16px #fff1c6c9;
}

/* Program artwork gets a small moving orbital detail in each world. */
.program-celestial {
  position: absolute; z-index: 2; top: 18px; right: 20px;
  width: 77px; height: 77px; border: 1px solid #fff9;
  border-radius: 50%; box-shadow: 0 0 0 10px #ffffff10, inset 0 0 0 13px #ffffff0a;
  pointer-events: none; filter: drop-shadow(0 2px 8px #1c17494d);
}
.program-celestial::before {
  content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px;
  border-radius: 50%; background: radial-gradient(circle at 30% 25%,#fffdf0,#f4d276 57%,#c98a4e);
  box-shadow: 0 0 13px #fff8ddaf; transform: translateX(-50%);
}
.program-celestial::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px;
  transform: translate(-50%,-50%);
  background: url('assets/icon-star.svg') center/contain no-repeat;
}
.program.junior .program-celestial { width: 69px; height: 69px; }
.program.senior .program-celestial { width: 87px; height: 87px; }
.program.balvatika .program-celestial { width: 72px; height: 72px; }

.press a { position: relative; overflow: hidden; }
.press a::after {
  content: ""; position: absolute; inset: auto 20px 0;
  height: 2px; border-radius: 2px; background: linear-gradient(90deg,#d6af5d,#83af75,#a889cb);
  transform: scaleX(0); transform-origin: left; pointer-events: none;
}
.learning-portrait::before {
  content: ""; position: absolute; z-index: 1; inset: 0;
  background: linear-gradient(105deg,transparent 32%,#fff4cc28 50%,transparent 67%);
  transform: translateX(-125%); pointer-events: none;
}
.family-moment { position: relative; isolation: isolate; overflow: hidden; }
.family-moment::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 15% 21%,#fff5cd 0 1px,transparent 3px),
    radial-gradient(circle at 41% 75%,#cfbaf0 0 1px,transparent 3px),
    radial-gradient(circle at 78% 18%,#fff5cd 0 1.5px,transparent 4px),
    radial-gradient(circle at 92% 83%,#cfbaf0 0 1px,transparent 3px);
  opacity: .75;
}
.reviews-score .score-stars { transform-origin: left center; }
.credentials article { transition: transform .45s cubic-bezier(.2,.75,.2,1), box-shadow .45s; }
.credentials article:hover { transform: translateY(-4px); box-shadow: 0 18px 35px #29194918; }
.contact-box { position: relative; overflow: hidden; }
.contact-box::before {
  content: ""; position: absolute; top: -70%; right: -18%; width: 48%; aspect-ratio: 1;
  border-radius: 50%; border: 1px solid #ffffff32;
  box-shadow: 0 0 0 36px #ffffff09, 0 0 0 72px #ffffff07;
  pointer-events: none;
}
.inquiry-form { position: relative; overflow: hidden; }
.inquiry-form::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg,#79aa72,#d8b168,#8c71bc,#79aa72);
  background-size: 200% 100%; pointer-events: none;
}

/* Admissions are working surfaces. Motion stays in the hero and progress cues. */
.admission-page .admission-hero { position: relative; isolation: isolate; overflow: hidden; }
.admission-page .admission-hero .shell { position: relative; z-index: 1; }
.admission-page .admission-hero::before {
  content: ""; position: absolute; inset: -15%; width: auto; height: auto;
  border: 0; border-radius: 0; pointer-events: none;
  background:
    radial-gradient(circle at 12% 16%,#f7e3ae 0 1px,transparent 3px),
    radial-gradient(circle at 63% 28%,#efe6ff 0 1px,transparent 3px),
    radial-gradient(circle at 88% 69%,#f7e3ae 0 1px,transparent 3px),
    radial-gradient(circle at 32% 83%,#efe6ff 0 1px,transparent 3px);
  opacity: .65;
}
.admission-page .form-panel { transition: border-color .3s, box-shadow .3s; }
.admission-page .form-panel:focus-within { border-color: #b7a0d4; box-shadow: 0 18px 45px #3820671c; }
.admission-page .upload-icon img { transition: transform .3s cubic-bezier(.2,.75,.2,1); }
.admission-page .upload-tile:hover .upload-icon img,
.admission-page .upload-tile:focus-within .upload-icon img { transform: translateY(-3px) scale(1.05); }

@media (prefers-reduced-motion: no-preference) {
  .scene-active .sky-twinkles i {
    animation: individual-twinkle var(--star-duration) var(--star-delay) ease-in-out infinite;
  }
  /* The three outer planets remain 120 degrees apart, so one stays beside the photo. */
  .hero:not(.scene-active) .orbit-traveler { animation-play-state: paused; }
  .hero.scene-active .hero-orbit-inner { animation: orbit-arrive 1.5s both; }
  .manifesto.scene-active .world-photo-spark { animation: world-glow 5s ease-in-out infinite; }
  .manifesto.scene-active .world-heading-mark .tiny-star { animation: star-hover 6s ease-in-out infinite; }
  .press-section.scene-active .press a::after { transform: scaleX(1); transition: transform 1s .3s cubic-bezier(.2,.75,.2,1); }
  .press-section.scene-active .press a:nth-child(2)::after { transition-delay: .5s; }
  .learning.scene-active .learning-portrait::before { animation: portrait-light 12s 1s ease-in-out infinite; }
  .moments-section.scene-active .moment-card figcaption { animation: caption-rise .9s both cubic-bezier(.2,.75,.2,1); }
  .moments-section.scene-active .moment-card:nth-child(2) figcaption { animation-delay: .12s; }
  .moments-section.scene-active .moment-card:nth-child(3) figcaption { animation-delay: .24s; }
  .family-moment.scene-active::before { animation: sky-breathe 8s ease-in-out infinite; }
  .program-section.scene-active .program-celestial { animation: program-lap 23s linear infinite; }
  .program-section.scene-active .program:nth-child(2) .program-celestial { animation-duration: 28s; animation-direction: reverse; }
  .program-section.scene-active .program:nth-child(3) .program-celestial { animation-duration: 31s; }
  .program-section.scene-active .program:nth-child(4) .program-celestial { animation-duration: 26s; animation-direction: reverse; }
  #life.scene-active .gallery-slide.is-current img { animation: gallery-breathe 6.5s ease-out both; }
  .family-reviews.scene-active .reviews-score .score-stars { animation: stars-settle 1s .2s both cubic-bezier(.2,.75,.2,1); }
  #school-info.scene-active .credentials article { animation: caption-rise .8s both cubic-bezier(.2,.75,.2,1); }
  #school-info.scene-active .credentials article:nth-child(2) { animation-delay: .12s; }
  #school-info.scene-active .credentials article:nth-child(3) { animation-delay: .24s; }
  #school-info.scene-active .credentials article:nth-child(4) { animation-delay: .36s; }
  .inquiry-section.scene-active .inquiry-form::before { animation: color-flow 13s ease-in-out infinite alternate; }
  .contact.scene-active .contact-box::before { animation: sky-breathe 8s ease-in-out infinite; }
  .admission-page .admission-hero.scene-active::before { animation: sky-shift 28s linear infinite alternate; }
  .admission-page .admission-hero h1,
  .admission-page .admission-hero p { animation: caption-rise .8s both cubic-bezier(.2,.75,.2,1); }
  .admission-page .admission-hero p { animation-delay: .13s; }
}
@keyframes world-glow { 50% { box-shadow: 0 0 0 10px #fff3bd1b, 0 0 30px #fff7cf82; } }
@keyframes individual-twinkle {
  0%, 100% { opacity: .18; transform: scale(.55); }
  42% { opacity: .9; transform: scale(1.25); }
  65% { opacity: .35; transform: scale(.8); }
}
@keyframes gallery-breathe { from { transform: scale(1); } to { transform: scale(1.035); } }
@keyframes stars-settle { from { opacity: .2; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@keyframes portrait-light { 0%, 15% { transform: translateX(-125%); } 30%, 100% { transform: translateX(125%); } }
@keyframes caption-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sky-breathe { 50% { opacity: .34; } }
@keyframes program-lap { to { transform: rotate(360deg); } }
@keyframes color-flow { to { background-position: 100% 0; } }
@keyframes sky-shift { to { transform: translate3d(18px,10px,0); opacity: .4; } }
@media (max-width: 700px) {
  .hero-orbit-inner { width: 71%; }
  .program-celestial { width: 60px !important; height: 60px !important; top: 15px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-orbit, .orbit-traveler, .program-celestial,
  .admission-page .admission-hero::before { animation: none !important; }
  .hero .orbit-traveler-gold { transform: rotate(0deg); }
  .hero .orbit-traveler-teal { transform: rotate(120deg); }
  .hero .orbit-traveler-violet { transform: rotate(240deg); }
  .press a::after { transform: scaleX(1); }
  .admission-page .upload-icon img { transition: none; }
  .admission-page .upload-tile:hover .upload-icon img { transform: none; }
}
