/* Lead form: the single conversion point on the site. */
.contact-form { display: grid; gap: 24px; padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(180deg, #ffffff07, #ffffff02), var(--panel); box-shadow: var(--shadow); }
.contact-form__interests { margin: 0; padding: 0; border: 0; }
.contact-form__interests legend { margin-bottom: 12px; color: var(--text); font-weight: 650; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); font-size: .88rem; font-weight: 550; transition: all .18s; }
.chip:hover span { border-color: #ffffff40; color: var(--text); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.chip input:checked + span::before { content: "✓"; color: var(--accent); font-weight: 800; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.contact-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field__label { color: var(--text-2); font-size: .82rem; font-weight: 600; }
.field__label em { color: var(--muted); font-style: normal; font-weight: 400; }
.field input, .field select, .field textarea {
    width: 100%; min-height: 48px; padding: 12px 14px;
    border: 1px solid var(--line-2); border-radius: var(--radius-sm);
    background: var(--bg); color: var(--text); color-scheme: dark;
    transition: border-color .18s, box-shadow .18s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: #5d6774; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.is-invalid input { border-color: var(--red); box-shadow: 0 0 0 4px #ff5d5d22; }

.contact-form__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.contact-form__fine { color: var(--muted); font-size: .85rem; max-width: 34ch; }
.contact-form__status:empty { display: none; }
.contact-form__status { color: var(--red); font-size: .9rem; }
.form-flash { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .92rem; }
.form-flash--success { background: #3ddc841a; color: var(--green); }
.form-flash--error { background: #ff5d5d1a; color: var(--red); }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.btn.is-loading [data-submit-label]::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.contact-success { display: grid; justify-items: start; gap: 14px; padding: clamp(28px, 4vw, 44px); border: 1px solid #3ddc8455; border-radius: var(--radius); background: radial-gradient(500px 200px at 0 0, #3ddc841a, transparent), var(--panel); }
.contact-success[hidden] { display: none; }
.contact-success__icon { width: 52px; height: 52px; color: var(--green); }
.contact-success h3 { font-size: 1.6rem; }
.contact-success p { color: var(--text-2); max-width: 46ch; }

@media (max-width: 640px) { .contact-form__grid { grid-template-columns: 1fr; } }

/* Contact section layout (home + contact page) */
.section--contact { background: radial-gradient(900px 500px at 0% 100%, #ff6a1a1f, transparent 70%), var(--bg); border-top: 1px solid var(--line); }
.contact-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact-layout__copy { position: sticky; top: calc(var(--header-h) + 32px); }
.contact-layout__copy .lead { margin-top: 20px; }
.next-steps { display: grid; gap: 20px; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: next; }
.next-steps li { position: relative; padding-left: 52px; color: var(--text-2); counter-increment: next; }
.next-steps li::before { content: counter(next); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); font-weight: 700; }
.next-steps strong { display: block; color: var(--text); }
@media (max-width: 960px) { .contact-layout { grid-template-columns: 1fr; } .contact-layout__copy { position: static; } }

.contact-page { padding-top: calc(var(--header-h) + clamp(48px, 7vw, 96px)); border-top: 0; min-height: 100vh; }
.contact-page h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.contact-page__alt { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.contact-page__alt a { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent); }
