/* /contacts — only what differs from the site's own blocks (about.css, directions.css, bureau.css, finish.css). */

/* Hero: the 16:9 lobby render inside the 4:3 about-photo frame, cube and contact plates in view */
.ct-hero-photo img { object-position: 74% center; }

/* Contact strip: four cells instead of six, values set as text rather than numbers */
.ct-facts dl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ct-facts dd { font-size: clamp(22px, 2.3vw, 38px); letter-spacing: -.045em; overflow-wrap: anywhere; }
.ct-facts dd a { transition: color .2s ease; }
.ct-facts dd a:hover { color: var(--violet); }
.ct-facts .about-facts-award dd { font-size: clamp(30px, 3.2vw, 52px); font-variant-numeric: tabular-nums; }

/* «Как узнать стоимость проекта» (right after the contact strip): three steps only (the about page has six), so the heading and the steps share one
   column and the photo the other — both columns end up about the same height, centred against each other. */
/* Sits right under the contact strip, whose bottom rule already separates the two */
.ct-start { align-items: center; border-top: 0; }
.ct-start-copy h2 { max-width: 15ch; margin-top: 14px; }
.ct-start .about-steps { margin-top: clamp(20px, 2.4vw, 36px); }
.ct-start .about-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 901px) {
  /* The photo takes the full height of the text column, so the two columns are always equal */
  .ct-start-photo { align-self: stretch; aspect-ratio: auto; min-height: 320px; }
  .ct-start-photo img { position: absolute; inset: 0; }
}

@media (min-width: 901px) {
  .ct-facts dl { grid-template-columns: 1fr 1.15fr 1.5fr .85fr; }
}

/* Ways to reach us: the home-page direction cards, four in a row and a little taller */
.about-page .ct-ways .directions-intro h2 { font-size: clamp(25px, 2.55vw, 46px); }
@media (min-width: 1001px) {
  .ct-ways .directions-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ct-ways .direction-card { height: clamp(200px, 17vw, 310px); }
  .ct-ways .direction-title { font-size: clamp(15px, 1.3vw, 21px); }
}

/* Office: the company block with the map in place of the photo */
.ct-map { position: relative; min-height: clamp(320px, 30vw, 460px); overflow: hidden; background: #ece7f8; }
.ct-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.7); transition: filter .5s ease; }
.ct-map:hover iframe, .ct-map.is-live iframe { filter: none; }
.ct-map-cover { position: absolute; inset: 0; z-index: 1; display: grid; place-items: end center; padding-bottom: 16px; border: 0; background: transparent; cursor: pointer; }
.ct-map-cover > span { padding: 8px 14px; border-radius: 999px; color: white; background: #201c36d9; font-size: 13px; font-weight: 600; opacity: 0; translate: 0 6px; transition: opacity .25s ease, translate .3s var(--ease-out); }
.ct-map:hover .ct-map-cover > span { opacity: 1; translate: 0 0; }
.ct-map.is-live .ct-map-cover { pointer-events: none; }
.ct-map.is-live .ct-map-cover > span { opacity: 0; }
.ct-office .company-copy h2 + p { font-weight: 550; }

@media (max-width: 959px) {
  .ct-map { height: auto; aspect-ratio: auto; min-height: 320px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .ct-facts dl > div:nth-child(4) { border-left: 1px solid var(--line); }
  .ct-facts dl > div:nth-child(n + 4) { border-top: 0; }
}
@media (max-width: 900px) {
  .ct-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-facts dl > div:nth-child(n) { border-left: 0; border-top: 1px solid var(--line); }
  .ct-facts dl > div:nth-child(-n + 2) { border-top: 0; }
  .ct-facts dl > div:nth-child(even) { border-left: 1px solid var(--line); }
}

/* Форма обратной связи под «Как нас найти»: на всю ширину блока, под адресом и списком контактов.
   Светлая, в цветах блока «Офис»; выбранные способы ответа — фиолетовые «таблетки» с галочкой. */
.ct-form {
  grid-column: 1 / -1;
  display: grid;
  gap: clamp(14px, 1.25vw, 18px);
  margin: clamp(2px, .5vw, 8px) 0 0;
  padding: clamp(20px, 2vw, 28px) 0 0;
  border-top: 1px solid #ddd8ec;
  container-type: inline-size;
}
.ct-form-kicker { color: #645d78; font-size: 14px; }
.ct-form-head h3 { margin-top: 6px; font-size: clamp(21px, 1.8vw, 27px); font-weight: 600; line-height: 1.1; letter-spacing: -.045em; }
.ct-form-head h3 + p { margin-top: 6px; color: #4f4a63; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.4; }

.ct-form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 14px 16px; align-items: start; }
/* Узкая колонка (ноутбук, планшет, телефон): имя и способы ответа — друг под другом, чтобы «таблетки» не переносились */
@container (max-width: 600px) { .ct-form-row { grid-template-columns: minmax(0, 1fr); } }
.ct-form-contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px 16px; }
.ct-form-contacts:not(:has(> :not([hidden]))) { display: none; }

.ct-field { display: grid; gap: 6px; min-width: 0; }
.ct-way-field[hidden] { display: none; }
.ct-field > label, .ct-ways legend { color: #4f4a63; font-size: 13px; font-weight: 550; line-height: 1.3; }
.ct-field small, .ct-ways legend small { margin-left: 4px; color: #8a849c; font-size: 12px; font-weight: 450; }
.ct-form input:not([type="checkbox"]), .ct-form textarea {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #ddd8ec;
  border-radius: 12px;
  color: #18172e;
  background: #fff;
  box-shadow: 0 1px 2px #2a1d5a0a;
  font-size: 16px;
  line-height: 1.35;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ct-form textarea { min-height: 92px; resize: vertical; }
.ct-form input::placeholder, .ct-form textarea::placeholder { color: #9b95ad; opacity: 1; }
.ct-form input:not([type="checkbox"]):focus-visible, .ct-form textarea:focus-visible { outline: 0; border-color: #742cf5; box-shadow: 0 0 0 3px #742cf526; }
.ct-form [aria-invalid="true"] { border-color: #d6455d !important; }
.ct-form [aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px #d6455d24 !important; }
.ct-error { color: #c23350; font-size: 12.5px; line-height: 1.3; }
.ct-error:empty { display: none; }

.ct-ways { min-width: 0; margin: 0; padding: 0; border: 0; }
.ct-ways legend { margin: 0 0 6px; padding: 0; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-chip { position: relative; cursor: pointer; }
.ct-chip input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.ct-chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 15px 0 12px;
  border: 1px solid #ddd8ec;
  border-radius: 999px;
  color: #2b2640;
  background: #fff;
  box-shadow: 0 1px 2px #2a1d5a0a;
  font-size: 14px;
  font-weight: 550;
  user-select: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .12s var(--ease-out);
}
.ct-chip span::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #c9c1de;
  border-radius: 50%;
  background: #fff center / 12px no-repeat;
  transition: border-color .15s ease;
}
.ct-chip input:checked + span { border-color: #742cf5; color: #fff; background: #742cf5; }
.ct-chip input:checked + span::before {
  border-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.4 6.3 4.9 8.7 9.6 3.6' fill='none' stroke='%23742cf5' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.ct-chip input:focus-visible + span { outline: 2px solid #742cf5; outline-offset: 3px; }
.ct-chip:active span { transform: scale(.97); }
.ct-ways.is-invalid .ct-chip input:not(:checked) + span { border-color: #e7a3b0; }
@media (hover: hover) {
  .ct-form input:not([type="checkbox"]):hover:not(:focus), .ct-form textarea:hover:not(:focus) { border-color: #c9bfe6; }
  .ct-chip:hover input:not(:checked) + span { border-color: #b9a6ef; }
}

.ct-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ct-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #6925e5;
  box-shadow: 0 4px 22px #7c36ff4d;
  font-size: 15px;
  font-weight: 600;
  transition: background-color .15s ease, transform .16s var(--ease-out), opacity .15s ease;
}
.ct-submit span { transition: transform .2s var(--ease-out); }
.ct-submit:active { transform: scale(.97); }
.ct-submit:focus-visible { outline: 2px solid #742cf5; outline-offset: 3px; }
.ct-submit[aria-busy="true"] { opacity: .72; cursor: progress; }
@media (hover: hover) {
  .ct-submit:hover { background: #7837f1; }
  .ct-submit:hover span { transform: translateX(3px); }
}
.ct-consent { flex: 1 1 220px; max-width: 46ch; color: #7a748c; font-size: 12px; line-height: 1.4; }
.ct-consent a { color: #5d5670; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.ct-consent a:hover { color: #6425ce; }

.ct-status { color: #4f4a63; font-size: 14px; line-height: 1.45; }
.ct-status:empty { display: none; }
.ct-status.is-ok { padding: 13px 16px; border-radius: 12px; color: #3b1a86; background: #f0e8ff; font-weight: 550; }
.ct-status.is-error { color: #c23350; }
.ct-status a { color: #6425ce; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Узкая колонка: три способа ответа — ровной строкой на всю ширину; совсем узко (до 330px) — переносятся */
@container (min-width: 330px) and (max-width: 600px) {
  .ct-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ct-chip span { width: 100%; justify-content: center; padding-inline: 8px; }
}
/* На телефоне кнопка — во всю ширину */
@container (max-width: 420px) { .ct-submit { width: 100%; justify-content: center; } }

/* Ловушка для ботов: человек её не видит, бот заполняет. Не display:none — такие поля боты пропускают. */
.ct-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .ct-way-field:not([hidden]) { animation: ct-field-in .24s var(--ease-out); }
  .ct-status:not(:empty) { animation: ct-field-in .24s var(--ease-out); }
}
@keyframes ct-field-in { from { opacity: 0; transform: translateY(-4px); } }

@media (max-width: 380px) {
  .ct-chips { gap: 6px; }
  .ct-chip span { gap: 6px; padding-inline: 10px 12px; font-size: 13px; }
}
