/* ======================================================
   DESIGN SYSTEM — hell, freundlich, professionell
   Inspiriert von apple.com: viel Weißraum, klare Typo,
   dezente Farbe, weiche Karten, ruhige Bewegung.
   ====================================================== */
:root {
    --bg: #f5f5f6;
    --bg-alt: #ebebed;
    --ink: #17181a;
    --ink-2: #5f6166;
    --ink-3: #67696e;
    --accent: #e60012;
    --accent-hover: #c4000f;
    --accent-text: #c4000f; /* Text-Akzent: AA-Kontrast auch auf Silber tief */
    --border: rgba(0, 0, 0, 0.08);
    --border-soft: rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(230, 0, 18, 0.18); }

/* --- Gradient Text (Akzent-Highlight in Headlines) --- */
.gradient-text {
    background: linear-gradient(120deg, #ff2e00 0%, #e60012 55%, #a8000e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Eyebrow --- */
.eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-text);
}

/* --- Navigation (durchgehend transluzent, wie apple.com) --- */
.nav-blur {
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
#site-header.scrolled {
    box-shadow: 0 1px 14px rgba(0, 0, 0, 0.05);
}
.nav-link {
    color: rgba(29, 29, 31, 0.8);
    transition: color 0.2s ease;
}
.nav-link:hover { color: var(--ink); }

/* --- Hero Hintergrund: weiche Pastell-Orbs --- */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.hero-photo {
    position: absolute;
    inset: 0;
    display: block;
}
.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}
@media (max-width: 767px) {
    .hero-photo img { object-position: center 55%; }
}
/* Weiße Überlagerung – oben leicht, unten deckend, damit der Übergang zur nächsten Sektion weich bleibt */
.hero-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.72) 0%,
        rgba(255, 255, 255, 0.78) 45%,
        rgba(255, 255, 255, 0.90) 80%,
        #ffffff 100%
    );
}
.hero-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.4;
    mix-blend-mode: multiply;
    animation: float 24s ease-in-out infinite;
}
.hero-bg .orb-1 {
    width: 680px; height: 680px;
    background: #f5d9d4;
    top: -22%; left: -12%;
    animation-delay: 0s;
}
.hero-bg .orb-2 {
    width: 560px; height: 560px;
    background: #e6e6e9;
    bottom: -28%; right: -10%;
    animation-delay: -8s;
}
.hero-bg .orb-3 {
    width: 380px; height: 380px;
    background: #f8dedd;
    top: 38%; left: 56%;
    animation-delay: -16s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* --- Karten --- */
.card {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 30px -14px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, border-color 0.3s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03), 0 28px 56px -20px rgba(0, 0, 0, 0.14);
}
.card-alt {
    background: var(--bg-alt);
    border: 1px solid transparent;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, border-color 0.3s ease;
}
.card-alt:hover {
    background: #ffffff;
    border-color: var(--border-soft);
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03), 0 28px 56px -20px rgba(0, 0, 0, 0.14);
}
.card-featured {
    background: linear-gradient(135deg, #f5f0ef 0%, #efeff1 60%, #faefef 100%);
    border: 1px solid rgba(230, 0, 18, 0.08);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03), 0 28px 56px -20px rgba(230, 0, 18, 0.18);
}
.icon-wrap {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .icon-wrap,
.card-alt:hover .icon-wrap,
.card-featured:hover .icon-wrap {
    transform: scale(1.06);
}
.icon-tile {
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px -8px rgba(0, 0, 0, 0.12);
}

/* --- Buttons --- */
.btn-primary {
    background: var(--accent);
    color: #ffffff;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(230, 0, 18, 0.28);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: #ffffff;
    color: var(--ink);
    border: 1px solid rgba(0, 0, 0, 0.12);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-secondary:hover {
    background: var(--bg-alt);
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.15);
}

.link-arrow {
    color: var(--accent-text);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.link-arrow svg { transition: transform 0.2s ease; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-arrow:hover svg { transform: translateX(3px); }

/* --- Showcase Tile (ani.coach) --- */
.showcase-tile {
    background: linear-gradient(135deg, #fdf1f1 0%, #f3f3f5 55%, #fbecec 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- Prozess-Linie --- */
.process-line {
    position: absolute;
    left: 24px;
    top: 60px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(230, 0, 18, 0.25), rgba(230, 0, 18, 0.12), transparent);
}

/* --- FAQ --- */
.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px -14px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}
.faq-item[open] {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03), 0 20px 40px -18px rgba(0, 0, 0, 0.12);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary { list-style: none; }

/* --- Tag Pills --- */
.tag {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-soft);
    font-size: 0.75rem;
    color: var(--ink-2);
}
.tag-alt {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    background: var(--bg-alt);
    border: 1px solid transparent;
    font-size: 0.75rem;
    color: var(--ink-2);
}

/* --- Kontaktformular --- */
.form-label { display: block; font-size: .8125rem; font-weight: 600; color: var(--ink); margin-bottom: .375rem; }
.form-input {
    width: 100%; background: #fff; border: 1px solid rgba(0,0,0,.12); border-radius: 12px;
    padding: .75rem 1rem; font-size: .9375rem; color: var(--ink); font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.form-input:focus { outline: none; border-color: rgba(230,0,18,.45); box-shadow: 0 0 0 3px rgba(230,0,18,.12); }
.form-input::placeholder { color: var(--ink-3); }
textarea.form-input { resize: vertical; min-height: 140px; }
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* --- Scroll offset for fixed header --- */
:target { scroll-margin-top: 80px; }

/* --- Custom scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #ffffff; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.25); }

/* --- Mobile nav animation --- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
#mobile-menu.open { max-height: 460px; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .hero-bg .orb { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .card, .card-alt, .card-featured, .btn-primary, .btn-secondary { transition: none; }
}

/* ======================================== */
/* CHATBOT STYLES (light)                    */
/* ======================================== */
#chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 60;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff2e00, #e60012);
    box-shadow: 0 10px 30px rgba(230, 0, 18, 0.35), 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    border: none;
}
#chatbot-toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 14px 36px rgba(230, 0, 18, 0.4), 0 2px 6px rgba(0, 0, 0, 0.08);
}
#chatbot-toggle .notification-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #34c759;
    border: 2px solid #ffffff;
}
#chatbot-toggle.open .notification-dot { display: none; }

#chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 60;
    width: calc(100vw - 48px);
    max-width: 400px;
    height: 600px;
    max-height: calc(100vh - 140px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
#chatbot-window.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.chatbot-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, #f5f0ef, #efeff1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}
.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff2e00, #e60012);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}
.chatbot-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #34c759;
    border: 2px solid #ffffff;
}
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.12); border-radius: 2px; }

.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: msg-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }
.chat-msg .bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.chat-msg.bot .bubble {
    background: #ebebed;
    color: #17181a;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom-left-radius: 4px;
}
.chat-msg.user .bubble {
    background: linear-gradient(135deg, #ff2e00, #e60012);
    color: white;
    border-bottom-right-radius: 4px;
}
.chat-msg .bubble a {
    color: #c4000f;
    text-decoration: underline;
}
.chat-msg.user .bubble a { color: white; }

.chat-typing {
    display: inline-flex;
    gap: 4px;
    padding: 12px 16px;
    background: #ebebed;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    animation: msg-in 0.3s ease;
}
.chat-typing span {
    width: 6px;
    height: 6px;
    background: #a1a1a6;
    border-radius: 50%;
    animation: typing-bounce 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    align-self: flex-start;
    max-width: 100%;
}
.quick-reply-btn {
    background: #fde8e9;
    border: 1px solid rgba(230, 0, 18, 0.2);
    color: #c4000f;
    padding: 7px 12px;
    border-radius: 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.quick-reply-btn:hover {
    background: #fbd5d8;
    border-color: rgba(230, 0, 18, 0.4);
    transform: translateY(-1px);
}

.chatbot-input-area {
    padding: 12px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: #ffffff;
}
.chatbot-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #ebebed;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 4px 4px 4px 14px;
    transition: border-color 0.2s, background-color 0.2s;
}
.chatbot-input-wrap:focus-within {
    border-color: rgba(230, 0, 18, 0.5);
    background: #ffffff;
}
#chatbot-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #17181a;
    font-size: 14px;
    padding: 8px 0;
    font-family: inherit;
}
#chatbot-input::placeholder { color: #67696e; }
#chatbot-send {
    background: var(--accent);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    flex-shrink: 0;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
#chatbot-send:hover { transform: scale(1.05); background: var(--accent-hover); }
#chatbot-send:disabled { opacity: 0.5; cursor: not-allowed; }

.chatbot-footer {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px 16px;
    background: #ffffff;
}
.chatbot-cta {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #5f6166;
    background: #ffffff;
}
.chatbot-cta:hover {
    border-color: rgba(230, 0, 18, 0.4);
    background: #fde8e9;
    color: #c4000f;
}

@media (max-width: 480px) {
    #chatbot-window {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 90px;
        height: calc(100vh - 120px);
    }
    #chatbot-toggle {
        bottom: 16px;
        right: 16px;
    }
}
