/* ============================================================================
   SIGVIN — страница KONTAKT (Figma 581:*). Собрана из готовых блоков:
     1 khontakt-hero — тёмный hero «Skontaktuj się / z nami» + 3 контакт-ячейки (581:6630)
     2 kform         — НОВЫЙ блок контакт-формы «Wypełnij Formularz» (581:7070)
     3 cta           — «Omówimy Twój projekt» (cta.css, 581:7032)
     4 footer        — стандартный (581:7189)
   ========================================================================== */

/* ===================== BLOCK 1: HERO + контакт-ячейки ============= */
.khontakt-hero {
  position: relative; z-index: 1;
  width: var(--frame-w); max-width: 100%;
  height: 100vh; min-height: 848px; margin: 0 auto;   /* тянем на весь экран, как .hero — без полоски след. блока */
  overflow: hidden; isolation: isolate;
  border-radius: 0;                        /* #1 фон hero без скруглений */
  background: var(--dark-black);
}
.khontakt-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; }
.khontakt-hero__overlay { position: absolute; inset: 0; background: var(--dark-32); z-index: 1; pointer-events: none; }
.khontakt-hero .hero__sep { z-index: 2; }
.khontakt-hero__nav {
  position: absolute; top: var(--margin); left: 50%; transform: translateX(-50%);
  width: calc(var(--frame-w) - var(--margin) * 2); max-width: calc(100% - var(--margin) * 2);
  z-index: 5;
}
.khontakt-hero__content {
  position: absolute; inset: 0; z-index: 2;
  padding: 150px 80px 56px;
  display: flex; flex-direction: column; align-items: flex-start;
}
.khontakt-hero__title { color: var(--light-white); }
.khontakt-hero__title .t-h1-thin { display: block; }
.khontakt-hero__title .t-h1 { display: block; padding-left: 600px; margin-top: -42px; }  /* болд-строка со сдвигом + нахлёст */
.khontakt-hero__sub { margin-top: 24px; max-width: 588px; color: var(--light-white); }

/* #1 бар (контакт-плажки + кнопка): отступ от подтекста 56px (было auto), позиция ~80×550 */
.khontakt-hero__bar { margin-top: 56px; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 81px; }   /* плашки/кнопка — 56px под подтекстом (подняты вверх, не прижаты к низу) */
.khontakt-hero__cells { flex: 0 1 953px; display: flex; align-items: stretch; }   /* #2 контейнер 953, 3 ячейки поровну */
.kontakt-cell {
  flex: 1 1 0; min-width: 0; box-sizing: border-box; height: 176px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  padding: 16px 32px; border-radius: 0;
  --glass-border: var(--light-16); --corner-color: var(--light-white);
  color: inherit; text-decoration: none; cursor: pointer;   /* #1 плажка-ссылка */
  transition: background-color .25s ease;
}
.kontakt-cell:hover { background: var(--light-8); z-index: 1; }   /* #1 подсветка при наведении */
.kontakt-cell + .kontakt-cell { margin-left: -1px; }   /* общие границы */
.kontakt-cell__vals { display: flex; flex-direction: column; gap: 4px; }
.kontakt-cell__label { color: var(--light-48); }
.kontakt-cell__value { color: var(--light-white); font: 700 32px/40px "adineue PRO Cyr", sans-serif; letter-spacing: 0.01em; }
.kontakt-cell__sub { color: var(--light-48); font: 400 18px/28px "Geologica Cursive", sans-serif; letter-spacing: -0.05em; }
a.kontakt-cell__value { transition: opacity .2s ease; }
a.kontakt-cell__value:hover { opacity: .7; }
.khontakt-hero__btn { flex: none; }

/* ===================== BLOCK 2: WYPEŁNIJ FORMULARZ (form) ========= */
.kform {
  position: relative; z-index: 2;
  width: var(--frame-w); max-width: 100%;
  margin: -40px auto 0; padding: 96px 0;
  background: var(--light-white); border-radius: var(--r-card);
  overflow: hidden;
}
.kform__inner { width: var(--content-w); max-width: calc(100% - 160px); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 48px; }
.kform__head { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.kform__heading .t-h2-thin, .kform__heading .t-h2 { color: var(--dark-black); }
.kform__sub { color: var(--dark-black); font: 700 24px/32px "adineue PRO Cyr", sans-serif; letter-spacing: 0.02em; }
.kform__sub-dim { color: var(--dark-64); }

.kform__form { width: 620px; max-width: 100%; display: flex; flex-direction: column; gap: 32px; }
.kform__fields { display: flex; flex-direction: column; gap: 24px; }
.kform__row { display: flex; gap: 24px; }
.kform__field { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.kform__label { color: var(--dark-64); }
.kform__label i { font-style: normal; color: var(--dark-48); }
.kform__box {
  position: relative; background: var(--light-light); border-radius: 0;
  --glass-border: var(--border-dark); --corner-color: var(--dark-48);
  transition: background-color .2s ease;
}
.kform__box:hover { background: #ececec; }                                   /* #3 ховер — затемнение */
.kform__box:focus-within { background: #ececec; --glass-border: var(--dark-32); --corner-color: var(--dark-black); }  /* #3 актив — обводка темнее */
.kform__input, .kform__textarea {
  width: 100%; box-sizing: border-box; border: 0; background: transparent; outline: none;
  color: var(--dark-black); font: 500 14px/20px "Geist Mono", monospace; letter-spacing: -0.01em; text-transform: uppercase;
}
.kform__input { height: 56px; padding: 18px 24px; }
.kform__textarea { min-height: 100px; padding: 16px 24px; resize: vertical; text-transform: none; }
.kform__input::placeholder, .kform__textarea::placeholder { color: var(--dark-32); }

/* сегмент-переключатель «Rodzaj zapytania» */
.kform__toggle { display: flex; gap: 0; padding: 4px; background: var(--light-light); border-radius: var(--r-pill); }
.kform__toggle-item {
  position: relative;
  flex: 1 1 0; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; border-radius: var(--r-pill); cursor: pointer;
  color: var(--dark-64); font: 700 16px/24px "adineue PRO Cyr", sans-serif; letter-spacing: 0.02em; text-transform: uppercase;
  transition: background-color .25s ease, color .25s ease;
}
.kform__toggle-item.is-active { background: var(--light-white); color: var(--dark-black); }
/* точка-разделитель между соседними неактивными табами (Figma 605:1320) */
.kform__toggle-item:not(.is-active) + .kform__toggle-item:not(.is-active)::before {
  content: ""; position: absolute; left: -1px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 2px; border-radius: 0.643px; background: var(--dark-24);
}

/* Budżet — 3 плитки (gap 12); активная (по клику) = ЧЁРНАЯ */
.kform__budget { display: flex; gap: 12px; }
.kform__budget-item {
  position: relative; flex: 1 1 0; min-width: 0; height: 56px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; border: 0; cursor: pointer; white-space: nowrap;
  background: var(--light-light); border-radius: 0;
  --glass-border: var(--border-dark); --corner-color: var(--dark-48);
  font: 500 14px/20px "Geist Mono", monospace; letter-spacing: -0.01em; text-transform: uppercase;
  transition: background-color .2s ease;
}
.kform__budget-item:hover { background: #ececec; }
.kform__budget-pre { color: var(--dark-32); }
.kform__budget-num { color: var(--dark-black); }
.kform__budget-item.is-active { background: var(--dark-black); --glass-border: var(--light-16); --corner-color: var(--light-white); }
.kform__budget-item.is-active .kform__budget-pre { color: var(--light-48); }
.kform__budget-item.is-active .kform__budget-num { color: var(--light-white); }

/* Dołącz plik CV — плажка загрузки на всю ширину (иконка-скрепка + текст) */
.kform__file {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px;
  cursor: pointer; background: var(--light-light); border-radius: 0;
  --glass-border: var(--border-dark); --corner-color: var(--dark-48);
  color: var(--dark-64); transition: background-color .2s ease, color .2s ease;
}
.kform__file:hover { background: #ececec; color: var(--dark-black); }
.kform__file.has-file { color: var(--dark-black); }
.kform__file-icon { display: flex; width: 20px; height: 20px; flex: none; }
.kform__file-icon svg { width: 100%; height: 100%; }
.kform__file-text { color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* набор полей зависит от активного таба: Rekrutacja прячет Firma+Budżet, показывает CV */
.kform__form[data-type="Rekrutacja"] [data-only="default"] { display: none; }
.kform__form:not([data-type="Rekrutacja"]) [data-only="rekrutacja"] { display: none; }

/* submit = базовая .btn-split (чёрная), растянутая на всю ширину */
.kform__submit.btn-split { width: 100%; cursor: pointer; }
.kform__submit .btn-split__text { flex: 1 1 auto; justify-content: center; }
.kform__thanks { display: none; margin-top: 4px; color: var(--color-green); font: 500 14px/20px "Geist Mono", monospace; letter-spacing: -0.01em; text-transform: uppercase; }
.kform.is-sent .kform__thanks { display: block; }

/* ===================== НАЕЗД-ЦЕПОЧКА (scoped) ===================== */
.page--kontakt .khontakt-hero { z-index: 1; }
/* cta оставляем sticky z1: форма (z2) наезжает сверху, футер снизу */


/* ============================ MOBILE (≤1024) ==================== */
@media (max-width: 1024px) {
  /* #1 адаптив хиро (Figma 597:15903): заголовок 64 → подтекст (24) → плажки (32),
     плажки сразу под текстом (не прижаты к низу), кнопки нет */
  /* образец O nas: hero растёт под контент, контент в ПОТОКЕ (не absolute) → ничего не режется/не наезжает */
  .khontakt-hero { width: 100%; height: auto; min-height: 100svh; border-radius: 0; display: flex; flex-direction: column; }
  .khontakt-hero__bg { object-position: 65% center; }   /* портрет-кроп на людей справа-центре (Figma 597:15903) */
  .khontakt-hero__nav { position: relative; z-index: 3; flex: none; top: 0; left: 0; transform: none; width: 100%; max-width: none; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 0; }
  .khontakt-hero__content { position: relative; z-index: 2; flex: 0 0 auto; inset: auto; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 48px 16px calc(40px + env(safe-area-inset-bottom, 0px)); }
  .khontakt-hero__title .t-h1-thin { font: 400 64px/64px "Geologica Cursive", sans-serif; letter-spacing: -0.08em; }
  .khontakt-hero__title .t-h1 { font: 700 64px/64px "adineue PRO Cyr", sans-serif; letter-spacing: -0.03em; padding-left: 0; margin-top: 0; }
  .khontakt-hero__sub { max-width: none; margin-top: 24px; font: 700 18px/26px "adineue PRO Cyr", sans-serif; letter-spacing: 0.02em; }
  .khontakt-hero__bar { flex-direction: column; align-items: stretch; gap: 0; margin-top: 32px; }
  .khontakt-hero__cells { flex-direction: column; flex: 0 0 auto; }   /* сброс десктопного flex-basis 953px (иначе в колонке становится ВЫСОТОЙ и растягивает ячейки) */
  .kontakt-cell { width: 100%; height: auto; flex: none; padding: 12px 20px; --glass-border: var(--light-8); }   /* flex:none — не растягивать по высоте в колонке */
  .kontakt-cell__value { font-size: 24px; line-height: 32px; }
  .kontakt-cell + .kontakt-cell { margin-left: 0; margin-top: -1px; }
  .khontakt-hero__btn { display: none; }   /* в мобильном макете кнопки нет */

  /* #1 форма — адаптив (Figma 597:16228): заголовок 40, табы вертикально,
     поля в столбик, Budżet между Firma и Telefon, бюджет-плитки в ряд (префикс над суммой) */
  .kform { width: 100%; border-radius: 32px; padding: 48px 16px; }
  .kform__inner { width: 100%; max-width: 100%; }
  .kform__heading .t-h2-thin, .kform__heading .t-h2 { font-size: 40px; line-height: 48px; }
  .kform__sub { font-size: 18px; line-height: 26px; }
  .kform__form { width: 100%; }

  /* поля в один столбец; ряды расформировываем (display:contents) → order переставляет */
  .kform__fields { gap: 12px; }
  .kform__row { display: contents; }
  .kform__fields > .kform__field:first-child { margin-bottom: 12px; }   /* табы → Imię = 24 */
  .kform__field:has(#kf-imie) { order: 1; }
  .kform__field:has(#kf-firma) { order: 2; }
  .kform__field:has(.kform__budget) { order: 3; }
  .kform__field[data-only="rekrutacja"] { order: 3; }
  .kform__field:has(#kf-telefon) { order: 4; }
  .kform__field:has(#kf-email) { order: 5; }
  .kform__field:has(#kf-wiadomosc) { order: 6; }

  /* Rodzaj zapytania — вертикальный сегмент-список (Figma 604:1075):
     контейнер f5f5f5 rounded-24, активный — белая пилюля (r-pill), неактивные — rounded-10 */
  .kform__field:has(.kform__toggle) > .kform__label { text-align: center; }
  .kform__toggle { flex-direction: column; border-radius: 24px; }
  .kform__toggle-item { height: 36px; border-radius: 10px; }
  .kform__toggle-item.is-active { border-radius: var(--r-pill); }
  .kform__toggle-item:not(.is-active) + .kform__toggle-item:not(.is-active)::before {
    left: 50%; top: -1px; transform: translateX(-50%);   /* точка-разделитель сверху (колонка) */
  }

  /* Budżet — 3 плитки в ряд; в плитке префикс над суммой */
  .kform__budget { flex-direction: row; gap: 12px; }
  .kform__budget-item { flex-direction: column; gap: 2px; padding: 8px; }
  .kform__budget-pre { font-size: 12px; letter-spacing: -0.012em; }

}
