/* ─────────────────────────────────────────────────────────────────
   css/entry.css — warm, branded ENTRY surfaces (login / signup /
   verify-email / forgot · reset password / first-run onboarding).

   2026-06-26 (Luke — Entry Experience Redesign): the auth pages read
   "amateur hour" — a white card floating on a cold blue→purple pastel wash.
   This propagates the AI-key-wizard recipe Luke loves (warm cream + amber +
   brand-blue, Bricolage story headline, emoji hero, reassurance chips, soft
   shadows, generous rounding) to every entry surface. Tokens from
   builder/tokens.css (loaded app-wide in the Next root layout);
   var(--token,#fallback) keeps it correct if a sheet is missing.

   A11y is a HARD floor (vulnerable users): 16px input font, ≥44px targets,
   visible focus rings, reduced-motion gated. Pure presentation.
   LABEL: PILOT-READY.
───────────────────────────────────────────────────────────────── */

/* ── Shell: a warm, ALIVE branded page (not a card on pastel) ──── */
.entry-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background:
    radial-gradient(125% 125% at 0% 0%, var(--amber-bg,#FFF8E1) 0%, transparent 50%),
    radial-gradient(110% 110% at 100% 100%, var(--brand-bg-soft,#F3EEFF) 0%, transparent 55%),
    linear-gradient(160deg, var(--bg-warm,#F5EDE0) 0%, var(--bg,#FBF7F0) 100%);
  color: var(--ink,#1A1A2E);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Card ──────────────────────────────────────────────────────── */
.entry-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface,#fff);
  border: 1px solid var(--border,#E5DDD0);
  border-radius: var(--radius-xl,24px);
  box-shadow: var(--shadow-xl,0 16px 50px rgba(26,26,46,0.16));
  padding: 2rem 1.75rem 1.75rem;
}
.entry-card--wide { max-width: 560px; } /* signup (longer form) */

/* ── Hero / story (mirrors the wizard hero) ───────────────────── */
.entry-hero { text-align: center; margin-bottom: 1.4rem; }
.entry-hero-art {
  font-size: 3rem; line-height: 1;
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-bottom: 0.55rem;
  filter: drop-shadow(0 4px 10px rgba(26,26,46,0.12));
}
.entry-hero-art .entry-spark { font-size: 1.85rem; animation: entry-twinkle 2.4s ease-in-out infinite; }
@keyframes entry-twinkle { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.55;transform:scale(0.82);} }
.entry-hero-title {
  margin: 0 0 0.35rem;
  font-family: 'Bricolage Grotesque', 'DM Sans', sans-serif;
  font-size: 1.5rem; font-weight: 800; line-height: 1.15;
  color: var(--brand-ink,#0C1530);
}
.entry-hero-sub {
  margin: 0 auto; max-width: 26rem;
  font-size: 0.96rem; line-height: 1.5; color: var(--ink-soft,#4A4A5A);
}
.entry-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 0.85rem; }
.entry-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.28rem 0.7rem; border-radius: 999px;
  background: var(--surface,#fff); border: 1px solid var(--border,#E5DDD0);
  box-shadow: var(--shadow-sm,0 1px 3px rgba(26,26,46,0.06));
  font-size: 0.76rem; font-weight: 700; color: var(--ink,#1A1A2E);
}

/* ── Fields ────────────────────────────────────────────────────── */
.entry-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.95rem; }
.entry-label { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft,#4A4A5A); }
.entry-input,
.entry-select {
  width: 100%; min-height: 48px;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--border,#E5DDD0);
  border-radius: var(--radius-md,12px);
  font-size: 16px; /* iOS-zoom defense */
  background: var(--surface,#fff); color: var(--ink,#1A1A2E);
  outline: none; font-family: inherit;
  -webkit-appearance: none; appearance: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.entry-input:focus,
.entry-select:focus {
  border-color: var(--brand-blue,#7C3AED);
  box-shadow: 0 0 0 4px rgba(25,118,210,0.16);
}

/* ── Buttons ───────────────────────────────────────────────────── */
.entry-btn {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md,12px);
  font-size: 0.98rem; font-weight: 800;
  cursor: pointer; border: 2px solid transparent; background: transparent;
  color: var(--ink,#1A1A2E); font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  transition: filter 120ms ease, background 120ms ease, transform 80ms ease;
}
.entry-btn:active { transform: translateY(1px); }
.entry-btn:focus-visible { outline: 3px solid var(--amber,#E8A838); outline-offset: 2px; }
.entry-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.entry-btn-primary {
  background: linear-gradient(135deg, var(--brand-blue,#7C3AED) 0%, var(--brand-blue-dark,#5B21B6) 100%);
  color: #fff;
  box-shadow: var(--shadow-md,0 4px 12px rgba(25,118,210,0.28));
}
.entry-btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.entry-btn-secondary {
  background: var(--surface,#fff);
  color: var(--brand-blue,#7C3AED);
  border-color: var(--border,#E5DDD0);
}
.entry-btn-secondary:hover:not(:disabled) { background: var(--brand-bg-soft,#F3EEFF); border-color: var(--brand-blue,#7C3AED); }
.entry-btn-ghost { color: var(--ink-soft,#4A4A5A); }
.entry-btn-ghost:hover:not(:disabled) { background: rgba(26,26,46,0.05); color: var(--ink,#1A1A2E); }

/* ── Divider ("or sign in with email") ────────────────────────── */
.entry-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.1rem 0; }
.entry-divider::before, .entry-divider::after { content: ""; flex: 1; height: 1px; background: var(--border,#E5DDD0); }
.entry-divider span { font-size: 0.82rem; color: var(--ink-muted,#8A8A9A); white-space: nowrap; }

/* ── Banners (info / success / error) — warm, never bootstrap ──── */
.entry-banner {
  margin-bottom: 1rem; padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md,12px);
  font-size: 0.88rem; line-height: 1.45;
}
.entry-banner-info  { background: var(--brand-bg-soft,#F3EEFF); border: 1px solid var(--brand-blue-light,#DDD6FE); color: var(--brand-blue-dark,#5B21B6); }
.entry-banner-ok    { background: #E6F4EC; border: 1px solid #1F7A4D; color: #1A4D2E; }
.entry-banner-error { background: #FDECEA; border: 1px solid #F2B8B5; color: #8C1D18; }

/* ── Footer link row ──────────────────────────────────────────── */
.entry-foot { margin-top: 1.25rem; text-align: center; font-size: 0.9rem; color: var(--ink-soft,#4A4A5A); }
.entry-link { color: var(--brand-blue,#7C3AED); font-weight: 700; text-decoration: none; }
.entry-link:hover { text-decoration: underline; }
.entry-link:focus-visible { outline: 3px solid var(--brand-blue,#7C3AED); outline-offset: 2px; border-radius: 4px; }

/* ── Entrance motion (gated) ──────────────────────────────────── */
.entry-card { animation: entry-rise var(--motion-enter,0.22s ease-out); }
@keyframes entry-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .entry-card, .entry-hero-art .entry-spark { animation: none !important; }
}

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .entry-shell { padding: 1rem 0.75rem; align-items: flex-start; }
  .entry-card { padding: 1.5rem 1.25rem; }
  .entry-hero-title { font-size: 1.35rem; }
}
