/* ----- CONTACT PAGE ----- */

/* ----- TOP SECTION ----- */
/* Violet section, white text (the form card keeps its own dark text) */
/* Decorative dots, bottom-right corner */
.contact-top__dots {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: 50%;
  /* Shorter than the section: dots stay near the bottom */
  height: 40%;
  pointer-events: none;
  background-image: var(--dots-image);
  background-size: var(--dots-size);
  -webkit-mask-image: linear-gradient(320deg, #fff 19%, transparent 45%);
  mask-image: linear-gradient(320deg, #fff 19%, transparent 45%);
}
.contact-top__grid {
  position: relative;
  z-index: 1;
}
.contact-top {
  position: relative;
  /* Section tucks under the transparent header; top padding compensates */
  margin-top: -72px;
  padding-block: calc(20vh + 72px) var(--section-padding);
  background: var(--color-primary);
  color: #fff;
}
/* Narrow left column and form, spacing between the two */
.contact-top__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr);
  gap: clamp(2rem, 8vw, 9rem);
  align-items: start;
  padding-inline: clamp(0rem, 5vw, 6rem);
}
.contact-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Sticky: stays vertically centered while the form scrolls */
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
}
.contact-hero h1 {
  margin-bottom: 1.25rem;
}
.contact-hero .lead {
  max-width: 24rem;
  font-size: 1rem;
  color: rgb(255 255 255 / 0.92);
}
.contact-hero .lead a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-accent-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  transition: color 0.2s ease;
}
.contact-hero .lead a:hover {
  color: var(--color-accent-yellow);
}
.contact-form {
  padding: clamp(1.5rem, 3.5vw, 3rem);
  /* White card on the violet section: dark text */
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.contact-fallback {
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: var(--color-text);
}

/* ----- FORM (Contact Form 7) ----- */
.wpcf7-form .cf-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}
.wpcf7-form .cf-field {
  margin-bottom: 1rem;
}
.wpcf7-form .cf-row .cf-field {
  margin-bottom: 0;
}
.wpcf7-form label,
.wpcf7-form legend {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 500;
}
.wpcf7-form .wpcf7-form-control-wrap {
  display: block;
}
.wpcf7-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpcf7-form textarea {
  width: 100%;
  padding: 0 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-text);
  font: inherit;
  transition: border-color 0.2s ease;
}
.wpcf7-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]) {
  height: 3.4rem;
}
.wpcf7-form textarea {
  min-height: 11rem;
  padding: 1.1rem 1.5rem;
  border-radius: var(--radius-md);
  resize: vertical;
}
.wpcf7-form ::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Submit button (generated by qst_wpcf7_submit_button) */
.wpcf7-form button.btn {
  margin-top: 1.5rem;
  padding-block: 0;
  padding-left: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
}

/* Checkboxes: two columns, custom box */
.wpcf7-form .cf-fieldset {
  margin: 0 0 1.75rem;
  padding: 0;
  border: 0;
}
.wpcf7-form .wpcf7-checkbox {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
}
.wpcf7-form .wpcf7-list-item {
  margin: 0;
}
.wpcf7-form .wpcf7-list-item label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}
.wpcf7-form input[type="checkbox"] {
  appearance: none;
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0;
  border: 2px solid var(--color-black);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.wpcf7-form input[type="checkbox"]:checked {
  border-color: var(--color-primary);
  background: var(--color-primary)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 80% no-repeat;
}
.wpcf7-form input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.wpcf7-not-valid-tip {
  margin-top: 0.4rem;
  padding-left: 1.5rem;
  color: #c0392b;
  font-size: 0.85rem;
}
.wpcf7-response-output {
  margin: 1rem 0 0;
  padding: 1em 1.25rem;
  border-radius: var(--radius-md);
}

@media (max-width: 1024px) {
  .contact-top__grid {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }
  .contact-hero {
    position: static;
    transform: none;
  }
  /* Smaller top spacing (the header height stays compensated) */
  .contact-top {
    padding-top: calc(72px + 3rem);
  }
}
@media (max-width: 480px) {
  .wpcf7-form .cf-row,
  .wpcf7-form .wpcf7-checkbox {
    grid-template-columns: 1fr;
  }
}

/* Mobile: text stays at --gutter, blocks bleed by --bleed */
@media (max-width: 768px) {
  .contact-form {
    margin-inline: calc(-1 * var(--bleed));
    padding-inline: var(--bleed);
  }
}

/* Anti-spam honeypot: off-screen, never display:none */
.wpcf7-form .qst-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
