:root {
  --hero-media-inset: 10px;
}

.page-home {
  position: relative;
  background-color: var(--color-dark-bg);
  min-height: 100vh;
}

.page-home > .header {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: 100%;
  max-width: var(--home-max-width);
  padding: 16px 80px 0 var(--home-padding-x);
}

.home-screen {
  position: relative;
  max-width: var(--home-max-width);
  min-height: 100vh;
  margin-inline: auto;
  padding: 0 0 0 var(--home-padding-x);
  border-radius: 0 0 19px 19px;
  overflow: hidden;
  color: var(--color-white);
}

.home-screen::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: 100%;
  height: min(682px, 75vh);
  background-image: url("../../img/site-bg.png");
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: cover;
  opacity: 1;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Hero — на всю высоту под абсолютным header */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 590px);
  grid-template-rows: 1fr auto;
  align-content: center;
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
  padding: 0 45px 45px 0;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 590px;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  padding-top: var(--header-offset);
  position: relative;
  z-index: 2;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero__label-icon {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.hero__label-text {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  text-transform: uppercase;
  color: var(--color-white);
}

.hero__title {
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 400;
  line-height: 1;
  color: var(--color-white);
  transition: opacity 0.35s ease;
}

.hero__title.is-changing {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero__title {
    transition: none;
  }
}

.hero__media {
  position: absolute;
  top: var(--hero-media-inset);
  right: var(--hero-media-inset);
  bottom: var(--hero-media-inset);
  width: 666px;
  max-width: min(666px, calc(100% - var(--hero-media-inset) * 2));
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--color-dark-bg);
  z-index: 1;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  padding: 24px 40px;
  border: 1px solid var(--color-light-grey);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.004);
  color: var(--color-light-grey);
}

.hero__btn--top {
  display: none;
  transition: opacity var(--transition-fast);
}

.hero__btn--top:hover {
  opacity: 0.85;
}

.hero__btn--bottom {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
}

.hero__btn-text {
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.01em;
}

.hero__btn-icon {
  flex-shrink: 0;
  display: block;
  width: 24px;
  height: 14px;
}

/* Pagination */
.hero__pagination {
  position: absolute;
  right: 45px;
  bottom: 45px;
  z-index: 3;
}

.hero__pagination-dots {
  --dot-step: 67px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.hero__pagination-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--color-light-grey);
  pointer-events: none;
  transform: translateX(-50%)
    translateY(calc(var(--active-index, 0) * var(--dot-step)));
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero__pagination-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
}

.hero__pagination-num {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  font-family: "Inter", var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: var(--color-light-grey);
  white-space: nowrap;
}

.hero__pagination-dot {
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1.75px solid var(--color-light-grey);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast), opacity var(--transition-fast);
}

.hero__pagination-dot[aria-current="true"] {
  opacity: 0;
}

.hero__pagination-dot:not([aria-current="true"]):hover {
  background: rgba(237, 237, 237, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .hero__pagination-indicator {
    transition: none;
  }
}

/* Tablet / Mobile */
@media (max-width: 1299px) {
  .page-home > .header {
    padding: 16px 45px 0 clamp(20px, 5vw, 80px);
  }

  .home-screen {
    min-height: 100vh;
    padding: 0 0 0 clamp(20px, 5vw, 80px);
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 80px;
  }

  .hero__content {
    margin-top: 32px;
    max-width: none;
  }

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

  .hero__media {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 666 / 880;
    margin: 24px var(--hero-media-inset) 0 0;
    border-radius: 16px;
  }
}

@media (max-width: 1023px) {
  .page-home > .header {
    padding: 16px 15px 0;
  }

  .page-home > .header .header__lang,
  .page-home > .header .header__menu-text {
    font-size: 20px;
  }

  .home-screen {
    padding: 15px;
  }

  .hero {
    padding: 0;
  }

  .hero__btn--top {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 24px;
  }

  .hero__btn--bottom {
    display: none;
  }

  .hero__pagination {
    top: 50%;
    right: 15px;
    bottom: auto;
    transform: translateY(-50%);
  }
}

@media (max-width: 767px) {
  .page-home {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .page-home > #main-content {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .page-home > .header {
    padding: 18px;
  }

  .page-home > .header .header__nav {
    gap: 12px;
  }

  .page-home > .header .header__lang,
  .page-home > .header .header__menu-text {
    font-size: 18px;
  }

  .page-home > .header .header__search {
    width: 20px;
    height: 20px;
  }

  .page-home > .header .header__search svg {
    width: 20px;
    height: 20px;
  }

  .home-screen {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    border-radius: 0;
    padding: 18px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .home-screen::before {
    top: -83px;
    bottom: auto;
    left: 50%;
    width: 1376px;
    height: 682px;
    opacity: 0.1;
    transform: translateX(calc(-50% - 118px));
    background-position: center top;
  }

  .hero {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    padding-bottom: 0;
    overflow: hidden;
  }

  .hero__content {
    flex-shrink: 0;
    margin-top: 0;
    padding-top: 130px;
  }

  .hero__title {
    font-size: 40px;
    line-height: 1;
  }

  .hero__btn--top {
    flex-shrink: 0;
    margin-top: 24px;
  }

  .hero__btn {
    padding: 18px 24px;
  }

  .hero__btn-text {
    font-size: 16px;
  }

  .hero__btn-icon {
    width: 20px;
    height: auto;
  }

  .hero__media {
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    max-height: 100%;
    margin: 24px 0 0;
    position: relative;
    overflow: hidden;
  }

  .hero__media .hero-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .hero__pagination {
    top: 50%;
    right: 18px;
    bottom: auto;
    transform: translateY(-50%);
  }

  .hero__pagination-dots {
    --dot-step: 37px;
    gap: 18px;
  }

  .hero__pagination-row {
    width: 19px;
    height: 19px;
  }

  .hero__pagination-indicator {
    width: 19px;
    height: 19px;
  }

  .hero__pagination-dot {
    width: 8px;
    height: 8px;
    border-width: 1px;
  }

  .hero__pagination-num {
    right: calc(100% + 7px);
    font-size: 14px;
    line-height: 1.275;
  }
}
