/* A calm, deliberate launch sequence for the LAYAI desktop shell. */
#loading.connect-opening {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 36px 24px;
  color: #f1eff8;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 43%, rgba(110, 91, 164, .18), transparent 35%),
    radial-gradient(ellipse at 50% 100%, rgba(88, 126, 157, .10), transparent 42%),
    #070711;
  opacity: 1;
  transition: opacity .46s ease, visibility .46s ease;
}
#loading.connect-opening[hidden] {
  display: grid;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.opening-content {
  width: min(100%, 440px);
  transform: translateY(-8px);
  animation: opening-arrive 1.15s cubic-bezier(.2,.8,.2,1) both;
}
.opening-mark {
  position: relative;
  width: min(45vw, 214px);
  margin: 0 auto 8px;
  filter: drop-shadow(0 18px 40px rgba(107, 90, 157, .16));
}
.opening-mark::before,
.opening-mark::after {
  position: absolute;
  content: "";
  inset: 13%;
  border: 1px solid rgba(199, 188, 230, .10);
  border-radius: 50%;
  animation: opening-orbit 16s linear infinite;
}
.opening-mark::after {
  inset: 3%;
  border-color: rgba(167, 202, 216, .075);
  animation-duration: 24s;
  animation-direction: reverse;
}
.opening-mark svg { display: block; width: 100%; overflow: visible; }
.opening-halo { fill: url(#opening-halo); opacity: .85; }
.opening-orbit-line {
  fill: none;
  stroke: rgba(204, 201, 228, .27);
  stroke-width: 1;
  stroke-dasharray: 2 9;
  transform-origin: 110px 110px;
  animation: opening-orbit 32s linear infinite;
}
.opening-layer {
  fill: url(#opening-layer);
  stroke: rgba(220, 224, 243, .67);
  stroke-width: 1.2;
  stroke-linejoin: round;
  animation: opening-layer-breathe 3.8s ease-in-out infinite;
}
.opening-layer.layer-two { animation-delay: .22s; }
.opening-layer.layer-three { animation-delay: .44s; }
.opening-edge {
  fill: none;
  stroke: rgba(202, 205, 225, .38);
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.opening-trace {
  fill: none;
  stroke: #d8d4f5;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 18 116;
  animation: opening-current 2.35s cubic-bezier(.55,.05,.35,.95) infinite;
  filter: drop-shadow(0 0 5px rgba(198, 185, 255, .8));
}
.opening-node { fill: #ddd9f4; stroke: #8c84b7; stroke-width: 1; }
.opening-node-pulse {
  fill: none;
  stroke: rgba(213, 207, 255, .7);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  animation: opening-node-pulse 2.3s ease-out infinite;
}
.opening-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: -2px;
  color: #f0eef7;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .31em;
}
.opening-wordmark small {
  padding-left: 11px;
  border-left: 1px solid rgba(222, 219, 239, .24);
  color: #a8a2bd;
  font-size: 9px;
  font-weight: 450;
  letter-spacing: .19em;
}
.opening-eyebrow {
  margin: 35px 0 11px;
  color: #a79fbd;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.opening-title {
  margin: 0;
  color: #f2eff9;
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 450;
  letter-spacing: -.045em;
}
.opening-subtitle {
  margin: 10px auto 0;
  color: #928da5;
  font-size: 12px;
  line-height: 1.7;
}
.opening-loader {
  position: relative;
  width: 142px;
  height: 2px;
  overflow: hidden;
  margin: 30px auto 0;
  border-radius: 2px;
  background: rgba(185, 178, 210, .14);
}
.opening-loader::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -44%;
  width: 42%;
  content: "";
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #d8d2f4 50%, transparent);
  animation: opening-sweep 1.45s ease-in-out infinite;
}
.opening-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #77738b;
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.opening-status::before {
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: #c6b9f2;
  box-shadow: 0 0 12px rgba(198, 185, 242, .8);
  animation: opening-status-pulse 1.7s ease-in-out infinite;
}
@keyframes opening-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(-8px); } }
@keyframes opening-orbit { to { transform: rotate(360deg); } }
@keyframes opening-layer-breathe { 0%,100% { opacity: .76; } 50% { opacity: 1; } }
@keyframes opening-current { to { stroke-dashoffset: -134; } }
@keyframes opening-node-pulse { 0% { opacity: .68; transform: scale(.6); } 80%,100% { opacity: 0; transform: scale(2.6); } }
@keyframes opening-sweep { 0% { transform: translateX(0); opacity: .15; } 40% { opacity: 1; } 100% { transform: translateX(440%); opacity: .15; } }
@keyframes opening-status-pulse { 50% { opacity: .38; box-shadow: 0 0 3px rgba(198, 185, 242, .3); } }
@media (max-width: 500px) {
  #loading.connect-opening { padding: 25px 20px; }
  .opening-mark { width: min(57vw, 188px); }
  .opening-eyebrow { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .opening-content, .opening-mark::before, .opening-mark::after,
  .opening-orbit-line, .opening-layer, .opening-trace,
  .opening-node-pulse, .opening-loader::after, .opening-status::before {
    animation: none !important;
  }
  #loading.connect-opening { transition-duration: .01ms; }
}
