/* =========================================================
   BOLI CARE · EARLY ACCESS · v2
   Single-column, focused, simple, functional.
   ========================================================= */

.ea-page {
  background: var(--paper);
  color: var(--ink-soft);
}
.ea-main { display: block; }

/* ─── Wrap ─────────────────────────────────────────────── */
.ea-wrap {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(28px, 3.5vw, 40px);
}

/* ─── Hero section background ─────────────────────────── */
.ea-hero {
  position: relative;
  padding: clamp(140px, 16vh, 180px) 0 clamp(60px, 7vw, 90px);
  background:
    radial-gradient(900px 500px at 50% 0%, color-mix(in srgb, var(--brand-green) 8%, transparent) 0%, transparent 60%),
    var(--paper);
  overflow: hidden;
}

/* ─── Eyebrow with pulse ──────────────────────────────── */
.ea-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0;
}
.ea-eyebrow .ea-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 0 0 rgba(0, 150, 70, .55);
  animation: ea-pulse 2.4s ease-out infinite;
}
@keyframes ea-pulse {
  0%   { box-shadow: 0 0 0 0  rgba(0, 150, 70, .55); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 150, 70, 0); }
  100% { box-shadow: 0 0 0 0  rgba(0, 150, 70, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ea-eyebrow .ea-pulse { animation: none; }
}
.ea-eyebrow-center { justify-content: center; }

/* ─── Hero text ───────────────────────────────────────── */
.ea-hero-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 640px;
}
.ea-hero-text h1 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.022em;
  color: var(--ink);
  margin: 0;
}
.ea-hero-text h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand-green);
}
.ea-lede {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 56ch;
}

/* ─── Audience switch ─────────────────────────────────── */
.ea-switch {
  display: inline-flex;
  position: relative;
  padding: 5px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.ea-switch-pill {
  position: absolute;
  top: 5px; bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  background: var(--ink);
  border-radius: 999px;
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  z-index: 0;
}
.ea-switch[data-audience="hcp"] .ea-switch-pill {
  transform: translateX(100%);
}
.ea-switch button {
  position: relative;
  z-index: 1;
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 11px 24px;
  min-width: 200px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color .25s ease;
}
.ea-switch button[aria-selected="true"] {
  color: var(--paper);
}
@media (max-width: 560px) {
  .ea-hero {
    padding-top: 116px;
  }
  .ea-wrap,
  .ea-hero-text,
  .ea-card {
    min-width: 0;
    width: 100%;
    max-width: 320px;
  }
  .ea-hero-text h1 {
    font-size: clamp(1.65rem, 7.8vw, 2.05rem);
    text-wrap: balance;
  }
  .ea-switch {
    width: min(100%, calc(100vw - 72px));
    max-width: calc(100vw - 72px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    border-radius: 18px;
    padding: 6px;
  }
  .ea-switch-pill {
    display: none;
  }
  .ea-switch button {
    padding: 12px 14px;
    min-width: 0;
    width: 100%;
    font-size: 13px;
  }
  .ea-switch button[aria-selected="true"] {
    background: var(--ink);
    color: var(--paper);
  }
  .ea-lede {
    max-width: 30ch;
    overflow-wrap: anywhere;
  }
  .ea-consent {
    grid-template-columns: 18px minmax(0, 1fr);
  }
  .ea-consent span,
  .ea-helper,
  .ea-trust-line li {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .ea-trust-line {
    max-width: 30ch;
  }
}

/* ─── Form card ───────────────────────────────────────── */
.ea-card {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow: 0 24px 60px -30px rgba(13, 26, 20, .15);
  text-align: left;
  transition: opacity .3s ease;
}
.ea-card.is-submitted .ea-form { display: none; }

/* ─── Form layout ─────────────────────────────────────── */
.ea-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ea-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ea-field { display: flex; flex-direction: column; gap: 6px; }
.ea-full { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .ea-grid { grid-template-columns: 1fr; }
}

/* ─── Form fields ─────────────────────────────────────── */
.ea-field label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .005em;
}
.ea-field label .ea-req {
  color: var(--coral-deep);
  margin-left: 1px;
  font-weight: 700;
}

.ea-field input,
.ea-field select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.ea-field input::placeholder {
  color: var(--ink-faint);
}
.ea-field input:hover,
.ea-field select:hover {
  border-color: var(--ink-faint);
}
.ea-field input:focus,
.ea-field select:focus {
  outline: 0;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(13, 91, 63, .12);
}
.ea-field input:invalid:not(:placeholder-shown) {
  border-color: var(--coral-deep);
}

/* Custom select caret */
.ea-field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%2326342c' stroke-width='1.6'><path d='M3 4.5L6 7.5L9 4.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

/* Honeypot */
.ea-hp {
  position: absolute;
  left: -5000px;
  width: 1px; height: 1px;
  opacity: 0;
}

/* ─── Consent ─────────────────────────────────────────── */
.ea-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  cursor: pointer;
  margin-top: 4px;
}
.ea-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  margin: 2px 0 0;
  border: 1.5px solid var(--ink-faint);
  border-radius: 4px;
  background: var(--paper);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s ease, border-color .15s ease;
}
.ea-consent input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
}
.ea-consent input[type="checkbox"]:checked::after {
  content: "";
  width: 10px; height: 10px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2.4'><path d='M3 6.5l2 2 4-5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
.ea-consent span {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.ea-consent a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Submit button ───────────────────────────────────── */
.ea-btn {
  appearance: none;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: 14px 24px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  transition: background .15s ease, transform .15s ease;
}
.ea-btn:hover { background: var(--green-700, #0d5b3f); transform: translateY(-1px); }
.ea-btn:active { transform: translateY(0); }
.ea-btn:disabled { opacity: .55; cursor: wait; transform: none; }
.ea-btn svg { width: 18px; height: 18px; }
.ea-btn .ea-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: ea-spin .8s linear infinite;
}
.ea-btn.is-loading .ea-arrow { display: none; }
.ea-btn.is-loading .ea-spinner { display: inline-block; }
@keyframes ea-spin { to { transform: rotate(360deg); } }

.ea-helper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-muted);
  align-self: center;
}
.ea-helper-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-green);
}

/* ─── States ──────────────────────────────────────────── */
.ea-state {
  display: none;
  padding: 16px 4px;
  text-align: center;
}
.ea-state.is-active { display: block; }
.ea-state-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green);
}
.ea-state.is-error .ea-state-icon {
  background: var(--coral-50);
  color: var(--coral-deep);
}
.ea-state-icon svg { width: 26px; height: 26px; }
.ea-state h3 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0 0 8px;
}
.ea-state p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 auto 8px;
  max-width: 40ch;
}
.ea-state p a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.ea-state-link {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
.ea-state-link:hover { background: var(--paper); border-color: var(--ink-faint); }

/* ─── Trust line ──────────────────────────────────────── */
.ea-trust-line {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-muted);
  letter-spacing: .005em;
}
.ea-trust-line li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ea-tl-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand-green);
  opacity: .8;
}

/* ─── What happens next ───────────────────────────────── */
.ea-next {
  padding: clamp(60px, 7vw, 100px) 0 clamp(80px, 9vw, 120px);
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
}
.ea-next-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0 auto clamp(36px, 4vw, 56px);
  max-width: 600px;
}
.ea-next-head h2 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -.018em;
  color: var(--ink);
  margin: 0;
}
.ea-next-head h2 em { font-style: italic; color: var(--brand-green); font-weight: 400; }

.ea-steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1080px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.ea-steps li {
  position: relative;
  padding: 22px 22px 24px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ea-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green);
  font-family: var(--font-body);
  font-feature-settings: "tnum" 1;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}
.ea-steps li h3 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0;
  letter-spacing: -.008em;
}
.ea-steps li p {
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
@media (max-width: 880px) {
  .ea-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .ea-steps { grid-template-columns: 1fr; }
}

/* ─── Audience visibility ─────────────────────────────── */
[data-audience-show] { display: none !important; }
.ea-page[data-audience="patient"] [data-audience-show="patient"],
.ea-page[data-audience="hcp"]     [data-audience-show="hcp"] {
  display: block !important;
}
/* Restore inline display where needed for fields inside grid */
.ea-page[data-audience="hcp"] .ea-grid > [data-audience-show="hcp"] {
  display: flex !important;
}
