@font-face {
  font-family: "TT Norms";
  src: url("fonts/tt-norms-medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "TT Norms";
  src: url("fonts/tt-norms-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --home-action-font: "TT Norms", "Onest", system-ui, sans-serif;
  --hero-cta-accent: #D51C44;
  --hero-cta-accent-hover: #E02C52;
}

.btn,
button,
.city-switch button,
.cert-toggle button,
.faq-q .qt {
  font-family: var(--home-action-font);
}

.sh {
  --hero-font-family: "TT Drugs Trial", var(--home-action-font);
  --hero-title-scale: .91;
  --hero-stat-font-scale: .95;
  --hero-stat-label-scale: 1.04;
}
.sh[data-hero-font="norms"] {
  --hero-font-family: "TT Norms Regular", var(--home-action-font);
  --hero-title-scale: .954;
  --hero-stat-font-scale: 1;
}

.sh-extras {
  position: absolute;
  top: 94px;
  right: var(--sh-yandex-right, var(--gut));
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.sh-extras .sh-yandex { position: static; }
.sh-extras .sh-font-switch {
  background: rgba(7, 20, 35, .78);
  border-color: var(--line-strong);
}

.sh-title-wrap { margin-block: -6px 6px; }
.sh-lede { position: relative; top: clamp(-16px, -1.1vw, -8px); }

.sh-title--studio,
.sh-title--studio .ltr,
.sh-num,
.sh-lbl {
  font-family: var(--hero-font-family);
  font-weight: 400;
}

.sh[data-hero-font="norms"] .sh-title--studio,
.sh[data-hero-font="norms"] .sh-title--studio .ltr {
  font-family: var(--home-action-font);
  font-weight: 500;
}

.sh-num {
  --hero-stat-line: clamp(1.55rem, .95rem + 2.2vw, 2.6rem);
  font-size: calc(var(--hero-stat-line) * var(--hero-stat-scale, .78) * var(--hero-stat-font-scale));
  line-height: var(--hero-stat-line);
  letter-spacing: .02em;
}

.sh-lbl {
  --hero-stat-label-size: clamp(.6rem, .5rem + .3vw, .72rem);
  margin-block: 9px 3px;
  font-size: calc(var(--hero-stat-label-size) * var(--hero-stat-label-scale) * var(--hero-stat-font-scale));
  line-height: calc(var(--hero-stat-label-size) * 1.55);
}
.sh-stat-col--desktop { --hero-stat-label-scale: 1; }

.sh-head-cta {
  --hero-cta-height: calc(32px + 2.1 * var(--step--1));
  gap: clamp(18px, 2.15vw, 28px);
}

.sh-head-cta .btn {
  width: clamp(214px, 18vw, 258px);
  height: var(--hero-cta-height);
  padding: 5px 5px 5px clamp(16px, 1.8vw, 26px);
  justify-content: space-between;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-size: clamp(.88rem, .7rem + .32vw, 1.05rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .035em;
  text-align: left;
  white-space: nowrap;
}

.sh-head-cta .sh-offer-cta {
  background: var(--hero-cta-accent);
  box-shadow: 0 0 0 0 rgba(255, 107, 129, 0), 0 10px 28px -14px rgba(213, 28, 68, .78);
}

.sh-head-cta .sh-offer-cta::before { inset: -1px; }

.sh-head-cta .sh-offer-cta:is(:hover, :focus-visible) {
  background-color: var(--hero-cta-accent-hover);
  box-shadow: 0 0 38px -6px rgba(255, 107, 129, .6), 0 16px 44px -16px rgba(255, 107, 129, .6);
}

.sh-head-cta .sh-cta-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(var(--hero-cta-height) - 12px);
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--hero-cta-accent);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.06em;
  line-height: 1;
}

.sh-cta-percent { font-size: .65em; }

.sh-head-cta .sh-video-cta {
  --video-cta-rim-color: rgba(201, 233, 255, .34);
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .15), transparent 55%),
    linear-gradient(156deg, rgba(207, 232, 255, .24), rgba(47, 77, 105, .23) 45%, rgba(137, 191, 227, .14));
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .17), inset 0 -1px 2px rgba(160, 224, 255, .14), 0 8px 22px rgba(0, 10, 28, .25);
  -webkit-backdrop-filter: blur(10px) saturate(145%);
  backdrop-filter: blur(10px) saturate(145%);
  text-shadow: 0 1px 6px rgba(3, 16, 37, .8);
}

.sh-video-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background:
    radial-gradient(ellipse 38% 110% at 16% 0%, #fff 4%, rgba(218, 240, 255, .66) 33%, transparent 83%),
    radial-gradient(ellipse 35% 110% at 88% 100%, #f4fdff 5%, rgba(198, 232, 255, .65) 36%, transparent 82%);
  background-color: var(--video-cta-rim-color);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.sh-video-cta::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(var(--hero-cta-height) / 2 - 1px);
  z-index: -1;
  width: 200%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, transparent 84%, rgba(210, 239, 255, .18) 90%, rgba(228, 249, 255, .65) 95%, transparent 100%);
  opacity: 0;
  pointer-events: none;
}

.sh-head-cta .sh-video-cta .sh-cta-icon {
  color: #edf8ff;
  border: 1px solid rgba(204, 235, 255, .48);
  background: radial-gradient(ellipse at 30% 0%, rgba(176, 220, 255, .32), transparent 72%), rgba(6, 21, 39, .52);
  box-shadow: inset 0 1px 2px rgba(222, 244, 255, .24), inset 0 -1px 2px rgba(137, 199, 249, .2);
}

.sh-video-cta .sh-cta-icon svg { width: 46%; }

.sh-head-cta .sh-video-cta:is(:hover, :focus-visible) {
  --video-cta-rim-color: rgba(229, 249, 255, .48);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, .25), inset 0 -1px 3px rgba(160, 224, 255, .21), 0 10px 24px rgba(19, 129, 200, .3);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .sh-video-cta:is(:hover, :focus-visible)::after {
    animation: shGlassRipple .6s var(--ease-out);
  }

  html:not([data-motion="off"]) .sh-video-cta:is(:hover, :focus-visible)::before {
    animation: shGlassRim .6s ease-in-out;
  }
}

@keyframes shGlassRipple {
  0% { opacity: 0; transform: translate(50%, -50%) scale(.08); }
  24% { opacity: .9; }
  100% { opacity: 0; transform: translate(50%, -50%) scale(1); }
}

@keyframes shGlassRim {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(229, 249, 255, 0); }
  44% { box-shadow: inset 0 0 9px 1px rgba(229, 249, 255, .55); }
}

@media (prefers-reduced-motion: reduce) {
  .sh-head-cta .btn { transition: none; }
  .sh-head-cta .btn:hover { transform: none; }
}

@media (min-width: 1000px) {
  .sh-head {
    --home-hero-title-row: calc(clamp(2.7rem, 1.85rem + 2.8vw, 4.55rem) * .98);
    --home-hero-title-gap: calc(.12 * var(--step-0));
  }

  /* Keep the CTA at its original height in the hero after removing a line. */
  .sh-head .sh-copy {
    margin-bottom: calc(clamp(22px, 3vh, 38px) + var(--home-hero-title-row) + var(--home-hero-title-gap));
  }

  .sh-title--studio { width: max-content; font-size: calc(clamp(2.65rem, 4.15vw, 4.3rem) * var(--hero-title-scale)); }
  .sh-title--studio .sh-line { flex-wrap: nowrap; }
  /* Tighten the title while preserving its space in the layout. */
  .sh-title--studio .sh-line + .sh-line { margin-block: calc(var(--home-hero-title-gap) - .08em) .08em; }
  .sh-title--studio .ltr { font-size: inherit; line-height: var(--home-hero-title-row); }
}

@media (min-width: 1000px) and (max-height: 650px) {
  .sh-content { row-gap: calc(clamp(20px, 3vh, 32px) + 18px); }
  .sh-stats { padding-top: calc(clamp(24px, 3vw, 38px) - 18px); }
}

@media (max-width: 999px) {
  .sh-extras { position: static; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .sh-num {
    --hero-stat-line: clamp(1.35rem, 5.4vw, 1.95rem);
    --hero-stat-scale: .85;
  }
  .sh-lbl { margin-block: 5px 2px; }
  .sh-head { gap: 30px; }
  .sh-head-cta { --hero-cta-height: 52px; gap: 8px; }
  .sh-head-cta .btn { width: 100%; }
  .sh-head-cta .sh-offer-cta > span { font-size: inherit; }
  .sh-head-cta .sh-cta-icon { font-size: 1.08rem; }
  .sh-title-wrap { margin-block: -4px 4px; }
  .sh-title--studio .ltr { font-size: calc(clamp(1.85rem, 8.75vw, 3.2rem) * var(--hero-title-scale)); }
}

html:has(.home-video-dialog[open]) { overflow: hidden; }

.home-video-dialog {
  width: min(960px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100% - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #08121f;
  color: var(--text);
  box-shadow: 0 20px 80px rgba(0, 0, 0, .6);
}

.home-video-dialog::backdrop {
  background: rgba(3, 8, 14, .82);
  backdrop-filter: blur(8px);
}

.home-video-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px 6px 16px;
  font-family: var(--home-action-font);
  font-weight: 600;
}

.home-video-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.home-video-close:hover { background: rgba(255, 255, 255, .12); }

.home-video-dialog video {
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 84px);
  background: #000;
}
