/* CSS variables — Telegram accents on dark #1e1e1e */
:root {
  --bg: #1e1e1e;
  --bg-card: #252525;
  --text: #e4e4e4;
  --text-muted: #8e8e93;
  --accent: #229ed9;
  --accent-hover: #3a96b3;
  --accent-soft: rgba(42, 171, 238, 0.15);
  --border: #3a3a3c;
  --grid: rgba(255, 255, 255, 0.06);
  --touch-min: 44px;
  --container-padding: 20px;
  --section-padding-y: 80px;
  --header-padding: 16px 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 70px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Skip link — доступность и SEO */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Header */
.header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--header-padding);
}

.header__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
  transition: color 0.2s;
  min-height: var(--touch-min);
  align-items: center;
}

.logo:hover {
  color: var(--accent);
}

.logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.logo__img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.btn {
  padding: 12px 20px;
  min-height: var(--touch-min);
  min-width: 160px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 300;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn_header {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn_header:hover {
  background: var(--accent-hover);
  color: white;
  border-color: var(--accent-hover);
}

.btn_primary {
  background: var(--accent);
  color: #fff;
}

.btn_primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Hero — grid background */
.hero {
  position: relative;
  padding: 60px 0 80px;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero__title {
  margin: 0 0 20px;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero__desc {
  margin: 0 0 28px;
  max-width: 480px;
  color: var(--text-muted);
  font-size: clamp(0.9375rem, 1.5vw, 1.05rem);
}

.hero__mockup {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
  margin: 0;
}

.hero__mockup-img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.hero__mockup-placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 24px;
  text-align: center;
  display: none;
}

.hero__mockup:has(.hero__mockup-img[style*="display: none"]) .hero__mockup-placeholder {
  display: block;
}

.hero__mockup:has(.hero__mockup-img:not([style*="display: none"])) .hero__mockup-placeholder {
  display: none;
}

/* Section common */
.section-title {
  margin: 0 0 20px;
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 700;
}

/* About */
.about {
  padding: 60px 0 80px;
  background: var(--bg-card);
}

.about__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about__content {
  max-width: 560px;
}

.about__text {
  margin: 0 0 28px;
  max-width: 640px;
  color: var(--text-muted);
  font-size: clamp(0.9375rem, 1.5vw, 1.05rem);
}

.about__illus {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  min-height: 280px;
}

.about__illus-img {
  max-width: 100%;
  max-height: 280px;
  object-fit: fill;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.about__illus-placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 24px;
  text-align: center;
  display: none;
}

.about__illus:has(.about__illus-img[style*="display: none"]) .about__illus-placeholder {
  display: block;
}

.about__illus:has(.about__illus-img:not([style*="display: none"])) .about__illus-placeholder {
  display: none;
}

/* Conclusion */
.conclusion {
  padding: 60px 0 80px;
  background: var(--bg-card);
  text-align: center;
}

.conclusion .section-title {
  margin-left: auto;
  margin-right: auto;
}

.conclusion__text {
  margin: 0 auto;
  max-width: 640px;
  color: var(--text-muted);
  font-size: clamp(0.9375rem, 1.5vw, 1.05rem);
  line-height: 1.6;
}

/* Benefits */
.benefits {
  padding: 60px 0 80px;
  text-align: center;
}

.benefits .section-title {
  margin-left: auto;
  margin-right: auto;
}

.benefits__intro {
  margin: 0 auto 32px;
  max-width: 640px;
  color: var(--text-muted);
  font-size: clamp(0.9375rem, 1.5vw, 1.05rem);
}

.benefits__list {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 720px;
    text-align: left;
}

.benefits__item {
  position: relative;
  padding-left: 28px;
  color: var(--text);
  font-size: clamp(0.9375rem, 1vw, 1rem);
}

.benefits__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
}

.benefits__item:hover {
  color: var(--accent);
}

/* Footer */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer__copy {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.footer__copy small {
  font-size: inherit;
}

/* Popup — native <dialog> */
.popup {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  margin: 0;
  padding: 20px;
  border: none;
  background: transparent;
  display: none;
  align-items: center;
  justify-content: center;
}

.popup[open] {
  display: flex;
}

.popup::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.popup__box {
  position: relative;
  width: 100%;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.popup__close:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.popup__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.popup__title {
  margin: 0 0 16px;
  font-size: 1.375rem;
  font-weight: 700;
  color: #f5f5f5;
  text-align: center;
}

.popup__text {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.popup__data {
  max-width: 400px;
  margin: 0 auto 24px;
  padding: 20px 30px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  text-align: center;
}

.popup__data p {
  margin: 0 0 8px;
}

.popup__data p:last-child {
  margin-bottom: 0;
}

.popup__data-label {
  font-weight: 300;
  color: #f5f5f5;
}

.popup__data-value {
  font-weight: 700;
  color: #45abca;
}

.popup__actions {
  text-align: center;
}

.popup__copy-btn.copied {
  background: #34c759;
  pointer-events: none;
}

/* ========== Адаптивность ========== */

/* Планшеты и узкие десктопы */
@media (max-width: 1024px) {
  :root {
    --section-padding-y: 60px;
    --container-padding: 24px;
  }

  .hero__inner {
    gap: 32px;
  }

  .hero__mockup,
  .hero__mockup-img {
    min-height: 280px;
    max-height: 280px;
  }
}

/* Планшеты портрет и большие телефоны */
@media (max-width: 768px) {
  :root {
    --container-padding: 20px;
    --header-padding: 12px 16px;
  }

  .hero {
    padding: 40px 0 60px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hero__content {
    order: 1;
  }

  .hero__mockup {
    order: 0;
    min-height: 260px;
  }

  .hero__mockup-img {
    max-height: 260px;
  }

  .hero__desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__content .btn {
    margin: 0 auto;
  }

  .about {
    padding: 48px 0 60px;
  }

  .conclusion {
    padding: 48px 0 60px;
  }

  .about__container {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .about__illus {
    order: 0;
    min-height: 240px;
  }

  .about__content {
    order: 1;
  }

  .about__content .btn {
    margin: 0 auto;
  }

  .benefits {
    padding: 48px 0 60px;
  }

  .benefits__list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Телефоны */
@media (max-width: 480px) {
  :root {
    --container-padding: 16px;
    --header-padding: 12px 16px;
  }

  .header__nav {
    gap: 12px;
  }

  .logo__text {
    font-size: 1.125rem;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.9375rem;
  }

  .hero {
    padding: 32px 0 48px;
  }

  .hero__title {
    margin-bottom: 16px;
  }

  .hero__desc {
    margin-bottom: 24px;
  }

  .hero__mockup {
    min-height: 220px;
    border-radius: 16px;
  }

  .hero__mockup-img {
    max-height: 220px;
  }

  .section-title {
    margin-bottom: 16px;
  }

  .about__text,
  .benefits__intro {
    margin-bottom: 24px;
  }

  .about {
    padding: 40px 0 48px;
  }

  .conclusion {
    padding: 40px 0 48px;
  }

  .benefits {
    padding: 40px 0 48px;
  }

  .footer {
    padding: 20px 0;
  }

  .footer__copy {
    font-size: 0.8125rem;
  }

  .popup__box {
    padding: 24px 20px;
  }

  .popup__close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .popup__title {
    font-size: 1.25rem;
    padding-right: 32px;
  }

  .popup__data {
    padding: 16px 26px;
    margin-bottom: 20px;
  }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
  :root {
    --container-padding: 12px;
  }

  .logo__text {
    font-size: 1rem;
  }

  .btn_header {
    padding: 10px 12px;
  }
}
