/* Shared design language: tokens, base, buttons, header, footer, forms, plans, legal pages. */
:root {
    --ink: #111820;
    --body: #47525e;
    --line: #dfe4e9;
    --line-strong: #c3ccd5;
    --muted: #667180;
    /* ground: Seitenhintergrund, page: Karten und Felder darauf, surface: Flächen in Karten */
    --ground: #f5f6f8;
    --page: #ffffff;
    --surface: #f1f3f6;
    --tint: #e3effb;
    --main-dark: #005fb8;
    --radius: 8px;
    --card-radius: 20px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    /* Glas: für alles, was über Inhalten schwebt. Text darauf ist immer --ink, damit er auch über dunklen Fotos lesbar bleibt. */
    --glass: rgb(245 246 248 / 0.72);
    --glass-blur: saturate(180%) blur(16px);

    /* Type scale. Larger sizes exist only for page titles, prices and the landing page. */
    --text-s: 0.875rem;
    --text-m: 1rem;
    --text-l: 1.25rem;
}

* {
    box-sizing: border-box;
    margin: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background: var(--ground);
    color: var(--body);
    font: 400 1rem/1.6 'Manrope', system-ui, sans-serif;
}

main {
    flex: 1;
}

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

a {
    color: var(--main-dark);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--main);
    outline-offset: 2px;
}

h1,
h2,
h3 {
    color: var(--ink);
    font-weight: 600;
    text-wrap: balance;
    overflow-wrap: break-word;
}

button {
    font-family: inherit;
}

/* Only for screen readers, keeps the heading order complete. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

p {
    text-wrap: pretty;
}

small {
    font-size: var(--text-s);
}

h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.032em;
}

h2 {
    font-size: var(--text-l);
    line-height: 1.3;
    letter-spacing: -0.015em;
}

h3 {
    font-size: var(--text-m);
    line-height: 1.35;
}

.wrap {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 40px);
}

.section {
    padding-block: clamp(64px, 8vw, 104px);
}

.text {
    max-width: 58ch;
    margin-top: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--main);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--main-dark);
}

.btn-secondary {
    border-color: var(--line-strong);
    background: var(--page);
    color: var(--ink);
}

.btn-secondary:hover {
    border-color: var(--ink);
}

.btn-inverse {
    background: var(--white);
    color: var(--main-dark);
}

.btn-inverse:hover {
    background: var(--surface);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
    white-space: normal;
}

.btn-danger:hover {
    background: #a30808;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--glass);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 68px;
}

/* Ab Tablet steht das Menü offen im Header, darum hier die Popover-Vorgaben des Browsers zurücksetzen. */
.site-header nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 28px;
    width: auto;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    overflow: visible;
}

.menu-button {
    display: none;
}

.site-header nav a:not(.btn) {
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
}

.site-header nav a:not(.btn):hover {
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 6px;
}

.brand img {
    width: 150px;
}

/* Footer */
.footer-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    padding: 56px max(clamp(20px, 5vw, 40px), (100% - 1120px) / 2);
    background: var(--ink);
}

.footer-content-label img {
    max-width: 150px;
    height: auto;
}

.footer-content-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px 64px;
}

.footer-content-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-content-links h2 {
    margin-bottom: 4px;
    color: var(--white);
    font-size: var(--text-s);
    letter-spacing: 0;
}

.footer-content-links a {
    color: #b9c2cb;
    font-size: var(--text-s);
    text-decoration: none;
}

.footer-content-links a:hover {
    color: var(--white);
}

/* Forms */
input,
select,
textarea {
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--page);
    color: var(--ink);
    font: inherit;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--main);
    outline-offset: -1px;
    border-color: var(--main);
}

input[type="checkbox"] {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--main);
}

input[type="color"] {
    width: 44px;
    height: 36px;
    padding: 3px;
    cursor: pointer;
}

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

.field label {
    color: var(--ink);
    font-size: var(--text-s);
    font-weight: 600;
}

.field input,
.field select,
.field textarea {
    width: 100%;
}

.field textarea {
    resize: vertical;
}

.check {
    display: flex;
    gap: 10px;
    font-size: var(--text-s);
}

.form-page {
    display: flex;
    justify-content: center;
    padding: clamp(32px, 7vw, 80px) clamp(20px, 5vw, 40px);
}

.form-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 480px;
    padding: clamp(24px, 5vw, 40px);
    border-radius: var(--card-radius);
    background: var(--page);
}

.form-card h1 {
    font-size: clamp(1.75rem, 3vw, 2.125rem);
}

.form-error {
    padding: 10px 14px;
    border: 1px solid var(--red);
    border-radius: var(--radius);
    color: var(--red);
    font-size: var(--text-s);
    font-weight: 500;
}

.form-hint {
    font-size: var(--text-s);
}

.benefits {
    padding-left: 1.2em;
}

.break-word {
    overflow-wrap: anywhere;
}

#presentationIDInput {
    font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* Plans */
.plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.plan {
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 2px solid transparent;
    border-radius: var(--card-radius);
    background: var(--page);
}

.plan-featured {
    border-color: var(--main);
}

.plan h3 {
    font-size: var(--text-l);
}

.price {
    margin-top: 12px;
    color: var(--ink);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* Gleiche Zeilenhöhe wie eine Zahl, damit die Karten auf einer Linie bleiben. */
.price-text {
    font-size: 1.75rem;
    line-height: 1.643;
}

.price-note {
    margin-top: 4px;
    font-size: var(--text-s);
}

.plan ul {
    flex: 1;
    margin: 24px 0 28px;
    padding: 0;
    list-style: none;
}

.plan li {
    position: relative;
    padding: 5px 0 5px 26px;
}

.plan li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--main);
    font-weight: 700;
}

/* Anfrage für ein individuelles Angebot */
.offer {
    width: min(480px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: clamp(20px, 5vw, 32px);
    border: 0;
    border-radius: var(--card-radius);
    background: var(--page);
    color: var(--body);
    overflow-y: auto;
}

.offer::backdrop {
    background: rgba(17, 24, 32, 0.45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.offer h2 {
    padding-right: 32px;
}

.offer form:not([hidden]) {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.offer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

#offerStatus {
    margin-top: 16px;
    font-size: var(--text-s);
}

/* Legal pages and short status messages */
.page-intro {
    padding-block: clamp(40px, 6vw, 72px) clamp(56px, 7vw, 88px);
}

.prose {
    max-width: calc(56ch + 2 * clamp(24px, 6vw, 72px));
    margin: clamp(24px, 4vw, 48px) auto clamp(40px, 6vw, 72px);
    padding: clamp(28px, 6vw, 72px) clamp(24px, 6vw, 72px);
    border-radius: var(--card-radius);
    background: var(--page);
    overflow-wrap: break-word;
}

/* The soft hyphens in the titles are only for phones. */
@media (min-width: 25em) {
    .prose h1 {
        -webkit-hyphens: none;
        hyphens: none;
    }
}

.prose h2 {
    margin-top: 36px;
}

.prose p,
.prose address,
.prose ul {
    margin-top: 12px;
    font-style: normal;
}

.prose .meta {
    margin-top: 8px;
    font-size: var(--text-s);
}

.message-page {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    max-width: 640px;
    margin: clamp(32px, 7vw, 80px) auto;
    padding: clamp(28px, 6vw, 64px);
    border-radius: var(--card-radius);
    background: var(--page);
}

/* Tablet and mobile */
@media (max-width: 63.9375em) {
    .plans {
        grid-template-columns: repeat(2, 1fr);
    }

    .plan:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 47.9375em) {
    .site-header-inner {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0 16px;
        min-height: 60px;
    }

    /* Nur Browser ohne Popover zeigen die Links offen unter dem Logo. */
    .site-header nav {
        flex-wrap: wrap;
        margin: 0;
    }

    .site-header nav:not(:popover-open) {
        display: none;
    }

    .site-header nav:popover-open {
        position: fixed;
        inset: 60px 0 auto;
        flex-flow: column nowrap;
        align-items: stretch;
        gap: 0;
        max-height: calc(100dvh - 60px);
        padding: 4px clamp(20px, 5vw, 40px) 24px;
        border-bottom: 1px solid var(--line);
        background: rgb(245 246 248 / 0.86);
        -webkit-backdrop-filter: var(--glass-blur);
        backdrop-filter: var(--glass-blur);
        box-shadow: 0 24px 40px -24px rgba(17, 24, 32, 0.35);
        overflow-y: auto;
        animation: menu-open 0.22s ease-out;
    }

    .site-header nav:popover-open::backdrop {
        inset: 60px 0 0;
        background: rgba(17, 24, 32, 0.35);
    }

    .site-header nav:popover-open a:not(.btn) {
        padding: 15px 0;
        border-bottom: 1px solid var(--line);
        color: var(--ink);
        font-weight: 600;
    }

    .site-header nav:popover-open a:not(.btn):last-child {
        border-bottom: 0;
    }

    .site-header nav:popover-open .btn {
        margin-top: 20px;
        padding-block: 13px;
    }

    @supports selector(:popover-open) {
        .menu-button {
            display: grid;
            place-content: center;
            gap: 7px;
            width: 44px;
            height: 44px;
            margin-right: -10px;
            padding: 0;
            border: 0;
            background: none;
            cursor: pointer;
        }
    }

    .menu-button span {
        width: 24px;
        height: 2px;
        border-radius: 2px;
        background: var(--ink);
        transition: transform 0.2s;
    }

    .site-header:has(nav:popover-open) .menu-button span:first-child {
        transform: translateY(4.5px) rotate(45deg);
    }

    .site-header:has(nav:popover-open) .menu-button span:last-child {
        transform: translateY(-4.5px) rotate(-45deg);
    }

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

    .footer-content-container {
        gap: 40px;
    }
}

@keyframes menu-open {
    from { opacity: 0; transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .site-header nav:popover-open {
        animation: none;
    }

    .menu-button span {
        transition: none;
    }
}

/* Preview tile of a slide type, see views/handlebars/slideSketch.ejs */
.slideSketch {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--main);
}

.slideSketch svg {
    width: 100%;
    height: 100%;
}

.slideSketchIcon svg {
    width: 26%;
    height: 46%;
}

/* Ohne Unterstützung oder auf Wunsch der Nutzer bleibt das Glas undurchsichtig. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root {
        --glass: #f5f6f8;
    }
}

@media (prefers-reduced-transparency: reduce) {
    :root {
        --glass: #f5f6f8;
        --glass-blur: none;
    }

    .site-header nav:popover-open {
        background: #f5f6f8;
    }
}

/* Videoanleitungen */
.tutorials {
    list-style: none;
    padding: 0;
    margin: clamp(32px, 5vw, 56px) 0;
    display: grid;
    gap: clamp(32px, 5vw, 56px);
}

.tutorial {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: clamp(20px, 4vw, 40px);
    align-items: center;
}

.tutorial video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--card-radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.tutorial-text h2 {
    margin-bottom: 10px;
}

@media (max-width: 47.9375em) {
    .tutorial {
        grid-template-columns: 1fr;
    }
}
