/* Renéra · Contact page · Desktop styles
   Layered on top of homepage.css (shared chrome + tokens + .rn-* primitives).
   Renders the single "Work with us" section the design landed on: a left rail
   (heading + contact details) and a form card wrapping the live WPForms #494,
   restyled to the Renéra hairline aesthetic. */

/* =========================================
   Section + two-column layout
   ========================================= */
#form .container { max-width: 1480px; }

.rn-form-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "aside   form"
    "details form";
  column-gap: 72px;
  align-items: start;
}
.rn-form-aside {
  grid-area: aside;
  /* Scrolls naturally with the page. (Was position:sticky/top:132px, which pinned
     the heading 132px from the top while the taller form card scrolled past it —
     making the block appear to detach and drift from the contact details below.) */
}
.rn-form-card { grid-area: form; }

/* contact details list in the left rail (desktop) */
.rn-contact-dl {
  grid-area: details;
  margin: 40px 0 0;
  display: grid;
  gap: 22px;
  padding-top: 32px;
  border-top: 1px solid var(--renera-clay-300);
}
.rn-contact-dl > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: baseline;
}
.rn-contact-dl dt {
  font-family: var(--renera-font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--renera-mute);
}
.rn-contact-dl dd {
  margin: 0;
  font-family: var(--renera-font-serif);
  font-size: 19px;
  line-height: 1.4;
  color: var(--renera-olive-700);
}
.rn-contact-dl dd a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--renera-dur-fast) var(--renera-ease);
}
.rn-contact-dl dd a:hover { border-color: var(--renera-olive-500); }

/* =========================================
   Form card
   ========================================= */
.rn-form-card {
  background: var(--renera-sand-200);
  border: 1px solid var(--renera-clay-300);
  border-radius: var(--renera-r-lg);
  padding: 48px;
}

/* =========================================
   WPForms (#494) → Renéra hairline restyle
   Scoped to .rn-form-card so it never leaks to other WPForms instances.
   ========================================= */
.rn-form-card .wpforms-container,
.rn-form-card .wpforms-form { margin: 0; max-width: none; }

/* Re-theme WPForms "modern" CSS variables to brand tokens. These are declared
   by WPForms on an #id selector (high specificity), so redeclaring them here —
   where they cascade by inheritance — is what actually recolors the button. */
.rn-form-card .wpforms-container {
  --wpforms-button-background-color: var(--renera-olive-700);
  --wpforms-button-background-color-alt: var(--renera-olive-800);
  --wpforms-button-text-color: var(--renera-sand-200);
  --wpforms-button-text-color-alt: var(--renera-sand-200);
  --wpforms-button-border-color: var(--renera-olive-700);
  --wpforms-button-border-radius: var(--renera-r-sm);
  --wpforms-field-border-radius: 0;
}

.rn-form-card .wpforms-field-container { margin: 0; }

.rn-form-card .wpforms-field {
  padding: 0;
  margin: 0 0 28px;
  clear: both;
}
.rn-form-card .wpforms-field-container > .wpforms-field:last-of-type { margin-bottom: 0; }

/* labels — mono, uppercase, muted (matches .rn-contact-dl dt in the left rail).
   The `.wpforms-container-full` segment is load-bearing: WPForms' own
   `div.wpforms-container-full .wpforms-field-label` (specificity 0,2,1) sets
   font-size:16px + a dark colour, and `.wpforms-container .wpforms-field-label`
   hard-codes font-weight:700 — both out-rank a plain `.rn-form-card .wpforms-field-label`
   (0,2,0), which is why the labels were rendering big/bold/dark instead of the
   intended hairline. Threading the container class through lifts us to 0,3,0 so
   the brand values win without resorting to !important. */
.rn-form-card .wpforms-container-full .wpforms-field-label,
.rn-form-card .wpforms-container-full .wpforms-field-label-inline {
  display: block;
  margin: 0 0 8px;
  font-family: var(--renera-font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--renera-mute);
}
.rn-form-card .wpforms-required-label { color: var(--renera-clay-500); }

/* inputs / textarea — transparent with a hairline underline */
.rn-form-card .wpforms-field input[type="text"],
.rn-form-card .wpforms-field input[type="email"],
.rn-form-card .wpforms-field input[type="tel"],
.rn-form-card .wpforms-field input[type="url"],
.rn-form-card .wpforms-field input[type="number"],
.rn-form-card .wpforms-field textarea {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--renera-clay-300);
  border-radius: 0;
  box-shadow: none;
  padding: 12px 0;
  font-family: var(--renera-font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--renera-ink);
  outline: none;
  transition: border-color var(--renera-dur-fast) var(--renera-ease);
}
.rn-form-card .wpforms-field textarea {
  min-height: 132px;
  padding-top: 8px;
  resize: vertical;
}
.rn-form-card .wpforms-field input::placeholder,
.rn-form-card .wpforms-field textarea::placeholder {
  color: var(--renera-mute);
  opacity: 0.6;
}
.rn-form-card .wpforms-field input:focus,
.rn-form-card .wpforms-field textarea:focus {
  border-bottom-color: var(--renera-olive-700);
  box-shadow: none;
}

/* validation errors — warm underline + small mono message */
.rn-form-card .wpforms-field input.wpforms-error,
.rn-form-card .wpforms-field textarea.wpforms-error {
  border-bottom-color: var(--renera-clay-700);
}
.rn-form-card label.wpforms-error,
.rn-form-card em.wpforms-error {
  display: block;
  margin-top: 8px;
  font-family: var(--renera-font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--renera-clay-700);
}

/* submit — brand olive button with a trailing arrow (matches .rn-btn--primary) */
.rn-form-card .wpforms-submit-container { margin-top: 8px; padding: 0; text-align: left; }
.rn-form-card button[type="submit"].wpforms-submit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 32px;
  background: var(--renera-olive-700) !important;
  color: var(--renera-sand-200) !important;
  border: 1px solid var(--renera-olive-700) !important;
  border-radius: var(--renera-r-sm);
  font-family: var(--renera-font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: none;
  transition: background var(--renera-dur-fast) var(--renera-ease),
              border-color var(--renera-dur-fast) var(--renera-ease);
}
.rn-form-card button[type="submit"].wpforms-submit::after {
  content: "\2192"; /* → */
  font-size: 14px;
  letter-spacing: 0;
  transition: transform var(--renera-dur-base) var(--renera-ease);
}
.rn-form-card button[type="submit"].wpforms-submit:hover,
.rn-form-card button[type="submit"].wpforms-submit:focus {
  background: var(--renera-olive-800) !important;
  border-color: var(--renera-olive-800) !important;
  color: var(--renera-sand-200) !important;
}
.rn-form-card button[type="submit"].wpforms-submit:hover::after { transform: translateX(4px); }

/* confirmation message after a successful send */
.rn-form-card .wpforms-confirmation-container-full {
  margin: 0;
  padding: 22px 24px;
  background: var(--renera-sand-300);
  border: 1px solid var(--renera-clay-300);
  border-left: 2px solid var(--renera-olive-500);
  border-radius: var(--renera-r-sm);
  font-family: var(--renera-font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--renera-ink);
}

/* =========================================
   Desktop refinement — name + phone share a row
   ========================================= */
@media (min-width: 721px) {
  .rn-form-card .wpforms-field-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 36px;
  }
  /* email + message span the full width; name (1) + phone (2) sit side by side */
  .rn-form-card #wpforms-494-field_5-container,
  .rn-form-card #wpforms-494-field_3-container { grid-column: 1 / -1; }
  .rn-form-card .wpforms-submit-container { grid-column: 1 / -1; }
}

/* =========================================
   Responsive (desktop template on narrow viewports)
   ========================================= */
@media (max-width: 1080px) {
  .rn-form-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "aside" "form" "details";
    row-gap: 48px;
  }
  .rn-contact-dl { margin-top: 0; }
}
@media (max-width: 720px) {
  .rn-form-card { padding: 32px 24px; }
}
