/* ==========================================================================
   Morrison & Barnes — contact section redesign
   One continuous navy composition: blended office photography on the left,
   open underline-style form on the right, compact rounded CTA.

   Pure overrides on the theme's existing markup. No input, name, id or
   required attribute is touched, so the handler, validation, honeypot and
   #contact anchor all behave exactly as before.
   ========================================================================== */

/* ---------- One continuous section, no seams ---------------------------- */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.contact > .shell { position: relative; z-index: 1; }

/* ---------- Office photography, dissolved into the navy ------------------
   The theme already renders .contact-photo > img. This does NOT add a second
   image — it takes the existing one and removes every hard edge: the wrapper
   is masked so the top and right dissolve, and a navy wash is laid over the
   sky so the building stays readable while the periphery sinks into the
   section. Swapping the photograph itself changes nothing here. */
.contact-photo {
  position: relative;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  /* bleed toward the viewport edge instead of stopping at the shell */
  margin-left: calc(-1 * clamp(0px, (100vw - 1240px) / 2, 420px));
  width: auto;
  border: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  /* Every edge fades, not just two — a hard bottom or left edge reads as a
     cropped rectangle the moment the section continues past the photograph. */
  -webkit-mask-image:
    linear-gradient(to top, transparent 0%, #000 14%, #000 42%, rgba(0, 0, 0, 0.4) 76%, transparent 97%),
    linear-gradient(to right, transparent 0%, #000 9%, #000 55%, rgba(0, 0, 0, 0.35) 85%, transparent 99%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to top, transparent 0%, #000 14%, #000 42%, rgba(0, 0, 0, 0.4) 76%, transparent 97%),
    linear-gradient(to right, transparent 0%, #000 9%, #000 55%, rgba(0, 0, 0, 0.35) 85%, transparent 99%);
  mask-composite: intersect;
}
@supports not (mask-composite: intersect) {
  .contact-photo {
    -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 14%, #000 42%, transparent 96%);
    mask-image: linear-gradient(to top, transparent 0%, #000 14%, #000 42%, transparent 96%);
  }
}
.contact-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
/* Navy wash: heaviest at the top where the sky is, clearing over the entrance. */
.contact-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(5, 12, 34, 0.10) 0%, rgba(5, 12, 34, 0.42) 55%, rgba(5, 12, 34, 0.78) 100%),
    linear-gradient(to right, transparent 40%, rgba(5, 12, 34, 0.55) 100%);
}

/* ---------- The form: no box, no border, no glow ------------------------- */
.contact-form {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.field-row { gap: clamp(1.25rem, 3vw, 2.25rem); }
.field { margin-bottom: clamp(1.4rem, 2.4vw, 1.9rem); gap: 0.35rem; }

/* Labels read as quiet prompts, not shouted micro-caps. */
.field label {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--grey-300);
}
.field .req { font-size: 0.78rem; color: var(--blue-400); opacity: 0.85; }

/* Underline fields sitting directly on the navy. */
.field input,
.field textarea {
  padding: 0.5rem 0 0.7rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0;
  transition: border-color 0.25s var(--ease);
}
.field input:focus,
.field textarea:focus {
  background: transparent;
  border-bottom-color: var(--blue-400);
  outline: none;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-bottom-color: #ff6b57; }
.field textarea { min-height: 9.5rem; }

/* "Are you a new client?" — same underline treatment, blue chevron on the right. */
.field--select select {
  width: 100%;
  padding: 0.5rem 2rem 0.7rem 0;
  background-color: transparent;
  color: var(--white);
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0;
  font-size: 1rem;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 0.2rem center;
  background-size: 15px 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' fill='none' stroke='%234c4af0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l7 7 7-7'/%3E%3C/svg%3E");
  transition: border-color 0.25s var(--ease);
}
.field--select select:focus { border-bottom-color: var(--blue-400); outline: none; }
.field--select select[aria-invalid="true"] { border-bottom-color: #ff6b57; }
.field--select select option { background: #0b1a48; color: var(--white); }

/* The consent line stays functional — see the note in the plugin README —
   but it is dialled down to match the minimal treatment. */
.field--check { margin-top: 0.4rem; margin-bottom: 1.6rem; }
.field--check label { font-size: 0.78rem; line-height: 1.55; color: var(--grey-500); }

/* The disclaimer under the button is removed per the brief. */
.contact-form .form-note { display: none; }

/* ---------- Send Message: compact, rounded, arrow to the right ---------- */
.contact-form button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: clamp(250px, 52%, 400px);
  min-height: 58px;
  margin-right: auto;
  padding: 0 1.6rem;
  border-radius: 12px;
  letter-spacing: 0.12em;
}
/* The arrow rides on ::before, NOT ::after — the theme uses .btn::after for the
   white hover-sweep panel (position:absolute; inset:0; background:#fff). Reusing
   it left a white block sitting on the button. flex `order` puts ::before last,
   so the sweep keeps working exactly as designed. */
.contact-form button[type="submit"]::before {
  content: "";
  order: 2;
  flex: none;
  width: 22px;
  height: 12px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 12' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 6h24M19 1l5 5-5 5'/%3E%3C/svg%3E");
  transition: transform 0.25s var(--ease);
}
.contact-form button[type="submit"]:hover::before { transform: translateX(3px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  /* The photo must not become a block the visitor scrolls past to reach the
     form — it drops behind the copy and stays subdued. */
  .contact-photo { margin-left: 0; opacity: 0.55; }
}

@media (max-width: 720px) {
  /* Subdued and short so it is not a block to scroll past on the way to the form. */
  .contact-photo { margin-left: 0; margin-top: 1.25rem; opacity: 0.4; max-height: 210px; overflow: hidden; }
  .contact-photo img { object-fit: cover; height: 210px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field { margin-bottom: 1.35rem; }
  .field textarea { min-height: 8rem; }

  /* Wider for thumbs on mobile, still not edge-to-edge. */
  .contact-form button[type="submit"] {
    width: 100%;
    min-height: 56px;
  }
}

/* Contact hero: supporting reassurance line under the lead */
.page-lead--sub {
  margin-top: 0.9rem;
  font-size: 0.98rem;
  color: var(--grey-500);
}
