:root {
  --bg: #ffffff;
  --bg-alt: #f7f7fb;
  --text: #1a1a2e;
  --muted: #5b5b73;
  --border: #ececf5;
  --primary: #615ced;
  --primary-2: #a855f7;
  --grad: linear-gradient(135deg, #615ced 0%, #a855f7 100%);
  --shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.06), 0 1px 2px rgba(26, 26, 46, 0.04);
  --shadow: 0 8px 24px rgba(97, 92, 237, 0.10);
  --shadow-lg: 0 20px 48px rgba(97, 92, 237, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-2); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

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

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { color: var(--muted); }
.narrow p { margin-bottom: 16px; font-size: 1.06rem; }
.narrow p:last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: .98rem; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: #fff; }
.btn-primary:active { transform: translateY(0); }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-dot {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav-desktop { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 500;
  font-family: inherit; font-size: .96rem; background: none; border: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--bg-alt); }
.chev { width: 16px; height: 16px; transition: transform .2s; }

.nav-item.has-dd { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 8px; display: none; flex-direction: column;
}
.dropdown a { padding: 10px 12px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: .94rem; }
.dropdown a:hover { background: var(--bg-alt); color: var(--primary); }
.has-dd.open .dropdown { display: flex; }
.has-dd.open .chev { transform: rotate(180deg); }

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

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

.nav-mobile { display: none; flex-direction: column; gap: 2px; padding: 12px 20px 20px; border-top: 1px solid var(--border); background: #fff; }
.nav-mobile a, .nav-mobile summary {
  padding: 12px 8px; color: var(--text); font-weight: 500; border-radius: 8px; cursor: pointer; list-style: none;
}
.nav-mobile a:hover, .nav-mobile summary:hover { background: var(--bg-alt); }
.nav-mobile details summary::-webkit-details-marker { display: none; }
.nav-mobile .m-sub { display: flex; flex-direction: column; padding-left: 14px; }
.nav-mobile .m-sub a { font-size: .94rem; color: var(--muted); }
.nav-mobile .btn { margin-top: 10px; }
body.menu-open .nav-mobile { display: flex; }
body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 60% at 20% 0%, rgba(97, 92, 237, 0.10), transparent 70%),
    radial-gradient(50% 50% at 90% 10%, rgba(168, 85, 247, 0.12), transparent 70%),
    var(--bg-alt);
  padding: 72px 0 64px;
}
.hero-inner { text-align: center; max-width: 820px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 600; color: var(--primary);
  background: rgba(97, 92, 237, 0.08); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow svg { width: 15px; height: 15px; }
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--muted); margin: 18px auto 30px; max-width: 640px; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-top: 26px; }
.hero-badges span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; font-weight: 500; }
.hero-badges svg { width: 18px; height: 18px; color: var(--primary); }

/* ---------- Chat card ---------- */
.chat-card {
  max-width: 620px; margin: 0 auto; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 16px;
}
.chat-form { display: flex; flex-direction: column; gap: 12px; }
.chat-form textarea {
  width: 100%; resize: vertical; min-height: 88px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; font-family: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg-alt); transition: border-color .2s, box-shadow .2s;
}
.chat-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(97, 92, 237, 0.15); background: #fff; }
.chat-form textarea::placeholder { color: #9a9ab0; }
.btn-send { align-self: flex-end; }
.chat-hint { text-align: center; font-size: .82rem; color: #9a9ab0; margin-top: 12px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 32px; max-width: 640px; }
.section h2 { }
.section-more { margin-top: 28px; font-weight: 600; }

.page-hero {
  background:
    radial-gradient(60% 80% at 15% 0%, rgba(97, 92, 237, 0.08), transparent 70%),
    var(--bg-alt);
  padding: 56px 0 48px;
}
.page-hero h1 { margin-bottom: 10px; }
.page-hero .eyebrow { margin-bottom: 16px; }
.page-hero .chat-card { margin-top: 28px; }

/* ---------- Cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .25s, border-color .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(97, 92, 237, 0.25); }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 16px;
  background: rgba(97, 92, 237, 0.10); color: var(--primary);
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .96rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm); position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff;
  font-weight: 700; margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { font-size: .94rem; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.popular { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.badge-popular {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: .78rem; font-weight: 600;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
.price { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; }
.price span { font-size: .95rem; font-weight: 500; color: var(--muted); }
.price-tokens { font-weight: 600; color: var(--primary); margin: 4px 0 6px; }
.price-note { font-size: .92rem; margin-bottom: 18px; }
.price-list { list-style: none; margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .93rem; color: var(--text); }
.price-list svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table.compare { width: 100%; border-collapse: collapse; min-width: 560px; }
table.compare th, table.compare td { padding: 14px 18px; text-align: center; border-bottom: 1px solid var(--border); font-size: .95rem; }
table.compare thead th { background: var(--bg-alt); font-weight: 700; color: var(--text); position: relative; }
table.compare tbody th { text-align: left; font-weight: 500; color: var(--text); }
table.compare tbody tr:last-child td, table.compare tbody tr:last-child th { border-bottom: none; }
table.compare td.yes svg { width: 20px; height: 20px; color: var(--primary); }
.th-badge { display: block; font-size: .7rem; font-weight: 600; color: var(--primary); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary {
  padding: 18px 20px; font-weight: 600; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 20px 18px; }
.faq-a p { font-size: .96rem; }

/* ---------- CTA ---------- */
.cta-section { padding: 72px 0; }
.cta-inner {
  text-align: center; background: var(--grad); border-radius: 24px;
  padding: 56px 32px; color: #fff; box-shadow: var(--shadow-lg);
}
.cta-inner h2 { color: #fff; }
.cta-inner p { color: rgba(255, 255, 255, 0.9); max-width: 560px; margin: 12px auto 28px; font-size: 1.08rem; }
.cta-inner .btn-primary { background: #fff; color: var(--primary); }
.cta-inner .btn-primary:hover { color: var(--primary-2); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding-top: 20px; padding-bottom: 4px; font-size: .88rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 8px; color: #c4c4d4; }
.breadcrumbs span[aria-current] { color: var(--text); font-weight: 500; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-mail { font-size: 1.3rem; font-weight: 700; margin: 12px 0; }
.contact-mail a { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact-info p { margin-bottom: 14px; }
.contact-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.contact-form label { display: block; font-size: .9rem; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.contact-form input, .contact-form textarea {
  width: 100%; margin-top: 6px; padding: 12px 14px; font-family: inherit; font-size: .98rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-alt); color: var(--text);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(97, 92, 237, 0.15); background: #fff; }
.form-note { margin-top: 14px; font-size: .9rem; color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer { background: #12121f; color: #cfcfe0; padding: 56px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand .logo { color: #fff; }
.footer-brand p { color: #9a9ab8; font-size: .92rem; margin-top: 14px; max-width: 320px; }
.footer-mail a { color: #fff; font-weight: 600; }
.footer-col h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: #7a7a98; margin-bottom: 14px; }
.footer-col a { display: block; color: #cfcfe0; font-size: .93rem; padding: 5px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 22px; font-size: .84rem; color: #7a7a98; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .nav-desktop { display: none; }
  .burger { display: flex; }
  .header-actions .btn-primary { display: none; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 44px; }
  .section { padding: 48px 0; }
  .cta-inner { padding: 40px 20px; }
}
