/* =========================================================
   Dr. Marketo - early-access popup
   Self-contained: the shell is scoped to #eaModal, so this file
   works on the standalone early-access page as well as on the
   site pages that already load style.css and world.css.
   ========================================================= */

#eaModal{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:24px;
  font-family:'Inter',-apple-system,Segoe UI,Arial,sans-serif;color:#16171A}
#eaModal[hidden]{display:none}
#eaModal .modal-backdrop{position:absolute;inset:0;background:rgba(14,15,19,.62);backdrop-filter:blur(2px)}
#eaModal .modal{position:relative;z-index:1;background:#fff;border-radius:18px;box-shadow:0 40px 90px rgba(0,0,0,.45);
  max-width:760px;width:calc(100% - 32px);padding:0;overflow:auto;max-height:calc(100vh - 32px);
  scrollbar-width:none;-ms-overflow-style:none;animation:eaIn .3s cubic-bezier(.22,1,.36,1)}
#eaModal .modal::-webkit-scrollbar{display:none}
@keyframes eaIn{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
#eaModal .modal-close{position:absolute;top:14px;right:14px;z-index:6;width:38px;height:38px;border-radius:50%;cursor:pointer;
  display:grid;place-items:center;background:#14171D;color:#fff;border:1px solid rgba(255,255,255,.28);
  box-shadow:0 6px 16px rgba(0,0,0,.35);transition:background .2s,color .2s,transform .3s}
#eaModal .modal-close:hover{background:#fff;color:#16171A;border-color:#16171A;transform:rotate(90deg)}
#eaModal .modal-close svg{width:16px;height:16px;stroke-width:2.4}
#eaModal .modal-close[hidden]{display:none}
body.modal-open{overflow:hidden}

/* ---------- layout ---------- */
#eaModal .ea-grid{display:grid;grid-template-columns:1.15fr .85fr;min-height:420px}
#eaModal .ea-form{padding:26px 28px 22px;text-align:left;background:#fff}
#eaModal .ea-form .eyebrow{display:inline-flex;align-items:center;gap:8px;justify-content:flex-start;
  font-size:11px;font-weight:700;letter-spacing:.22em;text-transform:uppercase;color:#C08B2E;margin-bottom:8px}
#eaModal .ea-form h3{font-family:'Playfair Display',Georgia,serif;font-size:24px;line-height:1.15;margin:0 0 6px;color:#16171A;font-weight:700}
#eaModal .ea-lead{font-size:13.5px;line-height:1.6;color:#63676E;margin:0 0 14px}
#eaModal .ea-trap{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
#eaModal .ea-field{display:block;margin-bottom:10px}
#eaModal .ea-field span{display:block;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#16171A;margin-bottom:6px}
#eaModal .ea-field input{width:100%;padding:11px 13px;border:1px solid #E4E6EA;border-radius:10px;font:inherit;font-size:14px;
  color:#16171A;background:#fff;transition:border-color .2s,box-shadow .2s;box-sizing:border-box}
#eaModal .ea-field input:focus{outline:none;border-color:#C08B2E;box-shadow:0 0 0 3px rgba(192,139,46,.15)}
#eaModal .ea-error{min-height:14px;font-size:12.5px;color:#B03A2E;margin:0 0 6px}
#eaModal .ea-pay{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:13px 20px;border:0;border-radius:10px;cursor:pointer;
  font:inherit;font-size:15px;font-weight:700;color:#1A1204;background:linear-gradient(135deg,#F2C763,#D9A441 60%,#B98426);
  box-shadow:0 0 30px rgba(217,164,65,.35);transition:transform .2s,box-shadow .2s}
#eaModal .ea-pay span{font-weight:800}
#eaModal .ea-pay svg{width:16px;height:16px}
#eaModal .ea-pay:hover{transform:translateY(-1px);box-shadow:0 0 44px rgba(217,164,65,.5)}
#eaModal .ea-pay:disabled{opacity:.7;cursor:wait;transform:none}
#eaModal .ea-fine{font-size:11.5px;color:#63676E;text-align:left;margin-top:8px}

/* ---------- offer panel ---------- */
#eaModal .ea-plan{position:relative;overflow:hidden;padding:26px 26px 0;color:#E9E6DF;display:flex;flex-direction:column;
  background:radial-gradient(400px 260px at 80% 0%,rgba(217,164,65,.28),transparent 65%),linear-gradient(180deg,#171923,#0E0F13)}
#eaModal .ea-plan-tag{display:inline-block;align-self:flex-start;padding:5px 10px;border-radius:100px;background:rgba(217,164,65,.14);
  border:1px solid rgba(217,164,65,.3);color:#F2C763;font-size:10px;font-weight:800;letter-spacing:.16em;text-transform:uppercase}
#eaModal .ea-plan-name{font-family:'Playfair Display',Georgia,serif;font-size:24px;font-weight:700;color:#fff;margin:14px 0 4px}
#eaModal .ea-plan-price{display:flex;align-items:baseline;gap:6px;margin-bottom:16px}
#eaModal .ea-plan-price b{font-family:'Playfair Display',Georgia,serif;font-size:40px;line-height:1;color:#F2C763;font-weight:700}
#eaModal .ea-plan-price span{font-weight:600;color:#F2C763;text-transform:uppercase;font-size:11px;letter-spacing:.12em}
#eaModal .ea-plan-was{font-size:12px;color:#A6A9B4;margin:-10px 0 14px}
#eaModal .ea-plan-notes{list-style:none;margin:0;padding:0;display:grid;gap:8px}
#eaModal .ea-plan-notes li{display:flex;align-items:center;gap:8px;font-size:12.5px;color:#E9E6DF}
#eaModal .ea-plan-notes svg{width:16px;height:16px;color:#F2C763;flex:0 0 16px}
#eaModal .ea-doc{width:86%;max-width:250px;height:auto;margin:auto -10px -2px auto;filter:drop-shadow(0 18px 26px rgba(0,0,0,.6))}

@media (max-width:700px){
  #eaModal .ea-grid{grid-template-columns:1fr}
  #eaModal .ea-plan{padding:22px 24px;flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px 18px}
  #eaModal .ea-plan-name{margin:6px 0 0;width:100%}
  #eaModal .ea-plan-price{margin-bottom:8px}
  #eaModal .ea-plan-notes{width:100%}
  #eaModal .ea-doc{display:none}
  #eaModal .ea-form{padding:24px 20px 20px}
}
@media (prefers-reduced-motion:reduce){#eaModal .modal{animation:none}}

/* ---------- reset: the early-access page styles bare form/input/button
     elements, which must not leak into the popup ---------- */
#eaModal form.ea-form{display:block;max-width:none;margin:0;gap:0;flex-direction:column}
#eaModal .ea-field{display:block;flex:none}
#eaModal .ea-field input,#eaModal input[type=email],#eaModal input[type=text],#eaModal input[type=tel]{
  flex:none;width:100%;padding:11px 13px;border:1px solid #E4E6EA;border-radius:10px;
  font-family:inherit;font-size:14px;background:#fff;color:#16171A}
#eaModal button{font-family:inherit;border-radius:10px}
#eaModal .modal-close{padding:0;width:38px;height:38px;min-width:0;border-radius:50%;background:#14171D}
#eaModal .modal-close:hover{background:#fff}
#eaModal .ea-pay{padding:13px 20px;border-radius:10px}
#eaModal p{margin:0}
#eaModal ul{margin:0;padding:0;list-style:none}

/* style.css centres all modal content; the offer panel must stay left-aligned */
#eaModal .modal{text-align:left}
#eaModal .ea-plan,#eaModal .ea-plan-name,#eaModal .ea-plan-was,#eaModal .ea-plan-tag,#eaModal .ea-plan-notes li{text-align:left}

/* ---------- phone verification ---------- */
#eaModal .ea-field .ea-phone-row{display:flex;gap:8px;align-items:stretch;margin-top:6px;
  font-size:14px;font-weight:400;letter-spacing:0;text-transform:none;color:inherit}
#eaModal .ea-field .ea-phone-row input{flex:1;min-width:0;margin-top:0}
#eaModal .ea-field .ea-otp-btn{flex:0 0 auto;padding:0 15px;border:1px solid #C08B2E;border-radius:10px;cursor:pointer;
  background:rgba(192,139,46,.10);color:#8A6014;font:inherit;font-size:13px;font-weight:800;white-space:nowrap;transition:background .2s,color .2s}
#eaModal .ea-otp-btn:hover{background:#C08B2E;color:#fff}
#eaModal .ea-otp-btn:disabled{opacity:.55;cursor:default}
#eaModal .ea-otp{margin:-2px 0 10px;padding:12px 13px;border:1px dashed #E0C88A;border-radius:11px;background:#FFFBF1}
#eaModal .ea-otp .ea-field{margin-bottom:8px}
#eaModal .ea-otp-code{letter-spacing:.22em;font-weight:700}
#eaModal .ea-otp-note{display:flex;justify-content:flex-end}
#eaModal .ea-otp-resend{border:0;background:none;padding:0;cursor:pointer;font:inherit;font-size:12px;font-weight:700;color:#8A6014;text-decoration:underline}
#eaModal .ea-otp-resend:disabled{color:#9AA0AC;text-decoration:none;cursor:default}
#eaModal .ea-otp-msg{margin-top:6px;font-size:12px;color:#63676E}
#eaModal .ea-field.ea-phone.is-verified .ea-phone-row::after{content:"✓ Verified";align-self:center;font-size:12px;font-weight:800;color:#128A4C;white-space:nowrap}
#eaModal .ea-phone.is-verified input{border-color:#B7E0C7;background:#F5FCF8}

/* ---------- step 1: the questionnaire ---------- */
#eaModal .ea-steps{display:flex;align-items:center;gap:10px;margin:0 0 14px;padding-bottom:10px;
  border-bottom:1px solid #EEF0F3}
#eaModal .ea-steps b{font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#C08B2E}
#eaModal .ea-steps span{font-size:12.5px;color:#63676E}
#eaModal .ea-back{margin-left:auto;border:0;background:none;padding:0;cursor:pointer;font:inherit;
  font-size:12.5px;font-weight:700;color:#16171A;text-decoration:underline;text-underline-offset:3px}
#eaModal .ea-back:hover{color:#C08B2E}

#eaModal .ea-q{border:0;margin:0 0 16px;padding:0}
#eaModal .ea-q legend{padding:0;margin-bottom:8px;font-size:13.5px;font-weight:700;line-height:1.4;color:#16171A}
#eaModal .ea-opt{display:flex;align-items:flex-start;gap:9px;padding:9px 12px;margin-bottom:6px;cursor:pointer;
  border:1px solid #E4E6EA;border-radius:10px;background:#fff;transition:border-color .18s,background .18s}
#eaModal .ea-opt:hover{border-color:#C08B2E;background:#FFFBF3}
#eaModal .ea-opt.on{border-color:#C08B2E;background:#FDF6E7;box-shadow:0 0 0 2px rgba(192,139,46,.14)}
#eaModal .ea-opt input{flex:none;width:16px;height:16px;margin:1px 0 0;accent-color:#C08B2E;cursor:pointer}
#eaModal .ea-opt span{font-size:13.5px;line-height:1.45;color:#2B2E34;font-weight:500;
  letter-spacing:0;text-transform:none;display:inline;margin:0}
#eaModal .ea-next{margin-top:2px}

@media (max-width:640px){
  #eaModal .ea-opt{padding:11px 12px}
  #eaModal .ea-opt span{font-size:14px}
  #eaModal .ea-q legend{font-size:14px}
}

/* a fieldset will not shrink below its content unless told to, which pushed
   the whole popup wider than a phone screen */
#eaModal .ea-form{min-width:0}
#eaModal .ea-q,#eaModal .ea-opt{min-width:0}
#eaModal .ea-q legend{max-width:100%}
#eaModal .ea-opt span{min-width:0;overflow-wrap:anywhere}
