/**
 * Builder questionnaire styles — dark/gold Stratos aesthetic.
 */

.builder-page { min-height: 100vh; background: var(--bg); }

/* PROGRESS BAR */
.builder-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  z-index: 200;
}
.builder-progress-bar {
  height: 100%;
  background: var(--gold);
  transition: width 0.4s ease;
}

/* BUILDER HERO */
.builder-hero {
  padding: 5rem 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.builder-hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.builder-hero-label {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--border-bright); padding: 0.3rem 1rem;
  border-radius: 100px; margin-bottom: 1.5rem;
}
.builder-hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 300;
  line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 1rem;
}
.builder-hero-sub {
  color: var(--text-muted); font-size: 1rem; font-weight: 300;
  max-width: 500px; margin: 0 auto 1.5rem; line-height: 1.7;
}

/* FORM WRAPPER */
.builder-container { max-width: 640px; margin: 0 auto; padding: 0 2rem 6rem; }

.builder-step {
  display: none;
  animation: fadeIn 0.3s ease;
}
.builder-step.active { display: block; }

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

/* STEP HEADER */
.step-header { margin-bottom: 2.5rem; }
.step-number {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.75rem; display: block;
}
.step-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem; font-weight: 400; margin-bottom: 0.5rem; letter-spacing: -0.01em;
}
.step-hint { color: var(--text-muted); font-size: 0.875rem; font-weight: 300; }

/* FORM GROUPS */
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block; font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted); margin-bottom: 0.6rem; letter-spacing: 0.04em;
}
.form-input, .form-textarea, .form-select {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; padding: 0.8rem 1rem; color: var(--text);
  font-size: 0.875rem; font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238A857A' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }

/* STYLE PICKER */
.style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.style-option {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 4px; padding: 1.25rem 1rem; text-align: center;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.style-option:hover { border-color: var(--gold-dim); }
.style-option.selected { border-color: var(--gold); background: var(--surface-elevated); }
.style-option input { position: absolute; opacity: 0; pointer-events: none; }
.style-icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.style-name { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.style-desc { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; font-weight: 300; }

/* COLOR PICKER */
.color-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; }
.color-option {
  aspect-ratio: 1; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: border-color 0.2s, transform 0.2s;
  position: relative;
}
.color-option:hover { transform: scale(1.1); }
.color-option.selected { border-color: var(--text); }
.color-option input { position: absolute; opacity: 0; pointer-events: none; }

/* PAGES CHECKBOX GRID */
.page-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.page-option {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  cursor: pointer; transition: border-color 0.2s;
}
.page-option:hover { border-color: var(--gold-dim); }
.page-option input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.page-option-checked { border-color: var(--gold-dim); background: var(--surface-elevated); }
.page-option-name { font-size: 0.875rem; font-weight: 500; }
.page-option-desc { font-size: 0.75rem; color: var(--text-muted); font-weight: 300; }

/* NAV BUTTONS */
.builder-nav {
  display: flex; gap: 1rem; margin-top: 2.5rem;
  justify-content: flex-end;
}
.btn-next, .btn-back, .btn-submit {
  padding: 0.875rem 2rem; font-size: 0.875rem; font-weight: 600;
  border-radius: 2px; border: none; cursor: pointer; letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
}
.btn-next, .btn-submit { background: var(--gold); color: #0B0B0F; }
.btn-next:hover, .btn-submit:hover { background: #d4b55e; transform: translateY(-1px); }
.btn-back { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-back:hover { border-color: var(--gold-dim); color: var(--text); }
.btn-submit { background: var(--gold); padding: 1rem 2.5rem; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* GENERATING STATE */
.generating-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(11,11,15,0.95); z-index: 300;
  align-items: center; justify-content: center; flex-direction: column;
  text-align: center; padding: 2rem;
}
.generating-overlay.active { display: flex; }
.gen-spinner {
  width: 48px; height: 48px; border: 2px solid var(--border);
  border-top-color: var(--gold); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin-bottom: 2rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gen-title { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 300; margin-bottom: 1rem; }
.gen-sub { color: var(--text-muted); font-size: 0.9rem; font-weight: 300; margin-bottom: 2.5rem; }
.gen-steps { display: flex; flex-direction: column; gap: 0.75rem; text-align: left; max-width: 300px; }
.gen-step { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--text-muted); }
.gen-step-icon { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.6rem; color: var(--gold-dim); }
.gen-step.done .gen-step-icon { background: var(--gold); border-color: var(--gold); color: #0B0B0F; }
.gen-step.active .gen-step-icon { border-color: var(--gold); animation: pulse 1s infinite; }
.gen-step.done .gen-step-text, .gen-step.active .gen-step-text { color: var(--text); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* RESULT SCREEN */
.builder-result {
  display: none; text-align: center; padding: 4rem 2rem;
  animation: fadeIn 0.5s ease;
}
.builder-result.active { display: block; }
.result-badge { display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--border-bright); padding: 0.3rem 1rem; border-radius: 100px; margin-bottom: 2rem; }
.result-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; margin-bottom: 1rem; letter-spacing: -0.01em; }
.result-sub { color: var(--text-muted); font-size: 0.9rem; font-weight: 300; margin-bottom: 2.5rem; line-height: 1.7; max-width: 450px; margin-left: auto; margin-right: auto; }
.result-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.btn-view-site { display: inline-block; background: var(--gold); color: #0B0B0F; padding: 0.875rem 2rem; font-size: 0.875rem; font-weight: 600; border-radius: 2px; text-decoration: none; letter-spacing: 0.04em; transition: background 0.2s; }
.btn-view-site:hover { background: #d4b55e; }
.btn-view-live { display: inline-block; background: transparent; color: var(--text); border: 1px solid var(--border-bright); padding: 0.875rem 2rem; font-size: 0.875rem; font-weight: 500; border-radius: 2px; text-decoration: none; transition: border-color 0.2s; }
.btn-view-live:hover { border-color: var(--gold-dim); }

/* RESPONSIVE */
@media (max-width: 640px) {
  .style-grid { grid-template-columns: 1fr; }
  .color-grid { grid-template-columns: repeat(4, 1fr); }
  .builder-nav { flex-direction: column-reverse; }
  .btn-next, .btn-back, .btn-submit { width: 100%; }
}