/* ============================================
   BIOHUNTERS · Formulario de captura
   Paleta café/crema matching con la marca
   Mobile-first — optimizado para feria
   ============================================ */

:root {
  --cafe-oscuro: #2B1810;
  --cafe-profundo: #4A2C14;
  --cafe-medio: #6B4423;
  --cafe-leche: #C19A6B;
  --crema: #FAF7F2;
  --crema-oscura: #F0E8DC;
  --verde: #7B9154;
  --rojo: #B85042;
  --dorado: #D4A574;
  --sombra: 0 4px 20px rgba(74,44,20,0.12);
  --radio: 12px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--crema);
  color: var(--cafe-oscuro);
  line-height: 1.5;
  min-height: 100vh;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* === HERO === */
.hero {
  text-align: center;
  padding: 1.5rem 0 2rem;
}
.brand {
  font-size: .75rem;
  letter-spacing: .3em;
  color: var(--cafe-leche);
  font-weight: 700;
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--cafe-profundo);
  line-height: 1.1;
  margin-bottom: .75rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--cafe-leche);
  display: block;
}
.lead {
  color: var(--cafe-medio);
  font-size: 1rem;
  max-width: 440px;
  margin: 0 auto;
}

/* === STEPS === */
.steps {
  display: flex;
  justify-content: space-between;
  margin: 1.5rem 0 2rem;
  position: relative;
  padding: 0 .5rem;
}
.steps::before {
  content: "";
  position: absolute;
  top: 1rem; left: 2rem; right: 2rem;
  height: 2px;
  background: var(--crema-oscura);
  z-index: 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  color: var(--cafe-medio);
  z-index: 1;
  text-align: center;
  flex: 1;
}
.step span {
  display: flex;
  width: 2rem; height: 2rem;
  background: var(--crema-oscura);
  color: var(--cafe-medio);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all .3s;
}
.step.active span,
.step.hecho span {
  background: var(--cafe-profundo);
  color: var(--crema);
}
.step.hecho span::after { content: "✓"; }
.step.hecho span > :first-child { display: none; }
.step.active { color: var(--cafe-profundo); font-weight: 600; }

/* === FORM === */
form { position: relative; }
.paso {
  display: none;
  background: #fff;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  animation: fadeIn .3s ease;
}
.paso.activo { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.paso h2 {
  font-family: Georgia, serif;
  color: var(--cafe-profundo);
  font-size: 1.4rem;
  margin-bottom: .4rem;
}
.hint {
  color: var(--cafe-medio);
  font-size: .9rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* === CAMPOS === */
.campo { margin-bottom: 1.25rem; }
.campo.oculto, .campo-pro.oculto { display: none; }

.campo label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--cafe-profundo);
  margin-bottom: .5rem;
}

.campo input[type="text"],
.campo input[type="email"],
.campo input[type="tel"],
.campo select,
.campo textarea {
  width: 100%;
  padding: .85rem 1rem;
  background: var(--crema);
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--cafe-oscuro);
  transition: all .2s;
  -webkit-appearance: none;
  appearance: none;
}
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--cafe-leche);
  background: #fff;
}
.campo input.error,
.campo select.error {
  border-color: var(--rojo);
  background: #fef5f4;
}

.campo select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B4423'%3E%3Cpath d='M5 8l5 5 5-5' stroke='%236B4423' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.dv {
  display: block;
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--verde);
  font-weight: 600;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) {
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
}

/* === RADIOS / CHECKS tipo pill === */
.radios, .checks {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.radios.col, .checks.col {
  flex-direction: column;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem;
  background: var(--crema);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  font-size: .9rem;
  user-select: none;
}
.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pill:hover { background: var(--crema-oscura); }
.pill:has(input:checked) {
  background: var(--cafe-profundo);
  color: var(--crema);
  border-color: var(--cafe-leche);
}
.radios.col .pill, .checks.col .pill {
  width: 100%;
}

/* === GRUPOS DE PRODUCTOS === */
.grupo-productos {
  margin-top: 1rem;
  margin-bottom: .25rem;
}
.grupo-titulo {
  font-size: .7rem;
  font-weight: 700;
  color: var(--cafe-leche);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: .4rem;
  padding-left: .2rem;
  border-bottom: 1px solid var(--crema-oscura);
  padding-bottom: .3rem;
}
.pill small {
  display: inline-block;
  font-size: .65rem;
  color: var(--cafe-medio);
  opacity: .75;
  margin-left: .25rem;
  font-weight: 400;
}
.pill:has(input:checked) small {
  color: var(--cafe-leche);
  opacity: 1;
}

/* === AUTORIZACIONES === */
.legal {
  background: var(--crema-oscura);
  padding: 1rem;
  border-radius: 8px;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--cafe-medio);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--cafe-leche);
}
.legal strong { color: var(--cafe-profundo); }
.legal a { color: var(--verde); font-weight: 600; }

.autoriza {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  background: #fff;
  border: 2px solid var(--crema-oscura);
  border-radius: 8px;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all .2s;
  font-size: .9rem;
  line-height: 1.5;
}
.autoriza:hover { border-color: var(--cafe-leche); }
.autoriza input {
  width: 20px; height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--cafe-profundo);
}
.autoriza.obligatoria::after {
  content: "obligatorio";
  position: absolute;
  background: var(--rojo);
  color: white;
  font-size: .65rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: -4rem;
  margin-top: -8px;
  display: none;
}

.politica-link {
  text-align: center;
  margin: 1.5rem 0;
}
.politica-link a {
  color: var(--verde);
  font-size: .85rem;
  text-decoration: none;
  font-weight: 600;
}
.politica-link a:hover { text-decoration: underline; }

/* === BOTONES === */
.acciones {
  display: flex;
  gap: .75rem;
  margin-top: 2rem;
}
.btn-primario, .btn-secundario {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.btn-primario {
  background: var(--cafe-profundo);
  color: var(--crema);
}
.btn-primario:hover, .btn-primario:focus {
  background: var(--cafe-oscuro);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74,44,20,0.3);
}
.btn-primario:disabled {
  background: var(--cafe-medio);
  cursor: wait;
  opacity: .6;
}
.btn-secundario {
  background: transparent;
  color: var(--cafe-medio);
  border: 2px solid var(--crema-oscura);
}
.btn-secundario:hover { border-color: var(--cafe-medio); color: var(--cafe-profundo); }

/* === EXITO === */
.paso.exito { text-align: center; }
.check-ok {
  width: 80px; height: 80px;
  background: var(--verde);
  color: white;
  border-radius: 50%;
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: pop .5s ease;
}
@keyframes pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.pequeno { font-size: .85rem; color: var(--cafe-medio); margin-top: 1rem; }

/* === PIE === */
.pie {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem 0;
  color: var(--cafe-medio);
  font-size: .8rem;
}
.pie small { opacity: .7; display: block; margin-top: .3rem; }

/* === ERROR INLINE === */
.error-msg {
  color: var(--rojo);
  font-size: .8rem;
  margin-top: .4rem;
  font-weight: 600;
}
