/* ---------------------------------------------------------------------------
   The two form pages: pitch.html and media-partners.html.

   Loaded by those pages only, after style.css, whose tokens it uses. The
   vocabulary is the site's: black band, amber bar, flat surfaces, the blue
   action button. Nothing here is rounded except the checkbox tick.
   --------------------------------------------------------------------------- */

.form-head {
    padding: calc(var(--header-h) + 72px) 15% 64px;
    background-color: var(--chrome);
    color: var(--ink-on-dark-dim);
}

.form-head h1 {
    max-width: 18ch;
    margin: 0 0 20px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.05;
    text-wrap: balance;
}

.form-head .underline {
    margin-bottom: 24px;
}

.form-head p {
    max-width: 62ch;
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
}

.form-back {
    display: inline-block;
    margin-bottom: 28px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.form-back:hover,
.form-back:focus-visible {
    text-decoration: underline;
}

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
    width: 70%;
    padding: 72px 15% 96px;
}

/* The form itself */
.form-field {
    margin-bottom: 28px;
}

.form-field label,
.form-fieldset legend {
    display: block;
    margin-bottom: 8px;
    color: var(--ink-strong);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-hint {
    margin: 0 0 10px;
    color: var(--ink-muted);
    font-size: 14px;
    line-height: 1.5;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="url"],
.form-field textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border-control);
    border-radius: 0;
    background-color: var(--surface);
    color: var(--ink-strong);
    font-family: "Roboto";
    font-size: 16px;
    line-height: 1.4;
}

.form-field textarea {
    min-height: 180px;
    resize: vertical;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
    outline: none;
    border-color: var(--ink-strong);
    box-shadow: var(--focusShadow);
}

.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
    border-color: var(--error);
}

.form-error {
    display: none;
    margin-top: 8px;
    color: var(--error);
    font-size: 14px;
    font-weight: 700;
}

.form-error.show {
    display: block;
}

.form-fieldset {
    margin: 0 0 28px;
    padding: 0;
    border: 0;
}

.form-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.form-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--border-control);
    background-color: var(--surface);
    color: var(--ink-strong);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease-in, border-color 0.15s ease-in;
}

.form-option input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--action);
}

.form-option:hover {
    border-color: var(--ink-strong);
}

.form-option:has(input:checked) {
    border-color: var(--ink-strong);
    background-color: var(--surface-selected);
}

.form-option:has(input:focus-visible) {
    box-shadow: var(--focusShadow);
}

/* A field for bots only: off-screen, never focusable, never announced. */
.form-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 220px;
    height: 52px;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.form-submit[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.form-footnote {
    margin: 16px 0 0;
    color: var(--ink-muted);
    font-size: 14px;
    line-height: 1.5;
}

.form-footnote a,
.form-result a {
    color: var(--action);
    font-weight: 700;
}

.form-footnote a:hover,
.form-footnote a:focus-visible,
.form-result a:hover,
.form-result a:focus-visible {
    color: var(--action-hover);
    text-decoration: underline;
}

/* Result panels, shown by js/forms.js in place of the form */
.form-result {
    display: none;
    padding: 40px;
    border-left: 10px solid var(--accent);
    background-color: var(--surface-selected);
}

.form-result.show {
    display: block;
}

.form-result h2 {
    margin: 0 0 12px;
    color: var(--ink-strong);
    font-size: 26px;
}

.form-result p {
    max-width: 52ch;
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.55;
}

.form-result.is-error {
    border-left-color: var(--error);
}

/* The column beside the form */
.form-aside {
    padding: 36px 32px;
    background-color: var(--chrome);
    color: var(--ink-on-dark-dim);
}

.form-aside h2 {
    margin: 0 0 20px;
    color: var(--surface);
    font-size: 20px;
}

.form-steps {
    display: grid;
    gap: 20px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.form-steps li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    font-size: 15px;
    line-height: 1.5;
}

.form-steps strong {
    display: block;
    color: var(--surface);
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.form-steps .home-num {
    background-color: var(--accent);
    color: var(--chrome);
    min-width: 16px;
}

.form-aside-mail {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 15px;
    line-height: 1.5;
}

.form-aside-mail a {
    color: var(--surface);
    font-weight: 700;
}

.form-aside-mail a:hover,
.form-aside-mail a:focus-visible {
    color: var(--accent);
}

@media (max-width: 1024px) {
    .form-head {
        padding-left: 5%;
        padding-right: 5%;
    }

    .form-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
        width: 90%;
        padding-left: 5%;
        padding-right: 5%;
    }
}

@media (max-width: 768px) {
    .form-head {
        padding-top: calc(var(--header-h) + 48px);
        padding-bottom: 48px;
    }

    .form-layout {
        padding-top: 48px;
        padding-bottom: 64px;
    }

    .form-options {
        flex-direction: column;
        align-items: stretch;
    }

    .form-submit {
        width: 100%;
    }

    .form-result,
    .form-aside {
        padding: 28px 20px;
    }
}
