/* ============================================
   СВОЙ КАНАЛ — Landing Page Styles
   Mobile-first, system fonts, zero dependencies
   ============================================ */

:root {
  /* Colors */
  --bg:           #FFFFFF;
  --bg-alt:      #F8FAFC;
  --bg-hero:     #F0F7FF;
  --text:        #0F172A;
  --text-muted:  #64748B;
  --primary:     #2563EB;
  --primary-dark:#1D4ED8;
  --primary-light:#3B82F6;
  --telegram:    #2AABEE;
  --accent:      #7C3AED;
  --success:     #10B981;
  --border:      #E2E8F0;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --section-py:  64px;
  --container-px: 20px;

  /* Layout */
  --max-w:  1120px;
  --max-w-narrow: 720px;

  /* Radius */
  --r:   12px;
  --r-lg: 20px;
  --r-sm: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow:    0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.10);
  --shadow-xl: 0 24px 64px rgba(0,0,0,.12);
}

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
code { font-family: 'SF Mono', 'Roboto Mono', monospace; font-size: .9em; }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.container-narrow {
  max-width: var(--max-w-narrow);
}

.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary);
  background: #EFF6FF;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-desc {
  margin-top: 16px;
  font-size: 18px;
  color: var(--text-muted);
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--telegram), var(--primary));
  color: #fff;
  padding: 14px 28px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, .4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-light {
  background: #fff;
  color: var(--primary);
  padding: 16px 36px;
  box-shadow: var(--shadow-lg);
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

/* ===== TRIAL NOTE ===== */
.trial-note {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.trial-note-light {
  color: rgba(255,255,255,.8);
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
}

.logo-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-text {
  letter-spacing: -0.01em;
}

.nav-desktop {
  display: none;
  gap: 28px;
}

.nav-desktop a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s ease;
}

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

.header-cta {
  flex-shrink: 0;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--bg-hero) 0%, var(--bg) 100%);
  padding-top: 48px;
  padding-bottom: 56px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(42, 171, 238, .15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(124, 58, 237, .10), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 580px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(28px, 6.5vw, 48px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(16px, 3vw, 19px);
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 32px;
}

.hero-cta-group {
  margin-bottom: 24px;
}

.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.hero-bullets li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 22px;
  position: relative;
}

.hero-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ===== HERO VISUAL ===== */
.hero-visual {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.phone-screenshot {
  width: 300px;
  max-width: 100%;
  background: #0F172A;
  border-radius: 36px;
  padding: 8px;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.phone-screenshot img {
  width: 100%;
  border-radius: 28px;
  display: block;
}

/* ===== CARDS ===== */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  transition: box-shadow .2s ease, transform .2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r);
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.feature-screenshot {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  background: var(--bg-alt);
}

.feature-screenshot img {
  width: 100%;
  display: block;
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===== PROBLEM GRID ===== */
.problem-grid {
  display: grid;
  gap: 20px;
}

.problem-card .card-icon {
  color: #EF4444;
  background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
}

/* ===== SOLUTION FLOW ===== */
.flow-grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.flow-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  text-align: center;
  position: relative;
}

.flow-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-screenshot {
  margin: 8px auto 16px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.flow-screenshot img {
  width: 100%;
  display: block;
}

.flow-step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.flow-step p {
  font-size: 15px;
  color: var(--text-muted);
}

.flow-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* ===== INSTAGRAM ===== */
.ig-grid {
  display: grid;
  gap: 40px;
}

.ig-content {
  max-width: 560px;
}

.ig-content h2 {
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.ig-desc {
  margin-left: 0;
}

.ig-bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.ig-bullets li {
  font-size: 15px;
  color: var(--text);
  padding-left: 28px;
  position: relative;
}

.ig-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / contain;
}

.ig-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ig-visual img {
  width: 100%;
  max-width: 440px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: block;
}

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  gap: 20px;
}

/* ===== STEPS LIST ===== */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: step;
}

.step-item {
  display: flex;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.step-item:last-child {
  border-bottom: none;
}

.step-marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #EFF6FF;
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-marker-done {
  background: var(--success);
  color: #fff;
}

.step-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.step-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
  background: #ECFDF5;
  padding: 3px 10px;
  border-radius: 100px;
}

.step-body p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
}

.step-body code {
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.inline-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .15s ease;
}

.faq-item[open] {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '';
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 22px 20px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== EARLY ACCESS ===== */
.early-access {
  padding-top: 0;
}

.early-card {
  background: linear-gradient(135deg, #F5F3FF, #EFF6FF);
  border: 1px solid #DDD6FE;
  border-radius: var(--r-lg);
  padding: 40px 32px;
  text-align: center;
}

.early-card h2 {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.early-card > p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.early-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  max-width: 420px;
  margin: 0 auto;
}

.early-list li {
  padding-left: 28px;
  position: relative;
  font-size: 15px;
  color: var(--text);
}

.early-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237C3AED' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ===== FINAL CTA ===== */
.cta-final {
  padding-top: 0;
}

.cta-inner {
  background: linear-gradient(135deg, var(--telegram), var(--primary) 60%, var(--accent));
  border-radius: 24px;
  padding: 56px 32px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-inner h2 {
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  position: relative;
}

.cta-inner p {
  font-size: 17px;
  opacity: .9;
  max-width: 520px;
  margin: 0 auto 32px;
  position: relative;
}

.cta-inner .btn-light {
  position: relative;
}

.cta-inner .trial-note {
  position: relative;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}

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

.footer-copy {
  font-size: 13px;
  color: #94A3B8;
}

/* ===== STICKY MOBILE CTA ===== */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 90;
  transform: translateY(100%);
  transition: transform .3s ease;
}

.sticky-cta.visible {
  transform: translateY(0);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}

.reveal-zoom {
  transform: scale(.85);
}

.reveal-left {
  transform: translateX(-44px);
}

.reveal-right {
  transform: translateX(44px);
}

.reveal.revealed {
  opacity: 1;
  transform: none;
}

/* Stagger: cards in grids appear one by one */
.problem-grid .reveal:nth-child(2),
.flow-grid .reveal:nth-child(3),
.features-grid .reveal:nth-child(2),
.steps-list .reveal:nth-child(2) {
  transition-delay: .12s;
}

.problem-grid .reveal:nth-child(3),
.flow-grid .reveal:nth-child(5),
.features-grid .reveal:nth-child(3),
.steps-list .reveal:nth-child(3) {
  transition-delay: .24s;
}

.features-grid .reveal:nth-child(4),
.steps-list .reveal:nth-child(4) {
  transition-delay: .36s;
}

.features-grid .reveal:nth-child(5) {
  transition-delay: .48s;
}

/* ===== RESPONSIVE: TABLET ===== */
@media (min-width: 640px) {
  :root {
    --section-py: 80px;
    --container-px: 32px;
  }

  .hero {
    padding-top: 72px;
    padding-bottom: 80px;
  }

  .hero-cta-group .btn {
    width: auto;
  }

  .problem-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card:nth-child(5) {
    grid-column: span 2;
    max-width: calc(50% - 10px);
    margin: 0 auto;
  }
}

/* ===== RESPONSIVE: DESKTOP ===== */
@media (min-width: 1024px) {
  :root {
    --section-py: 96px;
    --container-px: 40px;
  }

  .nav-desktop {
    display: flex;
  }

  .hero {
    padding-top: 80px;
    padding-bottom: 96px;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
    align-items: center;
  }

  .hero-visual {
    margin-top: 0;
  }

  .hero-content h1 {
    font-size: 44px;
  }

  .flow-grid {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 12px;
  }

  .flow-arrow {
    display: flex;
  }

  .flow-step {
    text-align: left;
  }

  .flow-number {
    left: 24px;
    transform: none;
  }

  .flow-screenshot {
    margin-left: 0;
    margin-right: 0;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-card:nth-child(5) {
    grid-column: span 1;
    max-width: none;
    margin: 0;
  }

  .cta-inner {
    padding: 72px 48px;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .ig-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  /* Sticky CTA only on mobile */
  .sticky-cta {
    display: none;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
