/* ============================================================
   Early Access modal — shared by every page
   Uses only design tokens defined by BOTH templates
   (tokens.css and app-base.css), with literal fallbacks,
   so it is readable in light and dark on either stylesheet.
   CTA colour: --color-cta (main template) falls back to
   --color-accent (pf template) falls back to brand terracotta.
   ============================================================ */

.ea-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  background: rgba(8, 12, 18, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 1.5rem;
  overflow-y: auto;
}
.ea-overlay[data-open='true'] { display: block; }

.ea-panel {
  position: relative;
  max-width: 540px;
  margin: 3rem auto;
  padding: 2.25rem;
  background: var(--color-surface-2, #ffffff);
  color: var(--color-text, #141c26);
  border: 1px solid var(--color-border, #d4d9e0);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  font-family: var(--font-body, 'General Sans', 'Helvetica Neue', sans-serif);
}

.ea-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--color-text-muted, #5a6472);
}
.ea-close:hover { background: var(--color-surface-offset, rgba(127,127,127,0.12)); color: var(--color-text, #141c26); }

.ea-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--color-cta, var(--color-accent, #c4622d));
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ea-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text, #141c26);
}

.ea-intro {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted, #5a6472);
}

.ea-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.ea-block { margin-bottom: 1rem; }
.ea-block--last { margin-bottom: 1.5rem; }

.ea-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text, #141c26);
}
.ea-label .ea-optional { font-weight: 400; color: var(--color-text-muted, #5a6472); }

.ea-field {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--color-border, #d4d9e0);
  background: var(--color-surface, #ffffff);
  color: var(--color-text, #141c26);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.ea-field::placeholder { color: var(--color-text-faint, #9aa3ae); opacity: 1; }
.ea-field:focus {
  outline: none;
  border-color: var(--color-cta, var(--color-accent, #c4622d));
  box-shadow: 0 0 0 3px rgba(196, 98, 45, 0.18);
}
textarea.ea-field { resize: vertical; min-height: 5rem; }
select.ea-field { cursor: pointer; }
select.ea-field option { background: var(--color-surface, #ffffff); color: var(--color-text, #141c26); }

.ea-submit {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 10px;
  background: var(--color-cta, var(--color-accent, #c4622d));
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 150ms ease;
}
.ea-submit:hover:not([disabled]) { background: var(--color-cta-hover, var(--color-accent-hover, #a84f24)); }
.ea-submit[disabled] { opacity: 0.65; cursor: progress; }

.ea-note {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted, #5a6472);
}

.ea-status {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  background: var(--color-error-highlight, #f7e3e3);
  color: var(--color-error, #9b2c2c);
  border: 1px solid var(--color-error, #9b2c2c);
}
.ea-status a { color: inherit; font-weight: 600; }

.ea-success { display: none; text-align: center; padding: 1.5rem 0 0.5rem; }
.ea-success-mark {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-success-highlight, #d8ece0);
  color: var(--color-success, #3d7a4f);
  font-size: 1.6rem;
}
.ea-success h3 { margin: 0 0 0.5rem; font-family: var(--font-display, Georgia, serif); font-size: 1.4rem; font-weight: 600; }
.ea-success p { margin: 0; color: var(--color-text-muted, #5a6472); font-size: 0.95rem; }
.ea-success-close {
  margin-top: 1.5rem;
  padding: 0.65rem 2rem;
  border-radius: 8px;
  border: 1px solid var(--color-border, #d4d9e0);
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.ea-success-close:hover { background: var(--color-surface-offset, rgba(127,127,127,0.12)); }

/* Honeypot — hidden from people, visible to naive bots */
.ea-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 540px) {
  .ea-overlay { padding: 0.75rem; }
  .ea-panel { margin: 1rem auto; padding: 1.5rem; }
  .ea-row { grid-template-columns: 1fr; }
  .ea-title { font-size: 1.45rem; }
}
