/* ============ 404 ============ */
.not-found {
  position: relative;   /* без z-index/transform — не создаёт stacking context,
                           чтобы точки с z-index:-1 ушли под шапку */
  padding: 40px 0 0;
}

/* точки: на ПК заходят на область шапки (отрицательный top),
   лежат под всем контентом и под шапкой, но поверх фона body */
.not-found::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 1280px;
  height: 1140px;
  background: url("../../img/404bg.svg") no-repeat center top / contain;
  z-index: -1;
  pointer-events: none;
}

.not-found__inner {
  position: relative; /* контент всегда над точками */
  text-align: center;
}

.not-found__img {    
  width: 100%;
    margin-inline: auto;
    object-fit: contain;
}

/* 64/36 — по ТЗ (на моб именно 36) */
.not-found__title {
  margin-top: 8px;
  font-size: 64px;
  font-weight: 600;
  line-height: 1.15;
}

/* 20/18 */
.not-found__text {
  max-width: 640px;
  margin: 20px auto 0;
  font-size: 20px;
  line-height: 1.5;
}

/* --- Карточки-действия --- */
.not-found__actions {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  margin-top: 60px;
}

.not-found-card {
    padding: 26px;
    border-radius: 30px;
    background-color: var(--color-white);
    font-size: 20px;
    line-height: 1.5;
    text-align: center;
    color: var(--color-dark);
    width: 330px;
    max-width: 100%;
}

.not-found-card a {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.not-found-card a:hover { color: var(--color-accent); }

/* --- Мобильные --- */
@media (max-width: 1024px) {
  .not-found { padding: 20px 0 0; }

  /* точки не заходят на шапку — от верха секции, меньше размером */
  .not-found::before {
    top: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .not-found__img { max-width: 420px; object-fit: contain; height:auto;}

  .not-found__title {
    margin-top: 0;
    font-size: 36px;
    line-height: 1.2;
  }

  .not-found__text {
    margin-top: 14px;
    font-size: 18px;
  }

  .not-found__actions {
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
  }

  .not-found-card {
    width: 100%;
    padding: 20px 24px;
  }
}

/* --- Тёмная тема --- */
body.dark .not-found-card {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
}
body:not(.dark) .header{
    background-color: transparent;
}