/* ============================================================
   Request access dialog (request-access.js)
   Public sign-up is closed; every sign-up CTA opens this form.
   Reuses landing.css tokens and button classes.
   ============================================================ */

.ra-backdrop {
  position: fixed; inset: 0; z-index: 320;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(10,10,13,0.55);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}
.ra-backdrop.open { opacity: 1; visibility: visible; }

.ra-dialog {
  position: relative;
  width: min(100%, 30rem);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 2rem 1.75rem 1.6rem;
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--body);
  box-shadow: var(--shadow-float);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s var(--spring);
}
.ra-backdrop.open .ra-dialog { transform: none; }

.ra-close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 2.2rem; height: 2.2rem;
  border: 0; border-radius: 50%;
  background: var(--bg-gray); color: var(--ink);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.ra-close:hover { background: #ececf1; }

.ra-eyebrow {
  display: inline-block; margin-bottom: 0.6rem;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
}
.ra-dialog h2 { margin: 0 0 0.4rem; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--ink); }
.ra-lead { margin: 0 0 1.3rem; font-size: 0.93rem; line-height: 1.5; }

.ra-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.ra-field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.85rem; }
.ra-field label { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.ra-field label small { font-weight: 500; color: var(--fade-dark); }
.ra-field input, .ra-field select, .ra-field textarea {
  font: inherit; font-size: 0.92rem; color: var(--ink);
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg-gray);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.ra-field input:focus, .ra-field select:focus, .ra-field textarea:focus {
  outline: none; border-color: var(--accent); background: var(--bg);
  box-shadow: 0 0 0 3px rgba(52,84,209,0.15);
}
.ra-field textarea { resize: vertical; min-height: 5.5rem; }
.ra-field input[aria-invalid="true"] { border-color: #d64545; }

/* Honeypot: off-screen, not display:none, so naive bots still fill it. */
.ra-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ra-error { margin: 0 0 0.8rem; font-size: 0.86rem; color: #c03838; }
.ra-error:empty { display: none; }
.ra-error a { color: inherit; text-decoration: underline; }

.ra-submit { width: 100%; justify-content: center; }
.ra-submit[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.ra-foot { margin: 0.9rem 0 0; font-size: 0.8rem; text-align: center; color: var(--fade-dark); }
.ra-foot a { color: var(--accent); font-weight: 600; }

.ra-done { text-align: center; padding: 0.8rem 0 0.4rem; }
.ra-done .ra-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; margin-bottom: 0.9rem;
  border-radius: 50%; background: #e6f6ee; color: #1a9c5b; font-size: 1.4rem;
}
.ra-done p { margin: 0 0 1.2rem; font-size: 0.93rem; line-height: 1.5; }

body.ra-locked { overflow: hidden; }

@media (max-width: 520px) {
  .ra-dialog { padding: 1.6rem 1.1rem 1.3rem; }
  .ra-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ra-backdrop, .ra-dialog { transition: none; }
}

body.theme-dark .ra-dialog { background: var(--panel-dark); color: rgba(255,255,255,0.72); }
body.theme-dark .ra-dialog h2, body.theme-dark .ra-close { color: #fff; }
body.theme-dark .ra-close { background: rgba(255,255,255,0.08); }
body.theme-dark .ra-field label { color: rgba(255,255,255,0.85); }
body.theme-dark .ra-field input, body.theme-dark .ra-field select, body.theme-dark .ra-field textarea {
  background: rgba(255,255,255,0.04); border-color: var(--border-dark); color: #fff;
}
body.theme-dark .ra-field input:focus, body.theme-dark .ra-field select:focus, body.theme-dark .ra-field textarea:focus {
  background: rgba(255,255,255,0.06);
}
body.theme-dark .ra-error { color: #ff8a8a; }
body.theme-dark .ra-done .ra-check { background: rgba(26,156,91,0.18); color: #5fd49a; }
