/* Home "Newsletter" bar (template-parts/home/newsletter.php). Fonts: home-hero.css. */

.amn-section {
    --amn-navy: #092555;
    --amn-blue: #0068f0;
    --amn-button: #0340fb;
    --amn-icon: #098bff;
    --amn-muted: #5f75a1;
    padding: clamp(24px, 2vw, 36px) 0;
    background: #ecf4fe;
    color: var(--amn-navy);
}

.amn-inner {
    width: min(100% - 64px, 1510px);
    margin-inline: auto;
}

.amn-card {
    display: grid;
    grid-template-areas: "icon copy form";
    grid-template-columns: auto minmax(0, 1fr) minmax(380px, 610px);
    align-items: center;
    gap: clamp(16px, 1.6vw, 30px) clamp(18px, 2vw, 40px);
    padding: clamp(18px, 1.4vw, 26px) clamp(18px, 1.6vw, 30px);
    border: 1px solid #e3edf9;
    border-radius: 14px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 30px rgba(2, 26, 98, .05);
}

.amn-icon {
    display: grid;
    grid-area: icon;
    width: clamp(48px, 3.3vw, 64px);
    height: clamp(48px, 3.3vw, 64px);
    place-items: center;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(2, 26, 98, .08);
    color: var(--amn-icon);
}

.amn-icon svg {
    width: 58%;
    height: 58%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.amn-copy {
    grid-area: copy;
    min-width: 0;
}

.amn-eyebrow {
    margin: 0;
    padding: 0;
    color: var(--amn-blue);
    font-family: inherit;
    font-size: clamp(13px, .86vw, 16px);
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.35;
    text-transform: uppercase;
}

.amn-text {
    margin: 8px 0 0;
    color: var(--amn-navy);
    font-size: clamp(15px, .98vw, 18px);
    line-height: 1.45;
}

/* Form. The field and button selectors start with the section id: genesis-child/style.css styles every input with
   input:not([type="button"]):not([type="submit"]):not(…) — four attribute selectors, more than a few classes. */
.amn-form {
    grid-area: form;
    min-width: 0;
    margin: 0;
}

.amn-field {
    display: flex;
}

#newsletter .amn-input {
    min-width: 0;
    height: clamp(50px, 3.1vw, 60px);
    flex: 1 1 auto;
    box-sizing: border-box;
    margin: 0;
    padding: 0 22px;
    border: 1px solid #dbe6f5;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: #fff;
    color: var(--amn-navy);
    font-family: inherit;
    font-size: clamp(15px, .98vw, 18px);
}

#newsletter .amn-input::placeholder {
    color: var(--amn-muted);
    opacity: 1;
}

#newsletter .amn-input:focus {
    border-color: var(--amn-button);
    outline: 2px solid rgba(3, 64, 251, .25);
    outline-offset: 0;
}

#newsletter .amn-button {
    height: clamp(50px, 3.1vw, 60px);
    flex: 0 0 auto;
    margin: 0;
    padding: 0 clamp(22px, 2vw, 40px);
    border: 0;
    border-radius: 10px;
    background: var(--amn-button);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(15px, 1vw, 18px);
    font-weight: 700;
    line-height: 1;
    transition: background-color .2s ease;
}

#newsletter .amn-button:hover,
#newsletter .amn-button:focus-visible {
    background: #0233c9;
}

#newsletter .amn-button:focus-visible {
    outline: 3px solid var(--amn-navy);
    outline-offset: 2px;
}

#newsletter .amn-form.is-busy .amn-button {
    cursor: progress;
    opacity: .75;
}

.amn-consent {
    margin: 8px 0 0;
    color: var(--amn-muted);
    font-size: 12px;
    line-height: 1.45;
}

.amn-consent a {
    color: var(--amn-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.amn-consent a:hover,
.amn-consent a:focus-visible {
    color: var(--amn-button);
}

.amn-message {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.amn-message:empty {
    display: none;
}

.amn-message.is-success {
    color: #0a7a45;
}

.amn-message.is-error {
    color: #c0123c;
}

@media (prefers-reduced-motion: reduce) {
    #newsletter .amn-button {
        transition: none;
    }
}

/* The form under the texts. */
@media (max-width: 1180px) {
    .amn-card {
        grid-template-areas:
            "icon copy"
            "form form";
        grid-template-columns: auto minmax(0, 1fr);
    }

    .amn-form {
        max-width: 640px;
    }
}

@media (max-width: 780px) {
    .amn-inner {
        width: min(100% - 36px, 660px);
    }
}

/* Phones: the button under the field. */
@media (max-width: 560px) {
    .amn-card {
        grid-template-areas:
            "icon"
            "copy"
            "form";
        grid-template-columns: minmax(0, 1fr);
    }

    .amn-field {
        flex-direction: column;
        gap: 10px;
    }

    #newsletter .amn-input {
        border-right: 1px solid #dbe6f5;
        border-radius: 10px;
    }

    #newsletter .amn-button {
        width: 100%;
    }
}
