/* WordPress-only additions on top of site.css */
.admin-bar .site-header { top: 32px; }
.admin-bar #process.pin > .wrap { top: 32px; height: calc(100vh - 32px); }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { #wpadminbar { position: fixed; } }

/* Plain pages and posts */
.prose-head { padding: clamp(150px, 20vw, 240px) 0 clamp(30px, 5vw, 60px); }
.prose-head h1 { font-size: clamp(2.4rem, 1.4rem + 5vw, 5.5rem); line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
.prose { max-width: 70ch; padding-bottom: clamp(80px, 12vw, 160px); }
.prose > * + * { margin-top: 1.2em; }
.prose h2, .prose h3 { color: var(--ink); margin-top: 2em; }
.prose a { color: var(--ink); text-decoration-color: var(--mint); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin-left: 0; padding-left: 1.2em; border-left: 6px solid var(--mint); }

/* ---------- Gravity Forms (legacy markup) in the contact frame ----------
   Selectors are deliberately heavy and the layout rules use !important so they
   win over Gravity Forms' own legacy stylesheet. */
.contact-form.contact-form-gf { display: block; }
.contact-form-gf .gform_wrapper.gform_legacy_markup_wrapper { margin: 0; padding: 0; max-width: none; font: inherit; }
.contact-form-gf .gform_wrapper .gform_heading { display: none; }
.contact-form-gf .gform_wrapper form { margin: 0; }
.contact-form-gf .gform_wrapper .gform_body { width: 100%; margin: 0; padding: 0; }
.contact-form-gf .gform_wrapper ul.gform_fields {
  display: grid !important; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem;
  list-style: none !important; margin: 0 !important; padding: 0 !important; width: 100% !important;
}
.contact-form-gf .gform_wrapper ul.gform_fields::before,
.contact-form-gf .gform_wrapper ul.gform_fields::after { content: none !important; display: none !important; }
.contact-form-gf .gform_wrapper ul.gform_fields li.gfield {
  grid-column: 1 / -1; float: none !important; clear: none !important; display: block !important;
  width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important;
  background: none !important; border: 0 !important; list-style: none !important;
}
.contact-form-gf .gform_wrapper ul.gform_fields li.gfield::before { content: none !important; }
.contact-form-gf .gform_wrapper ul.gform_fields li.gfield.gf_left_half { grid-column: 1; }
.contact-form-gf .gform_wrapper ul.gform_fields li.gfield.gf_right_half { grid-column: 2; }
.contact-form-gf .gform_wrapper li.gfield .gfield_label {
  display: block; margin: 0; font-size: .8em; font-weight: 700; line-height: 1.6; color: var(--text);
}
.contact-form-gf .gform_wrapper .gfield_required { color: inherit; margin-left: .25em; font-weight: 700; }
.contact-form-gf .gform_wrapper li.gfield .ginput_container { margin: 0 !important; padding: 0; }
.contact-form-gf .gform_wrapper li.gfield input[type="text"],
.contact-form-gf .gform_wrapper li.gfield input[type="email"],
.contact-form-gf .gform_wrapper li.gfield input[type="tel"],
.contact-form-gf .gform_wrapper li.gfield input[type="url"],
.contact-form-gf .gform_wrapper li.gfield input[type="number"],
.contact-form-gf .gform_wrapper li.gfield select,
.contact-form-gf .gform_wrapper li.gfield textarea:not(.g-recaptcha-response) {
  display: block; width: 100% !important; max-width: none; margin: .35rem 0 0 !important;
  font: inherit; font-size: 1rem !important; line-height: 1.5; padding: .7rem .8rem !important;
  border: 0; border-bottom: 4px solid var(--rule); border-radius: 0; box-shadow: none;
  background: var(--mist); color: var(--ink); transition: border-color .2s; -webkit-appearance: none; appearance: none;
}
.contact-form-gf .gform_wrapper li.gfield textarea:not(.g-recaptcha-response) { height: 8.5rem !important; resize: vertical; }
.contact-form-gf .gform_wrapper li.gfield input:focus,
.contact-form-gf .gform_wrapper li.gfield select:focus,
.contact-form-gf .gform_wrapper li.gfield textarea:focus { outline: none; border-color: var(--mint); }

/* reCAPTCHA: keep the widget, hide its "CAPTCHA" label from sight only. */
.contact-form-gf .gform_wrapper li.gfield--type-captcha .gfield_label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.contact-form-gf .gform_wrapper .ginput_recaptcha { max-width: 100%; overflow: hidden; }

/* Submit */
.contact-form-gf .gform_wrapper .gform_footer { margin: 1.4rem 0 0 !important; padding: 0 !important; display: flex; align-items: center; gap: 1rem; }
.contact-form-gf .gform_wrapper .gform_footer input[type="submit"],
.contact-form-gf .gform_wrapper .gform_footer button {
  display: inline-block; width: auto !important; margin: 0 !important; cursor: pointer;
  font: inherit; font-size: 1rem !important; font-weight: 700; line-height: 1.2; letter-spacing: 0;
  padding: .85rem 1.5rem !important; border: 4px solid var(--ink); border-radius: 0;
  background: var(--ink); color: #fff; -webkit-appearance: none; appearance: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.contact-form-gf .gform_wrapper .gform_footer input[type="submit"]:hover,
.contact-form-gf .gform_wrapper .gform_footer button:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--mint); }
.contact-form-gf .gform_wrapper .gform_footer input[type="submit"]:active { transform: none; box-shadow: none; }
.contact-form-gf .gform_wrapper .gform_footer input[type="submit"]:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
.contact-form-gf .gform_wrapper .gform_ajax_spinner { width: 20px; height: 20px; margin: 0; }

/* Validation */
.contact-form-gf .gform_wrapper .validation_error,
.contact-form-gf .gform_wrapper .gform_validation_errors {
  margin: 0 0 1.2rem !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
  color: #790000 !important; font-size: .85em !important; font-weight: 700; text-align: left; width: auto !important;
}
.contact-form-gf .gform_wrapper .gform_validation_errors h2 { font: inherit; color: inherit; margin: 0; padding: 0; }
.contact-form-gf .gform_wrapper .gform_validation_errors .gform-icon { display: none; }
.contact-form-gf .gform_wrapper li.gfield.gfield_error .gfield_label { color: #790000; }
.contact-form-gf .gform_wrapper li.gfield.gfield_error input,
.contact-form-gf .gform_wrapper li.gfield.gfield_error textarea { border: 0 !important; border-bottom: 4px solid #790000 !important; }
.contact-form-gf .gform_wrapper li.gfield .validation_message {
  margin: .35rem 0 0 !important; padding: 0 !important; border: 0 !important; background: none !important;
  color: #790000 !important; font-size: .8em !important; font-weight: 400;
}

/* Confirmation message */
.contact-form-gf .gform_confirmation_wrapper { margin: 0; }
.contact-form-gf .gform_confirmation_message { font-size: 1.15rem; font-weight: 700; line-height: 1.4; color: var(--ink); padding: 1rem 0; }

@media (max-width: 720px) {
  .contact-form-gf .gform_wrapper ul.gform_fields { grid-template-columns: 1fr; }
  .contact-form-gf .gform_wrapper ul.gform_fields li.gfield.gf_left_half,
  .contact-form-gf .gform_wrapper ul.gform_fields li.gfield.gf_right_half { grid-column: 1 / -1; }
}
