/*
 * The inquiry page since the pivot of 2026-11-24 (Tell Us What You Need): a short hero, then the form in a
 * raised panel, a step in tone from the page. Fields are 52 px tall with 16 px text, so phones never zoom;
 * labels sit above, help text between the label and the field, and problems under the field in words and
 * an icon, never colour alone. Spec: Design/pivot-2026-11-24/DESIGN.md, section 11.
 */

/* ---------- The page: a narrow column under a short hero ---------- */

.inquiry-page-width {
    max-width: calc(760px + 2 * var(--page-gutter));
}

.inquiry-hero {
    padding-top: calc(var(--header-height) + var(--space-8));
    padding-bottom: var(--space-7);
}

.inquiry-hero-inner {
    display: grid;
    gap: var(--space-4);
}

.inquiry-hero-title {
    font-size: var(--text-heading-2);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.inquiry-hero-lead {
    max-width: var(--measure);
    color: var(--color-text-muted);
    font-size: var(--text-lead);
    line-height: 1.55;
}

.inquiry-section {
    padding-top: 0;
}

.inquiry-panel {
    padding: var(--space-7);
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-large);
    background: var(--color-raised);
}

@media (max-width: 767px) {
    .inquiry-panel {
        padding: var(--space-5);
    }
}

/* ---------- The form's grid: short fields in pairs from 768 px ---------- */

.inquiry-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5) var(--space-5);
}

.form-field-wide,
.form-actions,
.form-privacy-note,
.form-consent,
.form-send-error {
    grid-column: 1 / -1;
}

@media (max-width: 767px) {
    .inquiry-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Fields ---------- */

.form-field {
    display: grid;
    gap: var(--space-2);
    align-content: start;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.form-field label,
.form-field legend {
    padding: 0;
    color: var(--color-text);
    font-size: var(--text-small);
    font-weight: 600;
}

.form-field-help {
    color: var(--color-text-muted);
    font-size: var(--text-small);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 52px;
    padding: 0 var(--space-4);
    border: 1px solid var(--color-field-edge);
    border-radius: var(--radius-small);
    background: var(--color-ink);
    color: var(--color-text);
    font-size: 1rem;
    transition: border-color var(--duration-quick) var(--ease-out);
}

.form-field textarea {
    min-height: 160px;
    padding: var(--space-3) var(--space-4);
    line-height: 1.5;
    resize: vertical;
}

/* A drawn chevron on the native select */
.form-field select {
    appearance: none;
    padding-right: var(--space-7);
    background: var(--color-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B6B0C8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 16px center / 18px no-repeat;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--color-text-faint);
    opacity: 1;
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
    border-color: var(--color-field-edge-hover);
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
    border-color: var(--color-focus);
}

/* Problems: a red edge, and the message under the field with an exclamation mark */
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
    border-color: var(--color-error);
}

.form-field-error {
    color: var(--color-error);
    font-size: var(--text-small);
}

.form-field-error:empty {
    display: none;
}

.form-field-error:not(:empty)::before {
    content: "!";
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    margin-right: var(--space-2);
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    vertical-align: 1px;
}

/* ---------- Choice chips: the number of locations ---------- */

.choice-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.choice-chip {
    position: relative;
    display: inline-flex;
}

.choice-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.choice-chip span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--space-4);
    border: 1px solid var(--color-field-edge);
    border-radius: var(--radius-pill);
    background: var(--color-ink);
    color: var(--color-text-muted);
    font-size: var(--text-small);
    font-weight: 500;
}

.choice-chip input:hover + span {
    border-color: var(--color-field-edge-hover);
    color: var(--color-text);
}

.choice-chip input:checked + span {
    border-color: var(--color-text);
    background: var(--color-text);
    color: var(--color-ink);
}

.choice-chip input:focus-visible + span {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
}

.form-field.has-error .choice-chip span {
    border-color: var(--color-error);
}

/* ---------- A field only robots fill in: out of sight and out of the tab order for people ---------- */

.form-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Privacy, the button and the consent line ---------- */

.form-privacy-note {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    color: var(--color-text-muted);
    font-size: var(--text-small);
}

.form-privacy-note svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 3px;
}

.form-actions .button {
    min-width: 220px;
}

.form-consent {
    color: var(--color-text-faint);
    font-size: var(--text-small);
}

.form-consent a {
    color: var(--color-text-muted);
}

.form-send-error {
    color: var(--color-error);
}

@media (max-width: 767px) {
    .form-actions .button {
        width: 100%;
    }
}

/* ---------- Sending: the button keeps its width and shows three small dots ---------- */

.button.is-busy {
    cursor: progress;
}

.button.is-busy::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-left: 14px;
    background: currentColor;
    box-shadow: 8px 0 0 currentColor, 16px 0 0 currentColor;
    animation: sending-dots 1.2s steps(3, end) infinite;
}

@keyframes sending-dots {
    0% {
        box-shadow: 8px 0 0 transparent, 16px 0 0 transparent;
    }

    33% {
        box-shadow: 8px 0 0 currentColor, 16px 0 0 transparent;
    }

    66%,
    100% {
        box-shadow: 8px 0 0 currentColor, 16px 0 0 currentColor;
    }
}

@media (prefers-reduced-motion: reduce) {
    .button.is-busy::after {
        animation: none;
    }
}

/* ---------- The confirmation, in place of the form ---------- */

.form-confirmation {
    display: grid;
    gap: var(--space-4);
}

.form-confirmation:focus {
    outline: none;
}

.form-confirmation-title {
    font-size: var(--text-heading-3);
    line-height: 1.25;
}

.form-confirmation p {
    max-width: var(--measure);
    color: var(--color-text-muted);
}

.form-confirmation a {
    justify-self: start;
    margin-top: var(--space-3);
}
