/* Proga — multi-step form styles. Inherits brand tokens from styles.css.
   Matches the Proga design system: Poppins, teal, soft cards, pill buttons. */

.form-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 24px 56px;
}

.form-card {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15,27,29,0.06), 0 1px 3px rgba(15,27,29,0.08);
  padding: 32px clamp(22px, 4vw, 36px);
}

/* ---- Intro ---- */
.form-intro { text-align: center; margin-bottom: 26px; }

.form-intro .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-100);
  padding: 6px 14px;
  border-radius: 999px;
}

.form-intro h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 18px 0 0;
}

.form-intro p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  margin: 14px auto 0;
  text-wrap: pretty;
}

/* ---- Progress ---- */
.progress { margin: 0 0 26px; }

.progress-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-direction: row-reverse;   /* step-name left, step-num right */
}

.progress-label .step-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--teal-dark);
}
.progress-label .step-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--placeholder);
}

.progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--teal);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ---- Steps ---- */
.step { display: none; }
.step.active { display: block; animation: progaRise 0.3s ease both; }

.step h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.step .step-hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 6px 0 24px;
}

/* ---- Fields ---- */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #33474b;
  margin-bottom: 7px;
}

.field label .opt { color: var(--placeholder); font-weight: 500; }

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: #ffffff;
  border: 1.5px solid #bccacc;
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--placeholder); }

.field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236e8589' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #1aa6b2;
  box-shadow: 0 0 0 3px var(--teal-100);
}

.field input.invalid,
.field textarea.invalid,
.field select.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(214, 69, 61, 0.12);
}

.field .error-msg {
  display: none;
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 6px;
}
.field .error-msg.show { display: block; }

/* Honeypot — visually hidden */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- File upload ---- */
.dropzone {
  border: 1.5px dashed #bccacc;
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover, .dropzone.drag {
  border-color: #45bcc6;
  background: var(--teal-50);
}
.dropzone strong { color: var(--teal); font-weight: 600; }
.dropzone input[type="file"] { display: none; }

.file-list { list-style: none; margin: 14px 0 0; padding: 0; }
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  margin-top: 8px;
  font-size: 14px;
}
.file-list .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .fsize { color: var(--muted); flex-shrink: 0; }
.file-list .remove {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1.1rem; line-height: 1; flex-shrink: 0;
}
.file-list .remove:hover { color: var(--danger); }

/* ---- Repeatable groups ("add another") ---- */
.repeat-template { display: none; }

.repeat-item {
  position: relative;
  border: 1px solid #e3eaeb;
  border-radius: 12px;
  padding: 20px 18px 4px;
  margin-bottom: 14px;
  background: #fafdfd;
}

.repeat-item .repeat-remove {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.repeat-item .repeat-remove:hover { border-color: #e6a59f; color: var(--danger); background: #fdf2f1; }

.repeat-item-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 14px;
}

.repeat-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--teal-dark);
  border: 1.5px dashed #bccacc;
  border-radius: 10px;
  padding: 11px 18px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.repeat-add:hover { background: var(--teal-50); border-color: var(--teal-300); }
.repeat-add span { font-size: 1.1rem; line-height: 1; }

/* ---- Nav buttons ---- */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px); }

/* Next = solid teal */
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }

/* Submit = brand gradient */
.btn-submit {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(19,142,153,0.25);
}
.btn-submit:hover { box-shadow: 0 10px 28px rgba(19,142,153,0.32); }

/* Back = ghost */
.btn-ghost { background: transparent; color: var(--ink-soft); padding: 11px 8px; }
.btn-ghost:hover { color: var(--ink); }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-ghost.hidden { visibility: hidden; }

/* ---- Success / error states ---- */
.form-result { text-align: center; padding: 48px 6px; display: none; }
.form-result.show { display: block; animation: progaRise 0.4s ease both; }

.form-result .icon {
  width: 66px; height: 66px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.form-result.success .icon { background: var(--success-bg); color: var(--success); }
.form-result.error .icon { background: rgba(214,69,61,0.12); color: var(--danger); }
.form-result .icon svg { width: 34px; height: 34px; }

.form-result h2 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 14px;
}
.form-result p { color: var(--ink-soft); font-size: 16px; max-width: 460px; margin: 0 auto 8px; line-height: 1.6; }

/* ---- Disclosure + sending ---- */
.form-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 22px auto 0;
  max-width: 560px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  text-align: left;
}
.form-disclosure svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 3px; color: var(--teal); }

.sending-bar {
  display: none;
  align-items: center;
  gap: 10px;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 16px;
}
.sending-bar.show { display: flex; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: progaSpin 0.7s linear infinite;
}

@media (max-width: 560px) {
  .form-card { padding: 26px 20px; }
  .btn { padding: 12px 20px; }
}
