/* KAINZLEI — Global Stylesheet v26.02 */

:root {
    --k-bg:           #f8f8f6;
    --k-text:         #1e1e2e;
    --k-accent:       #6366f1;
    --k-accent-dark:  #4f46e5;
    --k-accent-light: #818cf8;
    --k-accent-pale:  #eef2ff;
    --k-muted:        #6b7280;
    --k-border:       #e5e7eb;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter Tight', sans-serif;
    background: var(--k-bg);
    color: var(--k-text);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== BRAND LOGO — gradient text, GSAP animates background-position ===== */
.brand-logo {
    background: linear-gradient(110deg, #1a1a2e 0%, #6366f1 40%, #818cf8 60%, #1a1a2e 100%);
    background-size: 250% 100%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Archivo Black', sans-serif;
    display: inline-block;
    text-decoration: none;
}

/* ===== NAVIGATION ===== */
#kainzlei-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s;
}

#kainzlei-nav .brand-logo {
    font-size: 0.875rem;
    letter-spacing: 0.2em;
}

.nav-contact {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--k-accent);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: opacity 0.2s;
}

.nav-contact:hover { opacity: 0.65; }

#kainzlei-nav.scrolled {
    background: rgba(248, 248, 246, 0.93);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 2px 32px rgba(0, 0, 0, 0.06);
}

/* Nav on dark pages */
#kainzlei-nav.nav-dark .brand-logo {
    background: linear-gradient(110deg, #a5b4fc 0%, #818cf8 35%, #6366f1 65%, #a5b4fc 100%);
    background-size: 250% 100%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#kainzlei-nav.nav-dark .nav-contact {
    color: rgba(255, 255, 255, 0.55);
}

#kainzlei-nav.nav-dark.scrolled {
    background: rgba(10, 10, 10, 0.88);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 32px rgba(0, 0, 0, 0.4);
}


/* ===== SURVEY — Shared card styles ===== */
.survey-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    min-height: 56px;
    text-align: left;
    position: relative;
}

.survey-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.07);
}

.survey-card.selected {
    border-color: #6366f1;
    background: #eef2ff;
}

.survey-card .check-mark {
    opacity: 0;
    color: #6366f1;
    font-size: 1.1rem;
    transition: opacity 0.15s;
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.survey-card.selected .check-mark { opacity: 1; }

.survey-card input[type="radio"],
.survey-card input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Step transitions */
.survey-step { display: none; }
.survey-step.active { display: block; }

/* Progress bar */
#survey-progress-inner {
    height: 100%;
    background: #6366f1;
    border-radius: 9999px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Results bars */
.result-bar-fill {
    height: 100%;
    background: #6366f1;
    border-radius: 9999px;
    transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== MOBILE — Navigation ===== */
@media (max-width: 767px) {
    #kainzlei-nav {
        padding: 1rem 1.25rem;
    }
    #kainzlei-nav .brand-logo {
        font-size: 0.8125rem;
    }
}

/* ===== MOBILE — Survey ===== */
@media (max-width: 480px) {
    .survey-card {
        padding: 0.875rem 1rem;
        min-height: 50px;
    }
}

/* ===== MOBILE — Contact Form ===== */
@media (max-width: 600px) {
    .cf-source-grid {
        grid-template-columns: 1fr !important;
    }
    .cf-source-card[style*="grid-column:span 2"] {
        grid-column: span 1 !important;
    }
    .cf-btn-next, .cf-btn-submit {
        width: 100%;
        text-align: center;
        margin-left: 0;
    }
    .cf-nav {
        flex-direction: column-reverse;
        gap: 0.625rem;
    }
    .cf-btn-back {
        text-align: center;
        width: 100%;
    }
}

/* ─── FOOTER ─── */
#kainzlei-footer {
    background: #08071c;
    position: relative;
    padding: 1.75rem 2.5rem;
}
#kainzlei-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(99,102,241,0.5) 25%,
        rgba(129,140,248,0.35) 75%,
        transparent 100%
    );
}
.kf-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.kf-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.kf-brand {
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.625rem;
    letter-spacing: 0.32em;
    color: rgba(232,228,255,0.7);
}
.kf-copy {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.6875rem;
    color: rgba(232,228,255,0.22);
    letter-spacing: 0.02em;
}
.kf-links {
    display: flex;
    align-items: center;
    gap: 1.875rem;
}
.kf-links a {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(232,228,255,0.38);
    text-decoration: none;
    transition: color 0.2s;
}
.kf-links a:hover { color: rgba(129,140,248,0.85); }
.kf-tel {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(99,102,241,0.65);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}
.kf-tel:hover { color: rgba(129,140,248,1); }
@media (max-width: 767px) {
    #kainzlei-footer { padding: 1.375rem 1.25rem; }
    .kf-inner { flex-direction: column; align-items: flex-start; gap: 0.875rem; }
    .kf-left { gap: 1rem; }
}

/* ─── KONTAKT-MODAL — Mobile slide-up ─── */
@media (max-width: 600px) {
    #kainzlei-modal {
        padding: 0 !important;
        display: flex !important;
        align-items: flex-end !important;
    }
    #kainzlei-modal[style*="display:none"] { display: none !important; }
    #kainzlei-modal-box {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 1.25rem 1.25rem 0 0 !important;
        max-height: 92vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #kainzlei-modal-box > div:last-child { padding: 1.25rem 1.375rem 2rem !important; }
}

/* ─── KONTAKT-MODAL Close-Button — robust auf Touch ─── */
#kainzlei-modal-close {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 40px; height: 40px;
    cursor: pointer;
    color: rgba(232,228,255,0.55);
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(99,102,241,0.25);
    padding: 0;
    line-height: 1;
}
#kainzlei-modal-close > span { pointer-events: none; display: block; line-height: 1; }
@media (hover: hover) {
    #kainzlei-modal-close:hover {
        background: rgba(255,255,255,0.12);
        color: #e8e4ff;
    }
}
#kainzlei-modal-close:active {
    background: rgba(99,102,241,0.25);
    color: #e8e4ff;
}
@media (max-width: 600px) {
    #kainzlei-modal-close { width: 44px; height: 44px; font-size: 1.125rem; }
}
