/* Confirmed menu states from Figma Frames 90 and 92. */
@font-face {
  font-family: "Bebas Neue Cyrillic";
  src: url("../BebasNeue-Cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.button {
  transition: background-color .18s ease, color .18s ease;
}

.button--light:hover {
  color: var(--blue);
}

.button:not(.button--light):hover {
  background: var(--blue);
}

.service {
  transition: background-color .18s ease, color .18s ease, outline-color .18s ease;
}

.service:not(.is-active):hover {
  outline: 2px solid #20a0f3;
  outline-offset: -2px;
}

.service-details:not(.has-result) {
  grid-template-rows: 1fr;
}

.service-details:not(.has-result) > div {
  min-height: 100%;
}

.service-details__result {
  color: var(--ink);
}

.service-details__back {
  display: none;
}

.service-details__accent {
  color: var(--blue);
  font-weight: 700;
}

a.button {
  text-decoration: none;
}

a.button:not(.button--light) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

a.button.button--light {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
}

.messengers a {
  display: flex;
  align-items: center;
  height: 65px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  gap: 20px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .18s ease;
}

.messengers a img {
  display: block;
  flex: 0 0 auto;
}

.messengers a:hover {
  background: var(--black);
}

.messengers a:focus-visible,
a.button:focus-visible {
  outline: 3px solid #92b8ff;
  outline-offset: 3px;
}

/* Typography verified in Figma: Bebas Neue for display headings, Onest elsewhere. */
body {
  font-family: "Onest", Arial, sans-serif;
}

h1,
h2,
.wordmark {
  font-family: "Bebas Neue Cyrillic", "Bebas Neue", "Arial Narrow", sans-serif;
  font-weight: bold;
  font-synthesis: weight;
}

.site-header nav a,
.site-footer a {
  transition: color .3s ease;
}

.site-header nav a:hover,
.site-footer a:hover {
  color: var(--muted);
}

.site-header nav a[aria-current],
.site-footer a[aria-current] {
  color: var(--blue);
}

/* Header measurements confirmed in Figma frame 36:494. */
.wordmark {
  font-size: 20px;
  line-height: 1.1;
}

@media (min-width: 901px) {
  .site-header {
    gap: 175px;
  }
}

.site-header nav a,
.site-footer a,
.button,
.service.is-active,
.contact-card h3,
.process__list h3,
.advantage h3,
.faq-item button {
  font-family: "Onest", Arial, sans-serif;
  font-weight: 600;
}

.hero h1 {
  width: 588px;
  transform: none;
}

.hero__note .doc-icon img {
  display: block;
  width: 30px;
  height: 30px;
}

.advantage img {
  padding: 10px;
  border-radius: 5px;
  background: var(--blue);
  object-fit: contain;
}

/* Figma uses the regular geometry of Bebas Neue; no horizontal scaling. */
.process h2 {
  width: 588px;
  transform: none;
}

.faq h2 {
  width: 776px;
  transform: none;
}

/* Both accordion panels change height during the same transition. */
.faq-item__body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows .38s cubic-bezier(.4, 0, .2, 1);
}

.faq-item__body-inner {
  min-height: 0;
  overflow: hidden;
}

.faq-item p {
  display: block;
  margin: 0 12px 20px;
}

.faq-item.is-open .faq-item__body {
  grid-template-rows: 1fr;
}

.faq-item i {
  position: relative;
  display: grid;
  place-items: center;
  line-height: 1;
  color: transparent;
  transition: color .2s ease, background-color .2s ease;
}

.faq-item i::before {
  content: '+';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 35px;
  font-weight: 400;
  line-height: 1;
}

.faq-item.is-open i::before {
  content: '×';
  padding-bottom: 2px;
}

/* Figma frame 36:926 — deliberate phone overlap and a separate arrow tile. */
.telegram__box {
  position: relative;
  width: min(1220px, calc(100% - 48px));
  height: 501px;
  margin-right: auto;
  margin-left: auto;
  padding: 0;
  display: block;
  overflow: visible;
}

.telegram__box > div:first-child {
  position: absolute;
  top: 45px;
  left: 47px;
  width: 526px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 2;
}

.telegram h2 {
  width: 526px;
  transform: none;
}

.telegram__box > img {
  position: absolute;
  top: -51px;
  left: 622px;
  width: 254px;
  height: 527px;
  margin: 0;
  border-radius: 0;
  object-fit: contain;
  z-index: 1;
}

.telegram__box > p {
  position: absolute;
  top: 329px;
  left: 928px;
  width: 238px;
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  z-index: 2;
}

.telegram .button {
  position: relative;
  min-width: 325px;
  height: 65px;
  margin: 32px 0 0;
  padding: 0 65px 0 20px;
  justify-content: flex-start;
  font-weight: 600;
}

.telegram .button__arrow {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 49px;
  height: 49px;
  place-items: center;
  border-radius: 5px;
  background: var(--paper);
}

.telegram .button__arrow img {
  display: block;
  transform: rotate(-90deg);
}

.telegram .button:hover .button__arrow {
  background: #fff;
}

@media (min-width: 901px) {
  .process__layout > h2 {
    position: sticky;
    top: 112px;
    align-self: start;
  }
}

@media (max-width: 900px) {
  .service.is-active {
    position: static;
    padding-left: 20px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 400;
  }

  .service.is-active b {
    display: none;
  }

  .services-box {
    position: relative;
    overflow: hidden;
  }

  .service br {
    display: none;
  }

  .service-details {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: block;
    overflow-y: auto;
    border-radius: 10px;
    background: var(--surface);
    pointer-events: none;
    transform: translateX(102%);
    transition: transform .3s ease;
  }

  .services-box.is-detail-open .service-details {
    pointer-events: auto;
    transform: translateX(0);
  }

  .service-details__back {
    display: inline-flex;
    min-height: 48px;
    margin: 14px 14px 0;
    padding: 0 16px;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 5px;
    background: var(--black);
    color: var(--paper);
    font-weight: 600;
  }

  .service-details__back span {
    color: #fff;
    font-size: 24px;
    line-height: 1;
  }

  .service-details > div {
    min-height: 0;
    padding: 22px;
    border-right: 0;
  }

  .service-details > div + div {
    border-top: 1px solid #fff;
  }

  .service-details__result {
    margin: 0 22px 22px !important;
  }

  .service-details:not(.has-result) {
    grid-template-rows: auto;
  }

  .telegram__box {
    width: 100%;
    height: auto;
    min-height: 0;
    margin-left: 0;
    padding: 36px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 28px;
    overflow: hidden;
  }

  .telegram__box > div:first-child,
  .telegram__box > img,
  .telegram__box > p {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
  }

  .telegram h2 {
    width: auto;
    transform: none;
  }

  .process h2,
  .faq h2 {
    width: auto;
    transform: none;
  }

  .telegram__box > img {
    align-self: center;
    width: 220px;
    height: auto;
  }

  .telegram__box > p {
    grid-column: 1 / -1;
  }

  .telegram .button {
    position: relative;
    top: auto;
    left: auto;
    margin-top: 32px;
  }
}

@media (max-width: 600px) {
  .hero__note {
    top: -28px;
  }

  .hero h1 {
    width: auto;
  }

  .telegram__box > div,
  .telegram__box > p {
    min-width: 0;
  }

  .telegram h2 {
    font-size: 36px;
    overflow-wrap: anywhere;
  }

  .telegram .button {
    min-width: 0;
  }

  .telegram__box {
    display: flex;
    flex-direction: column;
    padding: 28px 22px;
  }

  .telegram__box > img {
    width: 197px;
    height: auto;
    align-self: center;
  }

  .messengers a {
    justify-content: center;
  }
}

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

  .service-details {
    transition: none;
  }
}

/* Mobile drawer, requested for the compact header. */
.menu-toggle,
.mobile-menu {
  display: none;
}

@media (max-width: 900px) {
  .site-header {
    justify-content: space-between;
  }

  .menu-toggle {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(247, 247, 247, .45);
    border-radius: 5px;
    background: transparent;
    color: var(--paper);
  }

  .menu-toggle__icon,
  .menu-toggle__icon::before,
  .menu-toggle__icon::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
  }

  .menu-toggle__icon {
    position: relative;
  }

  .menu-toggle__icon::before,
  .menu-toggle__icon::after {
    position: absolute;
    left: 0;
  }

  .menu-toggle__icon::before { top: -7px; }
  .menu-toggle__icon::after { top: 7px; }

  .mobile-menu {
    position: fixed;
    z-index: 30;
    inset: 0;
    display: block;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .3s;
  }

  .mobile-menu[aria-hidden="false"] {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .mobile-menu__scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, .48);
    opacity: 0;
    transition: opacity .3s ease;
  }

  .mobile-menu__panel {
    position: relative;
    display: flex;
    width: min(340px, calc(100% - 42px));
    min-height: 100%;
    padding: 22px 24px 48px;
    flex-direction: column;
    background: var(--black);
    box-shadow: 16px 0 36px rgba(0, 0, 0, .24);
    transform: translateX(-100%);
    transition: transform .3s ease;
  }

  .mobile-menu[aria-hidden="false"] .mobile-menu__scrim {
    opacity: 1;
  }

  .mobile-menu[aria-hidden="false"] .mobile-menu__panel {
    transform: translateX(0);
  }

  .mobile-menu__close {
    display: grid;
    width: 42px;
    height: 42px;
    margin: 0 0 54px auto;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(247, 247, 247, .45);
    border-radius: 5px;
    background: transparent;
    color: var(--paper);
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
  }

  .mobile-menu nav {
    display: grid;
    gap: 22px;
  }

  .mobile-menu nav a {
    width: fit-content;
    color: var(--paper);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1.28px;
    text-decoration: none;
  }

  .mobile-menu nav a[aria-current] {
    color: var(--blue);
  }

  body.mobile-menu-is-open {
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mobile-menu__scrim,
  .mobile-menu__panel {
    transition: none;
  }
}
