/* ===========================================================
   Acorn Study — Shared components used on the landing page
   (subset of the app's component library: mascot + mastery)
   =========================================================== */

/* ---- Mascot ---- */
.mascot {
  position: relative;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, oklch(0.97 0.03 140), oklch(0.91 0.05 145));
  box-shadow: inset 0 -3px 6px oklch(0.5 0.08 150 / 0.16), var(--shadow-sm);
  flex: none;
}
.mascot-face { line-height: 1; filter: drop-shadow(0 1px 1px oklch(0.4 0.05 150 / 0.22)); }

/* ---- Mastery bar ---- */
.mastery { display: flex; align-items: center; gap: 10px; }
.mastery-track { flex: 1; height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.mastery-fill { height: 100%; border-radius: 999px; transition: width calc(0.6s * var(--speed)) cubic-bezier(.2,.8,.3,1); }
.mastery-pct { font-weight: 800; font-size: 0.82rem; min-width: 34px; text-align: right; }

/* ---- Waitlist form ---- */
.waitlist { margin-top: 28px; }
.waitlist-row {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
  align-items: stretch;
}
.waitlist-input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 16px 20px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.waitlist-input::placeholder { color: var(--ink-faint); font-weight: 400; }
.waitlist-input:hover { border-color: color-mix(in oklab, var(--brand) 38%, var(--line)); }
.waitlist-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent), var(--shadow-sm);
}
.waitlist-row .btn { flex: 0 0 auto; white-space: nowrap; }
.waitlist-fine {
  margin: 16px auto 0;
  max-width: 44ch;
  font-size: .92rem;
  color: var(--ink-faint);
  text-align: center;
}
.waitlist.is-error .waitlist-input {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--coral) 16%, transparent);
}
.waitlist.is-error .waitlist-fine { color: var(--coral); font-weight: 700; }

@media (max-width: 520px) {
  .waitlist-row { flex-direction: column; }
  .waitlist-row .btn { width: 100%; }
}

/* honeypot — visually and programmatically out of the way, still submitted */
.wl-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* success state (replaces the form) */
.waitlist-done {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.waitlist-done .wl-done-emoji { font-size: 2.6rem; line-height: 1; }
.waitlist-done h3 { font-size: 1.4rem; margin: 0; }
.waitlist-done p { margin: 0; color: var(--ink-soft); max-width: 42ch; line-height: 1.5; }

.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

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