/* ============================================================
   OSNOVATOR — Тарифы (pricing.css)
   Дополнение к landing.css. Переиспользует токены :root,
   .container, .section, .btn*, .tariff-card*, .glass-glow.
   ============================================================ */

/* ---------- Hero страницы тарифов ---------- */
.pricing-hero {
  padding: 140px 0 64px;
  text-align: center;
  position: relative;
}

.pricing-hero .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 18px;
}

.pricing-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 20px;
}

.pricing-hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---------- Полоса метрик ---------- */
.pricing-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
}

.pricing-stat {
  text-align: center;
}

.pricing-stat-value {
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-hover), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.pricing-stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
  max-width: 180px;
}

/* ---------- Сетка карточек ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* Карточка концепций — узкая вводная над сеткой */
.pricing-lead {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 40px;
  margin-bottom: 48px;
}

.pricing-lead-body h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.pricing-lead-body p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pricing-lead-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-lead-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.pricing-lead-list svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-hover);
  margin-top: 2px;
}

.pricing-lead-price {
  text-align: center;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid var(--glass-border-strong);
}

.pricing-lead-price .price {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pricing-lead-price .period {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.pricing-lead-price .note {
  display: block;
  color: var(--text-dim);
  font-size: 0.82rem;
  margin: 14px 0 18px;
  line-height: 1.4;
}

/* ---------- Переключатель месяц / год (CSS-only) ---------- */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 40px;
}

.billing-toggle-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.billing-switch {
  position: relative;
  width: 56px;
  height: 30px;
  flex-shrink: 0;
}

.billing-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.billing-switch-track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border-strong);
  transition: background var(--t-base);
}

.billing-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text-primary);
  transition: transform var(--t-base);
}

.billing-switch input:checked + .billing-switch-track {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}

.billing-switch input:checked + .billing-switch-track::after {
  transform: translateX(26px);
}

.billing-save-badge {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.28);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

/* По умолчанию (месяц) подсвечен левый лейбл */
.billing-toggle[data-billing] .billing-label-month { color: var(--text-primary); }
.billing-toggle[data-billing] .billing-label-year { color: var(--text-muted); }

/* Состояние "год" управляется через :has — без JS */
.pricing-section:has(.billing-switch input:checked) .billing-label-month { color: var(--text-muted); }
.pricing-section:has(.billing-switch input:checked) .billing-label-year { color: var(--text-primary); }

/* Переключение цен облака */
.hosting-price-yearly { display: none; }
.pricing-section:has(.billing-switch input:checked) .hosting-price-monthly { display: none; }
.pricing-section:has(.billing-switch input:checked) .hosting-price-yearly { display: flex; }

.hosting-year-total {
  font-size: 0.85rem;
  color: var(--amber);
  margin: -12px 0 20px;
}
.hosting-month-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: -12px 0 20px;
}
.pricing-section:has(.billing-switch input:checked) .hosting-month-note { display: none; }
.pricing-section:not(:has(.billing-switch input:checked)) .hosting-year-total { display: none; }

/* ---------- Pro-редактор: pay-as-you-go ---------- */
.tariff-card .price-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  align-self: center;
}

.pro-highlight {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: #C4B5FD;
  margin-bottom: 20px;
}

.pro-highlight svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-hover);
  margin-top: 1px;
}

/* ---------- Баннер кастомных доработок ---------- */
.custom-banner {
  margin-top: 72px;
  padding: 48px;
  text-align: center;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border-strong);
  background:
    radial-gradient(ellipse 80% 120% at 50% 0%, rgba(139, 92, 246, 0.16) 0%, transparent 60%),
    var(--bg-card-solid);
}

.custom-banner .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 16px;
}

.custom-banner h3 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}

.custom-banner p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.55;
}

.custom-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.custom-chip {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border-strong);
}

/* ---------- Точечные услуги (пополняемый список) ---------- */
.addons {
  margin-top: 32px;
}

.addons-head {
  text-align: center;
  margin-bottom: 24px;
}

.addons-head h4 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.addons-head p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.5;
}

.addon-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.addon-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  transition: border-color var(--t-base), transform var(--t-base);
}

.addon-row:hover {
  border-color: var(--glass-border-strong);
  transform: translateY(-2px);
}

.addon-row-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.22);
}

.addon-row-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent-hover);
}

.addon-row-body {
  flex: 1;
  min-width: 0;
}

.addon-row-body h5 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.addon-row-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.addon-row-price {
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}

.addons-self-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.addons-self-note svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-hover);
  margin-top: 1px;
}

@media (max-width: 560px) {
  .addon-row {
    flex-wrap: wrap;
    gap: 14px;
  }
  .addon-row-price {
    margin-left: 56px;
  }
}

/* ---------- FAQ оплаты ---------- */
.pricing-faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
  .pricing-lead {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 24px;
  }
  .pricing-stats {
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .pricing-hero {
    padding: 120px 0 48px;
  }
  .pricing-stat-value {
    font-size: 2rem;
  }
}
