/* Vereinstakt – Website. Gemeinsamer Rahmen aller Seiten: Tokens, Schrift, Kopfleiste, Fuß mit gebauter Wortmarke und
   die Lese-Typografie für Dokumentation und Rechtstexte. Das Kachelbrett der Marketing-Seiten liegt in board.css. */

@font-face {
    font-family: "Bricolage Grotesque";
    src: url("../type/bricolage-latin.woff2") format("woff2");
    font-weight: 200 800;
    font-stretch: 75% 100%;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Bricolage Grotesque";
    src: url("../type/bricolage-latin-ext.woff2") format("woff2");
    font-weight: 200 800;
    font-stretch: 75% 100%;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    /* Helles Design: kühles Weiß, Schiefer als Schrift, Smaragd als einziger Akzent - die Erfolgsfarbe der App, auf Hell
       abgedunkelt für lesbare weiße Schrift. Das dunkle Design (Standard, siehe unten) trägt die Nachtfarben der App. */
    --bg: #f7f9fa;
    --surface: #ecf0f2;
    --surface-2: #dfe6e9;
    --line: #dfe6e9;
    --ink: #1f3038;
    --ink-soft: #46565d;
    --accent: #047857;
    --accent-press: #065f46;
    --accent-ink: #ffffff;
    --slate: #0f172a;
    --night: #070d1a;
    --slate-ink: #f7f9fa;
    --danger: #a3361f;
    /* Feldfarben des Bretts (Streifen, Kacheln, Wortmarke). */
    --field-1: #047857;
    --field-2: #0f172b;
    --field-3: #c9d6db;
    --field-4: #3e6b75;
    --pitch: #2f6b4f;

    --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
    --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
    --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
    --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
    --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
    --step-display: clamp(3rem, 1.4rem + 6.4vw, 6.5rem);

    --margin: clamp(16px, 1.2vw, 20px);
    --step-title: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem);
    --gap: 8px;
    --radius: 6px;
    --section: clamp(80px, 9vw, 144px);

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* Dunkles Design „Flutlicht“: die Nachtfarben der App mit ihrem Smaragd. Jede Seite startet mit data-theme="dark" am
   html-Element; js/theme.js schaltet auf die gespeicherte Wahl um, bevor die Seite gezeichnet wird. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #070d1a;
    --surface: #0f172a;
    --surface-2: #16213a;
    --line: #1e2a44;
    --ink: #eef3f6;
    --ink-soft: #9fb0bb;
    --accent: #34d399;
    --accent-press: #6ee7b7;
    --accent-ink: #04261a;
    --field-3: #16213a;
    --field-4: #1e2a44;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: var(--step-body);
    line-height: 1.5;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, video, svg {
    display: block;
    max-width: 100%;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
    text-wrap: balance;
}

p {
    margin: 0;
    text-wrap: pretty;
}

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: var(--margin);
    top: -60px;
    z-index: 10;
    padding: 12px 16px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: var(--radius);
}

.skip-link:focus {
    top: var(--margin);
}

/* ---------- Knöpfe: eine Form, ein Radius ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--radius);
    font: inherit;
    font-size: var(--step-body);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background-color 160ms ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-quiet {
    background: var(--surface-2);
    color: var(--ink);
}

.btn-light {
    background: var(--bg);
    color: var(--ink);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line);
}

@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover {
        background: var(--accent-press);
    }

    .btn-quiet:hover {
        background: var(--field-3);
    }

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

    .btn-ghost:hover {
        box-shadow: inset 0 0 0 1px var(--ink-soft);
    }
}

/* ---------- Kopfleiste: Wortmarke, ein paar Links, eine Aktion ---------- */

.bar {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 40px);
    padding: 14px var(--margin);
    border-bottom: 1px solid var(--line);
}

.marketing .bar {
    border-bottom-color: transparent;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: var(--step-lead);
    font-weight: 600;
    letter-spacing: -0.03em;
    text-decoration: none;
    white-space: nowrap;
}

.wordmark img {
    width: 32px;
    height: 32px;
}

.bar nav {
    display: flex;
    gap: clamp(14px, 2vw, 28px);
    margin-left: auto;
    font-size: var(--step-small);
}

.bar nav a {
    padding: 12px 0;
    white-space: nowrap;
    text-decoration: none;
    color: var(--ink-soft);
    transition: color 160ms ease;
}

.bar nav a[aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
    .bar nav a:hover {
        color: var(--ink);
    }
}

@media (max-width: 760px) {
    .bar {
        flex-wrap: wrap;
        row-gap: 0;
    }

    .bar nav {
        order: 3;
        width: 100%;
        margin-left: 0;
        overflow-x: auto;
        gap: 22px;
    }

    .bar .btn {
        margin-left: auto;
        min-height: 44px;
        padding: 0 16px;
    }
}

/* ---------- Schalter hell/dunkel: zeigt das Ziel - die Sonne im Dunkeln, den Mond im Hellen ---------- */

.theme-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color 160ms ease, transform 160ms var(--ease-out);
}

.bar nav + .theme-toggle {
    margin-left: 0;
}

.theme-toggle:active {
    transform: scale(0.94);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.theme-toggle .i-moon,
[data-theme="light"] .theme-toggle .i-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .i-moon {
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    .theme-toggle:hover {
        color: var(--ink);
    }
}

@media (max-width: 760px) {
    .bar nav + .theme-toggle {
        margin-left: auto;
    }

    .bar .theme-toggle + .btn {
        margin-left: 0;
    }
}

/* Bilder in zwei Fassungen: nur die zum Design passende wird gezeigt. */
.only-light,
[data-theme="light"] .only-dark {
    display: none;
}

[data-theme="light"] .only-light {
    display: block;
}

/* ---------- Fuß: die Wortmarke aus Blöcken, Nachtflächen in zwei Stufen, der Takt in Smaragd ---------- */

.site-foot {
    margin-top: var(--section);
    padding: var(--margin);
    border-top: 1px solid var(--line);
}

.marketing .site-foot {
    margin-top: 0;
}

.block-mark {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: clamp(120px, 24svh, 260px);
}

.block-mark span {
    flex: 1 1 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    padding-bottom: 0.08em;
    border-radius: var(--radius);
    color: var(--ink-soft);
    font-size: clamp(2.25rem, 7.4vw, 7.5rem);
    font-weight: 700;
    line-height: 0.8;
    letter-spacing: -0.04em;
}

.block-mark span:nth-child(odd) { height: 100%; background: var(--surface); }
.block-mark span:nth-child(even) { height: 82%; background: var(--surface-2); }
.block-mark span:nth-child(n + 8) { color: var(--accent-ink); background: var(--accent); }
.block-mark span:nth-child(8) { height: 70%; }
.block-mark span:nth-child(9) { height: 88%; }
.block-mark span:nth-child(10) { height: 60%; }
.block-mark span:nth-child(11) { height: 94%; }

.foot-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px var(--gap);
    margin-top: 56px;
    font-size: var(--step-body);
}

.foot-grid .foot-links {
    grid-column: span 2;
    display: grid;
    align-content: start;
    gap: 10px;
}

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

.foot-grid .foot-contact {
    grid-column: 9 / -1;
    display: grid;
    align-content: start;
    gap: 10px;
}

.foot-grid .foot-contact a {
    color: var(--accent);
}

@media (hover: hover) and (pointer: fine) {
    .foot-grid .foot-links a:hover {
        text-decoration: underline;
    }
}

.foot-last {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 56px;
    font-size: var(--step-small);
}

.foot-last .credits {
    max-width: 70ch;
}

.foot-last .credits {
    color: var(--ink-soft);
}

.foot-last .credits a {
    color: var(--ink-soft);
}

@media (max-width: 900px) {
    .foot-grid .foot-links {
        grid-column: span 6;
    }

    .foot-grid .foot-contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .block-mark {
        gap: 3px;
        height: 96px;
    }

    .block-mark span {
        font-size: var(--step-title);
    }
}

/* ---------- Bewegung: Abschnitte bauen sich gestaffelt auf ---------- */

.js [data-reveal] > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 75ms);
}

.js [data-reveal].is-in > * {
    opacity: 1;
    transform: none;
}

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

    .js [data-reveal] > * {
        transform: none;
        transition: opacity 300ms ease;
    }

    .btn,
    .btn:active {
        transition: background-color 160ms ease;
        transform: none;
    }
}
