/* ============ БАЗА ============ */
:root {
  --bg: #070b16;
  --bg-soft: #0c1222;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e8edf7;
  --muted: #97a3bd;
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --amber: #fbbf24;
  --grad: linear-gradient(90deg, #818cf8, #a78bfa 45%, #22d3ee);
  --radius: 16px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; }

.container { width: min(1120px, 92vw); margin: 0 auto; }

.accent { color: var(--cyan); }

/* ============ ФОНОВЫЕ ПЛЯМКА ============ */
.bg-blobs {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(1200px 700px at 70% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
              radial-gradient(900px 600px at 10% 10%, rgba(34, 211, 238, 0.10), transparent 60%),
              var(--bg);
}
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; animation: drift 18s ease-in-out infinite alternate; }
.blob-1 { width: 520px; height: 520px; background: #4f46e5; top: -140px; right: -80px; }
.blob-2 { width: 420px; height: 420px; background: #0e7490; bottom: -120px; left: -100px; animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; background: #7c3aed; top: 42%; left: 58%; opacity: 0.25; animation-delay: -11s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, 30px, 0) scale(1.12); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(900px 500px at 50% 0%, black 30%, transparent 80%);
}

/* ============ НАВИГАЦИЯ ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(7, 11, 22, 0.9); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.nav__links { display: flex; gap: 26px; font-size: 0.92rem; color: var(--muted); }
.nav__links a { position: relative; transition: color 0.2s; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--grad); transition: width 0.25s ease; border-radius: 2px;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: 14px; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ КНОПКИ ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 13px 24px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s, border-color 0.18s;
}
.btn--primary {
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  color: #fff;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(99, 102, 241, 0.5); }
.btn--ghost { border-color: var(--line); color: var(--text); background: var(--panel); }
.btn--ghost:hover { border-color: rgba(255,255,255,0.28); transform: translateY(-2px); }
.btn--sm { padding: 9px 18px; font-size: 0.88rem; }
.btn--block { width: 100%; }

/* ============ HERO ============ */
.hero { padding: 96px 0 72px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 500;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); animation: pulseDot 2s infinite; }
@keyframes pulseDot { 0%,100% { box-shadow: 0 0 0 0 rgba(34,211,238,0.55);} 50% { box-shadow: 0 0 0 6px rgba(34,211,238,0);} }

.hero__title { font-size: clamp(2.5rem, 5.4vw, 4.1rem); font-weight: 700; margin: 22px 0 18px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%;
  animation: gradMove 6s ease infinite;
}
@keyframes gradMove { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero__lead { font-size: 1.12rem; color: var(--muted); max-width: 34rem; }
.hero__lead strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.hero__stats { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat__num, .stat__suffix { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat__suffix { display: inline; }
.stat__label { font-size: 0.8rem; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Визуал hero */
.hero__visual { position: relative; }
.orb-card {
  position: relative; border-radius: 22px; padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--line); overflow: hidden;
  animation: floatY 7s ease-in-out infinite;
}
@keyframes floatY { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-12px);} }
.orb {
  position: absolute; top: -70px; right: -70px; width: 240px; height: 240px; border-radius: 50%;
  background: conic-gradient(from 20deg, #6366f1, #22d3ee, #8b5cf6, #6366f1);
  filter: blur(46px); opacity: 0.75; animation: spinGlow 9s linear infinite;
}
@keyframes spinGlow { to { transform: rotate(360deg); } }
.orb-card__head {
  display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; position: relative;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #34d399; animation: pulseDot 1.8s infinite; }
.orb-card__log { position: relative; font-size: 0.9rem; }
.orb-card__log li { padding: 7px 0; border-bottom: 1px dashed rgba(255,255,255,0.07); color: var(--muted); }
.orb-card__log li:last-child { border-bottom: 0; }
.orb-card__log b { color: var(--cyan); font-weight: 600; margin-right: 6px; }
.orb-card__log li.ok { color: #34d399; }
.orb-card__log li.ok b { color: #34d399; }

/* ============ СЕКЦИИ ============ */
.section { padding: 84px 0; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.018) 20%, rgba(255,255,255,0.018) 80%, transparent); }
.section__head { max-width: 46rem; margin-bottom: 44px; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--cyan); margin-bottom: 14px;
}
.section__title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
.section__sub { color: var(--muted); margin-top: 14px; font-size: 1.02rem; }

/* Карточки */
.about-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform 0.25s ease, border-color 0.25s, background 0.25s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.22); background: var(--panel-2); }
.card__icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
}
.card__icon svg { width: 24px; height: 24px; }
.card__icon--violet { background: rgba(139, 92, 246, 0.14); color: var(--violet); }
.card__icon--cyan   { background: rgba(34, 211, 238, 0.12); color: var(--cyan); }
.card__icon--pink   { background: rgba(244, 114, 182, 0.12); color: var(--pink); }
.card__icon--amber  { background: rgba(251, 191, 36, 0.12); color: var(--amber); }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.93rem; }

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; counter-reset: step; }
.step {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; overflow: hidden; transition: transform 0.25s, border-color 0.25s;
}
.step:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.22); }
.step__num {
  font-family: var(--font-head); font-size: 2rem; font-weight: 700; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* Демо */
.demo {
  display: grid; grid-template-columns: 240px 1fr; gap: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px;
}
.demo__tasks { display: flex; flex-direction: column; gap: 10px; }
.task {
  text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 12px;
  color: var(--muted); padding: 13px 15px; font-size: 0.92rem; cursor: pointer; font-family: var(--font-body);
  transition: all 0.2s;
}
.task:hover { border-color: rgba(255,255,255,0.3); color: var(--text); }
.task.is-active { background: rgba(99, 102, 241, 0.16); border-color: var(--indigo); color: var(--text); }
.demo__panel { background: rgba(5, 8, 17, 0.65); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-height: 320px; display: flex; flex-direction: column; }
.demo__head { display: flex; align-items: center; gap: 9px; font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
.demo__log { flex: 1; font-size: 0.9rem; min-height: 200px; }
.demo__log li {
  padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,0.07); color: var(--muted);
  animation: logIn 0.35s ease;
}
@keyframes logIn { from { opacity: 0; transform: translateX(-8px);} to { opacity: 1; transform: none;} }
.demo__log li .t { color: var(--cyan); font-weight: 600; margin-right: 6px; font-size: 0.78rem; }
.demo__log li.done { color: #34d399; }
.demo__log li.thinking::after { content: "…"; animation: dots 1.2s infinite; display: inline-block; width: 1em; text-align: left; }
@keyframes dots { 0%,100% {opacity: 0.2;} 50% {opacity: 1;} }
.demo__hint { font-size: 0.8rem; color: var(--muted); margin: 10px 0 14px; }
.demo__run { align-self: flex-start; }

/* Программа */
.program { display: grid; gap: 14px; }
.program__item {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
  transition: transform 0.2s, border-color 0.2s;
}
.program__item:hover { transform: translateX(6px); border-color: rgba(255,255,255,0.22); }
.program__time {
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; color: var(--cyan);
  min-width: 56px; padding-top: 3px;
}
.program__item h3 { font-size: 1.05rem; margin-bottom: 5px; }
.program__item p { color: var(--muted); font-size: 0.9rem; }

/* Регистрация */
.register {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(34,211,238,0.08));
  border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 4vw, 52px);
}
.ticks { margin-top: 26px; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 0.95rem; }
.ticks svg { color: #34d399; flex-shrink: 0; }

.register__form { background: rgba(5, 8, 17, 0.6); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: grid; gap: 16px; }
.field label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.03); color: var(--text); font-family: var(--font-body); font-size: 0.95rem;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--indigo); }
.field select option { background: var(--bg-soft); color: var(--text); }
.field--err input { border-color: #f87171; }
.form__note { font-size: 0.8rem; color: var(--muted); text-align: center; }
.form__success {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.4);
  color: #34d399; border-radius: 10px; padding: 12px; font-size: 0.9rem; font-weight: 500;
  animation: logIn 0.4s ease;
}

/* Футер */
.footer { border-top: 1px solid var(--line); padding: 30px 0; margin-top: 40px; }
.footer__inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); }

/* ============ АНИМАЦИЯ ПОЯВЛЕНИЯ ============ */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ============ АДАПТИВ ============ */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 64px; }
  .hero__visual { order: -1; }
  .orb-card { padding: 22px; }
  .demo { grid-template-columns: 1fr; }
  .demo__tasks { flex-direction: row; flex-wrap: wrap; }
  .task { flex: 1 1 150px; text-align: center; }
  .register { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 4vw 18px;
    background: rgba(7, 11, 22, 0.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%); transition: transform 0.3s ease;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 1rem; }
  .nav__links a::after { display: none; }
  .nav__burger { display: flex; }
  .nav__actions .btn--sm { display: none; }
  .hero__stats { gap: 22px; }
  .program__item { flex-direction: column; gap: 8px; }
  .program__time { padding-top: 0; }
}
