html:has(> .hero-preview) {
  scrollbar-width: none;
}

.hero-preview {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: 'Title-Font', sans-serif;
  font-weight: 400;
}

.hero-stage {
  --u: calc(100cqw / 1880);
  position: relative;
  container-type: inline-size;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1880 / 553;
  overflow: hidden;
  background: #fff;
}

.hero-layer,
.hero-copy {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
}

.hero-layer {
  display: block;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.hero-copy {
  font-family: 'Title-Font', sans-serif;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
  line-height: 0;
  font-size: 0;
}

.hero-copy .hero-line {
  display: block;
  margin: 0;
  padding: 0;
  white-space: pre;
}

.hero-heading {
  margin: 0;
  padding: 0;
  font: inherit;
}

@font-face {
  font-family: 'Hero-RockStar';
  src: url('../../assets/css/fonts/RS-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  ascent-override: 74.9%;
  descent-override: 22.2%;
  line-gap-override: 0%;
}

.hero-copy-local {
  font-family: 'Hero-RockStar', 'Title-Font', sans-serif;
}

.hero-copy-local .hero-line {
  position: absolute;
  left: 0;
  width: max-content;
}

.hero-copy a {
  color: inherit;
  text-decoration: none;
}

.hero-copy a:hover {
  text-decoration: underline;
}

.hero-sections .hero-section {
  display: block;
  width: max-content;
  color: #fff;
}

.hero-sections .hero-section:hover {
  color: #ff1f2a;
  text-decoration: none;
}

.hero-home {
  --home-copy-height: min(100svh, calc(100vw * 1178 / 1880));
  --brand-bottom: calc(100cqh - var(--home-copy-height) * 1048 / 1178);
  container-type: size;
  height: calc(100vw * 1200 / 1880);
  aspect-ratio: auto;
}

.home-mark > img:not(.home-mark-animation),
.home-mark-video,
.home-mark-animation {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-mark-video,
.home-mark-animation {
  position: absolute;
  left: calc(-59 * var(--u));
  top: calc(-119 * var(--u));
  width: calc(750 * var(--u));
  height: calc(1375 * var(--u));
  max-width: none;
  visibility: hidden;
}

.home-mark.is-playing > img:not(.home-mark-animation),
.home-mark.is-playing ~ .home-reflection {
  visibility: hidden;
}

.home-mark.is-playing > .home-mark-video {
  visibility: visible;
}

.home-mark.is-animated-image > .home-mark-video {
  visibility: hidden;
}

.home-mark.is-playing.is-animated-image > .home-mark-animation {
  visibility: visible;
}

.hero-home .home-title,
.hero-home .home-brand-label,
.hero-home .home-brand-border {
  --u: min(calc(100cqw / 1880), calc(var(--home-copy-height) / 800));
  top: auto;
}

.hero-home .home-title {
  left: calc(100cqw * 78 / 1880);
  bottom: calc(100cqh - var(--home-copy-height) * 973 / 1178);
  width: max-content;
  height: auto;
}

.hero-home .home-title .hero-heading {
  position: relative;
  z-index: 0;
}

.hero-home .home-shade {
  top: 50%;
  left: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0.7;
}

.hero-home .home-brand-label {
  left: calc(100cqw * 83.78 / 1880);
  bottom: calc(var(--brand-bottom) + 6.607 * var(--u));
  height: auto;
}

.hero-home .home-brand-border {
  left: calc(100cqw * 84 / 1880);
  bottom: var(--brand-bottom);
}

.hero-home .hero-sections {
  --u: min(calc(100cqw / 1880), calc(100cqh / 640));
  --menu-top: calc(16.57 * var(--u));
  --menu-inset: calc(100cqw * 63 / 1880);
  top: var(--menu-top);
  right: var(--menu-inset);
  left: auto;
  width: max-content;
  height: auto;
  isolation: isolate;
}

.hero-home .hero-sections::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--menu-top));
  right: calc(-1 * var(--menu-inset));
  width: calc(100% + 36.83 * var(--u) + var(--menu-inset));
  height: 100cqh;
  background: rgb(0 0 0 / 38%);
  z-index: -1;
  pointer-events: none;
}

@media (min-aspect-ratio: 2 / 1) {
  .hero-home .home-shade {
    opacity: 1;
  }
}

.hero-preview a:focus-visible {
  outline: 2px solid #ff1f2a;
  outline-offset: 6px;
}

.hero-art {
  position: absolute;
  inset: 0 0 auto;
  height: calc(553 * var(--u));
  overflow: hidden;
  pointer-events: none;
}

.hero-art-motion {
  position: absolute;
  inset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-motion-layer,
  .hero-art-motion {
    scale: 1.01;
    animation: hero-approach 1800ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-art-still {
    scale: 1;
    animation-name: hero-approach-still;
  }

  .hero-depth {
    --depth-x: min(6px, calc(8 * var(--u)));
    --depth-y: min(6px, calc(2.4 * var(--u)));
    translate: calc(var(--pointer-x, 0) * var(--depth-x)) calc(var(--pointer-y, 0) * var(--depth-y));
    transition: translate 650ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .home-mark {
    --depth-x: min(6px, calc(6 * var(--u)));
    --depth-y: min(6px, calc(6 * var(--u)));
  }

  .hero-heading > .hero-line {
    animation: hero-reveal 850ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-heading > .hero-line:nth-of-type(2) { animation-delay: 70ms; }
  .hero-heading > .hero-line:nth-of-type(3) { animation-delay: 140ms; }
  .hero-heading > .hero-line:nth-of-type(4) { animation-delay: 210ms; }

  .hero-heading ~ p.hero-line {
    animation: hero-reveal 850ms 250ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes hero-approach {
  from { scale: 1.025; }
  to { scale: 1.01; }
}

@keyframes hero-approach-still {
  from { scale: 1.025; }
  to { scale: 1; }
}

@keyframes hero-reveal {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}

.preview-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 3.35%;
  border-top: 1px solid #262626;
  background: #080808;
  color: #999;
  font-size: 14px;
  line-height: 1.5;
}

.preview-return a {
  color: #fff;
  text-decoration: none;
}

.preview-return a:hover {
  color: #ff1f2a;
}

.preview-map {
  max-width: 1600px;
  margin: 0 auto;
  padding: 64px 40px;
  font-size: 16px;
  line-height: 1.6;
}

.preview-map h1 {
  margin: 16px 0;
  font-size: 48px;
  line-height: 1.15;
}

.preview-map .map-kicker {
  color: #ff1f2a;
  font-size: 12px;
  letter-spacing: 3px;
}

.preview-map .map-description {
  max-width: 760px;
  margin: 0 0 40px;
  color: #aaa;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
}

.preview-card {
  display: block;
  overflow: hidden;
  border: 1px solid #292929;
  background: #101010;
  color: #fff;
  text-decoration: none;
}

.preview-card:hover {
  border-color: #ff1f2a;
}

.preview-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1880 / 553;
  object-fit: cover;
}

.preview-card .card-caption {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 20px;
}

.preview-card .card-number {
  color: #ff1f2a;
  font-size: 12px;
}

.preview-card h2 {
  font-size: 18px;
  line-height: 1.4;
}

.preview-pending {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid #292929;
  color: #aaa;
}

.preview-pending h2 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
}

.preview-pending ul {
  margin: 16px 0 0 24px;
  list-style: disc;
}

.home-scene {
  display: contents;
}

.hero-mobile-title {
  display: none;
}

@media (max-width: 1023px) {
  .hero-home {
    --mobile-scene-u: min(calc(100cqw / 1200), 0.5px);
    container-type: inline-size;
    height: auto;
    padding-top: calc(200px + 1200 * var(--mobile-scene-u));
    padding-bottom: 20px;
    background: #080808;
  }

  .home-scene {
    --u: var(--mobile-scene-u);
    display: block;
    position: absolute;
    top: 200px;
    left: calc(50% - 940 * var(--u));
    width: calc(1880 * var(--u));
    height: calc(1200 * var(--u));
    overflow: hidden;
  }

  .hero-home .home-title {
    left: 20px;
    top: 52px;
    bottom: auto;
    width: calc(100% - 40px);
  }

  .hero-home .home-title > div[aria-hidden],
  .hero-home .home-shade,
  .hero-home .hero-sections > div[aria-hidden],
  .hero-home .hero-sections::before {
    display: none;
  }

  .hero-home .hero-heading > .hero-line {
    white-space: normal;
    font-size: clamp(26px, 7vw, 32px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0.06em !important;
  }

  .hero-home .home-brand-label {
    left: 20px;
    top: 12px;
    bottom: auto;
    width: max-content;
    padding: 4px 3px;
    border-top: 1px solid #f41627;
    border-bottom: 1px solid #f41627;
  }

  .hero-home .home-brand-label .hero-line {
    font-size: 12px !important;
    line-height: 16px !important;
    letter-spacing: 0.12em !important;
  }

  .hero-home .home-brand-border {
    display: none;
  }

  .hero-home .hero-sections {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    width: auto;
    margin: 16px 20px 0;
  }

  .hero-home .hero-sections .hero-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    min-height: 60px;
    padding: 8px 0;
    width: auto;
  }

  .hero-home .hero-sections .hero-section:nth-of-type(n+3) {
    border-top: 1px solid #343434;
  }

  .hero-home .hero-section .hero-line {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 11px !important;
    line-height: 16px !important;
    letter-spacing: 0.04em !important;
  }

  .hero-home .hero-section .hero-line:first-child {
    font-size: 18px !important;
    line-height: 24px !important;
  }

  .hero-stage:not(.hero-home) {
    aspect-ratio: auto;
    background: #080808;
  }

  .hero-stage:not(.hero-home) .hero-art {
    --u: calc(100cqw / 1200);
    position: relative;
    height: calc(553 * var(--u));
    background: #080808;
  }

  .hero-stage:not(.hero-home) .hero-art-motion {
    left: calc(-1 * var(--mobile-art-x, 680) * var(--u));
    right: auto;
    width: calc(1880 * var(--u));
  }

  .hero-stage:not(.hero-home) > .hero-layer {
    display: none;
  }

  .hero-stage:not(.hero-home) .hero-copy {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    margin: 16px 20px 32px;
    white-space: normal;
  }

  .hero-stage:not(.hero-home) .hero-copy > div[aria-hidden] {
    display: none;
  }

  .hero-stage:not(.hero-home) .hero-copy .hero-line {
    position: static;
    width: auto;
    white-space: normal;
    overflow-wrap: break-word;
    font-size: 14px !important;
    line-height: 1.55 !important;
    letter-spacing: 0.035em !important;
  }

  .hero-stage:not(.hero-home) .hero-copy span {
    line-height: inherit !important;
    letter-spacing: inherit !important;
  }

  .hero-stage:not(.hero-home) .hero-copy > p:first-child {
    font-size: 11px !important;
  }

  .hero-stage:not(.hero-home) .hero-copy a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .hero-stage:not(.hero-home) .hero-heading {
    margin: 16px 0 18px;
  }

  .hero-stage:not(.hero-home) .hero-heading > .hero-line {
    font-size: clamp(25px, 6.5vw, 34px) !important;
    line-height: 1.15 !important;
  }

  .hero-stage[aria-label="Информационная безопасность"] .hero-heading > .hero-line {
    font-size: clamp(18px, 5.8vw, 30px) !important;
  }

  .hero-stage:not(.hero-home) .hero-heading::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 18px;
    background: #ff1f2a;
  }

  .hero-stage:not(.hero-home) .hero-copy > p + p {
    margin-top: 4px;
  }

  .hero-mobile-title {
    display: block;
    margin: 24px 20px 32px;
    font: 30px/1.2 'Title-Font', sans-serif;
  }

  .preview-return {
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    font-size: 12px;
  }

  .preview-return a {
    display: flex;
    align-items: center;
    min-height: 44px;
    flex-shrink: 0;
  }

  .preview-return > span {
    padding-top: 13px;
    text-align: right;
  }

  .preview-map {
    padding: 32px 20px;
  }

  .preview-map h1 {
    font-size: 30px;
  }

  .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .preview-grid {
    grid-template-columns: 1fr;
  }
}
