@charset "UTF-8";

/* Шрифт Atyp Text — файлы в assets/fonts/ */
@font-face {
  font-family: "Atyp Text";
  src: url("../fonts/AtypText-Regular.woff2") format("woff2"),
    url("../fonts/AtypText-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atyp Text";
  src: url("../fonts/AtypText-Medium.woff2") format("woff2"),
    url("../fonts/AtypText-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atyp Text";
  src: url("../fonts/AtypText-Semibold.woff2") format("woff2"),
    url("../fonts/AtypText-Semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atyp Text";
  src: url("../fonts/AtypText-Bold.woff2") format("woff2"),
    url("../fonts/AtypText-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Сброс */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
p,
ul {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: 0.25s;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/*
  Резиновость: 1rem = 10px на макете 1512×982.
  Масштаб берётся по меньшей из сторон окна, чтобы первый экран
  целиком помещался и на широких, и на невысоких экранах.
*/
html {
  font-size: min(100vw / 151.2, 100vh / 98.2);
}

/* Планшеты: контент (~970px макета) растягивается на всю ширину */
@media (min-width: 768px) and (max-width: 1199px) {
  html {
    font-size: min(100vw / 100, 100vh / 98.2, 7.93px);
  }
}

/* Мобильные: 1rem = 10px мобильного макета 375px */
@media (max-width: 767px) {
  html {
    font-size: min(100vw / 37.5, 14px);
  }
}

body {
  background: #244c5a;
  color: #fff;
  font-family: "Atyp Text", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  overflow: hidden;
  min-height: max(100vh, 98.2rem);
  padding: 5.9rem 5.9rem 8.2rem;
  background: #244c5a;
}

/* Орнаменты — прижаты к правому краю окна */
.page-ornament {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.page-ornament img {
  width: 100%;
}

.page-ornament--1 {
  top: -41.9rem;
  right: -27.2rem;
  width: 108rem;
}

.page-ornament--2 {
  top: 58.2rem;
  right: -24.8rem;
  width: 89.6rem;
}

/* Шапка */
.header {
  position: relative;
  z-index: 10;
}

.header-logo {
  position: relative;
  display: block;
  width: 45.2rem;
  container-type: inline-size;
}

.header-logo img {
  width: 100%;
}

/* Подпись под «UZOBMENKA» — текстом, чтобы менялась по языку */
.header-logo-text {
  position: absolute;
  top: 61%;
  left: 25.4%;
  color: #fff;
  font-size: 4.6cqw;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}

/* Переключатель языков */
.lang {
  position: absolute;
  top: 0;
  right: 5rem;
  width: 9.7rem;
}

.lang-active,
.lang-list {
  border-radius: 0.5rem;
  background: rgba(35, 151, 35, 0.5);
}

.lang-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.8rem;
  padding: 0 0.8rem 0 1.8rem;
}

.lang-flag {
  width: 3.1rem;
  height: 1.8rem;
  object-fit: cover;
}

.lang-arrow {
  width: 2.1rem;
  transition: transform 0.25s;
}

.lang-list {
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 0;
  width: 100%;
  padding: 1.1rem 0.8rem 0.7rem 1.8rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  transition: 0.25s;
}

.lang:hover .lang-list,
.lang.is-open .lang-list {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.lang:hover .lang-arrow,
.lang.is-open .lang-arrow {
  transform: rotate(180deg);
}

.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 1.8rem;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
}

.lang-item + .lang-item {
  margin-top: 1rem;
}

.lang-item span {
  width: 2rem;
}

.lang-item:hover {
  opacity: 0.7;
}

/* Первый экран */
.hero {
  position: relative;
  z-index: 5;
  padding-top: 7rem;
}

.hero-coin {
  position: absolute;
  top: -8.2rem;
  left: 58rem;
  z-index: -1;
  width: 21.5rem;
  animation: coinFloat 4s ease-in-out infinite;
}

.hero-coin img {
  width: 100%;
}

@keyframes coinFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(1.2rem) rotate(-3deg);
  }
}

.hero-title {
  font-size: 8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-title-top {
  display: block;
  line-height: 1;
}

.hero-title-accent {
  display: inline-block;
  line-height: 1.45;
  background: linear-gradient(180deg, #239723 21.983%, #1eb53a 69.828%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-hint {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  height: 3.8rem;
  margin-top: 1rem;
  padding-left: 0.2rem;
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1.42;
}

.hero-hint img {
  width: 3.8rem;
  animation: hintBounce 2s ease-in-out infinite;
}

@keyframes hintBounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(0.4rem);
  }
}

/* Кнопки-ссылки */
.hero-links {
  display: grid;
  grid-template-columns: repeat(2, 41.9rem);
  gap: 1.5rem;
  margin-top: 3.3rem;
}

.hero-link {
  position: relative;
  display: flex;
  align-items: center;
  height: 8.9rem;
  padding-left: 2.7rem;
  border-radius: 5rem;
  background: linear-gradient(0deg, #f2efdc 0%, #fff 100%);
  color: #244c5a;
}

.hero-link:hover {
  transform: translateY(-0.3rem);
  box-shadow: 0 0.8rem 2.4rem rgba(0, 0, 0, 0.25);
}

.hero-link:focus-visible {
  outline: 2px solid #1eb53a;
  outline-offset: 3px;
}

.hero-link--main {
  border: 1px solid #f2efdc;
  background: #239723;
  box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.25);
  color: #fff;
}

.hero-link--main:hover {
  background: #1eb53a;
}

.hero-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 6.5rem;
  min-width: 6.5rem;
  height: 6.5rem;
  background: url("../img/ellipse-2.svg") center / 100% 100% no-repeat;
}

.hero-link--main .hero-link-icon {
  background-image: url("../img/ellipse-1.svg");
}

.hero-link-icon img {
  width: calc(var(--s) * 0.1rem);
}

/* Вертикальный разделитель */
.hero-link-text {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  justify-content: center;
  margin-left: 1.9rem;
  padding-left: 2.4rem;
  padding-right: 2.4rem;
  border-left: 1px solid #1eb53a;
  margin-top: 0.85rem;
  margin-bottom: 0.85rem;
}

.hero-link--main .hero-link-text {
  border-left-color: #fff;
}

.hero-link-title {
  color: #239723;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-link-sub {
  margin-top: 0.2rem;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.3;
}

.hero-link--main .hero-link-title {
  color: #fff;
}

/* Слоган */
.hero-slogan {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  margin-top: 7.9rem;
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1.45;
  text-transform: uppercase;
}

.hero-slogan img {
  width: 6.4rem;
}

/* ===== Языковые версии: тексты UZ/EN длиннее русских ===== */
:lang(uz) .hero-title-top {
  font-size: 6.6rem;
}

:lang(uz) .hero-coin {
  left: 74rem;
}

:lang(en) .hero-coin {
  left: 82.5rem;
}

/* ===== Мобильная версия (макет 375×812) ===== */
@media (max-width: 767px) {
  .page {
    min-height: 100vh;
    min-height: 100svh;
    padding: 2.9rem 2rem 4rem;
  }

  .header,
  .hero {
    max-width: 33.5rem;
    margin-left: auto;
    margin-right: auto;
  }

  .header-logo {
    width: 24.5rem;
  }

  /* Компактный переключатель языков */
  .lang {
    top: 0.3rem;
    right: 0;
    width: 6.4rem;
  }

  .lang-active {
    height: 3.2rem;
    padding: 0 0.6rem 0 0.9rem;
  }

  .lang-flag {
    width: 2.6rem;
    height: 1.5rem;
  }

  .lang-arrow {
    width: 1.6rem;
  }

  /* Непрозрачный фон (тот же цвет), чтобы не просвечивала монета */
  .lang-active,
  .lang-list {
    background: #24713f;
  }

  .lang-list {
    top: calc(100% + 0.6rem);
    padding: 0.9rem 0.6rem 0.9rem 0.9rem;
  }

  .lang-item {
    font-size: 1.3rem;
  }

  .lang-item span {
    width: auto;
  }

  .page-ornament--1 {
    top: -16rem;
    right: -30rem;
    width: 62rem;
  }

  .page-ornament--2 {
    top: auto;
    bottom: -14rem;
    right: -22rem;
    width: 56rem;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero-coin {
    top: -1.2rem;
    left: 29.2rem;
    width: 8.6rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-title-top {
    line-height: 1.2;
  }

  .hero-title-accent {
    margin-top: 0.6rem;
    font-size: 4.7rem;
    line-height: 1.3;
  }

  .hero-hint {
    gap: 1rem;
    height: 3.3rem;
    margin-top: 1rem;
    padding-left: 0;
    font-size: 2.2rem;
  }

  .hero-hint img {
    width: 3.3rem;
  }

  .hero-links {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    margin-top: 2.6rem;
  }

  .hero-link {
    height: 8.3rem;
    padding-left: 1.1rem;
  }

  .hero-link-icon {
    width: 6rem;
    min-width: 6rem;
    height: 6rem;
  }

  .hero-link-icon img {
    width: calc(var(--s) * 0.092rem);
  }

  .hero-link-text {
    margin: 0.8rem 0 0.8rem 1.5rem;
    padding-left: 1.4rem;
  }

  .hero-link-title {
    font-size: 1.7rem;
  }

  .hero-link-sub {
    margin-top: 0.1rem;
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .hero-slogan {
    gap: 1.9rem;
    margin-top: 3.2rem;
    font-size: 2.3rem;
  }

  .hero-slogan img {
    width: 4.4rem;
  }

  .hero-link-text {
    padding-right: 1.2rem;
  }

  /* Языковые версии на мобильном */
  :lang(uz) .header-logo-text,
  :lang(en) .header-logo-text {
    font-size: 4cqw;
  }

  :lang(uz) .hero-coin,
  :lang(en) .hero-coin {
    left: 29.2rem;
  }

  :lang(uz) .hero-title-top {
    font-size: 2.5rem;
  }

  :lang(en) .hero-title-top {
    font-size: 2.8rem;
  }

  :lang(uz) .hero-title-accent,
  :lang(en) .hero-title-accent {
    font-size: 3rem;
  }

  :lang(uz) .hero-hint,
  :lang(en) .hero-hint {
    font-size: 1.8rem;
  }

  :lang(uz) .hero-slogan,
  :lang(en) .hero-slogan {
    gap: 1.4rem;
    font-size: 2rem;
    line-height: 1.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-coin,
  .hero-hint img {
    animation: none;
  }
}
