.hero-offer {
  display: grid;
  grid-auto-rows: 1fr;
  width: min(100%, 360px);
  gap: 8px;
  margin: -8px 0 18px;
}

.hero-price,
.hero-postpay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 60px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #f4dfb7;
  border-left: 4px solid #e4b45e;
  border-radius: 7px;
  background: linear-gradient(135deg, #fff6e5, #efd39e);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18), inset 0 1px 0 #fff9ef;
  color: #143234;
  letter-spacing: 0;
}

.hero-offer span {
  font-size: 10px;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-offer strong {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
}

.terms-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: payment-step;
}

.terms-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 8px 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 650;
  counter-increment: payment-step;
}

.terms-flow li::before {
  content: counter(payment-step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #f3d298;
  border-radius: 50%;
  background: linear-gradient(140deg, #ffe8b7, #d4a654);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .2), inset 0 1px 0 #fff4d7;
  color: #163a3c;
  font-size: 18px;
  font-weight: 750;
}

.terms-flow li:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  top: 50%;
  right: -24px;
  transform: translateY(-50%);
  color: #ecc786;
  font-size: 24px;
  line-height: 24px;
  font-weight: 500;
}

.portfolio-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  gap: 14px;
}

.preview-project {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 63, 66, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 15px 32px rgba(29, 43, 44, .1), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.preview-project::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: 4px;
  background: linear-gradient(90deg, #0f3f42, #4f8b8e, #efc36d);
}

.preview-project:nth-child(2)::before {
  background: linear-gradient(90deg, #8d2f3b, #c25b67, #efc36d);
}

.preview-project:nth-child(3)::before {
  background: linear-gradient(90deg, #b88435, #efc36d, #4f8b8e);
}

.preview-project:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 63, 66, .3);
  box-shadow: 0 22px 42px rgba(29, 43, 44, .16), inset 0 1px 0 rgba(255, 255, 255, .95);
}

.preview-project:focus-visible {
  outline: 3px solid #b88435;
  outline-offset: 4px;
}

.preview-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dfe5e2;
}

.preview-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 58%;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.preview-project:hover .preview-image img {
  transform: scale(1.025);
}

.preview-image::after {
  content: "CONTORA.MOSCOW";
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 4px;
  background: rgba(5, 34, 36, .62);
  color: rgba(255, 255, 255, .88);
  font-size: 9px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  backdrop-filter: blur(5px);
}

.preview-copy {
  min-height: 112px;
  padding: 16px 18px 18px;
}

.preview-copy small {
  display: block;
  margin-bottom: 9px;
  color: var(--wine, #8d2f3b);
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.preview-copy h3 {
  margin: 0 0 7px;
  color: var(--deep-2, #143234);
  font-size: 19px;
  line-height: 1.14;
  font-weight: 800;
  overflow-wrap: normal;
}

.preview-copy span {
  display: block;
  color: #5a6669;
  font-size: 13px;
  line-height: 1.38;
  font-weight: 720;
}

@media (max-width: 640px) {
  .hero-offer {
    width: min(100%, 320px);
    margin: -3px 0 13px;
  }

  .hero-price,
  .hero-postpay {
    min-height: 56px;
    padding: 9px 11px;
    gap: 8px;
  }

  .hero-offer span {
    font-size: 9px;
  }

  .hero-offer strong {
    font-size: 18px;
  }

  .terms-flow {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .terms-flow li {
    min-height: 60px;
  }

  .terms-flow li:not(:last-child)::after {
    content: "\2193";
    top: calc(100% + 1px);
    right: auto;
    left: 12px;
    transform: none;
  }

  .portfolio-preview-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .preview-copy {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-project,
  .preview-image img {
    transition: none;
  }
}
