/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a0f;
  --bg2:       #0f0f1a;
  --bg3:       #141428;
  --surface:   #1a1a2e;
  --surface2:  #22223a;
  --border:    rgba(255,255,255,.08);
  --text:      #e8e8f0;
  --muted:     #7878a0;
  --accent:    #7c5af6;
  --accent2:   #5b8af6;
  --success:   #22d3a0;
  --radius:    12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
  white-space: nowrap;
}

.btn--sm  { padding: 8px 18px; font-size: 14px; }
.btn--lg  { padding: 14px 32px; font-size: 16px; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 24px rgba(124,90,246,.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(124,90,246,.45); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.04); }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  width: 100%;
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

.btn--tg {
  background: #229ED9;
  color: #fff;
}
.btn--tg:hover { background: #1c8bc0; transform: translateY(-1px); }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled {
  background: rgba(10,10,15,.85);
  border-bottom-color: var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}
.nav__logo span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo__mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s;
}
.nav__links a:hover { color: var(--text); }
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
  text-align: center;
}
.hero__inner { position: relative; z-index: 1; }
.hero__glow {
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(124,90,246,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(124,90,246,.4);
  background: rgba(124,90,246,.1);
  color: #a78bf6;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.hero__sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat__num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat__label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Sections ── */
.section {
  padding: 90px 0;
}
.section--dark { background: var(--bg2); }
.section__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  text-align: center;
  letter-spacing: -.5px;
  margin-bottom: 12px;
}
.section__sub {
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  max-width: 540px;
  margin: 0 auto 56px;
}

/* ── Cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.cards--4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .cards--4 { grid-template-columns: 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(124,90,246,.4); transform: translateY(-3px); }
.card--accent { border-color: rgba(124,90,246,.3); background: linear-gradient(135deg, rgba(124,90,246,.1), rgba(91,138,246,.05)); }
.card__icon { font-size: 28px; margin-bottom: 14px; }
.card__title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.card__text { font-size: 14px; color: var(--muted); margin-bottom: 16px; line-height: 1.6; }
.card__list { display: flex; flex-direction: column; gap: 6px; }
.card__list li {
  font-size: 13px;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}
.card__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
}

/* ── Platforms ── */
.platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.platform {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color .2s;
}
.platform:hover { border-color: rgba(124,90,246,.5); }
.platform__icon {
  width: 20px; height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Steps ── */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 220px;
  max-width: 280px;
  text-align: center;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step__num {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.step__title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.step__text { font-size: 14px; color: var(--muted); line-height: 1.6; }
.step__arrow {
  font-size: 24px;
  color: var(--muted);
  align-self: center;
  padding: 0 4px;
  flex-shrink: 0;
}

/* ── Case ── */
.case {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.case__title { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.case__desc { font-size: 15px; color: var(--muted); margin-bottom: 24px; line-height: 1.65; }
.case__features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.case__features li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.check { color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ── Mockup ── */
.case__visual {
  position: relative;
  min-height: 480px;
}
.mockup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.mockup--chat {
  position: relative;
  z-index: 2;
  max-width: 380px;
  transform: rotate(-2deg);
}
.mockup--admin {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 90%;
  z-index: 1;
  transform: translate(0, 24px) rotate(3deg);
  box-shadow: 0 32px 80px rgba(0,0,0,.55);
}

/* ── Admin panel ── */
.admin {
  display: grid;
  grid-template-columns: 130px 1fr;
  min-height: 240px;
  font-size: 12px;
}
.admin__side {
  background: var(--bg2);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--border);
}
.admin__brand {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.admin__link {
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  cursor: default;
}
.admin__link--active {
  background: rgba(124,90,246,.18);
  color: #c4b3ff;
  font-weight: 600;
}
.admin__main {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.admin__row {
  display: grid;
  grid-template-columns: 1.4fr .6fr 1fr;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg2);
  border-radius: 6px;
  color: var(--text);
}
.admin__row span:nth-child(2),
.admin__row span:nth-child(3) { color: var(--muted); }
.admin__row--head {
  background: transparent;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.admin__row--head span { color: var(--muted) !important; }

/* ── Typing indicator ── */
.msg.typing .msg__bubble {
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: bounce 1.2s infinite ease-in-out;
}
.dot:nth-child(2) { animation-delay: .15s; }
.dot:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.mockup__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.mockup__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.mockup__dot:nth-child(1) { background: #ff5f56; }
.mockup__dot:nth-child(2) { background: #febc2e; }
.mockup__dot:nth-child(3) { background: #28c840; }
.mockup__title {
  font-size: 13px;
  color: var(--muted);
  margin-left: 8px;
  font-weight: 500;
}
.mockup__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg { display: flex; }
.msg--in { justify-content: flex-start; }
.msg--out { justify-content: flex-end; }
.msg__bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}
.msg--in .msg__bubble {
  background: var(--surface2);
  border-radius: 4px 14px 14px 14px;
}
.msg--out .msg__bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-radius: 14px 4px 14px 14px;
}

/* ── Pricing ── */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.plan .btn { margin-top: auto; }
.plan:hover { border-color: rgba(124,90,246,.4); transform: translateY(-3px); }
.plan--featured {
  border-color: rgba(124,90,246,.5);
  background: linear-gradient(180deg, rgba(124,90,246,.12) 0%, var(--surface) 100%);
  transform: translateY(-8px);
}
.plan--featured:hover { transform: translateY(-11px); }
.plan__badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan__name { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.plan__price { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.plan__price span { font-size: 26px; font-weight: 800; color: var(--text); }
.plan__time { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.plan__list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.plan__list li {
  font-size: 14px;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}
.plan__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 12px;
}

/* ── FAQ ── */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}
.faq__item.open { border-color: rgba(124,90,246,.4); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .2s;
}
.faq__q:hover { background: rgba(255,255,255,.02); }
.faq__arrow {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .25s, color .25s;
}
.faq__item.open .faq__arrow {
  transform: rotate(45deg);
  color: var(--accent);
}
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq__a p {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ── Contact form ── */
.contact { max-width: 680px; margin: 0 auto; }
.form__noscript {
  background: rgba(255,200,80,.08);
  border: 1px solid rgba(255,200,80,.25);
  color: #f0c674;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}
.form__noscript a { color: #f0c674; text-decoration: underline; }
.form { display: flex; flex-direction: column; gap: 20px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__group { display: flex; flex-direction: column; gap: 8px; }
.form__label { font-size: 13px; font-weight: 500; color: var(--muted); }
.form__input {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  width: 100%;
}
.form__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,90,246,.15);
}
.form__input::placeholder { color: var(--muted); }
.form__select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%237878a0' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.form__textarea { resize: vertical; min-height: 120px; }
.form__submit { position: relative; }
.btn__loader {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
.form--loading .btn__text { opacity: 0; }
.form--loading .btn__loader { display: block; }

.form__success {
  text-align: center;
  padding: 48px 32px;
  background: var(--surface);
  border: 1px solid rgba(34,211,160,.3);
  border-radius: var(--radius-lg);
}
.success__icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(34,211,160,.15);
  color: var(--success);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.form__success h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.form__success p { color: var(--muted); font-size: 15px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Legal page ── */
.legal { padding: 120px 0 80px; max-width: 760px; margin: 0 auto; }
.legal__back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
  transition: color .2s;
}
.legal__back:hover { color: var(--accent); }
.legal__title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 8px;
}
.legal__meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 36px;
}
.legal h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 12px;
}
.legal p, .legal ul {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.75;
}
.legal ul { padding-left: 24px; list-style: disc; }
.legal li { margin-bottom: 6px; }
.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(124,90,246,.3);
  text-underline-offset: 3px;
}
.legal a:hover { text-decoration-color: var(--accent); }
.legal strong { color: var(--text); }

/* ── Consent checkbox ── */
.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}
.form__consent input[type="checkbox"] {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: border-color .2s, background .2s;
  position: relative;
}
.form__consent input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.form__consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form__consent a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(124,90,246,.3);
  text-underline-offset: 2px;
}
.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Footer ── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
}
.footer__logo span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer__logo .logo__mark { width: 24px; height: 24px; }
.footer__copy { font-size: 13px; color: var(--muted); }
.footer__right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer__link {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}
.footer__link:hover { color: var(--accent); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0; bottom: 0;
    background: var(--bg);
    padding: 32px 24px;
    gap: 24px;
    border-top: 1px solid var(--border);
  }
  .nav__links.open a { font-size: 18px; color: var(--text); }
  .nav__burger { display: flex; }

  .hero { padding: 110px 0 70px; }
  .hero__cta { gap: 10px; }

  .steps { flex-direction: column; align-items: center; }
  .step__arrow { transform: rotate(90deg); }

  .case { grid-template-columns: 1fr; gap: 32px; }
  .case__visual { min-height: auto; display: flex; flex-direction: column; gap: 16px; }
  .mockup--chat { max-width: 100%; transform: none; }
  .mockup--admin { position: static; width: 100%; transform: none; }

  .pricing { grid-template-columns: 1fr; }
  .plan--featured { transform: none; }
  .plan--featured:hover { transform: translateY(-3px); }

  .form__row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero__stats { gap: 24px; }
  .cards { grid-template-columns: 1fr; }
}
