/* Первый экран: бегущий контурный текст, слот-машина глаголов, факты. Логика — assets/js/components/hero-slot.js */

.hero {
  position: relative;
  min-height: 960px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.ol-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ol {
  position: absolute;
  left: 0;
  white-space: nowrap;
  font-weight: 900;
  font-size: 260px;
  line-height: .86;
  letter-spacing: -.005em;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(27,23,20,.14);
  user-select: none;
}

.ol-t {
  display: inline-flex;
  will-change: transform;
}

.ol-t>span {
  padding-right: .26em;
}

.ol-t.l {
  animation: mqL 70s linear infinite;
}

.ol-t.r {
  animation: mqR 84s linear infinite;
}

.ol-t.l2 {
  animation: mqL 62s linear infinite;
}

@keyframes mqL {
  from {
    transform: translate3d(0,0,0);
  }
  to {
    transform: translate3d(-50%,0,0);
  }
}

@keyframes mqR {
  from {
    transform: translate3d(-50%,0,0);
  }
  to {
    transform: translate3d(0,0,0);
  }
}

.hero-in {
  position: relative;
  z-index: 1;
  container-type: inline-size;
  padding-top: 44px;
}

.hero-k {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

.vx {
  display: flex;
  gap: 26px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.vx-i {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(27,23,20,.62);
  transition: color .5s;
}

.vx-i::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--acc);
  transform: scale(0) rotate(45deg);
  transition: transform .6s var(--e1);
}

.vx-i.on {
  color: var(--fg);
}

.vx-i.on::before {
  transform: scale(1) rotate(0deg);
}

.h1 {
  margin-top: 76px;
  font-weight: 400;
}

.hud {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
}

.hud-bar {
  position: relative;
  flex: 1;
  height: 2px;
  background: rgba(27,23,20,.16);
  overflow: hidden;
}

.hud-bar>i {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  animation: prog 2.2s linear both;
}

.hud-bar>i {
  background: var(--acc);
}

.slot {
  position: relative;
  display: block;
  height: .9em;
  margin-top: 16px;
  overflow: hidden;
  font-size: 17.2cqw;
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.02em;
  white-space: nowrap;
  margin-left: -.03em;
}

.slot-l {
  position: absolute;
  left: 0;
  top: -.02em;
  display: flex;
}

.slot-l>span {
  position: relative;
  display: block;
  transform-origin: 50% 0;
  will-change: transform;
}

.slot-l>span::before {
  content: attr(data-ch);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  color: var(--acc);
  opacity: 0;
  pointer-events: none;
}

.sl-in>span::before {
  animation: trailIn .9s both;
  animation-delay: inherit;
}

@keyframes trailIn {
  0% {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
  12% {
    opacity: 1;
    transform: translate3d(0,19%,0);
  }
  40% {
    opacity: 1;
    transform: translate3d(0,7%,0);
  }
  60% {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
  70%,
  100% {
    opacity: 0;
    transform: translate3d(0,0,0);
  }
}

.sl-in>span {
  animation: slIn .9s both;
}

.sl-out>span {
  animation: slOut .5s both;
}

@keyframes slOut {
  0% {
    transform: translate3d(0,0,0) scaleY(1);
    animation-timing-function: cubic-bezier(.3,.7,.3,1);
  }
  100% {
    transform: translate3d(0,-130%,0) scaleY(1.25);
  }
}

.h1-sub {
  display: block;
  margin-top: 22px;
  font-size: clamp(28px,3.6vw,52px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.02em;
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  column-gap: 48px;
  row-gap: 28px;
  margin-top: 58px;
}

.hero-row p {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.55;
  color: rgba(27,23,20,.86);
}

.hero-row .btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.proofs {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 56px;
}

.proofs ul {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  column-gap: 24px;
  row-gap: 22px;
  border-top: 1px solid rgba(27,23,20,.2);
  padding: 30px 0 40px;
}

.proof {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: clamp(16px,1.35vw,19px);
  line-height: 1.4;
  color: rgba(27,23,20,.84);
}

.proof + .proof {
  padding-left: 24px;
  border-left: 1px solid rgba(27,23,20,.2);
}

.proof b {
  display: block;
  margin-bottom: 6px;
  font: 900 clamp(34px,3.2vw,48px)/.9 var(--f-x);
  text-transform: uppercase;
  color: var(--fg);
}

.proof .sq {
  flex: none;
  width: 12px;
  height: 12px;
  background: var(--acc);
  margin-top: 8px;
}

@media (max-width:1180px) {
  .vx {
    display: none;
  }
}

@media (max-width:900px) {
  .hero {
    min-height: 0;
  }
  .ol {
    font-size: 150px;
  }
  .h1 {
    margin-top: 44px;
  }
  .hud {
    font-size: 22px;
  }
  .hero-row {
    grid-template-columns: minmax(0,1fr);
    margin-top: 36px;
  }
  .proofs ul {
    grid-template-columns: minmax(0,1fr);
  }
  .proof + .proof {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width:640px) {
  .hero-row .btns {
    width: 100%;
  }
  .hero-row .btn {
    flex: 1 1 100%;
  }
}

@media (min-width:901px) and (max-height:720px) and (min-height:501px) {
  /* невысокий десктоп/планшет в альбомной ориентации (ноутбук 1366×768 даёт окно ~1366×657): ужимаем вертикальные отступы hero,
     чтобы абзац и обе кнопки целиком помещались на первом экране. Кегль глагола не трогаем */
  .hero-in {
    padding-top: 16px;
  }
  .h1 {
    margin-top: 36px;
  }
  .h1-sub {
    margin-top: 16px;
  }
  .hero-row {
    margin-top: 32px;
  }
}

@media (max-height:500px) and (orientation:landscape) {
  /* телефон в альбомной ориентации: глагол ограничиваем и по высоте экрана, иначе он режется краем,
     а подзаголовок уходит со стартового экрана; отступы над заголовком тоже ужимаем */
  .hero-in {
    padding-top: 12px;
  }
  .h1 {
    margin-top: 16px;
  }
  .slot {
    margin-top: 10px;
    font-size: min(17.2cqw,22vh);
    font-size: min(17.2cqw,22svh);
  }
  .h1-sub {
    margin-top: 14px;
  }
}

/* hero — flex-колонка: без явной ширины .wrap сжался бы по содержимому */
.hero > .wrap {
  width: 100%;
}

.hero-k .lbl {
  color: rgba(27,23,20,.86);
}

/* три строки бегущего контурного текста */
.ol-1 {
  top: 100px;
}

.ol-2 {
  top: calc(100px + .86em + 40px);
}

.ol-3 {
  top: calc(100px + 1.72em + 80px);
}
