.hero-alternative {
  --hero-alternative-weight: 800;
}

.hero-alternative .identity__crystal {
  position: relative;
  display: flex;
  flex: none;
}

.identity__crystal canvas {
  position: absolute;
  inset: -12% -4%;
  width: 108%;
  height: 124%;
  pointer-events: none;
}

.identity__crystal.has-volume .mark {
  visibility: hidden;
}

.hero-alternative .composition {
  top: clamp(calc(var(--header-h) + 28px), 33svh, 400px);
  --hero-axis: calc(var(--axis) + 10px);
}

.hero-alternative .h1,
.hero-alternative .ending {
  font-weight: var(--hero-alternative-weight);
  letter-spacing: -.03em;
}

.hero-type-preview {
  --t-ending: 280ms;
  --hero-alternative-weight: 600;
  --hero-lead-gap: 24px;
}

.hero-type-preview #contact-title {
  font-size: clamp(20px, 2.7vw, 34px);
  text-wrap: balance;
}

.hero-alternative .h1__mobile-sites {
  display: none;
}

.hero-type-preview[data-theme="dark"] body.menu-open :is(.header, .menu) {
  background: rgb(36 36 41 / 90%);
  backdrop-filter: blur(24px) saturate(1.2);
}

.hero-type-preview[data-theme="light"] body.menu-open .menu {
  background: var(--return-glass);
  backdrop-filter: blur(24px) saturate(1.2);
}

.hero-type-preview[data-theme="light"] .qcard__back .qcard__a {
  color: var(--ink);
}

@media (max-width: 1023px) {
  .hero-type-preview #projects .h2 {
    max-width: none;
  }

  .hero-type-preview .cta-section {
    padding-block: var(--head-gap);
  }

  .hero-type-preview .cta-block {
    gap: 0;
  }

  .hero-type-preview .cta-block p {
    margin-top: 16px;
  }

  .hero-type-preview .cta-block .btn {
    margin-top: 24px;
  }
}

@media (min-width: 1024px) {
  .hero-type-preview .cta-block .h2 {
    max-width: none;
  }
}

@media (max-width: 650px) {
  html.hero-type-preview,
  html.hero-type-preview body {
    overflow-anchor: none;
  }

  .hero-type-preview main {
    translate: var(--tap-scroll-offset, none);
  }

  .hero-type-preview :is(button, summary, .qcard) {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .hero-type-preview .qcard__mirror {
    display: none;
  }

  .hero-type-preview .qcard {
    perspective: none;
  }

  .hero-type-preview .qcard :is(.qcard__tilt, .qcard__inner) {
    transform: none;
    transform-style: flat;
    transition: none;
  }

  .hero-type-preview .qcard__inner {
    background: var(--glass-card-bg);
    border: var(--glass-card-border);
    box-shadow: var(--glass-card-shadow);
  }

  .hero-type-preview .faq__row .qcard .qcard__face {
    transform: none;
    backface-visibility: visible;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    box-shadow: none;
  }

  .hero-type-preview .qcard__back,
  .hero-type-preview .qcard.is-flipped .qcard__front {
    visibility: hidden;
  }

  .hero-type-preview .qcard.is-flipped .qcard__back {
    visibility: visible;
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-type-preview:not(.reduce-motion) :is(.faq-list, .service__accordion) details[open] > p,
    .hero-type-preview:not(.reduce-motion) .faq-list:not([hidden]) summary > *,
    .hero-type-preview:not(.reduce-motion) .faq__row:not([hidden]) .qcard__q,
    .hero-type-preview:not(.reduce-motion) .qcard.is-turning:not(.is-flipped) .qcard__front > *,
    .hero-type-preview:not(.reduce-motion) .qcard.is-turning.is-flipped .qcard__back > * {
      animation: mobile-content-in 160ms ease-out both;
    }
  }

  .hero-type-preview .stages__track:not(.is-assembling) .slot {
    visibility: visible;
    color: var(--accent);
  }

  .hero-type-preview .stages__track:not(.is-assembling) .stages__col {
    visibility: hidden;
  }

  .hero-type-preview .faq-list details[open] summary {
    min-height: 0;
    padding-bottom: 8px;
  }

  .hero-type-preview .menu__legal {
    display: none;
  }

  .hero-type-preview .menu .menu__contacts {
    grid-column: 1 / -1;
  }

  .hero-type-preview .menu__contact[href^="mailto:"] {
    white-space: nowrap;
  }

  .hero-type-preview #projects .sec-head {
    margin-bottom: calc(var(--head-gap) - 2px);
  }

  .hero-type-preview .stages__sticky .sec-head {
    margin-bottom: 24px;
  }

  .hero-type-preview .stages__replay:not([hidden]) {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--accent);
    margin-bottom: 20px;
  }

  .hero-type-preview .stages__replay svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
  }

  .hero-type-preview .stages__track.is-complete .stages__para {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .hero-type-preview .stages__track.is-complete .stages__col {
    position: relative;
  }

  .hero-type-preview .cta-title-end {
    display: block;
  }

  .hero-type-preview[data-theme="dark"] .footer__col .slink {
    color: var(--detail-text);
  }

  .hero-type-preview .stages__para {
    max-inline-size: 30ch;
    margin-inline: auto;
    text-align: center;
  }

  .hero-type-preview .stages__phrase {
    display: inline-block;
    white-space: nowrap;
  }
}

@keyframes mobile-content-in {
  from { opacity: .72; }
  to { opacity: 1; }
}

@media (min-width: 651px) and (max-width: 1023px) {
  .hero-type-preview .materials {
    gap: calc(var(--head-gap) + 4px);
  }

  .hero-type-preview .footer__top .footer__mark {
    width: calc(var(--hero-footer-mark-width, 260px) / 2);
  }
}

.hero-type-preview .identity .mark {
  width: clamp(72px, 6.7vw, 100px);
  flex-basis: auto;
}

@media (max-width: 650px) {
  .hero-type-preview :is(.header, .menu-open .header) .identity__text,
  .hero-type-preview .footer__top .footer__mark {
    display: none;
  }

  .hero-type-preview .case-block {
    text-align: left;
  }

  .hero-alternative.hero-type-preview:not(.is-part) .journey,
  .hero-alternative.hero-type-preview:not(.is-part) .stage {
    height: auto;
    position: relative;
    transform: none;
  }

  .hero-alternative.hero-type-preview .stage > .hero {
    position: relative;
    inset: auto;
    padding: calc(var(--header-h) + clamp(20px, 4svh, 32px)) 0 0;
  }

  .hero-alternative.hero-type-preview .hero .composition {
    position: relative;
    inset: auto;
    width: calc(100% - 2 * var(--side));
    margin-inline: var(--side);
    text-align: center;
  }

  .hero-type-preview:lang(ru) .h1__first .h1__sites,
  .hero-type-preview:lang(en) .h1__development,
  .hero-alternative.hero-type-preview .h1__mark {
    display: none;
  }

  .hero-type-preview:lang(ru) :is(.h1__development, .h1__mobile-sites) {
    display: inline;
  }

  .hero-type-preview:lang(ru) .h1__development {
    display: block;
  }

  .hero-alternative.hero-type-preview .composition .h1__second {
    display: block;
    height: auto;
  }

  .hero-type-preview .composition .lead {
    margin-top: 16px;
    margin-inline: auto;
    text-wrap: balance;
  }

  .hero-alternative.hero-type-preview .stage .reel {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: calc(100% - 2 * var(--side));
    height: auto;
    margin: 24px auto 0;
    opacity: 1;
  }

  .hero-type-preview .stage > .hero-cta {
    display: flex;
    width: calc(100% - 2 * var(--side));
    min-width: 0;
    margin: 20px var(--side) 0;
  }
}

@media (max-width: 650px) and (max-height: 620px) {
  .hero-alternative.hero-type-preview .stage .reel {
    aspect-ratio: 2 / 1;
  }
}

.hero-type-preview .identity {
  gap: 8px;
}

.hero-type-preview[data-theme="dark"] .header.is-glass {
  --glass-bar-bg: color-mix(in srgb, var(--paper) 90%, transparent);
  --inactive: #B5B9BD;
}

@media (min-width: 651px) {
  .hero-type-preview .footer__mark {
    width: var(--hero-footer-mark-width, 260px);
    flex-shrink: 1;
    min-width: 0;
  }

  .hero-type-preview .footer__cols {
    flex-shrink: 0;
  }
}

@media (max-width: 650px) {
  .hero-type-preview .identity {
    max-width: 100%;
    gap: 6px;
  }

  .hero-type-preview .identity__text > span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-type-preview .identity .mark {
    width: 60px;
  }

}

.hero-alternative.hero-type-preview .h1__mark {
  width: calc(.96em * 16 / 9);
  margin-top: .08em;
}

@media (min-width: 1440px) {
  .hero-type-preview:lang(en) .cta-cost-line {
    display: block;
  }
}

.hero-type-preview[data-theme="dark"] .reel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid rgb(255 252 249 / 55%);
  opacity: var(--reel-outline-opacity, 1);
  pointer-events: none;
}

.hero-type-preview.static-reel .reel::after {
  opacity: 0;
}

.hero-type-preview .h1,
.hero-type-preview .ending {
  letter-spacing: -.04em;
}

.hero-type-preview .service__title {
  font-weight: 500;
}

.hero-type-preview:lang(en) .hero .hero-cta {
  width: auto;
  min-width: 0;
}

.hero-type-preview:lang(en) .h1__first > :last-child > .h1__amp {
  margin-left: 0;
}

@media (min-width: 651px) {
  .hero-type-preview:lang(en) .h1__first {
    display: grid;
    grid-template-columns: var(--hero-axis) minmax(0, 1fr);
    gap: 0;
  }

}

.hero-type-preview .lead {
  margin-top: var(--hero-lead-gap);
}

.hero-type-preview:not(.static-reel) .h1__second {
  height: 1.1em;
}

.hero-alternative .h1__first {
  display: flex;
  justify-content: space-between;
  gap: .35em;
}

.hero-alternative .h1__second {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) minmax(0, calc(100% - var(--hero-axis)));
  align-items: start;
  gap: 0;
}

.hero-alternative .h1__amp {
  margin-inline: .07em;
}

.hero-alternative:lang(ru) .h1__amp--en,
.hero-alternative:lang(en) .h1__amp--ru {
  display: none;
}

.hero-alternative .h1__mark {
  justify-self: start;
  margin-left: 35%;
  width: min(3.15em, 61%);
  margin-top: .16em;
  height: auto;
  aspect-ratio: 16 / 9;
}

.hero-alternative .dynamic {
  margin-left: var(--hero-axis);
}

@media (min-width: 651px) {
  .reel-axis-preview .h1__mark {
    justify-self: center;
    margin-inline: 0;
  }
}

.hero-alternative .reel {
  margin: 0;
}

.hero-alternative:not(.is-part) .journey + #projects {
  padding-top: var(--sec-gap);
}

.hero-alternative:not(.static-reel) .reel {
  left: var(--alternative-reel-left, var(--side)) !important;
  top: var(--alternative-reel-top, 48%) !important;
}

.hero-alternative:not(.static-reel) .reel:not(.reel--positioned) {
  visibility: hidden;
}

.hero-alternative .reel:not(.reel--expanded) :is(.reel__toggle, .reel__progress, .reel__glass) {
  visibility: hidden;
}

.hero-alternative:not(.static-reel, .is-part) .journey {
  height: calc(var(--alternative-content-height, 100svh) + 42svh);
  overflow: clip;
}

.hero-alternative:not(.static-reel, .is-part) .stage {
  height: min(100svh, var(--alternative-content-height, 100svh));
  overflow: visible;
  transform: translateY(var(--alternative-stage-shift, 0px));
}

.hero-alternative.static-reel .h1__mark {
  display: none;
}

.hero-alternative.static-reel .ending-list {
  grid-column: 3;
  font-size: clamp(18px, 3.8vw, 48px);
  overflow-wrap: anywhere;
}

.hero-alternative.static-reel .hero {
  height: auto;
  min-height: 0;
  padding: clamp(112px, 22svh, 260px) var(--side) var(--sec-gap);
}

.hero-alternative.static-reel .composition {
  position: relative;
  inset: auto;
  width: auto;
  margin: 0;
}

.hero-alternative.static-reel .reel {
  margin-inline: auto;
}

@media (max-width: 650px) {
  .hero-alternative:not(.static-reel, .is-part) .stage {
    position: sticky;
  }

  .hero-alternative:not(.static-reel) .hero {
    position: absolute;
    inset: 0;
    padding: 0;
  }

  .hero-alternative:not(.static-reel) .composition {
    position: absolute;
    top: clamp(calc(var(--header-h) + 24px), 27svh, 270px);
  }

  .hero-alternative:not(.static-reel) .reel {
    position: absolute;
    inset: auto;
  }

  .hero-alternative .h1__first {
    display: block;
  }

  .hero-alternative .h1__first > span {
    display: block;
  }

  .hero-alternative .h1__second {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: .1em;
  }

  .hero-alternative .h1__mark {
    width: min(100%, max(90px, 2.45em));
    margin-left: 0;
    justify-self: center;
  }


  .hero-alternative .dynamic {
    margin-left: 0;
  }

  .hero-alternative .hero .hero-cta {
    display: inline-flex;
    margin-top: 20px;
  }

  .hero-alternative.static-reel .h1__second {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: .28em;
  }

  .hero-alternative.static-reel .ending-list {
    grid-column: 2;
  }
}
