/* Formularz podstronowy — układ dwukolumnowy, formularz na szkle.
   Wnętrze formularza korzysta z klas .ax-contact-team__* (jedno ?r—dło stylu p—l i zg—d). */
.ax-contact-form {
  padding: var(--ax-sec-pad-m) 0;
  background: var(--ax-paper);
}

.ax-contact-form__inner {
  max-width: var(--ax-maxw);
  margin: 0 auto;
  padding: 0 var(--ax-gutter);
}

/* Gdy nad formularzem stoi już sekcja z własnym oddechem (np. FAQ). */
.ax-contact-form--tight-top { padding-top: clamp(20px, 3.6vw, 52px); }

.ax-contact-form__grid {
  display: grid;
  /* Formularz jest tu celem sekcji, więc dostaje szerszą kolumnę niż tekst. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(24px, 3.4vw, 72px);
  align-items: start;
}

.ax-contact-form__eyebrow {
  display: block;
  margin-bottom: var(--ax-label-gap);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ax-steel);
}

.ax-contact-form__heading {
  margin: 0 0 clamp(18px, 2.2vw, 30px);
  font-weight: 300;
  font-size: clamp(32px, 4.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ax-navy);
  text-wrap: pretty;
}

.ax-contact-form__lead {
  margin: 0 0 clamp(24px, 2.8vw, 40px);
  max-width: 46ch;
  font-size: 16.5px;
  line-height: 1.72;
  color: rgba(53, 59, 102, 0.66);
  text-wrap: pretty;
}

.ax-contact-form__contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: clamp(22px, 2.6vw, 36px);
}

.ax-contact-form__phone {
  font-weight: 300;
  font-size: clamp(30px, 3.2vw, 50px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ax-navy);
  text-decoration: none;
  white-space: nowrap;
}

.ax-contact-form__email {
  font-weight: 500;
  font-size: clamp(17px, 1.6vw, 24px);
  letter-spacing: -0.02em;
  color: var(--ax-navy);
  text-decoration: none;
}

.ax-contact-form__hours {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(53, 59, 102, 0.5);
}

.ax-contact-form__photo {
  display: block;
  overflow: hidden;
  border-radius: var(--ax-radius);
  aspect-ratio: 16 / 10;
  background: var(--ax-sand-deep);
}

.ax-contact-form__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ax-contact-form__side-title {
  display: block;
  margin: clamp(24px, 2.8vw, 38px) 0 14px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(53, 59, 102, 0.5);
}

.ax-contact-form__side-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ax-contact-form__side-card {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  border-radius: var(--ax-radius);
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(53, 59, 102, 0.12);
  padding: clamp(16px, 1.8vw, 24px);
  text-decoration: none;
  color: inherit;
  transition: border-color 320ms ease, transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  .ax-contact-form__side-card:hover {
    transform: translateY(-4px);
    border-color: rgba(53, 59, 102, 0.24);
  }
}

.ax-contact-form__side-logo {
  flex: 0 0 auto;
  width: clamp(84px, 8vw, 118px);
}

.ax-contact-form__side-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.ax-contact-form__side-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(53, 59, 102, 0.66);
}

.ax-contact-form__side-link {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ax-steel);
}

/*
 * Kolumna formularza jest tylko kontenerem — samą kartę (tło, obramowanie,
 * padding, odstępy pól) rysuje .ax-contact-team__form, dokładnie tak jak na
 * stronie głównej. Jedno źródło wyglądu formularzy w całym serwisie.
 */
.ax-contact-form__card {
  min-width: 0;
  width: 100%;
  max-width: 640px;
  margin-left: auto;
}

/*
 * Wrapper pól przejmuje rytm formularza z home (gap 20px). Bez tego wszystkie
 * elementy wewnątrz kleiły się do siebie, bo flex-gap formularza widział tylko
 * ten jeden kontener.
 */
.ax-contact-form__fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ax-contact-form__cascade[hidden],
.ax-contact-form__cascade-note[hidden] {
  display: none;
}

.ax-contact-form__cascade-note {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(53, 59, 102, 0.16);
  border-radius: 12px;
  background: var(--ax-sand);
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(53, 59, 102, 0.72);
}

.ax-contact-form__pref {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.ax-contact-form__pref-label {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(53, 59, 102, 0.5);
}

.ax-contact-form__pref-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ax-contact-form__pill {
  border: 1px solid rgba(53, 59, 102, 0.24);
  border-radius: var(--ax-pill);
  background: transparent;
  min-height: 38px;
  padding: 0 16px;
  font: inherit;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ax-navy);
  cursor: pointer;
  transition: background 320ms ease, color 320ms ease, border-color 320ms ease;
}

.ax-contact-form__pill.is-active {
  background: var(--ax-navy);
  border-color: var(--ax-navy);
  color: var(--ax-paper);
}

@media (hover: hover) and (pointer: fine) {
  .ax-contact-form__pill:hover {
    border-color: var(--ax-navy);
  }
}

.ax-contact-form__note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(53, 59, 102, 0.5);
}

/* Panel podziękowania — po sukcesie pola znikaj?. */
.ax-contact-form__thanks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ax-contact-form__thanks[hidden] {
  display: none;
}

.ax-contact-form__thanks-title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: -0.024em;
  color: var(--ax-navy);
}

.ax-contact-form__thanks-body {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(53, 59, 102, 0.66);
}

.ax-contact-form .ax-contact-team__form.is-sent .ax-contact-form__fields {
  display: none;
}

@media (max-width: 900px) {
  .ax-contact-form__grid {
    grid-template-columns: 1fr;
  }

  .ax-contact-form__side-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .ax-contact-form__pill { min-height: 44px; padding: 0 18px; }

  .ax-contact-form__phone,
  .ax-contact-form__email {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .ax-contact-form__phone {
    white-space: normal;
  }

  /* iOS nie może zoomowa? przy focusie. */
  .ax-contact-form input,
  .ax-contact-form textarea {
    font-size: 16px;
  }
}

/* Pole załącznika w formularzu reklamacyjnym
   ------------------------------------------------------------------
   Napis na natywnym przycisku pochodzi z przeglądarki, nie ze strony, więc
   pole ma własną etykietę, a prawdziwy input siedzi pod nią niewidoczny. */
.ax-contact-form__upload {
  gap: 0;
}

.ax-contact-form__upload-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 4px;
  padding: 11px 22px;
  border: 1px solid rgba(53, 59, 102, 0.28);
  border-radius: var(--ax-pill);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ax-navy);
  cursor: pointer;
  transition: background 320ms ease, border-color 320ms ease;
}

.ax-contact-form__upload-btn input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .ax-contact-form__upload-btn:hover {
    background: rgba(53, 59, 102, 0.06);
    border-color: rgba(53, 59, 102, 0.5);
  }
}

/* Fokus wędruje na ukryty input, a obrys musi być widoczny na przycisku. */
.ax-contact-form__upload-btn:focus-within {
  border-color: var(--ax-navy);
  box-shadow: 0 0 0 3px rgba(53, 59, 102, 0.14);
}

.ax-contact-form__upload-hint {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(53, 59, 102, 0.52);
}

.ax-contact-form__upload-hint.is-error {
  color: var(--ax-flag);
}

/* ---- Lista tematów -------------------------------------------------------
 * Natywna lista nie umie pokazać podpowiedzi pod nazwą opcji, a przy pięciu
 * trybach współpracy właśnie ta linia decyduje o trafnym wyborze. Skrypt
 * podmienia więc listę na własną; bez JavaScriptu zostaje `select`, który
 * wygląda jak pozostałe pola formularza.
 */
.ax-topic { position: relative; }

.ax-topic__native {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(53, 59, 102, 0.28);
  padding: 9px 22px 9px 0;
  font: inherit;
  font-size: 16px;
  color: var(--ax-navy);
  outline: none;
  appearance: none;
  border-radius: 0;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23353B66' stroke-width='1.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
}

.ax-topic__native:focus { border-bottom-color: var(--ax-navy); }
.ax-topic.is-enhanced .ax-topic__native { display: none; }

.ax-topic__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid rgba(53, 59, 102, 0.28);
  background: transparent;
  font: inherit;
  font-size: 16px;
  text-align: left;
  color: rgba(53, 59, 102, 0.5);
  cursor: pointer;
  transition: border-color 320ms ease, color 320ms ease;
}

.ax-topic__trigger.has-value { color: var(--ax-navy); }
.ax-topic__trigger:hover { border-bottom-color: rgba(53, 59, 102, 0.5); }
.ax-topic__trigger[aria-expanded="true"] { border-bottom-color: var(--ax-navy); }
.ax-topic__trigger:focus-visible { outline: 2px solid var(--ax-navy); outline-offset: 3px; }
.ax-topic__trigger.is-invalid { border-bottom-color: var(--ax-flag); }

.ax-topic__chev {
  flex: 0 0 auto;
  width: 12px;
  height: 8px;
  color: var(--ax-navy);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ax-topic__trigger[aria-expanded="true"] .ax-topic__chev { transform: rotate(180deg); }

.ax-topic__pop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  max-height: 322px;
  overflow-y: auto;
  padding: 7px;
  border-radius: 14px;
  border: 1px solid rgba(53, 59, 102, 0.14);
  background: var(--ax-paper);
  box-shadow: 0 26px 60px rgba(20, 24, 51, 0.22), 0 2px 6px rgba(20, 24, 51, 0.06);
  scrollbar-width: thin;
  /* Zamknięta lista zostaje w drzewie - stąd przejście, a nie display:none. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.985);
  transform-origin: top center;
  transition: opacity 220ms ease, transform 380ms cubic-bezier(0.16, 1, 0.3, 1), visibility 380ms;
}

.ax-topic.is-open .ax-topic__pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ax-topic__opt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: start;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 220ms ease;
}

.ax-topic__opt + .ax-topic__opt { margin-top: 1px; }
.ax-topic__opt.is-active { background: rgba(53, 59, 102, 0.07); }
.ax-topic__opt.is-on { background: rgba(53, 59, 102, 0.1); }

.ax-topic__opt-label {
  display: block;
  font-size: 14.5px;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ax-navy);
}

.ax-topic__opt-hint {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(53, 59, 102, 0.55);
}

.ax-topic__opt-check {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--ax-navy);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 200ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ax-topic__opt.is-on .ax-topic__opt-check { opacity: 1; transform: scale(1); }

/* Podpowiedź wybranego tematu zostaje pod polem - potwierdza wybór. */
.ax-topic__hint {
  margin: 0;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(53, 59, 102, 0.6);
  max-height: 0;
  opacity: 0;
  transition: max-height 380ms cubic-bezier(0.16, 1, 0.3, 1), opacity 240ms ease, padding-top 380ms ease;
}

.ax-topic__hint.is-on { max-height: 4em; opacity: 1; padding-top: 8px; }

/* ---- Opiekun ------------------------------------------------------------
 * Wchodzi na miejsce ogólnego bloku „telefon + mail" - te same dane, ale
 * przypisane do osoby. Bez ramki i bez tła: lewa kolumna sekcji żyje
 * typografią, a pudełko obok szklanej karty formularza wprowadzało trzeci
 * materiał. Portret spina dwa wiersze tekstu, więc kadr trzyma pion
 * niezależnie od długości nazwiska.
 */
.ax-person {
  display: grid;
  grid-template-columns: clamp(124px, 11.5vw, 152px) minmax(0, 1fr);
  grid-template-areas:
    "media id"
    "media contact";
  align-content: start;
  gap: 14px clamp(20px, 2.2vw, 30px);
  margin-top: clamp(26px, 3vw, 40px);
  padding-top: clamp(24px, 2.8vw, 36px);
  border-top: 1px solid rgba(53, 59, 102, 0.16);
}

.ax-person__media {
  grid-area: media;
  align-self: start;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 13px;
  background: var(--ax-sand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ax-person__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Bez portretu kadr schodzi do kółka z monogramem - pusty prostokąt 4:5
   w skali portretu wyglądałby jak nieudane wczytanie zdjęcia. */
.ax-person--mono { grid-template-columns: 76px minmax(0, 1fr); }
.ax-person--mono .ax-person__media { aspect-ratio: 1; border-radius: 50%; }

.ax-person__monogram {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(53, 59, 102, 0.6);
}

.ax-person__id {
  grid-area: id;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  align-self: start;
}

.ax-person__eyebrow {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(53, 59, 102, 0.45);
}

.ax-person__name {
  font-size: clamp(20px, 1.8vw, 25px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.026em;
  color: var(--ax-navy);
}

.ax-person__role {
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(53, 59, 102, 0.6);
}

.ax-person__contact {
  grid-area: contact;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  align-self: end;
}

/* Numer niesie tę samą wagę, którą miał w bloku ogólnym - to nadal
   najszybsza droga do rozmowy. Podświetlenie tła przy najechaniu robiło
   z dwóch linii tekstu listę przycisków, więc zostaje sam kolor. */
.ax-person__phone {
  font-size: clamp(23px, 2vw, 29px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ax-navy);
  text-decoration: none;
  transition: color 300ms ease;
}

.ax-person__email {
  font-size: 14.5px;
  letter-spacing: -0.012em;
  color: rgba(53, 59, 102, 0.7);
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 59, 102, 0.24);
  padding-bottom: 1px;
  transition: color 300ms ease, border-color 300ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .ax-person__phone:hover { color: var(--ax-steel-deep, #5A6796); }
  .ax-person__email:hover { color: var(--ax-navy); border-bottom-color: var(--ax-navy); }
}

.ax-person__phone:focus-visible,
.ax-person__email:focus-visible { outline: 2px solid var(--ax-navy); outline-offset: 3px; }

.ax-topic.is-up .ax-topic__pop {
  top: auto;
  bottom: calc(100% + 8px);
  transform-origin: bottom center;
  transform: translateY(8px) scale(0.985);
}

.ax-topic.is-up.is-open .ax-topic__pop { transform: translateY(0) scale(1); }

@media (max-width: 900px) {
  /* Kontakt schodzi pod portret - przy 390px nie zmieściłby się obok. */
  .ax-person {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
      "media id"
      "contact contact";
    gap: 16px 18px;
    margin-top: 22px;
    padding-top: 22px;
  }

  .ax-person--mono { grid-template-columns: 72px minmax(0, 1fr); }
  .ax-person__contact { gap: 9px; }
  /* Klasa rodzica bije globalny próg 44px dla a[href^="tel:"]. */
  .ax-person .ax-person__phone { min-height: 0; }
  .ax-topic__pop { max-height: min(56svh, 340px); }
  .ax-topic__opt { padding: 13px 12px; }
}
