/* Backdrop consumes hhr-hero-v4.css Golden-only --hhr-scrim-scale, default 1. */
/* ============================================================================
   Helen Harp Realty — Contact / Buyer intake form   (contact/css/contact.css)
   Fully self-isolated. Every selector is `.cf-`-prefixed so it can drop onto
   any page (the Charlotte hub modal, the standalone preview) without touching
   or being touched by site styles. Recreates the "Hi, I'm Helen!" mockup.
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&family=Merriweather:wght@400;700;900&family=Alex+Brush&display=swap');

.cf-form,
.cf-form *,
.cf-form *::before,
.cf-form *::after { box-sizing: border-box; }

/* honeypot — parked off-screen (NOT display:none, so naive bots still fill it) */
.cf-form .cf-hp {
  position: absolute !important;
  left: -9999px !important; top: auto !important;
  width: 1px; height: 1px; overflow: hidden;
}

.cf-form {
  /* Golden Charlotte palette, 2026-09-10. Existing token names are retained
     for the contact component; neutral surfaces and red controls share the
     current consumer-site visual language. */
  --cf-navy:        #ffffff;   /* quiet header surface */
  --cf-navy-2:      var(--hhr-brand-dark,#9d1932);   /* selected control */
  --cf-navy-deep:   var(--hhr-brand-dark,#7c1428);   /* deepest */
  --cf-gold:        var(--hhr-brand-dark,#9d1932);   /* primary accent */
  --cf-gold-2:      var(--hhr-brand-accent,#ad263f);
  --cf-gold-deep:   var(--hhr-brand-dark,#7c1428);
  --cf-cream:       #ffffff;   /* form surface */
  --cf-cream-2:     #f7f5f3;   /* secondary surface */
  --cf-ink:         #252525;   /* body text: site ink */
  --cf-sub:         #66615e;   /* muted label: site muted */
  --cf-line:        #d7d1cc;
  --cf-line-2:      #e5e1de;
  --cf-white:       #ffffff;
  --cf-radius:      12px;

  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--cf-ink);
  background: var(--cf-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

/* ============================ HERO BAND ============================
   "Let's talk" band (owner 2026-09-11): headline + script + frosted copy box on the
   left, the porch (cropped from the owner's mockup) fading in on the right.        */
.cf-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(240px, 26vw, 340px);
  padding: clamp(22px, 2.6vw, 40px) clamp(28px, 3.6vw, 58px) clamp(26px, 2.8vw, 40px);
  color: var(--cf-ink);
  background-color: #fff;
  background-image:
    linear-gradient(90deg, #ffffff 0%, #ffffff 40%, rgba(255,255,255,.9) 54%, rgba(255,255,255,.35) 70%, rgba(255,255,255,0) 84%),
    url('/contact/img/helen-harp-contact-porch-20260911.webp');
  background-repeat: no-repeat, no-repeat;
  background-position: left center, right center;
  background-size: 100% 100%, auto 100%;
}

/* ---- CENTER: headline + copy ---- */
.cf-hero__pitch { max-width: 620px; margin: 0; position: relative; z-index: 1; }
.cf-hero__headline { margin: 0 0 clamp(14px, 1.6vw, 22px); }
.cf-hl-serif {
  display: block;
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: clamp(40px, 4.6vw, 66px);
  line-height: 1.02;
  letter-spacing: .005em;
  color: var(--cf-ink);
}
.cf-hl-script {
  display: block;
  /* same face AND weight as Helen's signature — the parent <h2> defaults to
     bold, which was synthetically thickening Alex Brush (owner: match sig) */
  font-weight: 400;
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 1.0;
  margin-top: 0;
  margin-left: 0;   /* flush left under "Let's talk" (owner 2026-09-11 mockup) */
}

/* ---- signature and script accent ---- */
.cf-script {
  display: block;
  color: var(--cf-gold);
  line-height: 1;
  /* Flat red lettering on the light header surface. */
  text-shadow: none;
}
.cf-hl-script    { font-family: 'Alex Brush', cursive; }
/* beat the Charlotte page's `body[data-skin="redesign"]:not(#_) *` Inter
   !important wildcard so the handwriting + serif faces survive in the modal */
.cf-hl-script:not(#_):not(#_) { font-family: 'Alex Brush', cursive !important; }
.cf-hl-serif:not(#_):not(#_)  { font-family: 'Merriweather', Georgia, serif !important; }

/* Pitch copy uses the site body face on a translucent white surface;
   its original spacing and first-line indent remain intact. */
.cf-hero__copy {
  margin: 0;
  max-width: 52ch;
  font-family: 'Raleway', Arial, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.6;
  color: var(--cf-ink);
  text-indent: 0;
  text-shadow: none;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  padding: clamp(12px, 1.2vw, 18px) clamp(16px, 1.5vw, 22px);
  border-radius: 12px;
  border: 1px solid var(--cf-line-2);
}
/* survive the Charlotte page's Inter !important wildcard */
.cf-hero__copy:not(#_):not(#_) { font-family: 'Raleway', Arial, serif !important; }

/* ============================ FORM BODY GRID ============================ */
.cf-grid {
  position: relative;
  z-index: 2;
  margin-top: -20px;
  border-radius: 22px 22px var(--cf-radius) var(--cf-radius);
  background: var(--cf-cream);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  /* owner 2026-06-12 height trim: ~30px off the bottom (button keeps a small
     safe gap below); top unchanged — the 15px cut comes off the hero instead */
  padding: clamp(20px, 2vw, 28px) clamp(20px, 2vw, 30px) clamp(6px, 0.7vw, 10px);
}

.cf-col {
  padding: 0 clamp(16px, 1.6vw, 26px);
  border-left: 1px solid var(--cf-line-2);
  display: flex;
  flex-direction: column;
}
.cf-col:first-child { border-left: 0; padding-left: clamp(6px, .6vw, 12px); }
.cf-col:last-child  { padding-right: clamp(6px, .6vw, 12px); }

.cf-block { margin-bottom: clamp(20px, 1.9vw, 28px); }
.cf-block:last-child { margin-bottom: 0; }

/* section heading + icon */
.cf-h {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 3px;
  font-size: clamp(14.5px, 1.08vw, 16.5px);
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--cf-ink);
}
.cf-h__ico { color: var(--cf-navy-2); display: inline-flex; }
.cf-h__ico svg { width: 19px; height: 19px; }
.cf-sub { margin: 0 0 12px; font-size: 12.8px; color: var(--cf-sub); }
.cf-sub--mt { margin-top: 14px; }

/* -------------------- text inputs / textarea -------------------- */
.cf-field { position: relative; display: block; margin-bottom: 11px; }
/* visible text label — a MOBILE-ONLY element (≤720px layer shows it). Desktop
   keeps its placeholder-labelled look, so the base state is hidden. */
.cf-field__lbl { display: none; }
/* …except the loan variant's two financing questions (form.php 'loan' variant,
   2026-07-02): the whole form exists to ask these, so they read as captioned
   fields on desktop too. */
.cf-field__lbl--loan {
  display: block;
  margin: 0 0 7px;
  font-size: 12.8px;
  font-weight: 700;
  color: var(--cf-ink);
}
/* the loan questions wrap their select in a <span class="cf-select"> inside the
   <label>; block display so the select takes the column width */
.cf-field--stack > .cf-select { display: block; }
.cf-field__ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: #766e69; pointer-events: none; display: inline-flex;
}
.cf-field__ico svg { width: 17px; height: 17px; }
.cf-field input,
.cf-field textarea {
  width: 100%;
  font: 400 14px/1.4 'Raleway', sans-serif;
  color: var(--cf-ink);
  background: var(--cf-white);
  border: 1px solid var(--cf-line);
  border-radius: 9px;
  padding: 12px 14px 12px 40px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cf-field--plain input { padding-left: 14px; }
.cf-field--area { margin-bottom: 0; }
.cf-field textarea { padding-left: 14px; resize: vertical; min-height: 68px; }  /* -10px (owner) */
.cf-field input::placeholder,
.cf-field textarea::placeholder { color: #766e69; }
.cf-field input:focus,
.cf-field textarea:focus {
  border-color: var(--cf-gold);
  box-shadow: 0 0 0 3px rgba(var(--hhr-brand-rgb,157,25,50),.16);
}

/* -------------------- select -------------------- */
.cf-select { position: relative; }
.cf-select select {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  font: 400 14px/1.4 'Raleway', sans-serif;
  color: var(--cf-ink);
  background: var(--cf-white);
  border: 1px solid var(--cf-line);
  border-radius: 9px;
  padding: 12px 40px 12px 14px;
  cursor: pointer;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cf-select select:invalid,
.cf-select select option[value=""] { color: #766e69; }
.cf-select select:focus { border-color: var(--cf-gold); box-shadow: 0 0 0 3px rgba(var(--hhr-brand-rgb,157,25,50),.16); }
/* invalid state (contact.js sets aria-invalid on the required fields) — base
   rule for BOTH input types on all widths (2026-07-02, with the loan variant) */
.cf-field input[aria-invalid="true"],
.cf-select select[aria-invalid="true"] { border-color: var(--hhr-brand-chart,#c04a4a); }
.cf-select__chev {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: #766e69; pointer-events: none;
}

/* -------------------- choice pills (single-select button groups) -------------------- */
.cf-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.cf-choices--2 { grid-template-columns: 1fr 1fr; }
.cf-pick {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: 600 13.2px/1.1 'Raleway', sans-serif;
  color: var(--cf-ink);
  background: var(--cf-white);
  border: 1px solid var(--cf-line);
  border-radius: 9px;
  padding: 12px 12px;
  cursor: pointer;
  text-align: center;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .06s ease;
}
.cf-pick svg { width: 17px; height: 17px; flex: none; }
.cf-pick--wide { grid-column: 1 / -1; }
.cf-pick:hover { border-color: #d7d1cc; background: #fff; }
.cf-pick:active { transform: translateY(1px); }
.cf-pick.is-on {
  background: var(--cf-navy-2);
  border-color: var(--cf-navy-2);
  color: #fff;
}
.cf-pick.is-on svg { color: #ffffff; }

/* -------------------- checkbox lists -------------------- */
.cf-checks { display: grid; grid-template-columns: 1fr; gap: 4px; }
.cf-checks--2 { grid-template-columns: 1fr 1fr; column-gap: 12px; }
.cf-check {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px;
  font-size: 13px; color: #45403d;
  cursor: pointer;
  border-radius: 7px;
  transition: background .12s ease;
  user-select: none;
}
.cf-check:hover { background: rgba(42,32,23,.035); }
.cf-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.cf-check__box {
  flex: none; width: 17px; height: 17px;
  border: 1.6px solid #d7d1cc; border-radius: 5px;
  background: #fff; position: relative;
  transition: background .14s ease, border-color .14s ease;
}
.cf-check__box::after {
  content: ""; position: absolute; left: 4.5px; top: 1.5px;
  width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .14s ease;
}
.cf-check input:checked + .cf-check__box {
  background: var(--cf-navy-2); border-color: var(--cf-navy-2);
}
.cf-check input:checked + .cf-check__box::after { transform: rotate(45deg) scale(1); }
.cf-check input:focus-visible + .cf-check__box { box-shadow: 0 0 0 3px rgba(var(--hhr-brand-rgb,157,25,50),.22); }
.cf-check__ico { color: #766e69; display: inline-flex; flex: none; }
.cf-check__ico svg { width: 16px; height: 16px; }
.cf-check__txt { line-height: 1.25; }

/* -------------------- submit -------------------- */
.cf-submit {
  margin-top: -4px;   /* bumped up 10px (owner 2026-06-12) */
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 18px/1 'Merriweather', Georgia, serif;   /* owner 2026-09-11 mockup */
  color: #fff;
  background: var(--cf-gold);
  border: 0; border-radius: 10px;
  padding: 17px 18px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(var(--hhr-brand-rgb,157,25,50),.16);
  transition: filter .16s ease, transform .06s ease, box-shadow .16s ease;
}
.cf-submit svg { width: 19px; height: 19px; }
.cf-submit:hover { filter: brightness(1.05); box-shadow: 0 6px 16px rgba(var(--hhr-brand-rgb,157,25,50),.22); }
.cf-submit:active { transform: translateY(1px); }
.cf-submit[disabled] { opacity: .65; cursor: wait; }

/* form-adjacent privacy consent line (added 2026-06-28) */
.cf-consent {
  margin: 10px 0 0;
  text-align: center;
  font: 400 12px/1.5 'Raleway', sans-serif;
  color: var(--cf-sub);
}
.cf-consent a { color: var(--cf-gold-deep); text-decoration: underline; }
.cf-consent a:hover { color: var(--cf-gold-2); }

/* -------------------- validation flash (element created by contact.js) ------
   Styling moved here from contact.js inline cssText (2026-07-02) so the mobile
   layer can scale it; the desktop look is byte-identical to the old inline. */
.cf-flash {
  margin: 0 22px 16px;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--hhr-brand-tint,#fdecec);
  border: 1px solid var(--hhr-brand-tint,#f3b5b5);
  color: var(--hhr-brand-accent,#a12626);
  font: 500 13px/1.4 'Raleway', sans-serif;
}

/* -------------------- success overlay -------------------- */
.cf-done[hidden] { display: none; }
.cf-done {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(250,248,243,.94);
  backdrop-filter: blur(3px);
  border-radius: inherit;
  z-index: 5;
  padding: 24px;
}
.cf-done__card { text-align: center; max-width: 420px; animation: cf-pop .32s cubic-bezier(.2,.7,.3,1) both; }
.cf-done__ico { color: #1f9d57; display: inline-flex; }
.cf-done__ico svg { width: 60px; height: 60px; }
.cf-done__title { margin: 14px 0 6px; font-size: 22px; font-weight: 700; color: var(--cf-ink); }
.cf-done__msg { margin: 0; font-size: 15px; color: var(--cf-sub); }
@keyframes cf-pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================================================
   LIGHTBOX — driven by the site's SHARED modal controller (url-stability.js):
   the root carries the site `.lightbox` class so [data-modal-open]/[data-modal-close]
   /ESC/closeAllModals all work exactly like the dashboard & reviews lightboxes
   (one modal system, owner 2026-06-12). Controller toggles `.is-mod-open`;
   `.cf-on` kept for back-compat. Open is a pure synchronous class toggle —
   hero assets are <link rel=preload>ed by modal.php so first open is instant.
   The modal itself scrolls internally (this fixed wrapper is overflow-y:auto)
   when taller than the viewport. */
.cf-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  /* ⚠️ COUPLING (don't-cluster ledger): this file loads ASYNC (modal.php media="print"
     swap, 2026-07-09 perf pass), so modal.php carries an inline
     `#contact-modal,#loan-modal{display:none}` guard holding this same closed state
     while this file is in flight — see the matching comment there. */
  display: none;
  align-items: flex-start; justify-content: center;
  /* owner 2026-06-18: open big on the main site too (small margin so the blurred
     page still peeks behind). */
  padding: clamp(8px, 2vh, 22px) clamp(8px, 2vw, 22px);
  overflow-y: auto;
}
/* main-site lightbox modal fills nearly the whole viewport */
.cf-lightbox .cf-modal { max-width: min(1320px, 96vw); }
/* !important matches the site's generic `html body .lightbox.is-mod-open
   { display:block !important }` (modals.css); ours loads later so flex wins */
html body .cf-lightbox.is-mod-open,
.cf-lightbox.cf-on { display: flex !important; animation: cf-fade .22s ease-out both; }
@keyframes cf-fade { from { opacity: 0; } to { opacity: 1; } }

.cf-lightbox__backdrop {
  position: fixed; inset: 0;
  border: 0; padding: 0; margin: 0;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: rgba(20,17,11,calc(.72 * var(--hhr-scrim-scale,1)));
  -webkit-backdrop-filter: blur(7px) saturate(1.1);
  backdrop-filter: blur(7px) saturate(1.1);
}
.cf-modal {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: auto;
  background: var(--cf-cream, #ffffff);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(4,12,28,.55);
  animation: cf-rise .3s cubic-bezier(.2,.7,.3,1) both;
  /* owner 2026-06-18: bumped ~25% bigger (was zoom:0.8 from 2026-06-12) back to
     natural size. zoom scales text/boxes/images AND layout (no dead space,
     unlike transform:scale). Supported Chrome/Edge/Safari/FF126+. */
  zoom: 1;
}
@keyframes cf-rise { from { transform: translateY(16px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }

/* Big solid-white close button, upper-right (owner 2026-06-18). */
.cf-close {
  position: absolute; top: 18px; right: 18px; z-index: 12;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 30px; line-height: 1; text-decoration: none;
  color: #252525;
  padding: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: #fff;
  border: 1px solid rgba(30,25,19,.12);
  box-shadow: 0 6px 22px rgba(4,12,28,.28);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.cf-close:hover { background: #fff; transform: rotate(90deg) scale(1.05); box-shadow: 0 8px 26px rgba(4,12,28,.34); }

/* Little back pill, upper-LEFT (above Helen's head) — returns to the listing
   when the form is shown inside the listing-detail modal (owner 2026-06-18). */
.cf-back {
  position: absolute; top: 18px; left: 18px; z-index: 12;
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 15px 0 12px; border-radius: 999px;
  font: 600 13px/1 'Raleway', system-ui, sans-serif; color: #252525;
  text-decoration: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: #fff; border: 1px solid rgba(30,25,19,.12);
  box-shadow: 0 6px 22px rgba(4,12,28,.28);
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.cf-back svg { width: 16px; height: 16px; }
.cf-back:hover { transform: translateX(-2px); box-shadow: 0 8px 26px rgba(4,12,28,.34); }
.cf-back:focus-visible, .cf-close:focus-visible { outline: 3px solid #bb7f1a; outline-offset: 2px; }

/* ---- helper for the host page: the Accredited-Buyer CTA is a <a role=button>
       (no href, so the page's url-stability.js leaves it alone — our own JS
       opens the modal). Keep it looking/behaving like the card. ---- */
.cockpit__ctas a.cta-card,
.cockpit__ctas .cf-trigger { text-decoration: none; cursor: pointer; color: inherit; }

/* ---- standalone trigger button for shells WITHOUT the cockpit CTA cards
       (templates/page-shell.php hero). Temporary transparent blue-outline card
       for the hero simplification pass. ---- */
.cf-cta-btn {
  display: inline-flex; flex-direction: column; gap: 2px;
  padding: 11px 22px;
  border-radius: 9px;
  background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 1px solid rgba(var(--hhr-brand-rgb,157,25,50),.9);
  text-decoration: none; cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .06s ease;
}
.cf-cta-btn:hover { border-color: rgba(var(--hhr-brand-rgb,124,20,40),.98); box-shadow: 0 0 0 1px rgba(var(--hhr-brand-rgb,157,25,50),.18); }
.cf-cta-btn:active { transform: translateY(1px); }
.cf-cta-btn__primary {
  font: 700 1.05rem/1.2 'Raleway', sans-serif; color: #fff;
}
.cf-cta-btn__primary span { color: rgba(var(--hhr-brand-rgb,157,25,50),.98); letter-spacing: 0; }
.cf-cta-btn__secondary {
  font: 500 .82rem/1.3 'Raleway', sans-serif; color: rgba(255,255,255,.85);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 1080px) {
  .cf-grid { grid-template-columns: 1fr 1fr; row-gap: clamp(20px, 2.6vw, 30px); }
  .cf-col { border-left: 0; padding: 0 clamp(12px, 1.6vw, 20px); }
  .cf-col:nth-child(even) { border-left: 1px solid var(--cf-line-2); }
}
@media (max-width: 880px) {
  /* stack the identity above the headline; porch recedes to a light backdrop */
  .cf-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    row-gap: clamp(16px, 3vw, 24px);
    background-image:
      linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,255,255,.93)),
      url('/contact/img/helen-harp-contact-porch-20260911.webp');
    background-position: center, center;
    background-size: 100% 100%, cover;
  }
  .cf-hero__pitch { max-width: 600px; }
  .cf-hero__copy { margin-inline: auto; }
}
/* ============================================================================
   MOBILE PRESENTATION LAYER (≤720px) — 2026-07-02
   The SAME form (same fields, hidden inputs, submit pipeline, analytics) with a
   phone-first presentation: the lightbox becomes a full-screen panel, the four
   desktop columns flatten (display:contents) into ONE thumb-ordered column,
   every control grows to a 54–60px touch target, checkboxes become full-width
   tappable rows, and the submit button rides a sticky bottom action bar.
   These are responsive variants of this component's own rules (RULE 9-legal),
   not overrides of another stylesheet.
   ============================================================================ */
@media (max-width: 720px) {

  /* ---- full-screen panel: lightbox fills the viewport, card chrome drops ---- */
  .cf-lightbox { padding: 0; overflow-x: hidden; }
  .cf-lightbox .cf-modal,
  .cf-modal {
    max-width: none;
    min-height: 100dvh;
    border-radius: 0;
    /* overflow:visible so the sticky submit tracks the .cf-lightbox scrollport
       (an overflow:hidden box would become the sticky root and never scroll) */
    overflow: visible;
    animation: none;             /* no rise-from-below on a full-screen panel */
  }
  .cf-form { -webkit-tap-highlight-color: transparent; }

  /* close stays reachable while the panel scrolls */
  .cf-lightbox .cf-close {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
    width: 48px; height: 48px;
    font-size: 26px;
  }

  /* ---- compact hero: identity + headline only; the long pitch paragraph is
          parked so the form starts within the first screen ---- */
  .cf-hero {
    padding: calc(20px + env(safe-area-inset-top)) 22px 34px;
    row-gap: 12px;
  }
  .cf-hero__pitch { margin-top: 0; }
  .cf-hero__headline { margin-bottom: 0; }
  .cf-hl-serif  { font-size: 27px; }
  .cf-hl-script { font-size: 40px; margin-left: 22px; }
  /* park the long pitch paragraph on phones — EXCEPT the loan variant, whose
     copy is the required financing welcome message (owner 2026-07-02) */
  .cf-form:not(.cf-form--loan) .cf-hero__copy { display: none; }
  .cf-form--loan .cf-hero__copy { font-size: 15px; line-height: 1.55; }

  /* ---- one column: columns dissolve, blocks re-order for fast completion ---- */
  .cf-grid {
    display: flex;
    flex-direction: column;
    gap: 26px;
    margin-top: -16px;
    border-radius: 20px 20px 0 0;
    padding: 26px 18px calc(28px + env(safe-area-inset-bottom));
  }
  .cf-col, .cf-col:first-child, .cf-col:last-child { display: contents; }
  .cf-block { margin: 0; padding: 0 0 24px; border-bottom: 1px solid var(--cf-line-2); }
  .cf-block--contact   { order: 1; }
  .cf-block--intent    { order: 2; }
  .cf-block--timeline  { order: 3; }
  .cf-block--financing { order: 4; }
  .cf-block--loan      { order: 5; }   /* loan variant only: credit score + down payment */
  .cf-block--price     { order: 6; }
  .cf-block--areas     { order: 7; }
  .cf-block--hometype  { order: 8; }
  .cf-block--features  { order: 9; }
  .cf-block--notes     { order: 10; border-bottom: 0; padding-bottom: 8px; }
  .cf-consent          { order: 11; }
  .cf-submit           { order: 12; }

  /* ---- typography: readable without zooming (older eyes, sunlight) ---- */
  .cf-h { font-size: 22px; gap: 11px; margin-bottom: 6px; }
  .cf-h__ico svg { width: 24px; height: 24px; }
  .cf-sub { font-size: 16px; line-height: 1.45; margin-bottom: 16px; }

  /* ---- text inputs: visible labels above 58px fields ---- */
  .cf-field { margin-bottom: 16px; }
  .cf-field__lbl {
    display: block;
    margin: 0 2px 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--cf-ink);
  }
  /* the visible label replaces the placeholder as the field's caption */
  .cf-field__lbl ~ input::placeholder,
  .cf-field__lbl ~ textarea::placeholder { color: transparent; }
  .cf-field input,
  .cf-field textarea {
    min-height: 58px;
    font-size: 18px;
    border-radius: 14px;
    padding: 15px 16px 15px 50px;
  }
  .cf-field--plain input,
  .cf-field textarea { padding-left: 16px; }
  .cf-field textarea { min-height: 120px; }
  /* leading icon centers on the 58px input, not the label+input box */
  .cf-field__ico { top: auto; bottom: 19px; transform: none; left: 16px; }
  .cf-field__ico svg { width: 20px; height: 20px; }
  .cf-field input:focus,
  .cf-field textarea:focus { box-shadow: 0 0 0 4px rgba(var(--hhr-brand-rgb,157,25,50),.2); }
  .cf-field input[aria-invalid="true"] { border-color: var(--hhr-brand-chart,#c04a4a); }

  /* ---- selects: same 58px scale ---- */
  .cf-select select {
    min-height: 58px;
    font-size: 18px;
    border-radius: 14px;
    padding: 15px 52px 15px 16px;
  }
  .cf-select__chev { right: 16px; width: 22px; height: 22px; }

  /* ---- choice pills: two-up grid of 54px buttons ---- */
  .cf-choices { gap: 10px; }
  .cf-pick {
    min-height: 54px;
    font-size: 16px;
    border-radius: 12px;
    padding: 12px 10px;
  }
  .cf-pick svg { width: 20px; height: 20px; }

  /* ---- checkboxes: the whole row is the control ---- */
  .cf-checks, .cf-checks--2 { grid-template-columns: 1fr; gap: 10px; }
  .cf-check {
    min-height: 56px;
    padding: 14px 16px;
    gap: 14px;
    font-size: 17px;
    background: var(--cf-white);
    border: 1px solid var(--cf-line);
    border-radius: 14px;
    transition: background .12s ease, border-color .12s ease;
  }
  .cf-check:hover { background: var(--cf-white); }
  .cf-check:has(input:checked) {
    border-color: var(--cf-navy-2);
    background: var(--hhr-brand-tint,#faf4f5);
  }
  .cf-check:has(input:focus-visible) {
    box-shadow: 0 0 0 4px rgba(var(--hhr-brand-rgb,157,25,50),.25);
  }
  .cf-check__box { width: 26px; height: 26px; border-width: 2px; border-radius: 8px; }
  .cf-check__box::after {
    left: 7.5px; top: 2.5px;
    width: 7px; height: 13px;
    border-width: 0 2.5px 2.5px 0;
  }
  .cf-check__ico svg { width: 20px; height: 20px; }

  /* ---- sticky submit: always a thumb-reach away ---- */
  .cf-submit {
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 10;
    margin-top: 0;
    min-height: 60px;
    font-size: 19px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(20,17,11,.3), 0 4px 12px rgba(var(--hhr-brand-rgb,157,25,50),.16);
  }
  .cf-consent { font-size: 14px; margin: 2px 0; }

  /* ---- messages: viewport-centered success, readable error ---- */
  .cf-done { position: fixed; inset: 0; z-index: 30; border-radius: 0; }
  .cf-done__title { font-size: 24px; }
  .cf-done__msg { font-size: 17px; }
  .cf-flash { font-size: 16px; margin: 0 18px 14px; }
}

/* ============================================================================
   SIMPLE STANDARD CONTACT FORM — 2026-09-03
   Scoped to the new two-field standard form classes only.
   ============================================================================ */
.cf-grid--simple {
  grid-template-columns: minmax(0, 1000px);   /* owner 2026-09-11 mockup: the form runs the width of the card */
  justify-content: center;
  padding-top: clamp(26px, 3vw, 40px);
  padding-bottom: clamp(24px, 2.6vw, 34px);
}
.cf-grid--simple .cf-col--simple {
  width: 100%;
  padding: 0;
  border-left: 0;
}
.cf-simple__heading {
  margin: 0 0 6px;
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--cf-ink);
  text-align: left;
}
.cf-simple__sub {
  margin: 0 0 22px;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.5;
  color: var(--cf-sub);
}
.cf-slbl {
  display: block;
  margin: 0 2px 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cf-ink);
}
.cf-field--simple {
  width: 100%;
  margin-bottom: 17px;
}
.cf-field--simple input,
.cf-field--simple textarea {
  width: 100%;
  padding-left: 14px;
}
.cf-field--simple textarea {
  min-height: 130px;
}
.cf-field--simple input[aria-invalid="true"],
.cf-field--simple textarea[aria-invalid="true"] {
  border-color: var(--hhr-brand-chart,#c04a4a);
}
.cf-simple__help {
  display: block;
  margin: 7px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--cf-sub);
}
/* Loan-variant copy (2026-09-03 simplified loan form) */
.cf-simple__intro {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--cf-ink);
}
.cf-loanlist {
  margin: 0 0 16px;
  padding: 14px 18px 14px 34px;
  background: var(--cf-cream-2);
  border: 1px solid var(--cf-line);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cf-ink);
}
.cf-loanlist li { margin: 3px 0; }
.cf-loanlist li::marker { color: var(--cf-gold); }

@media (max-width: 720px) {
  .cf-grid--simple {
    display: flex;
    padding: 26px 18px calc(28px + env(safe-area-inset-bottom));
  }
  .cf-grid--simple .cf-col--simple,
  .cf-grid--simple .cf-col--simple:first-child,
  .cf-grid--simple .cf-col--simple:last-child {
    display: flex;
    flex-direction: column;
  }
  .cf-simple__heading {
    font-size: 24px;
    text-align: left;
  }
  .cf-slbl {
    font-size: 18px;
  }
  .cf-simple__help {
    font-size: 14px;
  }
}

/* ============================ ART CONTACT (owner 2026-09-12) ============================
   The standard contact form IS the owner's image; live fields sit over its painted
   fields by percentage. Field boxes (crop coordinates of the 1240x1007 art):
     message  x 75–1165  y 572–707     contact  x 75–1165  y 775–830
     submit   x 75–1165  y 882–942     footnote y ~968
   Card width is capped so the whole art (and its button) fits the viewport height. */
.cf-lightbox .cf-modal:has(.cf-art) { max-width: min(1320px, 96vw, calc((100dvh - 48px) * 1.2314)); }
.cf-art { position: relative; width: 100%; aspect-ratio: 1240 / 1007; background: #fff; }
.cf-art__img { display: block; width: 100%; height: 100%; object-fit: fill; }
.cf-art__field { position: absolute; left: 6.05%; width: 87.9%; margin: 0; display: block; }
.cf-art__field--message { top: 56.8%; height: 13.4%; }
.cf-art__field--contact { top: 77%; height: 5.5%; }
.cf-art__field textarea,
.cf-art__field input {
  width: 100%; height: 100%; margin: 0;
  padding: clamp(6px, 1vw, 14px) clamp(8px, 1.3vw, 18px);
  font: 400 clamp(13px, 1.25vw, 17px)/1.45 'Raleway', Arial, sans-serif;
  color: var(--cf-ink);
  background: #fff;                          /* opaque: covers the painted placeholder so typing never doubles */
  border: 1px solid #d9d9d9; border-radius: 8px;
  resize: none; outline: none;
}
.cf-art__field textarea::placeholder,
.cf-art__field input::placeholder { color: #8a8a8a; }
.cf-art__field textarea:focus,
.cf-art__field input:focus { border-color: var(--cf-gold); box-shadow: 0 0 0 3px rgba(var(--hhr-brand-rgb,157,25,50),.12); }
.cf-art__field textarea[aria-invalid="true"],
.cf-art__field input[aria-invalid="true"] { border-color: var(--hhr-brand-chart,#c04a4a); }
.cf-art .cf-art__submit {
  position: absolute; left: 6.05%; top: 87.6%; width: 87.9%; height: 6%;
  margin: 0; padding: 0; border-radius: 10px;
  background: transparent; box-shadow: none;   /* the button face is painted in the art */
}
.cf-art .cf-art__submit:hover { background: rgba(255,255,255,.08); filter: none; box-shadow: none; }
.cf-art .cf-art__submit[disabled] { opacity: .55; }
.cf-art__privacy { position: absolute; right: 6.05%; top: 95.4%; font: 400 clamp(10px, .9vw, 12px)/1 'Raleway', Arial, sans-serif; color: var(--cf-sub); text-decoration: underline; }
.cf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* -------------------- WALKTHROUGH variant (owner 2026-09-19) --------------------
   New component: confirmation of the listing card's day/time + email + phone.
   No image, no message box. Markup: contact/form.php (.cf-walk). */
/* Lightbox card narrows to the clean form (same :has pattern the retired .cf-art card used). */
.cf-lightbox .cf-modal:has(.cf-walk) { max-width: min(620px, 96vw); }
.cf-form--walkthrough { overflow: hidden; border-radius: var(--cf-radius); }
.cf-portal-masthead {
  min-height: 148px;
  display: flex;
  align-items: center;
  padding: 22px 32px;
  background: linear-gradient(115deg, var(--hhr-brand-dark,#8f0f1a) 0%, var(--hhr-brand-accent,#b21625) 48%, var(--hhr-brand-accent,#d3212d) 100%);
}
.cf-portal-masthead img {
  display: block;
  width: min(100%, 430px);
  height: auto;
}
.cf-walk {
  max-width: 520px; margin: 0 auto;
  padding: 32px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.cf-walk__title { margin: 0; font: 700 26px/1.2 'Merriweather', Georgia, serif; color: var(--cf-ink); }
.cf-walk__confirm { margin: 0; font-size: 16px; line-height: 1.55; color: var(--cf-ink); }
.cf-walk__field { display: flex; flex-direction: column; gap: 6px; }
.cf-walk__lbl { font-size: 13px; font-weight: 700; color: var(--cf-sub); }
.cf-walk__field input {
  width: 100%; font: inherit; font-size: 16px; color: var(--cf-ink);
  background: var(--cf-white); border: 1px solid var(--cf-line); border-radius: 10px;
  padding: 14px;
}
.cf-walk__field input:focus { outline: 2px solid var(--cf-gold); outline-offset: 1px; }
.cf-walk__field input[aria-invalid="true"] { border-color: var(--cf-gold); }
.cf-walk__submit { margin-top: 4px; }
@media (max-width: 520px) {
  .cf-portal-masthead { min-height: 118px; padding: 18px 22px; }
  .cf-walk { padding: 26px 20px 28px; }
}
