/* =========================================================
   Selector en órbita: los sitios giran como paneles de cristal
   alrededor de un anillo de luz.
   ========================================================= */
.orbit {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(64px, 9vw, 120px) 16px clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 50% at 50% 70%, rgba(139, 61, 255, .18), transparent 70%),
    radial-gradient(40% 30% at 50% 100%, rgba(139, 61, 255, .12), transparent 70%);
}
.orbit-kicker {
  font: 500 clamp(18px, 2.4vw, 30px) var(--serif); letter-spacing: .02em; text-transform: uppercase;
  color: var(--ink);
}
.orbit-title {
  position: relative; z-index: 0;
  font: 700 clamp(64px, 15vw, 210px)/.85 var(--serif); letter-spacing: -.04em;
  margin: 4px 0 calc(-1 * clamp(40px, 7vw, 110px));
  background: linear-gradient(180deg, var(--lum-1) 0%, var(--lum-2) 45%, rgba(139, 61, 255, .15) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  text-shadow: none; filter: drop-shadow(0 0 30px rgba(139, 61, 255, .35));
  transform: perspective(600px) rotateX(18deg); transform-origin: bottom;
}

/* ---------- Escenario 3D ---------- */
.orbit-stage {
  --panel-w: clamp(170px, 26vw, 330px);
  position: relative; z-index: 1; height: clamp(360px, 46vw, 560px);
  perspective: 1600px; perspective-origin: 50% 20%;
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
}
.orbit-stage.dragging { cursor: grabbing; }

.orbit-floor {
  position: absolute; left: 50%; bottom: 4%; width: min(92vw, 980px); aspect-ratio: 1;
  transform: translateX(-50%) rotateX(76deg); transform-origin: 50% 100%;
  pointer-events: none;
}
.orbit-floor .ring {
  position: absolute; inset: 22%; border-radius: 50%;
  border: 3px solid var(--lum-1);
  box-shadow: 0 0 30px 6px rgba(139, 61, 255, .7), inset 0 0 40px 8px rgba(139, 61, 255, .45), 0 0 120px 30px rgba(139, 61, 255, .25);
  animation: ringPulse 4s ease-in-out infinite;
}
.orbit-floor .r2 {
  inset: 8%; border-width: 1px; border-color: rgba(139, 61, 255, .35);
  box-shadow: 0 0 40px rgba(139, 61, 255, .15); animation-delay: -2s;
}
.orbit-floor .core {
  position: absolute; inset: 38%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(139, 61, 255, .35), rgba(139, 61, 255, .05) 60%, transparent 70%);
  font: 700 clamp(28px, 4vw, 54px) var(--mono); color: var(--lum-1); text-shadow: 0 0 20px rgba(139, 61, 255, .9);
}
@keyframes ringPulse { 50% { opacity: .65; } }

.orbit-ring {
  position: absolute; left: 50%; top: 44%; width: 0; height: 0;
  transform-style: preserve-3d;
  transform: rotateX(-10deg) rotateY(var(--rot, 0deg));
}
.orbit-panel {
  position: absolute; left: calc(var(--panel-w) / -2); top: calc(var(--panel-w) * -.42);
  width: var(--panel-w); aspect-ratio: 16 / 11;
  transform: rotateY(var(--a)) translateZ(var(--r, 420px));
  border-radius: 16px; overflow: hidden; padding: 0; cursor: pointer;
  background: linear-gradient(160deg, rgba(245, 245, 247, .16), rgba(139, 61, 255, .04));
  border: 1px solid rgba(245, 245, 247, .45);
  box-shadow: 0 0 0 1px rgba(139, 61, 255, .15), 0 0 40px rgba(139, 61, 255, .25), inset 0 0 30px rgba(245, 245, 247, .12);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: opacity .5s, filter .5s, box-shadow .5s;
}
.orbit-panel::before { /* barra de navegador */
  content: ""; position: absolute; inset: 0 0 auto; height: 9%; z-index: 2;
  background: rgba(2, 2, 3, .55); border-bottom: 1px solid rgba(245, 245, 247, .2);
}
.orbit-panel::after { /* reflejo de cristal */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .22) 0%, transparent 35%, transparent 70%, rgba(255, 255, 255, .08) 100%);
}
.orbit-panel img {
  position: absolute; inset: 9% 0 0; width: 100%; height: 91%;
  object-fit: cover; object-position: top; opacity: .55; transition: opacity .5s;
  pointer-events: none;
}
.orbit-panel .tag {
  position: absolute; left: 10px; bottom: 10px; z-index: 4;
  padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, .65);
  font: 600 11px var(--mono); color: var(--lum-1); text-shadow: none;
}
.orbit-panel.back { opacity: .35; filter: saturate(.6); }
.orbit-panel.active {
  border-color: var(--lum-1);
  box-shadow: 0 0 0 1px var(--lum-2), 0 0 60px rgba(139, 61, 255, .6), inset 0 0 30px rgba(245, 245, 247, .2);
}
.orbit-panel.active img { opacity: 1; }
.orbit-panel:focus-visible { outline: 2px solid var(--lum-1); outline-offset: 4px; }

/* ---------- Pie con el sitio activo ---------- */
.orbit-info {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 40px);
  margin-top: clamp(70px, 9vw, 130px);
}
.orbit-caption {
  min-width: 0; max-width: 460px; padding: 22px 28px; border-radius: 20px;
  background: rgba(2, 2, 3, .82); border: 1px solid var(--glass-line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9);
}
.orbit-num { font: 600 13px var(--mono); color: var(--lum-2); letter-spacing: .1em; }
.orbit-caption h3 { font: 600 clamp(30px, 4vw, 46px)/1.05 var(--serif); letter-spacing: -.03em; margin: 6px 0 4px; }
.orbit-meta { font: 13px var(--mono); color: var(--muted); margin-bottom: 18px; }
.orbit-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.orbit-arrow {
  flex: none; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--glass-line); background: var(--glass); color: var(--lum-1);
  font: 600 20px var(--sans); transition: .25s;
}
.orbit-arrow:hover { background: var(--lum-2); color: #ffffff; box-shadow: 0 0 30px rgba(139, 61, 255, .5); }
.orbit-hint { margin-top: 22px; font: 12px var(--mono); color: var(--muted); opacity: .7; }

@media (max-width: 640px) {
  .orbit-stage { --panel-w: 46vw; height: 340px; perspective: 900px; }
  .orbit-floor { bottom: 2%; }
  .orbit-arrow { width: 42px; height: 42px; font-size: 16px; }
  .orbit-caption h3 { font-size: 28px; }
  .orbit-info { margin-top: 70px; }
  .orbit-caption { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .orbit-floor .ring { animation: none; }
}

/* Paneles como celulares verticales (26 sitios en la órbita) */
.orbit-stage { --panel-w: clamp(96px, 9.5vw, 150px); }
.orbit-panel { aspect-ratio: 9 / 18; top: calc(var(--panel-w) * -1.1); border-radius: 18px; }
.orbit-panel::before { display: none; }
.orbit-panel img { inset: 0; height: 100%; }
.orbit-panel .tag { left: 6px; right: 6px; bottom: 6px; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orbit-ring { top: 52%; }
@media (max-width: 640px) { .orbit-stage { --panel-w: 112px; } .orbit-panel .tag { display: none; } }
@media (max-width: 640px) { .orbit-stage { height: 420px; } }

/* Buscador de sitios */
.orbit-search {
  position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  width: min(560px, 100%); margin: clamp(56px, 8vw, 124px) auto 18px; padding: 7px 7px 7px 18px; border-radius: 99px;
  background: rgba(255, 255, 255, .92); color: #050506;
  box-shadow: 0 16px 40px -14px rgba(217, 220, 225, .6), inset 0 0 0 1px rgba(255, 255, 255, .8);
}
.orbit-search > svg { flex: none; width: 19px; height: 19px; }
.orbit-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 16px var(--sans); color: #050506; text-shadow: none; }
.orbit-search input::placeholder { color: #7c8088; }
.orbit-search button { flex: none; border: 0; cursor: pointer; padding: 11px 20px; border-radius: 99px; background: #050506; color: #d9dce1; font: 600 14px var(--sans); text-shadow: none; }
.orbit-search-msg { position: absolute; left: 0; right: 0; top: calc(100% + 8px); margin: 0; font: 12px var(--mono); color: var(--muted); text-align: center; }
.project.found .phone { box-shadow: 0 0 0 3px #d9dce1, 0 0 70px rgba(217, 220, 225, .7); transition: box-shadow .4s; }

/* Celular: órbita ligera, sin desenfoques ni sombras pesadas en 3D */
@media (max-width: 640px) {
  .orbit-panel { backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 0 0 1px rgba(217, 220, 225, .25); transition: opacity .4s; }
  .orbit-panel.active { box-shadow: 0 0 0 2px #d9dce1; }
  .orbit-panel.back { filter: none; opacity: .25; }
  .orbit-panel::after { display: none; }
  .orbit-floor .ring { animation: none; box-shadow: 0 0 20px 3px rgba(217, 220, 225, .45); }
  .orbit-caption { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(2, 2, 3, .95); }
  .orbit-title { filter: none; }
  .orbit-search-msg a { color: #d9dce1; font-weight: 600; }
}
.orbit-search-msg a { color: #d9dce1; }
