/**
 * Hero: типографика + превью справа, трассы на фоне.
 */

/* Две колонки: текст слева, превью справа (перебивает flex из huly-theme) */
.site-premium .hero .hero__stack.hero__stack--rich {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 2.5vw, 32px);
  width: var(--content-width, 100%);
  max-width: none;
  margin-inline: auto;
  align-items: center;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .site-premium .hero .hero__stack.hero__stack--rich {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
    gap: clamp(20px, 2vw, 28px);
    align-items: center;
  }

  .site-premium .hero__stack--rich > .hero__copy--rich {
    grid-column: 1;
    grid-row: 1;
  }

  .site-premium .hero__stack--rich > .hero-media--rich {
    grid-column: 2;
    grid-row: 1;
  }
}

.site-premium .hero.hero--rich {
  padding-bottom: clamp(24px, 4vw, 40px);
}

/* Типографика: компактный кикер + крупный бренд */
.site-premium .hero.hero--rich .hero__title.hero__title--display {
  margin: 0 0 clamp(18px, 2.4vw, 26px);
  max-width: 16em;
}

/* Маленький двухстрочный кикер "Российский редактор / схем и диаграмм" */
.site-premium .hero__title-line--lead {
  display: block;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--text-muted);
}

.site-premium .hero__title-accent {
  font-weight: 700;
  color: var(--primary-dark);
}

.site-premium .hero__title-line--sub {
  display: block;
  margin-top: 0.15em;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
}

/* Бренд "Автограф ПРО" — главный акцент */
.site-premium .hero__title-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25em 0.45em;
  margin-top: clamp(14px, 2vw, 22px);
  line-height: 1;
  /* shadow клипа — даём место сверху/снизу, чтобы тень брендового PRO выходила за блок */
  padding: 0.1em 0 0.2em;
}

.site-premium .hero__title-brand-core {
  font-size: clamp(3rem, 7.2vw, 4.85rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  background: linear-gradient(118deg, #1a4d75 0%, #2d80c2 38%, #0f8893 72%, #2d80c2 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hero-brand-shimmer 12s ease-in-out infinite alternate;
  /* drop-shadow вместо box-shadow на тексте, чтобы тень выходила за пределы блока */
  filter: drop-shadow(0 6px 18px rgba(45, 128, 194, 0.18));
}

.site-premium .hero__title-brand-pro {
  display: inline-flex;
  align-items: center;
  padding: 0.14em 0.5em 0.22em;
  border-radius: 14px;
  font-size: clamp(1.75rem, 4.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 55%, var(--accent-color) 100%);
  /* Тень должна выходить за пределы родителя — overflow:visible на стэке (см. ниже) */
  box-shadow:
    0 12px 38px rgba(45, 128, 194, 0.38),
    0 2px 6px rgba(15, 35, 55, 0.08);
}

@keyframes hero-brand-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.site-premium .hero.hero--light.hero--rich h1.hero__title--display {
  max-width: none;
  margin-inline: 0;
  text-align: inherit;
}

.site-premium .hero.hero--light.hero--rich h1.hero__title--display span {
  margin-top: 0;
}

@media (min-width: 1024px) {
  .site-premium .hero__copy--rich {
    text-align: left;
  }
}

.site-premium .hero__copy--rich {
  min-width: 0;
  width: 100%;
}

/* Превью справа */
.site-premium .hero-media--rich.hero-media--circuit {
  position: relative;
  width: 100%;
  min-width: 0;
  background: transparent;
  overflow: visible;
}

.hero-visual {
  position: relative;
  width: 100%;
  overflow: visible;
}

.hero-circuit__svg {
  position: absolute;
  top: -72px;
  left: -72px;
  width: calc(100% + 144px);
  height: calc(100% + 144px);
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.hero-visual__frame {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 3px;
  border-radius: 0;
  background: linear-gradient(145deg, rgba(45, 128, 194, 0.45), rgba(15, 136, 147, 0.28), rgba(74, 155, 212, 0.38));
  box-shadow: 0 20px 56px rgba(45, 128, 194, 0.12);
}

.hero-visual__frame::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 0;
  background: #fff;
  z-index: 0;
  pointer-events: none;
}

/* угловые L — заменены PCB-трассами в SVG */

.site-premium .hero-showcase--rich {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
}

.site-premium .hero-showcase--rich .hero-showcase__halo {
  display: none;
}

.site-premium .hero-showcase--rich .hero-showcase__shell {
  position: relative;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.site-premium .hero-showcase--rich .hero-showcase__shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(45, 128, 194, 0.09) 46%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 12% 18%, rgba(45, 128, 194, 0.12), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.3;
  pointer-events: none;
  animation: hero-showcase-sweep 14s var(--ease-premium-soft, cubic-bezier(0.22, 1, 0.36, 1)) infinite;
  z-index: 3;
}

.site-premium .hero-showcase--rich .hero-showcase__viewport {
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: clamp(240px, 30vw, 400px);
  border-radius: 0;
  background: #0a1018;
  transform: translate3d(calc(var(--hero-orbit-x, 0) * 4px), calc(var(--hero-orbit-y, 0) * 4px), 0);
  transition: transform 220ms var(--ease-premium-soft, cubic-bezier(0.22, 1, 0.36, 1));
}
.site-premium .hero-showcase--rich .hero-showcase__viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 85% 70% at 50% 8%, rgba(125, 211, 252, 0.07), transparent 58%);
  pointer-events: none;
  z-index: 2;
}

.hero-hotspot {
  position: absolute;
  z-index: 6;
  min-width: 78px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  border-radius: 999px;
  background: rgba(12, 22, 34, 0.68);
  color: #d9ecfa;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition:
    transform 200ms var(--ease-premium-soft, cubic-bezier(0.22, 1, 0.36, 1)),
    border-color 220ms var(--ease-premium-soft, cubic-bezier(0.22, 1, 0.36, 1)),
    background 220ms var(--ease-premium-soft, cubic-bezier(0.22, 1, 0.36, 1));
}
.hero-hotspot:hover,
.hero-hotspot.is-active {
  border-color: rgba(125, 211, 252, 0.7);
  background: rgba(18, 40, 62, 0.78);
  transform: translateY(-1px) scale(1.02);
}
.hero-hotspot:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.75);
  outline-offset: 2px;
}
.hero-hotspot--1 { top: 18%; left: 10%; }
.hero-hotspot--2 { top: 56%; left: 54%; }
.hero-hotspot--3 { top: 24%; right: 10%; }

.hero-hotspot-tip {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 7;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(10, 20, 30, 0.76);
  border: 1px solid rgba(125, 211, 252, 0.32);
  color: #d9ecfa;
  font-size: 12px;
  line-height: 1.4;
  backdrop-filter: blur(6px);
}
.hero-hotspot-tip strong {
  display: block;
  color: #fff;
  margin-bottom: 2px;
  font-size: 12px;
}

@keyframes hero-showcase-sweep {
  0%,
  62%,
  100% {
    transform: translateX(-120%) skewX(-12deg);
    opacity: 0;
  }
  74% {
    opacity: 0.34;
  }
  88% {
    transform: translateX(120%) skewX(-12deg);
    opacity: 0.24;
  }
}

.hero-visual__caption {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.hero-visual__caption .hero-showcase__tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-color);
  background: rgba(45, 128, 194, 0.1);
  border: 1px solid rgba(45, 128, 194, 0.18);
}

.hero-circuit__trace {
  fill: none;
  stroke: rgba(45, 128, 194, 0.18);
  stroke-width: 1.25;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.hero-circuit__trace--orth {
  stroke: rgba(45, 128, 194, 0.26);
  stroke-width: 1.35;
}

.hero-circuit__port {
  fill: rgba(45, 128, 194, 0.55);
  filter: drop-shadow(0 0 4px rgba(45, 128, 194, 0.35));
}

.hero-circuit__joint {
  fill: rgba(74, 155, 212, 0.35);
}

.hero-circuit__signal {
  fill: none;
  stroke: url(#hero-signal-grad);
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
  filter: url(#hero-signal-glow);
  opacity: 0.92;
}

.hero-circuit__signal--alt {
  opacity: 0.75;
  stroke-width: 1.75;
}

.site-premium .hero-float {
  z-index: 5;
}

@media (max-width: 1023px) {
  .site-premium .hero__copy--rich,
  .site-premium .hero__title-line--lead,
  .site-premium .hero__title-line--sub {
    text-align: center;
  }

  .site-premium .hero__title-brand {
    justify-content: center;
  }

  .site-premium .hero__highlights {
    margin-inline: auto;
  }

  .site-premium .hero__registry-card,
  .site-premium .hero__actions--rich {
    margin-inline: auto;
  }

  .site-premium .hero-showcase--rich .hero-showcase__viewport {
    min-height: clamp(200px, 52vw, 300px);
  }
  .hero-hotspot {
    min-width: 70px;
    height: 28px;
    font-size: 10px;
    padding: 0 8px;
  }
  .hero-hotspot--1 { top: 14%; left: 8%; }
  .hero-hotspot--2 { top: 60%; left: 50%; }
  .hero-hotspot--3 { top: 20%; right: 8%; }
  .hero-hotspot-tip {
    left: 8px;
    right: 8px;
    bottom: 8px;
    font-size: 11px;
  }

  .hero-circuit__svg {
    inset: 0;
    width: 100%;
    height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-premium .hero-showcase--rich .hero-showcase__viewport {
    transform: none;
    transition: none;
  }

  .site-premium .hero-showcase--rich .hero-showcase__shell::before {
    animation: none;
    opacity: 0.12;
  }

  .hero-circuit__signal {
    display: none;
  }

  .hero-circuit__trace--orth {
    stroke-dasharray: none;
    stroke: rgba(45, 128, 194, 0.2);
  }

  .site-premium .hero__title-brand-core {
    animation: none !important;
  }
}
