/* ==========================================================================
   BIXYN — Contact Page
   Reuses existing tokens, typography, buttons and footer/navbar components.
   Adds only the contact hero heading, the trust badges bar, the form fields
   and the custom (JS-driven) service dropdown.
   ========================================================================== */

.contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
  padding: 100px 325px;
}

.contact__title {
  text-align: center;
  font-size: 64px;
}

/* ------------------------------------------------------- Trust badges bar */
.contact__badges {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--space-24);
  padding: 28px var(--space-40);
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  white-space: nowrap;
}

.contact-badge img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* -------------------------------------------------------------- Form */
.contact-form {
  display: flex;
  flex-direction: column;
}

.contact-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-24);
  margin-top: 32px;
}

/* Shared field look (inputs, textarea, select trigger) */
.contact-field {
  width: 100%;
  padding: 20px 24px;
  background-color: var(--color-bg-black);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}

.contact-field::placeholder {
  color: var(--color-white-70);
  opacity: 1;
}

.contact-field:focus {
  outline: none;
  border-color: var(--color-accent);
}

.contact-form__textarea {
  grid-column: 1 / -1;
  min-height: 240px;
  resize: vertical;
}

/* -------------------------------------------------- Validation states */
.contact-form__group {
  display: flex;
  flex-direction: column;
  /* gap: 6px; */
}

/* Message field spans the full row (wrapper now owns the grid span) */
.contact-form__group--full {
  grid-column: 1 / -1;
}

.contact-error {
  display: none;
  color: var(--color-error, #ff5d5d);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 6px;
}

.contact-error.is-visible {
  display: block;
}

/* Red outline on the offending field */
.contact-field.has-error,
.custom-select.has-error .custom-select__trigger {
  border-color: var(--color-error, #ff5d5d);
}

.contact-form__submit {
  width: 100%;
  margin-top: var(--space-40);
}

.contact-form__success {
  display: none;
  margin-top: var(--space-16);
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 14px;
  text-align: center;
}

.contact-form__success.is-visible {
  display: block;
}

/* Same paragraph, shown in red when the submission fails to send */
.contact-form__success.has-error {
  color: var(--color-error, #ff5d5d);
}

/* ------------------------------------------------ Success popup / modal */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-24);
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.contact-modal__box {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
  padding: var(--space-40) var(--space-32);
  background-color: var(--color-bg-black);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transform: translateY(16px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-modal.is-open .contact-modal__box {
  transform: none;
}

.contact-modal__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 24px;
  line-height: 1.3;
  color: var(--color-white);
}

.contact-modal__text {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 24px;
}

.contact-modal__close {
  margin-top: var(--space-8);
  min-width: 140px;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {

  .contact-modal,
  .contact-modal__box {
    transition: none;
  }

  .contact-modal__box {
    transform: none;
  }
}

@media (max-width: 640px) {
  .contact-modal__box {
    padding: var(--space-32) var(--space-24);
  }

  .contact-modal__title {
    font-size: 20px;
  }

  .contact-modal__text {
    font-size: 13px;
    line-height: 22px;
  }

  .contact-modal__close {
    width: 100%;
  }
}

/* --------------------------------------------- Custom service dropdown */
.custom-select {
  position: relative;
}

.custom-select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding: 20px 24px;
  background-color: var(--color-bg-black);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-white-70);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  transition: border-color 0.2s ease;
}

.custom-select.is-open .custom-select__trigger {
  border-color: var(--color-accent);
}

.custom-select__value.is-selected {
  color: var(--color-white);
}

/* CSS caret — rotates to reflect open/closed state (no extra asset needed) */
.custom-select__caret {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--color-accent);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.custom-select.is-open .custom-select__caret {
  transform: rotate(180deg);
}

.custom-select__options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-8);
  background-color: var(--color-bg-black);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.custom-select.is-open .custom-select__options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select__option {
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--color-white-70);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.custom-select__option:hover,
.custom-select__option.is-active {
  color: var(--color-white);
  background-color: var(--color-bg-alt);
}

/* ============================ TABLET (≤ 1024px) ============================ */
@media (max-width: 1024px) {
  .contact {
    gap: var(--space-32);
    padding: 100px 32px;
  }
  

  .contact__badges {
    padding: 24px var(--space-32);
  }
}

/* ============================ MOBILE (≤ 640px) ============================ */
@media (max-width: 640px) {
  .contact {
    gap: var(--space-16);
    padding: 64px 20px;
  }

  .contact__title {
    text-align: left;
  }



  /* Badges stay on one compact row (matches mobile reference) */
  .contact__badges {
    justify-content: space-between;
    gap: var(--space-8);
    padding: 16px;
  }

  .contact-badge {
    font-size: 8px;
    gap: 6px;
  }

  .contact-badge img {
    width: 12px;
    height: auto;
  }

  /* Form stacks to a single column */
  .contact-form__grid {
    grid-template-columns: 1fr;
    gap: var(--space-16);
  }


  .contact-field,
  .custom-select__trigger {
    padding: 16px;
    font-size: 12px;
  }

  .contact-form__textarea {
    min-height: 200px;
  }

  .contact-form__submit {
    margin-top: var(--space-32);
  }

  .custom-select__option {
  font-size: 12px;
}
}
