/* Последний экран выдвигается из-под скруглённого края страницы. */
.outro-page-content {
  position: relative;
  z-index: 1;
  display: flow-root;
  border-end-start-radius: clamp(30px, 5vw, 80px);
  border-end-end-radius: clamp(30px, 5vw, 80px);
}

@font-face {
  font-family: "Vesenniy Light Web";
  src: url("../../assets/shared/Vesenniy-Light.otf") format("opentype");
  font-weight: 300;
  font-display: swap;
}

/* Последний экран остаётся за страницей, пока скруглённый край уходит вверх. */
.site-outro {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  height: 100vh;
  height: 100dvh;
  padding-block-end: 22.4vh;
  padding-block-end: 22.4dvh;
  overflow: clip;
  background-color: #0b819f;
}

.site-outro__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

html.is-site-outro-visible {
  scrollbar-width: none;
}

html.is-site-outro-visible::-webkit-scrollbar {
  display: none;
}

.outro-contact {
  position: relative;
  display: grid;
  place-items: center;
  container-type: inline-size;
  width: min(574px, calc(100% - 24px), 90vh);
  width: min(574px, calc(100% - 24px), 90dvh);
  aspect-ratio: 1;
  color: #fff;
}

.outro-contact::after {
  /* Малый круг размывает видео и большой круг под ним. */
  content: "";
  position: absolute;
  inset: calc(463 / 574 * 100%) auto auto calc(433 / 574 * 100%);
  width: calc(78 / 574 * 100%);
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / .3);
  border-radius: 50%;
  background: linear-gradient(90deg,
    rgb(255 255 255 / .06),
    rgb(255 255 255 / .006) 48.558%,
    rgb(255 255 255 / .06));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.outro-contact__glow {
  position: absolute;
  inset: 0;
  max-inline-size: 100%;
  block-size: auto;
  pointer-events: none;
}

.outro-contact__controls {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(12px, 3.833cqi, 22px);
  width: 100%;
  text-align: center;
}

.outro-contact__title {
  font: 500 clamp(22px, 6.62cqi, 38px) / 1.1 var(--font-medium);
  letter-spacing: .02em;
}

.outro-contact__title span {
  display: block;
}

@property --outro-control-opacity {
  syntax: "<number>";
  inherits: true;
  initial-value: .5;
}

.outro-contact__input,
.outro-contact__button {
  height: clamp(44px, 9.756cqi, 56px);
  min-inline-size: 0;
  padding-inline: 16px;
  appearance: none;
  border: 1px solid rgb(255 255 255 / var(--outro-control-opacity));
  border-radius: 1000px;
  background: linear-gradient(90deg,
    rgb(255 255 255 / calc(var(--outro-edge-alpha) * var(--outro-control-opacity))),
    rgb(255 255 255 / calc(var(--outro-center-alpha) * var(--outro-control-opacity))) 48.558%,
    rgb(255 255 255 / calc(var(--outro-edge-alpha) * var(--outro-control-opacity))));
  color: #fff;
  font: 300 clamp(16px, 3.485cqi, 20px) / 1 "Vesenniy Light Web", var(--font-information);
  letter-spacing: .05em;
  text-align: center;
}

.outro-contact__input {
  --outro-edge-alpha: .16;
  --outro-center-alpha: .02;
  width: min(100%, max(236px, calc(447 / 574 * 100%)));
  transition: border-color 220ms ease;
}

.outro-contact__button {
  --outro-edge-alpha: .32;
  --outro-center-alpha: .03;
  width: min(100%, max(200px, calc(293 / 574 * 100%)));
  transition: --outro-control-opacity 220ms ease, color 220ms ease;
}

.outro-contact__input::placeholder,
.outro-contact__button:disabled {
  opacity: 1;
  color: rgb(255 255 255 / var(--outro-control-opacity));
}

.outro-contact__input:focus {
  border-color: #fff;
  outline: none;
}

.outro-contact__input:focus::placeholder {
  opacity: 0;
}

.outro-contact__button:enabled:focus-visible {
  --outro-control-opacity: .85;
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (hover: hover) {
  .outro-contact__input:hover {
    border-color: #fff;
  }

  .outro-contact__button:enabled:hover {
    --outro-control-opacity: .85;
  }
}

@media (max-width: 767.98px) {
  .site-outro__video {
    object-position: right center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .outro-contact__input,
  .outro-contact__button { transition: none; }
}
