:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5fa;
  --text-muted: #a1a1b5;
  --text-dim: #6c6c80;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.16) 0%, rgba(236, 72, 153, 0.16) 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.25);
  --maxw: 1160px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(139, 92, 246, 0.18) 0%, transparent 60%),
    radial-gradient(50% 45% at 90% 10%, rgba(236, 72, 153, 0.14) 0%, transparent 55%),
    radial-gradient(70% 60% at 50% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

p {
  margin: 0 0 1.1em;
  color: var(--text-muted);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--gradient-soft);
  border: 1px solid var(--border-strong);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  color: #fff;
  background: transparent;
  line-height: 1;
}

.btn-primary {
  background: var(--gradient);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(236, 72, 153, 0.45);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
  color: #fff;
}

.btn-lg {
  padding: 16px 34px;
  font-size: 1.08rem;
}

.btn-block {
  width: 100%;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(10, 10, 15, 0.72);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.logo-mark svg {
  width: 20px;
  height: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.dropdown-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.dropdown-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: #fff;
  align-items: center;
  justify-content: center;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

/* Sections */
.section {
  padding: 90px 0;
}

.section-sm {
  padding: 60px 0;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head p {
  font-size: 1.1rem;
}

/* Hero */
.hero {
  padding: 80px 0 70px;
  text-align: center;
  position: relative;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 24px;
}

.hero .lede {
  font-size: 1.2rem;
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--text-muted);
}

/* Chat box */
.chat-box {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-glow);
  position: relative;
}

.chat-box textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1.08rem;
  line-height: 1.6;
  outline: none;
  padding: 6px;
}

.chat-box textarea::placeholder {
  color: var(--text-dim);
}

.chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.chat-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.hero-stats .stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
}

.hero-stats .stat span {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Grid + cards */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient-soft);
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--purple);
}

.card .icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  margin-bottom: 0;
  font-size: 0.97rem;
}

/* Media rows */
.media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.media-row.reverse .media-text {
  order: 2;
}

.media-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  position: relative;
}

.media-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.media-text h2 {
  margin-bottom: 16px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.check-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 14px;
  color: var(--text-muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.price-card.featured {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    var(--gradient) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow-glow);
}

.price-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
}

.price-card h3 {
  margin-bottom: 6px;
}

.price-amount {
  font-size: 2.6rem;
  font-weight: 800;
  margin: 10px 0 2px;
}

.price-tokens {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 22px;
}

.price-card .check-list {
  margin-top: 0;
  margin-bottom: 28px;
  flex-grow: 1;
}

/* Version list / breadcrumbs */
.breadcrumbs {
  padding: 22px 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: var(--text-dim);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: #fff;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid var(--border-strong);
  color: var(--purple);
}

/* FAQ accordion */
.faq {
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  background: var(--bg-card);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--purple);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.is-open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.is-open .faq-answer {
  max-height: 400px;
}

.faq-answer p {
  padding: 0 24px 22px;
  margin: 0;
}

/* Steps */
.steps {
  counter-reset: step;
  display: grid;
  gap: 24px;
}

.step {
  display: flex;
  gap: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
}

.step-num {
  counter-increment: step;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
}

.step-num::before {
  content: counter(step);
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  margin-bottom: 0;
}

/* CTA band */
.cta-band {
  text-align: center;
  background: var(--gradient-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 60px 30px;
}

.cta-band h2 {
  margin-bottom: 14px;
}

.cta-band p {
  max-width: 520px;
  margin: 0 auto 28px;
  font-size: 1.08rem;
}

/* Prose (content pages) */
.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 44px;
}

.prose h3 {
  margin-top: 32px;
}

.prose ul {
  padding-left: 22px;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 8px;
}

.prose a {
  color: var(--purple);
  font-weight: 500;
}

.prose a:hover {
  color: var(--pink);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.contact-card .icon {
  color: var(--purple);
  margin-bottom: 14px;
}

.contact-card h3 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.contact-card p {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: 40px;
  background: var(--bg-elevated);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  max-width: 300px;
  font-size: 0.95rem;
  margin-top: 16px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 11px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* Equalizer decoration */
.equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.equalizer span {
  width: 3px;
  background: var(--gradient);
  border-radius: 2px;
  animation: eq 1s ease-in-out infinite;
}

.equalizer span:nth-child(1) { height: 40%; animation-delay: 0s; }
.equalizer span:nth-child(2) { height: 100%; animation-delay: 0.2s; }
.equalizer span:nth-child(3) { height: 60%; animation-delay: 0.4s; }
.equalizer span:nth-child(4) { height: 85%; animation-delay: 0.1s; }

@keyframes eq {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .equalizer span { animation: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 900px) {
  .grid-3,
  .pricing-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .media-row { grid-template-columns: 1fr; gap: 32px; }
  .media-row.reverse .media-text { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .main-nav,
  .header-actions .btn-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    gap: 2px;
  }
  .main-nav.is-open a { padding: 12px 14px; }
  .section { padding: 64px 0; }
  .hero { padding: 50px 0; }
  .hero-stats { gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Keyboard focus visibility (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #c084fc;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Footer legal links */
.footer-legal a { color: var(--muted, #9ca3af); text-decoration: none; }
.footer-legal a:hover { color: #fff; }

/* Examples (жанры) grid */
.example-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.example-tag {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.example-tag:hover { border-color: rgba(139,92,246,0.5); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(139,92,246,0.15); }
.example-tag .icon { flex: none; width: 40px; height: 40px; }
.example-tag h3 { font-size: 1.05rem; margin: 0 0 2px; }
.example-tag p { margin: 0; font-size: .9rem; color: var(--muted, #9ca3af); }
@media (max-width: 860px) { .example-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .example-grid { grid-template-columns: 1fr; } }

/* Contact feedback form */
.contact-form { display: grid; gap: 16px; max-width: 640px; }
.contact-form .form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.contact-form label { display: block; font-size: .9rem; margin-bottom: 6px; color: var(--muted, #9ca3af); }
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font: inherit; font-size: .95rem;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: rgba(139,92,246,0.6); }
.form-status { font-size: .95rem; color: #34d399; min-height: 1.2em; }
@media (max-width: 560px) { .contact-form .form-row { grid-template-columns: 1fr; } }
