/* ==========================================================================
   Lead forms. Theme-aware via the section tokens (works on light and dark).
   ========================================================================== */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: clamp(24px, 3.4vw, 44px); box-shadow: var(--shadow); position: relative; }
.form-card h3 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 6px; }
.form-card > .tool-hint, .form-intro { color: var(--ink-3); font-size: 15px; margin-bottom: 22px; }
.lead-form { display: grid; gap: 16px; }
.lead-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lead-form .row-3 { grid-template-columns: 2fr 1fr 1fr; }
.lead-form .field { display: grid; gap: 6px; margin: 0; }
.lead-form label.lbl, .lead-form legend { font: 700 12px/1.2 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--warm); padding: 0; }
.lead-form .opt { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.lead-form input[type="text"], .lead-form input[type="email"], .lead-form input[type="tel"], .lead-form select, .lead-form textarea {
  width: 100%; font: 400 16px/1.4 var(--font-body); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
  background: color-mix(in srgb, var(--ink) 4%, var(--surface)); transition: border-color .2s, box-shadow .2s, background .2s; appearance: none; -webkit-appearance: none;
}
.lead-form select { 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 d='M1 1l5 5 5-5' fill='none' stroke='%23B8893B' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.lead-form textarea { resize: vertical; min-height: 96px; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus { outline: none; border-color: var(--warm-fill); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warm-fill) 20%, transparent); background: var(--surface); }
.lead-form [aria-invalid="true"] { border-color: var(--clay-400) !important; }
.field-err { margin: 0; font-size: 13px; font-weight: 600; color: var(--clay-400); min-height: 0; }
.field-err:empty { display: none; }
.lead-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }

/* choice cards (radio) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.choice span { display: grid; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: color-mix(in srgb, var(--ink) 3%, var(--surface)); transition: border-color .2s, background .2s, transform .2s; cursor: pointer; }
.choice span b { font: 600 17px/1.2 var(--font-display); color: var(--ink); }
.choice span small { font-size: 13px; color: var(--ink-3); line-height: 1.35; }
.choice input:checked + span { border-color: var(--warm-fill); background: color-mix(in srgb, var(--warm-fill) 12%, var(--surface)); }
.choice input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--warm-fill) 25%, transparent); }
.choice:hover span { transform: translateY(-1px); }

/* pill checkboxes (multi) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-block; font: 600 14px/1 var(--font-body); padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); transition: all .2s; cursor: pointer; }
.pill input:checked + span { background: var(--warm-fill); border-color: var(--warm-fill); color: #fff; }
.pill input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--warm-fill) 25%, transparent); }

/* consent */
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 13px; line-height: 1.5; color: var(--ink-3); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--warm-fill); }
.form-fine { font-size: 12.5px; color: var(--ink-3); margin: 0; }
.form-fine a { color: inherit; }

/* honeypot: off-screen, not display:none (some bots skip hidden fields) */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* submit + states */
.lead-form .btn[data-submit] { justify-self: start; min-width: 200px; }
.lead-form .btn[data-submit][disabled] { opacity: .7; pointer-events: none; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: none; }
.is-sending .btn .spin { display: inline-block; }
.form-status { font-size: 14.5px; font-weight: 600; margin: 0; }
.form-status:empty { display: none; }
.form-status.err { color: var(--clay-400); }
.form-done, .form-fallback { text-align: left; animation: pane-in .5s cubic-bezier(.2,.7,.2,1); }
.form-done .check { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--warm-fill); color: #fff; margin-bottom: 16px; }
.form-done .check svg { width: 28px; height: 28px; }
.form-done h3, .form-fallback h3 { margin-bottom: 8px; }
.form-fallback { border: 1px dashed var(--warm-fill); border-radius: 16px; padding: 18px; background: color-mix(in srgb, var(--warm-fill) 7%, var(--surface)); }
.form-fallback p { margin: 0 0 14px; }

/* page layouts with forms */
.form-split { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.form-split .sticky-col { position: sticky; top: 110px; }
@media (max-width: 960px) {
  .form-split { grid-template-columns: 1fr; }
  .form-split .sticky-col { position: static; }
}
@media (max-width: 620px) {
  .lead-form .row, .lead-form .row-3 { grid-template-columns: 1fr; }
  .lead-form .btn[data-submit] { width: 100%; justify-self: stretch; }
}
