body { isolation: isolate; }

.space-sky {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(149deg, #0d1022 0%, #080a15 55%, #101026 100%);
  --space-depth: 0;
  --space-x: 0;
  --space-y: 0;
}

.space-sky__ambient, .space-sky__dust, .space-sky__distant, .space-sky__stars, .space-sky__near { position: absolute; inset: -1rem; }
.space-sky__ambient {
  background: radial-gradient(ellipse at 79% 16%, #39336a8a, transparent 51%),
    radial-gradient(ellipse at 91% 82%, #2148705c, transparent 51%),
    radial-gradient(ellipse at 8% 64%, #35295a57, transparent 48%);
  transform: translate3d(calc(var(--space-x) * 4px), calc(var(--space-depth) * -8px + var(--space-y) * 3px), 0);
}
.space-sky__dust {
  display: block;
  transform: translate3d(calc(var(--space-x) * 6px), calc(var(--space-depth) * -11px + var(--space-y) * 4px), 0);
}
.space-sky__dust img { width: 100%; height: 100%; object-fit: cover; opacity: .52; object-position: 50% 45%; }
.space-sky__distant {
  inset: -1% -3%;
  transform: translate3d(calc(var(--space-x) * 7px), calc(var(--space-depth) * -14px + var(--space-y) * 4px), 0);
}
.space-sky__stars {
  inset: -1% -1.5%;
  transform: translate3d(calc(var(--space-x) * 13px), calc(var(--space-depth) * -24px + var(--space-y) * 7px), 0);
}
.space-sky__near {
  transform: translate3d(calc(var(--space-x) * 19px), calc(var(--space-depth) * -38px + var(--space-y) * 10px), 0);
}
.space-sky__distant::before, .space-sky__stars::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  border-radius: 50%;
}
.space-sky__distant::before {
  box-shadow: 10.4vw 3.5svh 0 #becefa39, 18.1vw 14.1svh 0 #bdcfff56, 29.3vw 11.1svh 0 #dbe6ff64, 45.1vw 4.2svh 0 #bdcfff56,  ,,   59.1vw 11.3svh 0 #9abdf43f, 68.1vw 9.2svh 0 #d8bcfa4e, 78.8vw 4.5svh 0 #b3c4e669, 92.5vw 8.2svh 0 #d8bcfa4e,  ,,   9.7vw 23.3svh 0 #8c9cc63b, 22.2vw 26.6svh 0 #dbe6ff64, 28.8vw 20.6svh 0 #b3c4e669, 36.5vw 25.9svh 0 #b3c4e669,  ,,   49.9vw 15.9svh 0 #b3c4e669, 67.3vw 23.5svh 0 #becefa39, 74.2vw 24.3svh 0 #becefa39, 88.2vw 23.6svh 0 #8c9cc63b,  ,,   9.2vw 33.1svh 0 #9abdf43f, 13.3vw 28.5svh 0 #dbe6ff64, 34.6vw 38.8svh 0 #bdcfff56, 39.6vw 31.6svh 0 #d8bcfa4e,  ,,   49.5vw 37.3svh 0 #becefa39, 71.6vw 34.2svh 0 #becefa39, 75.1vw 30.2svh 0 #d8bcfa4e, 88.7vw 40.2svh 0 #b3c4e669,  ,,   5.0vw 42.3svh 0 #becefa39, 23.6vw 41.7svh 0 #b3c4e669, 31.1vw 48.7svh 0 #8c9cc63b, 39.6vw 50.8svh 0 #9abdf43f,  ,,   54.5vw 51.8svh 0 #becefa39, 65.2vw 48.3svh 0 #8c9cc63b, 79.3vw 44.5svh 0 #b3c4e669, 91.3vw 42.0svh 0 #b9c6f858,  ,,   10.9vw 58.9svh 0 #b9c6f858, 24.5vw 66.7svh 0 #b9c6f858, 30.1vw 57.9svh 0 #8c9cc63b, 46.8vw 64.3svh 0 #b3c4e669,  ,,   56.2vw 62.5svh 0 #8c9cc63b, 70.7vw 65.2svh 0 #b9c6f858, 82.0vw 65.1svh 0 #8c9cc63b, 90.1vw 62.1svh 0 #d8bcfa4e,  ,,   3.2vw 77.1svh 0 #b3c4e669, 23.6vw 76.8svh 0 #b9c6f858, 28.9vw 71.3svh 0 #dbe6ff64, 41.4vw 68.8svh 0 #8c9cc63b,  ,,   57.6vw 74.6svh 0 #b9c6f858, 62.9vw 78.6svh 0 #bdcfff56, 79.7vw 73.3svh 0 #b9c6f858, 90.3vw 71.2svh 0 #bdcfff56,  ,,   4.1vw 84.8svh 0 #dbe6ff64, 21.5vw 86.7svh 0 #d8bcfa4e, 31.3vw 89.9svh 0 #bdcfff56, 40.4vw 91.8svh 0 #9abdf43f;
}
.space-sky__stars::before {
  width: 1.4px;
  height: 1.4px;
  box-shadow: 16.6vw 19.2svh 0 #cde5ff86, 21.3vw 6.0svh 0 #b1d7ff81, 38.1vw 15.0svh 0 #cde5ff86, 61.4vw 11.1svh 0 #edf3fd95,  ,,   66.1vw 6.7svh 0 #eadbff89, 81.2vw 2.5svh 0 #bad7ffa8, 15.0vw 24.4svh 0 #cde5ff86, 30.2vw 33.7svh 0 #edf3fd95,  ,,   35.9vw 23.9svh 0 #bdc4fa71, 58.7vw 37.8svh 0 #eadbff89, 73.5vw 20.7svh 0 #bdc4fa71, 85.2vw 29.0svh 0 #bad7ffa8,  ,,   8.0vw 46.0svh 0 #cde5ff86, 19.1vw 49.7svh 0 #cde5ff86, 44.3vw 45.5svh 0 #bad7ffa8, 52.3vw 39.3svh 0 #bad7ffa8,  ,,   79.1vw 39.2svh 0 #eadbff89, 89.6vw 49.3svh 0 #eadbff89, 1.5vw 65.5svh 0 #cde5ff86, 28.8vw 66.8svh 0 #eadbff89,  ,,   34.6vw 59.0svh 0 #b1d7ff81, 55.5vw 62.1svh 0 #eadbff89, 65.0vw 70.4svh 0 #edf3fd95, 92.4vw 61.4svh 0 #fff3e785,  ,,   14.7vw 79.2svh 0 #edf3fd95, 19.8vw 78.7svh 0 #edf3fd95, 38.4vw 77.5svh 0 #eadbff89, 57.1vw 87.9svh 0 #b1d7ff81,  ,,   70.9vw 75.4svh 0 #cde5ff86;
}
.space-quiet .space-sky { background: linear-gradient(154deg, #101020, #090b17 71%, #101127); }
.space-quiet .space-sky__ambient { opacity: .29; }
.space-quiet .space-sky__distant { opacity: .36; }
.space-quiet .space-sky__stars { opacity: .24; }
.space-quiet .space-sky__near { opacity: .28; }

.space-sky__star {
  position: absolute;
  left: var(--point-x);
  top: var(--point-y);
  width: var(--point-size, 1.55px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--point-tone, #e4e6ff);
  box-shadow: 0 0 var(--point-halo, 4px) 1px #a1aff485;
  opacity: var(--point-light, .64);
}
.space-sky__star:nth-child(1) { --point-x: 13%; --point-y: 19%; --glint-delay: -7s; }
.space-sky__star:nth-child(2) { --point-x: 19%; --point-y: 69%; --point-size: 1.1px; --point-tone: #b7deff; --glint-delay: -3s; }
.space-sky__star:nth-child(3) { --point-x: 33%; --point-y: 35%; --point-size: 1.2px; --glint-delay: -13s; }
.space-sky__star:nth-child(4) { --point-x: 54%; --point-y: 13%; --point-size: 1.1px; --point-light: .41; --glint-delay: -5s; }
.space-sky__star:nth-child(5) { --point-x: 67%; --point-y: 79%; --point-size: 1.3px; --glint-delay: -18s; }
.space-sky__star:nth-child(6) { --point-x: 77%; --point-y: 32%; --point-light: .81; --glint-delay: -11s; }
.space-sky__star:nth-child(7) { --point-x: 87%; --point-y: 56%; --point-size: 1.2px; --glint-delay: -16s; }
.space-sky__star:nth-child(8) { --point-x: 93%; --point-y: 20%; --point-tone: #f8dfeb; --point-halo: 5px; --glint-delay: -2s; }
.space-sky__star:nth-child(9) { --point-x: 28%; --point-y: 88%; --point-tone: #b7deff; --glint-delay: -8s; }
.space-sky__star:nth-child(10) { --point-x: 28%; --point-y: 24%; --point-size: 1.1px; --glint-delay: -16s; }
.space-sky__star:nth-child(11) { --point-x: 92%; --point-y: 87%; --point-size: 1.25px; --glint-delay: -3s; }
.space-quiet .space-sky__star:nth-child(n+5) { display: none; }
.space-sky__star:is(:nth-child(1), :nth-child(6), :nth-child(8))::before,
.space-sky__star:is(:nth-child(1), :nth-child(6), :nth-child(8))::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 6px;
  height: 1px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, var(--point-tone, #e4e6ff), transparent);
  opacity: .5;
}
.space-sky__star:is(:nth-child(1), :nth-child(6), :nth-child(8))::after { rotate: 90deg; }

.space-sky__meteor {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(2.15rem, 6.4vw, 6rem);
  height: 1.35px;
  border-radius: 1rem;
  background: linear-gradient(90deg, transparent, #819dff14 20%, #a3caff71 65%, #e3f1ff 100%);
  box-shadow: 8px 0 8px -3px #7088eabc;
  opacity: 0;
  transform-origin: right center;
}
.space-sky__meteor::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto auto;
  width: 2.3px;
  height: 2.3px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #f0f7ff;
  box-shadow: 0 0 6px 1px #add5ff9e;
}
.space-meteor-lane {
  position: fixed;
  z-index: 1;
  inset: 0 0 0 auto;
  width: min(var(--edge), 3.25rem);
  overflow: hidden;
  pointer-events: none;
}
.space-meteor-lane .space-sky__meteor { width: clamp(.68rem, 1.7vw, 1.55rem); }
.space-meteor-lane .space-sky__meteor::after { width: 1px; height: 1px; box-shadow: none; }

@media (prefers-reduced-motion: no-preference) {
  .space-sky.is-moving .space-sky__star {
    animation: star-glint 17s ease-in-out var(--glint-delay, 0s) infinite alternate;
  }
  .space-sky.is-moving .space-sky__star:nth-child(even) { animation-duration: 24s; }
  .space-quiet .space-sky.is-moving .space-sky__star { animation: none; }
  @keyframes star-glint { 0%, 25% { opacity: .38; } 61% { opacity: .76; } 100% { opacity: .49; } }

  .space-page-entry .space-sky.is-moving ~ #main-content :is(.hero-content, .pg-hero-copy, .plan-layout),
  html:not(.motion-paused) .space-section-enter {
    animation: space-content-enter 210ms var(--ease) both;
  }
  @keyframes space-content-enter { from { opacity: .94; transform: translateY(4px); } }
}

.header-brand img { animation: space-brand-entry 330ms var(--ease) both; }
@keyframes space-brand-entry { from { opacity: .9; transform: translateX(-3px); } }

.space-motion-toggle {
  min-height: 2.75rem;
  padding: 0 .13rem;
  border: 0;
  border-radius: .25rem;
  background: transparent;
  color: var(--muted);
  font-size: .9rem;
}
.space-motion-toggle:hover { color: var(--text); text-decoration: underline; text-underline-offset: .22em; }

:is(.hero-services a, .pg-retainer, .project-offer, .purchase-offer) { position: relative; }
:is(.hero-services a, .pg-retainer, .project-offer, .purchase-offer)::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  content: '';
  border-radius: inherit;
  border: 1px solid #aaa0e02b;
  opacity: 0;
  background: radial-gradient(ellipse 13rem 8rem at var(--card-light-x, 50%) var(--card-light-y, 50%), #c2b1ff20, transparent 80%);
  transition: opacity 220ms var(--ease);
}
:is(.hero-services a:focus-visible, .pg-retainer:focus-within, .project-offer:focus-within, .purchase-offer:focus-within)::after { opacity: .78; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(.hero-services a, .pg-retainer, .project-offer, .purchase-offer) {
    transition-property: background, border-color, box-shadow, transform;
    transition-duration: 210ms;
    transition-timing-function: var(--ease);
  }
  :is(.hero-services a, .pg-retainer, .project-offer, .purchase-offer).space-card-active {
    transform: translateY(-2px);
  }
  :is(.hero-services a, .pg-retainer, .project-offer, .purchase-offer)::after {
    transition-property: opacity, transform;
  }
  :is(.hero-services a, .pg-retainer, .project-offer, .purchase-offer).space-card-active::after {
    opacity: 1;
    transform: perspective(680px) rotateX(var(--card-tilt-x, 0deg)) rotateY(var(--card-tilt-y, 0deg));
  }
}

@media (min-width: 70.01rem) and (max-width: 84rem) {
  .nav-actions, .account-menu summary { gap: .55rem; }
}

@media (max-width: 48rem) {
  .space-sky__ambient { transform: translate3d(0, calc(var(--space-depth) * -6px), 0); }
  .space-sky__dust { transform: translate3d(0, calc(var(--space-depth) * -9px), 0); }
  .space-sky__dust img { object-position: 44% 50%; opacity: .57; }
  .space-sky__distant { transform: translate3d(0, calc(var(--space-depth) * -12px), 0); }
  .space-sky__stars { transform: translate3d(0, calc(var(--space-depth) * -20px), 0); }
  .space-sky__near { transform: translate3d(0, calc(var(--space-depth) * -31px), 0); }
  .space-sky__star:nth-child(n+9) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .space-sky__meteor { display: none; }
  :is(.hero-services a, .pg-retainer, .project-offer, .purchase-offer)::after { transition: none; }
}

@media (forced-colors: active), print {
  .space-sky, .space-meteor-lane, .space-motion-toggle { display: none; }
}
