/* ─── Form Steps & Interactive Elements ───────────────────────────────────── */

/* ─── Steps ──────────────────────────────────────────────────────────────────── */
.step { display: none; padding: 40px; }
.step.active { display: block; animation: stepIn 0.4s var(--ease-out) both; }
.step.exit-left { animation: stepOutLeft 0.25s ease-in both; }

@keyframes stepIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes stepInReverse {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes stepOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-24px); }
}

.step.going-back.active { animation: stepInReverse 0.4s var(--ease-out) both; }

/* ─── Step Header ────────────────────────────────────────────────────────────── */
.step-header { margin-bottom: 36px; }

.step-badge {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--violet);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.step-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── Fields ─────────────────────────────────────────────────────────────────── */
.fields { display: flex; flex-direction: column; gap: 28px; }
.field-group { display: flex; flex-direction: column; }

/* ─── Step Nav ───────────────────────────────────────────────────────────────── */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ─── Industry Dropdown ──────────────────────────────────────────────────────── */
.select-wrapper { position: relative; }

.dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 260px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.dropdown-list.open { display: block; }

.dropdown-group-label {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  color: var(--violet);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 16px 4px;
  position: sticky;
  top: 0;
  background: var(--surface-2);
}

.dropdown-item {
  padding: 9px 16px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.dropdown-item:hover, .dropdown-item.highlighted { background: var(--violet-dim); color: var(--violet-light); }

/* ─── Age Slider (noUiSlider override) ───────────────────────────────────────── */
.slider-container { padding: 12px 0; }

.noUi-target {
  background: var(--border);
  border: none;
  border-radius: 99px;
  box-shadow: none;
  height: 4px;
}
.noUi-connect { background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.noUi-handle {
  background: #fff;
  border: 2px solid var(--violet);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(139,92,246,0.4);
  width: 20px !important;
  height: 20px !important;
  top: -8px !important;
  right: -10px !important;
  cursor: grab;
}
.noUi-handle:active { cursor: grabbing; }
.noUi-handle::before, .noUi-handle::after { display: none; }
[data-theme="light"] .noUi-handle { border-color: var(--violet); }

.slider-values {
  text-align: center;
  margin-top: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--violet-light);
}

/* ─── Option Cards (goal, typography, mode) ──────────────────────────────────── */
.card-grid { display: grid; gap: 12px; }
.goal-grid { grid-template-columns: repeat(2, 1fr); }
.type-grid { grid-template-columns: repeat(3, 1fr); }
.mode-grid { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 540px) {
  .goal-grid { grid-template-columns: 1fr 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
}

.option-card {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
}

.option-card:hover {
  border-color: var(--violet);
  background: var(--violet-dim);
  transform: translateY(-2px);
}

.option-card.selected {
  border-color: var(--violet);
  background: var(--violet-dim);
  box-shadow: 0 0 0 1px var(--violet), 0 4px 20px rgba(139,92,246,0.2);
}

.card-icon { color: var(--text-secondary); margin-bottom: 4px; }
.option-card.selected .card-icon { color: var(--violet-light); }

.card-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.option-card.selected .card-label { color: var(--violet-light); }

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Typography cards */
.type-sample {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.serif-sample { font-family: 'Playfair Display', Georgia, serif; }
.sans-sample { font-family: var(--font-heading); }
.mixed-sample { font-family: var(--font-heading); opacity: 0.4; }
.option-card.selected .type-sample { color: var(--violet); }

/* Mode preview cards */
.mode-preview {
  width: 40px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 8px;
  margin-bottom: 6px;
}
.dark-mode-prev { background: #0B0F1A; border: 1px solid rgba(255,255,255,0.1); }
.light-mode-prev { background: #F4F4F5; border: 1px solid #E4E4E7; }
.both-mode-prev { background: linear-gradient(135deg, #0B0F1A 50%, #F4F4F5 50%); border: 1px solid var(--border); }

/* ─── Aesthetic Preview Cards ────────────────────────────────────────────────── */
.aesthetic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .aesthetic-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .aesthetic-grid { grid-template-columns: 1fr; }
}

.aesthetic-card {
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: all 0.25s var(--ease-out);
  background: var(--surface-2);
}
.aesthetic-card:hover { border-color: var(--violet); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(139,92,246,0.15); }
.aesthetic-card.selected {
  border-color: var(--violet);
  box-shadow: 0 0 0 1px var(--violet), 0 8px 28px rgba(139,92,246,0.3);
  transform: translateY(-3px) scale(1.01);
}

/* Preview canvas */
.aesthetic-preview {
  height: 110px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Cinematic Dark */
.preview-cinematic {
  background: #0B0F1A;
}
.preview-cinematic .preview-glow {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 40px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.5), transparent 70%);
  filter: blur(6px);
}

/* Luxury */
.preview-luxury { background: #FAF7F2; }
.preview-gold-line { width: 30px; height: 1px; background: #C9A96E; margin: 0 auto 8px; }
.preview-serif { font-family: 'Playfair Display', Georgia, serif !important; }

/* Brutalist */
.preview-brutalist {
  background: #000;
  position: relative;
}

/* Minimal */
.preview-minimal { background: #fff; }

/* Warm */
.preview-warm { background: #FAF6F1; }

/* Retro */
.preview-retro {
  background: #0A0A0A;
  position: relative;
}
.preview-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,255,0,0.03) 3px, rgba(0,255,0,0.03) 4px);
  pointer-events: none;
  z-index: 1;
}
.preview-retro .preview-hero { position: relative; z-index: 2; }

/* Shared nav/hero in previews */
.preview-nav {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.preview-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.preview-dot-l { width: 5px; height: 5px; border-radius: 50%; background: rgba(0,0,0,0.15); }
.preview-dot-m { width: 5px; height: 5px; border-radius: 50%; background: rgba(0,0,0,0.2); }
.preview-dot-w { width: 5px; height: 5px; border-radius: 50%; background: #C9A96E; opacity: 0.4; }

.preview-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
}
.preview-headline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 10px;
  color: rgba(255,255,255,0.9);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.preview-sub { width: 40px; height: 2px; background: rgba(255,255,255,0.2); border-radius: 99px; margin: 5px 0; }
.preview-btn { width: 30px; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.1); margin-top: 4px; }

/* Card labels */
.aesthetic-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  padding: 10px 12px 2px;
}
.aesthetic-desc {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 12px 10px;
  line-height: 1.4;
}
.aesthetic-card.selected .aesthetic-label { color: var(--violet-light); }

/* ─── Color Energy Slider ─────────────────────────────────────────────────────── */
.energy-slider-wrapper { padding: 4px 0; }

.energy-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.energy-track { position: relative; }

.energy-gradient {
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366F1, #22D3EE, #7C9E6F, #C9A96E, #E07B54);
  margin-bottom: 4px;
}

.energy-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 24px;
  cursor: pointer;
  margin-top: -16px;
  position: relative;
  z-index: 2;
}
.energy-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--violet);
  box-shadow: 0 2px 8px rgba(139,92,246,0.4);
  cursor: grab;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.energy-range::-webkit-slider-thumb:active { cursor: grabbing; }
.energy-range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--violet);
  cursor: grab;
}

.energy-thumb-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--violet-light);
  margin-top: 6px;
  font-family: var(--font-heading);
}

/* ─── Brand Color ─────────────────────────────────────────────────────────────── */
.brand-color-row { margin-bottom: 12px; }

.toggle-pill { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-track {
  width: 40px; height: 22px;
  border-radius: 99px;
  background: var(--border);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-pill input { display: none; }
.toggle-pill input:checked + .toggle-track { background: var(--violet); }
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.toggle-pill input:checked + .toggle-track::after { transform: translateX(18px); }
.toggle-label { font-size: 14px; color: var(--text-secondary); }

.brand-color-fields {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  animation: fadeIn 0.2s ease both;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ─── Contact Grid ────────────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-grid input:last-child { grid-column: 1 / -1; }

@media (max-width: 480px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid input:last-child { grid-column: auto; }
}

/* ─── Responsive step padding ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .step { padding: 28px 20px; }
  .step-title { font-size: 22px; }
}
