:root {
  --color-white: #fff;
  --color-red: #e90000;
  --color-redHover: #af0000;
}

*,
*::after,
*::before {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  font-size: calc(100vw / 360 * 10);
}

@media (min-width: 768px) {
  html {
    font-size: calc(100vw / 768 * 10);
  }
}

@media (min-width: 1025px) {
  html {
    font-size: calc(100vw / 1600 * 10);
  }
}

body {
  font-family: "Inter", sans-serif;
  color: #fff;
  font-weight: 400;
  overflow: hidden;
}

.main {
  height: 100dvh;
  position: relative;
}

.main-picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.main-picture__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.languages {
  position: relative;
  padding-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  z-index: 1;
}

.language__button {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 3.5rem;
  height: 3.5rem;
  background: #ffffff1a;
  backdrop-filter: blur(0.5rem);
  border: none;
  color: #ffffff99;

  transition:
    color 0.3s ease,
    background-color 0.3s ease;
}

.btn-text {
  font-size: 1.2rem;
  line-height: 1.1;
}

.language__button:not(.active) {
  cursor: pointer;
}

.language__button.active {
  color: var(--color-white);
}

.language__button.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("./img/border-icon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 3.5rem 3.5rem;
}

@media (min-width: 768px) {
  .languages {
    padding-top: 2rem;
    gap: 1rem;
  }

  .btn-text {
    font-size: 1.4rem;
  }
}

@media (min-width: 1025px) {
  .languages {
    padding-top: 4rem;
  }

  .btn-text {
    font-size: 1.8rem;
  }
}

@media (hover: hover) {
  .language__button:not(.active):hover {
    background-color: #ffffff4d;
    color: var(--color-white);
  }
}

.main-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  text-align: center;
}

.title {
  font-size: 3.4rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  padding: 0 1rem;
}

.title.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.title.title-zh {
  line-height: 1.2;
  letter-spacing: 0;
}

.main-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 21rem;
  padding: 1.8rem 0;
  background-color: var(--color-red);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 0.6rem;
  transition: background-color 0.3s ease;
}

.main-link svg {
  width: 1.6rem;
  height: 1.6rem;
}

@media (min-width: 768px) {
  .title {
    font-size: 4.6rem;
    line-height: 1;
    letter-spacing: -0.03em;
    padding: 0 2rem;
  }

  .title.title-zh {
    letter-spacing: -0.03em;
  }

  .main-link {
    width: 25rem;
    padding: 2.2rem 0;
  }

  .main-link svg {
    width: 1.8rem;
    height: 1.8rem;
  }
}

@media (min-width: 1025px) {
  .main-content {
    gap: 4rem;
  }

  .title {
    font-size: 7.4rem;
    padding: 0 20rem;
  }

  .title.title-zh {
    line-height: 1.25;
  }

  .main-link {
    width: 27.6rem;
    padding: 2rem 0;
  }
}

@media (hover: hover) {
  .main-link:hover {
    background-color: var(--color-redHover);
  }
}

@media (hover: none) {
  .main-link:active {
    background-color: var(--color-redHover);
  }
}
