// Standalone /thanks page. Served after a successful lead submission so ad
// platforms can fire a page-view conversion on a stable URL. Also bookmarkable
// for QA and direct ad-tracker checks.

const Thanks = () => {
  const email = typeof window !== 'undefined'
    ? (window.sessionStorage && window.sessionStorage.getItem('vested.equity.lead.email'))
    : null;

  return (
    <section className="section fog" id="thanks">
      <div className="container">
        <div className="elig-shell">
          <div className="elig-body">
            <div className="elig-result thanks">
              <span className="tag">You&rsquo;re in line</span>
              <h3 style={{marginTop:24, fontSize:28, color:'var(--ink)'}}>
                Check your inbox.
              </h3>
              <p className="desc" style={{marginTop:8}}>
                {email ? (
                  <React.Fragment>
                    We&rsquo;ve queued your line estimate for{' '}
                    <span className="mono" style={{color:'var(--ink)'}}>{email}</span>.{' '}
                  </React.Fragment>
                ) : (
                  <React.Fragment>We&rsquo;ve queued your line estimate. </React.Fragment>
                )}
                If you&rsquo;re a fit, you&rsquo;ll hear from a real human in
                the next 48 hours.
              </p>
              <a className="btn btn-ghost" href="/" style={{marginTop: 32}}>
                Back to home
              </a>
            </div>
          </div>
        </div>
      </div>
    </section>
  );
};

window.Thanks = Thanks;
