@font-face {
    font-family: "Newsletter Figtree";
    src: url("/css/fonts/Figtree-VariableFont_wght.woff2") format("woff2"),
        url("/fonts/Figtree-VariableFont_wght.ttf") format("truetype");
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --blue: #1F6F8B;
    --hero-blue: #1F6F8B;
    --hero-detail: #deedf2;
    --hero-rule: rgb(222 237 242 / 38%);
    --hero-inset: max(var(--brand-inset), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    --white: #fff;
    --paper: #e8e8db;
    --ink: #162b31;
    --muted: #4a5b5d;
    --rule: #c4cbc2;
    --gutter: clamp(1.25rem, 6vw, 6rem);
    --page-max: 80rem;
    --brand-top: max(28px, env(safe-area-inset-top, 0px));
    --brand-inset: clamp(28px, 4vw, 64px);
    --brand-size: 52px;
    --brand-gap: 12px;
    --brand-font-size: 18px;
    --header-bottom: 8px;
    --header-height: calc(var(--brand-top) + max(var(--brand-size), var(--brand-font-size) * 2.4) + var(--header-bottom));
    color-scheme: light;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    background: var(--hero-blue);
    color: var(--ink);
    font: 400 1rem / 1.5 "Newsletter Figtree", Figtree, system-ui, sans-serif;
}

button, input, select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
    text-underline-offset: 0.2em;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.page-width {
    width: min(100% - var(--gutter) * 2, var(--page-max));
    margin-inline: auto;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 3;
    padding-block: var(--brand-top) var(--header-bottom);
    padding-inline: max(var(--brand-inset), env(safe-area-inset-left, 0px)) max(var(--brand-inset), env(safe-area-inset-right, 0px));
    background: var(--hero-blue);
    color: var(--white);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--brand-gap);
    width: fit-content;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    flex: 0 0 var(--brand-size);
    width: var(--brand-size);
    height: var(--brand-size);
    overflow: hidden;
    border-radius: 50%;
}

.brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-name {
    min-width: 0;
    font-size: var(--brand-font-size);
    line-height: 1.2;
}

.brand-name strong, .brand-name span {
    display: block;
}

.newsletter {
    position: relative;
    isolation: isolate;
}

/* The form covers the sticky intro as it enters the viewport. */
.newsletter-intro {
    position: sticky;
    top: 0;
    z-index: 0;
    padding-block: calc(var(--header-height) + clamp(2rem, 6vw, 5.75rem)) clamp(2rem, 5.6vw, 5rem);
    background: var(--hero-blue);
    color: var(--white);
}

.intro-content {
    width: min(100% - var(--hero-inset) * 2, var(--page-max));
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(2rem, 6vw, 6rem);
}

.intro-content h1 {
    margin: 0;
    font-size: clamp(2.75rem, 6.4vw, 5.75rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.055em;
}

.intro-lead {
    max-width: 29ch;
    margin: clamp(0.85rem, 2vw, 1.5rem) 0 0;
    font-size: clamp(1.25rem, 2.25vw, 1.875rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.intro-lead span {
    white-space: nowrap;
}

.intro-detail {
    max-width: 37ch;
    margin: 0;
    padding: 0.7rem 0 0.12rem 1.25rem;
    border-inline-start: 1px solid var(--hero-rule);
    color: var(--hero-detail);
    font-size: clamp(1rem, 1.45vw, 1.125rem);
    line-height: 1.55;
}

.signup-sheet {
    position: relative;
    z-index: 1;
    padding-block: clamp(2rem, 5vw, 4rem);
    background: var(--paper);
}

.signup-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    gap: clamp(1.6rem, 6vw, 5.25rem);
    align-items: start;
}

.signup-intro h2 {
    max-width: 15ch;
    margin: 0;
    font-size: clamp(1.875rem, 3.5vw, 3.25rem);
    font-weight: 660;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.newsletter-form {
    display: grid;
    grid-template-columns: minmax(9rem, 0.7fr) minmax(0, 1.3fr);
    gap: 1.2rem 1rem;
}

.newsletter-form > * {
    grid-column: 1 / -1;
}

.field-salutation, .field-name {
    grid-column: auto;
}

.field label {
    display: block;
    margin: 0 0 0.48rem;
    font-weight: 650;
    line-height: 1.3;
}

.optional {
    color: var(--muted);
    font-size: 0.87em;
    font-weight: 450;
}

.field input, .field select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 3.85rem;
    padding: 0.85rem 1.05rem;
    border: 1px solid #a9b6ac;
    border-radius: 0;
    background-color: var(--white);
    color: var(--ink);
    font-size: 1.05rem;
}

.field select {
    padding-right: 2rem;
}

.field input::placeholder, .field select:invalid {
    color: var(--muted);
    opacity: 1;
}

.field input:focus, .field select:focus {
    outline: 2px solid var(--blue);
    outline-offset: 0;
}

@supports selector(form:has(option:checked)) {
    .newsletter-form:not(:has(#kontaktart option[value="telefon"]:checked)) .phone-field {
        display: none;
    }
    .phone-hint {
        display: none;
    }
}

.consent {
    display: flex;
    align-items: start;
    gap: 0.65rem;
}

.consent input {
    flex: none;
    width: 1.2rem;
    height: 1.2rem;
    margin: 0.17rem 0 0;
    accent-color: var(--blue);
}

.consent label, .consent input, .field select {
    cursor: pointer;
}

.privacy-note {
    margin: 0.45rem 0 0 1.85rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.submit-button {
    justify-self: start;
    min-height: 3.4rem;
    padding: 0.7rem 1.65rem;
    border: 1px solid transparent;
    border-radius: 99rem;
    background: var(--blue);
    color: var(--white);
    font-weight: 650;
    cursor: pointer;
}

.submit-button:hover {
    background: #204d62;
}

.submit-button:focus-visible {
    outline-color: var(--blue);
}

.field [aria-invalid="true"] {
    border-color: #9a3830;
}

.field-error {
    margin: 0.35rem 0 0;
    color: #802e27;
    font-size: 0.92rem;
}

.form-message {
    margin: 0 0 1.4rem;
    padding: 0.85rem 1rem;
    border: 1px solid currentColor;
    border-radius: 0.65rem;
    background: var(--white);
}

.form-message.success {
    color: #205b3d;
}

.form-message.error {
    color: #802e27;
}

.site-footer {
    background: var(--paper);
    color: var(--ink);
}

.footer-layout {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem 2rem;
    padding-block: 1.35rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--rule);
    font-size: 0.88rem;
}

.footer-layout small {
    font-size: inherit;
}

.footer-layout nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1.05rem;
}

html.lenis, html.lenis body {
    height: auto;
}

@media (max-width: 51rem) {
    .intro-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .intro-detail {
        max-width: 42ch;
        padding: 1rem 0 0;
        border-inline-start: 0;
        border-block-start: 1px solid var(--hero-rule);
    }

    .signup-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .signup-body {
        max-width: 38rem;
    }

    .signup-intro h2 {
        max-width: none;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    :root {
        --brand-top: max(16px, env(safe-area-inset-top, 0px));
        --brand-size: 40px;
        --brand-font-size: 15px;
    }
}

@media (max-width: 700px) and (orientation: portrait) {
    :root {
        --brand-unit: min(1vw, 5.6px);
        --brand-top: max(calc(6.25 * var(--brand-unit)), env(safe-area-inset-top, 0px));
        --brand-inset: calc(max(0px, (100% - 560px) / 2) + 6.8 * var(--brand-unit));
        --brand-size: calc(11 * var(--brand-unit));
        --brand-gap: calc(1.7 * var(--brand-unit));
        --brand-font-size: max(12px, 3.82 * var(--brand-unit));
    }
}

@media (max-width: 34rem) {
    .newsletter-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-layout {
        flex-direction: column;
    }
}

@media (max-width: 22.5rem) {
    .intro-content h1 {
        font-size: clamp(2rem, 12vw, 2.75rem);
    }
}

@media (prefers-reduced-motion: reduce), (max-height: 32rem) {
    .newsletter-intro {
        position: relative;
    }
}
