/* ============================================================
   Forms component: tab switcher + two lead-capture form panels.
   Tab switching in assets/js/components/forms.js. Reuses the
   fadeUp keyframe already defined in hero.css.

   Headings below use literal clamp()s, not var(--fz-h2)/var(--fz-lead) —
   contacto.css has its own :root with different bounds than the
   shared tokens (--fz-lead is already used by 5 other components at
   different bounds) — same trap as empresa's pages, different :root.
   `rgba(20, 20, 20, 0.12)` below is this page's own --linea value,
   which is NOT the same as empresa's --linea (a solid color there) —
   another reason not to reuse a token by name across these page-local
   :root blocks.
   ============================================================ */

/* Anchor offset for the nav: cta-final's "Completar formulario" link is a
   plain #formularios hash link (not a JS smooth-scroll like the puerta
   buttons), so without this the fixed nav would cover the target on jump. */
#formularios {
    scroll-margin-top: 5rem;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit
}

.forms {
  background: var(--bg);
  padding: 0 var(--pad-x);
  position: relative;
}
.forms__wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 7.5rem 0;
}

.forms__switch {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 3.75rem;
  border-bottom: 1px solid rgba(20, 20, 20, 0.12);
}
.forms__switch button {
  position: relative;
  padding: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(20, 20, 20, 0.45);
  letter-spacing: -0.01em;
  transition: color 0.25s var(--ease);
}
.forms__switch button::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.forms__switch button.is-active {
  color: var(--black);
}
.forms__switch button.is-active::after {
  transform: scaleX(1);
}
.forms__switch button:not(.is-active):hover {
  color: var(--black);
}
@media (max-width: 560px) {
  .forms__switch {
    gap: 1.5rem;
  }
  .forms__switch button {
    font-size: 0.9375rem;
  }
}

.form-panel {
  display: none;
  animation: fadeUp 0.6s var(--ease);
}
.form-panel.is-active {
  display: block;
}
[hidden] {
  display: none !important;
}

/* Anti-spam honeypot: invisible to people, bots fill it in. Not
   display:none because some bots detect that. */
.trampa {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.75rem;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(20, 20, 20, 0.12);
  align-items: flex-end;
}
.form-head__left .kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}
.form-head__left h2 {
  font-size: clamp(1.875rem, 4vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.form-head__right p {
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  line-height: 1.45;
  max-width: 42ch;
  color: var(--black);
  opacity: 0.78;
}
.form-head__right .direct {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-top: 1.25rem;
  opacity: 0.68;
}
.form-head__right .direct a {
  color: var(--blue);
  border-bottom: 1px solid var(--blue);
}
@media (max-width: 820px) {
  .form-head {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
}
.field {
  position: relative;
  padding: 1.125rem 0 0.875rem;
  border-bottom: 1.5px solid rgba(20, 20, 20, 0.12);
  transition: border-color 0.25s var(--ease);
}
.field:hover {
  border-color: var(--black);
}
.field:focus-within {
  border-color: var(--blue);
}
.field.full {
  grid-column: 1 / -1;
}
.field label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  opacity: 1;
  margin-bottom: 0.375rem;
  font-weight: 700;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  padding: 0.375rem 0;
  font-size: 1.0625rem;
  color: var(--black);
  font-weight: 500;
  line-height: 1.5;
  resize: none;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(20, 20, 20, 0.35);
}
.field textarea {
  min-height: 6.875rem;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23141414' stroke-width='1.5' d='M1 1.5l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.125rem center;
  padding-right: 1.75rem;
  cursor: pointer;
}

.field.req label::after {
  content: ' *';
  color: var(--blue);
}

/* base.css's global focus ring left a thick green box around the field.
   Here focus is marked with the blue bottom border instead, which is
   cleaner and still visible with keyboard navigation. */
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  box-shadow: none;
}
.field:focus-within {
  border-color: var(--blue);
  border-bottom-width: 2px;
  padding-bottom: 0.78125rem;
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.form-foot .note {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.68;
  max-width: 40ch;
  line-height: 1.8;
}
.btn-send {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.25rem 2rem;
  background: var(--black);
  color: var(--green);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.btn-send:hover {
  background: var(--blue);
  transform: translateY(-0.125rem);
}
.btn-send .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--black);
  transition: transform 0.3s var(--ease);
}
.btn-send:hover .arrow {
  background: var(--green);
  transform: translateX(0.25rem);
}
.btn-send .arrow svg {
  width: 0.75rem;
  height: 0.75rem;
}
.btn-send .arrow svg path {
  stroke: var(--black);
}

@media (max-width: 560px) {
  .btn-send {
    width: 100%;
    justify-content: center;
  }
}