
/* v58: Standard header/footer for selector pages and visual cleanup */
.has-standard-layout.work-with-us-page,
.has-standard-layout.mortgage-options-page {
  min-height: 100vh;
  background: #f6fbff;
  color: #102033;
  font-family: 'Roboto', Arial, sans-serif;
}
.has-standard-layout .site-header {
  position: sticky;
  top: 16px;
  z-index: 1000;
}
.work-with-us-page.has-standard-layout .referral-page-main,
.mortgage-options-page.has-standard-layout .mortgage-options-main {
  overflow: hidden;
}
.referral-intro-section,
.mortgage-options-hero-section {
  position: relative;
  padding: 148px 0 96px;
  background:
    radial-gradient(circle at 12% 16%, rgba(24,148,204,.18), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(8,46,89,.12), transparent 34%),
    linear-gradient(180deg, #f3faff 0%, #ffffff 100%);
}
.referral-intro-section::before,
.mortgage-options-hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7,23,51,.05), transparent 35%, rgba(12,132,190,.06));
}
.referral-layout {
  position: relative;
  display: grid;
  grid-template-columns: .78fr 1fr;
  gap: 40px;
  align-items: center;
}
.referral-copy-panel {
  padding: 34px 0;
}
.referral-copy-panel h1,
.referral-form-card h2,
.mortgage-options-hero h1 {
  margin: 12px 0 18px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #111;
  letter-spacing: -.04em;
  line-height: .9;
}
.referral-copy-panel h1 {
  font-size: clamp(58px, 7vw, 112px);
}
.referral-copy-panel p:not(.section-kicker),
.mortgage-options-hero p {
  color: #5b6876;
  font-size: 18px;
  line-height: 1.7;
  max-width: 560px;
}
.referral-action-panel {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(13,89,143,.13);
  border-radius: 34px;
  padding: 22px;
  box-shadow: 0 28px 80px rgba(13,49,84,.10);
  backdrop-filter: blur(14px);
}
.work-with-us-page .referral-selector,
.work-with-us-page .referral-form-shell {
  min-height: auto;
  display: block;
  justify-content: initial;
  color: inherit;
  text-align: initial;
  padding: 0;
}
.referral-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin: 0;
}
.referral-type-grid button {
  min-height: 86px;
  border: 1px solid rgba(13,89,143,.13);
  border-radius: 22px;
  padding: 20px 18px;
  background: linear-gradient(180deg,#fff 0%,#f6fbff 100%);
  color: #0c243d;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  box-shadow: 0 16px 38px rgba(10,33,61,.08);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  text-align: left;
}
.referral-type-grid button i {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,145,205,.11);
  color: #0d91cd;
  flex: 0 0 42px;
}
.referral-type-grid button:hover {
  transform: translateY(-3px);
  border-color: rgba(13,145,205,.34);
  box-shadow: 0 20px 48px rgba(10,33,61,.12);
  background: #fff;
}
.referral-form-section {
  padding: 84px 0 100px;
  background: #fff;
}
.referral-form-section[hidden] { display: none !important; }
.referral-back {
  color: #0c243d;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(13,89,143,.14);
  background: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  margin: 0 0 18px;
  cursor: pointer;
}
.referral-form-card {
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(15,74,118,.12);
  border-radius: 32px;
  padding: 38px;
  box-shadow: 0 26px 70px rgba(0,0,0,.10);
}
.referral-form-card h2 {
  font-size: clamp(38px,5vw,72px);
}
.referral-note { color:#5b6876; margin:0 0 28px; font-size:16px; }
.referral-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.referral-form-grid label { display:grid; gap:8px; color:#102033; font-size:13px; text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.referral-form-grid label.full { grid-column:1/-1; }
.referral-form-grid input, .referral-form-grid textarea { width:100%; border:1px solid #dce8f1; border-radius:16px; padding:15px 16px; font:500 16px 'Roboto',Arial,sans-serif; color:#102033; background:#fbfdff; box-sizing:border-box; }
.referral-form-grid textarea { resize:vertical; }
.referral-consent { display:flex; align-items:flex-start; gap:10px; margin:22px 0; color:#5b6876; line-height:1.55; }
.referral-consent input { margin-top:5px; }
.referral-submit { width:100%; justify-content:center; }
.referral-status { margin:14px 0 0; font-weight:700; color:#0d6f9f; }
.referral-status.error { color:#a33; }
.referral-status.success { color:#0b7a45; }
.mortgage-options-hero {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 46px;
}
.mortgage-options-hero h1 {
  font-size: clamp(48px, 5.8vw, 86px);
}
.mortgage-options-hero p {
  margin: 0 auto;
  max-width: 760px;
}
.mortgage-options-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.mortgage-option-card {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px;
  border: 1px solid rgba(13,89,143,.14);
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  color: #0c243d;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 22px 54px rgba(10,33,61,.08);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.mortgage-option-card i { color:#0d91cd; }
.mortgage-option-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13,145,205,.35);
  box-shadow: 0 28px 66px rgba(10,33,61,.12);
}
@media (max-width: 980px) {
  .referral-layout { grid-template-columns: 1fr; gap: 26px; }
  .referral-copy-panel { text-align: center; padding: 0; }
  .referral-copy-panel p:not(.section-kicker) { margin-left:auto; margin-right:auto; }
  .mortgage-options-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .has-standard-layout .site-header { top: 12px; }
  .referral-intro-section,
  .mortgage-options-hero-section { padding: 128px 0 62px; }
  .referral-action-panel { padding: 14px; border-radius: 26px; }
  .referral-type-grid,
  .mortgage-options-grid,
  .referral-form-grid { grid-template-columns: 1fr; }
  .referral-type-grid button { min-height: 72px; padding: 16px 15px; border-radius: 18px; font-size: 16px; }
  .referral-copy-panel h1 { font-size: clamp(62px, 20vw, 92px); }
  .mortgage-options-hero h1 { font-size: clamp(48px, 14vw, 72px); }
  .referral-form-section { padding: 54px 0 72px; }
  .referral-form-card { padding: 24px 18px; border-radius: 26px; }
  .mortgage-option-card { min-height: 82px; padding: 20px; border-radius: 20px; }
}
