/* Inline lead capture.
 *
 * Until now only index.html and pack-expo-2026.html could take an enquiry.
 * Every article ended on a link to index.html#contact, which dropped a reader
 * who had just spent eight minutes on thermoformer specs onto the homepage to
 * start again. This block lets them convert where they already are, and tags
 * the submission with the page it came from so Slack says which article
 * produced the lead.
 *
 * It renders inside the existing .article-cta panel, which is
 * background: var(--primary) with white text in both colour schemes. So the
 * controls here are deliberately light-on-blue and do NOT use the theme
 * surface tokens — those would invert underneath a background that does not.
 */

/* The CTA panel used to sit inside <article class="article-wrap">, which held
 * it to the 780px content column (716px inside the wrap's 32px padding).
 * Lifting it out to keep a site-wide component clear of the prose overlap gate
 * also freed it to span the whole viewport, so the column is restored here
 * explicitly and the panel goes on lining up with .related-guides above it.
 *
 * width + max-width rather than a media query: at 1280px this resolves to the
 * 716px cap, and on a phone to the viewport less a 2rem gutter each side.
 * The bottom margin replaces the article wrap's padding-bottom, which used to
 * separate this from the footer and now sits above the panel instead.
 */
body > .article-cta {
    box-sizing: border-box;
    width: calc(100% - 4rem);
    max-width: 716px;
    margin: 3rem auto 4rem;
}

.article-cta .inquiry-form {
    text-align: left;
    max-width: 640px;
    margin: 1.75rem auto 0;
}

/* Two across on desktop, stacked on phones. The message field always spans. */
.article-cta .inquiry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.article-cta .inquiry-grid .full {
    grid-column: 1 / -1;
}

@media (max-width: 560px) {
    .article-cta .inquiry-grid {
        grid-template-columns: 1fr;
    }
}

.article-cta .inquiry-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.95);
}

.article-cta .inquiry-form input,
.article-cta .inquiry-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.8rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    color: #1a1d21;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 6px;
}

.article-cta .inquiry-form textarea {
    resize: vertical;
    min-height: 5.5rem;
}

/* The peach is an accent colour and never body text, but it is the right
   focus ring here: it is the only brand colour with enough separation from
   both the white control and the sage-ink panel behind it. */
.article-cta .inquiry-form input:focus-visible,
.article-cta .inquiry-form textarea:focus-visible {
    outline: 3px solid var(--peach, #ffc3a1);
    outline-offset: 2px;
    border-color: transparent;
}

.article-cta .inquiry-form ::placeholder {
    color: #6b7280;
    opacity: 1;
}

.article-cta .inquiry-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.article-cta .inquiry-form button {
    padding: 0.85rem 1.75rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary, #475a75);
    background: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.article-cta .inquiry-form button:hover {
    opacity: 0.88;
}

.article-cta .inquiry-form button:focus-visible {
    outline: 3px solid var(--peach, #ffc3a1);
    outline-offset: 2px;
}

.article-cta .inquiry-form button[disabled] {
    opacity: 0.6;
    cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
    .article-cta .inquiry-form button {
        transition: none;
    }
}

.article-cta .inquiry-alt {
    margin: 0;
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.92);
}

.article-cta .inquiry-alt a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
}

.article-cta .inquiry-note {
    margin: 1rem 0 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.82);
}

/* Without this the tel: link falls back to the browser's default link blue,
   which on the sage-ink panel is both off-brand and close to unreadable. */
.article-cta .inquiry-note a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-cta .inquiry-note a:focus-visible {
    outline: 3px solid var(--peach, #ffc3a1);
    outline-offset: 2px;
}

/* Status line. Kept out of the flow until there is something to say, so a
   screen reader does not announce an empty region on load. */
.article-cta .inquiry-status {
    display: none;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    font-weight: 500;
}

.article-cta .inquiry-status.is-visible {
    display: block;
}

/* In flight. Deliberately neutral: it must not read as "sent". */
.article-cta .inquiry-status.is-pending {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.article-cta .inquiry-status.is-ok {
    background: #d4edda;
    color: #155724;
}

.article-cta .inquiry-status.is-error {
    background: #f8d7da;
    color: #721c24;
}
