/* IBARA Studio — formulario de consulta (#consulta). Usa las variables y el lenguaje del sitio (site.css). */
.sec--consulta { background: var(--paper-3); }
.sec--consulta .lead { margin-bottom: clamp(40px, 5vw, 72px); }

.ibf { max-width: 920px; margin: 0; }
.ibf *, .ibf *::before, .ibf *::after { box-sizing: border-box; }

.ibf__set { border: 0; margin: 0 0 clamp(40px, 5vw, 64px); padding: 0; min-width: 0; }
.ibf__set legend {
  display: flex; align-items: baseline; gap: 18px; width: 100%; float: left;
  padding: 0 0 16px; margin: 0 0 30px; border-bottom: 1px solid color-mix(in srgb, var(--olive) 28%, transparent);
  font-weight: 300; font-size: clamp(1.1rem, 1.6vw, 1.35rem); letter-spacing: .02em; color: var(--olive);
}
.ibf__set legend + * { clear: both; }
.ibf__set legend span { font-size: .68rem; letter-spacing: .3em; font-weight: 300; color: var(--earth); }

.ibf__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.ibf__field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ibf__field--full { grid-column: 1 / -1; }

.ibf label, .ibf__glabel { font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 400; color: var(--olive); margin: 0; }

.ibf input[type=text], .ibf input[type=email], .ibf input[type=tel], .ibf input[type=number], .ibf select, .ibf textarea {
  width: 100%; font: inherit; font-size: 1rem; font-weight: 300; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--olive) 35%, transparent);
  border-radius: 0; padding: 11px 2px; outline: none; transition: border-color .25s;
  -webkit-appearance: none; appearance: none;
}
.ibf input[type=number] { -moz-appearance: textfield; }
.ibf input[type=number]::-webkit-outer-spin-button, .ibf input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ibf ::placeholder { color: color-mix(in srgb, var(--ink) 40%, transparent); opacity: 1; font-weight: 300; }
.ibf select {
  padding-right: 28px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--olive) 50%), linear-gradient(135deg, var(--olive) 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
.ibf select option { color: var(--ink); background: var(--ivory); }
.ibf textarea { resize: vertical; min-height: 130px; border: 1px solid color-mix(in srgb, var(--olive) 35%, transparent); padding: 14px; line-height: 1.6; }
.ibf input:focus, .ibf select:focus, .ibf textarea:focus { border-color: var(--earth); }
.ibf input:focus-visible, .ibf select:focus-visible, .ibf textarea:focus-visible { outline: 2px solid var(--earth); outline-offset: 3px; }
.ibf .is-invalid { border-color: #a3261a !important; }

.ibf__group { margin-top: 34px; }
.ibf__group .ibf__glabel { margin-bottom: 14px; }
.ibf__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ibf .ibf__chip { position: relative; cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; font-size: inherit; }
.ibf__chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ibf__chip span {
  display: inline-block; padding: 10px 18px; font-size: .9rem; font-weight: 300; line-height: 1.2; color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--olive) 35%, transparent); transition: background .25s, color .25s, border-color .25s;
}
.ibf__chip:hover span { border-color: var(--olive); }
.ibf__chip input:checked + span { background: var(--olive); border-color: var(--olive); color: var(--ivory); }
.ibf__chip input:focus-visible + span { outline: 2px solid var(--earth); outline-offset: 2px; }

.ibf__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ibf .ibf__check { display: flex; gap: 14px; align-items: flex-start; font-size: .9rem; font-weight: 300; line-height: 1.55; letter-spacing: 0; text-transform: none; color: var(--ink-soft); cursor: pointer; }
.ibf__check input { margin: 4px 0 0; accent-color: var(--olive); flex: none; width: 16px; height: 16px; }

.ibf__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 24px; margin-top: 36px; }
.ibf__btn {
  font: inherit; font-size: .72rem; font-weight: 400; letter-spacing: .28em; text-transform: uppercase;
  background: var(--olive); color: var(--ivory); border: 0; padding: 18px 34px; cursor: pointer; transition: background .3s;
}
.ibf__btn:hover { background: var(--earth); }
.ibf__btn:focus-visible { outline: 2px solid var(--earth); outline-offset: 3px; }
.ibf__btn[disabled] { opacity: .55; cursor: wait; }
.ibf__status { margin: 0; font-size: .95rem; font-weight: 300; line-height: 1.5; }
.ibf__status.ok { color: var(--olive); }
.ibf__status.err { color: #a3261a; }

@media (max-width: 640px) {
  .ibf__grid { grid-template-columns: 1fr; gap: 24px; }
  .ibf__btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ibf * { transition: none !important; } }
