/* Design tokens ----------------------------------------------------------------------------- */

:root {
    --ink: #131116;
    --paper: #F5F2ED;
    --red: #D81316;
    --red-bright: #E2001A;
    --fog: #948F97;
    --fog-light: #c9c5cc;
    --line: rgba(245, 242, 237, 0.14);
    --ok: #4FAE7A;
    --form-muted: #55505a; /* secondary text on the white form card */
    --pattern: url('../img/pattern.webp');
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Base -------------------------------------------------------------------------------------- */

html {
    scroll-padding-top: env(safe-area-inset-top, 0px);
}

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

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(180deg, rgba(19, 17, 22, .42) 0%, rgba(19, 17, 22, .72) 70%, rgba(19, 17, 22, .88) 100%), var(--pattern);
    background-size: cover;
    background-position: center top;
}

.wrap {
    max-width: 1020px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header ------------------------------------------------------------------------------------ */

header.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 28px 0;
    flex-wrap: wrap;
}

.mark {
    display: flex;
    align-items: center;
}

.mark svg {
    height: 44px;
    width: auto;
    display: block;
}

.head-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Hero -------------------------------------------------------------------------------------- */

.hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 52px;
    padding: 44px 0 72px;
    align-items: start;
}

h1 {
    font-size: clamp(32px, 4.6vw, 50px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.12;
    max-width: 16ch;
    margin: 0 0 18px;
}

h1 em {
    font-style: normal;
    color: #fff;
    background: var(--red);
    border-radius: 8px;
    padding: 1px 12px 3px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--fog-light);
}

.trust-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--red-bright);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

/* Form card --------------------------------------------------------------------------------- */

.form-card {
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    color: #18151b;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .4);
}

.form-card h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
}

.form-card .sub {
    font-size: 14.5px;
    color: var(--form-muted);
    margin: 0 0 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.field label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--form-muted);
}

.field input {
    border: 1px solid rgba(24, 21, 27, .18);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: #18151b;
    outline: none;
    background: #faf8f5;
}

/* Below 16px iOS Safari zooms in on focus, so touch screens keep 16px. */
@media (pointer: coarse) {
    .field input {
        font-size: 16px;
    }
}

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

.field.url input {
    font-weight: 600;
}

.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--form-muted);
    margin: 18px 0;
    cursor: pointer;
    line-height: 1.55;
}

.consent input {
    margin-top: 2px;
    accent-color: var(--red);
}

.submit {
    width: 100%;
    background: var(--red);
    color: #fff;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 16.5px;
    padding: 15px 28px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .2s ease;
}

.submit:hover {
    background: var(--red-bright);
    box-shadow: 0 12px 28px rgba(216, 19, 22, .4);
}

.submit:disabled {
    background: #c9c5cc;
    cursor: default;
    box-shadow: none;
}

.powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(24, 21, 27, .1);
}

.powered span {
    font-size: 13px;
    color: #6f6a74;
}

.powered img {
    height: 30px;
    width: auto;
    display: block;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.consent a {
    color: inherit;
}

.form-error {
    margin-top: 14px;
    text-align: center;
    font-size: 14.5px;
    color: var(--red);
}

/* "Danke" step ------------------------------------------------------------------------------ */

.thanks-url {
    margin: 4px 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #faf8f5;
    border: 1px solid rgba(24, 21, 27, .18);
    font-weight: 600;
    font-size: 18px;
    word-break: break-all;
}

.thanks-copied {
    color: var(--ok);
    font-weight: 600;
}

/* The "Danke" step tells the visitor what to do next, so it reads larger than the form hints. */
.thanks .sub {
    font-size: 16.5px;
    color: #3b3740;
    line-height: 1.45;
}

.thanks a.submit {
    display: block;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
}

/* Messestand variant: compact and centred --------------------------------------------------- */

body.v-stand .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 36px;
    padding: 16px 0 64px;
}

.stand-intro {
    display: none;
    text-align: center;
    max-width: 880px;
    position: relative;
}

body.v-stand .stand-intro {
    display: block;
}

.stand-intro h1 {
    max-width: none;
    margin: 0 0 14px;
}

.stand-sub {
    color: var(--paper);
    font-size: clamp(18px, 2.1vw, 21px);
    font-weight: 400;
    line-height: 1.4;
    margin: 10px 0 28px;
    text-shadow: 0 2px 14px rgba(19, 17, 22, .8);
}

.stand-points {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Solid chips so the points stay readable on top of the pattern. */
.stand-points .trust-item {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--paper);
    background: rgba(19, 17, 22, .78);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 16px 8px 13px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.stand-points .trust-item svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 480px) {
    body.v-stand .hero {
        padding-top: 12px;
    }

    .stand-points {
        gap: 8px;
    }

    .stand-points .trust-item {
        font-size: 13.5px;
        padding: 7px 13px 7px 10px;
        gap: 7px;
    }

    .stand-points .trust-item svg {
        width: 16px;
        height: 16px;
    }
}

body.v-stand .form-card {
    width: 100%;
    max-width: 560px;
}

@media (min-width: 821px) {
    body.v-stand .form-card {
        margin-top: 16px;
    }
}

body.v-stand .form-card h3 {
    font-size: 22px;
}

/* Footer ------------------------------------------------------------------------------------ */

footer {
    border-top: 1px solid var(--line);
    padding: 26px 0 40px;
    color: var(--fog);
    font-size: 12.5px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.foot-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.foot-links a {
    color: var(--fog);
    text-decoration: none;
}

.foot-links a:hover {
    color: var(--paper);
}

/* Responsive -------------------------------------------------------------------------------- */

@media (max-width: 820px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-bottom: 52px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 24px;
    }
}

/* Portrait screens (phones, upright tablets) only ever show the centre of the 1920x1080
   pattern with background-size:cover, so they get a pre-cropped, smaller file. */
@media (orientation: portrait) and (max-aspect-ratio: 3/4) {
    :root {
        --pattern: url('../img/pattern-portrait.webp');
    }
}
