/*
 * SportBot marketing landing — shared by the English page (/, baked into
 * webapp/index.html) and the Russian page (/ru/, a static file in public/ru).
 * Fully self-contained: system fonts only (no Google Fonts — they log visitor
 * IPs, a GDPR problem in the EU), no external requests. Dark "floodlit pitch"
 * theme with a single electric-lime accent.
 *
 * Everything is scoped under #landing so the app's own index.css can never
 * bleed in (and vice-versa). The app bundle is only loaded inside Telegram.
 */

/* Reset the default body margin. The app's index.css (which normally does
 * this) is only loaded inside Telegram now, so for plain browsers landing.css
 * must zero it — otherwise the 8px UA margin shows as a white frame around the
 * dark landing. The dark page background is applied only outside Telegram
 * (html has no data-tg), so the Mini App keeps its own theme. */
html,
body {
  margin: 0;
  padding: 0;
}
html:not([data-tg]) {
  background: #070b07;
}

#landing {
  --bg: #070b07;
  --bg-2: #0b110b;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef4ec;
  --muted: #93a394;
  --muted-2: #6f7d70;
  --accent: #c6ff3a;
  --accent-ink: #0a1400;
  --green: #37d67a;
  --radius: 18px;
  --maxw: 1120px;
  --font:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  position: relative;
  min-height: 100dvh;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(
      1100px 620px at 80% -8%,
      rgba(198, 255, 58, 0.16),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 8% 4%,
      rgba(55, 214, 122, 0.12),
      transparent 55%
    ),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#landing *,
#landing *::before,
#landing *::after {
  box-sizing: border-box;
}

/* When opened inside Telegram, the inline <head> script sets data-tg early and
 * we hide the landing before it paints; the app bundle removes it entirely. */
html[data-tg] #landing {
  display: none !important;
}

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

#landing img,
#landing svg {
  max-width: 100%;
  display: block;
}

.lp-wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Buttons ---------- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
  white-space: nowrap;
}
.lp-btn svg {
  width: 18px;
  height: 18px;
}
.lp-btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -8px rgba(198, 255, 58, 0.55);
}
.lp-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -8px rgba(198, 255, 58, 0.7);
}
.lp-btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.lp-btn--ghost:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}
.lp-btn--sm {
  padding: 10px 16px;
  font-size: 14px;
}
/* `#landing a { color: inherit }` (an id selector) would otherwise beat the
 * class rules above and paint button text in the light body color. Re-assert
 * the button colors at id specificity so the CTA text stays readable. */
#landing a.lp-btn--primary {
  color: var(--accent-ink);
}
#landing a.lp-btn--ghost {
  color: var(--text);
}

/* ---------- Nav ---------- */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(7, 11, 7, 0.6);
  border-bottom: 1px solid var(--border);
}
.lp-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.lp-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -0.3px;
}
.lp-brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
}
.lp-nav__right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lp-lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
}
.lp-lang a {
  padding: 7px 12px;
  color: var(--muted);
}
.lp-lang a[aria-current="true"] {
  background: var(--surface-2);
  color: var(--text);
}
.lp-nav .lp-btn--sm {
  display: none;
}
@media (min-width: 720px) {
  .lp-nav .lp-btn--sm {
    display: inline-flex;
  }
}

/* ---------- Section scaffolding ---------- */
.lp-section {
  padding: 84px 0;
}
.lp-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.lp-h2 {
  font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -1px;
  margin: 0 0 14px;
}
.lp-lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted);
  max-width: 620px;
  margin: 0;
}
.lp-section__head {
  margin-bottom: 44px;
}

/* ---------- Hero ---------- */
.lp-hero {
  padding: 56px 0 40px;
}
.lp-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: center;
}
@media (min-width: 940px) {
  .lp-hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 30px;
  }
  .lp-hero {
    padding: 76px 0 60px;
  }
}
.lp-hero h1 {
  font-size: clamp(38px, 6.6vw, 66px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -1.8px;
  margin: 0 0 20px;
}
.lp-hero h1 .hl {
  color: var(--accent);
}
.lp-hero__sub {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 540px;
  margin: 0 0 30px;
}
.lp-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}
.lp-hero__note {
  font-size: 13.5px;
  color: var(--muted-2);
  line-height: 1.7;
}
.lp-hero__note b {
  color: var(--text);
}

/* Sport chips */
.lp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
}
.lp-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.lp-chip b {
  color: var(--text);
  font-weight: 700;
}

/* ---------- Phone mockup ---------- */
.lp-phone {
  justify-self: center;
  width: min(340px, 82vw);
  border-radius: 40px;
  padding: 12px;
  background: linear-gradient(160deg, #182018, #0c110c);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 60px -20px rgba(198, 255, 58, 0.25);
  position: relative;
}
.lp-phone__screen {
  border-radius: 30px;
  background: #0a0f0a;
  overflow: hidden;
  border: 1px solid var(--border);
}
.lp-phone__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  font-size: 12px;
  color: var(--muted);
}
.lp-phone__bar b {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}
.lp-pcard {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 12px 10px;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.lp-pcard__av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  color: #06120a;
}
.lp-pcard__meta {
  flex: 1;
  min-width: 0;
}
.lp-pcard__name {
  font-weight: 700;
  font-size: 14px;
}
.lp-pcard__stars {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
}
.lp-pcard__tag {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(198, 255, 58, 0.14);
  color: var(--accent);
}
.lp-pcard__tag--b {
  background: rgba(55, 214, 122, 0.16);
  color: var(--green);
}
.lp-phone__split {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 12px 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(198, 255, 58, 0.12),
    rgba(55, 214, 122, 0.12)
  );
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  justify-content: center;
  letter-spacing: 0.3px;
}

/* ---------- Problem / fix ---------- */
.lp-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 820px) {
  .lp-compare {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 22px;
  }
}
.lp-panel {
  border-radius: var(--radius);
  padding: 26px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.lp-panel--bad {
  background: rgba(255, 90, 80, 0.05);
  border-color: rgba(255, 90, 80, 0.22);
}
.lp-panel--good {
  background: rgba(198, 255, 58, 0.06);
  border-color: rgba(198, 255, 58, 0.28);
}
.lp-panel__tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lp-panel--bad .lp-panel__tag {
  color: #ff8b82;
}
.lp-panel--good .lp-panel__tag {
  color: var(--accent);
}
.lp-panel h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
}
.lp-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.lp-arrow {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 26px;
  font-weight: 900;
}
@media (max-width: 819px) {
  .lp-arrow {
    transform: rotate(90deg);
  }
}

/* ---------- Feature grid ---------- */
.lp-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 620px) {
  .lp-features {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 940px) {
  .lp-features {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.lp-feat {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}
.lp-feat:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.lp-feat__ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(198, 255, 58, 0.12);
  color: var(--accent);
  margin-bottom: 16px;
}
.lp-feat__ic svg {
  width: 22px;
  height: 22px;
}
.lp-feat h3 {
  margin: 0 0 7px;
  font-size: 17px;
  font-weight: 800;
}
.lp-feat p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- Steps ---------- */
.lp-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  counter-reset: step;
}
@media (min-width: 820px) {
  .lp-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.lp-step {
  position: relative;
  padding: 30px 26px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.lp-step__n {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 17px;
  background: var(--accent);
  color: var(--accent-ink);
  margin-bottom: 16px;
}
.lp-step h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}
.lp-step p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}
.lp-step code {
  color: var(--accent);
  background: rgba(198, 255, 58, 0.1);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 13px;
}

/* ---------- Usage / commands ---------- */
.lp-usage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: start;
}
@media (min-width: 900px) {
  .lp-usage {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}
.lp-flow {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lp-flow li {
  position: relative;
  padding: 0 0 22px 34px;
  color: var(--muted);
  font-size: 15.5px;
}
.lp-flow li::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(198, 255, 58, 0.15);
}
.lp-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12.5px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--border-strong);
}
.lp-flow b {
  color: var(--text);
  font-weight: 700;
}
.lp-cmds {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 8px;
}
.lp-cmd {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 12px;
}
.lp-cmd:hover {
  background: var(--surface-2);
}
.lp-cmd code {
  color: var(--accent);
  font-weight: 800;
  font-size: 14.5px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  flex: none;
  min-width: 92px;
}
.lp-cmd span {
  color: var(--muted);
  font-size: 14px;
}

/* Full command reference — grouped category cards */
.lp-miniapp {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(
    160deg,
    rgba(198, 255, 58, 0.08),
    var(--surface)
  );
  padding: 26px;
}
.lp-miniapp h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 800;
}
.lp-miniapp p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.lp-miniapp code {
  color: var(--accent);
  background: rgba(198, 255, 58, 0.1);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 13px;
}
.lp-cmdcats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 34px;
}
@media (min-width: 620px) {
  .lp-cmdcats {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1040px) {
  .lp-cmdcats {
    grid-template-columns: repeat(4, 1fr);
  }
}
.lp-cmdcat {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 14px;
}
.lp-cmdcat h4 {
  margin: 0 0 8px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}
.lp-cmdcat .lp-cmd {
  display: block;
  padding: 8px;
  border-radius: 10px;
}
.lp-cmdcat .lp-cmd code {
  display: inline-block;
  min-width: 0;
  margin-bottom: 1px;
}
.lp-cmdcat .lp-cmd span {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

/* ---------- Final CTA ---------- */
.lp-final {
  text-align: center;
  border-radius: 28px;
  padding: 66px 26px;
  background:
    radial-gradient(
      600px 300px at 50% -20%,
      rgba(198, 255, 58, 0.22),
      transparent 70%
    ),
    var(--surface);
  border: 1px solid var(--border-strong);
}
.lp-final h2 {
  font-size: clamp(28px, 4.6vw, 46px);
  font-weight: 900;
  letter-spacing: -1px;
  margin: 0 0 14px;
}
.lp-final p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 28px;
  font-size: 17px;
}

/* ---------- Footer ---------- */
.lp-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 56px;
  margin-top: 20px;
}
.lp-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}
.lp-footer__data {
  max-width: 560px;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.6;
}
.lp-footer__links {
  display: flex;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.lp-footer__links a:hover {
  color: var(--text);
}
.lp-footer__copy {
  color: var(--muted-2);
  font-size: 12.5px;
  margin-top: 26px;
}

@media (prefers-reduced-motion: reduce) {
  #landing * {
    transition: none !important;
  }
}
