/**
 * Hero v4 — двухколоночная сетка, без наложений
 */

.hero.hero--ref.hero-v4 {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow-x: clip;
  overflow-y: hidden;
  justify-content: stretch;
}

.hero-v4 {
  --hero-pad: clamp(1.25rem, 4vw, 3rem);
  --hero-copy: minmax(0, 520px);
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: #f6f5f2;
  overflow: hidden;
  isolation: isolate;
}

.hero-v4 .hero-shroud {
  background: #f6f5f2;
}

/* Фон */
.hero-v4__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-v4__gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 50% at 88% 62%, rgba(198, 218, 205, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse 35% 30% at 8% 15%, rgba(201, 160, 74, 0.06) 0%, transparent 55%),
    linear-gradient(165deg, #faf9f7 0%, #f3f2ee 100%);
}

.hero-v4__grain {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.hero-v4__line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166, 124, 46, 0.28), transparent);
}

.hero-v4__line--1 {
  top: 28%;
  left: 0;
  width: 38%;
}

.hero-v4__line--2 {
  bottom: 22%;
  right: 0;
  width: 32%;
}

/* Сцена */
.hero-v4__stage {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(1.25rem, 3vh, 2rem)) var(--hero-pad) clamp(3.5rem, 6vh, 4.5rem);
  overflow: visible;
}

.hero-v4__grid {
  display: grid;
  grid-template-columns: var(--hero-copy) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  min-height: calc(100dvh - var(--header-h) - 5rem);
  overflow: visible;
}

/* Левая колонка */
.hero-v4__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.75rem, 3vh, 2.5rem);
  min-width: 0;
  z-index: 5;
}

.hero-v4__content {
  min-width: 0;
}

.hero-v4__label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0.38rem 0.8rem 0.38rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(26, 61, 51, 0.08);
  border-radius: 100px;
}

.hero-v4__label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: heroPulse 2s ease-out infinite;
}

.hero-v4__title {
  margin: 0 0 1.1rem;
  font-size: clamp(2.25rem, 4.2vw, 3.65rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--green-deep);
}

.hero-v4__title em {
  font-style: normal;
  display: block;
  margin-top: 0.05em;
  color: var(--gold-dim);
  background: linear-gradient(105deg, #8a6424 0%, #c9a04a 42%, #a67c2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-v4__desc {
  margin: 0 0 1.65rem;
  max-width: 26rem;
  font-size: clamp(0.9375rem, 1.35vw, 1.0625rem);
  line-height: 1.7;
  color: var(--text-dim);
}

.hero-v4__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.hero-v4__cta .btn-gold {
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.75rem;
  box-shadow: 0 10px 32px rgba(166, 124, 46, 0.3);
}

.btn-ghost-v4 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0 1.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--green-deep);
  background: #fff;
  border: 1px solid rgba(26, 61, 51, 0.14);
  border-radius: var(--radius-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.btn-ghost-v4:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(15, 41, 35, 0.08);
  transform: translateY(-2px);
}

.hero-v4__services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hero-v4__service {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--green-deep);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(26, 61, 51, 0.07);
  border-radius: 100px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-v4__service span {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--gold-dim);
}

.hero-v4__service:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 41, 35, 0.07);
}

/* Статистика — только в левой колонке */
.hero-v4__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.25rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(26, 61, 51, 0.1);
  max-width: 100%;
}

.hero-v4__stat strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-deep);
  line-height: 1.15;
}

.hero-v4__stat span {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.hero-v4__stat-link {
  margin-left: auto;
  padding: 0.35rem 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dim);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.hero-v4__stat-link:hover {
  color: var(--green-deep);
}

/* Правая колонка — дом */
.hero-v4__visual {
  --mx: 72%;
  --my: 55%;
  position: relative;
  width: 100%;
  min-height: clamp(380px, 52vh, 620px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: visible;
}

.hero-v4__visual-glow {
  position: absolute;
  inset: 8% 0 12% 18%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse 80% 75% at var(--mx) var(--my),
    rgba(255, 255, 255, 0.85) 0%,
    rgba(210, 228, 216, 0.4) 40%,
    transparent 72%
  );
  pointer-events: none;
}

.hero-v4__house-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.hero-v4__house-shadow {
  position: absolute;
  bottom: 0;
  right: 12%;
  left: auto;
  transform: none;
  width: 58%;
  height: 10%;
  background: rgba(15, 41, 35, 0.12);
  border-radius: 50%;
  filter: blur(24px);
}

.hero-v4__house {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(68vh, 580px);
  margin-left: auto;
  object-fit: contain;
  object-position: right bottom;
  transform-origin: right bottom;
  filter: drop-shadow(0 32px 56px rgba(15, 41, 35, 0.16));
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-v4__visual:hover .hero-v4__house {
  transform: translateY(-10px) scale(1.02);
}

/* Бейджи — только над домом справа */
.hero-v4__chip {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 36px rgba(15, 41, 35, 0.1);
  animation: heroV4ChipIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-v4__chip--years {
  top: 6%;
  right: 4%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.9);
  animation-delay: 0.5s;
}

.hero-v4__chip--fire {
  bottom: 18%;
  left: 2%;
  background: linear-gradient(145deg, #0f2923, #1a3d33);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  animation-delay: 0.65s;
}

.hero-v4__chip-value {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.hero-v4__chip--years .hero-v4__chip-value {
  font-size: 1.5rem;
  color: var(--green-deep);
}

.hero-v4__chip-label {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

@keyframes heroV4ChipIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll */
.hero-v4__scroll {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-v4__scroll-icon {
  width: 24px;
  height: 38px;
  border: 1.5px solid rgba(26, 61, 51, 0.18);
  border-radius: 18px;
  position: relative;
}

.hero-v4__scroll-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 7px;
  background: var(--gold);
  border-radius: 4px;
  animation: heroScrollLine 2s ease-in-out infinite;
}

/* Desktop wide */
@media (min-width: 1100px) {
  .hero-v4__stage {
    max-width: 1400px;
  }

  .hero-v4__grid {
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
    gap: 2rem 2.5rem;
  }

  .hero-v4__visual {
    --hero-bleed-right: max(0px, (100vw - 1400px) / 2);
    margin-right: calc(-1 * var(--hero-pad) - var(--hero-bleed-right));
    width: calc(100% + var(--hero-pad) + var(--hero-bleed-right));
    min-height: clamp(420px, 58vh, 680px);
  }

  .hero-v4__house {
    max-height: min(78vh, 700px);
  }
}

@media (min-width: 1400px) {
  .hero-v4__grid {
    grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
  }

  .hero-v4__house {
    max-height: min(82vh, 760px);
  }
}

/* Tablet / mobile */
@media (max-width: 1024px) {
  .hero-v4__grid {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 2rem;
  }

  .hero-v4__copy {
    order: 1;
  }

  .hero-v4__visual {
    order: 2;
    min-height: clamp(300px, 48vw, 420px);
    margin-right: 0;
    width: 100%;
    justify-content: center;
  }

  .hero-v4__house-wrap {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .hero-v4__house {
    max-height: min(50vw, 400px);
    margin-left: auto;
    margin-right: auto;
    object-position: center bottom;
    transform-origin: center bottom;
  }

  .hero-v4__house-shadow {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 72%;
  }

  .hero-v4__visual-glow {
    inset: 8% 0 12% 5%;
    --mx: 50%;
  }

  .hero-v4__chip--years {
    top: 4%;
    right: 2%;
  }

  .hero-v4__chip--fire {
    bottom: 12%;
    left: 0;
  }

  .hero-v4__stat-link {
    margin-left: 0;
    width: 100%;
    text-align: left;
    margin-top: 0.25rem;
  }
}

@media (max-width: 640px) {
  .hero-v4__title {
    font-size: clamp(1.95rem, 8.5vw, 2.5rem);
  }

  .hero-v4__cta {
    flex-direction: column;
  }

  .hero-v4__cta .btn,
  .hero-v4__cta .btn-ghost-v4 {
    width: 100%;
    justify-content: center;
  }

  .hero-v4__services {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-v4__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .hero-v4__stat:nth-child(3) {
    grid-column: 1;
  }

  .hero-v4__scroll {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-v4__chip,
  .hero-v4__label-dot,
  .hero-v4__scroll-icon::after {
    animation: none;
  }

  .hero-v4__visual:hover .hero-v4__house {
    transform: none;
  }
}
