/* ============================================================
   FEATURES, PLATFORMS, PRICING, DOWNLOAD, FOOTER
   ============================================================ */

/* ─── FEATURES (что внутри) ──────────────────────── */
.features {
  padding: clamp(56px, 7.5vw, 112px) 0;
  position: relative;
  border-top: 1px solid var(--line);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 56px;
}
@media (max-width: 920px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }

.feature {
  padding: 28px 26px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s;
}
.feature:hover { border-color: var(--red-line); transform: translateY(-2px); }
.feature::before {
  content: "";
  position: absolute; inset: -1px;
  background: radial-gradient(280px 200px at var(--mx, 50%) var(--my, 0%), rgba(251,26,38,0.18), transparent 60%);
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.feature:hover::before { opacity: 1; }
.feature .num {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--red-0);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.feature .num .glyph {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red-soft);
  color: var(--red-0);
  font-weight: 700;
  font-family: var(--ff-sans);
}
.feature h4 { color: var(--ink-0); margin-bottom: 10px; }
.feature p { color: var(--ink-2); font-size: 15px; }
.feature .corner {
  position: absolute; right: -10px; bottom: -10px;
  font-family: var(--ff-serif); font-style: italic;
  font-size: 120px; line-height: 1; color: rgba(251,26,38,0.07);
  pointer-events: none;
}

/* ─── PLATFORMS (mac/win/android/ios) ────────────── */
.platforms {
  padding: clamp(56px, 7.5vw, 112px) 0;
  position: relative;
  border-top: 1px solid var(--line);
}
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 56px;
}
@media (max-width: 920px) { .platforms-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .platforms-grid { grid-template-columns: 1fr; } }

.platform {
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 180px;
  position: relative;
  transition: border-color .25s, transform .25s;
}
.platform:hover { border-color: var(--red-line); transform: translateY(-2px); }
.platform .icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono);
  font-size: 12px; color: var(--ink-0);
  letter-spacing: 0.05em;
  border: 1px solid var(--line-strong);
}
.platform h4 { font-size: 22px; }
.platform .v { color: var(--ink-2); font-size: 13px; }
.platform .state {
  margin-top: auto;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.platform .state.ok { color: var(--red-0); }
.platform .state.soon { color: var(--ink-3); }
.platform .state::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  margin-right: 8px; vertical-align: middle;
  background: currentColor;
}

/* ─── PRICING ─────────────────────────────────────── */
.pricing {
  padding: clamp(56px, 7.5vw, 112px) 0;
  position: relative;
  border-top: 1px solid var(--line);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* v66: 4 tiers (Free/Pro/Ultra/Enterprise) */
  gap: 14px;
  margin-top: 56px;
}
@media (max-width: 1180px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .pricing-grid { grid-template-columns: 1fr; } }

.plan {
  padding: 30px 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg-2);
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 480px;
}
.plan.pro {
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(251,26,38,0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border-color: var(--red-line);
}
.plan.business {
  background:
    linear-gradient(180deg, var(--bg-2), var(--bg-3));
  border-color: var(--line-strong);
}
/* Ultra — between Pro (signal-red highlight) and Enterprise (muted).
   Slightly cooler / more premium feel via a faint blue-violet wash. */
.plan.ultra {
  background:
    radial-gradient(400px 280px at 100% 0%, rgba(110, 122, 171, 0.14), transparent 65%),
    linear-gradient(180deg, var(--bg-2), var(--bg-3));
  border-color: var(--line-strong);
}
.plan.ultra .pname { color: var(--viz-2, #8A9AD0); }
.plan .pname {
  font-family: var(--ff-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
  /* min-height = max possible height with ribbon — keeps price lines
     across all 4 cards aligned regardless of whether the card has a
     "выбор большинства" ribbon. */
  min-height: 22px;
}
.plan.pro .pname { color: var(--red-0); }
.plan .pname .ribbon {
  margin-left: auto;
  background: var(--red-0); color: #fff;
  padding: 3px 8px; border-radius: 999px;
  font-size: 9px; letter-spacing: 0.12em;
}
/* Two-line price layout — amount jumbo на верхней строке, «₽ / месяц»
   ниже отдельным блоком меньшего шрифта. Так у всех 4 карточек
   (Free/Pro/Ultra/Enterprise) визуально одинаковый вес цены и не
   возникает word-wrap «950 ₽ в \n месяц». Enterprise попадает в тот же
   slot со словом «По запросу» вместо числа — кегль ниже через
   `font-size: clamp()` с меньшей нижней границей, но font-weight/letter-
   spacing соответствуют остальным карточкам. */
.plan .price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  color: var(--ink-0);
}
.plan .price .amount {
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}
.plan.business .price .amount {
  /* «По запросу» — длиннее любой цифры, не помещается в jumbo. Снижаем
     кегль до уровня pname-секции карточки. */
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.plan .price .per {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0;
  margin-top: 8px;
  white-space: nowrap;
}
.plan .price-note {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 8px;
  max-width: 240px;
}

.plan ul.plan-features {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 0;
  /* flex-grow растягивает список занять всё доступное место в карточке.
     В сочетании с фиксированной .plan-bottom это пушит CTA-ряд во всех
     4 карточках на одну горизонтальную линию вне зависимости от длины
     ul. */
  flex-grow: 1;
}
.plan li {
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
  color: var(--ink-1);
  font-size: 15px;
}
.plan li::before {
  content: "";
  position: absolute; left: 0; top: 22px;
  width: 12px; height: 6px;
  border-left: 2px solid var(--red-0);
  border-bottom: 2px solid var(--red-0);
  transform: rotate(-45deg);
}

/* Plan-bottom — фиксированный по высоте footer карточки: yearly note
   (опционально, для Pro/Ultra) + CTA. Free/Enterprise рендерят пустой
   .yearly-placeholder той же высоты, чтобы CTA всех 4 карточек встали
   ровно на одну горизонтальную линию. */
.plan .plan-bottom {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan .plan-bottom .btn {
  width: 100%;
  justify-content: center;
}
.plan .yearly {
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.05em;
  text-align: center;
  min-height: 14px;       /* высота строки 11px line-height + микро-резерв */
  line-height: 14px;
}
.plan .yearly-placeholder { visibility: hidden; }

/* ─── DOWNLOAD ────────────────────────────────────── */
.download {
  padding: clamp(56px, 7.5vw, 112px) 0;
  position: relative;
  border-top: 1px solid var(--line);
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 48px;
}
@media (max-width: 720px) { .download-grid { grid-template-columns: 1fr; } }
.dl-card {
  padding: 26px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .25s, transform .25s;
}
.dl-card:hover { border-color: var(--red-line); transform: translateY(-2px); }
.dl-card .ic {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono); font-size: 12px; color: var(--ink-0);
}
.dl-card h4 { font-size: 22px; }
.dl-card .det { color: var(--ink-2); font-size: 13px; }
.dl-card .link {
  margin-top: auto; padding-top: 12px;
  font-family: var(--ff-mono); font-size: 12px;
  color: var(--red-0); letter-spacing: 0.1em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
}

/* ─── final CTA ───────────────────────────────────── */
.final-cta {
  padding: clamp(56px, 7.5vw, 112px) 0;
  position: relative;
  border-top: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 1100px; height: 1100px;
  background: radial-gradient(closest-side, rgba(251,26,38,0.16), transparent 65%);
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 0;
}
.final-cta .inner {
  position: relative; z-index: 1;
  max-width: 840px; margin: 0 auto;
}
.final-cta h2 {
  font-size: clamp(48px, 7vw, 120px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.final-cta h2 em { color: var(--red-0); }
.final-cta .ctas {
  margin-top: 32px;
  display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.final-cta .platforms-line {
  margin-top: 28px;
  font-family: var(--ff-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ─── footer ─────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-0);
  padding: 80px 0 40px;
  position: relative;
}
.foot-grid {
  display: grid;
  /* 6 колонок: brand-блок (шире) + 5 равных колонок ссылок.
     Раньше было 5 колонок при 6 child'ах → «Контакты» уезжали на
     вторую строку, создавая неровные зазоры между остальными. */
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 1080px) { .foot-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 720px)  { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px)  { .foot-grid { grid-template-columns: 1fr; } }

.foot h5 {
  font-family: var(--ff-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
  font-weight: 500;
}
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li { padding: 6px 0; }
.foot a { color: var(--ink-1); font-size: 14px; transition: color .2s; }
.foot a:hover { color: var(--red-0); }
.foot .brand { margin-bottom: 14px; }
.foot .tag { color: var(--ink-2); font-size: 14px; max-width: 280px; }
.foot .legal {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.06em;
  flex-wrap: wrap; gap: 10px;
}
