/* Telegram landing page. Loaded only for the "Лендинг Telegram" template.
   Everything is namespaced with .tgl- and built on the theme's own variables. */

.tgl { margin: 0 auto; }

/* ---------- Buttons ---------- */
.tgl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  max-width: 100%;
  padding: 14px 32px;
  background: var(--color-accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .25);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tgl-btn:hover {
  background: var(--color-accent-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .32);
}
.tgl-btn:focus-visible {
  outline: 3px solid var(--color-accent-dark);
  outline-offset: 3px;
}
.tgl-btn span { text-wrap: balance; }
.tgl-btn-icon { width: 22px; height: 22px; flex: none; fill: currentColor; }

/* ---------- Hero ---------- */
.tgl-hero {
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 56px 24px 48px;
  margin-bottom: 56px;
}
.tgl-badge {
  display: inline-block;
  background: var(--color-bg);
  color: var(--color-accent-dark);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 3px 14px;
  font-size: 0.8rem;
  font-weight: 600;
}
.tgl-title {
  max-width: 760px;
  margin: 18px auto 14px;
  font-size: clamp(1.9rem, 5.2vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.tgl-lead {
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
  color: var(--color-text);
}
.tgl-support {
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--color-muted);
}

/* ---------- Sections ---------- */
.tgl-section { margin-bottom: 56px; }
.tgl-h2 {
  margin: 0 0 22px;
  font-size: clamp(1.4rem, 3.4vw, 1.8rem);
  letter-spacing: -0.01em;
}
.tgl-h2--sm { margin-bottom: 6px; font-size: 1.3rem; }
.tgl-h3 { margin: 14px 0 6px; font-size: 1.1rem; }

/* Topic cards: 3 + 2 on desktop, 2 columns on tablet, 1 on phones */
.tgl-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.tgl-card {
  grid-column: span 2;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
}
.tgl-card:nth-child(n+4) { grid-column: span 3; }
.tgl-card p { margin: 0; color: var(--color-muted); font-size: 0.95rem; }
.tgl-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-surface);
  border-radius: var(--radius);
  color: var(--color-accent);
}
.tgl-card-icon svg,
.tgl-check svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tgl-note { margin: 18px 0 0; color: var(--color-muted); font-size: 0.95rem; }

/* ---------- Why Telegram ---------- */
.tgl-why {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 44px 32px;
  margin-bottom: 40px;
  text-align: center;
}
.tgl-why-lead { max-width: 620px; margin: 0 auto 32px; color: var(--color-muted); }
.tgl-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  text-align: left;
}
.tgl-benefit p { margin: 0; color: var(--color-muted); font-size: 0.95rem; }
.tgl-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
}
.tgl-check svg { width: 18px; height: 18px; stroke-width: 2.5; }

/* ---------- Middle CTA ---------- */
.tgl-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px 32px;
  margin-bottom: 40px;
}
.tgl-mid-text p { margin: 0; color: var(--color-muted); }
.tgl-mid .tgl-btn { flex: none; }

/* ---------- Final CTA ---------- */
.tgl-final {
  background: var(--color-accent);
  color: #fff;
  border-radius: 16px;
  padding: 56px 24px;
  text-align: center;
}
.tgl-final-eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}
.tgl-final-title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4.2vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}
.tgl-final-text { max-width: 560px; margin: 0 auto 28px; color: rgba(255, 255, 255, .92); }
.tgl-final .tgl-btn {
  background: #fff;
  color: var(--color-accent-dark);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.tgl-final .tgl-btn:hover { background: var(--color-surface); color: var(--color-accent-dark); }
.tgl-final .tgl-btn:focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .tgl-btn { transition: none; }
  .tgl-btn:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .tgl-cards { grid-template-columns: repeat(2, 1fr); }
  .tgl-card,
  .tgl-card:nth-child(n+4) { grid-column: span 1; }
  .tgl-card:last-child { grid-column: span 2; }
}

@media (max-width: 700px) {
  .tgl-benefits { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 600px) {
  .tgl-hero { padding: 32px 18px 28px; margin-bottom: 40px; }
  .tgl-lead { font-size: 1rem; margin-bottom: 22px; }
  .tgl-btn { width: 100%; padding: 14px 16px; font-size: 1.05rem; }
  .tgl-section { margin-bottom: 40px; }
  .tgl-cards { grid-template-columns: 1fr; gap: 14px; }
  .tgl-card:last-child { grid-column: span 1; }
  .tgl-why { padding: 32px 18px; margin-bottom: 28px; }
  .tgl-mid { flex-direction: column; align-items: stretch; text-align: center; padding: 24px 18px; margin-bottom: 28px; }
  .tgl-final { padding: 40px 18px; }
}

@media (max-width: 380px) {
  .tgl-hero { padding: 26px 14px 24px; }
  .tgl-title { margin: 14px auto 10px; }
  .tgl-lead { font-size: 0.95rem; margin-bottom: 18px; }
  .tgl-btn { font-size: 1rem; gap: 8px; }
}
