/* Завершающая надпись прямо на фоне страницы. */
.drawer-header > .icon-btn { flex: none; }
@property --ending-pull {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

.site-ending {
  --ending-pull: 0;
  transition: --ending-pull .12s ease-out;
}

.site-ending.is-returning {
  transition: --ending-pull .36s cubic-bezier(.22, .73, .32, 1);
}

.ending-reload-curtain {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #08090b;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.footer-tagline {
  text-align: center;
}

.site-footer .footer-farewell {
  width: auto;
  justify-self: end;
  text-align: right;
}

.footer-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 62px;
  min-height: 38px;
}

.footer-brand-label {
  opacity: max(0, calc(1 - var(--ending-pull) * 1.22));
  transform-origin: left center;
  transform: scale(calc(1 - var(--ending-pull) * .44), calc(1 - var(--ending-pull) * .26));
}

.footer-brand::after {
  content: '';
  box-sizing: border-box;
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -50%;
  width: calc(62px - var(--ending-pull) * 24px);
  height: calc(24px + var(--ending-pull) * 14px);
  padding: 1.5px;
  border-radius: calc(5px + var(--ending-pull) * 14px);
  background: conic-gradient(#e5ebf5 calc(var(--ending-pull) * 1turn), #bac5d63d 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: min(1, calc(var(--ending-pull) * 1.6));
  pointer-events: none;
}

.film-ending {
  display: none;
  margin: 4px auto 0;
  padding: 22px 20px 38px;
  text-align: center;
  background: none;
  border: 0;
  box-shadow: none;
}
body:has(#content-home.active) .film-ending { display: block; }
.ending-lettering {
  display: inline-block;
  font: 400 40px/1 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  letter-spacing: .015em;
  color: #edf0f5;
  opacity: .8;
  white-space: nowrap;
  background: none;
  border: 0;
  text-shadow: none;
  -webkit-text-stroke: 0;
  transform-origin: center 37%;
  transform: scale(calc(1 + var(--ending-pull) * .35), calc(1 + var(--ending-pull) * 1.15));
}

@media (max-width: 760px) {
  .site-footer {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 16px;
  }

  .footer-tagline {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .film-ending { padding: 18px 16px 28px; }
  .ending-lettering { font-size: 34px; }
}

:root[data-echo-motion='off'] .footer-brand-label,
:root[data-echo-motion='off'] .ending-lettering {
  transform: none;
}
