/* ============================================================================
   TIERRA — Estilos de los formularios de captura (.tierra-form)
   Pensados para fondos oscuros de la marca. Mobile-first.
   ========================================================================== */
.tierra-form {
  --tf-gold: var(--gold, #C9A96E);
  --tf-cream: var(--cream, #F2EEE4);
  --tf-fh: var(--fh, 'Cormorant Garamond', Georgia, serif);
  --tf-fb: var(--fb, 'DM Sans', sans-serif);
  display: block;
  width: 100%;
  max-width: 460px;
  margin: 22px auto 0;
  text-align: left;
}
.tierra-form .tf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) {
  .tierra-form .tf-row { grid-template-columns: 1fr; }
}

.tierra-form input,
.tierra-form select,
.tierra-form textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--tf-fb);
  font-size: 16px; /* 16px evita zoom automático en iOS */
  font-weight: 300;
  color: var(--tf-cream);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(201, 169, 110, .28);
  border-radius: 12px;
  padding: 15px 16px;
  margin-top: 10px;
  min-height: 52px; /* touch target cómodo */
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
  -webkit-appearance: none;
  appearance: none;
}
.tierra-form .tf-row input { margin-top: 0; }
.tierra-form input::placeholder,
.tierra-form textarea::placeholder { color: rgba(242, 238, 228, .42); }

.tierra-form input:focus,
.tierra-form select:focus,
.tierra-form textarea:focus {
  outline: none;
  border-color: var(--tf-gold);
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, .16);
}
.tierra-form .tf-err {
  border-color: #d98b7a !important;
  box-shadow: 0 0 0 3px rgba(217, 139, 122, .14) !important;
}

.tierra-form select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23C9A96E' stroke-width='1.6' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.tierra-form select option { color: #182C22; background: #F2EEE4; }
.tierra-form select:invalid { color: rgba(242, 238, 228, .42); }

.tierra-form button[type="submit"],
.tierra-form button:not([type]) {
  width: 100%;
  margin-top: 12px;
  min-height: 54px;
  font-family: var(--tf-fb);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 500;
  color: #14110c;
  background: var(--tf-gold);
  border: 1px solid var(--tf-gold);
  border-radius: 12px;
  cursor: pointer;
  transition: transform .18s ease, filter .2s ease, opacity .2s ease;
}
.tierra-form button[type="submit"]:hover,
.tierra-form button:not([type]):hover { filter: brightness(1.06); transform: translateY(-1px); }
.tierra-form button[type="submit"]:active { transform: translateY(0); }
.tierra-form button[disabled] { opacity: .6; cursor: default; transform: none; }

.tierra-form .tf-status {
  font-family: var(--tf-fb);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 12px 2px 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .3s ease, max-height .3s ease;
}
.tierra-form .tf-status.show { opacity: 1; max-height: 120px; }
.tierra-form .tf-status.tf-err { color: #e7a99a; }

/* Estado de éxito */
.tierra-form.tf-done { text-align: center; }
.tierra-form .tf-success { animation: tfIn .5s cubic-bezier(.16, 1, .3, 1) both; padding: 8px 0; }
.tierra-form .tf-success h4 {
  font-family: var(--tf-fh);
  font-weight: 400;
  font-style: italic;
  font-size: 26px;
  color: var(--tf-gold);
  margin: 14px 0 6px;
}
.tierra-form .tf-success p {
  font-family: var(--tf-fb);
  font-weight: 300;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(242, 238, 228, .72);
  max-width: 340px;
  margin: 0 auto;
}
.tierra-form .tf-check {
  width: 58px; height: 58px; margin: 0 auto;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(201, 169, 110, .12);
}
.tierra-form .tf-check svg { width: 42px; height: 42px; }
.tierra-form .tf-check circle { stroke: var(--tf-gold); stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: tfCircle .6s cubic-bezier(.65, 0, .45, 1) .1s forwards; }
.tierra-form .tf-check path { stroke: var(--tf-gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: tfCheck .35s cubic-bezier(.65, 0, .45, 1) .55s forwards; }

@keyframes tfIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tfCircle { to { stroke-dashoffset: 0; } }
@keyframes tfCheck { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .tierra-form .tf-check circle,
  .tierra-form .tf-check path { animation: none; stroke-dashoffset: 0; }
  .tierra-form .tf-success { animation: none; }
}
