/* ============================================================
   Home page — centered floating orb + name, launch transition.
   ============================================================ */

.stage {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The wrap's box is exactly the orb (the label is absolutely positioned
   below it), so scaling from its top-left corner lands the orb precisely
   where the corner nav button sits on the next page. */
.orb-wrap {
  --orb-size: 220px;
  --corner-size: 56px;
  --corner-inset: 24px;
  position: fixed;
  top: 50%;
  left: 50%;
  width: var(--orb-size);
  height: var(--orb-size);
  transform: translate(-50%, -50%);
  transform-origin: top left;
  animation: orb-wrap-intro 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes orb-wrap-intro {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* Set by JS the moment the flight starts: clears the intro animation so
   it stops overriding transform, and pins the box to its current
   top-left position so the scale has a stable origin. */
.orb-wrap.flight-ready {
  animation: none;
  opacity: 1;
  top: calc(50% - var(--orb-size) / 2);
  left: calc(50% - var(--orb-size) / 2);
  transform: none;
}

.orb-wrap.launching {
  top: var(--corner-inset);
  left: var(--corner-inset);
  transform: scale(calc(var(--corner-size) / var(--orb-size)));
  transition:
    top 0.8s cubic-bezier(0.6, 0.01, 0.2, 1),
    left 0.8s cubic-bezier(0.6, 0.01, 0.2, 1),
    transform 0.8s cubic-bezier(0.6, 0.01, 0.2, 1);
}

/* Stop the idle float/pulse fighting the flight transform mid-animation. */
.orb-wrap.flight-ready .orb {
  animation: orb-pulse 4.5s ease-in-out infinite;
}

.orb-wrap.launching .orb__label {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
}

.orb {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  background: radial-gradient(circle at 32% 28%, #eaf6ff 0%, var(--accent-cyan) 32%, var(--accent-violet) 72%, #382a6e 100%);
  box-shadow:
    0 0 60px rgba(125, 211, 252, 0.45),
    0 0 120px rgba(167, 139, 250, 0.3),
    inset 0 0 40px rgba(255, 255, 255, 0.25);
  animation: orb-float 6s ease-in-out infinite, orb-pulse 4.5s ease-in-out infinite;
  overflow: visible;
}

.orb:hover { filter: brightness(1.08); }

.orb:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 6px; }

@keyframes orb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes orb-pulse {
  0%, 100% { box-shadow: 0 0 60px rgba(125, 211, 252, 0.45), 0 0 120px rgba(167, 139, 250, 0.3), inset 0 0 40px rgba(255, 255, 255, 0.25); }
  50% { box-shadow: 0 0 80px rgba(125, 211, 252, 0.65), 0 0 150px rgba(167, 139, 250, 0.45), inset 0 0 50px rgba(255, 255, 255, 0.35); }
}

/* Rotating shine sweep across the orb surface */
.orb__shine {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(255, 255, 255, 0.55) 8%, transparent 20%, transparent 100%);
  animation: orb-shine-spin 5s linear infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

@keyframes orb-shine-spin {
  to { transform: rotate(360deg); }
}

.orb__ring {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.35);
  pointer-events: none;
  animation: orb-ring-spin 14s linear infinite;
}

@keyframes orb-ring-spin {
  to { transform: rotate(360deg); }
}

.orb__photo-clip {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.orb__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.orb__initials {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.2rem;
  color: #10132b;
}

/* Absolutely positioned so it doesn't widen the wrap — the wrap's box
   must stay exactly orb-sized for the corner flight to land correctly. */
.orb__label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 28px;
  width: max-content;
  text-align: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.orb__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.02em;
  display: flex;
  gap: 0.5ch;
  justify-content: center;
  text-shadow: 0 0 24px rgba(125, 211, 252, 0.5);
}

.orb__name span {
  display: inline-block;
  animation: name-float 3.6s ease-in-out infinite;
}

.orb__name span:nth-child(2) { animation-delay: 0.4s; }

@keyframes name-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.orb__title {
  margin-top: 6px;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.orb__hint {
  margin-top: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.75;
}
