/* ============================================================
   HERO — первый экран лендинга
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
}

/* Блюпринт-сетка на фоне */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(var(--hair-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair-soft) 1px, transparent 1px);
  background-size: clamp(48px, 7vw, 96px) clamp(48px, 7vw, 96px);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 70% 40%, #000 0%, transparent 78%);
          mask-image: radial-gradient(ellipse 90% 80% at 70% 40%, #000 0%, transparent 78%);
  opacity: 0.9;
}

/* Генеративное зерно поверх */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- АТМОСФЕРА: ОРБ + КОЛЬЦА ---- */
.atmos {
  position: absolute;
  z-index: -2;
  top: 50%;
  right: clamp(-160px, -6vw, -40px);
  transform: translateY(-50%);
  width: clamp(420px, 52vw, 820px);
  aspect-ratio: 1;
  pointer-events: none;
}

.orb {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 30%),
    conic-gradient(from 210deg at 50% 50%,
      var(--blue-pale) 0deg,
      var(--blue) 90deg,
      var(--blue-deep) 180deg,
      var(--blue) 270deg,
      var(--blue-pale) 360deg);
  filter: blur(14px);
  opacity: 0.9;
  animation: orbSpin 34s linear infinite, orbFloat 12s var(--ease) infinite;
}
.atmos::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(88,117,164,0.30) 0%, rgba(88,117,164,0) 62%);
  filter: blur(30px);
}

.rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.rings circle {
  fill: none;
  stroke: var(--graphite);
  stroke-opacity: 0.18;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.rings .ring-dash { stroke-dasharray: 2 9; stroke-opacity: 0.30; }

/* ---- HEADER ---- */
.head {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 3vw, 34px) var(--pad);
  border-bottom: 1px solid var(--hair);
}
.logo { display: block; height: clamp(17px, 1.7vw, 22px); width: auto; }
.logo path { fill: var(--black); }

.head-meta {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  line-height: 1.5;
}
.head-meta b { color: var(--ink); font-weight: 500; }

/* ---- ОСНОВНОЙ КОНТЕНТ ---- */
.hero-main {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(40px, 6vw, 96px) var(--pad);
}
.hero-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}
.content { max-width: 920px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-bottom: clamp(22px, 3vw, 34px);
}
.kicker::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--blue);
  display: inline-block;
}

.title {
  font-weight: 500;
  font-size: clamp(38px, 6.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 16ch;
}
.title .accent { color: var(--blue); }
.title .lead-num { font-variant-numeric: lining-nums; }
.title .line { display: block; overflow: hidden; }
.title .line > span { display: block; }

.subtitle {
  margin-top: clamp(26px, 3.2vw, 40px);
  font-size: clamp(15.5px, 1.35vw, 19px);
  line-height: 1.55;
  color: var(--graphite);
  max-width: 540px;
}

.credit {
  margin-top: 22px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 460px;
}
.credit b { color: var(--ink); font-weight: 500; }

.cta-row {
  margin-top: clamp(34px, 4vw, 52px);
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 32px);
  flex-wrap: wrap;
}

/* ---- БЛЮПРИНТ-ВЫНОСКИ ---- */
.annotation {
  position: absolute;
  z-index: 8;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.annotation b { color: var(--graphite); font-weight: 500; }
.annotation .conn {
  height: 1px;
  width: clamp(28px, 5vw, 60px);
  background: var(--hair);
  transform: scaleX(0);
  transform-origin: left;
}
.annotation .node {
  width: 5px; height: 5px; border-radius: 50%;
  border: 1px solid var(--blue);
  flex: none;
}
.a1 { top: 21%; right: 13%; }
.a2 { top: 41%; right: 7%; }
.a3 { top: 62%; right: 17%; }
.a4 { top: 79%; right: 9%; }
.annotation.right { flex-direction: row-reverse; }
.annotation.right .conn { transform-origin: right; }

/* ---- НИЖНЯЯ СТРОКА ---- */
.hero-foot {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(18px, 2vw, 26px) var(--pad);
  border-top: 1px solid var(--hair);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-foot .stat b { color: var(--ink); font-weight: 500; }
.hero-foot .spacer { flex: 1; }
.hero-foot .scroll { display: inline-flex; align-items: center; gap: 10px; }
.hero-foot .scroll .ln {
  width: 36px; height: 1px; background: var(--graphite); opacity: 0.4;
  position: relative; overflow: hidden;
}
.hero-foot .scroll .ln::after {
  content:""; position:absolute; inset:0; background: var(--blue);
  animation: scrollLine 2.4s var(--ease) infinite;
}

/* ---- АНИМАЦИИ HERO ---- */
@keyframes orbSpin { to { transform: rotate(360deg); } }
@keyframes orbFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -2.4%; } }
@keyframes scrollLine { 0%{ transform: translateX(-100%);} 100%{ transform: translateX(100%);} }
@keyframes riseIn { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes orbIn { from { opacity: 0; transform: translateY(-50%) scale(0.86); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
@keyframes connGrow { to { transform: scaleX(1); } }
@keyframes drawRing { to { stroke-dashoffset: 0; } }

/* старт — скрыто */
.title .line > span { transform: translateY(110%); }
.kicker, .subtitle, .credit, .cta-row, .head, .hero-foot { opacity: 0; }
.atmos { opacity: 0; }
.annotation { opacity: 0; }
.rings circle { stroke-dashoffset: var(--len, 2400); stroke-dasharray: var(--len, 2400); }
.rings .ring-dash { stroke-dasharray: 2 9; stroke-dashoffset: 0; opacity: 0; }

/* проигрывание */
.play .head        { animation: fadeUp 0.9s var(--ease) 0.05s forwards; }
.play .kicker      { animation: fadeUp 0.8s var(--ease) 0.30s forwards; }
.play .title .line:nth-child(1) > span { animation: riseIn 1s var(--ease) 0.42s forwards; }
.play .title .line:nth-child(2) > span { animation: riseIn 1s var(--ease) 0.52s forwards; }
.play .title .line:nth-child(3) > span { animation: riseIn 1s var(--ease) 0.62s forwards; }
.play .subtitle    { animation: fadeUp 0.9s var(--ease) 0.78s forwards; }
.play .credit      { animation: fadeUp 0.9s var(--ease) 0.88s forwards; }
.play .cta-row     { animation: fadeUp 0.9s var(--ease) 0.98s forwards; }
.play .atmos       { animation: orbIn 1.6s var(--ease) 0.35s forwards; }
.play .hero-foot   { animation: fadeUp 0.9s var(--ease) 1.15s forwards; }
.play .rings circle { animation: drawRing 2.4s var(--ease) 0.6s forwards; }
.play .rings .ring-dash { animation: fadeIn 1.4s ease 1.2s forwards; }

.play .annotation  { animation: fadeIn 0.8s ease forwards; }
.play .a1 { animation-delay: 1.25s; }
.play .a2 { animation-delay: 1.40s; }
.play .a3 { animation-delay: 1.55s; }
.play .a4 { animation-delay: 1.70s; }
.play .annotation .conn { animation: connGrow 0.7s var(--ease) forwards; }
.play .a1 .conn { animation-delay: 1.35s; }
.play .a2 .conn { animation-delay: 1.50s; }
.play .a3 .conn { animation-delay: 1.65s; }
.play .a4 .conn { animation-delay: 1.80s; }

/* ---- АДАПТИВ ---- */
@media (max-width: 980px) {
  .atmos { right: -22%; width: 78vw; opacity: 0.55; }
  .annotation { display: none; }
  .head-meta { display: none; }
  .title { max-width: 18ch; }
}
@media (max-width: 560px) {
  .hero-foot .stat:nth-child(2) { display: none; }
  .atmos { display: none; }
  .cta-row { gap: 18px; }
  .btn { width: 100%; justify-content: center; }
}

/* ---- СНИЖЕНИЕ ДВИЖЕНИЯ (видимость hero) ---- */
@media (prefers-reduced-motion: reduce) {
  .title .line > span,
  .kicker, .subtitle, .credit, .cta-row, .head, .hero-foot, .annotation { opacity: 1; transform: none; }
  .atmos { opacity: 1; transform: translateY(-50%); }
  .annotation .conn { transform: scaleX(1); }
  .rings circle { stroke-dashoffset: 0; }
  .rings .ring-dash { opacity: 1; }
}
