/* stp:base */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Plus+Jakarta+Sans:wght@400&display=swap');

:root {
  --bg: #EAE2CB;
  --green: #7C9A72;
  --brown: #D58C63;
  --text: #26352C;
  --font-head: 'DM Serif Display', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

html { font-size: calc(100vw / 1440 * 10); overflow-x: hidden; overflow-y: scroll; }
@media (max-width: 1024px) { html { font-size: calc(100vw / 1024 * 10); } }
@media (max-width: 640px) { html { font-size: calc(100vw / 375 * 10); } }

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

html {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

body {
  font-size: clamp(14px, 1.6rem, 1.6rem);
  background: var(--bg);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; transition: color 0.3s ease, opacity 0.3s ease; }
button { font: inherit; color: inherit; cursor: pointer; }

.title {
  font-family: var(--font-head);
  font-size: 3.8rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--green);
  text-align: center;
}

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
#preloader img { width: 8rem; height: 8rem; }

html.menu-lock, html.menu-lock body { overflow: hidden; }

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 3.6rem 8rem 1.8rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.header.scrolled {
  background: var(--bg);
  box-shadow: 0 0.2rem 1.2rem rgba(38, 53, 44, 0.15);
}
html.menu-lock .header.scrolled { background: transparent; box-shadow: none; }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 128rem;
  margin: 0 auto;
  padding: 1.2rem 1.6rem;
  background: var(--green);
  border-radius: 2rem;
}

.nav { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-link { color: var(--bg); }
.nav-link:hover { color: var(--text); }

.burger-btn {
  display: none;
  position: relative;
  z-index: 101;
  width: 4.8rem;
  height: 4.8rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  background: transparent;
  border: 0;
}
.burger-btn span {
  display: block;
  width: 3.6rem;
  height: 0.2rem;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}
.burger-btn.act span { background: var(--bg); }
.burger-btn.act span:nth-child(1) { transform: translateY(1.1rem) rotate(45deg); }
.burger-btn.act span:nth-child(2) { opacity: 0; }
.burger-btn.act span:nth-child(3) { transform: translateY(-1.1rem) rotate(-45deg); }

#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  justify-content: flex-end;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#mobile-menu.opened { opacity: 1; pointer-events: auto; }
.mobile-menu__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.6rem;
  width: 29rem;
  height: 100%;
  background: var(--green);
  border-radius: 4rem 0 0 4rem;
}
.mobile-menu__panel .nav-link { color: var(--text); }
.mobile-menu__panel .nav-link:hover { color: var(--bg); }

@keyframes store-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1rem); }
}

@media (max-width: 1024px) {
  .header { padding: 3.6rem 2.4rem 1.8rem; }
}

@media (max-width: 640px) {
  .title { font-size: 3.8rem; }
  #preloader img { width: 8rem; height: 8rem; }
  .header { padding: 4.2rem 2.6rem 0.8rem; }
  .header__inner { justify-content: flex-end; padding: 0; background: transparent; border-radius: 0; }
  .nav { display: none; }
  .burger-btn { display: flex; }
}
/* /stp:base */
/* stp:hero */
.hero {
  padding: 14rem 8rem 30.5rem;
  background: url(../img/hero.webp) center / cover no-repeat;
}
.hero__inner { max-width: 128rem; margin: 0 auto; }
.hero__title img { width: 63rem; height: auto; }

@media (max-width: 1024px) {
  .hero { padding: 14rem 2.4rem 30.5rem; }
}

@media (max-width: 640px) {
  .hero { padding: 12.2rem 2rem 47.7rem; background-image: url(../img/hero-m.webp); }
  .hero__title img { width: 33.5rem; }
}
/* /stp:hero */
/* stp:about */
.about { margin-top: 15rem; padding: 0 8rem; }
.about__wrap { max-width: 128rem; margin: 0 auto; }
.about__content { display: flex; align-items: center; gap: 10.8rem; margin-top: 2.8rem; }
.about__text { flex: 0 0 auto; width: 63rem; }
.about__img { flex: 0 0 auto; width: 54.2rem; height: 30.4rem; object-fit: cover; }

@media (max-width: 1024px) {
  .about { padding: 0 2.4rem; }
  .about__content { flex-direction: column; gap: 2.8rem; }
  .about__text { width: 100%; }
  .about__img { width: 54.2rem; max-width: 100%; height: auto; aspect-ratio: 542 / 304; }
}

@media (max-width: 640px) {
  .about { margin-top: 8rem; padding: 0; }
  .about__content { gap: 2rem; margin-top: 2.4rem; }
  .about__img { order: -1; width: 100%; max-width: none; height: 21rem; }
  .about__text { padding: 0 2rem; }
}
/* /stp:about */
/* stp:how-to-play */
.how { margin-top: 15rem; }
.how__box {
  display: flex;
  justify-content: center;
  max-width: 128rem;
  margin: 0 auto;
  padding: 10.8rem 0 14.2rem;
  background: url(../img/how-to-play-1.webp) center / cover no-repeat;
}
.how__content { width: 45.9rem; }
.how__content .title { margin-bottom: 2.8rem; }
.how__list { display: flex; flex-direction: column; gap: 2.4rem; }
.how__item { display: flex; align-items: flex-start; gap: 0.8rem; }
.how__icon { flex: 0 0 auto; width: 2.8rem; height: 2.8rem; }
.how__details { display: flex; flex-direction: column; gap: 0.6rem; }
.how__name {
  font-family: var(--font-head);
  font-size: clamp(14px, 1.8rem, 1.8rem);
  font-weight: 400;
  line-height: 2.4rem;
  color: var(--brown);
}

@media (max-width: 1024px) {
  .how__box { padding-left: 2.4rem; padding-right: 2.4rem; }
}

@media (max-width: 640px) {
  .how { margin-top: 8rem; }
  .how__box { padding: 0 2rem; background: none; }
  .how__content { width: 100%; }
  .how__content .title { margin-bottom: 2.4rem; }
  .how__list { gap: 2rem; }
  .how__name { line-height: 1.2; }
}
/* /stp:how-to-play */
/* stp:advantages */
.adv { margin-top: 15rem; }
.adv__track {
  display: flex;
  gap: 2rem;
  margin-top: 2.8rem;
  padding: 0 8rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 8rem;
  scrollbar-width: none;
}
.adv__track::-webkit-scrollbar { display: none; }
.adv__card {
  flex: 0 0 30.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem;
  border: 2px dashed var(--brown);
  border-radius: 3.6rem;
  scroll-snap-align: start;
}
.adv__card img { width: 100%; height: 15.6rem; object-fit: cover; border-radius: 2rem; }
.adv__text { display: flex; flex-direction: column; gap: 0.8rem; text-align: center; }
.adv__text h3 {
  font-family: var(--font-head);
  font-size: clamp(14px, 1.8rem, 1.8rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--green);
}
.adv__arrows {
  padding-left: 8.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.6rem;
}
.adv__btn {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 6rem;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}
.adv__btn:hover { background: rgba(124, 154, 114, 0.18); }
.adv__btn img { height: 6rem; width: auto; max-width: none; }

@media (max-width: 1024px) {
  .adv__track { padding: 0 2.4rem; scroll-padding: 0 2.4rem; }
  .adv__arrows { padding-left: 0; }
}

@media (max-width: 640px) {
  .adv { margin-top: 8rem; }
  .adv__track { margin-top: 2.4rem; padding: 0 2rem; scroll-padding: 0 2rem; }
  .adv__arrows { display: none; }
}
/* /stp:advantages */
/* stp:faq */
.faq { margin-top: 15rem; padding: 0 8rem; }
.faq__wrap {
  display: grid;
  grid-template-columns: 34.1rem 43.8rem 34.1rem;
  justify-content: space-between;
  max-width: 128rem;
  margin: 0 auto;
}
.faq__img { width: 100%; height: auto; }
.faq__img--left { align-self: start; }
.faq__img--right { align-self: end; grid-column: 3; grid-row: 1; }
.faq__main { grid-column: 2; grid-row: 1; }
.faq__main .title { margin-bottom: 2.8rem; }
.faq__list { display: flex; flex-direction: column; gap: 1.6rem; }
.faq__item { padding-bottom: 1.1rem; border-bottom: 1px solid var(--green); }
.faq__item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3.2rem;
  margin-bottom: 0.8rem;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary span {
  display: flex;
  align-items: center;
  min-height: 3.2rem;
  font-family: var(--font-head);
  font-size: clamp(14px, 1.8rem, 1.8rem);
  line-height: 1.2;
  color: var(--green);
  transition: color 0.3s ease;
}
.faq__item summary:hover span { color: var(--brown); }
.faq__arrow {
  flex: 0 0 auto;
  width: 3.2rem;
  height: 3.2rem;
  border: 1px solid var(--green);
  border-radius: 50%;
  background: url(../img/faq-arrow.svg) center / 1.4rem auto no-repeat;
  transform: rotate(90deg);
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.faq__item[open] .faq__arrow { transform: none; }
.faq__item summary:hover .faq__arrow { background-color: rgba(124, 154, 114, 0.18); }

@media (max-width: 1024px) {
  .faq { padding: 0 2.4rem; }
  .faq__wrap { grid-template-columns: 1fr 43.8rem 1fr; column-gap: 2rem; }
  .faq__img { max-width: 34.1rem; }
}

@media (max-width: 640px) {
  .faq { margin-top: 8rem; padding: 0 2rem; }
  .faq__wrap { display: block; }
  .faq__img { display: none; }
  .faq__main .title { margin-bottom: 2.4rem; }
}
/* /stp:faq */
/* stp:contact */
.contact { margin-top: 15rem; padding: 0 2rem; text-align: center; }
.contact__details { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; margin-top: 2.8rem; }
.contact__email {
  font-family: var(--font-head);
  font-size: clamp(14px, 1.8rem, 1.8rem);
  line-height: 1.2;
  color: var(--green);
}
.contact__email a:hover { color: var(--brown); }

@media (max-width: 640px) {
  .contact { margin-top: 8rem; }
  .contact__details { margin-top: 2.4rem; }
}
/* /stp:contact */
/* stp:footer */
.footer { margin-top: 15rem; padding: 4.6rem 8rem; background: var(--green); }
.footer__inner { display: flex; flex-direction: column; gap: 5rem; max-width: 128rem; margin: 0 auto; }
.footer__links { display: flex; align-items: center; justify-content: space-between; }
.footer__links a {
  font-family: var(--font-head);
  font-size: clamp(14px, 1.8rem, 1.8rem);
  line-height: 1.2;
}
.footer__links a:hover { color: var(--bg); }
.footer__copy {
  padding: 0 17.4rem 0 12.8rem;
  font-size: clamp(12px, 1.2rem, 1.2rem);
  text-align: center;
}

@media (max-width: 1024px) {
  .footer { padding-left: 2.4rem; padding-right: 2.4rem; }
  .footer__copy { padding: 0; }
}

@media (max-width: 640px) {
  .footer { margin-top: 8rem; padding: 4.4rem 2rem; }
  .footer__inner { gap: 3.6rem; }
  .footer__links { flex-direction: column; align-items: flex-start; gap: 1.6rem; }
  .footer__copy { text-align: left; }
}
/* /stp:footer */
/* stp:legal */
.legal-body { min-height: 100vh; display: flex; flex-direction: column; }
.legal-main { flex: 1 0 auto; padding-top: 12.4rem; }
.legal-body .header { padding-left: 18rem; padding-right: 18rem; }
.legal-body .header__inner { max-width: 108rem; }
.legal-body .footer { margin-top: 0; padding-left: 18rem; padding-right: 18rem; }
.legal-body .burger-btn span { background: var(--green); }
.legal-body .burger-btn.act span { background: var(--bg); }

.legal-page { padding: 0 18rem 10rem; }
.legal-content { max-width: 108rem; margin: 0 auto; }
.legal-content h1 {
  margin-bottom: 2.8rem;
  font-family: var(--font-head);
  font-size: 3.8rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--green);
  text-align: center;
}
.legal-content h2,
.legal-content h3,
.legal-content h4 {
  margin: 2.4rem 0 1.2rem;
  font-family: var(--font-head);
  font-size: clamp(14px, 1.8rem, 1.8rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--green);
}
.legal-content p { margin-bottom: 1.6rem; }
.legal-content ul,
.legal-content ol { margin: 0 0 1.6rem; padding-left: 2.4rem; }
.legal-content ul { list-style: disc; }
.legal-content ol { list-style: decimal; }
.legal-content li { margin-bottom: 0.8rem; }
.legal-content a { color: var(--brown); text-decoration: underline; }
.legal-content a:hover { color: var(--green); }
.legal-content strong { font-weight: 700; }
.legal-content em { font-style: italic; }
.legal-content u { text-decoration: underline; }

@media (max-width: 1024px) {
  .legal-body .header { padding-left: 2.4rem; padding-right: 2.4rem; }
  .legal-body .footer { padding-left: 2.4rem; padding-right: 2.4rem; }
  .legal-page { padding: 0 2.4rem 10rem; }
}

@media (max-width: 640px) {
  .legal-main { padding-top: 11.6rem; }
  .legal-body .header { padding: 4.2rem 2.6rem 0.8rem; }
  .legal-body .footer { padding: 4.4rem 2rem; }
  .legal-page { padding: 0 2rem 8rem; }
  .legal-content h1 { margin-bottom: 2.4rem; }
}
/* /stp:legal */
/* stp:title-anim */
.anim-on .hero__title { position: relative; }
.anim-on .hero__title .ta-src { opacity: 0; }
.hero__title .ta-band {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 50% 60%;
}
.hero__title .ta-band--top {
  --s: 1;
  clip-path: inset(-4rem -4rem 27% -4rem);
  animation: ta-drift 2.2s cubic-bezier(0.3, 0.6, 0.3, 1) 0.9s both, ta-breeze 7s ease-in-out 4.2s infinite;
}
.hero__title .ta-band--tag {
  --s: -1;
  clip-path: inset(73% -4rem -4rem -4rem);
  animation: ta-drift 1.9s cubic-bezier(0.3, 0.6, 0.3, 1) 1.7s both;
}

.anim-on .ta-title .ta-w { display: inline-block; white-space: nowrap; }
.anim-on .ta-title .ta-l { display: inline-block; opacity: 0; }
.anim-on .ta-title.is-in .ta-l {
  animation: ta-leaf 1.5s cubic-bezier(0.33, 0.7, 0.35, 1) calc(var(--i) * 0.055s) both;
}

@keyframes ta-drift {
  0% {
    opacity: 0;
    transform: translate(calc(var(--s) * -3rem), -5rem) rotate(calc(var(--s) * -5deg));
    filter: blur(0.8rem) drop-shadow(0 0 0 rgba(213, 140, 99, 0));
  }
  30% {
    opacity: 1;
    transform: translate(calc(var(--s) * 2rem), -2.6rem) rotate(calc(var(--s) * 3deg));
    filter: blur(0.3rem) drop-shadow(0 0 0.6rem rgba(213, 140, 99, 0.3));
  }
  55% {
    transform: translate(calc(var(--s) * -1rem), -0.8rem) rotate(calc(var(--s) * -1.4deg));
    filter: blur(0) drop-shadow(0 0 1.6rem rgba(213, 140, 99, 0.55));
  }
  78% {
    transform: translate(calc(var(--s) * 0.4rem), 0) rotate(calc(var(--s) * 0.5deg));
    filter: blur(0) drop-shadow(0 0 0.8rem rgba(213, 140, 99, 0.25));
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
    filter: blur(0) drop-shadow(0 0 0 rgba(213, 140, 99, 0));
  }
}

@keyframes ta-breeze {
  0%, 86%, 100% { transform: rotate(0) skewX(0); }
  90% { transform: rotate(0.6deg) skewX(-1.4deg); }
  94% { transform: rotate(-0.3deg) skewX(0.7deg); }
  97% { transform: rotate(0.1deg) skewX(-0.2deg); }
}

@keyframes ta-leaf {
  0% {
    opacity: 0;
    transform: translate(calc(var(--s) * 1.2rem), -2.8rem) rotate(calc(var(--s) * -26deg));
    filter: blur(0.3rem);
    color: var(--brown);
  }
  35% {
    opacity: 1;
    transform: translate(calc(var(--s) * -0.8rem), -1.3rem) rotate(calc(var(--s) * 14deg));
    filter: blur(0.1rem);
    color: var(--brown);
  }
  65% {
    transform: translate(calc(var(--s) * 0.35rem), -0.3rem) rotate(calc(var(--s) * -6deg));
    filter: blur(0);
  }
  85% { transform: translate(calc(var(--s) * -0.1rem), 0) rotate(calc(var(--s) * 2deg)); }
  100% { opacity: 1; transform: translate(0, 0) rotate(0); filter: blur(0); }
}

@keyframes ta-drift-m {
  0% {
    opacity: 0;
    transform: translate(calc(var(--s) * -1.6rem), -3rem) rotate(calc(var(--s) * -4deg));
    filter: blur(0.5rem) drop-shadow(0 0 0 rgba(213, 140, 99, 0));
  }
  35% {
    opacity: 1;
    transform: translate(calc(var(--s) * 1rem), -1.4rem) rotate(calc(var(--s) * 2.4deg));
    filter: blur(0.2rem) drop-shadow(0 0 0.4rem rgba(213, 140, 99, 0.3));
  }
  60% {
    transform: translate(calc(var(--s) * -0.5rem), -0.4rem) rotate(calc(var(--s) * -1deg));
    filter: blur(0) drop-shadow(0 0 1rem rgba(213, 140, 99, 0.5));
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
    filter: blur(0) drop-shadow(0 0 0 rgba(213, 140, 99, 0));
  }
}

@keyframes ta-leaf-m {
  0% {
    opacity: 0;
    transform: translate(calc(var(--s) * 0.7rem), -1.8rem) rotate(calc(var(--s) * -20deg));
    filter: blur(0.2rem);
    color: var(--brown);
  }
  40% {
    opacity: 1;
    transform: translate(calc(var(--s) * -0.4rem), -0.7rem) rotate(calc(var(--s) * 9deg));
    filter: blur(0);
    color: var(--brown);
  }
  75% { transform: translate(calc(var(--s) * 0.15rem), 0) rotate(calc(var(--s) * -3deg)); }
  100% { opacity: 1; transform: translate(0, 0) rotate(0); filter: blur(0); }
}

@media (max-width: 640px) {
  .hero__title .ta-band--top {
    animation: ta-drift-m 1.7s cubic-bezier(0.3, 0.6, 0.3, 1) 0.9s both, ta-breeze 7s ease-in-out 3.6s infinite;
  }
  .hero__title .ta-band--tag { animation: ta-drift-m 1.5s cubic-bezier(0.3, 0.6, 0.3, 1) 1.5s both; }
  .anim-on .ta-title.is-in .ta-l {
    animation: ta-leaf-m 1.1s cubic-bezier(0.33, 0.7, 0.35, 1) calc(var(--i) * 0.045s) both;
  }
}
/* /stp:title-anim */
