/* Signup wizard — ported from mockups/signup.html. Rendered on the base layout
   with its own minimal nav (brand + step indicator), no site footer. */

body { min-height: 100vh; }

/* NAV — matches the main site header (.site-nav): 22px bar, SVG logo at 50px. */
.signup-nav {
  padding: 22px 1.5rem;
  padding-top: calc(22px + env(safe-area-inset-top));
  background: rgba(42, 42, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.signup-nav .nav-inner {
  max-width: 80rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.signup-nav .site-logo { display: flex; align-items: center; text-decoration: none; transform: translate(0px, -2px); }
.signup-nav .site-logo svg { height: 50px; width: auto; display: block; }
.signup-nav .nav-step { color: rgba(255,255,255,0.5); font-size: 0.8rem; font-weight: 600; }

/* LAYOUT */
.signup-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  max-width: 72rem; margin: 0 auto;
  min-height: calc(100vh - 94px); /* 44px vertical padding + 50px logo */
}
.form-side { padding: 3rem 4rem; }

/* PROGRESS */
.progress-bar { display: flex; gap: 0.5rem; margin-bottom: 3rem; }
.progress-step { flex: 1; height: 4px; border-radius: 2px; background: #e0e0e0; }
.progress-step.active { background: var(--brand-primary, #2a2a2a); }
.progress-step.done { background: #16a34a; }

.step-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 700; color: #888;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.step-number {
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--brand-primary, #2a2a2a); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700;
}

.form-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem;
}
.form-subtitle { color: #6b6b6b; font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.6; }

/* ERRORS */
.form-errors {
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 0.75rem;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem;
}
.form-errors ul { margin: 0; padding-left: 1.2rem; }
.form-errors li { color: #b91c1c; font-size: 0.85rem; line-height: 1.6; }

/* FORM FIELDS */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label {
  display: block; font-size: 0.8rem; font-weight: 600; color: #333;
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid #ddd; border-radius: 0.75rem;
  font-size: 0.9rem; font-family: inherit;
  background: #fff; color: #2d2d2d;
  outline: none; transition: border 0.2s;
}
.form-input:focus {
  border-color: var(--brand-primary, #2a2a2a);
  box-shadow: 0 0 0 3px rgba(42,42,42,0.08);
}
.form-input::placeholder { color: #bbb; }
.form-select {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid #ddd; border-radius: 0.75rem;
  font-size: 0.9rem; font-family: inherit;
  background: #fff; color: #2d2d2d;
  outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.form-hint { font-size: 0.75rem; color: #999; margin-top: 0.35rem; }

/* SLUG PREVIEW */
.slug-preview { display: flex; align-items: center; gap: 0; margin-top: 0.35rem; }
.slug-prefix {
  padding: 0.5rem 0.75rem;
  background: #f0f0f0; border: 1.5px solid #ddd;
  border-right: none; border-radius: 0.75rem 0 0 0.75rem;
  font-size: 0.8rem; color: #888; white-space: nowrap;
}
.slug-input {
  flex: 1; padding: 0.5rem 0.75rem;
  border: 1.5px solid #ddd; border-radius: 0 0.75rem 0.75rem 0;
  font-size: 0.8rem; font-family: 'Outfit', sans-serif;
  font-weight: 600; color: var(--brand-primary, #2a2a2a);
  outline: none; min-width: 0;
}
.slug-input:focus { border-color: var(--brand-primary, #2a2a2a); }
.slug-status { font-size: 0.75rem; margin-top: 0.5rem; font-weight: 600; }
.slug-status.ok { color: #16a34a; }
.slug-status.taken { color: #dc2626; }
.slug-status.neutral { color: #999; font-weight: 400; }

/* DIVIDER */
.form-divider { border: none; border-top: 1px solid #e5e5e5; margin: 2rem 0; }
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.section-title svg { color: #888; }

/* CHECKBOX */
.checkbox-row { display: flex; align-items: flex-start; gap: 0.75rem; margin: 1.5rem 0; }
.checkbox-row input[type="checkbox"] {
  width: 1.1rem; height: 1.1rem; margin-top: 0.15rem;
  accent-color: var(--brand-primary, #2a2a2a);
}
.checkbox-text { font-size: 0.8rem; color: #555; line-height: 1.5; }
.checkbox-text a { color: var(--brand-primary, #2a2a2a); }
.checkbox-text[for="agree_terms"] { transform: translateY(2px); }

/* Legal lightbox (Terms / Privacy) */
.legal-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
}
.legal-modal[hidden] { display: none; }
.legal-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 20, 20, 0.55); backdrop-filter: blur(2px);
}
.legal-modal-box {
  position: relative; z-index: 1;
  width: 100%; max-width: 640px; max-height: 85vh;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 1rem; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}
.legal-modal-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid #eceae3; flex-shrink: 0;
}
.legal-modal-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.05rem; }
.legal-modal-close {
  background: none; border: 0; font-size: 1.6rem; line-height: 1;
  color: #999; cursor: pointer; padding: 0 0.25rem;
}
.legal-modal-close:hover { color: #2a2a2a; }
.legal-modal-content { padding: 1.25rem 1.5rem 1.75rem; overflow-y: auto; }
.legal-modal-loading { color: #999; }
/* Scoped legal typography (site.css .legal-page is not loaded on signup) */
.legal-modal-content h1 { font-family: 'Outfit', sans-serif; font-size: 1.4rem; margin-bottom: 0.25rem; }
.legal-modal-content .legal-updated { color: #888; font-size: 0.85rem; margin-bottom: 1.5rem; }
.legal-modal-content h2 { font-family: 'Outfit', sans-serif; font-size: 1.1rem; margin: 1.5rem 0 0.6rem; }
.legal-modal-content p, .legal-modal-content li { line-height: 1.65; font-size: 0.9rem; margin-bottom: 0.7rem; color: #333; }
.legal-modal-content ul { padding-left: 1.35rem; margin-bottom: 0.9rem; }
.legal-modal-content a { color: var(--brand-primary, #2a2a2a); }
.legal-modal-content .callout {
  background: #f8f7f2; border: 1px solid #e5e2d9; border-radius: 0.85rem;
  padding: 1rem 1.25rem; margin: 1.25rem 0;
}

/* BUTTONS */
.form-actions { display: flex; gap: 1rem; margin-top: 2rem; }
.btn-next {
  flex: 1; padding: 0.875rem 1.5rem;
  background: var(--brand-primary, #2a2a2a); color: #fff;
  border: none; border-radius: 0.75rem;
  font-weight: 700; font-size: 0.9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  transition: background 0.2s;
}
.btn-next:hover { background: #1a1a1a; }

/* RIGHT — PREVIEW */
.preview-side {
  background: var(--brand-primary, #2a2a2a);
  padding: 3rem 2rem;
  display: flex; flex-direction: column; justify-content: center;
  color: #fff;
}
.preview-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.15em; color: rgba(255,255,255,0.4);
  margin-bottom: 1.5rem;
}
.preview-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem; padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.preview-avatar {
  width: 3rem; height: 3rem; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700; font-size: 0.9rem;
  margin-bottom: 1rem;
}
.preview-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem; font-weight: 700;
  margin-bottom: 0.25rem;
}
.preview-cat { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-bottom: 1rem; }
.preview-stars { display: none; }
.preview-url {
  padding: 0.5rem 0.75rem; border-radius: 0.5rem;
  background: rgba(255,255,255,0.05);
  font-size: 0.75rem; color: rgba(255,255,255,0.6);
  font-family: 'Outfit', sans-serif;
}
.preview-features { list-style: none; padding: 0; }
.preview-features li {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0;
  color: rgba(255,255,255,0.5); font-size: 0.8rem;
}
.preview-features svg { color: #6ee7b7; flex-shrink: 0; }
.preview-footer {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.75rem; color: rgba(255,255,255,0.25);
  text-align: center;
}

@media (max-width: 900px) and (min-width: 769px) {
  .signup-layout { grid-template-columns: 1fr; }
  .preview-side { display: none; }
  .form-side { padding: 2rem 1.5rem; }
}

@media (max-width: 768px) {
  body { overflow-x: hidden; }

  /* Match the main site nav's compact mobile bar (56px, 34px logo). */
  .signup-nav {
    height: calc(56px + env(safe-area-inset-top));
    padding: 0 16px;
    padding-top: env(safe-area-inset-top);
    display: flex; align-items: center;
  }
  .signup-nav .nav-inner { width: 100%; }
  .signup-nav .site-logo { transform: none; }
  .signup-nav .site-logo svg { height: 34px; }

  .signup-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .form-side, .preview-side { min-width: 0; }
  .form-side { padding: 1.5rem 20px 2rem; }
  .preview-side {
    display: flex;
    background: transparent; color: var(--brand-primary, #2a2a2a);
    padding: 0 20px 24px;
  }

  /* PROGRESS — keep the app's thin-bar progress (the mockup's circle steps
     don't exist in this markup); just tighten spacing on mobile. */
  .progress-bar { margin-bottom: 1.5rem; }

  .form-title { font-size: 26px; text-align: center; margin-bottom: 24px; }

  /* FORM FIELDS — 16px inputs, 50px min-height */
  .form-row { grid-template-columns: 1fr; }
  .form-input, .form-select {
    padding: 14px 16px; min-height: 50px; font-size: 16px;
    border-radius: 0.75rem;
  }
  .slug-prefix, .slug-input { font-size: 16px; min-height: 44px; display: flex; align-items: center; }

  .btn-next { min-height: 52px; font-size: 16px; border-radius: 1rem; }

  /* PREVIEW CARD — compact mobile variant */
  .preview-title { text-align: center; color: #999; }
  .preview-card {
    display: flex; gap: 14px; align-items: center;
    background: rgba(255,255,255,0.8); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3); border-radius: 1.25rem;
    padding: 20px; margin-bottom: 0;
  }
  .preview-avatar {
    width: 52px; height: 52px; flex-shrink: 0;
    background: #e8e5dd; color: #bbb; font-size: 18px; margin-bottom: 0;
  }
  .preview-avatar.has-value { background: var(--brand-primary, #2a2a2a); color: #fff; }
  .preview-body { flex: 1; min-width: 0; }
  .preview-name { font-size: 16px; color: #ccc; margin-bottom: 2px; }
  .preview-name.has-value { color: var(--brand-primary, #2a2a2a); }
  .preview-stars { display: block; color: #e0ddd5; font-size: 13px; }
  .preview-cat { font-size: 12px; color: #bbb; margin-bottom: 0; }
  .preview-url { display: none; }
  .preview-features, .preview-footer { display: none; }
}
