/* Early access modal - reusable public-site waitlist capture. */
.earlyaccess {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.42s;
}

.earlyaccess.is-open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

.earlyaccess .paywall__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 18, 0);
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}

.earlyaccess.is-open .paywall__backdrop {
  background: rgba(20, 20, 18, 0.42);
  backdrop-filter: blur(4px);
}

.earlyaccess .paywall__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 60px -20px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.42s var(--ease), opacity 0.42s var(--ease);
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.earlyaccess.is-open .paywall__sheet {
  transform: translateY(0);
}

.earlyaccess .paywall__inner {
  padding: 14px 24px 32px;
  max-width: 540px;
  margin: 0 auto;
}

.earlyaccess .paywall__handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  margin: 0 auto 24px;
}

.earlyaccess .paywall__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.earlyaccess .paywall__close:hover {
  color: var(--text);
}

.earlyaccess .paywall__close svg {
  width: 14px;
  height: 14px;
}

.earlyaccess .paywall__eyebrow {
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin: 0 0 12px;
}

.earlyaccess .paywall__title {
  font-family: var(--font-sans-display, "Geist", "Inter Tight", sans-serif);
  font-size: clamp(1.65rem, 7vw, 2rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: 0;
  text-align: center;
  color: var(--text);
  margin: 0 0 14px;
}

.earlyaccess .paywall__lead {
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 34ch;
  margin: 0 auto 22px;
  line-height: 1.5;
  text-wrap: pretty;
}

.earlyaccess__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 0;
}

.earlyaccess__field {
  position: relative;
}

.earlyaccess__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.earlyaccess__input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 16px 18px;
  min-height: 56px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.earlyaccess__input::placeholder {
  color: var(--text-faint);
}

.earlyaccess__input:hover {
  border-color: var(--accent);
}

.earlyaccess__input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-tint-strong);
}

.earlyaccess__input[aria-invalid="true"] {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.10);
}

.earlyaccess__error {
  font-size: 0.8125rem;
  color: #b3261e;
  margin: 6px 2px 0;
  min-height: 1em;
  line-height: 1.35;
}

.earlyaccess__cta {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  padding: 18px 28px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  text-align: center;
  min-height: 56px;
  margin-top: 4px;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.earlyaccess__cta:hover {
  background: var(--accent-ink);
}

.earlyaccess__cta:disabled {
  cursor: wait;
  opacity: 0.76;
}

.earlyaccess__cta:focus-visible,
.earlyaccess__success-close:focus-visible,
.earlyaccess .paywall__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.earlyaccess__terms {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  margin: 16px 0 0;
  line-height: 1.5;
}

.earlyaccess__success {
  display: none;
  text-align: center;
  padding: 8px 0 0;
}

.earlyaccess[data-state="success"] .earlyaccess__form-wrap {
  display: none;
}

.earlyaccess[data-state="success"] .earlyaccess__success {
  display: block;
}

.earlyaccess__success-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.earlyaccess__success-mark svg {
  width: 24px;
  height: 24px;
}

.earlyaccess__success-title {
  font-family: var(--font-sans-display, "Geist", "Inter Tight", sans-serif);
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
  margin: 0 0 8px;
}

.earlyaccess__success-detail {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 auto 22px;
  max-width: 36ch;
  line-height: 1.5;
  text-wrap: pretty;
}

.earlyaccess__success-close {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.earlyaccess__success-close:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.earlyaccess__icon {
  width: 96px;
  height: 96px;
  margin: 2px auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: radial-gradient(
    circle at center,
    var(--accent-tint) 0%,
    var(--accent-tint-strong) 18%,
    rgba(213, 229, 227, 0) 62%
  );
  animation: ea-icon-breathe 4.4s ease-in-out infinite;
}

.earlyaccess__icon svg {
  width: 60px;
  height: 60px;
  display: block;
  overflow: visible;
}

.earlyaccess__icon .spark {
  transform-box: fill-box;
  transform-origin: center;
}

.earlyaccess__icon .spark-main {
  animation: ea-spark-pulse 3.6s ease-in-out infinite;
}

.earlyaccess__icon .spark-a {
  animation: ea-spark-twinkle 2.6s ease-in-out infinite 0.4s;
}

.earlyaccess__icon .spark-b {
  animation: ea-spark-twinkle 2.4s ease-in-out infinite 1.3s;
}

@keyframes ea-icon-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes ea-spark-pulse {
  0%, 100% { opacity: 0.92; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes ea-spark-twinkle {
  0%, 70%, 100% { opacity: 0.42; transform: scale(0.82); }
  35% { opacity: 1; transform: scale(1.08); }
}

@media (min-width: 720px) {
  .earlyaccess .paywall__sheet {
    left: 50%;
    right: auto;
    bottom: 50%;
    transform: translate(-50%, calc(50% + 30px));
    width: min(520px, calc(100vw - 48px));
    max-height: min(86vh, 760px);
    border-radius: 22px;
    border: 1px solid var(--border);
    opacity: 0;
  }

  .earlyaccess.is-open .paywall__sheet {
    transform: translate(-50%, 50%);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .earlyaccess *,
  .earlyaccess *::before,
  .earlyaccess *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
}
