/* Contact page (prefix ct-)  —  hero basics live in product.css
   Sizes follow the 1920 comp: clamp(min, designPx / 19.2 vw, designPx).
   1. Backgrounds   2. Hero   3. Form card   4. Captcha + submit
   5. Book a demo / Client login   6. Responsive */

/* 1. Backgrounds (comp: plexus at y 0, map dots at y 900 — scale with the screen) */
.ct-page {
  position: relative;
  overflow: clip;          /* the vw-sized backgrounds stop at the page edge, never under the footer */
  /* hero tone fading into the page colour — no step above the footer */
  background: linear-gradient(to bottom, var(--bg-hero) 70%, var(--bg) 100%);
}
.art--ct-plexus {
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1920 / 1200;
  background-image: url("../img/contact/plexus.jpg");
  background-image: image-set(
    url("../img/contact/plexus.webp") type("image/webp"),
    url("../img/contact/plexus.jpg") type("image/jpeg")
  );
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}
.art--ct-dots {
  top: 46.88vw;
  left: 0;
  width: 100%;
  aspect-ratio: 1920 / 1360;
  background-image: url("../img/contact/dots.jpg");
  background-image: image-set(
    url("../img/contact/dots.webp") type("image/webp"),
    url("../img/contact/dots.jpg") type("image/jpeg")
  );
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 70%, transparent 100%);
}

/* 2. Hero ----------------------------------------------------------------------- */
.ct-hero {
  padding-top: clamp(96px, 9.38vw, 180px);
}
.ct-hero .pr-hero__mark {
  width: clamp(76px, 6.25vw, 120px);
}
.ct-hero .pr-hero__title {
  margin-top: clamp(0.75rem, 1.15vw, 22px);
  font-size: clamp(1.875rem, 3.13vw, 3.75rem);        /* 60 */
}
.ct-hero .pr-hero__lead {
  margin-top: clamp(0.375rem, 0.52vw, 10px);
  font-size: clamp(1rem, 1.25vw, 1.5rem);             /* 24 */
}

/* 3. Form card ------------------------------------------------------------------ */
.ct-wrap {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 2.6vw, 50px) var(--pad-x) 0;
}
.ct-card {
  width: min(100%, 62.45vw);                          /* 1199 */
  min-width: min(100%, 720px);
  margin: 0 auto;
  padding: clamp(1.5rem, 2.08vw, 40px) clamp(1.25rem, 2.92vw, 56px) clamp(1.5rem, 2.08vw, 40px);
  border: 1.5px solid var(--green);
  border-radius: clamp(16px, 1.25vw, 24px);
  background: rgba(4, 8, 4, 0.82);
}
.ct-card__title {
  margin: 0;
  font-size: clamp(1.125rem, 1.46vw, 1.75rem);        /* 28 */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: var(--green);
  text-transform: uppercase;
}
.ct-alert {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 92, 92, 0.6);
  border-radius: 10px;
  background: rgba(255, 92, 92, 0.08);
  color: #ff8a8a;
  font-size: clamp(0.875rem, 0.94vw, 1.125rem);
}

.ct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(1rem, 2.66vw, 51px);
  row-gap: clamp(0.875rem, 1.04vw, 20px);
  margin-top: clamp(1.25rem, 1.88vw, 36px);
}
.ct-field--full {
  grid-column: 1 / -1;
}
.ct-field label {
  display: block;
  margin-bottom: clamp(6px, 0.52vw, 10px);
  font-size: clamp(0.8125rem, 0.89vw, 1.0625rem);     /* 17 */
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.1em;
  color: var(--green-soft);
  text-transform: uppercase;
}
.ct-field input,
.ct-field textarea,
.ct-field select,
.ct-captcha input {
  display: block;
  width: 100%;
  height: clamp(46px, 2.81vw, 54px);
  padding: 0 clamp(14px, 1.15vw, 22px);
  border: 1.5px solid rgba(91, 232, 76, 0.42);
  border-radius: clamp(10px, 0.63vw, 12px);
  background: #050a05;
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(0.9375rem, 0.94vw, 1.125rem);      /* 18 */
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.ct-field textarea {
  height: clamp(130px, 8.33vw, 160px);
  padding-block: clamp(12px, 0.94vw, 18px);
  resize: vertical;
}
.ct-field input::placeholder,
.ct-field textarea::placeholder,
.ct-captcha input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.ct-field input:hover,
.ct-field textarea:hover,
.ct-field select:hover,
.ct-captcha input:hover {
  border-color: rgba(91, 232, 76, 0.7);
}
.ct-field input:focus,
.ct-field textarea:focus,
.ct-field select:focus,
.ct-captcha input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(91, 232, 76, 0.18);
}
.ct-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 100px #050a05 inset;
}
.ct-select {
  position: relative;
}
.ct-select select {
  padding-right: 3rem;
  appearance: none;
  cursor: pointer;
}
.ct-select select option {
  background: #050a05;
  color: var(--ink);
}
.ct-select::after {
  /* green chevron */
  content: "";
  position: absolute;
  top: 50%;
  right: clamp(16px, 1.15vw, 22px);
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* 4. Captcha + submit -------------------------------------------------------------- */
.ct-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(1.5rem, 1.88vw, 36px);
}
.ct-captcha {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.63vw, 12px);
}
.ct-captcha__img {
  display: block;
  width: 170px;
  height: 56px;
  border: 1.5px solid rgba(91, 232, 76, 0.42);
  border-radius: 10px;
}
.ct-captcha__refresh {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(91, 232, 76, 0.55);
  border-radius: 50%;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.ct-captcha__refresh:hover,
.ct-captcha__refresh:focus-visible {
  border-color: var(--green);
  background: var(--green);
  color: var(--on-green);
  outline: none;
}
.ct-captcha__refresh.is-spinning svg {
  animation: ct-spin 0.5s var(--ease);
}
@keyframes ct-spin {
  to { transform: rotate(360deg); }
}
.ct-captcha input {
  width: clamp(150px, 13.49vw, 259px);
  height: clamp(46px, 2.92vw, 56px);
}
.ct-submit {
  min-width: clamp(150px, 10.36vw, 199px);
  min-height: clamp(46px, 2.71vw, 52px);
}

/* success state */
.ct-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
  text-align: center;
}
.ct-success__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--green);
  border-radius: 50%;
  color: var(--green);
}
.ct-success__text {
  margin: 0 0 0.5rem;
  font-size: clamp(1rem, 1.15vw, 1.375rem);
  color: var(--ink);
}

/* 5. Book a demo / Client login ----------------------------------------------------- */
.ct-links {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 3.13vw, 60px) var(--pad-x) clamp(2.5rem, 4.69vw, 90px);
}
.ct-links__row {
  --card-w: max(14rem, 18.49vw);                      /* 355 */
  --gap: 7.76vw;                                      /* 149 */
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, var(--card-w));
  justify-content: center;
  column-gap: var(--gap);
}
.ct-links__line {
  position: absolute;
  top: 50%;
  left: calc(50% - var(--gap) / 2 - 2px);
  width: calc(var(--gap) + 4px);
  height: 2px;
  background: var(--green);
}
.ct-lcard {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(150px, 9.38vw, 180px);
  padding: 1.25rem;
  border: 1.5px solid var(--green);
  border-radius: var(--radius-card);
  background: var(--bg);
  text-decoration: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.ct-lcard:hover,
.ct-lcard:focus-visible {
  border-color: var(--green-light);
  box-shadow: 0 0 0 1px var(--green-glow), 0 18px 48px rgba(91, 232, 76, 0.14);
  outline: none;
}
.ct-lcard__icon {
  display: block;
  height: clamp(52px, 3.65vw, 70px);
  width: auto;
}
.ct-lcard__title {
  margin-top: clamp(0.875rem, 1.2vw, 23px);
  font-family: var(--font-ui);
  font-size: clamp(1.125rem, 1.56vw, 1.875rem);       /* 30 */
  font-weight: 300;
  line-height: 1.1;
  color: var(--green);
  text-transform: uppercase;
}

/* 6. Responsive ----------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .ct-card {
    width: min(100%, 760px);
  }
  .art--ct-plexus {
    background-image: image-set(
      url("../img/contact/plexus-1280.webp") type("image/webp"),
      url("../img/contact/plexus.jpg") type("image/jpeg")
    );
  }
  .art--ct-dots {
    background-image: image-set(
      url("../img/contact/dots-1280.webp") type("image/webp"),
      url("../img/contact/dots.jpg") type("image/jpeg")
    );
  }
}

@media (max-width: 767.98px) {
  .ct-card {
    min-width: 0;
  }
  .ct-grid {
    grid-template-columns: 1fr;
  }
  .ct-actions {
    flex-direction: column;
    align-items: stretch;
  }
  /* captcha image + reload on one line, the answer full width below */
  .ct-captcha {
    flex-wrap: wrap;
  }
  .ct-captcha input {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  .ct-submit {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .ct-links__row {
    --card-w: minmax(0, 1fr);
    --gap: 1.25rem;
  }
  .ct-captcha__img {
    width: 136px;
    height: 45px;
  }
}
