/* ============================================================
   form.css — Sistema de formularios Digital by Kmi
   Estilo Typeform: una pregunta por pantalla, centrado, limpio.
   ============================================================ */

/* ── Variables ───────────────────────────────────────────── */
:root {
  --f-crema:    #f7efe9;
  --f-borde:    #edddd3;
  --f-rosa:     #dd7786;
  --f-oscuro:   #2a2520;
  --f-gris:     #5a524a;
  --f-gris-lt:  #9a9086;
  --f-white:    #fff;
  --f-radius:   16px;
  --f-radius-sm:10px;
}

*, *::before, *::after { box-sizing: border-box; }

/* ── Wrapper general ─────────────────────────────────────── */
.dbk-form-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--f-crema);
  padding: 2rem 1rem;
}

/* ── Pantallas (intro / form / success / error) ──────────── */
.dbk-screen {
  width: 100%;
  max-width: 560px;
  background: var(--f-white);
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
  overflow: hidden;
}

.dbk-screen__body {
  padding: 3rem 2.5rem;
  text-align: center;
}

/* ── Pantalla inicial ────────────────────────────────────── */
.dbk-intro__emoji {
  font-size: 2.5rem;
  margin: 0 0 .5rem;
}
.dbk-intro__title {
  font-family: 'Now', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--f-oscuro);
  margin: 0 0 .75rem;
  line-height: 1.2;
}
.dbk-intro__sub {
  font-size: .95rem;
  color: var(--f-gris);
  line-height: 1.65;
  margin: 0 0 2rem;
}

/* ── Progreso ────────────────────────────────────────────── */
.dbk-progress {
  padding: 1.2rem 2rem .5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--f-borde);
}
.dbk-progress__bar {
  flex: 1;
  height: 4px;
  background: var(--f-borde);
  border-radius: 2px;
  overflow: hidden;
}
.dbk-progress__fill {
  height: 100%;
  background: var(--f-rosa);
  border-radius: 2px;
  transition: width .35s ease;
}
.dbk-progress__label {
  font-size: .75rem;
  color: var(--f-gris-lt);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Pasos ───────────────────────────────────────────────── */
.dbk-step {
  padding: 2rem 2.5rem 2.5rem;
  animation: fadeSlide .25s ease both;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dbk-step__label {
  display: block;
  font-family: 'Now', sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 700;
  color: var(--f-oscuro);
  line-height: 1.3;
  margin-bottom: .6rem;
}
.dbk-required {
  color: var(--f-rosa);
  margin-left: .2rem;
}

.dbk-step__ayuda {
  font-size: .83rem;
  color: var(--f-gris-lt);
  line-height: 1.55;
  margin: 0 0 .8rem;
}

/* ── Inputs ──────────────────────────────────────────────── */
.dbk-input {
  display: block;
  width: 100%;
  padding: .9rem 1.1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--f-oscuro);
  background: var(--f-white);
  border: 2px solid var(--f-borde);
  border-radius: var(--f-radius-sm);
  outline: none;
  transition: border-color .2s;
  resize: vertical;
}
.dbk-input:focus {
  border-color: var(--f-rosa);
}
.dbk-input.is-invalid {
  border-color: #e05555;
}

/* ── Checkboxes ──────────────────────────────────────────── */
.dbk-checkgroup {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.dbk-check {
  display: flex;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
  padding: .75rem 1rem;
  border: 2px solid var(--f-borde);
  border-radius: var(--f-radius-sm);
  transition: border-color .2s, background .2s;
}
.dbk-check:hover {
  border-color: var(--f-rosa);
  background: #fdf5f5;
}
.dbk-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--f-rosa);
  flex-shrink: 0;
}
.dbk-check span {
  font-size: .92rem;
  color: var(--f-oscuro);
}
.dbk-check--legal {
  margin-top: .5rem;
  border-color: transparent;
  padding: .4rem 0;
}
.dbk-check--legal:hover {
  background: transparent;
  border-color: transparent;
}

/* ── Mensajes de error ───────────────────────────────────── */
.dbk-field-error {
  font-size: .82rem;
  color: #e05555;
  margin: .4rem 0 0;
  min-height: 1.2em;
}

/* ── Texto legal ─────────────────────────────────────────── */
.dbk-legal {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--f-borde);
}
.dbk-legal p {
  font-size: .82rem;
  color: var(--f-gris-lt);
  line-height: 1.55;
  margin: 0 0 .6rem;
}
.dbk-legal a {
  color: var(--f-rosa);
  text-decoration: underline;
}

/* ── Turnstile ───────────────────────────────────────────── */
.cf-turnstile {
  margin: 1rem 0;
}

/* ── Navegación entre pasos ──────────────────────────────── */
.dbk-step__nav {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ── Botones ─────────────────────────────────────────────── */
.dbk-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: 'Now', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .03em;
  padding: .85rem 1.8rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.dbk-btn--primary {
  background: var(--f-rosa);
  color: var(--f-white);
}
.dbk-btn--primary:hover {
  background: #c95f6e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(221,119,134,.35);
}
.dbk-btn--primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.dbk-btn--ghost {
  background: transparent;
  color: var(--f-gris);
  border: 2px solid var(--f-borde);
}
.dbk-btn--ghost:hover {
  border-color: var(--f-gris);
}

/* ── Pantalla final / error ──────────────────────────────── */
.dbk-screen__body--success { text-align: center; }
.dbk-success__emoji  { font-size: 3rem; margin: 0 0 .5rem; }
.dbk-success__title  { font-family:'Now',sans-serif; font-size:1.8rem; font-weight:800; color:var(--f-oscuro); margin:0 0 .75rem; }
.dbk-success__text   { font-size:.95rem; color:var(--f-gris); margin:0 0 .5rem; }
.dbk-success__cierre { font-size:1rem; margin:.5rem 0 0; }

/* ── Accesibilidad ───────────────────────────────────────── */
.sr-only {
  position:absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .dbk-screen__body,
  .dbk-step { padding: 1.5rem 1.25rem; }
  .dbk-progress { padding: 1rem 1.25rem .4rem; }
  .dbk-step__nav { flex-direction: column; }
  .dbk-btn { width: 100%; justify-content: center; }
}