:root {
  --bg: #ffffff;
  --bg-alt: #f6f9fe;
  --fg: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #0ea5a4;
  --border: #e2e8f0;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { font-weight: 800; font-size: 18px; color: var(--fg); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 12px; height: 12px; border-radius: 50% 50% 50% 0; background: var(--primary); transform: rotate(-45deg); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--fg); }
.nav .nav-cta { color: #fff; background: var(--primary); padding: 8px 14px; border-radius: 10px; }
.nav .nav-cta:hover { background: var(--primary-dark); }

/* Hero */
.hero { background: linear-gradient(180deg, #f3f8ff 0%, #ffffff 70%); padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.badge {
  display: inline-block; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;
  font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.05; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.02em; }
.lede { font-size: 18px; color: #334155; margin: 0 0 22px; max-width: 38ch; }
.lede strong { color: var(--fg); }

/* Forms */
.lead-form { margin: 0 0 18px; }
.field-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lead-form input[type='email'] {
  flex: 1 1 220px; min-width: 0; height: 48px; padding: 0 14px; font-size: 16px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--fg);
}
.lead-form select {
  height: 48px; padding: 0 12px; font-size: 15px; border: 1px solid var(--border);
  border-radius: 12px; background: #fff; color: var(--fg);
}
.lead-form input:focus, .lead-form select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.lead-form button {
  height: 48px; padding: 0 20px; font-size: 16px; font-weight: 600; color: #fff; cursor: pointer;
  background: var(--primary); border: none; border-radius: 12px;
}
.lead-form button:hover { background: var(--primary-dark); }
.lead-form button:disabled { opacity: 0.6; cursor: default; }

/* CTA-кнопки (ссылки на приложение /app) */
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.hero-cta.center { justify-content: center; }
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 22px; font-size: 16px; font-weight: 600;
  border-radius: 12px; text-decoration: none; cursor: pointer;
}
.btn-primary { color: #fff; background: var(--primary); border: 1px solid var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-secondary { color: var(--primary); background: #fff; border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); }
.api-opt { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; font-size: 14px; color: #475569; cursor: pointer; }
.api-opt input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.form-note { font-size: 13px; color: var(--muted); margin: 10px 2px 0; }
.form-consent { font-size: 12px; color: var(--muted); margin: 6px 2px 0; }
.form-consent a { color: var(--muted); text-decoration: underline; }
.form-consent a:hover { color: var(--fg); }
.form-msg { font-size: 14px; margin: 10px 2px 0; min-height: 1.2em; }
.form-msg.ok { color: #047857; font-weight: 600; }
.form-msg.err { color: #dc2626; }

.social-proof { color: var(--muted); font-size: 15px; margin-top: 8px; }
.social-proof strong { color: var(--fg); font-size: 20px; font-weight: 800; }

/* Hero art */
.hero-art { display: flex; flex-direction: column; gap: 10px; }
.map-art { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); display: block; }
.art-caption { font-size: 13px; color: var(--muted); text-align: center; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 32px; text-align: center; }

.cards { display: grid; gap: 18px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: #475569; font-size: 15px; }
.step { width: 34px; height: 34px; border-radius: 10px; background: #eff6ff; color: var(--primary); font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* Trackers / roadmap */
.section-lede { text-align: center; color: #475569; font-size: 17px; max-width: 64ch; margin: -14px auto 30px; }
.trackers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tracker { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.tracker.avail { border-color: #a7f3d0; }
.tracker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tracker-name { font-weight: 700; font-size: 15px; }
a.tracker-name { color: inherit; text-decoration: none; }
a.tracker-name:hover { color: var(--primary); text-decoration: underline; }
.tracker p { margin: 0; color: #64748b; font-size: 13px; }
.tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 3px 8px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; white-space: nowrap; }
.tag-ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

/* API section */
.api-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.api-title { text-align: left; margin: 0 0 14px; }
.api-copy .lede { max-width: none; }
.badge-soon { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.api-points { margin: 0 0 14px; padding-left: 1.1em; color: #475569; font-size: 15px; }
.api-points li { margin: 6px 0; }
.code {
  background: #0f172a; color: #e2e8f0; border-radius: 14px; padding: 18px 20px; margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5; overflow-x: auto; box-shadow: var(--shadow);
}
.code code { white-space: pre; }

/* CTA */
.cta { background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%); text-align: center; }
.cta-inner { max-width: 640px; margin: 0 auto; }
.cta .lede { margin: 0 auto 22px; }
.cta .field-row { justify-content: center; }

/* FAQ */
.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--card);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--muted); font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq p { margin: 10px 0 2px; color: #475569; font-size: 15px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 22px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); }
.footer-inner .muted { color: #94a3b8; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--fg); }

/* Legal pages (privacy / terms) */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(28px, 4vw, 36px); margin: 0 0 6px; letter-spacing: -0.02em; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; text-align: left; }
.legal p, .legal li { color: #334155; font-size: 15px; line-height: 1.7; }
.legal ul { padding-left: 1.2em; }
.legal a { color: var(--primary); }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 760px; margin: 0 auto; align-items: stretch; }
.price-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow);
}
.price-card.featured { border-color: var(--primary); box-shadow: 0 16px 40px -14px rgba(37, 99, 235, 0.35); }
.price-ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: 0.01em; padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
.price-plan { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.price-amount { font-size: 48px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 2px; line-height: 1; }
.price-cur { font-size: 26px; font-weight: 700; vertical-align: super; margin-right: 2px; }
.price-per { font-size: 16px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.price-sub { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.price-feats { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.price-feats li { position: relative; padding-left: 26px; margin: 10px 0; color: #334155; font-size: 15px; }
.price-feats li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 800;
}
.price-cta { width: 100%; }

/* Responsive */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cards.three, .cards.four { grid-template-columns: 1fr 1fr; }
  .api-grid { grid-template-columns: 1fr; }
  .trackers { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .nav a:not(.nav-cta) { display: none; }
  .cards.three, .cards.four { grid-template-columns: 1fr; }
  .trackers { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .lead-form button { flex: 1 1 100%; }
  .hero-cta .btn-primary, .hero-cta .btn-secondary { flex: 1 1 100%; }
}

/* ===== Customer stories ===== */

/* Carousel on the landing page */
.stories-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.stories-head h2 { margin: 0; text-align: left; }
.stories-head .section-lede { text-align: left; margin: 8px 0 0; max-width: 58ch; }
.stories-nav { display: flex; gap: 8px; flex-shrink: 0; }
.stories-arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; color: var(--fg); font-size: 20px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.stories-arrow:hover { border-color: var(--primary); color: var(--primary); }
.stories-arrow:disabled { opacity: 0.35; cursor: default; box-shadow: none; }

.stories-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 85%);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 2px 18px; margin: 0 -2px; scrollbar-width: none;
}
.stories-track::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .stories-track { grid-auto-columns: calc((100% - 20px) / 2); } }
@media (min-width: 980px) { .stories-track { grid-auto-columns: calc((100% - 40px) / 3); } }

.story-card {
  scroll-snap-align: start; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.story-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.28); }
.story-card-img { aspect-ratio: 3 / 2; background: var(--bg-alt); }
.story-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.story-card h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.3; }
.story-card p { margin: 0 0 16px; color: #475569; font-size: 15px; }
.story-card-more { margin-top: auto; color: var(--primary); font-weight: 600; font-size: 15px; }

.story-tag {
  align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}

.stories-invite { text-align: center; color: var(--muted); font-size: 15px; margin: 24px 0 0; }
.stories-invite a { color: var(--primary); font-weight: 600; text-decoration: none; }
.stories-invite a:hover { text-decoration: underline; }

/* Single story article page */
.story-article { max-width: 720px; margin: 0 auto; }
.story-crumbs { margin: 4px 0 18px; font-size: 14px; color: var(--muted); }
.story-crumbs a { color: var(--muted); text-decoration: none; }
.story-crumbs a:hover { color: var(--fg); }
.story-article h1 { font-size: clamp(28px, 4.6vw, 42px); line-height: 1.14; letter-spacing: -0.02em; margin: 6px 0 14px; }
.story-byline { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.story-cover { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); display: block; margin: 0 0 8px; }
.story-credit { font-size: 12px; color: #94a3b8; margin: 0 0 30px; }
.story-credit a { color: inherit; }
.story-body p { font-size: 17px; line-height: 1.75; color: #1f2937; margin: 0 0 20px; }
.story-body h2 { font-size: 23px; text-align: left; margin: 36px 0 12px; }
.story-body a { color: var(--primary); }
.story-body strong { color: var(--fg); }
.story-signoff { font-style: italic; color: var(--muted); }
.story-pull {
  border-left: 4px solid var(--primary); padding: 2px 0 2px 20px; margin: 28px 0;
  font-size: 20px; line-height: 1.5; color: var(--fg); font-weight: 600;
}
.story-cta {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; text-align: center; margin: 42px 0 8px;
}
.story-cta h2 { margin: 0 0 8px; font-size: 22px; text-align: center; }
.story-cta p { margin: 0 0 18px; color: #475569; }
.story-share { text-align: center; color: var(--muted); font-size: 14px; margin: 22px 0 0; }
.story-share a { color: var(--primary); font-weight: 600; text-decoration: none; }
.story-back-link { text-align: center; margin: 22px 0 0; }
.story-back-link a { color: var(--primary); font-weight: 600; text-decoration: none; }

@media (max-width: 560px) {
  .stories-head { flex-direction: column; align-items: stretch; }
  .stories-nav { display: none; }
}
