/* WHAT IS */
.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.what-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s;
}

.what-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(88, 166, 255, 0.1);
  transform: translateY(-2px);
}

.what-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.what-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.what-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* MANIFESTO */
.manifesto {
  max-width: 680px;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.manifesto p {
  margin-bottom: 1.2rem;
}

.manifesto strong {
  color: var(--accent);
  font-weight: 600;
}

/* HOW — steps with circles, arrows and connecting line */
#how .section-inner {
  text-align: center;
}

#how .section-label {
  text-align: center;
}

#how .section-title {
  margin-bottom: 0;
  padding-left: 0;
}

#how .section-subtitle {
  text-align: center;
  padding-left: 0;
  padding-top: 10px;
  margin: 0 auto;
}

.steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0;
  margin-top: 60px;
  position: relative;
  width: 1000px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Connecting lines between circles — two segments with gap at circle 2 */
.steps::before {
  content: '';
  position: absolute;
  top: 27px;
  left: calc(16.67% + 30px);
  width: calc(33.33% - 60px);
  height: 2px;
  background: var(--accent);
  opacity: 0.4;
  z-index: 0;
}

.steps::after {
  content: '';
  position: absolute;
  top: 27px;
  left: calc(50% + 30px);
  width: calc(33.33% - 60px);
  height: 2px;
  background: var(--accent);
  opacity: 0.4;
  z-index: 0;
}



.step {
  flex: 1;
  text-align: center;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  font-family: monospace;
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.15);
  transition: all 0.4s;
}

.step:hover .step-number {
  background: rgba(88, 166, 255, 0.1);
  box-shadow: 0 0 30px rgba(88, 166, 255, 0.3);
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.step:hover h3 {
  color: var(--accent);
}

.step p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 240px;
  margin: 0 auto;
}

/* FEATURES — circular orbit system */
#features .section-inner {
  text-align: center;
  align-items: center;
}

#features .section-subtitle {
  text-align: center;
}

.orbit-system {
  position: relative;
  width: 100%;
  max-width: 850px;
  height: 620px;
  margin: 2rem auto 0;
}

.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(88, 166, 255, 0.06);
  border: 1px solid rgba(88, 166, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: 0 0 50px rgba(88, 166, 255, 0.15);
  overflow: visible;
  transition: width 1s cubic-bezier(0.23, 1, 0.32, 1),
              height 1s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.orbit-core img {
  width: 60%;
  height: auto;
  transition: width 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.orbit-system.active .orbit-core {
  width: 130px;
  height: 130px;
  border-color: rgba(88, 166, 255, 0.6);
}

/* Solar corona glow — outside the core, fades in on hover */
.orbit-core::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 1.2s ease, width 1s cubic-bezier(0.23, 1, 0.32, 1), height 1s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  z-index: -1;
  animation: coronaGlow 4s ease-in-out infinite;
}

.orbit-system.active .orbit-core::after {
  opacity: 1;
  width: 130px;
  height: 130px;
}

@keyframes coronaGlow {
  0%, 100% {
    box-shadow:
      0 0 30px rgba(88, 166, 255, 0.5),
      0 0 60px rgba(88, 166, 255, 0.3),
      0 0 100px rgba(167, 139, 250, 0.2),
      0 0 160px rgba(88, 166, 255, 0.1);
  }
  33% {
    box-shadow:
      0 0 35px rgba(167, 139, 250, 0.5),
      0 0 70px rgba(255, 123, 114, 0.25),
      0 0 110px rgba(167, 139, 250, 0.18),
      0 0 170px rgba(126, 231, 135, 0.08);
  }
  66% {
    box-shadow:
      0 0 30px rgba(255, 123, 114, 0.4),
      0 0 65px rgba(88, 166, 255, 0.3),
      0 0 105px rgba(126, 231, 135, 0.15),
      0 0 165px rgba(167, 139, 250, 0.1);
  }
}

.orbit-system.active .orbit-core img {
  width: 65%;
}

/* Decorative rings */
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(88, 166, 255, 0.08);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.orbit-ring-1 { width: 300px; height: 300px; }
.orbit-ring-2 { width: 610px; height: 610px; border-color: rgba(167, 139, 250, 0.12); }

.orbit-system.active .orbit-ring-1 {
  width: 340px; height: 340px;
  border-color: rgba(88, 166, 255, 0.15);
}

.orbit-system.active .orbit-ring-2 {
  width: 610px; height: 610px;
  border-color: rgba(167, 139, 250, 0.25);
  box-shadow: 0 0 30px rgba(167, 139, 250, 0.05);
}

/* Orbital nodes — absolute positioned around center */
.orbit-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  z-index: 3;
  transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1), translate 1s cubic-bezier(0.23, 1, 0.32, 1), z-index 0s;
}

.orbit-node:hover { z-index: 20; }

/* 6 nodes positioned around center (children 4-9, after ring1, ring2, core) */
.orbit-node:nth-child(4) { left: calc(50% + -161px); top: calc(50% + -135px); transform: translate(-50%, -50%); }
.orbit-node:nth-child(5) { left: calc(50% + -210px); top: calc(50% + -0px); transform: translate(-50%, -50%); }
.orbit-node:nth-child(6) { left: calc(50% + -161px); top: calc(50% + 135px); transform: translate(-50%, -50%); }
.orbit-node:nth-child(7) { left: calc(50% + 161px); top: calc(50% + -135px); transform: translate(-50%, -50%); }
.orbit-node:nth-child(8) { left: calc(50% + 210px); top: calc(50% + -0px); transform: translate(-50%, -50%); }
.orbit-node:nth-child(9) { left: calc(50% + 161px); top: calc(50% + 135px); transform: translate(-50%, -50%); }

/* Planet — fixed size, grows via scale on hover */
.orbit-planet {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  transition: scale 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.5s,
              box-shadow 0.5s;
}

.orbit-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: opacity 0.4s, transform 0.4s;
  z-index: 2;
  position: absolute;
  inset: 0;
}

.orbit-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  opacity: 0;
  transition: opacity 0.4s 0.15s;
  text-align: center;
}

.orbit-reveal h4 {
  font-size: 0.34rem;
  margin-bottom: 0.15rem;
  color: var(--accent);
}

.orbit-reveal p {
  font-size: 0.27rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Hover — planet scales up, icon fades, reveal appears */
.orbit-node:hover .orbit-planet {
  scale: 2.2;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.3), inset 0 0 15px rgba(88, 166, 255, 0.08);
}

.orbit-node:hover .orbit-icon-img {
  opacity: 0;
  transform: scale(0.6);
}

.orbit-node:hover .orbit-reveal {
  opacity: 1;
}

.orbit-label {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.6s 0.3s, all 0.4s;
}

.orbit-system.active .orbit-label {
  opacity: 1;
}

.orbit-node:hover .orbit-label {
  opacity: 0;
}

/* Section hover spread — handled in orbit.js */


/* SECURITY — side by side layout */
#security .section-inner {
  display: grid !important;
  grid-template-columns: 280px 1fr;
  align-items: center;
  gap: 4rem;
  padding: 4rem 4rem 4rem 6rem;
}

.sec-left {
  align-self: center;
}

#security .section-inner .constellation {
  margin: 0;
}

.constellation {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 500px;
  margin: 2rem auto 0;
  overflow: visible;
}

.constellation-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.constellation-lines svg {
  width: 100%;
  height: 100%;
}

.constellation-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  z-index: 2;
  cursor: pointer;
}

.cnode-top { left: 50%; top: 0; transform: translateX(-50%); }
.cnode-left { left: 5%; top: 65%; }
.cnode-right { right: 5%; top: 65%; }

.cnode-orbit {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 1px solid rgba(88, 166, 255, 0.15);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: all 0.5s;
}

[data-color="blue"] .cnode-orbit { border-color: rgba(88, 166, 255, 0.2); }
[data-color="purple"] .cnode-orbit { border-color: rgba(167, 139, 250, 0.2); }
[data-color="red"] .cnode-orbit { border-color: rgba(255, 123, 114, 0.2); }

.constellation-node:hover .cnode-orbit {
  width: 260px;
  height: 260px;
  border-color: rgba(88, 166, 255, 0.4);
  box-shadow: 0 0 40px rgba(88, 166, 255, 0.15);
  transform: translate(-50%, -30%);
}

[data-color="purple"]:hover .cnode-orbit { border-color: rgba(167, 139, 250, 0.4); box-shadow: 0 0 40px rgba(167, 139, 250, 0.15); }
[data-color="red"]:hover .cnode-orbit { border-color: rgba(255, 123, 114, 0.4); box-shadow: 0 0 40px rgba(255, 123, 114, 0.15); }

.cnode-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  z-index: 2;
}

.cnode-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.constellation-node:hover .cnode-img {
  width: 130px;
  height: 130px;
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(88, 166, 255, 0.3);
}

.constellation-node:hover .cnode-img img {
  transform: scale(1.1);
}

.cnode-info {
  position: relative;
  text-align: center;
  max-width: 200px;
  opacity: 0.9;
  transition: all 0.4s;
}

.cnode-info h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.cnode-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-height: 0;
  overflow: visible;
  opacity: 0;
  transition: all 0.4s;
}

.constellation-node:hover .cnode-info p {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.3rem;
}



.constellation-node:hover .cnode-info h3 {
  color: var(--accent);
}

/* CTA */
#cta .section-inner {
  text-align: center;
  padding: 8rem 2rem;
}

.cta-box {
  padding: 5rem 3rem;
  background: transparent;
  border: none;
  border-radius: 0;
  position: relative;
  text-align: center;
}

.cta-box h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-box p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Main CTA button */
.cta-main-btn {
  font-size: 1.1rem;
  padding: 1rem 3rem;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 3rem;
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.footer-links span {
  color: var(--text-muted);
  opacity: 0.4;
}

/* RESPONSIVE */
@media (max-width: 768px) {

  /* Base */
  section {
    padding: 4rem 1.5rem;
  }
  .section-label { font-size: 0.65rem; letter-spacing: 2px; }
  .section-title { font-size: 1.6rem; }
  .section-subtitle { font-size: 1rem; margin-bottom: 2rem; }
  .manifesto { font-size: 1rem; }

  /* MAIN */
  #main { padding: 0; }

  /* SUBTITLE — уменьшаем второй экран */
  .subtitle-block {
    height: auto;
    padding: 4vh 1.5rem 6vh;
  }

  /* HOW — steps stack vertically */
  #how { text-align: center; }
  #how .section-title { padding-left: 0; }
  #how .section-subtitle { padding-left: 0; text-align: center; margin: 0 auto 2rem; }
  .steps {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
  }
  .steps::before, .steps::after { display: none; }
  .step { width: 100%; max-width: 320px; flex-direction: column; gap: 0.8rem; text-align: center; align-items: center; }
  .step-number {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 1.2rem;
  }

  /* SECURITY — column on mobile */
  #security .section-inner {
    display: flex !important;
    flex-direction: column !important;
    padding: 3rem 1.5rem 2rem !important;
    gap: 2rem;
    align-items: center;
    text-align: center;
  }
  .sec-left { text-align: center; width: 100%; }
  .sec-left .section-subtitle { margin: 0 auto; }

  /* Constellation */
  .what-grid { grid-template-columns: 1fr; }
  .constellation {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 1rem 0;
    width: 100%;
    max-width: 340px;
  }
  .constellation-lines { display: none; }
  .constellation-node {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;  /* перебить GSAP на мобайле */
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }
  .cnode-img { width: 72px; height: 72px; min-width: 72px; }
  .cnode-info { text-align: left; }
  .cnode-orbit { display: none; }
  .cnode-info p { max-height: none; opacity: 0.7; font-size: 0.85rem; }

  /* ORBIT — U-shape with tap-to-reveal on mobile */
  .orbit-system {
    position: relative;
    width: 100%;
    height: 440px;
    padding: 0;
    display: block;
  }
  .orbit-ring { display: none; }
  .orbit-core {
    position: absolute !important;
    left: 50%;
    top: 50px;
    translate: none !important;
    transform: translate(-50%, -50%) !important;
    width: 110px;
    height: 110px;
  }
  .orbit-core img { width: 60%; }
  .orbit-core::after { display: none; }
  .orbit-system.active .orbit-core { width: 110px; height: 110px; }
  .orbit-node {
    position: absolute !important;
    translate: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 5;
  }
  /* U-shape — deep vertical */
  .orbit-node:nth-child(4) { left: calc(50% - 135px); top: 110px; }
  .orbit-node:nth-child(5) { left: calc(50% - 125px); top: 200px; }
  .orbit-node:nth-child(6) { left: calc(50% - 50px);  top: 265px; }
  .orbit-node:nth-child(7) { left: calc(50% + 50px);  top: 265px; }
  .orbit-node:nth-child(8) { left: calc(50% + 125px); top: 200px; }
  .orbit-node:nth-child(9) { left: calc(50% + 135px); top: 110px; }
  .orbit-planet { width: 68px; height: 68px; }
  .orbit-icon-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
  .orbit-label { display: none; }
  .orbit-node:hover .orbit-planet { scale: 1; }
  .orbit-reveal { display: none; }
  /* Detail panel (injected by JS) */
  .orbit-detail {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 340px;
    text-align: center;
    width: 85%;
    max-width: 300px;
    opacity: 0;
    pointer-events: none;
  }
  .orbit-detail h4 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
  }
  .orbit-detail p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
  }

  /* CTA */
  .section-title { font-size: 1.8rem; }
  .cta-box { padding: 3rem 1rem; }
  .cta-box h2 { font-size: 1.8rem; }
  .cta-main-btn { font-size: 1rem; padding: 0.8rem 2rem; }
}

@media (max-width: 480px) {
  .personas-grid { grid-template-columns: 1fr; }
  #security { padding: 3rem 1rem; }
}

/* Typewriter chars */
.tw-char {
  transition: opacity 0.1s;
}
