/* ===================== BASE ===================== */
:root {
  --purple: #a855f7;
  --purple-bright: #c084fc;
  --purple-deep: #7c3aed;
  --purple-neon: #b026ff;
  --bg: #07060d;
  --bg-2: #0d0a16;
  --surface: rgba(168, 85, 247, 0.06);
  --glass: rgba(20, 14, 34, 0.55);
  --glass-border: rgba(168, 85, 247, 0.22);
  --text: #ECE9F5;
  --text-dim: #a99fc4;
  --radius: 20px;
  --shadow-neon: 0 0 30px rgba(176, 38, 255, 0.35);
  --maxw: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.grad {
  background: linear-gradient(120deg, #c084fc 0%, #b026ff 45%, #e879f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===================== BACKGROUND ===================== */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(168,85,247,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,85,247,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: 0; pointer-events: none;
  border-radius: 50%; filter: blur(140px); opacity: 0.28;
}
.bg-glow--1 { width: 600px; height: 600px; background: #7c3aed; top: -220px; left: -180px; }
.bg-glow--2 { width: 500px; height: 500px; background: #b026ff; top: 45%; right: -240px; opacity: 0.18; }
#particles { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

/* ===================== LAYOUT HELPERS ===================== */
section { position: relative; z-index: 2; padding: 110px 24px; max-width: var(--maxw); margin: 0 auto; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-tag {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--purple-bright);
  padding: 6px 16px; border: 1px solid var(--glass-border); border-radius: 50px;
  background: var(--surface); margin-bottom: 18px;
}
.section-title { font-family: 'Orbitron', sans-serif; font-size: clamp(28px, 5vw, 46px); font-weight: 800; line-height: 1.15; }
.section-sub { color: var(--text-dim); font-size: 17px; margin-top: 14px; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 16px; padding: 14px 28px;
  border-radius: 50px; cursor: pointer; border: none;
  transition: transform .25s, box-shadow .25s, background .25s; white-space: nowrap;
}
.btn--sm { padding: 10px 20px; font-size: 14px; }
.btn--lg { padding: 17px 38px; font-size: 17px; }
.btn--primary {
  color: #fff;
  background: linear-gradient(120deg, var(--purple-deep), var(--purple-neon));
  box-shadow: 0 8px 30px rgba(176,38,255,0.45), inset 0 0 0 1px rgba(255,255,255,0.15);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(176,38,255,0.65); }
.btn--ghost {
  color: var(--text); background: var(--glass);
  border: 1px solid var(--glass-border); backdrop-filter: blur(12px);
}
.btn--ghost:hover { transform: translateY(-3px); border-color: var(--purple-bright); box-shadow: var(--shadow-neon); }

/* ===================== NAV ===================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7,6,13,0.72); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}
.nav__inner { max-width: var(--maxw); margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; gap: 24px; }
.nav__logo { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.nav__logo-img {
  width: 42px; height: 42px; object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(176,38,255,0.45));
}
.nav__logo-text { font-family: 'Orbitron'; font-size: 15px; line-height: 1.15; letter-spacing: 0.3px; max-width: 150px; }
.nav__logo-text span { color: var(--purple-bright); }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { color: var(--text-dim); font-weight: 600; font-size: 15px; transition: color .2s; position: relative; }
.nav__links a:hover { color: var(--text); }
.nav__links a::after { content:''; position:absolute; left:0; bottom:-6px; width:0; height:2px; background: var(--purple-neon); transition: width .25s; box-shadow: var(--shadow-neon); }
.nav__links a:hover::after { width: 100%; }
.nav__cta { margin-left: 4px; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ===================== HERO ===================== */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-top: 120px; max-width: 100%; overflow: hidden;
}
.hero__bg-characters { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55; }
.hero__char {
  position: absolute; bottom: -40px; width: 360px; height: 560px; filter: blur(1px);
  background-repeat: no-repeat; background-size: contain; background-position: bottom;
  mix-blend-mode: screen; opacity: 0.5;
}
.hero__char--left {
  left: -60px;
  background:
    radial-gradient(ellipse 50% 70% at 50% 80%, rgba(124,58,237,0.5), transparent 70%);
  animation: floaty 7s ease-in-out infinite;
}
.hero__char--right {
  right: -60px;
  background:
    radial-gradient(ellipse 50% 70% at 50% 80%, rgba(176,38,255,0.45), transparent 70%);
  animation: floaty 8s ease-in-out infinite reverse;
}
@keyframes floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-26px);} }

.hero__inner { position: relative; z-index: 3; max-width: 880px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600;
  padding: 8px 18px; border-radius: 50px; margin-bottom: 28px; color: var(--purple-bright);
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(12px);
}
.hero__badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px #34d399; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:.35; } }

.hero__title {
  font-family: 'Orbitron', sans-serif; font-weight: 900;
  font-size: clamp(36px, 8vw, 76px); line-height: 1.08; letter-spacing: -1px;
  text-shadow: 0 0 60px rgba(176,38,255,0.3);
}
.hero__subtitle { font-size: clamp(17px, 2.4vw, 22px); color: var(--text-dim); margin: 26px auto 38px; max-width: 620px; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero__ministats { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 56px; flex-wrap: wrap; }
.hero__ministat { text-align: center; }
.hero__ministat b { display: block; font-family: 'Orbitron'; font-size: 30px; color: #fff; }
.hero__ministat span { font-size: 13px; color: var(--text-dim); }
.hero__ministat-divider { width: 1px; height: 38px; background: var(--glass-border); }

.hero__scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); width: 26px; height: 44px; border: 2px solid var(--glass-border); border-radius: 20px; z-index: 3; }
.hero__scroll span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 5px; height: 9px; border-radius: 4px; background: var(--purple-bright); animation: scrolldot 1.6s infinite; }
@keyframes scrolldot { 0%{ opacity:0; top:8px;} 40%{ opacity:1;} 80%{ opacity:0; top:24px;} 100%{opacity:0;} }

/* ===================== GALLERY ===================== */
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 18px; }
.gallery__item {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  border: 1px solid var(--glass-border); cursor: pointer;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; filter: saturate(1.15) hue-rotate(-8deg); }
.gallery__item::after { content:''; position:absolute; inset:0; background: linear-gradient(180deg, transparent 40%, rgba(124,58,237,0.45)); mix-blend-mode: screen; }
.gallery__item:hover img { transform: scale(1.08); }

/* ===================== CARDS / ADVANTAGES ===================== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; padding: 34px 28px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px); overflow: hidden; transition: transform .35s, border-color .35s, box-shadow .35s;
}
.card::before {
  content:''; position:absolute; inset:0; border-radius: var(--radius); padding:1px;
  background: linear-gradient(140deg, rgba(176,38,255,0.6), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s;
}
.card:hover { transform: translateY(-8px); border-color: transparent; box-shadow: 0 20px 50px rgba(124,58,237,0.25); }
.card:hover::before { opacity: 1; }
.card__icon {
  width: 60px; height: 60px; display: grid; place-items: center; font-size: 28px; margin-bottom: 20px;
  border-radius: 16px; background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(176,38,255,0.12));
  border: 1px solid var(--glass-border); box-shadow: inset 0 0 20px rgba(176,38,255,0.2);
}
.card h3 { font-size: 21px; font-weight: 700; margin-bottom: 10px; font-family: 'Orbitron'; letter-spacing: 0.3px; }
.card p { color: var(--text-dim); font-size: 15px; }

/* ===================== REQUIREMENTS ===================== */
.requirements__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.requirements__text .section-tag, .requirements__text .section-title { text-align: left; }
.requirements__text .section-sub { margin: 16px 0 28px; }
.req-list { display: grid; gap: 14px; }
.req-list li {
  display: flex; align-items: center; gap: 16px; font-size: 17px; font-weight: 600;
  padding: 18px 22px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(12px);
  transition: transform .25s, border-color .25s;
}
.req-list li:hover { transform: translateX(8px); border-color: var(--purple-bright); }
.req-list__check {
  flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-neon)); color: #fff;
  font-weight: 800; box-shadow: var(--shadow-neon);
}

/* ===================== TIMELINE / PATH ===================== */
.timeline { position: relative; max-width: 820px; margin: 0 auto; }
.timeline__line {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%);
  background: rgba(168,85,247,0.15); border-radius: 3px;
}
.timeline__progress { position: absolute; top: 0; left: 0; width: 100%; height: 0; border-radius: 3px;
  background: linear-gradient(180deg, var(--purple-bright), var(--purple-neon));
  box-shadow: 0 0 16px var(--purple-neon); transition: height .15s linear; }
.timeline__step { position: relative; width: 50%; padding: 22px 44px; }
.timeline__step:nth-child(odd) { left: 0; text-align: right; }
.timeline__step:nth-child(even) { left: 50%; text-align: left; }
.timeline__node {
  position: absolute; top: 34px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--purple-neon); box-shadow: var(--shadow-neon); z-index: 2;
  transition: transform .3s, background .3s;
}
.timeline__step:nth-child(odd) .timeline__node { right: -10px; }
.timeline__step:nth-child(even) .timeline__node { left: -10px; }
.timeline__step.in-view .timeline__node { background: var(--purple-neon); transform: scale(1.25); }
.timeline__card {
  display: inline-block; text-align: left; padding: 22px 26px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(14px);
  transition: transform .3s, box-shadow .3s; max-width: 320px;
}
.timeline__card:hover { transform: scale(1.03); box-shadow: 0 16px 40px rgba(124,58,237,0.3); }
.timeline__num { font-family: 'Orbitron'; font-size: 13px; font-weight: 800; color: var(--purple-bright); letter-spacing: 2px; }
.timeline__card h3 { font-size: 20px; margin: 6px 0 8px; font-family: 'Orbitron'; }
.timeline__card p { color: var(--text-dim); font-size: 14px; }
.timeline__card--final { background: linear-gradient(140deg, rgba(124,58,237,0.35), rgba(176,38,255,0.18)); border-color: var(--purple-bright); box-shadow: var(--shadow-neon); }

/* ===================== STATS ===================== */
.stats { padding-top: 40px; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 22px;
  padding: 44px 30px; border-radius: 28px;
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(14px);
  box-shadow: 0 0 60px rgba(124,58,237,0.12) inset;
}
.stat { text-align: center; }
.stat__num { display: block; font-family: 'Orbitron'; font-size: clamp(34px, 5vw, 52px); font-weight: 800; color: #fff; text-shadow: 0 0 30px rgba(176,38,255,0.5); }
.stat__label { color: var(--text-dim); font-size: 15px; font-weight: 600; }

/* ===================== WHY (Зачем становиться АП) ===================== */
.why__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.why__item {
  grid-column: span 1; display: flex; gap: 18px; align-items: flex-start;
  padding: 28px 26px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(12px);
  transition: transform .3s, border-color .3s;
}
.why__item--wide { grid-column: span 2; }
.why__item:hover { transform: translateY(-6px); border-color: var(--purple-bright); }
.why__ico {
  flex-shrink: 0; width: 52px; height: 52px; display: grid; place-items: center; font-size: 26px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(124,58,237,0.22), rgba(176,38,255,0.1)); border: 1px solid var(--glass-border);
}
.why__item h3 { font-family: 'Orbitron'; font-size: 19px; margin-bottom: 8px; }
.why__item p { color: var(--text-dim); font-size: 15px; }

.why__cta {
  margin-top: 40px; display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap;
  text-align: center; padding: 30px; border-radius: var(--radius);
  background: linear-gradient(140deg, rgba(124,58,237,0.12), rgba(20,14,34,0.5));
  border: 1px solid var(--glass-border);
}
.why__cta span { font-family: 'Orbitron'; font-size: clamp(16px, 2.4vw, 22px); font-weight: 700; }

/* ===================== CTA ===================== */
.cta__card {
  position: relative; text-align: center; padding: 64px 40px; border-radius: 32px; overflow: hidden;
  background: linear-gradient(150deg, rgba(20,14,34,0.8), rgba(124,58,237,0.12));
  border: 1px solid var(--purple-bright); box-shadow: 0 0 80px rgba(176,38,255,0.25);
}
.cta__glow { position: absolute; width: 500px; height: 500px; border-radius: 50%; background: var(--purple-neon); filter: blur(140px); opacity: 0.3; top: -200px; left: 50%; transform: translateX(-50%); }
.cta__title { position: relative; font-family: 'Orbitron'; font-size: clamp(26px, 4.5vw, 42px); font-weight: 800; }
.cta__sub { position: relative; color: var(--text-dim); font-size: 18px; max-width: 560px; margin: 18px auto 34px; }
.cta__actions { position: relative; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta__note { position: relative; margin-top: 22px; font-size: 14px; color: var(--text-dim); }

/* ===================== FOOTER ===================== */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--glass-border); padding: 50px 24px 30px; background: var(--bg-2); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer__brand p { color: var(--text-dim); margin-top: 14px; max-width: 300px; }
.footer__nav { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.footer__nav a { color: var(--text-dim); font-weight: 600; transition: color .2s; }
.footer__nav a:hover { color: var(--purple-bright); }
.footer__bottom { max-width: var(--maxw); margin: 34px auto 0; padding-top: 22px; border-top: 1px solid rgba(168,85,247,0.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-dim); font-size: 14px; }

/* ===================== REVEAL ANIMATION ===================== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in-view { opacity: 1; transform: none; }
.cards .reveal:nth-child(2), .why__grid .reveal:nth-child(2) { transition-delay: .08s; }
.cards .reveal:nth-child(3) { transition-delay: .16s; }
.cards .reveal:nth-child(4) { transition-delay: .24s; }
.cards .reveal:nth-child(5) { transition-delay: .32s; }
.cards .reveal:nth-child(6) { transition-delay: .40s; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2,1fr); }
  .requirements__inner { grid-template-columns: 1fr; gap: 36px; }
  .stats__grid { grid-template-columns: repeat(2,1fr); gap: 30px; }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
  .why__item--wide { grid-column: span 2; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; margin-left: auto; }
  .nav__links.open {
    display: flex; flex-direction: column; position: absolute; top: 70px; right: 16px; left: 16px;
    padding: 20px; gap: 18px; border-radius: 18px;
    background: rgba(7,6,13,0.95); backdrop-filter: blur(20px); border: 1px solid var(--glass-border);
  }
  /* Timeline → single column */
  .timeline__line { left: 22px; }
  .timeline__step, .timeline__step:nth-child(even) { width: 100%; left: 0; text-align: left; padding-left: 56px; padding-right: 0; }
  .timeline__step:nth-child(odd) { text-align: left; }
  .timeline__step:nth-child(odd) .timeline__node,
  .timeline__step:nth-child(even) .timeline__node { left: 12px; right: auto; }
}
@media (max-width: 540px) {
  section { padding: 80px 18px; }
  .cards { grid-template-columns: 1fr; }
  .hero__ministats { gap: 16px; }
  .hero__ministat-divider { display: none; }
  .footer__inner, .footer__bottom { flex-direction: column; }
  .why__grid { grid-template-columns: 1fr; }
  .why__item, .why__item--wide { grid-column: span 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
