/* Styles for auth-ui.js and signup-quiz.js: the sign-in, sign-up, password
   reset and email-verification modals, the signup profile quiz, and the
   signed-in user menu in the nav. Moved here from landing.css when the
   homepage was rebuilt, so any page can load them without the old
   homepage's element rules (nav, footer) coming along. */

/* Nav user button (logged-in state on landing page) */
.nav-user-wrap { position: relative; }
.nav-user-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.06);
  border: 1.5px solid var(--candle-dim);
  border-radius: 50px;
  padding: 6px 14px 6px 8px;
  cursor: pointer; color: var(--ink);
  font-size: 0.8rem; font-family: 'Inter', sans-serif;
  transition: background 0.18s;
}
.nav-user-btn:hover { background: rgba(0,0,0,0.1); }
.nav-user-name { font-weight: 600; font-size: 0.8rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #e0446e, #b02a4e);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
}
.nav-user-caret { opacity: 0.4; font-size: 0.65rem; }
.nav-user-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0;
  background: rgba(16, 4, 28, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 8px;
  min-width: 230px;
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 600;
  color: #fff;
}
.nav-user-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.nud-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.nud-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #e0446e, #b02a4e);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem; font-weight: 700;
}
.nud-email { font-size: 0.8rem; font-weight: 600; }
.nud-archetype { font-size: 0.73rem; color: rgba(255,255,255,0.45); margin-top: 2px; }
.nud-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 4px 0; }
.nud-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; font-size: 0.84rem;
  color: rgba(255,255,255,0.8);
  border-radius: 10px; text-decoration: none;
  width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.14s, color 0.14s;
}
.nud-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nud-signout { color: rgba(255,100,100,0.75); }
.nud-signout:hover { color: #ff7070; background: rgba(255,80,80,0.08); }

/* ── WQ OVERLAY ── */
.wq-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 8%, rgba(224,68,110,0.18), transparent 62%),
    rgba(4,3,10,0.9);
  backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none; transition: opacity 0.28s ease;
}
.wq-overlay.open { opacity: 1; pointer-events: all; }
.wq-card {
  position: relative; width: min(720px, 100%);
  max-height: min(90vh, 780px); overflow: auto;
  padding: 42px;
  background: linear-gradient(145deg, rgba(15,15,20,0.99), rgba(10,10,15,0.99));
  border: 1px solid rgba(224,68,110,0.24); border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  transform: translateY(18px) scale(0.98); transition: transform 0.28s ease;
}
.wq-overlay.open .wq-card { transform: translateY(0) scale(1); }
.wq-close {
  position: absolute; top: 18px; right: 18px;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(224,68,110,0.18); border-radius: 50%;
  color: var(--cream-dim); cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.wq-close:hover { background: var(--gold); border-color: var(--gold); color: var(--dark); }
.wq-progress-dots { display: flex; gap: 8px; margin: 0 48px 34px 0; }
.wq-dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(245,240,232,0.18); transition: width 0.22s, background 0.22s, box-shadow 0.22s; }
.wq-dot.active { width: 30px; background: var(--gold); box-shadow: 0 0 16px rgba(224,68,110,0.55); }
.wq-dot.done   { background: rgba(224,68,110,0.55); }
.wq-step { display: none; min-height: 360px; }
.wq-step.active { display: block; animation: wqStepIn 0.25s ease both; }
@keyframes wqStepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.wq-eyebrow { color: var(--gold); font-size: 0.68rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 14px; }
.wq-title { max-width: 590px; font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.08; color: var(--cream); margin-bottom: 14px; }
.wq-subtitle { max-width: 540px; color: var(--cream-dim); font-size: 0.95rem; line-height: 1.75; font-weight: 300; margin-bottom: 30px; }
.wq-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wq-option {
  min-height: 58px; display: flex; align-items: center;
  padding: 14px 18px;
  background: rgba(8,6,16,0.52); border: 1px solid rgba(224,68,110,0.16);
  border-radius: 999px; color: var(--cream-dim); font-size: 0.9rem;
  line-height: 1.35; cursor: pointer; user-select: none;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.wq-option:hover { border-color: rgba(224,68,110,0.58); color: var(--cream); transform: translateY(-1px); }
.wq-option.selected { background: linear-gradient(135deg, rgba(224,68,110,0.92), rgba(216,163,94,0.88)); border-color: transparent; color: #fff; box-shadow: 0 10px 28px rgba(224,68,110,0.28); }
.wq-qlabel { color: var(--cream); font-family: 'Playfair Display', serif; font-size: 1.1rem; margin: 24px 0 12px; }
.wq-skip { display: none; width: fit-content; margin: 22px auto 0; color: var(--gold); font-size: 0.78rem; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; cursor: pointer; }
.wq-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; padding-top: 24px; border-top: 1px solid rgba(224,68,110,0.14); }
.wq-btn-back, .wq-btn-next { min-height: 48px; padding: 0 26px; border-radius: 999px; font-family: 'Inter', sans-serif; font-size: 0.76rem; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; cursor: pointer; transition: opacity 0.2s, transform 0.2s; }
.wq-btn-back { background: transparent; border: 1px solid rgba(224,68,110,0.24); color: var(--cream-dim); }
.wq-btn-next { background: linear-gradient(135deg, #e0446e, #b02a4e); border: 1px solid transparent; color: #fff; box-shadow: 0 8px 28px rgba(224,68,110,0.32); }
.wq-btn-back:hover, .wq-btn-next:hover { transform: translateY(-1px); }
.wq-btn-back:disabled, .wq-btn-next:disabled { opacity: 0.38; transform: none; pointer-events: none; }
.wq-result { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px 0 6px; position: relative; overflow: hidden; border-radius: 8px; }
.wq-result::before, .wq-result::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.wq-result > * { position: relative; z-index: 1; }
.wq-result-icon { color: #e0445f; font-size: 3.2rem; line-height: 1; margin-bottom: 22px; filter: drop-shadow(0 0 16px rgba(224,68,95,0.72)); animation: wqIconReveal 1.3s ease both; }
.wq-result-label { color: var(--gold); font-size: 0.72rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 12px; }
.wq-result-archetype { font-family: 'Playfair Display', serif; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; color: var(--cream); margin-bottom: 18px; }
.wq-result-desc { max-width: 560px; color: var(--cream-dim); font-size: 1rem; line-height: 1.9; font-weight: 300; }
.wq-result-confirm { margin-top: 28px; color: var(--gold); font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.05rem; }
.wq-result-devotional::before { opacity:1; background: radial-gradient(circle at 50% 18%, rgba(224,68,95,0.2), transparent 22%), radial-gradient(circle at 26% 62%, rgba(224,68,110,0.16), transparent 28%), radial-gradient(circle at 74% 62%, rgba(224,68,110,0.12), transparent 28%); animation: wqBloom 3.2s ease-in-out infinite alternate; }
.wq-result-devotional .wq-result-icon { animation: wqIconReveal 1.1s ease both, wqIconBeat 1.8s ease-in-out 1.1s infinite; }
.wq-result-nature::before { opacity:1; background: linear-gradient(115deg, transparent 18%, rgba(216,163,94,0.18) 42%, rgba(224,68,110,0.12) 50%, transparent 74%); transform: translateX(-42%); animation: wqSweep 3.4s ease-in-out infinite; }
.wq-result-nature .wq-result-archetype { text-shadow: 0 0 26px rgba(216,163,94,0.24); }
.wq-result-portraits::before { opacity:1; inset:12px; border:1px solid rgba(224,68,110,0.26); box-shadow: inset 0 0 0 1px rgba(224,68,110,0.06), 0 0 30px rgba(224,68,110,0.1); animation: wqPulse 1.8s ease-in-out infinite; }
.wq-result-portraits .wq-result-icon { color: var(--gold); filter: drop-shadow(0 0 18px rgba(224,68,110,0.76)); }
.wq-result-imagined::before { opacity:1; background-image: radial-gradient(circle at 22% 28%, rgba(216,163,94,0.7) 0 2px, transparent 3px), radial-gradient(circle at 70% 22%, rgba(224,68,110,0.65) 0 2px, transparent 3px), radial-gradient(circle at 78% 70%, rgba(245,240,232,0.5) 0 1px, transparent 2px), radial-gradient(circle at 32% 76%, rgba(224,68,110,0.6) 0 1px, transparent 2px); animation: wqFloat 4s ease-in-out infinite alternate; }
.wq-result-mix::before { opacity:1; background: conic-gradient(from 140deg at 50% 48%, transparent 0 18%, rgba(224,68,110,0.14), transparent 36% 55%, rgba(224,68,110,0.14), transparent 74% 100%); filter: blur(2px); animation: wqMixTurn 7s linear infinite; }
.wq-result-mix::after { opacity:0.65; inset:18%; border-radius:50%; border:1px solid rgba(224,68,110,0.14); animation: wqMixBreath 2.8s ease-in-out infinite; }
@keyframes wqIconReveal     { from { opacity:0; transform:translateY(10px) scale(0.72);} to {opacity:1; transform:translateY(0) scale(1);} }
@keyframes wqBloom   { from { transform:scale(0.96); filter:blur(0);} to {transform:scale(1.05); filter:blur(2px);} }
@keyframes wqSweep    { 0%{transform:translateX(-48%);opacity:0;} 28%,62%{opacity:1;} 100%{transform:translateX(48%);opacity:0;} }
@keyframes wqPulse      { 0%,100%{transform:scale(0.985);opacity:0.55;} 50%{transform:scale(1);opacity:1;} }
@keyframes wqFloat    { from{transform:translateY(10px);opacity:0.52;} to{transform:translateY(-8px);opacity:1;} }
@keyframes wqMixTurn         { to{transform:rotate(360deg);} }
@keyframes wqMixBreath       { 0%,100%{transform:scale(0.9);opacity:0.32;} 50%{transform:scale(1.08);opacity:0.8;} }
@keyframes wqIconBeat       { 0%,100%{transform:scale(1);} 14%{transform:scale(1.2);} 28%{transform:scale(1);} 42%{transform:scale(1.1);} 56%{transform:scale(1);} }


/* ── AUTH MODALS (kz-modal) ── */
.kz-modal {
  position: fixed; inset: 0; z-index: 9200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
}
.kz-modal.open { opacity: 1; pointer-events: all; }

.kz-modal-card {
  position: relative;
  background: linear-gradient(160deg, rgba(22,6,40,0.98) 0%, rgba(12,2,24,0.99) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 44px 40px 36px;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(224,68,110,0.1);
  transform: translateY(16px);
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
  color: #fff;
}
.kz-modal.open .kz-modal-card { transform: translateY(0); }

.kz-modal-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none;
  color: rgba(255,255,255,0.35); font-size: 0.95rem;
  cursor: pointer; padding: 4px 8px;
  transition: color 0.18s;
}
.kz-modal-close:hover { color: #fff; }

.kz-modal-logo {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #e0446e, #b02a4e);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700; font-size: 1.1rem; color: #fff;
  margin-bottom: 20px;
}
.kz-modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700;
  color: #fff; margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.kz-modal-sub {
  font-size: 0.88rem; color: rgba(255,255,255,0.5);
  margin-bottom: 28px; line-height: 1.55;
}
.kz-modal-question {
  color: rgba(255,255,255,0.75);
  font-style: italic; font-size: 0.95rem;
  margin-bottom: 20px !important;
}
.kz-form-group { margin-bottom: 16px; }
.kz-label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: rgba(255,255,255,0.55); letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 6px;
}
.kz-hint { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: 0.6; }
.kz-input {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff; font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}
.kz-input:focus { border-color: rgba(224,68,110,0.55); background: rgba(255,255,255,0.09); }
.kz-input::placeholder { color: rgba(255,255,255,0.25); }

/* ── Password show/hide wrapper ── */
.kz-pw-wrap { position: relative; }
.kz-pw-wrap .kz-input { padding-right: 44px; }
.kz-pw-toggle {
  position: absolute;
  right: 11px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; padding: 4px;
  cursor: pointer; color: rgba(255,255,255,0.35);
  line-height: 1; transition: color 0.15s;
}
.kz-pw-toggle:hover { color: rgba(255,255,255,0.75); }
.kz-pw-toggle svg { display: block; pointer-events: none; }

.kz-select { cursor: pointer; }
.kz-select option { background: #1a0030; color: #fff; }
.kz-error {
  font-size: 0.82rem; color: #ff7070;
  background: rgba(255,80,80,0.1);
  border: 1px solid rgba(255,80,80,0.2);
  border-radius: 8px; padding: 8px 12px;
  margin-bottom: 14px;
}
.kz-btn-primary {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, #e0446e, #d8a35e);
  color: #fff; border: none; border-radius: 50px;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
  box-shadow: 0 4px 20px rgba(224,68,110,0.3);
  margin-top: 6px;
}
.kz-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(224,68,110,0.5); }
.kz-btn-primary:disabled { opacity: 0.55; transform: none; }
.kz-modal-footer {
  margin-top: 28px; text-align: center;
  font-size: 0.82rem; color: rgba(255,255,255,0.4);
}
.kz-link {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.65); font-size: 0.82rem;
  text-decoration: underline; text-underline-offset: 2px;
  font-family: 'Inter', sans-serif;
  transition: color 0.16s;
}
.kz-link:hover { color: #fff; }
.kz-link-inline {
  color: #d8a35e; text-decoration: underline; text-underline-offset: 2px;
  font-size: inherit;
}
.kz-link-inline:hover { color: #e0446e; }

/* ── Signup: age / terms checkboxes ── */
.kz-check-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 10px; cursor: pointer;
}
.kz-checkbox {
  flex-shrink: 0; margin-top: 2px;
  width: 16px; height: 16px;
  accent-color: #e0446e; cursor: pointer;
}
.kz-check-row span {
  font-size: 0.8rem; color: rgba(255,255,255,0.55); line-height: 1.5;
}

/* ── Signup: quiz nudge banner ── */
.kz-quiz-nudge {
  display: flex; align-items: center; gap: 10px;
  background: rgba(216,163,94,0.08);
  border: 1px solid rgba(216,163,94,0.2);
  border-radius: 12px; padding: 10px 14px;
  margin: 14px 0 6px;
}
.kz-quiz-badge {
  flex-shrink: 0;
  background: linear-gradient(135deg, #e0446e, #d8a35e);
  color: #fff; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 50px; padding: 3px 8px;
  white-space: nowrap;
}
.kz-quiz-nudge-text {
  font-size: 0.8rem; color: rgba(255,255,255,0.6); line-height: 1.4;
}

/* ── Ghost / secondary button ── */
.kz-btn-ghost {
  width: 100%; padding: 11px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50px;
  font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  margin-top: 8px;
}
.kz-btn-ghost:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.04); }
.kz-btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 768px) {
  /* WQ overlay mobile */
  .wq-overlay { padding: 12px; align-items: flex-end; }
  .wq-card { max-height: 94vh; padding: 30px 20px 22px; border-radius: 8px 8px 0 0; }
  .wq-progress-dots { margin-bottom: 24px; }
  .wq-step { min-height: 360px; }
  .wq-options { grid-template-columns: 1fr; }
  .wq-option { min-height: 52px; border-radius: 18px; }
  .wq-nav { flex-direction: column-reverse; }
  .wq-btn-back, .wq-btn-next { width: 100%; }
}
