/* crmtool.app: public pages (start page, imprint, privacy). No JavaScript; light and dark follow the system. */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-latin-var.woff2') format('woff2');
}

:root {
    --teal: #0d7377;
    --teal-dark: #0a5c5f;
    --cyan: #14ffec;
    --bg: #f6f8f8;
    --bg-alt: #eef3f3;
    --card: #ffffff;
    --border: #dfe6e6;
    --text: #1b1f1f;
    --muted: #4f5858;
    --accent: var(--teal);
    --accent-hover: var(--teal-dark);
    --on-accent: #ffffff;
    --accent-soft: rgba(13, 115, 119, 0.1);
    --danger: #c62828;
    --shadow: 0 24px 60px rgba(17, 40, 40, 0.14);
    --radius: 18px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #212121;
        --bg-alt: #1b1b1b;
        --card: #2c2c2c;
        --border: rgba(255, 255, 255, 0.09);
        --text: #ececec;
        --muted: #b3b3b3;
        --accent: var(--cyan);
        --accent-hover: #6bfff4;
        --on-accent: #212121;
        --accent-soft: rgba(20, 255, 236, 0.1);
        --danger: #ff6b6b;
        --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    }
}

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

html {
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
}

h1, h2, h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
}

h1 {
    font-size: clamp(2rem, 4.2vw, 3.1rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
}

h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

p {
    margin: 0 0 1rem;
}

.wrap {
    width: min(1180px, 100% - 2rem);
    margin-inline: auto;
}

.narrow {
    width: min(780px, 100% - 2rem);
}

.skip {
    position: absolute;
    left: -9999px;
}

.skip:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10;
    padding: 0.5rem 1rem;
    background: var(--card);
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.05rem;
    border-radius: 10px;
    border: 1.5px solid transparent;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn-lg {
    padding: 0.8rem 1.4rem;
    font-size: 1rem;
}

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

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

.btn-ghost {
    border-color: var(--border);
    color: var(--text);
    background: var(--card);
}

.btn-ghost:hover {
    border-color: var(--accent);
}

.btn-light {
    background: #ffffff;
    color: var(--teal-dark);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.btn-outline-light:hover {
    border-color: #ffffff;
}

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

/* ---------- header ---------- */
.top {
    position: sticky;
    top: 0;
    z-index: 5;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.top-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.15rem;
}

.brand svg {
    width: 26px;
    height: 26px;
}

.brand rect {
    fill: var(--teal);
}

.brand path {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
}

.top-nav {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;
}

.top-nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.top-nav a:hover {
    color: var(--text);
}

.top-actions {
    display: flex;
    gap: 0.5rem;
}

/* ---------- hero ---------- */
.hero {
    padding: 4rem 0 2.5rem;
    background:
        radial-gradient(900px 420px at 85% 10%, var(--accent-soft), transparent 70%),
        var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
    align-items: center;
}

.lead {
    font-size: 1.15rem;
    font-weight: 600;
}

.hero-text > p:not(.lead):not(.hero-trust) {
    color: var(--muted);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.75rem 0 1rem;
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.hero-trust svg,
.card svg {
    flex-shrink: 0;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-trust svg {
    width: 20px;
    height: 20px;
}

/* App preview drawn in HTML/CSS (sample data). */
.mock {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    overflow: hidden;
    font-size: 0.82rem;
}

.mock figcaption {
    padding: 0.35rem 0.9rem 0.6rem;
    text-align: right;
    color: var(--muted);
    font-size: 0.72rem;
}

.mock-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--border);
}

.mock-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
}

.mock-bar span:nth-child(2) { background: #febc2e; }
.mock-bar span:nth-child(3) { background: #28c840; }

.mock-bar em {
    margin-left: auto;
    margin-right: auto;
    font-style: normal;
    color: var(--muted);
    font-size: 0.75rem;
}

.mock-body {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
}

.mock-side {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.8rem 0.6rem;
    border-right: 1px solid var(--border);
}

.mock-side b {
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 600;
}

.mock-side b.on {
    display: flex;
    justify-content: space-between;
    background: var(--accent-soft);
    color: var(--accent);
}

.mock-side i {
    font-style: normal;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--danger);
    color: #ffffff;
    font-size: 0.7rem;
}

.mock-main {
    padding: 0.9rem;
    min-width: 0;
}

.mock-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.mock-kpi {
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.mock-kpi small {
    display: block;
    color: var(--muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.mock-kpi strong {
    font-size: 1.15rem;
}

.mock-kpi.accent {
    border: 0;
    background: linear-gradient(135deg, var(--teal), #0a4f52);
    color: #ffffff;
}

.mock-kpi.accent small {
    color: rgba(255, 255, 255, 0.8);
}

.mock-group {
    margin: 0.5rem 0 0.2rem;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mock-group.overdue {
    color: var(--danger);
}

.mock-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto 26px;
    gap: 0.6rem;
    align-items: center;
    padding: 0.45rem 0.2rem;
    border-bottom: 1px solid var(--border);
}

.mock-row:last-child {
    border-bottom: 0;
}

.mock-row span {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-weight: 700;
}

.mock-row small {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock-row .m {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
}

.mock-row .m i {
    font-style: normal;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 800;
}

.mock-row .c {
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.facts {
    list-style: none;
    margin: 3rem 0 0;
    padding: 1.1rem 1.4rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.facts li {
    display: flex;
    flex-direction: column;
    padding-left: 0.9rem;
    border-left: 3px solid var(--accent);
}

.facts strong {
    font-size: 0.95rem;
}

.facts span {
    color: var(--muted);
    font-size: 0.85rem;
}

/* ---------- sections ---------- */
.section {
    padding: 5rem 0;
}

.section.alt {
    background: var(--bg-alt);
}

.section-lead {
    max-width: 680px;
    color: var(--muted);
    font-size: 1.08rem;
    margin-bottom: 2.5rem;
}

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.steps li,
.card {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.steps p,
.card p {
    margin: 0;
    color: var(--muted);
}

.step-no {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 0.9rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 800;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.card svg {
    width: 28px;
    height: 28px;
    margin-bottom: 0.9rem;
}

.security {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

.security p:not(.section-lead) {
    color: var(--muted);
}

.checks {
    list-style: none;
    margin: 0;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.checks li {
    position: relative;
    padding: 0.55rem 0 0.55rem 2rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}

.checks li:last-child {
    border-bottom: 0;
}

.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.8rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.checks strong {
    color: var(--text);
}

details {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "+";
    color: var(--accent);
    font-weight: 800;
}

details[open] summary::after {
    content: "−";
}

details p {
    margin: 0.75rem 0 0;
    color: var(--muted);
}

.final {
    padding: 4.5rem 0;
    background: linear-gradient(135deg, var(--teal), #0a4f52);
    color: #ffffff;
    text-align: center;
}

.final-inner p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
}

.final .hero-cta {
    justify-content: center;
}

/* ---------- footer ---------- */
.foot {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.88rem;
}

.foot-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.foot p {
    margin: 0;
}

.foot nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.foot a {
    color: var(--muted);
}

/* ---------- legal pages ---------- */
.legal {
    padding: 3rem 0 4rem;
}

.legal h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
}

.legal h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
}

.legal p,
.legal li {
    color: var(--muted);
}

.legal .back {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .hero-grid,
    .security {
        grid-template-columns: 1fr;
    }

    .cards,
    .steps {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 720px) {
    .top-nav {
        display: none;
    }

    .top-actions {
        margin-left: auto;
    }

    .hero {
        padding-top: 2.5rem;
    }

    .cards,
    .steps,
    .facts {
        grid-template-columns: 1fr;
    }

    .mock-body {
        grid-template-columns: 1fr;
    }

    .mock-side {
        display: none;
    }

    .section {
        padding: 3.5rem 0;
    }
}

/* Small phones: keep both "Anmelden" and "Registrieren" reachable, just tighter. */
@media (max-width: 420px) {
    .top-inner {
        gap: 0.75rem;
    }

    .top-actions .btn {
        padding: 0.45rem 0.7rem;
        font-size: 0.85rem;
    }

    .brand span {
        display: none;
    }
}
