.hero-home {
  background: #e2eefb;
}

.hero-home::before {
  content: none;
}

.hero-home > .container {
  width: 100%;
}

.case-tree {
  position: relative;
  width: 100%;
  max-width: 640px;
  min-width: 0;
  justify-self: center;
  isolation: isolate;
  --tree-ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

.case-tree [hidden] {
  display: none !important;
}

.case-tree__viewport {
  overflow: hidden;
  mask-image:
    linear-gradient(to right, transparent, black 10%, black 90%, transparent),
    linear-gradient(to bottom, transparent, black 12%, black 94%, transparent);
  mask-composite: intersect;
}

.case-tree__art {
  position: relative;
  width: 124%;
  margin: -6% -12% 0;
  aspect-ratio: 1452 / 1083;
  isolation: isolate;
  /* Проценты привязаны к иллюстрации: крона, ствол с садовником, тень и логотип. */
  mask-image:
    radial-gradient(ellipse 40% 27% at 50% 35%, black 100%, transparent 116%),
    radial-gradient(ellipse 16% 23% at 50% 67%, black 77%, transparent),
    radial-gradient(ellipse 39% 4.5% at 50% 80.5%, black 55%, transparent),
    radial-gradient(ellipse 22% 10% at 50% 90%, black 92%, transparent 115%);
}

.case-tree__photo,
.case-tree__leaves,
.case-tree__soil,
.case-tree__gardener,
.case-tree__wordmark {
  display: block;
  position: absolute;
  pointer-events: none;
}

.case-tree__photo,
.case-tree__leaves {
  inset: 0;
  width: 100%;
  height: 100%;
}
.case-tree__soil {
  left: 38.1543%;
  top: 70.7295%;
  width: 24.1047%;
  height: 13.2041%;
  mask-image:
    linear-gradient(to right, transparent, black 12%, black 88%, transparent),
    linear-gradient(to bottom, transparent, black 34%, black 84%, transparent);
  mask-composite: intersect;
}
.case-tree__gardener {
  left: 36.98347%;
  top: 69.25208%;
  width: 26.8595%;
  height: 14.8661%;
}
.case-tree__wordmark {
  left: 36.363636%;
  top: 83.471838%;
  width: 28.236915%;
  height: 12.373038%;
  pointer-events: auto;
}

.case-tree__peach {
  position: absolute;
  transform: translate(-50%, -50%);
  width: max(44px, 4.2%);
  height: max(44px, 5.65%);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  z-index: 2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.case-tree__peach canvas {
  position: absolute;
  pointer-events: none;
  left: 50%;
  top: 50%;
  width: var(--sprite-width);
  height: auto;
  transform: translate(-50%, -50%);
  transform-origin: 50% 18%;
  transition:
    transform 0.35s var(--tree-ease),
    filter 0.35s;
  opacity: 0;
}
.case-tree__peach.is-active {
  z-index: 4;
}
.case-tree__peach.is-active canvas {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.34);
  filter: drop-shadow(0 3px 3px #50331636);
}
.case-tree__peach.is-departing canvas {
  opacity: 1;
}
.case-tree__peach:focus-visible,
.case-tree__close:focus-visible {
  outline: 2px solid #225bbe;
  outline-offset: 2px;
}

.case-tree__hint {
  margin: 3px 0 0;
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: 13px;
}
.case-tree__touch-hint {
  display: none;
}
@media (hover: none) {
  .case-tree__touch-hint {
    display: inline;
  }
  .case-tree__mouse-hint {
    display: none;
  }
}
.case-tree__card {
  position: absolute;
  z-index: 6;
  width: min(292px, 100%);
  padding: 15px 18px 17px;
  border: 1px solid #d6e4f1;
  border-radius: 16px;
  background: #fffffff7;
  box-shadow:
    0 10px 30px #213c601f,
    0 2px 5px #213c600d;
  text-align: left;
}
.case-tree__card h2 {
  margin: 7px 0;
  font-size: 20px;
  line-height: 1.2;
}
.case-tree__card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text-tertiary);
}
.case-tree__card .case-tree__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 30px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.case-tree__brand::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--case-accent);
}
.case-tree__close {
  position: absolute;
  right: 4px;
  top: 4px;
  padding: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 21px;
}
.case-tree__close:hover {
  background: #eff5fb;
}

@media (min-width: 1025px) {
  .hero-home {
    padding-block: clamp(32px, 4vw, 64px);
    align-items: flex-start;
  }
  .hero-home .hero-content {
    grid-template-columns: minmax(26rem, 3fr) minmax(0, 5fr);
    column-gap: clamp(24px, 2.5vw, 40px);
  }
  .hero-home .case-tree {
    max-width: none;
    align-self: start;
  }
}

@media (max-width: 768px) {
  .hero-home .hero-content {
    gap: var(--spacing-lg);
  }
  .hero-home .case-tree {
    margin-bottom: 0;
  }
  .case-tree__art {
    width: 138%;
    margin: -7% -19% 0;
  }
  .case-tree__card {
    position: relative;
    inset: auto !important;
    width: 100%;
    margin: 12px 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .case-tree__peach canvas {
    transition: none;
  }
}
