/* ==========================================================================
   RHA FUNNEL — Complete conversion layer CSS
   Built 2026-08-06. Replaces all previous inline custom code CSS.
   
   SECTIONS:
   1. Blog post layout (from 6 Aug deploy — preserved)
   2. Newsletter forms (shared)
   3. Nav newsletter bar
   4. Blog listing newsletter band
   5. Blog inline newsletter (after para 3)
   6. Blog right rail newsletter
   7. Mobile sticky bar
   8. Exit-intent modal
   9. Ebook panel
   ========================================================================== */

/* ==================== 1. BLOG POST LAYOUT (preserved from 6 Aug) ============ */
body.rha-blogpost { background: #ffffff !important; }
body.rha-blogpost .section_blog-post2-header .blog-post2-header_background-image-wrapper { display: none !important; }
body.rha-blogpost .section_blog-post2-header { background: #ffffff !important; }
body.rha-blogpost .section_blog-post2-header .padding-section-large { padding-top: 8.5rem !important; padding-bottom: 0.5rem !important; }
body.rha-blogpost .section_blog-post2-header .margin-top.margin-xxhuge { margin-top: 0 !important; }
body.rha-blogpost .section_blog-post2-content .padding-section-small { padding-top: 0.5rem !important; }
body.rha-blogpost .section_blog-post2-header .margin-bottom.margin-large { margin-bottom: 1.25rem !important; }
body.rha-blogpost .blog-post2-content_content-top .button.is-link { color: #141a32 !important; font-weight: 600 !important; }
body.rha-blogpost .blog-post2-content_content-top .button.is-link:hover { color: #c79810 !important; }
body.rha-blogpost .section_blog-post2-header h1.heading-style-h2 { color: #141a32 !important; font-size: 2.75rem !important; line-height: 1.15 !important; font-weight: 700 !important; letter-spacing: -0.01em !important; }
body.rha-blogpost .blog-post2-header_author-wrapper { display: flex !important; align-items: center !important; gap: 0.75rem !important; }
body.rha-blogpost .blog-post2-header_author-image { width: 48px !important; height: 48px !important; border-radius: 50% !important; object-fit: cover !important; }
body.rha-blogpost .blog-post2-header_author-text .text-weight-semibold { color: #141a32 !important; font-size: 1rem !important; }
body.rha-blogpost .blog-post2-header_author-text .text-size-small { color: #6b7280 !important; }
body.rha-blogpost .section_blog-post2-content { background: #ffffff !important; }
body.rha-blogpost .text-rich-text h2, body.rha-blogpost .text-rich-text h3, body.rha-blogpost .text-rich-text h4 { color: #141a32 !important; font-weight: 700 !important; line-height: 1.25 !important; }
body.rha-blogpost .text-rich-text h2 { font-size: 1.75rem !important; margin-top: 2.25rem !important; }
body.rha-blogpost .text-rich-text h3 { font-size: 1.35rem !important; margin-top: 1.75rem !important; }
body.rha-blogpost .text-rich-text p, body.rha-blogpost .text-rich-text li { color: #2a2f3a !important; font-size: 1.075rem !important; line-height: 1.7 !important; }
body.rha-blogpost .text-rich-text a { color: #c79810 !important; text-decoration: underline !important; }
body.rha-blogpost .text-rich-text table { color: #2a2f3a !important; }
body.rha-blogpost .text-rich-text th { color: #141a32 !important; }
body.rha-blogpost .rha-hero-inline { margin: 2rem 0 2.25rem 0 !important; max-width: 100% !important; width: 100% !important; display: block !important; }
body.rha-blogpost .rha-hero-inline img { width: 100% !important; height: auto !important; border-radius: 10px !important; display: block !important; }

@media screen and (min-width: 992px) {
  body.rha-blogpost .rha-post-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) 320px !important; column-gap: 3rem !important; max-width: 72rem !important; margin-left: auto !important; margin-right: auto !important; align-items: start !important; }
  body.rha-blogpost .rha-post-main { min-width: 0 !important; }
  body.rha-blogpost .rha-post-sidebar { position: -webkit-sticky !important; position: sticky !important; top: 6rem !important; }
}

body.rha-blogpost .rha-readmore { margin-bottom: 2rem !important; }
body.rha-blogpost .rha-readmore-heading { background: #141a32 !important; color: #ffffff !important; font-size: 0.8rem !important; font-weight: 700 !important; letter-spacing: 0.12em !important; text-transform: uppercase !important; padding: 0.6rem 0.9rem !important; margin: 0 0 0.25rem 0 !important; }
body.rha-blogpost .rha-readmore-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
body.rha-blogpost .rha-readmore-list li { border-bottom: 1px solid #e5e7eb !important; padding: 0.85rem 0.1rem !important; }
body.rha-blogpost .rha-readmore-list li:last-child { border-bottom: none !important; }
body.rha-blogpost .rha-readmore-list a { color: #141a32 !important; text-decoration: none !important; font-weight: 600 !important; font-size: 0.98rem !important; line-height: 1.35 !important; display: block !important; }
body.rha-blogpost .rha-readmore-list a:hover { color: #c79810 !important; }
body.rha-blogpost .rha-readmore-date { display: block !important; font-size: 0.78rem !important; color: #6b7280 !important; font-weight: 400 !important; margin-top: 0.3rem !important; }

body.rha-blogpost .rha-cta-card { background: #f3f4f6 !important; border: 1px solid #e5e7eb !important; border-radius: 8px !important; padding: 1.5rem 1.4rem !important; }
body.rha-blogpost .rha-cta-card h3 { color: #141a32 !important; font-size: 1.2rem !important; font-weight: 700 !important; margin: 0 0 0.6rem 0 !important; line-height: 1.3 !important; }
body.rha-blogpost .rha-cta-card p { color: #2a2f3a !important; font-size: 0.92rem !important; line-height: 1.55 !important; margin: 0 0 1.1rem 0 !important; }
body.rha-blogpost .rha-cta-card a.rha-cta-btn { display: inline-block !important; background: #c79810 !important; color: #141a32 !important; font-weight: 700 !important; font-size: 0.92rem !important; padding: 0.7rem 1.3rem !important; border-radius: 6px !important; text-decoration: none !important; }
body.rha-blogpost .rha-cta-card a.rha-cta-btn:hover { background: #e0b53d !important; }

@media screen and (max-width: 991px) {
  body.rha-blogpost .rha-post-sidebar { margin-top: 2.5rem !important; }
  body.rha-blogpost .section_blog-post2-header h1.heading-style-h2 { font-size: 2rem !important; }
}

/* ==================== 2. NEWSLETTER FORMS (shared) ==================== */
.rha-nl-f { margin: 0; }
.rha-nl-input-wrap { display: flex; gap: 0.5rem; }
.rha-nl-email {
  flex: 1; min-width: 0;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.92rem;
  font-family: inherit;
  color: #141a32;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}
.rha-nl-email:focus { border-color: #c79810; }
.rha-nl-email.rha-nl-err { border-color: #dc2626; }
.rha-nl-btn {
  padding: 0.65rem 1.2rem;
  background: #c79810;
  color: #141a32;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  font-family: inherit;
}
.rha-nl-btn:hover { background: #e0b53d; }
.rha-nl-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.rha-nl-msg { margin-top: 0.5rem; font-size: 0.85rem; line-height: 1.4; }
.rha-nl-msg-ok { color: #059669; }
.rha-nl-msg-bad { color: #dc2626; }

/* ==================== 3. NAV NEWSLETTER BAR ==================== */
.rha-nav-nl {
  background: #141a32;
  padding: 0.6rem 1rem;
  position: relative;
  z-index: 999;
}
.rha-nav-nl-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.rha-nav-nl-text { flex: 1; min-width: 0; }
.rha-nav-nl-headline {
  display: block;
  color: #c79810;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.rha-nav-nl-sub {
  display: block;
  color: #9aa0b4;
  font-size: 0.72rem;
  margin-top: 0.1rem;
}
.rha-nav-nl-form { flex-shrink: 0; width: 280px; }
.rha-nav-nl-form .rha-nl-email {
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #ffffff;
}
.rha-nav-nl-form .rha-nl-email::placeholder { color: #6b7280; }
.rha-nav-nl-form .rha-nl-email:focus { border-color: #c79810; background: rgba(255,255,255,0.15); }
.rha-nav-nl-form .rha-nl-btn { padding: 0.45rem 0.9rem; font-size: 0.8rem; }
.rha-nav-nl-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  line-height: 1;
  flex-shrink: 0;
}
.rha-nav-nl-close:hover { color: #ffffff; }

@media screen and (max-width: 767px) {
  .rha-nav-nl { display: none; } /* Hide nav bar on mobile — sticky bar handles it */
}

/* ==================== 4. BLOG LISTING NEWSLETTER BAND ==================== */
.rha-blog-band {
  background: #141a32;
  border-radius: 10px;
  margin: 1.5rem auto;
  max-width: 72rem;
  overflow: hidden;
}
.rha-blog-band-inner {
  display: flex;
  align-items: center;
  padding: 1.75rem 2rem;
  gap: 1.5rem;
}
.rha-blog-band-left { flex-shrink: 0; }
.rha-blog-band-icon { font-size: 2.5rem; }
.rha-blog-band-right { flex: 1; }
.rha-blog-band-headline {
  color: #c79810;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}
.rha-blog-band-sub {
  color: #9aa0b4;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}
.rha-blog-band-form { max-width: 420px; }
.rha-blog-band-form .rha-nl-email {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #ffffff;
}
.rha-blog-band-form .rha-nl-email::placeholder { color: #6b7280; }
.rha-blog-band-form .rha-nl-email:focus { border-color: #c79810; background: rgba(255,255,255,0.12); }

@media screen and (max-width: 767px) {
  .rha-blog-band-inner { flex-direction: column; text-align: center; padding: 1.5rem 1.25rem; }
  .rha-blog-band-form { max-width: 100%; width: 100%; }
}

/* ==================== 5. BLOG INLINE NEWSLETTER (after para 3) ============ */
.rha-inline-nl {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-left: 4px solid #c79810;
  border-radius: 0 8px 8px 0;
}
.rha-inline-nl-headline {
  color: #141a32;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.rha-inline-nl-sub {
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.rha-inline-nl .rha-nl-input-wrap { max-width: 400px; }

/* ==================== 6. BLOG RIGHT RAIL NEWSLETTER ==================== */
.rha-rail-nl {
  background: #141a32;
  border-radius: 8px;
  padding: 1.5rem 1.4rem;
  margin-bottom: 2rem;
}
.rha-rail-nl-headline {
  color: #c79810;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.rha-rail-nl-sub {
  color: #9aa0b4;
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}
.rha-rail-nl .rha-nl-input-wrap { flex-direction: column; }
.rha-rail-nl .rha-nl-email {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #ffffff;
  width: 100%;
}
.rha-rail-nl .rha-nl-email::placeholder { color: #6b7280; }
.rha-rail-nl .rha-nl-email:focus { border-color: #c79810; }
.rha-rail-nl .rha-nl-btn { width: 100%; text-align: center; }

/* ==================== 7. MOBILE STICKY BAR ==================== */
.rha-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #141a32;
  padding: 0.75rem 1rem;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.rha-sticky-visible { transform: translateY(0); }
.rha-sticky-hidden { transform: translateY(100%); }
.rha-sticky-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
}
.rha-sticky-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
  flex-shrink: 0;
}
.rha-sticky-text { flex: 1; min-width: 0; }
.rha-sticky-headline {
  color: #c79810;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
}
.rha-sticky-sub {
  color: #9aa0b4;
  font-size: 0.7rem;
  margin-top: 0.1rem;
}
.rha-sticky-form { flex-shrink: 0; width: 180px; }
.rha-sticky-form .rha-nl-input-wrap { gap: 0.35rem; }
.rha-sticky-form .rha-nl-email {
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #ffffff;
}
.rha-sticky-form .rha-nl-email::placeholder { color: #6b7280; }
.rha-sticky-form .rha-nl-btn { padding: 0.45rem 0.7rem; font-size: 0.75rem; }

/* ==================== 8. EXIT-INTENT MODAL ==================== */
.rha-lock { overflow: hidden; }
.rha-exit {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.rha-exit-open { opacity: 1; pointer-events: auto; }
.rha-exit-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.rha-exit-box {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem 2rem 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.rha-exit-open .rha-exit-box { transform: translateY(0); }
.rha-exit-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}
.rha-exit-x:hover { color: #141a32; }
.rha-exit-eyebrow {
  color: #c79810;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.rha-exit-title {
  color: #141a32;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.rha-exit-sub {
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}
.rha-exit-proof {
  color: #6b7280;
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
}
.rha-exit-form { margin-bottom: 1rem; }
.rha-exit-no {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem;
  text-align: center;
}
.rha-exit-no:hover { color: #141a32; }

/* ==================== 9. EBOOK PANEL ==================== */
.rha-ebook {
  margin: 2.5rem 0;
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
}
.rha-ebook-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem;
}
.rha-ebook-eyebrow {
  display: block;
  color: #c79810;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.rha-ebook-title {
  color: #141a32;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.rha-ebook-sub {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.rha-ebook-ul {
  list-style: none;
  margin: 0 0 1rem 0;
  padding: 0;
}
.rha-ebook-ul li {
  color: #2a2f3a;
  font-size: 0.92rem;
  line-height: 1.6;
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.35rem;
}
.rha-ebook-ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #c79810;
  font-weight: 700;
}
.rha-ebook-proof {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.85rem;
}
.rha-ebook-stars { color: #c79810; letter-spacing: 0.1em; }
.rha-ebook-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.rha-ebook-card-title {
  color: #141a32;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.rha-ebook-card-sub {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
/* Root cause fix (found via live QA 2026-08-06): .rha-ebook-btn's width:100%
   was fighting .rha-nl-email's flex:1 inside the shared .rha-nl-input-wrap
   flex row, collapsing the email input to ~30px. The ebook card form is
   meant to stack vertically (input, then full-width button below it), so
   override the shared flex-row wrapper for this placement only. */
.rha-ebook-card .rha-nl-input-wrap { display: block; }
.rha-ebook-card .rha-nl-email {
  width: 100%;
  box-sizing: border-box;
  display: block;
  margin-bottom: 0.75rem;
}
.rha-ebook-card .rha-nl-email::placeholder { color: #6b7280; }
.rha-ebook-card .rha-nl-email:focus { border-color: #c79810; }
.rha-ebook-btn { width: 100%; text-align: center; padding: 0.75rem 1rem; font-size: 0.95rem; }

@media screen and (max-width: 767px) {
  .rha-ebook-grid { grid-template-columns: 1fr; padding: 1.5rem; }
}

/* ==================== 10. UTILITY ==================== */
.rha-lock { overflow: hidden !important; }

/* ==========================================================================
   14. MOBILE ACCESSIBILITY HARDENING  (added 2026-08-06, third leg)
   Driven by measured defects on the live page at 390px, not by guesswork:
     - every .rha-nl-email computed to 12.5-14.7px, so iOS Safari zooms the
       viewport on focus. 16px is the documented threshold to prevent that.
     - .rha-sticky-close measured 15x27px, far under the 44px tap target.
     - the sticky bar (58px, position:fixed) sat over the last 58px of the
       footer with body padding-bottom:0, so it covered content.
     - the sticky "Join" button measured 46x32px.
   Scoped to <=767px so the desktop type scale is untouched.
   ========================================================================== */
@media screen and (max-width: 767px) {
  /* iOS zoom prevention: 16px minimum on EVERY funnel email input. The
     !important is needed because the per-placement rules above are more
     specific than a bare .rha-nl-email selector. */
  .rha-nl-email,
  .rha-nav-nl-form .rha-nl-email,
  .rha-blog-band-form .rha-nl-email,
  .rha-rail-nl .rha-nl-email,
  .rha-sticky-form .rha-nl-email,
  .rha-ebook-card .rha-nl-email,
  .rha-exit .rha-nl-email {
    font-size: 16px !important;
    min-height: 44px;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }

  /* Tap targets: 44px minimum height on every funnel submit button. */
  .rha-nl-btn,
  .rha-sticky-form .rha-nl-btn,
  .rha-nav-nl-form .rha-nl-btn {
    min-height: 44px;
    font-size: 0.95rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Dismiss controls: 44x44 hit area, still visually small. Colour lifted
     from #6b7280 (fails contrast on navy) to a legible light grey. */
  .rha-sticky-close,
  .rha-nav-nl-close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c3c8d8;
    padding: 0;
  }
  .rha-sticky-close:hover,
  .rha-nav-nl-close:hover { color: #ffffff; }

  /* Sticky bar must never cover content. The bar is ~76px tall once the
     inputs grow to 44px, so reserve that plus the iOS home-indicator inset. */
  body.rha-has-sticky {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .rha-sticky {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
  /* Stack the sticky form under the copy so neither is squeezed to 129px. */
  .rha-sticky-inner { align-items: flex-start; gap: 0.5rem; }
  .rha-sticky-form { width: auto; flex: 1; min-width: 0; }
  .rha-sticky-headline { font-size: 0.9rem; }
  .rha-sticky-sub { font-size: 0.78rem; }

  /* Placeholder contrast inside navy surfaces (#6b7280 on #141a32 fails WCAG). */
  .rha-nav-nl-form .rha-nl-email::placeholder,
  .rha-sticky-form .rha-nl-email::placeholder,
  .rha-blog-band-form .rha-nl-email::placeholder { color: #9aa0b4; }
}
