/* ============================================================
   NR THEME — CONTACT PAGE
   Editorial split (editable quote left, Fluent Forms right), light/paper role.
   Tokens/type from nr-type.css. Fluent Forms output is restyled on-system
   within .nr-contact__form (the form is in "inherit theme style" mode, so the
   plugin ships minimal CSS; !important is used only where it would otherwise win).
   ============================================================ */

.nr-contact {
  box-sizing: border-box;    /* keep padding inside the 100svh (no overflow past one viewport) */
  min-height: 100svh;        /* template fills exactly the full viewport */
  max-width: var(--content-max, 1240px);
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 7rem) var(--gutter, clamp(20px, 4vw, 64px)) clamp(4rem, 10vh, 8rem);
  display: flex;
  flex-direction: column;
  justify-content: center;   /* vertically centre the content within the viewport */
}

.nr-contact__eyebrow {
  text-align: right;
  margin: 0 0 1.5rem;
}

.nr-contact__split {
  display: grid;
  grid-template-columns: 5fr 6fr;   /* quote a touch narrower than the form column */
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

/* ------------------------------------------------------------
   LEFT — editable quote + identity (rendered from the_content)
   Quote = Heading block; identity = Paragraph.
   ------------------------------------------------------------ */
.nr-contact__lead :is(h1, h2, h3, h4) {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(2.2rem, 4vw, 4.3rem);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "wght" 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--colour-ink);
  margin: 0 0 1.75rem;
  max-width: 15ch;          /* editorial wrap, like the design */
  text-transform: none;
}
.nr-contact__lead :is(h1, h2, h3, h4) em { font-style: italic; }

.nr-contact__lead p {
  font-family: var(--font-body, 'DM Sans', system-ui, sans-serif);
  font-size: var(--text-sm, 0.833rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--colour-mid);
  margin: 0;
}
.nr-contact__lead p strong {
  color: var(--colour-ink);
  font-weight: 500;
}

/* ------------------------------------------------------------
   RIGHT — Fluent Forms, restyled on-system
   ------------------------------------------------------------ */
/* Vertical rhythm between field groups */
.nr-contact__form .ff-el-group { margin: 0 0 1rem; }

/* Labels: kept in the DOM for screen readers, hidden visually (placeholders show
   the field name). */
.nr-contact__form .ff-el-input--label {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Inputs + textarea — soft filled, no harsh border */
.nr-contact__form .ff-el-form-control {
  width: 100% !important;
  box-sizing: border-box;
  background: var(--colour-rule-light, #ECEAE4) !important;
  border: 1px solid transparent !important;
  border-radius: 2px !important;
  padding: 1rem 1.2rem !important;
  font-family: var(--font-body, 'DM Sans', system-ui, sans-serif) !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  color: var(--colour-ink) !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.nr-contact__form .ff-el-form-control::placeholder { color: var(--colour-mid); opacity: 1; }

/* Focus — system ink border, no browser-blue ring */
.nr-contact__form .ff-el-form-control:focus,
.nr-contact__form .ff-el-form-control:focus-visible {
  outline: none !important;
  border-color: var(--colour-ink) !important;
  background: var(--colour-paper) !important;
}

.nr-contact__form textarea.ff-el-form-control {
  min-height: 12rem;        /* ~10 rows */
  resize: vertical;
}

/* First/Last name two-up row — give the cells a real gap */
.nr-contact__form .ff-t-container {
  display: flex;
  gap: 1rem;
}
.nr-contact__form .ff-t-cell {
  flex: 1 1 0;
  min-width: 0;
}

/* Submit — the one solid dark element on the page */
.nr-contact__form .ff-btn-submit {
  display: inline-block;
  background: var(--colour-ink) !important;
  color: var(--colour-paper) !important;
  border: 0 !important;
  border-radius: 2px !important;
  padding: 0.9rem 1.6rem !important;
  font-family: var(--font-body, 'DM Sans', system-ui, sans-serif) !important;
  font-size: 0.9rem !important;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color 0.25s ease, opacity 0.25s ease;
}
.nr-contact__form .ff-btn-submit:hover { background: var(--colour-ink-2) !important; }
.nr-contact__form .ff-btn-submit:focus-visible {
  outline: 2px solid var(--colour-mid) !important;
  outline-offset: 2px;
}

/* Neutralise plugin chrome that fights the design */
.nr-contact__form fieldset { border: 0; margin: 0; padding: 0; }
.nr-contact__form .ff-el-is-error .ff-el-form-control { border-color: #b3261e !important; }

/* ------------------------------------------------------------
   Mobile — single column, quote first
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .nr-contact__split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .nr-contact__eyebrow { text-align: left; }
}

/* ------------------------------------------------------------
   SCROLL-REVEAL (fade + slight rise) — shared with About via nr-reveal.js.
   .nr-reveal-init is added ONLY by the script, so with JS off everything is visible
   and the Fluent Form stays fully usable. Only the .nr-contact__form CONTAINER is
   revealed as one block; form fields are never individually animated. transform +
   opacity only; enqueued only on the Contact template, so classes never leak.
   ------------------------------------------------------------ */
.nr-reveal-init {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.nr-reveal-init.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .nr-reveal-init { opacity: 1; transform: none; transition: none; }
}
