/* ==========================================================================
   Cup'D — таблица сравнения, карта проектов, заявка «21 день», о компании
   ========================================================================== */

/* ---------------------------------------- Почему инвесторы выбирают ----- */

.why {
  /* в макете секция залита #686868 при 30 % поверх чёрного = #1F1F1F */
  background: var(--c-surface);
}

.why__title {
  margin-left: 17%;
  font-size: clamp(22px, 2.08vw, 40px);
}

.ctable {
  margin-top: 60px;
  font-size: var(--fs-small);
}

.ctable__head,
.ctable__row {
  display: grid;
  grid-template-columns: minmax(0, 452fr) minmax(0, 474fr) minmax(0, 475fr);
  align-items: stretch;
}

.ctable__head { min-height: 112px; }

.ctable__th {
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px solid var(--c-stroke-soft);
  font-family: var(--f-display);
  font-size: var(--fs-cta);
  font-weight: 500;
  letter-spacing: var(--display-tracking);
  text-align: center;
  text-transform: uppercase;
}

.ctable__th--own {
  border-color: var(--c-yellow);
  background: var(--c-yellow);
}

.ctable__th--own img { width: 120px; height: auto; }

.ctable__label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 14px 0;
  border-top: 1px solid var(--c-stroke);
  font-size: var(--fs-small);
  line-height: 1.2;
}

.ctable__head .ctable__label { border: 0; }

.ctable__icon { width: 39px; height: 39px; flex-shrink: 0; object-fit: contain; }

.ctable__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--c-stroke);
  border-left: 1px solid var(--c-stroke);
  border-right: 1px solid var(--c-stroke);
  font-family: var(--f-display);
  font-size: var(--fs-cta);
  font-weight: 500;
  letter-spacing: var(--display-tracking);
  line-height: 1.2;
  text-align: center;
}

/* Колонка Cup'D обведена жёлтым по всей высоте */
.ctable__cell--own {
  border-color: var(--c-yellow);
  border-left-color: var(--c-yellow);
  border-right-color: var(--c-yellow);
}

.ctable__row:last-child .ctable__cell { border-bottom: 1px solid var(--c-stroke); }
.ctable__row:last-child .ctable__cell--own { border-bottom-color: var(--c-yellow); }

.mark { width: 26px; height: 26px; flex-shrink: 0; }
.mark--yes { color: var(--c-white); }
.mark--no { color: var(--c-grey); }

.why__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 60px 0 0 17%;
  flex-wrap: wrap;
}

.why__cta-text {
  max-width: 453px;
  font-size: var(--fs-small);
  line-height: 1.3;
}

/* -------------------------------------------------- Карта проектов ------ */

.projects { background: var(--c-bg); }

.projects__head { margin-left: 17%; }

.projects__title { font-size: clamp(22px, 2.08vw, 40px); }

.projects__sub {
  margin-top: 14px;
  color: var(--c-grey);
  font-size: var(--fs-small);
  line-height: 1.2;
  text-transform: uppercase;
}

.mapwrap {
  position: relative;
  width: 100%;
  max-width: 1355px;
  margin: 40px auto 0;
}

/* Карта и точки живут в своём слое: иначе на мобильном, где карточка
   встаёт в поток, проценты точек считаются от всего блока и они
   расползаются по карточке. */
.mapstage {
  position: relative;
  width: 100%;
  aspect-ratio: 1355 / 954;
}

.mapwrap__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- Точки на карте ------------------------------------------------------ */

.mappin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border-radius: 50%;
  background: var(--c-yellow);
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.mappin img { width: 16px; height: 16px; }

.mappin:hover { transform: scale(1.2); }

.mappin.is-active {
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 1), 0 0 0 7px var(--c-yellow);
  transform: scale(1.1);
}

/* Пульсация активной точки */
.mappin.is-active::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px solid var(--c-yellow);
  border-radius: 50%;
  animation: pin-pulse 2.4s var(--ease-out) infinite;
}

@keyframes pin-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

.mapwrap__hint {
  position: absolute;
  right: 2%;
  top: 11%;
  max-width: 280px;
  font-family: var(--f-display);
  font-size: var(--fs-cta);
  font-weight: 500;
  letter-spacing: var(--display-tracking);
  line-height: 1.2;
  text-transform: uppercase;
}

.mapwrap__dot {
  position: absolute;
  right: -34px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-white);
}

/* --- Карточка локации ----------------------------------------------------- */

.mapcard {
  position: absolute;
  left: -4%;
  top: 9%;
  width: 30%;
  min-width: 260px;
  padding: 26px 22px 28px;
  background: var(--c-grey);
  color: #000;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.9);
}

.mapcard__city {
  font-size: clamp(16px, 1.35vw, 26px);
  font-weight: 800;
  letter-spacing: var(--display-tracking);
  line-height: 1.12;
}

.mapcard__geo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: var(--fs-small);
  line-height: 1.2;
}

.mapcard__geo img,
.mapcard__key img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: invert(1);  /* иконки вырезаны белыми, на светлой карточке нужен чёрный */
}

.mapcard__photo {
  width: 100%;
  height: auto;
  margin-top: 16px;
  object-fit: cover;
}

.mapcard__rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.mapcard__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.mapcard__key {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3a3a3a;
  font-size: var(--fs-small);
  line-height: 1.2;
}

.mapcard__val {
  font-family: var(--f-display);
  font-size: var(--fs-cta);
  font-weight: 500;
  letter-spacing: var(--display-tracking);
  text-align: right;
  white-space: nowrap;
}

/* ------------------------------------------- Заявка «через 21 день» ----- */

.leadform { background: var(--c-bg); }

.leadform__inner { position: relative; }

.leadform__title {
  margin-left: 17%;
  font-size: clamp(22px, 2.08vw, 40px);
}

.leadform__box {
  position: relative;
  z-index: 2;
  width: min(571px, 100%);
  margin: 40px 0 0 17%;
}

.leadform__lead {
  margin-bottom: 26px;
  font-size: var(--fs-small);
  line-height: 1.35;
}

.leadform__ghost {
  left: 0;
  top: 30%;
  font-size: clamp(40px, 5.2vw, 100px);
}

/* -------------------------------------------------------- О компании ---- */

.about {
  position: relative;
  background: var(--c-bg);
  padding-bottom: 220px;
}

.about__title {
  margin-left: 17%;
  font-size: clamp(22px, 1.87vw, 36px);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 579fr) minmax(0, 808fr);
  gap: 40px 60px;
  align-items: start;
  margin-top: 60px;
}

/* Белая рамка со сдвигом, как в макете */
.about__media { position: relative; padding: 8px; }

.about__media::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--c-white);
  transform: rotate(-1.4deg);
  pointer-events: none;
}

.about__media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.about__dirs {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.about__dir {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-display);
  font-size: var(--fs-cta);
  font-weight: 500;
  letter-spacing: var(--display-tracking);
  line-height: 1.2;
  text-transform: uppercase;
}

.about__dir img { width: 76px; height: 76px; flex-shrink: 0; object-fit: contain; }

.about__dir-sep { width: 1px; height: 60px; background: var(--c-stroke-soft); }

.about__text {
  margin-top: 20px;
  font-size: var(--fs-small);
  line-height: 1.4;
}

.about .btn { margin-top: 28px; }

.about__ghost {
  left: 0;
  right: 0;
  bottom: 40px;
  width: 100%;
  font-size: clamp(32px, 5.2vw, 100px);
  text-align: center;
}

/* ------------------------------------------------------------ Адаптив --- */

@media (max-width: 1100px) {
  .ctable { font-size: 13px; }
  .ctable__icon { width: 30px; height: 30px; }
  .mapwrap { display: flex; flex-direction: column-reverse; gap: 24px; }
  .mapcard { position: static; width: 100%; min-width: 0; }
  .mapwrap__hint { display: none; }
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 520px; }
}

@media (max-width: 900px) {
  .why__title,
  .why__cta,
  .projects__head,
  .leadform__title,
  .leadform__box,
  .about__title { margin-left: 0; }

  .why__cta { justify-content: flex-start; }
  .leadform__ghost { display: none; }
  .about { padding-bottom: 140px; }
}

@media (max-width: 767px) {
  /* Таблицу кладём в горизонтальную прокрутку — иначе она нечитаема */
  .ctable { overflow-x: auto; }
  .ctable__head,
  .ctable__row { grid-template-columns: minmax(150px, 1fr) minmax(110px, 1fr) minmax(110px, 1fr); min-width: 460px; }
  .ctable__label { padding-right: 10px; gap: 8px; }
  .ctable__icon { width: 24px; height: 24px; }
  .ctable__th--own img { width: 76px; }
  .ctable__cell { padding: 10px 8px; font-size: 12px; }
  .mark { width: 20px; height: 20px; }

  .mappin { width: 20px; height: 20px; margin: -10px 0 0 -10px; }
  .mappin img { width: 10px; height: 10px; }

  .about__dir { font-size: 12px; gap: 10px; }
  .about__dir img { width: 48px; height: 48px; }
  .about__dir-sep { display: none; }
  .about__ghost { bottom: 20px; }
}

/* Пустая карточка локации — пока данных нет */
.mapcard.is-empty .mapcard__city { color: #3a3a3a; font-weight: 600; }
