/* Editorial hero — референс Knapsack */

.hero--editorial {
  position: relative;
  isolation: isolate;
  padding-top: var(--space-5);
  padding-bottom: var(--space-6);
  overflow: visible;
}

.hero--editorial::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 75% 60% at 88% 12%, rgba(254, 243, 199, .9) 0%, transparent 58%),
    radial-gradient(ellipse 65% 55% at 8% 88%, rgba(209, 250, 229, .5) 0%, transparent 52%),
    radial-gradient(ellipse 50% 40% at 55% 45%, rgba(255, 237, 213, .4) 0%, transparent 55%),
    var(--c-bg);
  pointer-events: none;
}

.hero--editorial::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  z-index: -1;
  background: url("/assets/img/deco/topo-contour.svg") center bottom / cover no-repeat;
  color: var(--c-action);
  opacity: .5;
  pointer-events: none;
}

.hero--editorial .hero__layout {
  align-items: center;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .hero--editorial {
    padding-top: var(--space-6);
    padding-bottom: var(--space-7);
    min-height: 580px;
  }

  .hero--editorial .hero__layout {
    grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
    gap: clamp(16px, 2.5vw, 40px);
    align-items: center;
  }

  .hero--editorial .hero__content {
    padding-right: 0;
  }
}

.hero__title--lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: clamp(34px, 4.8vw, 58px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--c-primary);
}

.hero__title-line {
  display: block;
}

.hero__title-line--accent {
  position: relative;
  display: inline-block;
}

.hero__title-line--accent::after {
  content: "";
  position: absolute;
  left: -3%;
  right: -3%;
  bottom: 8%;
  height: clamp(10px, 1.2vw, 16px);
  background: linear-gradient(90deg, rgba(194, 65, 12, .42), rgba(245, 158, 11, .48));
  border-radius: 4px;
  z-index: -1;
  transform: rotate(-1.5deg);
}

.hero--editorial .hero__eyebrow {
  color: var(--c-muted);
  background: transparent;
  border: 1px solid var(--c-border);
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  padding: 5px 12px;
}

.hero--editorial .hero__lead {
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.65;
  color: var(--c-muted);
  max-width: 480px;
  margin-top: var(--space-1);
}

.hero--editorial .hero__actions {
  margin-top: var(--space-3);
}

.hero--editorial .hero__actions .btn--primary {
  min-height: 52px;
  padding-inline: 28px;
  font-size: 15px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.hero--editorial .hero__actions .btn--secondary {
  border-radius: 6px;
}

/* ── Stage: заполнение колонки как у Knapsack ── */

.hero__stage {
  position: relative;
  width: 100%;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

@media (min-width: 1024px) {
  .hero__stage {
    min-height: 520px;
    padding: var(--space-2) 0;
    justify-content: flex-end;
  }
}

.hero__stage-bg {
  position: absolute;
  inset: -14% -10% -18% -18%;
  z-index: 0;
  background:
    radial-gradient(ellipse 72% 68% at 68% 42%, rgba(254, 215, 170, .82) 0%, transparent 62%),
    radial-gradient(ellipse 58% 52% at 22% 68%, rgba(167, 243, 208, .62) 0%, transparent 58%),
    radial-gradient(ellipse 48% 42% at 92% 78%, rgba(254, 243, 199, .55) 0%, transparent 52%);
  border-radius: 48% 52% 44% 56% / 42% 48% 52% 58%;
  pointer-events: none;
}

.hero__laptop-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  perspective: 1600px;
}

@media (min-width: 1024px) {
  .hero__laptop-wrap {
    margin-left: -10%;
    margin-right: -4%;
    max-width: min(780px, 105%);
  }
}

.hero__laptop {
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1400px) rotateY(-13deg) rotateX(11deg);
  transform-origin: 52% 78%;
  filter:
    drop-shadow(0 32px 56px rgba(28, 25, 23, .22))
    drop-shadow(0 10px 20px rgba(28, 25, 23, .12));
}

.hero__laptop-lid {
  padding: 7px 7px 6px;
  background: linear-gradient(165deg, #f3f0ea 0%, #e4dfd6 38%, #d2cbc2 100%);
  border-radius: 14px 14px 2px 2px;
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .92),
    inset 0 -1px 0 rgba(60, 40, 20, .1);
  transform: rotateX(-9deg);
  transform-origin: bottom center;
  transform-style: preserve-3d;
}

.hero__laptop-camera {
  width: 5px;
  height: 5px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: #2d2926;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.hero__laptop-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  background: #111;
  box-shadow:
    inset 0 0 0 2px #1a1a1a,
    inset 0 0 0 3px rgba(255, 255, 255, .06);
}

.hero__laptop-hinge {
  height: 5px;
  margin: -1px 5% 0;
  background: linear-gradient(180deg, #9a948c 0%, #7a746c 100%);
  border-radius: 1px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    0 1px 0 rgba(255, 255, 255, .15);
  transform: rotateX(9deg);
  transform-origin: top center;
}

.hero__laptop-base {
  position: relative;
  width: 108%;
  margin: 0 -4%;
  height: clamp(96px, 12vw, 118px);
  padding: 8px 10% 10px;
  background: linear-gradient(180deg, #ece7df 0%, #ddd8d0 38%, #c8c2ba 100%);
  border-radius: 2px 2px 16px 16px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-top: none;
  box-shadow:
    0 10px 22px rgba(60, 40, 20, .16),
    inset 0 1px 0 rgba(255, 255, 255, .5);
  transform: rotateX(9deg);
  transform-origin: top center;
}

.hero__laptop-base::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 7px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, #b8b2aa 0%, #9c9690 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

.hero__laptop-keys {
  height: clamp(46px, 5.5vw, 56px);
  border-radius: 5px;
  background-color: #2e2b28;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, .14) 0,
      rgba(255, 255, 255, .14) 1px,
      transparent 1px,
      transparent 10px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, .1) 0,
      rgba(255, 255, 255, .1) 1px,
      transparent 1px,
      transparent 12px
    );
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, .35),
    inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.hero__laptop-trackpad {
  width: 38%;
  height: clamp(16px, 2vw, 20px);
  margin: 7px auto 0;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(60, 40, 20, .1) 0%, rgba(60, 40, 20, .18) 100%);
  box-shadow:
    inset 0 1px 3px rgba(60, 40, 20, .18),
    0 1px 0 rgba(255, 255, 255, .35);
}

.hero__laptop-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero__laptop-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero__laptop-slide picture,
.hero__laptop-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.hero__stage-accent {
  position: absolute;
  z-index: 4;
  right: -2%;
  bottom: 4%;
  width: clamp(140px, 34%, 260px);
  margin: 0;
  border-radius: var(--r-4);
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 20px 48px rgba(60, 40, 20, .22);
  transform: rotate(5deg);
}

.hero__stage-accent picture,
.hero__stage-accent img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 1024px) {
  .hero__stage-accent {
    right: -6%;
    bottom: 6%;
    width: clamp(180px, 38%, 280px);
  }
}

.hero__stage-float {
  position: absolute;
  z-index: 5;
  left: 2%;
  bottom: 18%;
  max-width: 160px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-3);
  box-shadow: 0 14px 36px rgba(60, 40, 20, .14);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero__stage-float strong {
  display: block;
  font-size: 28px;
  color: var(--c-action);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  line-height: 1.1;
  margin-bottom: 2px;
}

@media (max-width: 1023px) {
  .hero__laptop,
  .hero__laptop-lid,
  .hero__laptop-hinge,
  .hero__laptop-base {
    transform: none;
  }

  .hero__laptop {
    filter: drop-shadow(0 16px 32px rgba(28, 25, 23, .14));
  }

  .hero__laptop-wrap {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero__stage {
    justify-content: center;
    min-height: 280px;
  }

  .hero__stage-accent {
    right: 4%;
    bottom: 4%;
    width: 110px;
  }

  .hero__stage-float {
    left: 4%;
    bottom: 8%;
    max-width: 120px;
    padding: 10px 14px;
  }

  .hero__stage-float strong {
    font-size: 22px;
  }
}

/* ── Desk + monitor (generated scene, interactive screen) ── */

.hero__stage--desk {
  min-height: 300px;
}

.hero__stage--desk .hero__stage-bg {
  display: none;
}

.hero__desk {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  --monitor-top: 20.4%;
  --monitor-left: 46.5%;
  --monitor-width: 42.4%;
  --monitor-height: 37.4%;
}

@media (min-width: 1024px) {
  .hero__stage--desk {
    min-height: 520px;
  }

  .hero__desk {
    margin-left: -8%;
    margin-right: -2%;
    max-width: min(760px, 108%);
  }
}

.hero__desk-scene picture,
.hero__desk-scene img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-4);
}

.hero__monitor-screen {
  position: absolute;
  top: var(--monitor-top);
  left: var(--monitor-left);
  width: var(--monitor-width);
  height: var(--monitor-height);
  border-radius: 2px;
  overflow: hidden;
  background: #111;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4);
  z-index: 2;
}

.hero__monitor-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero__monitor-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero__monitor-slide picture,
.hero__monitor-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.hero__stage--desk .hero__stage-accent {
  right: 6%;
  bottom: 10%;
  width: clamp(130px, 28%, 200px);
  z-index: 3;
}

.hero__stage--desk .hero__stage-float {
  left: 8%;
  bottom: 14%;
  z-index: 3;
}

@media (max-width: 1023px) {
  .hero__stage--desk .hero__stage-float {
    left: 6%;
    bottom: 10%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__monitor-slide {
    transition: none;
  }
}

body[data-page-path="/"] .section--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/img/deco/topo-contour.svg") center bottom / cover no-repeat;
  opacity: .12;
  pointer-events: none;
  z-index: 0;
}

body[data-page-path="/"] .section--mesh::before {
  background:
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(254, 243, 199, .5) 0%, transparent 55%),
    radial-gradient(ellipse 50% 45% at 5% 90%, rgba(209, 250, 229, .35) 0%, transparent 50%),
    linear-gradient(180deg, #fff 0%, var(--c-surface) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .hero__laptop-slide {
    transition: none;
  }

  .hero__laptop,
  .hero__laptop-lid,
  .hero__laptop-hinge,
  .hero__laptop-base {
    transform: none;
  }
}
