:root {
    --navy: #233C63;
    --navy-light: #2d4d7e;
    --slate: #475569;
    --light-slate: #94a3b8;
    --bg-body: #fcfdfe;
    --white: #ffffff;
    --accent: #059669;
    --radius-lg: 32px;
    --radius-md: 20px;
    --shadow-sm: 0 10px 30px rgba(35, 60, 99, 0.03);
    --shadow-md: 0 20px 50px rgba(35, 60, 99, 0.06);
    --appbar-h: 58px;
}

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

html, body { height: 100%; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--navy);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- LUCIDE ICONS --- */
.lucide { width: 1em; height: 1em; flex-shrink: 0; }
[data-icon] { display: inline-flex; width: 1.2em; height: 1.2em; vertical-align: -0.22em; }
[data-icon] .lucide { width: 100%; height: 100%; }

/* --- BACKGROUND GRADIENTS --- */
.bg-blur {
    position: fixed;
    width: 100vw; height: 100vh;
    top: 0; left: 0;
    background: radial-gradient(circle at 90% 10%, rgba(35, 60, 99, 0.03) 0%, transparent 40%),
                radial-gradient(circle at 10% 90%, rgba(5, 150, 105, 0.02) 0%, transparent 40%);
    z-index: -1;
}

/* --- APPBAR (schlanke Kopfzeile) --- */
.appbar {
    height: var(--appbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--navy);
}

.brand img { height: 30px; display: block; }

.logo-text {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.logo-text [data-icon] { color: var(--accent); }

.meta-tag {
    display: inline-block;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--slate);
    font-size: 10px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

/* --- HERO --- */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 44px 24px 44px;
    text-align: center;
}

h1 {
    font-size: clamp(2.1rem, 5.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

h1 span { color: var(--light-slate); font-weight: 300; }

.lead {
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.15rem;
    color: var(--slate);
}

/* --- LAYOUT GRID --- */
.main-grid {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.1fr 380px;
    gap: 40px;
    align-items: start;
}

/* --- CARDS --- */
.glass-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: var(--shadow-md);
}

/* --- SHARE BOX (Makler) --- */
.share-box {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 50px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.share-watermark {
    position: absolute;
    top: -24px; right: -24px;
    width: 160px; height: 160px;
    color: rgba(255, 255, 255, 0.05);
    transform: rotate(-12deg);
    pointer-events: none;
}
.share-watermark .lucide { width: 100%; height: 100%; }

.share-box h2 { font-size: 1.7rem; letter-spacing: -0.02em; margin-bottom: 10px; position: relative; }
.share-box > p { color: rgba(255,255,255,0.75); max-width: 480px; margin: 0 auto 28px; font-size: 0.95rem; position: relative; }

.share-url-row {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto 16px;
    position: relative;
}

.share-url {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 15px 18px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    color: var(--navy);
    border: none;
    border-radius: 14px;
    padding: 15px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn-copy [data-icon] { width: 17px; height: 17px; }

.btn-copy:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.btn-copy.copied { background: var(--accent); color: white; }

.share-alt { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; position: relative; }

.share-alt a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: 0.3s;
}
.share-alt a:hover { background: white; color: var(--navy); }
.share-alt [data-icon] { width: 16px; height: 16px; }

/* --- DIGITAL SECTION --- */
.digital-box {
    padding: 46px 50px;
    text-align: center;
    margin-bottom: 40px;
}

.digital-box h2 { font-size: 1.7rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.digital-box .sub { color: var(--slate); max-width: 480px; margin: 0 auto; }

.qr-hero {
    background: #f8fafc;
    padding: 32px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    gap: 28px;
    margin: 28px 0 32px;
    border: 1px solid #eef2f6;
}

.qr-code img { width: 140px; height: 140px; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,0.05); background: white; display: block; }
.qr-info { text-align: left; max-width: 230px; }
.qr-info h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin-bottom: 8px;
}
.qr-info h4 [data-icon] { width: 17px; height: 17px; color: var(--accent); }
.qr-info p { font-size: 13px; color: var(--slate); }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--navy);
    color: white;
    padding: 18px 42px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 15px 30px rgba(35, 60, 99, 0.2);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.btn-primary [data-icon] { width: 19px; height: 19px; }

.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(35, 60, 99, 0.3); }

.hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    color: var(--light-slate);
    margin-top: 16px;
}
.hint [data-icon] { width: 15px; height: 15px; }

/* --- WORKFLOW STEPS --- */
.workflow-header {
    margin: 10px 0 30px;
    text-align: center;
}

.workflow-header span {
    font-size: 11px;
    font-weight: 800;
    color: var(--light-slate);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.workflow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.step-card {
    background: #ffffff;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
}

.step-card:hover {
    transform: translateY(-8px);
    border-color: var(--navy);
    box-shadow: 0 30px 60px rgba(35, 60, 99, 0.08);
}

.step-card::after {
    content: attr(data-step);
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 100px;
    font-weight: 900;
    color: rgba(35, 60, 99, 0.03);
    z-index: -1;
    transition: color 0.3s;
}
.step-card:hover::after { color: rgba(35, 60, 99, 0.06); }

.step-icon-box {
    width: 54px; height: 54px;
    background: #f8fafc;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: var(--navy);
    margin-bottom: 22px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: all 0.3s;
}
.step-icon-box [data-icon] { width: 24px; height: 24px; }
.step-card:hover .step-icon-box { background: var(--navy); color: white; }

.step-card h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.step-card p { font-size: 0.94rem; color: var(--slate); line-height: 1.5; }

/* --- SIDEBAR --- */
.sidebar { display: grid; gap: 32px; }

.asset-box { padding: 38px; }
.asset-box h3 { margin-bottom: 6px; font-size: 1.2rem; }
.asset-box > p { font-size: 14px; color: var(--slate); margin-bottom: 22px; }

.download-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    background: #fcfdfe;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    text-decoration: none;
    color: var(--navy);
    margin-bottom: 14px;
    transition: all 0.3s;
}

.download-item:last-child { margin-bottom: 0; }
.download-item:hover { border-color: var(--navy); background: #ffffff; box-shadow: var(--shadow-sm); }
.dl-icon {
    width: 44px; height: 44px;
    background: #f4f7fb;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--navy);
    flex-shrink: 0;
}
.dl-icon [data-icon] { width: 21px; height: 21px; }
.download-item .info { flex: 1; min-width: 0; }
.download-item .info span { display: block; font-weight: 700; font-size: 14px; }
.download-item .info small { font-size: 12px; color: var(--light-slate); }
.download-item > [data-icon] { width: 17px; height: 17px; color: var(--light-slate); }

/* --- SUPPORT BOX --- */
.support-box {
    background: var(--navy);
    color: white;
    border-radius: var(--radius-lg);
    padding: 38px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.1);
    margin: 0 auto 18px;
    object-fit: cover;
    background: #f1f5f9;
    display: block;
}

.support-box h3 { color: white; margin-bottom: 8px; font-size: 1.25rem; }
.support-box p { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 26px; }

.support-actions { display: flex; gap: 10px; justify-content: center; }
.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: 0.3s;
}
.support-btn [data-icon] { width: 16px; height: 16px; }
.support-btn:hover { background: white; color: var(--navy); }

/* --- FOOTER --- */
.site-footer {
    padding: 50px 24px;
    text-align: center;
    color: var(--light-slate);
    font-size: 0.85rem;
    border-top: 1px solid #f1f5f9;
}

/* --- TABBAR (nur mobil sichtbar) --- */
.tabbar { display: none; }

.mobile-only { display: none; }

/* ================================================================
   TABLET: einspaltig, weiterhin scrollend
   ================================================================ */
@media (max-width: 1100px) and (min-width: 881px) {
    .main-grid { grid-template-columns: 1fr; }
    .sidebar { grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   MOBIL (< 880px): App-Modus – kein Seiten-Scroll,
   fixe Kopfzeile, Inhalte als Tabs, fixe Tab-Bar unten
   ================================================================ */
@media (max-width: 880px) {
    body {
        display: flex;
        flex-direction: column;
        height: 100dvh;
        overflow: hidden;
    }

    .appbar {
        flex-shrink: 0;
        width: 100%;
        padding: 0 18px;
        border-bottom: 1px solid #eef2f6;
        background: rgba(252, 253, 254, 0.92);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        z-index: 10;
    }

    .page {
        flex: 1;
        min-height: 0;
        overflow-y: auto;          /* Sicherheitsnetz für sehr kleine Screens */
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
        padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    }

    .main-grid, .content-left, .sidebar { display: contents; }

    /* Aktiven Tab-Inhalt vertikal zentrieren; bei Überlänge
       kollabieren die Spacer auf 0 und es greift der innere Scroll */
    .page::before, .page::after { content: ""; flex: 1 0 0; }
    .hero, [data-panel] { flex-shrink: 0; }

    /* Alle Panels verstecken, nur aktiver Tab sichtbar */
    [data-panel] { display: none !important; }
    body[data-tab="start"]     [data-panel="start"],
    body[data-tab="teilen"]    [data-panel="teilen"],
    body[data-tab="schritte"]  [data-panel="schritte"],
    body[data-tab="downloads"] [data-panel="downloads"],
    body[data-tab="hilfe"]     [data-panel="hilfe"] { display: block !important; }

    .site-footer { display: none; }

    /* Hero kompakt */
    .hero { padding: 14px 4px 20px; }
    h1 { font-size: clamp(1.7rem, 7.5vw, 2.2rem); margin-bottom: 12px; }
    .lead { font-size: 0.95rem; }

    /* Karten kompakt */
    .digital-box { padding: 28px 22px; border-radius: 24px; margin-bottom: 0; }
    .digital-box h2 { font-size: 1.35rem; }
    .digital-box .sub { font-size: 0.9rem; }
    .qr-hero { display: none; }
    .mobile-only { display: flex; }
    .btn-primary { width: 100%; margin-top: 18px; }

    .share-box { padding: 30px 22px; border-radius: 24px; margin-bottom: 0; }
    .share-box h2 { font-size: 1.35rem; }
    .share-box > p { font-size: 0.9rem; }
    .share-url-row { flex-direction: column; }
    .share-url { text-align: center; }

    .workflow-header { margin: 4px 0 16px; }
    .workflow-grid { grid-template-columns: 1fr; gap: 12px; }
    .step-card { padding: 18px 20px; border-radius: 18px; display: flex; align-items: flex-start; gap: 16px; }
    .step-card::after { font-size: 64px; top: -6px; }
    .step-icon-box { width: 44px; height: 44px; margin-bottom: 0; flex-shrink: 0; }
    .step-icon-box [data-icon] { width: 20px; height: 20px; }
    .step-card h3 { font-size: 1rem; margin-bottom: 2px; }
    .step-card p { font-size: 0.85rem; }

    .asset-box { padding: 26px 22px; border-radius: 24px; }
    .support-box { padding: 30px 22px; border-radius: 24px; }

    /* Tab-Bar */
    .tabbar {
        display: flex;
        flex-shrink: 0;
        justify-content: space-around;
        align-items: stretch;
        background: rgba(252, 253, 254, 0.95);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid #eef2f6;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        z-index: 20;
    }

    .tab-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        background: none;
        border: none;
        font-family: inherit;
        font-size: 10px;
        font-weight: 700;
        color: var(--light-slate);
        padding: 7px 2px;
        border-radius: 12px;
        cursor: pointer;
        transition: color 0.2s;
        max-width: 96px;
    }

    .tab-btn [data-icon] { width: 21px; height: 21px; }
    .tab-btn.active { color: var(--navy); }
    .tab-btn.active .lucide { color: var(--accent); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
