/* ============================================================
   Project Scoping Form — stylesheet
   Black theme, indigo accent. No framework required.
   ============================================================ */

:root {
  --bg:            #000000;
  --card:          #0a0a0a;
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --input-bg:      rgba(255, 255, 255, 0.04);
  --text:          #e2e8f0;   /* slate-200 */
  --text-dim:      #94a3b8;   /* slate-400 */
  --text-faint:    #64748b;   /* slate-500 */
  --text-ghost:    #475569;   /* slate-600 */
  --white:         #ffffff;
  --accent:        #6366f1;   /* indigo-500 */
  --accent-light:  #818cf8;   /* indigo-400 */
  --accent-soft:   #a5b4fc;   /* indigo-300 */
  --danger:        #fb7185;   /* rose-400 */
  --danger-ring:   rgba(244, 63, 94, 0.5);
  --success:       #34d399;   /* emerald-400 */
  --radius:        16px;
  --radius-sm:     12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
@media (min-width: 640px) {
  .page { padding: 4rem 1.25rem; }
}

/* ---------- Header ---------- */
.header { margin-bottom: 2.5rem; }
.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(129, 140, 248, 0.8);
}
.title {
  margin: 0.5rem 0 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--white);
}
@media (min-width: 640px) {
  .title { font-size: 2.25rem; }
}
.lede {
  margin: 0.75rem 0 0;
  color: var(--text-dim);
  line-height: 1.6;
}
.req { color: var(--danger); }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) {
  .card { padding: 1.75rem; }
}
.card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.card-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--text-ghost);
}
.card-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.card-body { display: flex; flex-direction: column; gap: 1.25rem; }

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; }
.field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 0.375rem;
}
.hint {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--text-faint);
}
.grid-2 { display: grid; gap: 1.25rem; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Inputs ---------- */
input,
textarea,
select {
  width: 100%;
  background: var(--input-bg);
  color: var(--text);
  border: none;
  outline: none;
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.15s ease;
}
input::placeholder,
textarea::placeholder { color: var(--text-ghost); }
textarea { resize: vertical; min-height: 6rem; }

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 2px var(--accent-light);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.1rem;
  padding-right: 2.25rem;
  color: var(--text);
}
select option { background: var(--card); color: var(--text); }

/* Invalid state */
.field.invalid input,
.field.invalid textarea {
  box-shadow: 0 0 0 1px var(--danger-ring);
}
.field.invalid input:focus,
.field.invalid textarea:focus {
  box-shadow: 0 0 0 2px #f43f5e;
}

/* ---------- Errors ---------- */
.error {
  display: none;
  align-items: center;
  gap: 0.375rem;
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  color: var(--danger);
}
.error.show { display: flex; }
.error::before {
  content: "";
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fb7185' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ---------- Dropzone ---------- */
.dropzone {
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}
.dropzone.dragover {
  border-color: var(--accent-light);
  background: rgba(99, 102, 241, 0.1);
}
.dropzone:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.dz-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
}
.dz-icon { width: 1.25rem; height: 1.25rem; color: var(--text-dim); }
.dz-main { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--text); }
.dz-main strong { color: var(--white); font-weight: 500; }
.dz-sub  { margin: 0.25rem 0 0; font-size: 0.75rem; color: var(--text-faint); }

.dz-file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}
.dz-file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-soft);
}
.dz-file-icon svg { width: 1rem; height: 1rem; }
.dz-file-meta { min-width: 0; flex: 1; }
.dz-file-name {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dz-file-size { margin: 0; font-size: 0.75rem; color: var(--text-faint); }
.dz-remove {
  border: none;
  background: transparent;
  color: var(--text-faint);
  padding: 0.375rem;
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  transition: background 0.15s ease, color 0.15s ease;
}
.dz-remove:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-dim); }
.dz-remove svg { width: 1rem; height: 1rem; }

/* ---------- Submit ---------- */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 20px -8px rgba(99, 102, 241, 0.5);
  transition: background 0.15s ease;
}
.submit-btn:hover { background: var(--accent-light); }
.submit-btn:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.submit-btn svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.15s ease;
}
.submit-btn:hover svg { transform: translateX(2px); }

.footnote {
  text-align: center;
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--text-ghost);
}

/* ---------- Success ---------- */
.success {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1.5rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.15);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.3);
  color: var(--success);
}
.success-icon svg { width: 2rem; height: 2rem; }
.success-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--white);
}
.success-text {
  max-width: 28rem;
  margin: 0.75rem 0 0;
  color: var(--text-dim);
  line-height: 1.6;
}
.success-text strong { color: var(--text); font-weight: 500; }
.success-again {
  margin-top: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-faint);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.15s ease;
}
.success-again:hover { color: var(--white); }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
