/* ═══════════════════════════════════════════════════
   LANDING PAGE — browser context only

   Light theme (white background, dark text) — independent from the Mini App
   dark theme. Scope is everything inside #landing plus a few html-level
   overrides for the landing branch only.
═══════════════════════════════════════════════════ */

/* ── Visibility branch (early <script> in index.html sets these classes) ──
   If JS never runs, neither class is set and we default to landing-visible
   (safer for Googlebot / curl / verification reviewers). */
html.show-landing #app { display: none !important; }
html.show-app    #landing { display: none !important; }

/* Override the Mini App dark body background as early as possible (the
   .show-landing class is added by an inline <script> in <head>, before
   paint), so browser visitors never see a flash of dark theme. */
html.show-landing,
html.show-landing body {
  background: #ffffff;
  color: #0F172A;
}

/* ── Body override for landing (style.css sets overflow:hidden) ── */
body.landing-mode {
  overflow: auto;
  height: auto;
  min-height: 100vh;
  background: #ffffff;
  color: #0F172A;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Root container ── */
#landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #ffffff;
  color: #0F172A;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

#landing a {
  color: #0E8B5F;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#landing a:hover {
  color: #0A6B49;
}

#landing p {
  margin: 0 0 14px;
  color: #1F2937;
}
#landing p:last-child {
  margin-bottom: 0;
}

#landing strong {
  font-weight: 700;
  color: #0F172A;
}

#landing code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 1px 6px;
  border-radius: 4px;
  color: #0F172A;
  white-space: nowrap;
}

#landing em {
  font-style: normal;
  background: #F1F5F9;
  padding: 0 4px;
  border-radius: 3px;
  color: #0F172A;
}

.landing-container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* ───────── Top navigation ───────── */
.landing-nav {
  border-bottom: 1px solid #E5E7EB;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.landing-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}
.landing-nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A !important;
  text-decoration: none !important;
  letter-spacing: -.01em;
  flex-shrink: 0;
}
.landing-nav-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.landing-nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: #475569 !important;
  text-decoration: none !important;
}
.landing-nav-links a:hover {
  color: #0F172A !important;
}

/* ───────── Hero ───────── */
.landing-hero {
  padding: 64px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, #F0FDF6 0%, #ffffff 100%);
  border-bottom: 1px solid #E5E7EB;
}
.landing-logo {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0E8B5F;
  background: #E6F8EF;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.landing-h1 {
  font-size: 44px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  color: #0F172A;
}
.landing-hero-tagline-en {
  font-size: 18px;
  line-height: 1.55;
  color: #1F2937 !important;
  max-width: 720px;
  margin: 0 auto 22px !important;
  font-weight: 500;
}
.landing-hero-desc,
.landing-hero-desc-en {
  font-size: 16px;
  line-height: 1.7;
  color: #475569 !important;
  max-width: 680px;
  margin: 0 auto 14px !important;
}
.landing-hero-cta {
  margin-top: 26px;
}
.landing-cta {
  display: inline-block;
  background: #0EA371;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none !important;
  padding: 14px 26px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(14, 163, 113, .25);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.landing-cta:hover {
  background: #0B8C60;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(14, 163, 113, .32);
}

/* ───────── Generic section ───────── */
.landing-section {
  padding: 56px 0;
  border-bottom: 1px solid #E5E7EB;
}
.landing-section-alt {
  background: #F8FAFC;
}
.landing-h2 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.015em;
  margin: 0 0 12px;
  color: #0F172A;
}
.landing-h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 10px;
  color: #0F172A;
  letter-spacing: -.005em;
}
.landing-h4 {
  font-size: 17px;
  font-weight: 700;
  margin: 22px 0 8px;
  color: #0F172A;
}
.landing-section-lead {
  font-size: 17px;
  line-height: 1.6;
  color: #475569 !important;
  margin: 0 0 28px !important;
  max-width: 720px;
}

/* Bilingual blocks — Russian and English stacked side-by-side on desktop */
.landing-lang-block {
  margin-top: 18px;
  padding: 22px 24px;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
}
.landing-section-alt .landing-lang-block {
  background: #ffffff;
}
.landing-lang-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0E8B5F;
  background: #E6F8EF;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 14px;
}

.landing-list {
  margin: 6px 0 14px;
  padding-left: 22px;
  color: #1F2937;
  font-size: 16px;
  line-height: 1.65;
}
.landing-list li {
  margin-bottom: 8px;
}
.landing-list li::marker {
  color: #94A3B8;
}
.landing-list-code li {
  margin-bottom: 14px;
}

/* ───────── Integration cards ───────── */
.landing-integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.landing-integration-card {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px;
}
.landing-section-alt .landing-integration-card {
  background: #ffffff;
}
.landing-integration-card-soon {
  background: #F8FAFC;
  border-style: dashed;
  color: #64748B;
}
.landing-integration-name {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 4px;
}
.landing-integration-mode {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #0E8B5F;
  margin-bottom: 10px;
}
.landing-integration-card-soon .landing-integration-mode {
  color: #94A3B8;
}
.landing-integration-scope {
  font-size: 14px;
  color: #475569;
  line-height: 1.55;
}

/* ───────── How-it-works steps ───────── */
.landing-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.landing-step {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 22px 20px;
}
.landing-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #0EA371;
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  border-radius: 50%;
  margin-bottom: 12px;
}
.landing-step-title {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
}
.landing-step-title-ru {
  font-size: 14px;
  color: #64748B;
  margin-top: 2px;
  margin-bottom: 8px;
}
.landing-step-desc {
  font-size: 14.5px;
  color: #475569;
  line-height: 1.6;
  margin-top: 4px;
}

/* ───────── Auth section (Telegram Login Widget) ───────── */
.landing-auth {
  padding: 48px 0;
  text-align: center;
  background: #ffffff;
  border-bottom: 1px solid #E5E7EB;
}
.landing-auth-label {
  font-size: 14px;
  color: #475569 !important;
  margin: 0 0 16px !important;
}

/* ───────── Footer ───────── */
.landing-footer {
  padding: 40px 0 56px;
  background: #ffffff;
  margin-top: auto;
}
.landing-footer .landing-container {
  text-align: center;
}
.landing-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 24px;
  margin-bottom: 16px;
}
.landing-footer-links a {
  color: #0E8B5F;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.landing-footer-links a:hover {
  color: #0A6B49;
}
.landing-footer-copy {
  color: #64748B;
  font-size: 13px;
  margin-bottom: 6px;
}
.landing-footer-legal {
  color: #94A3B8;
  font-size: 12px;
}

/* ───────── Responsive ───────── */
@media (max-width: 720px) {
  .landing-container {
    padding: 0 18px;
  }
  .landing-nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .landing-nav-links {
    justify-content: flex-start;
    gap: 14px 18px;
  }
  .landing-hero {
    padding: 48px 0 40px;
  }
  .landing-h1 {
    font-size: 32px;
  }
  .landing-hero-tagline-en {
    font-size: 16px;
  }
  .landing-section {
    padding: 40px 0;
  }
  .landing-h2 {
    font-size: 24px;
  }
  .landing-h3 {
    font-size: 18px;
  }
  .landing-lang-block {
    padding: 18px 16px;
  }
  .landing-cta {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
  #landing code {
    white-space: normal;
    word-break: break-all;
  }
}

@media (max-width: 420px) {
  .landing-h1 {
    font-size: 28px;
  }
  .landing-hero-desc,
  .landing-hero-desc-en {
    font-size: 15px;
  }
}
