/* ===== ONBOARDING WIZARD — LittleFlow ===== */

.ob-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 80px;
  position: relative;
}

/* Step progress bar */
.ob-progress {
  width: 100%;
  max-width: 540px;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.ob-progress.visible {
  opacity: 1;
  transform: translateY(0);
}
.ob-steps-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.06em;
}
.ob-steps-label span:last-child {
  font-family: 'Fraunces', serif;
  font-size: 0.85rem;
  color: var(--green);
}
.ob-track {
  height: 4px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
}
.ob-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-light) 100%);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 0%;
}

/* Step dots */
.ob-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cream-dark);
  transition: background 0.3s ease, transform 0.3s ease;
}
.ob-dot.done {
  background: var(--green);
  transform: scale(1.1);
}
.ob-dot.active {
  background: var(--amber);
  transform: scale(1.3);
}

/* Card */
.ob-card {
  width: 100%;
  max-width: 540px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(45, 90, 74, 0.1);
  border-radius: 24px;
  padding: 48px 44px;
  box-shadow: 0 8px 48px rgba(26, 61, 46, 0.08), 0 1px 4px rgba(26, 61, 46, 0.04);
}

/* Step panels */
.ob-step {
  display: none;
  animation: stepIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ob-step.active {
  display: block;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Headings */
.ob-heading {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem;
  font-weight: 500;
  color: var(--green-dark);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.ob-sub {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 36px;
  line-height: 1.6;
}

/* Form fields */
.ob-field {
  margin-bottom: 20px;
}
.ob-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.ob-label-hint {
  font-weight: 400;
  color: var(--text-light);
  margin-left: 4px;
}
.ob-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(45, 90, 74, 0.15);
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.ob-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 90, 74, 0.1);
}
.ob-input::placeholder { color: var(--text-light); }

.ob-row { display: flex; gap: 16px; }
.ob-row .ob-field { flex: 1; }

/* Chip grids */
.ob-chip-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ob-chip-hint { font-weight: 400; color: var(--text-light); font-size: 0.8rem; }

.ob-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.ob-chip {
  padding: 8px 16px;
  border: 1.5px solid rgba(45, 90, 74, 0.2);
  border-radius: 20px;
  cursor: pointer;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-mid);
  background: rgba(255,255,255,0.6);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ob-chip:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-1px);
}
.ob-chip.selected {
  background: var(--green);
  color: var(--cream);
  border-color: var(--green);
  box-shadow: 0 3px 12px rgba(45, 90, 74, 0.25);
  transform: translateY(-2px);
}
.ob-chip input { display: none; }
.ob-chip-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ob-chip.selected .ob-chip-check::after {
  content: '✓';
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* Age range pills */
.ob-age-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.ob-age-pill {
  padding: 10px 18px;
  border: 1.5px solid rgba(45, 90, 74, 0.15);
  border-radius: 24px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  background: rgba(255,255,255,0.6);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}
.ob-age-pill:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-1px);
}
.ob-age-pill.selected {
  background: var(--green);
  color: var(--cream);
  border-color: var(--green);
  box-shadow: 0 3px 12px rgba(45, 90, 74, 0.2);
}

/* Validation */
.ob-input.error {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(193, 124, 90, 0.12);
}
.ob-error {
  font-size: 0.78rem;
  color: var(--terracotta);
  margin-top: 6px;
  display: none;
}
.ob-error.visible { display: block; }

/* Buttons */
.ob-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}
.ob-btn-primary {
  flex: 1;
  padding: 15px 24px;
  background: var(--green);
  color: var(--cream);
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ob-btn-primary:hover:not(:disabled) {
  background: var(--green-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45, 90, 74, 0.25);
}
.ob-btn-primary:active { transform: translateY(0); }
.ob-btn-primary:disabled {
  background: var(--text-light);
  cursor: not-allowed;
}
.ob-btn-primary svg {
  transition: transform 0.2s;
}
.ob-btn-primary:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.ob-btn-ghost {
  padding: 15px 20px;
  background: transparent;
  color: var(--text-light);
  border: 1.5px solid rgba(45, 90, 74, 0.15);
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.ob-btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

/* Loading state */
.ob-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 8px;
  text-align: center;
}
.ob-loading.active { display: flex; }
.ob-orbs {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 28px;
}
.ob-orb {
  position: absolute;
  border-radius: 50%;
  animation: orbPulse 2s ease-in-out infinite;
}
.ob-orb:nth-child(1) {
  width: 24px; height: 24px;
  background: var(--green);
  top: 0; left: 50%;
  transform: translateX(-50%);
  animation-delay: 0s;
}
.ob-orb:nth-child(2) {
  width: 20px; height: 20px;
  background: var(--amber);
  bottom: 0; left: 0;
  animation-delay: 0.4s;
}
.ob-orb:nth-child(3) {
  width: 16px; height: 16px;
  background: var(--terracotta);
  bottom: 0; right: 0;
  animation-delay: 0.8s;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.3); opacity: 1; }
}
.ob-loading-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--green-dark);
  margin-bottom: 10px;
}
.ob-loading-sub {
  font-size: 0.9rem;
  color: var(--text-light);
  max-width: 340px;
  line-height: 1.65;
}
.ob-loading-bar {
  width: 200px;
  height: 4px;
  background: var(--cream-dark);
  border-radius: 4px;
  margin-top: 28px;
  overflow: hidden;
}
.ob-loading-fill {
  height: 100%;
  background: var(--green);
  border-radius: 4px;
  animation: loadFill 2.5s ease-in-out forwards;
}
@keyframes loadFill {
  0%   { width: 0%; }
  60%  { width: 75%; }
  85%  { width: 92%; }
  100% { width: 100%; }
}
.ob-loading-steps {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 220px;
}
.ob-loading-step {
  font-size: 0.78rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: opacity 0.3s, color 0.3s;
}
.ob-loading-step.done { opacity: 1; color: var(--green); }
.ob-step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.ob-loading-step.done .ob-step-dot {
  background: var(--green);
}

/* Final redirect */
.ob-success {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  text-align: center;
}
.ob-success.active { display: flex; }
.ob-success-icon {
  width: 72px;
  height: 72px;
  background: var(--green-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--green);
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ===== Personalization preview (step 2) ===== */
.ob-preview {
  background: linear-gradient(135deg, rgba(45, 90, 74, 0.06) 0%, rgba(255, 255, 255, 0.8) 100%);
  border: 1px solid rgba(45, 90, 74, 0.12);
  border-radius: 18px;
  padding: 24px 24px 20px;
  margin-bottom: 28px;
}
.ob-preview-head {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.ob-preview-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--green-dark);
  margin-bottom: 18px;
  line-height: 1.3;
}
.ob-preview-title em {
  font-style: italic;
  color: var(--green);
}
.ob-preview-caption {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 20px;
}
.ob-domains {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ob-domain-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(45, 90, 74, 0.1);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(26, 61, 46, 0.06);
}
.ob-domain-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}
.ob-domain-icon svg {
  width: 100%;
  height: 100%;
}
.ob-domain-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.2;
}
.ob-domain-bar {
  width: 100%;
  height: 5px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
}
.ob-domain-fill {
  height: 100%;
  border-radius: 4px;
  width: calc(var(--fill, 30) * 1%);
  background: var(--green);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Responsive */
@media (max-width: 540px) {
  .ob-card { padding: 36px 28px; }
  .ob-heading { font-size: 1.7rem; }
  .ob-row { flex-direction: column; gap: 0; }
  .ob-age-grid { gap: 6px; }
  .ob-age-pill { padding: 8px 14px; font-size: 0.8rem; }
  .ob-domains { grid-template-columns: repeat(2, 1fr); }
}