/* ========================================================
   БОТ ПЕРЕКУП — СТИЛИЗАЦИЯ 1-В-1 С РЕФЕРЕНСОМ FIGMA
   ======================================================== */

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --lime: #b7ff18;
  --lime-hover: #c4ff38;
  --lime-shadow: 0 4px 20px rgba(183, 255, 24, 0.3);
  --radius-btn: 16px;
  --radius-card: 20px;
}

/* Темная тема (по умолчанию из референса) */
body.dark {
  --bg: #070707;
  --bg-secondary: #0d0d0d;
  --surface: #151515;
  --surface-card: #141414;
  --surface-hover: #1c1c1c;
  --border: #222222;
  --border-card: #252525;
  --text: #ffffff;
  --text-muted: #8e8e93;
  --text-sub: #b3b3b3;
  --stat-label: #707075;
  --arrow-btn-bg: #222222;
  --arrow-btn-color: #ffffff;
}

body.dark .dark-asset {
  display: block !important;
}
body.dark .light-asset {
  display: none !important;
}

/* Светлая тема из референса */
body.light {
  --bg: #f7f7f5;
  --bg-secondary: #ffffff;
  --surface: #ffffff;
  --surface-card: #ffffff;
  --surface-hover: #f0f0ed;
  --border: #e2e2dc;
  --border-card: #e5e5df;
  --text: #090909;
  --text-muted: #666666;
  --text-sub: #444444;
  --stat-label: #777777;
  --arrow-btn-bg: #f0f0ed;
  --arrow-btn-color: #090909;
}

body.light .dark-asset {
  display: none !important;
}
body.light .light-asset {
  display: block !important;
}

/* Базовые стили */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.45;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  max-width: 100%;
}

/* ========================================================
   ШАПКА (NAVBAR)
   ======================================================== */
.navbar {
  height: 80px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-bot, .brand-perekup {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand-line {
  width: 58px;
  height: 5px;
  background-color: var(--lime);
  border-radius: 2px;
  margin-top: 5px;
}

.nav-menu {
  display: flex;
  gap: 32px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-menu a {
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Кнопка "Наш канал" в шапке */
.btn-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-btn);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s ease;
}

.btn-channel:hover {
  background: var(--surface-hover);
  border-color: #444;
  transform: translateY(-1px);
}

/* Кнопка "Открыть бота" (салатовая) */
.btn-open-bot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-btn);
  background: var(--lime);
  color: #050505;
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--lime-shadow);
  transition: all 0.2s ease;
}

.btn-open-bot:hover {
  background: var(--lime-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(183, 255, 24, 0.4);
}

/* Бейдж "Работает в Telegram и Max" */
.works-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-muted);
}

.works-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  flex-shrink: 0;
}

.tg-icon {
  background: #229ed9;
}

.max-icon {
  background: transparent;
}

.max-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Кнопка смены темы */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: #555;
}

/* ========================================================
   HERO СЕКЦИЯ
   ======================================================== */
.hero-block {
  padding: 60px 0 50px;
}

.hero-container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero-eyebrow {
  border-left: 2px solid var(--lime);
  padding-left: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 30px;
}

.hero-headline {
  font-size: clamp(48px, 5.2vw, 78px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 25px;
}

/* Плашка "раньше" из референса */
.lime-pill {
  display: inline-block;
  background: var(--lime);
  color: #050505;
  font-weight: 900;
  padding: 0 14px;
  border-radius: 8px;
  margin-right: 6px;
  line-height: 1.05;
  vertical-align: baseline;
}

.hero-desc {
  font-size: 19px;
  line-height: 1.45;
  color: var(--text-sub);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 50px;
  position: relative;
}

.hero-qr {
  display: none;
  width: 184px;
  padding: 11px 12px 10px;
  border: 1px solid rgba(183, 255, 24, .75);
  border-radius: 17px;
  background: rgba(11, 11, 11, .96);
  color: #fff;
  text-align: center;
  box-shadow: 0 0 25px rgba(183, 255, 24, .13), 0 14px 35px rgba(0, 0, 0, .38);
  z-index: 2;
}

.hero-qr-title {
  display: block;
  margin-bottom: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.hero-qr-code {
  display: block;
  width: 154px;
  height: 154px;
  margin: 0 auto;
  padding: 5px;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.hero-qr-code img,
.hero-qr-code canvas {
  display: block;
  width: 144px;
  height: 144px;
}

.hero-qr-caption {
  display: block;
  padding-top: 7px;
  color: #8e8e93;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}

body.light .hero-qr {
  background: #fff;
  color: #090909;
  border-color: #92ca00;
  box-shadow: 0 0 20px rgba(183, 255, 24, .18), 0 12px 28px rgba(0, 0, 0, .12);
}

body.light .hero-qr-title {
  color: #090909;
}

body.light .hero-qr-code {
  box-shadow: inset 0 0 0 1px #e8e8e8;
}

body.light .hero-qr-caption {
  color: #666;
}

@media (min-width: 1300px) {
  .hero-qr.is-ready {
    display: block;
    position: absolute;
    left: calc(100% - 215px);
    top: -125px;
  }
}

@media (min-width: 901px) and (max-width: 1299px) {
  .hero-actions {
    flex-wrap: wrap;
  }
  .hero-qr.is-ready {
    display: block;
  }
}

.btn-hero-bot {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-btn);
  background: var(--lime);
  color: #050505;
  font-size: 16px;
  font-weight: 800;
  box-shadow: var(--lime-shadow);
  transition: all 0.2s ease;
}

.btn-hero-bot:hover {
  background: var(--lime-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(183, 255, 24, 0.4);
}

.btn-hero-channel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: var(--radius-btn);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-hero-channel:hover {
  background: var(--surface-hover);
  border-color: #444;
  transform: translateY(-2px);
}

/* Метрики внизу Hero */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.stat-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--stat-label);
  line-height: 1.3;
}

/* Правая часть Hero */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-art-box {
  width: 100%;
  max-width: 620px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.phone-link:hover {
  transform: translateY(-4px);
}

.hero-art-img {
  width: 100%;
  max-width: 620px;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.light .hero-art-img {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.phone-link:hover .hero-art-img {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.6);
}

body.light .phone-link:hover .hero-art-img {
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.12);
}

/* ========================================================
   ГОРИЗОНТАЛЬНАЯ ПОЛОСА 4 ФИЧИ (КАК В РЕФЕРЕНСЕ)
   ======================================================== */
.features-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 35px 0;
}

.features-inner {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.feature-icon {
  flex-shrink: 0;
  color: var(--text);
  margin-top: 2px;
}

.feature-text h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.feature-text p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ========================================================
   СЕКЦИЯ: ПОДХОДИТ ПОД ЛЮБЫЕ ЗАДАЧИ (6 КАРТОЧЕК)
   ======================================================== */
.categories-section {
  padding: 70px 0 80px;
}

.categories-container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 40px;
}

.categories-header {
  margin-bottom: 35px;
}

.section-title {
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
}

/* Сетка из 6 карточек */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.cat-card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}

.cat-card:hover {
  transform: translateY(-4px);
  border-color: #383838;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.cat-card-img {
  width: 100%;
  height: 110px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 14px;
}

.cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cat-card:hover .cat-card-img img {
  transform: scale(1.05);
}

.cat-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 6px;
}

.cat-card-info h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.cat-card-info p {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.cat-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--arrow-btn-bg);
  color: var(--arrow-btn-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  transition: background 0.2s;
  flex-shrink: 0;
}

.cat-card:hover .cat-card-arrow {
  background: var(--lime);
  color: #000;
}

/* ========================================================
   СЕКЦИЯ: 3 ПРОСТЫХ ШАГА (С РОБОТОМ ИЗ РЕФЕРЕНСА)
   ======================================================== */
.steps-section {
  padding: 50px 0 90px;
  border-top: 1px solid var(--border);
}

.steps-container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 40px;
}

.steps-header {
  text-align: center;
  margin-bottom: 40px;
}

.steps-content-layout {
  display: grid;
  grid-template-columns: 280px 1fr 240px;
  align-items: center;
  gap: 30px;
}

/* Слева: робот с каракулями */
.steps-robot-box {
  display: flex;
  justify-content: center;
  align-items: center;
}

.robot-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 16px;
}

/* По центру: 3 карточки шагов */
.steps-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step-card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 24px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lime);
  color: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
}

.step-desc h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
}

.step-desc p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Справа: CTA кнопка и заметка "Начните уже сегодня" */
.steps-right-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.cta-doodle-text {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}

.doodle-arrow {
  color: var(--lime);
  font-size: 18px;
  margin-bottom: 12px;
  transform: rotate(45deg);
}

.btn-steps-bot {
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
  margin-bottom: 12px;
}

.steps-works-badge {
  flex-direction: column;
  gap: 4px;
}

/* ========================================================
   ПОДВАЛ
   ======================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--bg-secondary);
}

.footer-container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-right {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-right a:hover {
  color: var(--text);
}

/* ========================================================
   АДАПТИВНОСТЬ ПОД ПЛАНШЕТЫ И СМАРТФОНЫ (MOBILE-FIRST POLISH)
   ======================================================== */
@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .features-inner {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-content-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .steps-robot-box {
    margin: 0 auto;
  }
  .steps-right-box {
    margin: 0 auto;
    max-width: 300px;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .nav-inner {
    padding: 0 24px;
  }
  .hero-container {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-left {
    text-align: center;
  }
  .hero-eyebrow {
    margin: 0 auto 20px;
    display: inline-block;
    text-align: left;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    max-width: 520px;
    margin: 0 auto;
    text-align: left;
  }
  .hero-right {
    order: -1; /* На средних экранах витрина айфона идет сразу за заголовком или вверху */
  }
  .steps-cards-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  /* Шапка на мобильном */
  .navbar {
    height: 66px;
  }
  .nav-inner {
    padding: 0 16px;
    gap: 8px;
  }
  .brand-bot, .brand-perekup {
    font-size: 18px;
  }
  .brand-line {
    width: 42px;
    height: 4px;
    margin-top: 3px;
  }
  .works-badge {
    display: none; /* скрываем длинный бейдж в тесной шапке */
  }
  .btn-channel {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 12px;
    gap: 6px;
  }
  .btn-channel svg {
    width: 14px;
    height: 14px;
  }
  .btn-open-bot {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 12px;
    gap: 6px;
  }
  .btn-open-bot svg {
    width: 12px;
    height: 12px;
  }
  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 13px;
    flex-shrink: 0;
  }

  /* Первый экран Hero */
  .hero-block {
    padding: 28px 0 32px;
  }
  .hero-container {
    padding: 0 16px;
    gap: 26px;
  }
  .hero-right {
    order: unset; /* в самом мобильном сначала текст, потом фото */
  }
  .hero-eyebrow {
    font-size: 13px;
    margin-bottom: 14px;
  }
  .hero-headline {
    font-size: clamp(34px, 9.5vw, 44px);
    letter-spacing: -0.04em;
    margin-bottom: 16px;
  }
  .lime-pill {
    padding: 0 8px;
    border-radius: 6px;
  }
  .hero-desc {
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 22px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-bottom: 26px;
  }
  .hero-actions a {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
  }
  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 14px 10px;
    padding-top: 18px;
    text-align: left;
    max-width: 100%;
  }
  .stat-value {
    font-size: 14px;
  }
  .stat-label {
    font-size: 11px;
  }
  .hero-art-box {
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  /* Полоса фич */
  .features-bar {
    padding: 22px 0;
  }
  .features-inner {
    padding: 0 16px;
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .feature-item {
    gap: 12px;
  }
  .feature-icon svg {
    width: 22px;
    height: 22px;
  }
  .feature-text h3 {
    font-size: 15px;
    margin-bottom: 3px;
  }
  .feature-text p {
    font-size: 12px;
    line-height: 1.4;
  }

  /* Секция категорий (аккуратная сетка 2x3 на телефоне) */
  .categories-section {
    padding: 42px 0 46px;
  }
  .categories-container {
    padding: 0 16px;
  }
  .categories-header {
    margin-bottom: 20px;
    text-align: left;
  }
  .section-title {
    font-size: clamp(26px, 7.5vw, 34px);
    margin-bottom: 6px;
  }
  .section-subtitle {
    font-size: 13px;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .cat-card {
    padding: 8px;
    border-radius: 14px;
  }
  .cat-card-img {
    height: 85px;
    border-radius: 10px;
    margin-bottom: 8px;
  }
  .cat-card-info h3 {
    font-size: 13px;
  }
  .cat-card-info p {
    font-size: 10px;
  }
  .cat-card-arrow {
    width: 22px;
    height: 22px;
    font-size: 13px;
  }

  /* Секция 3 шагов */
  .steps-section {
    padding: 38px 0 50px;
  }
  .steps-container {
    padding: 0 16px;
  }
  .steps-header {
    margin-bottom: 24px;
  }
  .steps-content-layout {
    gap: 24px;
  }
  .robot-img {
    max-width: 220px;
  }
  .steps-cards-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .step-card {
    padding: 16px 14px;
    border-radius: 14px;
    gap: 12px;
  }
  .step-badge {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  .step-desc h4 {
    font-size: 14px;
  }
  .step-desc p {
    font-size: 12px;
  }
  .steps-right-box {
    width: 100%;
    max-width: 100%;
  }
  .btn-steps-bot {
    padding: 14px;
    font-size: 15px;
    border-radius: 14px;
  }

  /* Подвал */
  .footer {
    padding: 30px 0;
  }
  .footer-container {
    padding: 0 16px;
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .footer-copy {
    font-size: 12px;
  }
  .footer-right {
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
  }
}
