:root {
  --bg: #070b16;
  --bg-soft: #0f1730;
  --card: rgba(17, 24, 47, 0.78);
  --card-border: rgba(131, 149, 255, 0.2);
  --text: #eff3ff;
  --text-muted: #b8c2e2;
  --accent: #6da8ff;
  --accent-strong: #7f7cff;
  --btn-primary-text: #ffffff;
  --badge-text: #d7e2ff;
  --badge-bg: rgba(109, 168, 255, 0.16);
  --badge-border: rgba(109, 168, 255, 0.3);
  --grid-line: rgba(255, 255, 255, 0.045);
  --good: #48d597;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1120px;
}

[data-theme="light"] {
  --bg: #f4f7ff;
  --bg-soft: #e9efff;
  --card: rgba(255, 255, 255, 0.84);
  --card-border: rgba(46, 91, 255, 0.18);
  --text: #0d1630;
  --text-muted: #526083;
  --accent: #1e5eff;
  --accent-strong: #5647f8;
  --btn-primary-text: #f7f9ff;
  --badge-text: #10306e;
  --badge-bg: rgba(56, 115, 255, 0.13);
  --badge-border: rgba(44, 88, 228, 0.26);
  --grid-line: rgba(22, 46, 108, 0.09);
  --good: #008d5e;
  --shadow: 0 14px 30px rgba(17, 33, 74, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI Variable", "Segoe UI", "SF Pro Display", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 5%, rgba(76, 101, 255, 0.24), transparent 32%),
    radial-gradient(circle at 12% 0%, rgba(45, 191, 203, 0.18), transparent 30%),
    var(--bg);
  line-height: 1.55;
  max-width: 100%;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% -15%, #000 18%, transparent 70%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.81rem;
  color: var(--badge-text);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 650;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(110deg, var(--accent), var(--accent-strong));
  color: var(--btn-primary-text);
  box-shadow: 0 8px 22px rgba(76, 110, 255, 0.35);
}

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

.btn-link {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 24;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 76%, transparent);
  border-bottom: 1px solid var(--card-border);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 730;
  letter-spacing: 0.01em;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #44d0f2);
  box-shadow: 0 8px 18px rgba(83, 121, 255, 0.4);
}

.nav-toggle {
  display: none;
}

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

.main-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.94rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

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

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.hero {
  padding: 76px 0 34px;
}

.hero-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

.hero-grid > * {
  min-width: 0;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.08;
  margin: 14px 0 14px;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  max-width: 65ch;
  color: var(--text-muted);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-points {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
}

.hero-points li {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-points li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
}

.preview-card {
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}

.preview-card h3 {
  margin: 0 0 12px;
  font-size: 1.04rem;
}

.chat-mock {
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: color-mix(in oklab, var(--bg-soft) 72%, transparent);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-mock__top {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
}

.chat-mock__top strong {
  font-size: 0.88rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-mock__top span {
  font-size: 0.75rem;
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.domain-demo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-height: 100%;
  max-height: 260px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklab, var(--accent) 68%, #90adff) rgba(255, 255, 255, 0.06);
  overscroll-behavior: contain;
}

.domain-demo::-webkit-scrollbar {
  width: 8px;
}

.domain-demo::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.domain-demo::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.chat-line {
  border-radius: 12px;
  max-width: 92%;
  padding: 10px 12px;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  animation: chatIn 0.8s both;
}

.chat-line.bot {
  margin-right: auto;
}

.chat-line.user {
  margin-left: auto;
  background: rgba(102, 142, 255, 0.15);
}

.chat-line.typing {
  opacity: 0.88;
}

.demo-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--card-border);
  background: color-mix(in oklab, var(--bg-soft) 82%, #2f4f78 18%);
  min-width: 0;
}

.demo-chip {
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 8px;
  min-height: 34px;
  padding: 6px 6px;
  font-size: 0.74rem;
  line-height: 1.15;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.2s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-chip:hover,
.demo-chip:focus-visible {
  transform: translateY(-1px);
}

.demo-chip.active {
  background: color-mix(in oklab, var(--accent) 78%, #3a5f8f 22%);
  color: #fff;
  border-color: transparent;
}

.chat-mock__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
}

.chat-mock__bottom .btn {
  min-height: 38px;
  padding-inline: 14px;
}

.chat-line:nth-child(1) {
  animation-delay: 0.05s;
}

.chat-line:nth-child(2) {
  animation-delay: 0.3s;
}

.chat-line:nth-child(3) {
  animation-delay: 0.54s;
}

.chat-line:nth-child(4) {
  animation-delay: 0.8s;
}

.chat-line:nth-child(5) {
  animation-delay: 1s;
}

@keyframes chatIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: 38px 0;
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3.5vw, 2.15rem);
  letter-spacing: -0.02em;
}

.section-head {
  margin-bottom: 22px;
  max-width: 68ch;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

.card {
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0;
  font-size: 1.03rem;
}

.card p,
.card li {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.card ul {
  margin: 10px 0 0;
  padding-left: 17px;
}

.kpi {
  font-size: 1.25rem;
  font-weight: 700;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.steps li {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--card);
}

.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  font-size: 0.8rem;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 8px;
}

.table-wrap {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: auto;
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(139, 155, 220, 0.2);
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.price {
  color: var(--text);
  font-weight: 640;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card);
}

.faq-question {
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 0;
  cursor: pointer;
  text-align: left;
  padding: 14px 16px;
  font-size: 0.97rem;
  font-weight: 620;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.faq-question::after {
  content: "+";
  color: var(--accent);
  font-size: 1.2rem;
}

.faq-item.open .faq-question::after {
  content: "-";
}

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

.faq-answer p {
  margin: 0;
  color: var(--text-muted);
  padding: 0 16px 14px;
}

.breadcrumbs {
  margin: 22px 0 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

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

.page-hero {
  padding: 28px 0 18px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.inline-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 30px 0 84px;
  margin-top: 34px;
}

.footer-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
}

.footer-title {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

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

.footer-list a:hover {
  color: var(--text);
}

.page-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card);
  padding: 18px;
  box-shadow: var(--shadow);
}

.code {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(154, 170, 245, 0.35);
  border-radius: var(--radius-sm);
  padding: 14px;
  overflow: auto;
}

.copy-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.copy-row input {
  flex: 1;
  min-width: 220px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.sticky-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  display: none;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid,
  .grid.cols-3,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid .preview-card {
    order: -1;
  }

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

  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px;
    background: color-mix(in oklab, var(--bg) 90%, transparent);
    border-bottom: 1px solid var(--card-border);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
}

@media (max-width: 720px) {
  .hero {
    padding-top: 48px;
  }

  .grid.cols-2,
  .steps,
  .hero-points {
    grid-template-columns: 1fr;
  }

  .header-actions .btn-primary {
    display: none;
  }

  .preview-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .chat-mock {
    border-radius: 18px;
  }

  .chat-mock__bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-mock__bottom .btn {
    width: 100%;
  }

  .domain-demo {
    min-height: 224px;
    max-height: 268px;
  }

  .chat-mock__top {
    padding: 9px 10px;
    gap: 8px;
  }

  .chat-mock__top .muted {
    display: none;
  }

  .demo-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 9px 9px 10px;
  }

  .demo-chip {
    font-size: 0.71rem;
    min-height: 32px;
    padding: 5px 5px;
  }

  .sticky-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
