/* ==========================================================================
   ПродАй — страница «Тарифы»
   ========================================================================== */

.pricing {
  background: var(--paper);
}

/* --- Первый экран ------------------------------------------------------------ */

.phero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 96px) 0 clamp(150px, 16vw, 210px);
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.phero__glow {
  position: absolute;
  left: 50%;
  top: 30%;
  width: min(900px, 120vw);
  height: 420px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 30% 50%, rgba(43, 140, 255, 0.35), transparent),
    radial-gradient(closest-side at 55% 45%, rgba(203, 17, 171, 0.32), transparent),
    radial-gradient(closest-side at 75% 55%, rgba(255, 122, 24, 0.3), transparent);
  filter: blur(40px);
  pointer-events: none;
}

.phero__inner {
  position: relative;
}

.phero .eyebrow {
  justify-content: center;
  color: var(--muted-dark);
}

.phero__title {
  max-width: 16ch;
  margin: 14px auto 0;
  font-size: clamp(2.1rem, 5.6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.phero__title span {
  color: var(--signal);
}

.phero__lead {
  max-width: 58ch;
  margin: 20px auto 0;
  color: var(--muted-dark);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.55;
}

.phero__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin-top: 28px;
  font-size: 0.92rem;
  font-weight: 600;
}

.phero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
}

.phero__trust span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(62, 207, 142, 0.18);
  color: #7ee2b8;
  font-size: 0.72rem;
}

/* --- Карточки тарифов ------------------------------------------------------- */

.tariffs {
  position: relative;
  margin-top: clamp(-170px, -14vw, -120px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.tariffs__grid {
  display: grid;
  gap: 18px;
  align-items: stretch;
}

@media (min-width: 980px) {
  .tariffs__grid {
    grid-template-columns: 1fr 1.08fr 1fr;
  }
}

/* Уже трёх колонок главный тариф идёт первым */
@media (max-width: 979px) {
  .tariff--pro {
    order: -1;
  }
}

@media (min-width: 680px) and (max-width: 979px) {
  .tariffs__grid {
    grid-template-columns: 1fr 1fr;
  }

  .tariff--pro {
    grid-column: 1 / -1;
  }
}

.tariff {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  padding: clamp(22px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 30px 60px -40px rgba(13, 18, 32, 0.35);
}

.tariff__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.tariff__name {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.tariff__tag {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font: 500 0.68rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tariff__badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--signal);
  color: #1b1004;
  font: 700 0.8rem/1 var(--body);
}

.tariff__badge[data-discount=""],
.tariff__price s[data-old-price=""] {
  display: none;
}

.tariff__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.tariff__price b {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.tariff__price s {
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration-thickness: 2px;
}

.tariff__price > span {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.92rem;
}

.tariff__desc {
  color: var(--muted);
  line-height: 1.55;
}

.tariff__cta {
  width: 100%;
}

.tariff__list {
  display: grid;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.45;
}

.tariff__list li {
  position: relative;
  padding-left: 30px;
}

.tariff__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(62, 207, 142, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23148a57' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 10.5 2.6 2.6L14 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.tariff__list li.is-stars::before {
  content: "★";
  display: grid;
  place-items: center;
  background: rgba(255, 122, 24, 0.16);
  color: #d85a00;
  font-size: 0.72rem;
}

.tariff__note {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Профессиональный */
.tariff--pro {
  border-color: transparent;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 40px 80px -40px rgba(13, 18, 32, 0.7);
}

.tariff--pro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(140deg, var(--vk), var(--wb) 45%, var(--signal));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.tariff--pro > * {
  position: relative;
  z-index: 1;
}

.tariff__glow {
  position: absolute !important;
  right: -120px;
  top: -120px;
  z-index: 0 !important;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(203, 17, 171, 0.4), transparent);
  pointer-events: none;
}

.tariff--pro .tariff__price s,
.tariff--pro .tariff__price > span,
.tariff--pro .tariff__desc {
  color: var(--muted-dark);
}

.tariff--pro .tariff__list {
  border-top-color: var(--ink-line);
}

.tariff--pro .tariff__list li::before {
  background-color: rgba(62, 207, 142, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%237ee2b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 10.5 2.6 2.6L14 7.5'/%3E%3C/svg%3E");
}

.tariff--pro .tariff__list li.is-stars::before {
  background: rgba(255, 122, 24, 0.22);
  color: #ffb37a;
}

/* Звёзды */
.tariff--stars {
  background: linear-gradient(170deg, #fff7ef 0%, var(--surface) 55%);
}

.tariff__starfield {
  position: absolute;
  right: 18px;
  top: 64px;
  color: var(--signal);
  pointer-events: none;
}

.tariff__starfield i {
  position: absolute;
  font-style: normal;
  line-height: 1;
  opacity: 0.16;
}

.tariff__starfield i:nth-child(1) { right: 0; top: 0; font-size: 72px; }
.tariff__starfield i:nth-child(2) { right: 70px; top: 36px; font-size: 32px; opacity: 0.12; }
.tariff__starfield i:nth-child(3) { right: 18px; top: 86px; font-size: 22px; opacity: 0.1; }

.tariff--stars .tariff__price b {
  color: var(--text);
}

.tariff--stars .tariff__list li::before {
  content: "★";
  display: grid;
  place-items: center;
  background: rgba(255, 122, 24, 0.14);
  color: #d85a00;
  font-size: 0.72rem;
}

/* --- Калькулятор звёзд ------------------------------------------------------- */

/* «Рассчитать звёзды» ведёт сюда — не прячем заголовок под липкой шапкой */
.stars {
  scroll-margin-top: 69px;
}

.stars__inner {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

@media (min-width: 940px) {
  .stars__inner {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  }
}

.stars__steps {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  counter-reset: sstep;
}

.stars__steps li {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 14px 16px 14px 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  counter-increment: sstep;
}

.stars__steps li::before {
  content: counter(sstep);
  position: absolute;
  left: 16px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font: 600 0.8rem/1 var(--mono);
  transform: translateY(-50%);
}

.stars__steps span {
  color: var(--muted);
  font-size: 0.9rem;
}

.calc {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 2.6vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

@media (min-width: 940px) {
  .calc {
    position: sticky;
    top: 92px;
  }
}

.calc__title {
  color: var(--muted);
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.calc__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calc__presets button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 650 0.9rem/1 var(--body);
  cursor: pointer;
}

.calc__presets button:hover {
  border-color: var(--ink);
}

.calc__presets button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.calc__field {
  display: grid;
  gap: 10px;
}

.calc__field label {
  font-weight: 650;
  font-size: 0.92rem;
}

.calc__stepper {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
}

.calc__stepper:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(13, 18, 32, 0.08);
}

.calc__stepper button {
  border: 0;
  background: transparent;
  color: var(--text);
  font: 500 1.4rem/1 var(--body);
  cursor: pointer;
}

.calc__stepper button:hover {
  background: var(--paper);
}

.calc__stepper input {
  min-width: 0;
  min-height: 52px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 700 1.3rem/1 var(--display);
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.calc__stepper input::-webkit-outer-spin-button,
.calc__stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc__stepper input:focus {
  outline: none;
}

.calc__field input[type="range"] {
  width: 100%;
  accent-color: var(--signal);
}

.calc__hint {
  color: var(--muted);
  font-size: 0.84rem;
}

.calc__hint.is-error {
  color: #c43a2f;
}

.calc__total {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.calc__total span {
  color: var(--muted-dark);
  font-weight: 600;
}

.calc__total b {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.calc__total small {
  color: var(--muted-dark);
  font-size: 0.82rem;
}

.calc__cta {
  width: 100%;
}

/* --- Что входит ---------------------------------------------------------------- */

.incl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.incl li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.incl__icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
}

.incl__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.incl li.is-stars .incl__icon {
  background: rgba(255, 122, 24, 0.14);
  color: #d85a00;
}

.incl b {
  font-size: 1rem;
}

.incl li > span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.pfaq {
  max-width: 860px;
}

.pfaq .faq a {
  color: var(--text);
  text-decoration-color: var(--signal);
  text-underline-offset: 3px;
}

/* --- Призыв ------------------------------------------------------------------ */

.pcta {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(43, 140, 255, 0.22), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 122, 24, 0.24), transparent 45%),
    var(--ink);
  color: #fff;
  text-align: center;
}

.pcta__title {
  font-size: clamp(1.8rem, 4.4vw, 3.2rem);
  letter-spacing: -0.04em;
}

.pcta__text {
  max-width: 52ch;
  margin: 16px auto 0;
  color: var(--muted-dark);
}

.pcta .btn--ghost {
  border-color: var(--ink-line);
  color: #fff;
}

.pcta .btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
}
