.home-closing {
  padding: 90px 24px 48px;
  scroll-margin-top: 64px;
}

.home-closing-panel {
  --closing-width: 1160px;
  position: relative;
  isolation: isolate;
  width: min(100%, var(--closing-width));
  min-height: 687px;
  margin-inline: auto;
  padding: 90px 32px 230px;
  overflow: hidden;
  border: 1px solid rgb(184 151 246 / 24%);
  border-radius: 36px;
  background: linear-gradient(180deg, #151025 0%, #0d0a1a 59%, #140e23 100%);
  box-shadow: inset 0 1px rgb(236 218 255 / 7%), 0 36px 105px rgb(0 0 0 / 50%);
  text-align: center;
}

.home-closing-sky,
.home-closing-sky::before,
.home-closing-sky::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-closing-sky {
  z-index: -1;
}

.home-closing-sky::before {
  z-index: 1;
  content: "";
  background:
    radial-gradient(ellipse 520px 320px at 50% 20%, rgb(14 9 26 / 51%), transparent 86%),
    radial-gradient(circle at 6% 26%, #e4ccfa6b 0 1px, transparent 1.8px),
    radial-gradient(circle at 11% 53%, #e8d5ff52 0 1px, transparent 1.6px),
    radial-gradient(circle at 15% 14%, #dcc2ff74 0 .8px, transparent 1.5px),
    radial-gradient(circle at 21% 37%, #dec0ff8b 0 1px, transparent 1.8px),
    radial-gradient(circle at 24% 73%, #e0caff45 0 .8px, transparent 1.6px),
    radial-gradient(circle at 27% 19%, #cba1fa61 0 1px, transparent 1.7px),
    radial-gradient(circle at 31% 50%, #ead6ff65 0 .7px, transparent 1.4px),
    radial-gradient(circle at 36% 28%, #eee4ff59 0 .7px, transparent 1.5px),
    radial-gradient(circle at 42% 11%, #eee4ff61 0 .7px, transparent 1.5px),
    radial-gradient(circle at 57% 63%, #dbc7ff71 0 .8px, transparent 1.6px),
    radial-gradient(circle at 65% 14%, #eee1ff63 0 .8px, transparent 1.5px),
    radial-gradient(circle at 72% 43%, #f4d9ff59 0 1px, transparent 1.7px),
    radial-gradient(circle at 77% 23%, #e6c7ff77 0 .8px, transparent 1.6px),
    radial-gradient(circle at 81% 68%, #f4d9ff5b 0 1px, transparent 1.8px),
    radial-gradient(circle at 87% 12%, #e4ccfa6b 0 1px, transparent 1.7px),
    radial-gradient(circle at 91% 40%, #dcc2ff68 0 .8px, transparent 1.6px),
    radial-gradient(circle at 94% 63%, #e6c7ff69 0 1px, transparent 1.7px);
}

.home-closing-sky::after {
  z-index: 2;
  content: "";
  background: radial-gradient(260px circle at var(--closing-x, 50%) var(--closing-y, 38%), rgb(195 151 255 / 15%), transparent 77%);
  opacity: 0;
}

.home-closing-cloud {
  position: absolute;
  width: 73%;
  height: 40%;
  border-radius: 50%;
  background: var(--cloud-color);
  filter: blur(67px);
  opacity: .31;
  transform: rotate(var(--cloud-angle));
}

.home-closing-cloud:nth-child(1) {
  --cloud-color: #6d38b0;
  --cloud-angle: -24deg;
  --cloud-duration: 18s;
  --cloud-offset: -5s;
  top: -9%;
  left: -21%;
}

.home-closing-cloud:nth-child(2) {
  --cloud-color: #7b399d;
  --cloud-angle: 19deg;
  --cloud-duration: 22s;
  --cloud-offset: -14s;
  top: 14%;
  right: -27%;
}

.home-closing-cloud:nth-child(3) {
  --cloud-color: #4c358d;
  --cloud-angle: -12deg;
  --cloud-duration: 26s;
  --cloud-offset: -8s;
  top: 40%;
  left: 12%;
}

.home-closing-horizon {
  position: absolute;
  z-index: 3;
  top: calc(100% - 150px);
  left: 50%;
  width: 150%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border: 1px solid rgb(197 155 255 / 77%);
  border-radius: 50%;
  background: radial-gradient(ellipse 60% 32% at 50% 0%, #311c4c, #141021 62%, #0a0812), #0a0812;
  box-shadow: 0 -1px 18px #aa67f1a1, 0 -9px 46px #8845d766, 0 -4px 102px #682dac4d, inset 0 2px 16px #ae71ea57;
}

.home-closing-content {
  position: relative;
  display: grid;
  justify-items: center;
}

.home-closing-mark {
  position: relative;
  display: grid;
  width: 120px;
  height: 100px;
  margin: 0 auto 22px;
  place-items: center;
}

.home-closing-mark::before,
.home-closing-mark::after {
  position: absolute;
  inset: calc(50% - 36px);
  border: 1px solid rgb(207 163 255 / 75%);
  border-radius: 50%;
  box-shadow: 0 0 16px rgb(183 117 238 / 45%);
  content: "";
  opacity: 0;
  pointer-events: none;
}

.home-closing-mark-float {
  display: grid;
  place-items: center;
}

.home-closing-mark img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 3px 15px rgb(198 127 255 / 37%));
}

.home-closing-content h2 {
  max-width: 710px;
  margin: 0 0 17px;
  color: #f4edfd;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(2rem, 4.4vw, 3.375rem);
  font-weight: 600;
  letter-spacing: -.054em;
  line-height: 1.09;
  text-wrap: balance;
}

.home-closing-summary {
  max-width: 520px;
  margin: 0 0 36px;
  color: #c2b5d0;
  font-size: .96875rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.home-closing-content .actions {
  justify-content: center;
  gap: 12px;
  margin: 0;
}

.home-closing-content .pill {
  min-height: 43px;
  padding: .65rem 1.15rem;
  border-color: rgb(209 173 250 / 34%);
  color: #f7f0ff;
  font-size: .875rem;
}

.home-closing-content .pill.primary {
  background: linear-gradient(180deg, #6b4d8a, #50386e);
  border-color: #a680c8;
  box-shadow: inset 0 1px rgb(241 219 255 / 24%), 0 3px 20px rgb(136 68 192 / 24%);
}

.home-closing-content .pill.outline {
  background: rgb(28 19 46 / 37%);
}

.home-closing-content .pill:hover {
  border-color: #d8b9f7;
  background-color: #37234c;
}

.home-closing-footer {
  position: absolute;
  inset: auto 0 30px;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding-inline: 24px;
}

.home-closing-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
}

.home-closing-footer nav a {
  color: #beafcd;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
  transition: color .16s ease;
}

.home-closing-footer p {
  margin: 0;
  color: #a497b2;
  font-size: .75rem;
  line-height: 1.5;
}

.home-closing-footer nav a:hover {
  color: #f7eeff;
}

.home-closing-panel a:focus-visible {
  outline: 2px solid #dfc1fa;
  outline-offset: 4px;
}

@media (min-width: 1440px) {
  .home-closing-panel {
    --closing-width: 1320px;
    padding: 110px 48px 260px;
  }

  .home-closing-horizon {
    top: calc(100% - 170px);
  }
}

@media (min-width: 1800px) {
  .home-closing-panel {
    --closing-width: 1480px;
  }
}

@media (max-width: 640px) {
  .home-closing {
    padding: 60px 16px 48px;
  }

  .home-closing-panel {
    min-height: 738px;
    padding: 64px 20px 230px;
    border-radius: 28px;
  }

  .home-closing-mark {
    width: 100px;
    height: 84px;
  }

  .home-closing-mark img {
    width: 62px;
    height: 62px;
  }

  .home-closing-horizon {
    top: calc(100% - 160px);
    width: 260%;
  }

  .home-closing-cloud {
    filter: blur(43px);
  }

  .home-closing-footer nav {
    gap: 12px 16px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .home-closing-cloud {
    animation: home-closing-aurora var(--cloud-duration) ease-in-out var(--cloud-offset) infinite alternate;
    animation-play-state: paused;
  }

  .home-closing-mark-float {
    animation: home-closing-float 6s 1.4s ease-in-out infinite;
    animation-play-state: paused;
  }

  .home-closing-panel.is-in-view :is(.home-closing-cloud, .home-closing-mark-float) {
    animation-play-state: running;
  }

  .home-closing-panel.has-entered .home-closing-mark img {
    animation: home-closing-mark-in 1.35s .12s cubic-bezier(.17,.65,.25,1) both;
  }

  .home-closing-panel.has-entered .home-closing-mark::before,
  .home-closing-panel.has-entered .home-closing-mark::after {
    animation: home-closing-ring 1.65s .6s ease-out both;
  }

  .home-closing-panel.has-entered .home-closing-mark::after {
    animation-delay: .8s;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .home-closing-sky::after {
    transition: opacity .26s ease;
  }

  .home-closing-panel.has-pointer:hover .home-closing-sky::after {
    opacity: 1;
  }
}

@keyframes home-closing-aurora {
  from { transform: translate(-9%, -6%) rotate(var(--cloud-angle)) scale(.88); }
  to { transform: translate(12%, 10%) rotate(calc(var(--cloud-angle) + 16deg)) scale(1.14); }
}

@keyframes home-closing-float {
  50% { transform: translateY(-7px); }
}

@keyframes home-closing-mark-in {
  0% { transform: perspective(260px) rotateY(-105deg) scale(.70); opacity: .28; }
  56% { transform: perspective(260px) rotateY(19deg) scale(1.14); opacity: 1; }
  100% { transform: perspective(260px) rotateY(0) scale(1); opacity: 1; }
}

@keyframes home-closing-ring {
  0% { transform: scale(.68); opacity: 0; }
  22% { opacity: .7; }
  100% { transform: scale(1.9); opacity: 0; }
}
