/* Страница для партнёров (docs/landing.md). Поверх app.css. */

.logo__sub { margin-left: 4px; color: var(--muted); font-style: normal; font-weight: 500; font-size: 15px; }

/* ---------- Hero и созвездие продуктов ---------- */

.p-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  padding: 140px 16px 120px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.p-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(600px circle at var(--hx, 50%) var(--hy, 30%), rgba(191, 90, 242, .12), transparent 40%);
  pointer-events: none;
}
.p-hero__content { max-width: 980px; }
.p-hero__title { font-size: clamp(44px, 8vw, 96px); }

.constellation {
  position: relative;
  width: min(1000px, 100%);
  aspect-ratio: 1000 / 420;
  margin-top: 64px;
}
.constellation__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.constellation__lines path {
  fill: none;
  stroke: url(#line-grad);
  stroke-width: 1.5;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  opacity: .5;
  vector-effect: non-scaling-stroke;
  animation: draw 1.6s var(--ease) forwards;
  animation-delay: 1.2s;
}
/* Поверх линий бегут «данные» от центра к продуктам. */
.constellation__lines .flow {
  stroke-width: 3;
  stroke-dasharray: 6 80;
  stroke-dashoffset: 0;
  opacity: 0;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px #bf5af2);
  animation: flow 2.4s linear infinite, fade-up .6s 2.6s forwards;
}
@keyframes flow { to { stroke-dashoffset: -86; } }
@keyframes fade-up { to { opacity: 1; } }

.c-node {
  position: absolute;
  top: var(--y);
  left: var(--x);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 16, 20, .8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .9);
  text-align: left;
  translate: -50% -50%;
  opacity: 0;
  animation: node-in .9s var(--ease) forwards, node-float 6s ease-in-out infinite;
  animation-delay: calc(900ms + var(--i) * 180ms), calc(var(--i) * -1.3s);
}
@keyframes node-in { from { opacity: 0; scale: .6; filter: blur(10px); } to { opacity: 1; scale: 1; filter: none; } }
@keyframes node-float { 50% { transform: translateY(-8px); } }
.c-node strong { display: block; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.c-node small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; }
.c-node__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); font-size: 20px; }
.c-node--hub { flex-direction: column; gap: 8px; padding: 18px 22px; border-color: rgba(191, 90, 242, .4); box-shadow: 0 0 80px -10px rgba(191, 90, 242, .6); }
.c-node--hub .logo__mark { width: 60px; height: 60px; filter: drop-shadow(0 6px 18px rgba(191, 90, 242, .45)); }
.c-node--hub::before,
.c-node--hub::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(191, 90, 242, .5);
  border-radius: inherit;
  animation: ping 2.8s var(--ease) infinite;
  animation-delay: 2s;
  opacity: 0;
}
.c-node--hub::after { animation-delay: 3.4s; }

/* ---------- Экосистема: сцены справа ---------- */

.p-screen { background: radial-gradient(120% 90% at 0% 0%, rgba(191, 90, 242, .16), transparent 50%), var(--bg-2); }
.p-screen > * { padding: 0; }
.p-screen[data-scene="0"] > :nth-child(1),
.p-screen[data-scene="1"] > :nth-child(2),
.p-screen[data-scene="2"] > :nth-child(3),
.p-screen[data-scene="3"] > :nth-child(4) { opacity: 1; transform: none; filter: none; }

.p-shot { justify-content: flex-start; }
.p-shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }

.p-mock { padding: 28px !important; gap: 18px; justify-content: flex-start !important; }
.p-mock__bar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.p-mock__bar span { color: var(--muted); font-size: 13px; }
.p-mock__foot { margin-top: auto; color: var(--muted); font-size: 14px; }

.p-class { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.p-class i {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 92px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, #24242c, #131317);
  font-style: normal;
  overflow: hidden;
}
.p-class i b { position: relative; font-size: 13px; font-weight: 600; }
/* Полоса прогресса каждого ученика дорастает до --p. */
.p-class i::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: var(--p);
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.p-screen[data-scene="1"] .p-class i::after { animation: grow 1.6s var(--ease) .3s forwards; }
.p-class i:nth-child(2)::after { animation-delay: .4s !important; }
.p-class i:nth-child(3)::after { animation-delay: .5s !important; }
.p-class i:nth-child(4)::after { animation-delay: .6s !important; }
.p-class i:nth-child(5)::after { animation-delay: .7s !important; }
.p-class i:nth-child(6)::after { animation-delay: .8s !important; }
@keyframes grow { to { transform: scaleX(1); } }

.p-coins { display: inline-flex; align-items: center; gap: 6px; color: var(--gold) !important; font-weight: 700; }
.p-mock__q { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.p-star { display: grid; place-items: center; flex: 1; }
.p-star svg { width: 140px; height: 140px; fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 0 12px rgba(255, 214, 10, .5)); }
.p-star path { stroke-dasharray: 420; stroke-dashoffset: 420; }
.p-screen[data-scene="2"] .p-star path { animation: draw 1.6s var(--ease) .3s forwards; }
.p-mock__ok { align-self: flex-start; padding: 10px 16px; border-radius: 999px; background: rgba(48, 209, 88, .12); color: var(--green); font-weight: 600; font-size: 15px; opacity: 0; }
.p-screen[data-scene="2"] .p-mock__ok { animation: fade-up .5s var(--ease) 1.8s forwards; }

.p-phone { align-items: center; justify-content: center !important; }
.p-phone img {
  width: auto;
  height: 92%;
  border: 6px solid #2c2c2e;
  border-radius: 34px;
  box-shadow: 0 40px 80px -30px rgba(191, 90, 242, .5);
}

/* ---------- ERP крупно ---------- */

.p-zoom { --p: 0; padding-block: 120px 80px; overflow: hidden; }
.p-zoom__head { text-align: center; }
.p-zoom__head .section-title { max-width: 22ch; margin-inline: auto; }
.p-zoom__stage { position: relative; width: min(1120px, 100% - 32px); margin-inline: auto; perspective: 1600px; }

.p-laptop {
  position: relative;
  z-index: 1;
  transform: rotateX(calc((1 - var(--p)) * 28deg)) scale(calc(.78 + var(--p) * .22));
  transform-origin: 50% 100%;
}
.p-laptop__screen {
  padding: 12px;
  border: 1px solid #3a3a3c;
  border-radius: 22px 22px 0 0;
  background: #0b0b0d;
  box-shadow: 0 60px 140px -40px rgba(41, 151, 255, calc(.2 + var(--p) * .3));
}
.p-laptop__screen img { width: 100%; height: auto; border-radius: 10px; }
.p-laptop__base {
  height: 18px;
  margin: 0 -5%;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(180deg, #3a3a3c, #1c1c1e);
}

.p-float {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(20, 20, 24, .85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .9);
  opacity: clamp(0, calc(var(--p) * 2 - .6), 1);
  transform: translateX(calc(var(--side) * (1 - var(--p)) * 160px)) rotate(calc(var(--side) * 4deg));
}
.p-float img { width: 100%; height: auto; border-radius: 13px; }
.p-float figcaption { padding: 10px 6px 4px; color: #d2d2d7; font-size: 14px; font-weight: 600; }
.p-float--left { --side: -1; left: -4%; bottom: -8%; width: 36%; }
.p-float--right { --side: 1; right: -2%; bottom: -14%; width: 17%; }

/* ---------- Направления: горизонтальная лента ---------- */

.p-rail { position: relative; }
.p-rail__sticky { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; min-height: 100vh; overflow: hidden; }
.p-rail__head .section-title { max-width: 20ch; margin-bottom: 36px; }
.p-rail__track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding-inline: max(16px, (100vw - 1120px) / 2);
  transform: translateX(var(--rail-x, 0));
  will-change: transform;
}
.p-card {
  --x: 50%;
  --y: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(380px, 78vw);
  min-height: 420px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(100% 80% at 100% 100%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--bg-2);
  overflow: hidden;
  isolation: isolate;
}
.p-card__num { color: var(--accent); font: 600 14px var(--mono); }
.p-card h3 { margin: 16px 0 10px; font-size: clamp(26px, 7vw, 32px); hyphens: auto; line-height: 1.05; letter-spacing: -.03em; }
.p-card p { margin: 0; color: var(--muted); }
.p-card__glyph {
  position: absolute;
  right: 24px;
  bottom: 8px;
  z-index: -1;
  color: var(--accent);
  font: 700 140px/1 var(--mono);
  opacity: .18;
  transition: transform .8s var(--ease), opacity .8s;
}
.p-card:hover .p-card__glyph { transform: translateY(-10px) rotate(-6deg) scale(1.08); opacity: .32; }
.p-card--end {
  justify-content: flex-end;
  width: min(460px, 82vw);
  background: var(--grad);
  border: 0;
}
.p-card--end h3 { color: #fff; }
.p-card--end p { color: rgba(255, 255, 255, .85); font-size: 18px; }

/* ---------- Бизнес ---------- */

.p-biz { padding-block: 60px 120px; }
.p-biz__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.p-biz__list li {
  --x: 50%;
  --y: 50%;
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-2);
  overflow: hidden;
  isolation: isolate;
}
.p-biz__list span { font: 600 14px var(--mono); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-biz__list h3 { margin: 14px 0 8px; font-size: 20px; letter-spacing: -.02em; }
.p-biz__list p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Как начать ---------- */

.p-steps { --fill: 0; padding-block: 60px 120px; }
.p-steps__list { position: relative; display: grid; gap: 44px; max-width: 720px; margin: 0; padding: 0 0 0 56px; list-style: none; }
.p-steps__line { position: absolute; top: 8px; bottom: 8px; left: 11px; width: 2px; background: var(--line); }
.p-steps__line i { position: absolute; inset: 0; background: var(--grad); transform: scaleY(var(--fill)); transform-origin: 50% 0; }
.p-steps__list li { position: relative; opacity: .35; transform: translateX(-12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.p-steps__list li.is-on { opacity: 1; transform: none; }
.p-steps__dot {
  position: absolute;
  top: 4px;
  left: -56px;
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  transition: border-color .4s, box-shadow .4s, background .4s;
}
.p-steps__list li.is-on .p-steps__dot { border-color: var(--violet); background: var(--violet); box-shadow: 0 0 24px rgba(191, 90, 242, .7); }
.p-steps__list h3 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; }
.p-steps__list p { margin: 0; color: var(--muted); font-size: 17px; }

/* ---------- Вопросы ---------- */

.p-faq { padding-block: 40px 100px; }
.p-faq__list { display: grid; gap: 12px; max-width: 860px; }
.p-faq details {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-2);
  transition: border-color .3s, background .3s;
}
.p-faq details[open] { border-color: rgba(191, 90, 242, .4); background: #0e0e12; }
.p-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  list-style: none;
}
.p-faq summary::-webkit-details-marker { display: none; }
.p-faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 400;
  font-size: 22px;
  transition: transform .4s var(--ease), background .3s, color .3s;
}
.p-faq details[open] summary::after { transform: rotate(45deg); background: var(--text); color: #000; }
.p-faq details p { margin: 0; padding: 0 26px 24px; color: #a1a1a6; font-size: 17px; max-width: 64ch; }
.p-faq details[open] p { animation: faq-in .45s var(--ease); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-8px); filter: blur(4px); } }

/* ---------- Адаптив ---------- */

@media (max-width: 960px) {
  .p-biz__list { grid-template-columns: 1fr 1fr; }
  .p-float--left { left: 0; bottom: -10%; width: 44%; }
  .p-float--right { right: 0; width: 22%; }
  /* Лента без закрепления: обычная горизонтальная прокрутка. */
  .p-rail { height: auto !important; padding-block: 80px; }
  .p-rail__sticky { position: static; min-height: 0; }
  .p-rail__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; transform: none; padding-bottom: 12px; scrollbar-width: none; }
  .p-rail__track::-webkit-scrollbar { display: none; }
  .p-card { flex: none; scroll-snap-align: center; min-height: 340px; }
}

@media (max-width: 640px) {
  .logo__sub { display: none; }
  .p-hero { padding-top: 112px; }
  .constellation { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 48px; }
  .constellation__lines { display: none; }
  .c-node { position: static; translate: none; padding: 10px; }
  .c-node--hub { grid-column: 1 / -1; flex-direction: row; justify-content: center; }
  .c-node strong { font-size: 14px; white-space: normal; }
  .c-node small { white-space: normal; }
  .c-node__icon { width: 34px; height: 34px; flex: none; }
  .p-biz__list { grid-template-columns: 1fr; }
  .p-float { display: none; }
  .p-mock { padding: 20px !important; }
  .p-class i { height: 64px; }
  .p-faq summary { padding: 18px 20px; font-size: 17px; }
  .p-faq details p { padding: 0 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .c-node,
  .constellation__lines path,
  .constellation__lines .flow { opacity: 1; stroke-dashoffset: 0; }
  .p-steps__list li { opacity: 1; transform: none; }
  .p-laptop { transform: none; }
  .p-float { opacity: 1; transform: none; }
}
