* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #0f172a;
  background: #fff;
  line-height: 1.6;
}

.container {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1rem;
  border-radius: .7rem;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(15,23,42,.12);
  color: #0f172a;
  background: #fff;
  transition: transform .06s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-ghost { background: transparent; }
.btn-lg { padding: .9rem 1.2rem; font-size: 1.05rem; }
.btn-sm { padding: .45rem .7rem; font-size: .9rem; }

.site-header {
  top: 0;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15,23,42,.06);
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
}
.brand { display: flex; align-items: center; gap: .75rem; }
.brand-logo { width: 36px; height: 36px; border-radius: .5rem; object-fit: cover; }
.brand-text { display: flex; align-items: center; }
.brand-name { font-weight: 700; }
.brand-handle { color: #475569; font-size: .95rem; }
.nav { display: flex; gap: 1rem; align-items: center; }
.nav a { color: #0f172a; text-decoration: none; font-weight: 600; }

.hero { padding: 4rem 0 3rem; background: linear-gradient(180deg, rgba(14,165,233,.08), rgba(34,197,94,.05) 60%, #fff 100%); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.hero h1 { margin: 0 0 .5rem; font-size: clamp(1.8rem, 1.2rem + 2vw, 3rem); line-height: 1.15; }
.lead { color: #334155; font-size: 1.05rem; }
.cta { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }

.mockup {
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 1rem;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 10px 30px rgba(2,6,23,.08);
}
.chat-header { padding: .75rem 1rem; background: #e2e8f0; color: #0f172a; font-weight: 600; }
.chat-body { padding: 1rem; display: grid; gap: .5rem; }
.msg { max-width: 80%; padding: .6rem .8rem; border-radius: .8rem; font-size: .95rem; }
.msg-in { background: #fff; border: 1px solid rgba(15,23,42,.08); }
.msg-out { background: var(--primary); color: #fff; margin-left: auto; }
.chat-footer { padding: .6rem; background: #eef2f7; }
.kb { display: flex; gap: .5rem; flex-wrap: wrap; }
.kb span { background: #fff; border: 1px solid rgba(15,23,42,.12); padding: .4rem .6rem; border-radius: .6rem; font-size: .9rem; }

.features { padding: 3rem 0; }
.features h2, .faq h2 { margin: 0 0 1rem; font-size: 1.6rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feature-card {
  border: 1px solid rgba(15,23,42,.1);
  border-radius: .9rem;
  padding: 1rem;
  background: #fff;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: start;
  gap: .75rem;
}
.feature-icon { width: 36px; height: 36px; background: rgba(34,197,94,.12); color: #0f5132; display: grid; place-items: center; border-radius: .6rem; font-weight: 800; }
.feature-text { color: #0f172a; }

.faq { padding: 2.5rem 0 3rem; background: linear-gradient(180deg,#fff, #f8fafc); }
details { border: 1px solid rgba(15,23,42,.1); border-radius: .8rem; padding: .8rem 1rem; background: #fff; }
details + details { margin-top: .75rem; }
summary { cursor: pointer; font-weight: 600; }
summary::-webkit-details-marker { display: none; }

.pricing { padding: 3rem 0; background: linear-gradient(180deg,#fff,#f8fafc); }
.pricing-sub { color: #475569; margin-top: -.4rem; margin-bottom: 1.2rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.price-card { background: #fff; border: 1px solid rgba(15,23,42,.1); border-radius: 1rem; padding: 1rem; display: flex; flex-direction: column; gap: .8rem; }
.price-card.highlight { outline: 2px solid var(--primary); box-shadow: 0 10px 30px rgba(2,6,23,.08); }
.price-header { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.price-header h3 { margin: 0; font-size: 1.15rem; }
.badge { background: #8BC34A; color: #fff; padding: .25rem .5rem; border-radius: .5rem; font-weight: 700; font-size: .8rem; }
.price-value { font-size: 1.6rem; font-weight: 800; }
.price-features { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; color: #334155; }
.price-features li::before { content: '• '; color: var(--accent); font-weight: 900; margin-right: .25rem; }

.site-footer { border-top: 1px solid rgba(15,23,42,.06); background: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .nav { gap: .6rem; }
  .brand-handle { display: none; }
  .brand-text { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* Плавная прокрутка для якорных ссылок */
html {
  scroll-behavior: smooth;
}

/* Дополнительное позиционирование для якорей */
section[id] {
  scroll-margin-top: 80px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 600px;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  color: #aaa;
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
  color: #000;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #0f172a;
}

.modal-content ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.modal-content ol li {
  margin: 0.75rem 0;
  line-height: 1.6;
  color: #334155;
}

.modal-content a {
  color: var(--primary);
  text-decoration: none;
}

.modal-content a:hover {
  text-decoration: underline;
}

.modal-content .btn {
  display: inline-block;
  margin: 0.5rem;
}

.modal-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 1rem;
  border: 1px solid #e5e7eb;
}

@media (max-width: 640px) {
  .modal-content {
    margin: 10px auto;
    padding: 1rem;
    width: calc(100% - 20px);
    max-width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-sizing: border-box;
  }
  
  .modal-content ol {
    padding-left: 1.25rem;
    margin: 0.75rem 0;
  }
  
  .modal-content ol li {
    margin: 0.5rem 0;
    font-size: 0.9rem;
  }
  
  .modal-content .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
    text-align: center;
  }
}


