/* Section «Как участвовать» — flex/grid flow layout */
@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/google-sans:vf@5.2.1/cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/google-sans:vf@5.2.1/latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geometria";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local("Geometria Bold"), local("Geometria-Bold"),
    url("../fonts/Geometria-Bold.woff2") format("woff2"),
    url("../fonts/Geometria-Bold.woff") format("woff");
}

@font-face {
  font-family: "NauryzRedKeds";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/NauryzRedKeds.ttf") format("truetype");
}

.how-section {
  --gs: "Google Sans", "Product Sans", Arial, sans-serif;
  --geo: "Geometria", "Montserrat", "Arial Black", sans-serif;
  --nrk: "NauryzRedKeds", "Impact", "Arial Black", sans-serif;
  --c-bg: #d9d0ff;
  --c-purple: #684bec;
  --c-lime: #d9e51e;
  --c-blue: #35a0ff;
  --c-dark: #262626;
  --c-link: #6041f5;
  --c-orange: #ff6111;
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1920px;
  margin: -40px auto 0;
  padding: 75px 21px 25px;
  overflow: hidden;
  background: #d9d0ff;
  border-radius: 51px;
  box-sizing: border-box;
}

.how-section__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 100%;
  max-width: 1878px;
  margin: 0 auto;
}

/* Title */
.how-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.how-title {
  margin: 0;
  font-family: var(--geo);
  font-weight: 700;
  font-size: clamp(30px, 2.2vw, 42px);
  line-height: 1.1;
  color: #000;
  text-align: center;
}

.how-title__line {
  width: min(330px, 60%);
  height: 6px;
  background: var(--c-blue);
}

/* Steps */
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 403px));
  justify-content: center;
  gap: 13px;
  width: 100%;
  padding-bottom: 70px;
}

.how-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 361px;
  padding: 35px 20px 20px;
  border-radius: 32px;
  box-sizing: border-box;
}

.how-card--buy {
  background: #fff;
}

.how-card--reg {
  background: var(--c-purple);
}

.how-card--code {
  background: var(--c-dark);
}

.how-card__num {
  margin: 0;
  font-family: var(--gs);
  font-weight: 700;
  font-size: clamp(64px, 5.5vw, 105px);
  line-height: 1;
}

.how-card--buy .how-card__num {
  color: var(--c-bg);
}

.how-card--reg .how-card__num {
  color: var(--c-lime);
}

.how-card--code .how-card__num {
  color: #fff;
}

.how-card__heading {
  margin: 5px 0 10px;
  font-family: var(--gs);
  font-weight: 700;
  font-size: clamp(26px, 1.7vw, 33px);
  line-height: 1.1;
}

.how-card--buy .how-card__heading {
  color: #000;
}

.how-card--reg .how-card__heading,
.how-card--code .how-card__heading {
  color: #fff;
}

.how-card__text {
  margin: 0;
  max-width: 350px;
  font-family: var(--gs);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.15;
}

.how-card--buy .how-card__text {
  color: #000;
}

.how-card--reg .how-card__text,
.how-card--code .how-card__text {
  color: #fff;
}

.how-card__text a,
.how-card__text .link {
  font-weight: 700;
  color: var(--c-link);
  text-decoration: none;
}

.how-card__text .bold {
  font-weight: 700;
}

.how-card__text .lime {
  font-weight: 700;
  color: var(--c-lime);
}

.how-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 342px;
  height: 57px;
  margin-top: auto;
  padding: 0 16px;
  border: 0;
  border-radius: 32px;
  background: #fff;
  cursor: url("../image/svg/ar-cursor.svg") 9 11, url("../image/svg/ar.svg") 7 0, pointer;
  font-family: var(--geo);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  color: var(--c-purple);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.how-card__btn:hover {
  background: #f0ebff;
  color: #5538d4;
}

.how-card__btn img {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

.how-card__tip {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 207px;
  max-width: calc(100% - 120px);
  padding: 14px 15px;
  border-radius: 20px;
  background: var(--c-bg);
  box-sizing: border-box;
  z-index: 2;
}

.how-card__tip p {
  margin: 0;
  font-family: var(--gs);
  font-size: 10px;
  line-height: 1.2;
  color: var(--c-purple);
}

.how-card__tip .medium {
  font-weight: 500;
}

.how-card__tip .bold {
  font-weight: 700;
}

.how-card__info {
  position: absolute;
  right: 22px;
  top: 21px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: url("../image/svg/ar-cursor.svg") 9 11, url("../image/svg/ar.svg") 7 0, pointer;
  z-index: 3;
}

.how-card__info img {
  width: 18px;
  height: 18px;
}

/* Tours headline */
.how-tours-head {
  width: 100%;
  margin: 0;
  line-height: 0;
  pointer-events: none;
}

.how-tours-head img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .how-section .how-tours-head img {
    max-width: 363px;
    margin: 0 auto;
  }
}

/* Tours grid */
.how-tours {
  display: grid;
  grid-template-columns: minmax(280px, 417px) minmax(280px, 417px) minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  align-items: stretch;
}

.tour-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 450px;
  padding: 52px 40px 40px;
  border-radius: 40px;
  box-sizing: border-box;
  overflow: hidden;
}

.tour-card--1 {
  background: #fff;
}

.tour-card--2 {
  background: var(--c-lime);
}

.tour-card__title {
  margin: 0;
  font-family: var(--gs);
  font-weight: 700;
  font-size: clamp(32px, 2.2vw, 42px);
  line-height: 1.1;
  color: #000;
}

.tour-card__desc {
  margin: auto 0 0;
  font-family: var(--gs);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.15;
  color: #000;
}

.tour-card__desc .muted {
  font-weight: 500;
  color: #909090;
}

.tour-card__desc .muted-dark {
  font-weight: 500;
  color: #6f6f6f;
}

.tour-card__desc .addr {
  font-weight: 700;
  color: var(--c-purple);
}

.tour-card__icon {
  display: block;
  width: 155px;
  height: 122px;
  margin: 36px 0 24px;
  object-fit: contain;
}

.tour-card--1 .tour-card__icon {
  position: relative;
  z-index: 5;
}

.tour-card--2 .tour-card__icon {
  width: 110px;
  height: 103px;
}

.tour-photo {
  min-height: 450px;
  border-radius: 40px;
  overflow: hidden;
}

.tour-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
  display: block;
}

/* Works + stickers */
.how-works-row {
  display: flex;
  align-items: center;
  gap: 70px;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.how-works {
  display: flex;
  align-items: center;
  gap: 25px;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: end;
}

.how-works__title {
  flex: 0 0 auto;
  margin: 0;
  font-family: var(--gs);
  font-weight: 700;
  font-size: 53.188px;
  line-height: 49.243px;
  color: #262626;
  white-space: nowrap;
}

.how-works__text {
  flex: 0 1 auto;
  width: auto;
  margin: 0;
  font-family: var(--gs);
  font-weight: 400;
  font-size: 17.369px;
  line-height: 18.527px;
  color: #262626;
}

.how-works__text .accent {
  font-weight: 700;
  color: var(--c-orange);
}

.how-stickers {
  position: relative;
  flex: 0 0 auto;
  width: 520px;
  max-width: 520px;
  height: 155px;
  margin-left: auto;
  pointer-events: none;
}

.how-section .how-stickers__black,
.how-section .how-stickers__orange {
  position: absolute;
  display: block;
  height: auto;
}

.how-section .how-stickers__black {
  left: -182px;
  top: -5px;
  width: 100%;
  max-width: 380px;
  transform: rotate(1deg);
  transform-origin: center;
}

.how-section .how-stickers__orange {
  left: 24px;
  top: 69px;
  width: 100%;
  max-width: 365px;
  transform: rotate(0deg);
  transform-origin: center;
}

/* Products */
.how-products {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 48%) minmax(0, 52%);
  grid-template-rows: auto 0.8fr auto;
  column-gap: 24px;
  row-gap: 20px;
  width: 100%;
  min-height: 520px;
  padding: 100px clamp(20px, 2vw, 38px) 28px;
  border-radius: 40px;
  background: #fef3ff;
  box-shadow: inset 0 0 0 1.5px #9ec5ff;
  overflow: hidden;
  box-sizing: border-box;
}

.how-products__content {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  z-index: 2;
  width: min(720px, calc(100% - clamp(0px, 8vw, 160px)));
  margin-left: clamp(0px, 8vw, 160px);
}

.how-products__title {
  margin: 0;
}

.how-products__title .line1 {
  display: block;
  font-family: "NauryzRedKeds", "Impact", "Arial Black", sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 3.1vw, 59px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: #000;
  white-space: nowrap;
}

.how-products__title .line2 {
  display: block;
  font-family: var(--gs);
  font-weight: 400;
  font-size: clamp(22px, 2.1vw, 41px);
  line-height: 1.2;
  color: #686868;
}

.how-products__btn {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  justify-self: start;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 395px;
  max-width: calc(100% - clamp(0px, 8vw, 160px));
  min-height: 81px;
  margin-left: clamp(0px, 8vw, 160px);
  padding: 0 30px;
  border: 1px solid #fff;
  border-radius: 42px;
  background: var(--c-dark);
  box-sizing: border-box;
  cursor: url("../image/svg/ar-cursor.svg") 9 11, url("../image/svg/ar.svg") 7 0, pointer;
  font-family: var(--geo);
  font-weight: 700;
  font-size: clamp(18px, 1.5vw, 29px);
  line-height: 1.1;
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.how-products__btn:hover {
  background: #3a3a3a;
  border-color: #f0ebff;
}

.how-products__btn img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.how-products__glow {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: stretch;
  z-index: 1;
  width: 100%;
  pointer-events: none;
}

.how-products__glow::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: url("../image/section/ten.png") center / contain no-repeat;
  pointer-events: none;
}

.how-products__glow img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.how-cats {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 3;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 7.5px;
  width: 100%;
}

.how-cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 25px 0 15px;
  border-radius: 36px;
  font-family: "Geometria", var(--geo);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0;
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
  flex: 0 0 auto;
  box-sizing: border-box;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.how-cat:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.how-cat--phones { background: #262626; }
.how-cat--laptops { background: #ff6b00; }
.how-cat--games { background: #7c5cfc; }
.how-cat--acc { background: #ff69b4; }
.how-cat--watch { background: #3b82f6; }
.how-cat--audio { background: #a855f7; }
.how-cat--home { background: #6366f1; }

/* ===== Tablet ===== */
@media (max-width: 1570px) {
  .how-works {
    flex-direction: column;
    align-items: flex-start;
    margin: 0 0 0 auto;
    flex: inherit;
  }
}
@media (max-width: 1200px) {
  .how-steps {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

  .how-tours {
    grid-template-columns: 1fr 1fr;
  }

  .tour-photo {
    grid-column: 1 / -1;
    min-height: 320px;
  }

  .how-works-row{
    flex-direction: column;
  }
  .how-works {
           margin: 0;
         }
  .how-products {
    grid-template-columns: minmax(0, 45%) minmax(0, 55%);
    min-height: 460px;
    padding: 48px 24px 20px;
  }

  .how-products__content {
    width: min(420px, 100%);
    max-width: none;
    margin-left: 0;
  }

  .how-products__title .line1 {
    white-space: normal;
  }

  .how-products__btn {
    max-width: 100%;
    margin-left: 0;
  }

  .how-products__glow {
    left: auto;
    top: auto;
    width: 100%;
    opacity: 1;
  }

  .how-cats {
    gap: 8px;
    padding: 0;
  }

  .how-cat {
    height: 44px;
    padding: 0 18px;
    font-size: 18px;
  }
}

/* ===== Mobile ===== */
@media (max-width: 900px) {
  .how-section {
    margin-top: -28px;
    padding: 44px 16px 30px;
    border-radius: 28px;
  }

  .how-section__inner {
    gap: 28px;
  }

  .how-title__line {
    height: 4px;
  }

  .how-card {
    min-height: 0;
    padding: 24px 20px;
    border-radius: 24px;
  }

  .how-card--buy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr;
    column-gap: 8px;
    align-items: start;
    padding: 22px 18px 22px 22px;
  }

  .how-card--buy .how-card__num {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    font-size: 96px;
    line-height: 0.9;
    color: #d9d0ff;
  }

  .how-card--buy .how-card__heading {
    grid-column: 1;
    grid-row: 1;
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.1;
  }

  .how-card--buy .how-card__text {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    font-size: 14px;
    line-height: 1.25;
  }

  .how-card--code {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr;
    column-gap: 8px;
    align-items: start;
    padding: 22px 18px 22px 22px;
  }

  .how-card--code .how-card__num {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    font-size: 96px;
    line-height: 0.9;
    color: rgba(255, 255, 255, 0.28);
  }

  .how-card--code .how-card__heading {
    grid-column: 1;
    grid-row: 1;
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.1;
  }

  .how-card--code .how-card__text {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    font-size: 14px;
    line-height: 1.25;
  }

  .how-card--reg {
    padding: 20px 18px 22px 20px;
  }

  .how-card--reg .how-card__num {
    font-size: 72px;
    line-height: 0.9;
    margin-bottom: 40px;
  }

  .how-card--reg .how-card__heading {
    max-width: calc(100% - 180px);
    margin: 8px 0 10px;
    font-size: 26px;
    line-height: 1.1;
  }

  .how-card--reg .how-card__text {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.25;
  }

  .how-card__tip {
    width: 168px;
    max-width: 60%;
    right: 12px;
    top: 12px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .how-card__tip p {
    font-size: 10px;
    line-height: 1.2;
  }

  .how-card__info {
    display: none;
  }

  .how-card__btn {
    max-width: none;
    margin-top: 16px;
  }

  .how-tours {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tour-card {
    min-height: 0;
    padding: 28px 110px 24px 24px;
    border-radius: 24px;
    z-index: 1;
    overflow: visible;
  }

  .tour-card--1 {
    order: 1;
    margin-top: -48px;
    z-index: 2;
  }

  .tour-card--2 {
    order: 2;
  }

  .tour-card__title {
    font-size: 28px;
  }

  .tour-card__desc {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 1.2;
  }

  .tour-card__icon,
  .tour-card--1 .tour-card__icon,
  .tour-card--2 .tour-card__icon {
    position: absolute;
    margin: 0;
    right: 16px;
    bottom: 20px;
  }

  .tour-card--1 .tour-card__icon {
    width: 100px;
    height: auto;
    z-index: 5;
  }

  .tour-card--2 .tour-card__icon {
    width: 88px;
    height: auto;
    z-index: 5;
  }

  .tour-photo {
    order: 0;
    min-height: 260px;
    border-radius: 0;
    overflow: hidden;
  }

}

@media (max-width: 767px) {
  .how-steps {
    max-width: none;
    padding-bottom: 40px;
  }

  .how-card--buy .how-card__num,
  .how-card--code .how-card__num {
    font-size: 88px;
  }

  .how-card--buy .how-card__heading,
  .how-card--code .how-card__heading {
    font-size: 26px;
  }

  .how-card--buy .how-card__text,
  .how-card--code .how-card__text {
    font-size: 13px;
  }

  .how-works-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .how-works {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .how-works__title {
    font-size: 30px;
    line-height: 1.1;
    white-space: normal;
  }

  .how-works__text {
    max-width: none;
    width: 100%;
    font-size: 15px;
    line-height: 1.35;
  }

  .how-stickers {
    align-self: flex-end;
    width: 100%;
    max-width: 100%;
    height: 100px;
    margin-left: 0;
    transform: none;
  }

  .how-section .how-stickers__orange {
    left: 40px;
    top: 60px;
    width: 270px;
  }

  .how-section .how-stickers__black {
    width: 270px;
    left: 0;
    top: 0;
  }

  .how-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    min-height: 0;
    padding: 14px 10px 20px;
    border-radius: 24px;
  }

  .how-products__content {
    display: contents;
  }

  .how-products__title {
    order: 2;
    width: 100%;
    padding: 0 14px;
  }

  .how-products__title .line1 {
    font-size: 30px;
    line-height: 1;
  }

  .how-products__title .line2 {
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.2;
  }

  .how-products__btn {
    order: 4;
    width: 100%;
    max-width: 100%;
    min-height: 56px;
    margin-left: 0;
    padding: 0 20px;
    border-radius: 999px;
  }

  .how-products__btn img {
    width: 28px;
    height: 28px;
  }

  .how-products__glow {
    position: relative;
    left: auto;
    top: auto;
    order: 1;
    width: 100%;
    margin: 0;
    opacity: 1;
  }

  .how-cats {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    order: 3;
    width: 100%;
    margin: 0;
    padding: 0 4px;
    overflow: visible;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }

  .how-cat {
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 14px;
  }
}
