/* Holographic orbit home. The living grid (student-motion) stays the page
   background; word rain sits above it, then the scene, then glass pop-ups.
   Orbs are real links/buttons positioned by home-orbit.js. */
.orbit-home { overflow-x: hidden; }
.orbit-shell { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.orbit-nav { position: relative; z-index: 6; padding: 14px 24px; }
.orbit-rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .5; }

.orbit-stage { position: relative; flex: 1; min-height: 540px; overflow: hidden; }
.orbit-fx, .orbit-orbs { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit-fx { pointer-events: none; }
.orbit-fx-back { z-index: 1; }
.orbit-orbs { z-index: 2; pointer-events: none; }
.orbit-fx-front { z-index: 3; }

/* Each orb: a 3D context where a tilted ring passes behind and in front of a glass sphere. */
.orbit-orb {
  --tone: 86 214 194;
  position: absolute; left: 0; top: 0; width: 220px; height: 220px; margin: -110px 0 0 -110px;
  padding: 0; border: 0; border-radius: 50%; background: none; color: #f5f7fb; font: inherit;
  cursor: pointer; text-decoration: none; pointer-events: auto; perspective: 700px;
  transform: translate3d(-999px, -999px, 0); will-change: transform; -webkit-tap-highlight-color: transparent;
  transition: opacity .5s ease;
}
.orbit-orb.orbit-play { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
.orbit-orb[data-tone=gold] { --tone: 255 205 96; }
.orbit-orb[data-tone=green] { --tone: 120 226 140; }
.orbit-orb[data-tone=blue] { --tone: 104 164 255; }
.orbit-orb[data-tone=violet] { --tone: 190 132 255; }
.orbit-orb[data-tone=orange] { --tone: 255 146 84; }
.orbit-orb[data-tone=teal] { --tone: 86 214 194; }
.orbit-orb[data-tone=sky] { --tone: 92 186 255; }
.orbit-body { position: absolute; inset: 0; transform-style: preserve-3d; }
.orbit-sphere {
  position: absolute; inset: 9%; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  border: 1px solid rgb(var(--tone) / .7);
  background:
    radial-gradient(circle at 31% 24%, rgba(255,255,255,.5), rgba(255,255,255,.09) 16%, transparent 33%),
    radial-gradient(circle at 68% 82%, rgb(var(--tone) / .45), transparent 42%),
    radial-gradient(circle at 50% 50%, rgb(var(--tone) / .08), rgb(var(--tone) / .28) 64%, rgb(var(--tone) / .78) 100%),
    rgba(9, 15, 27, .62);
  box-shadow: 0 0 34px rgb(var(--tone) / .5), 0 0 90px rgb(var(--tone) / .22), inset 0 0 26px rgb(var(--tone) / .55), inset 0 -14px 34px rgba(0,0,0,.35);
  transition: box-shadow .3s ease, filter .3s ease;
}
.orbit-sphere::after {
  content: ""; position: absolute; inset: -40%; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.16) 50%, transparent 58%);
  transform: translateX(-60%); animation: orbit-sheen 7s ease-in-out infinite; animation-delay: var(--delay, 0s);
}
.orbit-face { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 12px; text-align: center; }
.orbit-icon svg { display: block; width: 48px; height: 48px; color: rgb(var(--tone)); filter: drop-shadow(0 0 10px rgb(var(--tone) / .8)); }
.orbit-title { font-size: 1.28rem; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.orbit-cta {
  margin-top: 4px; padding: 4px 11px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap;
  border: 1px solid rgb(var(--tone) / .85); background: rgba(5, 10, 20, .55); color: rgb(var(--tone));
  box-shadow: 0 0 12px rgb(var(--tone) / .45), inset 0 0 8px rgb(var(--tone) / .25);
}
.orbit-owl { width: 62px; height: 62px; filter: drop-shadow(0 0 14px rgba(255, 209, 102, .55)); }
.orbit-brand { font-size: 1.9rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; text-shadow: 0 0 18px rgb(var(--tone) / .8), 0 2px 10px rgba(0,0,0,.6); }
.orbit-motto { color: #bfe6ff; font-size: .82rem; font-weight: 600; }
.orbit-play-button {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 20px 8px 14px; border-radius: 999px;
  background: linear-gradient(135deg, #56d6c2, #5cbaff); color: #06121a; font-weight: 800; font-size: 1rem;
  box-shadow: 0 0 22px rgba(92, 186, 255, .65), inset 0 1px 0 rgba(255,255,255,.5);
}
.orbit-play-button svg { width: 22px; height: 22px; }

.orbit-ring {
  position: absolute; inset: -16% -22%; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgb(var(--tone) / .6);
  transform: rotateX(74deg); animation: orbit-ring 10s linear infinite; animation-delay: var(--delay, 0s);
}
/* A bright dot rides the ring, so its spin is visible without mask or filter effects. */
.orbit-ring::after {
  content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 8px rgb(var(--tone));
}
.orbit-ring-b { inset: -8% -12%; transform: rotateY(22deg) rotateX(68deg); animation: orbit-ring-b 14s linear infinite reverse; opacity: .8; }
.orbit-ring-b::after { display: none; }
.orbit-orb:hover .orbit-sphere, .orbit-orb:focus-visible .orbit-sphere { filter: brightness(1.18) saturate(1.1); box-shadow: 0 0 46px rgb(var(--tone) / .7), 0 0 120px rgb(var(--tone) / .3), inset 0 0 30px rgb(var(--tone) / .7); }
.orbit-orb:focus-visible { outline: 3px solid var(--teal); outline-offset: -6px; }
.orbit-orb.is-focused .orbit-ring { animation-duration: 1.8s; }
.orbit-orb.is-focused .orbit-sphere { background-color: rgba(9, 15, 27, .93); }
.orbit-orb.is-spinning .orbit-face { animation: orbit-face-spin 1.1s cubic-bezier(.25,.8,.25,1); }
.orbit-orbs.has-focus .orbit-orb:not(.is-focused) { opacity: .22; }

@keyframes orbit-ring { to { transform: rotateX(74deg) rotateZ(360deg); } }
@keyframes orbit-ring-b { to { transform: rotateY(22deg) rotateX(68deg) rotateZ(360deg); } }
@keyframes orbit-face-spin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@keyframes orbit-sheen { 0%, 55% { transform: translateX(-60%); } 85%, 100% { transform: translateX(60%); } }

/* Headline and live count. */
/* Positioned by home-orbit.js just below the centre orb. */
.orbit-hud { position: absolute; z-index: 4; left: 0; top: 0; width: max-content; max-width: min(460px, 88vw); padding: 0; text-align: center; pointer-events: none; transform: translate3d(-999px, -999px, 0); transition: opacity .4s ease; }
.orbit-hud .kicker, .orbit-hud .home-count { text-shadow: 0 1px 8px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.8); }
.orbit-hud h1 { font-size: clamp(1.15rem, 1.7vw, 1.55rem); margin: 4px 0 6px; text-shadow: 0 2px 14px rgba(0,0,0,.7); }
.orbit-hud .kicker { margin: 0; font-size: .72rem; letter-spacing: .12em; color: var(--teal); }
.orbit-hud .home-count { pointer-events: auto; }
.orbit-home.orbit-open .orbit-hud { opacity: 0; }

/* Glass pop-ups. */
.orbit-panel {
  position: fixed; z-index: 30; inset: 84px 24px auto auto; margin: 0; padding: 0; width: min(520px, calc(100vw - 48px));
  max-height: calc(100vh - 108px); max-height: calc(100svh - 108px); overflow: auto; overscroll-behavior: contain;
  color: inherit; border: 1px solid var(--glass-edge, rgba(220,235,255,.16)); border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.08), transparent 60%), rgba(12, 19, 32, .66);
  box-shadow: 0 24px 70px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(86,214,194,.06);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
}
.orbit-panel[open] { animation: orbit-panel-in .5s cubic-bezier(.2,.8,.2,1) both; }
.orbit-panel.is-closing { animation: orbit-panel-out .25s ease-in both; }
.orbit-panel .home-panel { background: transparent; border: 0; padding: 22px 22px 20px; }
.orbit-panel .home-panel-title { padding-right: 44px; }
.orbit-panel h2 { font-size: 1.3rem; }
.orbit-close {
  position: sticky; float: right; top: 12px; margin: 12px 12px 0 0; z-index: 2; width: 38px; height: 38px; padding: 8px;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(10,16,28,.6); color: var(--text); cursor: pointer;
}
.orbit-close:hover { border-color: var(--teal); color: var(--teal); }
.orbit-close svg { width: 18px; height: 18px; }
@keyframes orbit-panel-in { from { opacity: 0; transform: translateX(36px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes orbit-panel-out { to { opacity: 0; transform: translateX(28px) scale(.97); } }

.orbit-list { list-style: none; margin: 14px 0 18px; padding: 0; display: grid; gap: 10px; }
.orbit-list li { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); }
.orbit-list strong { color: #9de6cf; }
.orbit-list span { color: #b3c5d1; font-size: .86rem; line-height: 1.5; }
.orbit-steps strong { color: #f1d383; }
.orbit-ai-title { justify-content: flex-start; }
.orbit-ai-title img { flex: none; width: 44px; height: 44px; border-radius: 12px; filter: drop-shadow(0 0 12px rgba(190,132,255,.55)); }
.orbit-ai-list strong { color: #d3b6ff; }
.orbit-action { width: 100%; }
.orbit-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.orbit-stats span { padding: 14px; border: 1px solid rgba(190,132,255,.3); border-radius: 14px; background: rgba(10,15,30,.5); color: #b9a9d9; font-size: .78rem; }
.orbit-stats strong { display: block; margin-top: 6px; font-size: 1.45rem; color: #f5f7fb; }
.orbit-panel-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.orbit-settings { display: grid; gap: 10px; margin-top: 14px; }
.orbit-setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); cursor: pointer; }
.orbit-setting > span:first-child { display: grid; gap: 2px; }
.orbit-setting small { color: #a4b7c7; font-size: .78rem; line-height: 1.4; }
.orbit-segment { display: inline-flex; flex: none; padding: 3px; border-radius: 10px; background: #0b131c; }
.orbit-segment a { padding: 6px 10px; border-radius: 8px; color: #b6c6d4; text-decoration: none; font-weight: 700; font-size: .82rem; }
.orbit-segment a[aria-current] { background: #23524e; color: #aff9df; }
.orbit-setting input.orbit-switch { appearance: none; -webkit-appearance: none; flex: 0 0 46px; position: relative; display: inline-block; width: 46px; height: 26px; min-height: 0; margin: 0; padding: 0; border-radius: 999px; background: #2a3544; border: 1px solid var(--line-strong); cursor: pointer; transition: background .2s; }
.orbit-setting input.orbit-switch::after { content: ""; position: absolute; top: 2px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #dfe7ef; transition: transform .2s; }
.orbit-setting input.orbit-switch:checked { background: #23826f; border-color: var(--teal); }
.orbit-setting input.orbit-switch:checked::after { transform: translateX(20px); }
.orbit-setting input.orbit-switch:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.orbit-noscript { text-align: center; color: var(--muted); }

@media (max-width: 760px) {
  .orbit-nav { padding: 12px 14px; }
  .orbit-stage { min-height: 600px; }
  .orbit-hud { max-width: 70vw; }
  .orbit-hud h1 { font-size: 1rem; margin: 2px 0 4px; }
  .orbit-hud .home-count { font-size: .78rem; }
  .orbit-hud .kicker { display: none; }
  .orbit-panel { inset: auto 8px 8px 8px; width: auto; max-height: 62vh; max-height: 62svh; border-radius: 18px; }
  .orbit-panel[open] { animation-name: orbit-sheet-in; }
  /* Phones: solid glass instead of a live blur behind each pop-up. */
  .orbit-home .orbit-panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(12, 19, 32, .95); }
  /* The living grid is a full-screen canvas; blurring it every frame is costly on phones. */
  .orbit-home .student-living-grid { filter: none; }
  .orbit-orb .orbit-sphere::after { display: none; }
  .orbit-panel.is-closing { animation-name: orbit-sheet-out; }
  .orbit-panel .home-panel { padding: 16px; }
  .orbit-panel .home-map-stage svg { height: 240px; }
  @keyframes orbit-sheet-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
  @keyframes orbit-sheet-out { to { opacity: 0; transform: translateY(30px); } }
}
@media (prefers-reduced-motion: reduce) {
  .orbit-ring, .orbit-sphere::after { animation: none; }
  .orbit-orb.is-spinning .orbit-face { animation: none; }
  .orbit-panel[open], .orbit-panel.is-closing { animation: none; }
}
