/* Telegram bot landing (/telegram-bot-rasshifrovka-golosovyh/). Layout follows the Figma file
   «AI Заметки — Telegram-бот»; colours come from tokens.css. */

.tgbot-inner {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.tgbot-icon {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--color-brand);
}

.tgbot-tile {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-bg-subtle);
}

/* This stylesheet loads only on the bot page, so the shared hero title can be tuned here. */
.article-hero--media h1 {
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 1.06;
}

/* Hero phone */
.tgbot-phone {
  width: 100%;
  max-width: 396px;
  margin: 0;
  justify-self: end;
}

.tgbot-phone__screen {
  overflow: hidden;
  border: 12px solid var(--color-bg-code);
  border-radius: 44px;
  background: var(--color-bg-subtle);
  box-shadow: 0 30px 60px -10px rgba(143, 74, 195, 0.22);
}

.tgbot-phone figcaption {
  margin-top: 12px;
  color: var(--color-text-hint);
  font-size: 13px;
  text-align: center;
}

.tgbot-chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

.tgbot-chat__head strong,
.tgbot-chat__head small {
  display: block;
}

.tgbot-chat__head strong {
  font-size: 15px;
}

.tgbot-chat__head small {
  color: var(--color-text-muted);
  font-size: 13px;
}

.tgbot-chat__avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.tgbot-chat__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 14px 22px;
}

.tgbot-bubble {
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.tgbot-bubble--voice {
  align-self: flex-end;
  background: rgba(224, 187, 255, 0.55);
}

.tgbot-bubble__from {
  display: block;
  margin-bottom: 8px;
  color: var(--color-brand-700);
  font-size: 12px;
  font-weight: 700;
}

.tgbot-voice {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.tgbot-voice__play {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-brand);
}

.tgbot-voice__play::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 14px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid #fff;
}

.tgbot-voice__wave {
  display: flex;
  align-items: center;
  gap: 3px;
}

.tgbot-voice__wave i {
  width: 3px;
  border-radius: 2px;
  background: rgba(116, 57, 159, 0.4);
}

.tgbot-voice__wave i.is-played {
  background: var(--color-brand);
}

.tgbot-bubble--text {
  max-width: 300px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

.tgbot-bubble--text strong {
  font-size: 13px;
}

.tgbot-bubble--text p {
  margin: 8px 0;
  color: var(--color-text);
  font-size: 14px;
}

.tgbot-bubble--text em {
  color: var(--color-text-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.tgbot-chat__button {
  max-width: 300px;
  border: 1px solid var(--color-holo-orchid);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--color-bg-subtle);
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

/* Trust strip */
.tgbot-trust {
  padding-bottom: 24px;
}

.tgbot-trust__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tgbot-trust__item {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 18px;
  background: var(--color-bg-card);
}

.tgbot-trust__item p {
  margin: 0;
}

.tgbot-trust__item strong,
.tgbot-trust__item span {
  display: block;
}

.tgbot-trust__item strong {
  font-size: 16px;
}

.tgbot-trust__item p span {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.4;
}

/* Sections */
.tgbot-section {
  padding: 88px 0;
}

.tgbot-section--card {
  background: var(--color-bg-card);
}

.tgbot-video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: center;
  gap: 48px;
}

.tgbot-video-layout .button-primary {
  margin-top: 24px;
}

.tgbot-video {
  margin: 0;
}

.tgbot-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 8;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-bg-code);
}

.tgbot-video figcaption {
  margin-top: 12px;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .tgbot-video-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .tgbot-video-layout .tgbot-head {
    margin-bottom: 0;
  }

  .tgbot-video {
    width: min(100%, 420px);
    justify-self: center;
  }
}

.tgbot-section--dark {
  background: var(--color-bg-code);
  color: var(--color-text-code);
}

.tgbot-head {
  max-width: 860px;
  margin-bottom: 44px;
}

.tgbot-eyebrow {
  margin: 0;
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tgbot-head h2 {
  margin: 14px 0 0;
  color: var(--color-text);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.tgbot-lead {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1.55;
}

.tgbot-section--dark .tgbot-eyebrow {
  color: var(--color-holo-orchid);
}

.tgbot-section--dark .tgbot-head h2 {
  color: var(--color-text-code);
}

.tgbot a:not(.button-primary):not(.button-secondary) {
  color: var(--color-brand);
  font-weight: 600;
}

/* Steps and cards */
.tgbot-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tgbot-steps li,
.tgbot-card,
.tgbot-plan {
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 28px;
  background: var(--color-bg-card);
  transition: border-color 140ms ease;
}

.tgbot-section--card .tgbot-card {
  background: var(--color-bg);
}

.tgbot-steps li:hover,
.tgbot-card:hover {
  border-color: var(--color-holo-orchid);
}

.tgbot-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-brand);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.tgbot-steps h3,
.tgbot-card h3 {
  margin: 16px 0 0;
  color: var(--color-text);
  font-size: 20px;
  line-height: 1.3;
}

.tgbot-steps p,
.tgbot-card p {
  margin: 10px 0 0;
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.5;
}

.tgbot-grid {
  display: grid;
  gap: 20px;
}

.tgbot-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tgbot-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* Comparison */
.tgbot-table-wrap {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-bg);
}

.tgbot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
}

.tgbot-table th,
.tgbot-table td {
  padding: 18px 28px;
  text-align: left;
  vertical-align: middle;
}

.tgbot-table thead th {
  background: var(--color-bg-subtle);
  font-size: 15px;
}

.tgbot-table thead th:last-child {
  color: var(--color-brand);
}

.tgbot-table tbody tr {
  border-top: 1px solid var(--color-border);
}

.tgbot-table tbody th {
  width: 220px;
  color: var(--color-text);
}

.tgbot-table tbody td:nth-child(2) {
  color: var(--color-text-muted);
}

.tgbot-table tbody td:last-child {
  font-weight: 600;
}

.tgbot-table td .tgbot-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  vertical-align: -4px;
}

.tgbot-table .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Pricing */
.tgbot-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.tgbot-plan {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px 28px;
}

.tgbot-plan--accent {
  border: 2px solid var(--color-brand);
}

.tgbot-plan__badge {
  align-self: flex-start;
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--color-brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.tgbot-plan h3 {
  margin: 0;
  font-size: 19px;
}

.tgbot-plan__price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.tgbot-plan__price strong {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.tgbot-plan__price span {
  color: var(--color-text-muted);
  font-weight: 500;
}

.tgbot-plan .button-primary,
.tgbot-plan .button-secondary {
  margin-top: auto;
  min-height: 52px;
  border-radius: 14px;
  font-size: 16px;
}

.tgbot-checks {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tgbot-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.45;
}

.tgbot-checks .tgbot-icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

/* Privacy */
.tgbot-privacy {
  border: 1px solid rgba(224, 187, 255, 0.25);
  border-radius: 22px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.06);
}

.tgbot-privacy > .tgbot-icon {
  width: 28px;
  height: 28px;
  color: var(--color-holo-orchid);
}

.tgbot-privacy h3 {
  margin: 18px 0;
  color: var(--color-text-code);
  font-size: 22px;
}

.tgbot-privacy .tgbot-checks li {
  color: var(--color-text-code);
}

.tgbot-privacy .tgbot-checks .tgbot-icon {
  color: var(--color-holo-orchid);
}

.tgbot-note {
  margin: 28px 0 0;
  color: var(--color-text-code);
  opacity: 0.8;
}

.tgbot-section--dark .tgbot-note a {
  color: var(--color-holo-orchid);
}

@media (max-width: 1080px) {
  .tgbot-trust__grid,
  .tgbot-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tgbot-plans {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
}

@media (max-width: 860px) {
  .tgbot-phone {
    justify-self: center;
  }

  .tgbot-steps,
  .tgbot-grid--2 {
    grid-template-columns: 1fr;
  }

  .tgbot-section {
    padding: 64px 0;
  }
}

@media (max-width: 640px) {
  .tgbot-inner {
    width: calc(100% - 32px);
  }

  .tgbot-trust__grid,
  .tgbot-grid--4 {
    grid-template-columns: 1fr;
  }

  .tgbot-steps li,
  .tgbot-card,
  .tgbot-plan,
  .tgbot-privacy {
    padding: 22px;
  }

  .tgbot-table thead {
    display: none;
  }

  .tgbot-table,
  .tgbot-table tbody,
  .tgbot-table tr,
  .tgbot-table th,
  .tgbot-table td {
    display: block;
    width: auto;
  }

  .tgbot-table tbody tr {
    padding: 16px 20px;
  }

  .tgbot-table tbody th,
  .tgbot-table td {
    padding: 4px 0;
  }

  .tgbot-table tbody th {
    width: auto;
    font-size: 17px;
  }

  .tgbot-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--color-text-hint);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .tgbot-phone__screen {
    border-width: 10px;
    border-radius: 36px;
  }

  .tgbot-voice__wave i:nth-child(n + 15) {
    display: none;
  }
}
