html,
body {
  background: #fff;
  animation: bg-enter 0.3s ease forwards;
}

@keyframes bg-enter {
  from {
    background: #fff;
  }
  to {
    background: #000;
  }
}

html.is-embedded,
html.is-embedded body {
  animation: none !important;
  background: transparent !important;
}

html.is-embedded.page-exiting,
html.is-embedded.page-exiting body {
  background: transparent !important;
}

html.is-embedded .page {
  animation: page-reveal-in 0.3s ease forwards;
}

.page {
  min-height: 100vh;
  background: transparent;
  color: #f0c040;
  padding: 36px 24px 0;
  position: relative;
  z-index: 1;
  animation: page-cover-enter 0.3s ease forwards;
}

@keyframes page-cover-enter {
  from {
    background: transparent;
  }
  to {
    background: #000;
  }
}

@keyframes page-reveal-in {
  from {
    opacity: 0;
    background: #000;
  }
  to {
    opacity: 1;
    background: #000;
  }
}

html.page-exiting,
body.page-exiting {
  animation: none;
  background: #fff;
}

html.page-exiting .page {
  animation: page-dismiss 0.3s ease forwards;
}

@keyframes page-dismiss {
  from {
    opacity: 1;
    background: #000;
  }
  to {
    opacity: 0;
    background: #000;
  }
}

.page-content {
  animation: content-enter 0.3s ease-out forwards;
}

@keyframes content-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes content-exit {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(24px);
  }
}

html.page-exiting .page-content,
body.page-exiting .page-content {
  animation: content-exit 0.3s ease-in forwards;
}

.page ::selection {
  background: #f0c040;
  color: #000;
}

.page ::-moz-selection {
  background: #f0c040;
  color: #000;
}

.close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #252525;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.close:hover {
  background: #333;
}

html.page-exiting .close {
  visibility: hidden;
  pointer-events: none;
}

.close-icon {
  position: relative;
  width: 16px;
  height: 16px;
}

.close-icon::before,
.close-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  background: #f0c040;
  border-radius: 1px;
}

.close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.header {
  max-width: 1392px;
  margin: 0 auto;
}

.header-inner {
  width: 724px;
  max-width: 100%;
  margin: 0 auto;
}

.cover {
  width: var(--project-cover-size);
  height: var(--project-cover-size);
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 36px;
}

.title-block {
  display: flex;
  justify-content: center;
  max-width: 1392px;
  margin: 0 auto;
}

.title {
  width: 693px;
  max-width: 100%;
  margin: 0;
  padding-bottom: 16px;
  font-size: 64px;
  line-height: 0.94;
  letter-spacing: -0.05em;
  color: #fff;
  word-break: break-word;
}

.lead {
  display: flex;
  gap: 48px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 1392px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.lead-text {
  width: 434px;
  max-width: 100%;
  font-size: 28px;
  line-height: 0.94;
  letter-spacing: -0.05em;
  color: #f0c040;
  word-break: break-word;
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 211px;
  max-width: 100%;
  font-size: 14px;
  line-height: 0.94;
  letter-spacing: -0.05em;
  color: #f0c040;
}

.screenshot {
  display: flex;
  justify-content: center;
  max-width: 846px;
  margin: 0 auto;
}

.screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

.text-block {
  display: flex;
  justify-content: center;
  max-width: 1392px;
  margin: 0 auto;
  padding: 48px 0;
}

.body-text {
  width: 434px;
  max-width: 100%;
  font-size: 28px;
  line-height: 0.94;
  letter-spacing: -0.05em;
  color: #f0c040;
  word-break: break-word;
}

.body-text p + p {
  margin-top: 12px;
}

@media (max-width: 768px) {
  .lead {
    flex-direction: column;
    gap: 32px;
  }

  .lead-text,
  .meta,
  .body-text {
    width: 100%;
  }

  .title {
    font-size: clamp(40px, 10vw, 64px);
  }
}

/* как плитки на index при 1 колонке */
@media (max-width: 623px) {
  .header-inner {
    width: 100%;
  }

  .cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  body {
    animation: none;
    background: #000;
  }

  html.is-embedded,
  html.is-embedded body {
    background: transparent;
  }

  html.is-embedded .page {
    animation: none;
    opacity: 1;
    background: #000;
  }

  .page-content {
    animation: none;
    opacity: 1;
    transform: none;
  }

  html.page-exiting,
  body.page-exiting {
    animation: none;
    background: #fff;
  }

  html.page-exiting .page {
    animation: none;
    opacity: 0;
    background: #000;
  }

  html.page-exiting .page-content,
  body.page-exiting .page-content {
    animation: none;
    opacity: 0;
    transform: translateY(24px);
  }
}
