/* Первый экран — версия 3 (доски V3Main и V3Mobile на холсте).
   Телефон — по умолчанию, компьютер — от 900 px. Цвета — только токены. */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: #FFFFFF;
  border-radius: 0 0 32px 32px;
  isolation: isolate;
}

/* ---------- фон ---------- */
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__rim {
  position: absolute;
  left: 32%; top: 0;
  width: 86%; height: 50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 110, 235, 0.55), rgba(150, 110, 235, 0.12) 60%, transparent);
  filter: blur(14px);
  animation: breathe 9s ease-in-out infinite alternate;
}
.hero__warm {
  position: absolute;
  left: -30%; top: 55%;
  width: 120%; height: 50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 198, 168, 0.12), transparent);
  filter: blur(30px);
}
.hero__word {
  position: absolute;
  left: 8px; top: 52px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 128px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(201, 184, 255, 0.08);
  white-space: nowrap;
}
.hero__grain { position: absolute; inset: 0; opacity: 0.06; mix-blend-mode: overlay; }

/* нить системы: линия слева, бегущий огонёк, узел у надзаголовка */
.thread { position: absolute; left: 6px; top: 96px; bottom: 0; width: 13px; }
.thread__line {
  position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(201, 184, 255, 0.32) 80px);
}
.thread__pulse {
  position: absolute; left: -4px; top: 0; width: 9px; height: 60px; border-radius: 9px;
  background: linear-gradient(180deg, rgba(242, 198, 168, 0), var(--peach));
  animation: pulse 7s linear infinite;
}
.thread__node {
  position: absolute; left: -4px; top: 30px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--lilac);
  box-shadow: 0 0 0 5px rgba(201, 184, 255, 0.18), 0 0 18px var(--lilac);
}

/* ---------- раскладка ---------- */
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin-inline: auto;
  padding: 112px 16px 40px;
}

.hero__photo {
  position: absolute;
  top: 44px; right: -27px;
  width: 290px;
  aspect-ratio: 3 / 4;
  z-index: 0;
  filter: drop-shadow(0 0 1px rgba(214, 200, 255, 0.8)) drop-shadow(0 0 16px rgba(201, 184, 255, 0.45));
}
.hero__photo img {
  width: 100%; height: 100%;
  object-fit: contain; object-position: center bottom;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 97%);
  mask-image: linear-gradient(to bottom, #000 70%, transparent 97%);
}
/* на телефоне заголовок наезжает на фото: под ним мягкое затемнение */
.hero__inner::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 170px; height: 340px;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(22, 17, 30, 0) 0%, rgba(22, 17, 30, 0.82) 28%, rgba(22, 17, 30, 0.82) 72%, rgba(22, 17, 30, 0) 100%);
  pointer-events: none;
}

.hero__text { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 16px; }

.hero__eyebrow {
  margin-top: 132px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.hero__title {
  margin-top: -6px;
  font-family: var(--font-head);
  font-weight: 400;
  /* на узких телефонах кегль чуть меньше, чтобы «Настрою техническую» вставало в строку */
  font-size: min(var(--fs-h1), 6.4vw);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  text-wrap: pretty;
}
.hero__title .accent {
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--lilac);
}

.hero__lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--on-dark-soft); text-wrap: pretty; }

.hero__buttons { display: flex; flex-direction: column; gap: 10px; }
.hero__buttons .btn { width: 100%; }

/* ---------- мини-расчёт ---------- */
.quick {
  position: relative;
  margin-top: 60px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid transparent;
  background:
    linear-gradient(160deg, rgba(40, 30, 56, 0.88), rgba(28, 22, 38, 0.8)) padding-box,
    linear-gradient(135deg, rgba(201, 184, 255, 0.7), rgba(255, 255, 255, 0.06) 45%, rgba(242, 198, 168, 0.5)) border-box;
  box-shadow: var(--shadow-card);
}
.quick__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.quick__title { font-size: 16px; font-weight: 600; }
.quick__hint { font-size: 13px; color: var(--on-dark-muted); }
.quick__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.quick__chip {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.quick__chip:hover { background: rgba(255, 255, 255, 0.14); }
.quick__chip[aria-pressed="true"] { background: var(--lilac); color: var(--on-accent); box-shadow: none; }
.quick__result { display: flex; flex-direction: column; gap: 12px; }
.quick__value { display: flex; flex-direction: column; gap: 4px; }
.quick__price {
  font-family: var(--font-head);
  font-size: var(--fs-price);
  letter-spacing: -0.03em;
  color: var(--lilac);
  white-space: nowrap;
}
.quick__note { font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.78); }
.quick__more { min-height: 46px; padding: 0 18px; font-size: 15px; }
.quick__disclaimer { margin-top: 12px; font-size: 12.5px; color: rgba(255, 255, 255, 0.66); }
.quick__value.is-changing { animation: swap 0.35s var(--ease-out); }

/* котик сидит на карточке мини-расчёта */
.mascot {
  position: absolute;
  left: 14px; top: -54px;
  display: block;
  width: 50px;
  text-decoration: none;
  border-radius: 12px;
}
.mascot__img { width: 50px; height: auto; }
.mascot__bubble {
  position: absolute;
  left: calc(100% + 4px); top: 2px;
  padding: 7px 12px;
  border-radius: 14px 14px 14px 4px;
  background: #FFFFFF;
  color: var(--quote-ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s var(--ease-out);
}
.mascot:hover .mascot__bubble { transform: translateY(-3px); }
.mascot:hover .mascot__img { animation: hop 0.6s var(--ease-out); }

/* облачко-отзыв: на телефоне не показываем (экран короткий, отзыв будет в блоке «Отзывы») */
.hero__quote { display: none; }

@media (max-width: 389px) {
  .hero__eyebrow { letter-spacing: 0.12em; }
}

/* ---------- компьютер ---------- */
@media (min-width: 900px) {
  .hero { min-height: 900px; border-radius: 0 0 var(--radius-dark) var(--radius-dark); }
  .hero__inner { min-height: 900px; padding: 168px clamp(32px, 5.6vw, 80px) 72px; }
  .hero__inner::before { display: none; }

  .hero__rim { left: 60%; top: -40px; width: 640px; height: 900px; filter: blur(20px); }
  .hero__warm { left: -300px; top: 560px; width: 760px; height: 600px; }
  .hero__word { left: 53%; top: 70px; font-size: clamp(220px, 23vw, 330px); color: rgba(201, 184, 255, 0.06); }
  .thread { left: clamp(14px, 2.8vw, 40px); top: 150px; }
  .thread__node { left: -6px; top: 19px; width: 13px; height: 13px; }

  .hero__photo {
    top: auto; bottom: 30px;
    right: clamp(-60px, -2vw, -20px);
    width: clamp(420px, 41vw, 590px);
    filter: drop-shadow(0 0 1.5px rgba(214, 200, 255, 0.8)) drop-shadow(0 0 28px rgba(201, 184, 255, 0.45));
  }
  .hero__photo img {
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 98%);
    mask-image: linear-gradient(to bottom, #000 78%, transparent 98%);
  }

  .hero__text { max-width: min(760px, 54vw); gap: 24px; }
  .hero__lead { max-width: 520px; }
  .hero__eyebrow { margin-top: 0; font-size: 12px; line-height: 1.4; }
  .hero__title { margin-top: 0; font-size: min(var(--fs-h1), 3.6vw); }
  .hero__buttons { flex-direction: row; margin-top: 6px; }
  .hero__buttons .btn { width: auto; }

  .quick { margin-top: 28px; width: min(600px, 100%); padding: 24px; }
  .quick__result { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 20px; }
  .quick__more { flex: none; }
  .mascot { left: auto; right: 120px; top: -66px; width: 62px; }
  .mascot__img { width: 62px; }

  .hero__quote {
    position: absolute;
    right: clamp(24px, 2.8vw, 40px);
    bottom: 132px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 300px;
  }
  .hero__quote blockquote {
    padding: 16px 18px;
    border-radius: 22px 22px 22px 6px;
    background: var(--peach);
    color: var(--on-accent);
    font-size: 15px;
    line-height: 1.45;
    font-weight: 500;
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.6);
  }
  .hero__quote figcaption {
    display: flex; align-items: center; gap: 12px;
    padding-left: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
  }
  .hero__quote figcaption a { display: inline-flex; align-items: center; min-height: 44px; color: var(--lilac); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
}

/* узкие ноутбуки: отзыв не должен налезать на текст */
@media (min-width: 900px) and (max-width: 1279px) {
  .hero__quote { display: none; }
}

/* ---------- движение ---------- */
.rise { animation: rise var(--dur-rise) var(--ease-out) both; }
.hero__title.rise { animation-delay: 0.08s; }
.hero__lead.rise { animation-delay: 0.16s; }
.hero__buttons.rise { animation-delay: 0.24s; }
.quick.rise { animation-delay: 0.32s; }
.float { animation: float 7s ease-in-out infinite; }

@keyframes breathe { from { opacity: 0.85; } to { opacity: 1; } }
@keyframes pulse { from { transform: translateY(-80px); } to { transform: translateY(1000px); } }
@keyframes float { 0%, 100% { transform: none; } 50% { transform: translateY(-6px); } }
@keyframes hop { 0%, 100% { transform: none; } 40% { transform: translateY(-6px); } }
@keyframes swap { from { opacity: 0.2; transform: translateY(6px); } to { opacity: 1; transform: none; } }
