:root {
  --navy: #313457;
  --navy-deep: #242645;
  --blue: #5375ba;
  --blue-logo: #134785;
  --coral: #ef584d;
  --magenta: #c74675;
  --ink: #242645;
  --muted: #5c6078;
  --line: rgba(49, 52, 87, 0.14);
  --paper: #ffffff;
  --mist: #eef1f8;
  --soft: #e4e8f3;
  /* Onest — web-близкий к Formular; один шрифт для текста и цифр */
  --font: "Onest", "Helvetica Neue", "Segoe UI", sans-serif;
  --display: "Onest", "Helvetica Neue", "Segoe UI", sans-serif;
  --mono: "Onest", "Helvetica Neue", "Segoe UI", sans-serif;
  --brand-gradient: linear-gradient(
    105deg,
    #ef584d 0%,
    #c74675 28%,
    #784ca2 58%,
    #5375ba 100%
  );
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 40% at 100% -10%, rgba(83, 117, 186, 0.18), transparent),
    radial-gradient(ellipse 50% 35% at 0% 0%, rgba(239, 88, 77, 0.1), transparent),
    linear-gradient(180deg, #f7f8fc 0%, #eef1f8 100%);
  line-height: 1.45;
}

.page {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0 8px;
}

.partners {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.partners__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
  overflow: hidden;
}

.partners__logo img {
  display: block;
  width: auto;
  height: 28px;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
}

.partners__logo--vasta img {
  height: 30px;
  width: 136px;
}

.partners__logo--bt img {
  height: 26px;
  width: 146px;
}

.partners__x {
  color: var(--coral);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
}

.top__links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.top__links a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.top__links a:hover {
  color: var(--coral);
}

.top__alt {
  color: var(--muted) !important;
  font-weight: 500 !important;
}

.hero {
  padding: 56px 0 36px;
  max-width: 48rem;
  animation: rise 0.7s ease both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(2.5rem, 6.5vw, 4rem);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--navy);
}

.hero__sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.14rem;
  max-width: 36rem;
}

.values {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 0;
}

.values li {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--navy);
}

.values li:not(:last-child)::after {
  content: "·";
  color: var(--coral);
  font-weight: 700;
  margin-left: 10px;
}

.thesis {
  margin: 0 0 24px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 4px;
  line-height: 1.35;
}

.thesis__part {
  display: inline;
}

.thesis__sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 6px;
  color: var(--coral);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--coral {
  background: var(--coral);
  color: #fff;
}

.btn--ghost {
  border: 1px solid rgba(49, 52, 87, 0.22);
  color: var(--navy);
}

.section {
  padding: 44px 0 12px;
  scroll-margin-top: 20px;
}

.section__head {
  margin-bottom: 18px;
  max-width: 40rem;
}

#matrix .section__head {
  max-width: 36rem;
}

#matrix .section__head p {
  font-size: 0.95rem;
  line-height: 1.4;
}

.section__head h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--navy);
}

.section__head p {
  margin: 0;
  color: var(--muted);
}

/* Approach rail */
.rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 8px;
  padding: 8px 0 18px;
}

.rail__cell {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.rail__line {
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 1px;
  background: rgba(49, 52, 87, 0.18);
  pointer-events: none;
}

.rail__line--soft {
  background: repeating-linear-gradient(
    90deg,
    rgba(239, 88, 77, 0.5),
    rgba(239, 88, 77, 0.5) 4px,
    transparent 4px,
    transparent 8px
  );
}

.rail__step {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  max-width: 140px;
  min-height: 132px;
  height: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
}

.rail__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1.5px solid rgba(49, 52, 87, 0.2);
  transition: 0.18s ease;
}

.rail__step:hover .rail__dot {
  border-color: var(--blue);
}

.rail__step.is-active .rail__dot {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.rail__step.is-next .rail__dot {
  border-color: rgba(239, 88, 77, 0.55);
  color: var(--coral);
}

.rail__step.is-next.is-active .rail__dot {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.rail__name {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--navy);
  line-height: 1.2;
  max-width: 9.5rem;
  min-height: 3.6em;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.rail__badge {
  margin-top: auto;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

.rail__step.is-next .rail__badge {
  color: var(--coral);
}

.detail {
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  animation: rise 0.45s ease both;
}

.detail__kicker {
  margin: 0 0 6px;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.8vw, 1.7rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--navy);
  line-height: 1.15;
  max-width: 28rem;
}

.detail__cost {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(19, 71, 133, 0.06);
  border: 1px solid rgba(19, 71, 133, 0.12);
}

.detail__cost-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail__cost-value {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.detail__cost-note {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
}

.detail__label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--coral);
}

.detail__grid p:last-child {
  margin: 0;
  color: var(--ink);
}

/* Matrix */
.matrix-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: start;
}

.matrix-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(49, 52, 87, 0.06);
  min-width: 0;
}

.uk-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--navy-deep);
}

.uk-bar__cell {
  padding: 12px 14px;
  background: linear-gradient(160deg, var(--navy), #3a4070);
  color: #f4f6fb;
}

.uk-bar__cell:last-child {
  background: linear-gradient(160deg, #2c3158, #44528f);
}

.uk-bar__n {
  margin: 0 0 2px;
  font-family: var(--mono);
  font-size: 0.68rem;
  opacity: 0.72;
}

.uk-bar__name {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.uk-bar__price {
  margin: 0;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.88rem;
}

.table-scroll {
  overflow-x: hidden;
  width: 100%;
}

.matrix {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.matrix .col-obj {
  width: 28%;
}

.matrix .col-s3,
.matrix .col-s4 {
  width: 16%;
}

.matrix .col-s5 {
  width: 22%;
}

.matrix .col-sum {
  width: 18%;
}

.matrix th {
  text-align: left;
  padding: 10px 10px;
  background: var(--soft);
  font-family: var(--display);
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
}

.th-step {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.th-step__n {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.th-step__name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}

.matrix td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.matrix tr.is-off td {
  opacity: 0.42;
}

.matrix tr:last-child td {
  border-bottom: 0;
}

.obj-pick {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.obj-pick input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: var(--coral);
}

.obj-pick__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.obj-name {
  display: block;
  margin: 0;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  font-size: 0.86rem;
}

.obj-meta {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(239, 88, 77, 0.12);
  color: var(--coral);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.check--dense {
  gap: 6px;
}

.check input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--coral);
}

.cell-money {
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--navy);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cell-money--sum {
  font-size: 0.86rem;
}

.cell-money small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.68rem;
  white-space: normal;
  line-height: 1.25;
}

.cell-money small.muted {
  color: var(--muted);
  font-weight: 500;
}

.matrix-foot {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--mist);
}

.matrix-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.btn-text {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--blue-logo);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0;
}

.btn-text:hover {
  color: var(--coral);
}

.tier-legend {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.totals {
  position: sticky;
  top: 16px;
  padding: 18px 16px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(239, 88, 77, 0.18), transparent 40%),
    linear-gradient(160deg, var(--navy-deep), #353a66 60%, #44528f);
  color: #f4f6fb;
  box-shadow: 0 18px 40px rgba(49, 52, 87, 0.18);
}

.totals__label {
  margin: 0 0 8px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  opacity: 0.72;
}

.totals__value {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.totals__horizon {
  margin: 0 0 14px;
  font-size: 0.85rem;
  opacity: 0.75;
}

.totals__rows {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.totals__rows div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  line-height: 1.3;
}

.totals__rows div span:last-child {
  font-family: var(--mono);
  font-weight: 600;
  white-space: nowrap;
}

.totals__vat {
  margin: 14px 0 0;
  font-size: 0.8rem;
  opacity: 0.7;
}

.cta {
  margin: 48px 0 24px;
  padding: 34px 32px;
  border-radius: 22px;
  background:
    var(--brand-gradient),
    var(--navy);
  background-blend-mode: soft-light, normal;
  background-color: var(--navy);
  color: #fff;
}

.cta h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 1.9rem;
  letter-spacing: 0.02em;
}

.cta p {
  margin: 0 0 8px;
  max-width: 40rem;
}

.cta__meta {
  opacity: 0.78;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 22px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.footer__brand img {
  display: block;
  width: auto;
  height: 28px;
}

.footer__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}

.footer__name {
  font-weight: 600;
  color: var(--navy);
}

.footer__tg {
  color: var(--blue-logo);
  font-weight: 600;
  text-decoration: none;
}

.footer__tg:hover {
  text-decoration: underline;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .matrix-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
}

@media (max-width: 980px) {
  .matrix-layout,
  .detail__grid {
    grid-template-columns: 1fr;
  }

  .totals {
    position: static;
  }

  .uk-bar {
    grid-template-columns: 1fr;
  }

  .rail {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(96px, 1fr));
  }
}

@media (max-width: 720px) {
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .matrix {
    table-layout: auto;
    min-width: 620px;
  }
}

@media (max-width: 640px) {
  .page {
    width: calc(100% - 28px);
  }

  .top {
    flex-direction: column;
    align-items: flex-start;
  }

  .partners__logo--vasta img {
    height: 26px;
    width: 118px;
  }

  .partners__logo--bt img {
    height: 22px;
    width: 124px;
  }
}
