/* ===========================================================
   Exemplar REITail — Contact Us page
   Faithful to Figma (node 104:519, 1920-wide) at desktop,
   fully responsive / mobile-friendly below.
   Mobile-first: base styles = phone; media queries scale up.
   Requires exemplar-shared.css (base resets, nav, footer).
   =========================================================== */

/* ============================ Dark section ============================ */
.ct-dark {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 120px 0 56px;
}

/* live dark map band (see contact-map.js). On phones it is an in-flow band
   between the intro copy and the address block, bled out to the full viewport
   width; from 768px up it becomes the backdrop of the whole dark section. */
.ct-map {
  position: relative;
  z-index: 0;
  flex: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: min(72vw, 340px);
  overflow: hidden;
}
/* the Google map renders here; the PNG shows through if the API can't load */
.ct-map__canvas {
  position: absolute;
  inset: 0;
  opacity: 0.9;
  background: #010512 url("/images/exemplar/contact/map.png") center / cover
    no-repeat;
}
/* phone: the band stands on its own, so fade all four edges evenly around the
   centred marker instead of masking the left half for the copy */
.ct-map__grad {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      var(--bg) 0%,
      rgba(1, 5, 18, 0) 34%,
      rgba(1, 5, 18, 0) 66%,
      var(--bg) 100%
    ),
    linear-gradient(
      90deg,
      var(--bg) 0%,
      rgba(1, 5, 18, 0) 26%,
      rgba(1, 5, 18, 0) 74%,
      var(--bg) 100%
    );
}

.ct-dark__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* the copy sits above the map once the map is absolutely positioned (≥768px) */
.ct-title,
.ct-intro,
.ct-info {
  position: relative;
  z-index: 1;
}

.ct-title {
  margin: 0;
  font-weight: 200;
  font-size: 44px;
  line-height: 1.05;
  color: #fff;
}
.ct-title .word {
  display: inline-block;
  vertical-align: top;
}
.ct-title .char {
  display: inline-block;
  opacity: 0;
  animation: ctFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.ct-title .word:nth-child(1) .char {
  animation-delay: 0.1s;
}
.ct-title .word:nth-child(2) .char {
  animation-delay: 0.2s;
}
.ct-title b {
  font-weight: 600;
}

@keyframes ctFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ct-intro {
  margin: 0;
  max-width: 756px;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: #fff;
  opacity: 0;
  animation: ctFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.3s;
}

/* company + address block */
.ct-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 16px;
  opacity: 0;
  animation: ctFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.4s;
}
.ct-info__company {
  margin: 0;
  font-weight: 300;
  font-size: 22px;
  line-height: 27px;
  color: var(--gold);
}
.ct-info__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 84px;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #fff;
}
.ct-info__block {
  font-style: normal;
  min-width: 200px;
}
.ct-info__block a {
  color: #fff;
  transition: color 0.2s ease;
}
.ct-info__block a:hover {
  color: var(--gold);
}

/* ============================ Light section ============================ */
.ct-light {
  background: #fff;
  padding-top: 48px;
}

.ct-light__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 8px;
  padding-bottom: 56px;
}

/* ---- form ---- */
.ct-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  opacity: 0;
  animation: ctFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.5s;
}
.ct-form__row {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ct-field {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
}

.ct-input {
  width: 100%;
  height: 64px;
  padding: 15px;
  border: 1px solid transparent;
  background: #d9d9d9;
  color: #010512;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
}
.ct-input::placeholder {
  color: #010512;
  opacity: 1;
}
.ct-input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 0;
}
.ct-input--area {
  height: auto;
  min-height: 160px;
  resize: vertical;
}

.ct-error {
  margin-top: 6px;
  font-size: 13px;
  color: #b3261e;
}

.ct-form__success {
  margin: 0;
  padding: 16px;
  background: rgba(203, 165, 75, 0.14);
  border: 1px solid var(--gold);
  color: #010512;
  font-size: 15px;
}

/* general send-failure message (validation summary, model-level errors) */
.ct-form__error {
  margin: 0;
  padding: 16px;
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid #b3261e;
  color: #b3261e;
  font-size: 15px;
}
.ct-form__error ul {
  margin: 0;
  padding-left: 18px;
}
.ct-form__error.validation-summary-valid {
  display: none;
}

/* ---- actions: consent + submit ---- */
.ct-form__actions {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.ct-consent {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
  color: #010512;
}
.ct-consent__box {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ct-consent__mark {
  flex: none;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.2);
}
.ct-consent__box:checked + .ct-consent__mark {
  background: var(--gold);
  border-color: var(--gold);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l5 5 9-10'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
}
.ct-consent__box:focus-visible + .ct-consent__mark {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.ct-consent__text a {
  color: var(--gold);
  text-decoration: underline;
}

/* light-scheme variant of the shared .ab-btn (matches .ex-btn--news) */
.ct-submit {
  background: transparent;
  border-color: rgba(1, 5, 18, 0.1);
  color: #010512;
}
.ct-submit:hover {
  background: rgba(1, 5, 18, 0.04);
}

/* ---- socials ---- */
.ct-social {
  width: 100%;
  opacity: 0;
  animation: ctFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.6s;
}
.ct-social__title {
  margin: 0 0 24px;
  font-weight: 300;
  font-size: 22px;
  line-height: 27px;
  color: #010512;
}
.ct-social__icons {
  display: flex;
  align-items: center;
  gap: 24px;
}
.ct-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #010512;
  color: #fff;
  transition: opacity 0.2s ease;
}
.ct-social__link:hover {
  opacity: 0.8;
}

/* =====================================================================
   TABLET  ≥ 768px
   ===================================================================== */
@media (min-width: 768px) {
  .ct-dark {
    padding: 150px 0 72px;
  }

  /* static so the map's containing block is .ct-dark again, letting it span
     the full section width behind the copy */
  .ct-dark__inner {
    position: static;
  }
  .ct-map {
    position: absolute;
    top: 120px;
    left: 0;
    right: 0;
    width: auto;
    height: auto;
    margin-left: 0;
    aspect-ratio: 1920 / 686;
  }
  /* back to the banner framing: masked on the left, behind the contact copy */
  .ct-map__grad {
    background:
      linear-gradient(
        180deg,
        var(--bg) 0%,
        rgba(1, 5, 18, 0) 20%,
        rgba(1, 5, 18, 0) 58%,
        var(--bg) 100%
      ),
      linear-gradient(
        90deg,
        var(--bg) 0%,
        var(--bg) 24%,
        rgba(1, 5, 18, 0) 62%
      ),
      linear-gradient(270deg, var(--bg) 0%, rgba(1, 5, 18, 0) 14%);
  }

  /* The map is the section's backdrop from here up and it is draggable, so the
     copy layered over it may only claim the pixels it actually draws: the flex
     column and its wrappers stay transparent to the pointer, and the two
     headings shrink-wrap instead of spanning the container and blocking a band
     of the map. pointer-events inherits, so everything that must stay live has
     to opt back in — .ct-map included, since it is a child of .ct-dark__inner
     here rather than a sibling of the copy. */
  .ct-dark__inner,
  .ct-info,
  .ct-info__cols {
    pointer-events: none;
  }
  .ct-map,
  .ct-title,
  .ct-intro,
  .ct-info__company,
  .ct-info__block {
    pointer-events: auto;
  }

  .ct-title {
    font-size: 60px;
    width: max-content;
    max-width: 100%;
  }
  .ct-info__company {
    width: max-content;
    max-width: 100%;
  }
  .ct-intro {
    font-size: 18px;
    line-height: 1.7;
  }

  .ct-form__row {
    flex-direction: row;
    gap: 30px;
  }

  .ct-form__actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .ct-light__inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 60px;
  }
  .ct-form {
    flex: 1 1 0;
  }
  .ct-social {
    width: auto;
    flex: none;
  }
}

/* =====================================================================
   DESKTOP  ≥ 1200px  — pixel-accurate reproduction of the design
   ===================================================================== */
@media (min-width: 1200px) {
  .ct-dark {
    padding: 200px 0 96px;
  }
  .ct-map {
    top: 150px;
  }

  .ct-dark__inner {
    gap: 40px;
  }
  .ct-title {
    font-size: 70px;
  }
  .ct-intro {
    font-size: 18px;
    line-height: 30px;
  }

  .ct-info {
    gap: 38px;
    margin-top: 36px;
  }
  .ct-info__cols {
    gap: 84px;
  }
  .ct-info__block {
    min-width: 234px;
    width: 234px;
  }

  .ct-light {
    padding-top: 80px;
  }
  .ct-light__inner {
    gap: 99px;
    padding-bottom: 80px;
    justify-content: space-between;
  }
  .ct-form {
    max-width: 981px;
  }
  .ct-form {
    gap: 27px;
  }
  .ct-form__actions {
    gap: 27px;
  }

  .ct-social {
    min-width: 213px;
  }
}

@media (max-width: 768px) {
  .ct-form {
    gap: 10px;
  }
  .ct-form__row {
    gap: 10px;
  }
  .ct-input {
    height: 45px;
    background: #d9d9d970;
  }
  .ct-consent__text {
    font-size: 12px;
  }
  .ct-social__title {
    font-size: 18px;
  }
  .ct-social__link {
    width: 30px;
    height: 30px;
  }
}
