@font-face {
    font-family: 'Knecht';
    src: url('fonts/KnechtGrotesk30-Medium.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Knecht';
    src: url('fonts/KnechtGrotesk30-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

:root {
    --red: #ff0000;
    --red-dark: #d90000;
    --black: #000;
    --white: #fff;
    --bg: #e1ebf0;
    --gutter: clamp(1rem, 4.5vw, 3.5rem);
    --content: 66rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--black);
    font: 400 1.1875rem/1.2 Knecht, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2 {
    margin: 0;
    font-weight: 900;
    line-height: 1;
}

p {
    margin: 0 0 1rem;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

::selection {
    color: var(--red);
    background: transparent;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    padding: .5rem 1rem;
    background: var(--white);
    z-index: 1;
}

.skip-link:focus {
    top: 1rem;
}

/* Header & footer */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem var(--gutter);
}

.logo {
    color: var(--red);
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

.social {
    display: flex;
    gap: 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social a {
    display: block;
    transition: color .15s;
}

.social a:hover {
    color: var(--red);
}

.social svg {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
}

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem var(--gutter) 2.5rem;
    font-size: .9rem;
}

.footer-link {
    text-decoration: none;
}

.footer-link:hover {
    color: var(--red);
}

/* Home */

.hero {
    max-width: 75rem;
    margin: 0 auto;
    padding: clamp(2.5rem, 8vw, 5.5rem) 1rem clamp(3rem, 11vw, 9rem);
    font-size: clamp(2.25rem, 5vw, 4.1rem);
    text-align: center;
    text-wrap: balance;
}

.accent {
    color: var(--red);
}

/* Counted up by supporters.js. Hidden until then, only if JavaScript runs, so the number from the HTML doesn't show first. */
[data-supporters] {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    text-align: right;
    transform-origin: right; /* the flash grows away from "Menschen" */
}

.js [data-supporters]:not(.visible) {
    visibility: hidden;
}

.flash {
    animation: flash .7s ease-out;
}

@keyframes flash {
    35% {
        transform: scale(1.15);
        text-shadow: 0 0 .35em rgb(255 0 0 / .45);
    }
}

.home {
    display: grid;
    grid-template-columns: minmax(0, 32.5rem) minmax(0, 26.5rem);
    grid-template-areas: 'story pitch';
    justify-content: space-between;
    gap: 3rem;
    max-width: var(--content);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.story {
    grid-area: story;
    position: relative;
    isolation: isolate;
}

.story h2 {
    margin: 0 0 2.4rem;
    font-size: clamp(1.75rem, 3vw, 2.125rem);
}

.story p + h2 {
    margin-top: 2.6rem;
}

/* Overlay for the hand-drawn underlines that marks.js draws below every line of a `.mark` */
.marks {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    fill: var(--red);
}

.signature {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.signature img {
    width: 8.4rem;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
}

.signature p:last-child {
    margin-bottom: 0;
}

.pitch {
    grid-area: pitch;
    align-self: start;
    position: sticky;
    top: 1.5rem;
    padding: 2rem 1.6rem 1.25rem;
    background: var(--white);
}

.pitch h2 {
    margin-bottom: 2.4rem;
    color: var(--red);
    font-size: clamp(1.75rem, 3vw, 2.125rem);
}

.donate {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .35em;
    margin: 5rem 0 1.75rem;
    padding: 1.1rem 1.5rem;
    border-radius: .4rem;
    background: var(--red);
    box-shadow: 0 .5rem 1.25rem -.5rem rgb(255 0 0 / .55);
    color: var(--white);
    font-size: 1.375rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    transition: background-color .15s, box-shadow .15s, transform .15s;
}

.donate:hover {
    background: var(--red-dark);
    box-shadow: 0 .75rem 1.5rem -.5rem rgb(255 0 0 / .65);
    transform: translateY(-1px);
}

.donate:active {
    box-shadow: 0 .25rem .75rem -.4rem rgb(255 0 0 / .55);
    transform: translateY(1px);
}

.donate:focus-visible {
    outline: 3px solid var(--black);
    outline-offset: 3px;
}

.donate-arrow {
    transition: transform .2s ease-out;
}

.donate:hover .donate-arrow {
    transform: translateX(.25em);
}

.payment-methods {
    width: 13.8rem;
    margin: 0 auto;
}

@media (max-width: 52rem) {
    .home {
        grid-template-columns: minmax(0, 34rem);
        grid-template-areas: 'pitch' 'story';
        justify-content: center;
    }

    .pitch {
        position: static;
    }

    .donate {
        margin-top: 2.5rem;
    }
}

/* Thank-you page, a single column with the pitch box */

.thanks {
    width: min(34rem, 100% - 2 * var(--gutter));
    margin: 0 auto;
}

.thanks .pitch {
    position: static;
}

.thanks .donate {
    margin-top: 2.5rem;
}

/* Legal pages */

.legal {
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 var(--gutter);
    font-size: 1rem;
}

.legal h1 {
    margin: 1.5rem 0 3rem;
    font-size: clamp(2.25rem, 5vw, 4.1rem);
    text-align: center;
}

.legal-sections {
    columns: 3 19rem;
    column-gap: 2.5rem;
}

.legal section {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.legal h2 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
}

.legal a {
    overflow-wrap: anywhere;
}

/* Forms behind links in mails: the address for the card and unsubscribing */

[hidden] {
    display: none !important;
}

.form {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.form .wide {
    grid-column: 1 / -1;
}

.form label {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    font-size: 1rem;
}

.form input {
    width: 100%;
    padding: .75rem .85rem;
    border: 2px solid #c5d3da;
    border-radius: .4rem;
    background: var(--white);
    color: var(--black);
    font: inherit;
}

.form input:focus {
    border-color: var(--black);
    outline: none;
}

.form .donate {
    margin: .5rem 0 0;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.form .donate:disabled {
    opacity: .6;
    cursor: wait;
}

.form-error {
    margin: 0;
    color: var(--red-dark);
}

.fine-print {
    margin: 1.75rem 0 0;
    font-size: .9rem;
}
