*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0d0d;
  --surface: #141414;
  --border: #2a2a2a;
  --border-focus: #c8a96e;
  --text: #e8e2d9;
  --muted: #5a5a5a;
  --accent: #c8a96e;
  --accent-dim: rgba(200,169,110,0.12);
  --error: #e07070;
  --success: #6ec89a;
  --font-display: "Poppins", sans-serif;
  --font-mono: 'DM Mono', monospace;
}

html, body {
  min-height: 100vh;
  /* background: var(--bg); */
  /* color: var(--text); */
  /* font-family: var(--font-mono); */
  font-size: 13px;
  letter-spacing: 0.01em;
}

/* body {
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(200,169,110,0.06) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.015) 39px, rgba(255,255,255,0.015) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.015) 39px, rgba(255,255,255,0.015) 40px);
} */

.wrapper {
  width: 100%;
  max-width: 560px;
}

/* Header */
.header {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
}

.header-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.header h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 300;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.01em;
}

.header h1 em {
  font-style: italic;
  color: var(--accent);
}

.header-line {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin-top: 20px;
  transform-origin: left;
  animation: expandLine 0.8s 0.4s ease forwards;
  transform: scaleX(0);
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.field {
  position: relative;
  /* border-top: 1px solid var(--border); */
  padding: 20px 0;
  opacity: 0;
  transform: translateY(12px);
}

.field:last-of-type { border-bottom: 1px solid var(--border); }

.field.visible {
  animation: fadeUp 0.5s ease forwards;
}

.field-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.field-num {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.1em;
  min-width: 18px;
}

label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgb(129, 127, 127);
  transition: color 0.2s;
  cursor: pointer;
}

.field:focus-within label { color: rgba(129, 127, 127, .9); }

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 300;
  /* color: var(--text); */
  color: #122670;
  outline: none;
  transition: border-color 0.2s;
  caret-color: #00d0d0;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  border-bottom-color: #00d0d0;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder {
  color: #00d0d0;
  font-style: italic;
}

/* File upload */
.file-zone {
  border: 1px dashed var(--border);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}

.file-zone:hover,
.file-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.file-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-icon {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--muted);
  transition: color 0.2s;
}

.file-zone:hover .file-icon { color: var(--accent); }

.file-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.file-hint strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.file-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-dim);
  border: 1px solid rgba(200,169,110,0.2);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text);
  animation: fadeUp 0.3s ease forwards;
}

.file-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80%;
}

.file-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s;
}

.file-remove:hover { color: var(--error); }

/* Error message */
.field-error {
  font-size: 10px;
  color: var(--error);
  margin-top: 6px;
  letter-spacing: 0.08em;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.2s, height 0.2s;
}

.field-error.visible {
  opacity: 1;
  height: auto;
}

/* Submit */
.submit-row {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  opacity: 0;
  animation: fadeUp 0.5s 0.8s ease forwards;
}

.submit-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 200px;
}

button[type="submit"] {
  background: var(--accent);
  color: #0d0d0d;
  border: none;
  padding: 14px 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  min-width: 140px;
  flex-shrink: 0;
}

button[type="submit"]:hover {
  background: #e0bf80;
  transform: translateY(-1px);
}

button[type="submit"]:active {
  transform: translateY(0);
}

button[type="submit"].loading {
  pointer-events: none;
  opacity: 0.7;
}

button[type="submit"].loading::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: rgba(0,0,0,0.3);
  animation: loadBar 1.5s linear infinite;
}

/* ── Progress bar ── */
.progress-wrap {
  margin-top: 20px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.progress-wrap.visible {
  opacity: 1;
  transform: translateY(0);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}

.progress-label.active { color: var(--accent); }
.progress-label.done   { color: var(--success); }

.progress-pct {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  transition: color 0.3s;
  min-width: 36px;
  text-align: right;
}

.progress-pct.done { color: var(--success); }

.progress-track {
  width: 100%;
  height: 2px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.25s ease, background 0.4s;
  transform-origin: left;
}

.progress-fill.done { background: var(--success); }

.progress-fill.indeterminate {
  width: 40% !important;
  animation: indeterminate 1.2s ease-in-out infinite;
}

.progress-phases {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.phase {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  transition: color 0.3s;
}

.phase.active { color: var(--text); }
.phase.done   { color: var(--success); }

.phase-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.phase.active .phase-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,169,110,0.2);
  animation: pulseDot 1s ease-in-out infinite;
}

.phase.done .phase-dot {
  background: var(--success);
  box-shadow: none;
}

@keyframes indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(200,169,110,0.2); }
  50%       { box-shadow: 0 0 0 5px rgba(200,169,110,0.08); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  border-left: 3px solid;
  background: var(--surface);
  color: var(--text);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 100;
  max-width: 320px;
}

.toast.show { transform: translateX(0); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--error); }

/* Animations */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes expandLine {
  to { transform: scaleX(1); }
}

@keyframes loadBar {
  0% { width: 0; left: 0; }
  50% { width: 60%; }
  100% { width: 0; left: 100%; }
}

/* ── Redes sociales ── */
.field-sublabel {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.social-row {
  display: grid;
  grid-template-columns: 130px 1fr 32px;
  gap: 8px;
  align-items: center;
  animation: fadeUp 0.25s ease both;
}

.social-select {
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235a5a5a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 24px;
}

.social-select:focus { border-bottom-color: var(--accent); }

.social-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 300;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  caret-color: var(--accent);
  width: 100%;
}

.social-input:focus { border-bottom-color: var(--accent); }
.social-input::placeholder { color: var(--border); font-style: italic; }

.social-input-other {
  font-size: 13px;
  font-family: var(--font-mono);
}

.btn-remove-social {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
  text-align: center;
}

.btn-remove-social:hover { color: var(--error); }

.btn-add-social {
  background: none;
  border: 1px dashed var(--border);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-social:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-add-social span {
  font-size: 16px;
  line-height: 1;
}