/* ==========================================================================
   ASK CONNECT – zentrales Stylesheet
   Wird von allen Seiten geladen. Struktur:
   1. Basis & Variablen   5. Karten / Grids
   2. Hintergrund         6. Team
   3. Header / Navigation 7. Formulare
   4. Sektionen / Hero    8. Chat (Projekt-Check)
                          9. Footer & Utilities
   ========================================================================== */

/* ---------- 1. Basis & Variablen ---------- */
:root {
    --bg-deep: #0c0c1e;
    --bg-mid: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.8);
    --cyan: #00d4ff;
    --magenta: #ff006e;
    --violet: #8b5cf6;
    --line: rgba(0, 212, 255, 0.3);
    --line-soft: rgba(0, 212, 255, 0.15);
    --text: #ffffff;
    --radius: 15px;
    --radius-lg: 20px;
    --header-h: 76px;

    /* n8n-Chat-Widget */
    --chat--color-primary: #111827;
    --chat--color-primary-shade-50: #1e293b;
    --chat--color-primary-shade-100: #0f172a;
    --chat--color-secondary: #20b69e;
    --chat--color-secondary-shade-50: #1ca08a;
    --chat--color-white: #ffffff;
    --chat--color-light: #ffffff;
    --chat--color-light-shade-50: #e6e9f1;
    --chat--color-light-shade-100: #c2c5cc;
    --chat--color-medium: #d2d4d9;
    --chat--color-dark: #101330;
    --chat--color-disabled: #777980;
    --chat--color-typing: #404040;
    --chat--spacing: 1rem;
    --chat--border-radius: 0.25rem;
    --chat--transition-duration: 0.15s;
    --chat--window--width: 440px;
    --chat--window--height: 660px;
    --chat--window--border-radius: 18px;
    --chat--header-height: auto;
    --chat--header--padding: var(--chat--spacing);
    --chat--header--background: #111827;
    --chat--header--color: var(--chat--color-white);
    --chat--heading--font-size: 2em;
    --chat--subtitle--font-size: inherit;
    --chat--subtitle--line-height: 1.8;
    --chat--textarea--height: 50px;
    --chat--message--font-size: 1rem;
    --chat--message--padding: var(--chat--spacing);
    --chat--message--border-radius: var(--chat--border-radius);
    --chat--message-line-height: 1.8;
    --chat--message--bot--background: #ffffff;
    --chat--message--bot--color: #101330;
    --chat--message--bot--border: 1px solid #e6e9f1;
    --chat--message--user--background: #111827;
    --chat--message--user--color: #ffffff;
    --chat--message--user--border: none;
    --chat--message--pre--background: rgba(0, 0, 0, 0.05);
    --chat--toggle--background: #ffffff;
    --chat--toggle--hover--background: #f2f4f8;
    --chat--toggle--active--background: #e6e9f1;
    --chat--toggle--color: #e60da8;
    --chat--toggle--size: 60px;

    /* Achtung: --chat--window--bottom positioniert nicht nur das Fenster, sondern
       den gesamten Wrapper inklusive Bubble – und n8n rechnet daraus zusätzlich
       max-height: calc(100% - bottom * 2). Ein großer Wert drückt die Bubble nach
       oben UND quetscht das Fenster zusammen. Deshalb bewusst klein halten. */
    --chat--window--bottom: 1.5rem;
    --chat--window--right: 1.5rem;
}

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

/* Die Hintergrundfarbe muss am <html>-Element hängen, nicht nur am <body>:
   Beim Überscrollen auf dem Handy (Gummiband-Effekt) und beim Ein-/Ausfahren
   der Adressleiste wird kurz die Fläche dahinter sichtbar – ohne diese Angabe
   ist die weiß. */
html {
    background-color: #0c0c1e;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    font-family: 'Arial', Helvetica, sans-serif;
    background: linear-gradient(135deg, #0c0c1e 0%, #1a1a2e 50%, #16213e 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-h);
}

img, video, iframe { max-width: 100%; height: auto; display: block; }

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

/* ---------- 2. Hintergrund ---------- */
.particles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--cyan);
    border-radius: 50%;
    animation: float 8s infinite linear;
    opacity: 0.7;
}

@keyframes float {
    0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-10px) rotate(360deg); opacity: 0; }
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ---------- 3. Header / Navigation ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    background: rgba(12, 12, 30, 0.95);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
}

.nav {
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand img {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: contain;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease;
}

.nav-links a:hover { background: rgba(0, 212, 255, 0.12); }

.nav-links a.active {
    color: var(--cyan);
    background: rgba(0, 212, 255, 0.1);
}

.nav-links .nav-cta {
    margin-left: 0.5rem;
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    color: #fff;
    font-weight: bold;
}

/* Projekt-Check als Gegenstück zum Kontakt-Button: weiße Fläche, Schrift im
   Verlauf. `background-clip: text` färbt die Buchstaben – deshalb braucht der
   Verlauf einen eigenen Träger, sonst würde er die weiße Fläche überschreiben. */
.nav-links a.nav-check {
    margin-left: 0.5rem;
    background: #ffffff;
    font-weight: bold;
    border: 1px solid #ffffff;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.nav-links a.nav-check,
.nav-links a.nav-check.active,
.nav-links a.nav-check:hover {
    color: transparent;
}

.nav-links a.nav-check::before {
    content: attr(data-label);
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links a.nav-check {
    position: relative;
}

.nav-links a.nav-check:hover {
    background: #ffffff;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.mobile-nav-links a.nav-check {
    color: var(--cyan);
    font-weight: bold;
}

/* Der Kontakt-Button behält seinen Verlauf auch auf der Kontaktseite */
.nav-links a.nav-cta.active {
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    color: #fff;
}

.nav-links .nav-cta:hover {
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    filter: brightness(1.12);
}

/* Burger */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.burger span {
    display: block;
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    transition: all 0.3s ease;
}

.burger.active span:nth-child(1) { transform: translateY(8px) rotate(-45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-8px) rotate(45deg); }

/* Mobile-Menü */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 82%;
    max-width: 320px;
    height: 100vh;
    background: rgba(12, 12, 30, 0.97);
    backdrop-filter: blur(20px);
    border-right: 2px solid var(--line);
    z-index: 1000;
    transition: left 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
}

.mobile-menu.active { left: 0; }

.mobile-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--line-soft);
}

.mobile-menu-header .brand-name { font-size: 1.3rem; }

.mobile-nav-links { list-style: none; padding: 1rem 0; }

.mobile-nav-links a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    border-left: 4px solid transparent;
    transition: all 0.25s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: rgba(0, 212, 255, 0.1);
    border-left-color: var(--cyan);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active { opacity: 1; visibility: visible; }

@media (max-width: 980px) {
    .nav-links { display: none; }
    .burger { display: flex; }
}

/* ---------- 4. Sektionen / Hero ---------- */
section {
    position: relative;
    z-index: 10;
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header { text-align: center; margin-bottom: 3.5rem; }

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--cyan), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.section-header p { opacity: 0.85; font-size: 1.05rem; }

.page-hero {
    text-align: center;
    padding: 5rem 1.5rem 2rem;
}

.page-hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--cyan), var(--magenta), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.15;
}

.page-hero p { font-size: 1.2rem; opacity: 0.9; max-width: 720px; margin: 0 auto; }

.hero {
    text-align: center;
    padding: 6rem 1.5rem 5rem;
    min-height: calc(100vh - var(--header-h));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--cyan), var(--magenta), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGlow 3s ease-in-out infinite;
    line-height: 1.15;
}

@keyframes textGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5)); }
    50%      { filter: drop-shadow(0 0 20px rgba(255, 0, 110, 0.5)); }
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 640px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.cta-button {
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-family: inherit;
    color: #fff;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before { left: 100%; }

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.cta-button.secondary {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--cyan);
}

.cta-button.secondary:hover { background: rgba(0, 212, 255, 0.1); }

/* Abschluss-CTA-Block */
.cta-band {
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 110, 0.1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    margin: 2rem auto 4rem;
    max-width: 1200px;
    position: relative;
    z-index: 10;
}

.cta-band h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.cta-band p { opacity: 0.9; margin-bottom: 1.75rem; }

/* Roboter-Figur im Hero.
   Das Video ist 1280x720 gross, der Roboter sitzt darin unten links bei
   x 202..642 und y 290..719 (gemessen ueber sechs Frames wegen der
   Winkbewegung). Der Rahmen umschliesst deshalb nur den Roboter, das Video
   wird darin vergroessert und verschoben:
     Hoehe   720/430 = 167,44 % der Rahmenhoehe
     Versatz 202/441 =  45,80 % der Rahmenbreite nach links
   Dadurch bleibt `bottom`/`left` am Rahmen so bedienbar wie bei einem Bild.

   Fallback: Safari spielt VP9-WebM zwar ab, ignoriert aber den Alphakanal –
   das Video haette dort einen schwarzen Kasten. main.js prueft das per
   Canvas und setzt dann die Klasse `still`, die auf das PNG umschaltet. */
.hero-bot {
    position: absolute;
    bottom: 4%;
    left: 3%;
    /* Der Roboter rendert rund 1,6-mal so hoch wie dieser Wert – am fertigen
       Hero nachgemessen. 200 px ergeben also eine Figur von rund 320 px. */
    height: 200px;
    aspect-ratio: 441 / 430;
    z-index: 2;
    pointer-events: none;
}

/* Nur das Standbild schwebt. Das Video bringt seine eigene Bewegung mit –
   beides zusammen wirkt unruhig. */
.hero-bot.still { animation: botHover 4s ease-in-out infinite; }

.hero-bot video {
    position: absolute;
    bottom: 0;
    left: -45.80%;
    height: 167.44%;
    width: auto;
    max-width: none;
    filter: drop-shadow(0 12px 30px rgba(0, 212, 255, 0.28));
}

.hero-bot img {
    display: none;
    height: 100%;
    width: auto;
    max-width: none;
    filter: drop-shadow(0 12px 30px rgba(0, 212, 255, 0.28));
}

/* Standbild statt Video: kein Alphakanal im Browser oder Bewegung unerwuenscht */
.hero-bot.still { aspect-ratio: 460 / 684; }
.hero-bot.still video { display: none; }
.hero-bot.still img { display: block; }

@media (prefers-reduced-motion: reduce) {
    .hero-bot { aspect-ratio: 460 / 684; }
    .hero-bot video { display: none; }
    .hero-bot img { display: block; }
}

@keyframes botHover {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* ---------- 5. Karten / Grids ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 110, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--cyan);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.feature-card:hover::before { opacity: 1; }

/* Icons sind Inline-SVGs (Lucide, ISC). `currentColor` sorgt dafür, dass sie
   die Akzentfarbe erben – kein externer Font, überall gleiche Darstellung. */
.feature-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid var(--line);
    color: var(--cyan);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.feature-icon svg { width: 27px; height: 27px; }

.feature-card:hover .feature-icon {
    background: rgba(0, 212, 255, 0.18);
    border-color: var(--cyan);
    transform: translateY(-2px);
}

.feature-card h3 { font-size: 1.4rem; margin-bottom: 0.85rem; position: relative; z-index: 2; }
.feature-card p  { opacity: 0.85; position: relative; z-index: 2; }

/* Benefits */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 110, 0.1));
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 2.25rem;
    transition: all 0.35s ease;
    backdrop-filter: blur(10px);
}

.benefit-card:hover {
    transform: translateY(-6px);
    border-color: var(--cyan);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(255, 0, 110, 0.18));
    box-shadow: 0 18px 36px rgba(0, 212, 255, 0.15);
}

.benefit-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.benefit-icon {
    width: 58px;
    height: 58px;
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.benefit-icon svg { width: 26px; height: 26px; }

.benefit-card h3 {
    font-size: 1.3rem;
    background: linear-gradient(45deg, #ffffff, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.benefit-card p { opacity: 0.9; line-height: 1.7; }

.benefit-highlight, .step-highlight, .faq-highlight {
    color: var(--cyan);
    font-weight: bold;
}

/* Prozess-Timeline */
.process-container { max-width: 1000px; margin: 0 auto; }
.process-timeline { position: relative; }

.process-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--cyan), var(--magenta));
    transform: translateX(-50%);
}

.process-step {
    position: relative;
    margin-bottom: 3.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.process-step.visible { opacity: 1; transform: translateY(0); }

.process-step:nth-child(even) .step-content { margin-left: auto; text-align: right; }
.process-step:nth-child(even) .process-number { left: auto; right: -30px; }

.process-number {
    position: absolute;
    left: -30px;
    top: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 2;
}

.step-content {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 0 4rem;
    width: calc(50% - 2rem);
}

.step-content h3 {
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* FAQ */
.faq-container { max-width: 1000px; margin: 0 auto; }

.faq-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.faq-category {
    padding: 0.7rem 1.4rem;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.faq-category.active,
.faq-category:hover {
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    border-color: transparent;
    transform: translateY(-2px);
}

.faq-items { display: flex; flex-direction: column; gap: 1rem; }

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.hidden { display: none; }

.faq-question {
    padding: 1.35rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background 0.3s ease;
}

.faq-question:hover { background: rgba(0, 212, 255, 0.08); }
.faq-question h4 { font-size: 1.05rem; font-weight: bold; }

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--cyan);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer { max-height: 800px; padding: 0 1.5rem 1.5rem; }

.faq-answer p  { margin: 0 0 0.85rem; opacity: 0.9; }
.faq-answer ul { margin-left: 1.2rem; opacity: 0.9; }

.faq-example {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

/* ---------- 6. Team ---------- */
.team-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.team-member {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    border-color: var(--cyan);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.team-member:nth-child(even) { flex-direction: row-reverse; }

.member-image { flex-shrink: 0; }

/* Abgerundetes Hochformat statt Kreis: die Portraits haben unterschiedliche
   Seitenverhältnisse (quadratisch bzw. hochkant). Im 5:6-Rahmen genügt ein
   minimaler seitlicher Beschnitt – kein Letterboxing, kein "Reinzoomen". */
.member-image img {
    width: 210px;
    height: 252px;
    object-fit: cover;
    object-position: center top;
    border-radius: 24px;
    border: 3px solid var(--cyan);
    background: #12172e;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.25);
    transition: box-shadow 0.3s ease;
}

.team-member:hover .member-image img { box-shadow: 0 0 35px rgba(0, 212, 255, 0.45); }

.member-info h3 {
    font-size: 1.9rem;
    margin-bottom: 0.85rem;
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.member-info h3 a { text-decoration: none; color: inherit; }

/* Rollenhinweis unter dem Namen, z. B. "Ruhender Gesellschafter" */
.member-role {
    display: inline-block;
    margin-bottom: 0.85rem;
    padding: 0.25rem 0.7rem;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    font-size: 0.8rem !important;
    opacity: 0.8;
}

/* Klammerzusatz im Impressum */
.hinweis { opacity: 0.7; font-size: 0.9em; }
.member-info p { font-size: 1.02rem; line-height: 1.8; opacity: 0.9; }

/* ---------- 7. Formulare ---------- */
.contact-form {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    background: rgba(12, 12, 30, 0.7);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group textarea { resize: vertical; min-height: 130px; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255, 255, 255, 0.4); }

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.form-group input.invalid,
.form-group textarea.invalid { border-color: var(--magenta); }

.form-hint { font-size: 0.82rem; opacity: 0.6; margin-top: 1rem; text-align: center; }

.form-note {
    display: none;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.form-note.show { display: block; }

/* Fehlermeldungen deutlich vom grünen Erfolgshinweis unterscheiden */
.form-note.error {
    background: rgba(255, 0, 110, 0.12);
    border-color: rgba(255, 0, 110, 0.4);
    color: #ffb3d1;
}

.contact-form .cta-button { width: 100%; text-align: center; }

/* Kontakt-Infokarten */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 3rem auto 0;
}

.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.contact-info-card .icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid var(--line);
    color: var(--cyan);
}

.contact-info-card .icon svg { width: 22px; height: 22px; }
.contact-info-card h4 { color: var(--cyan); margin-bottom: 0.4rem; font-size: 1rem; }
.contact-info-card p, .contact-info-card a { font-size: 0.95rem; opacity: 0.9; text-decoration: none; }

/* Rechtstexte */
.legal { max-width: 820px; }
.legal h2 { font-size: 1.4rem; margin: 2.5rem 0 0.85rem; color: var(--cyan); }
.legal h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.legal p, .legal li { opacity: 0.9; margin-bottom: 0.75rem; }
.legal ul { margin-left: 1.25rem; }

/* ---------- 8. Chat (Projekt-Check) ---------- */
/* Die Chat-Seite füllt exakt den Viewport – gescrollt wird nur im Verlauf.
   Wichtig: feste `height`, nicht `min-height`. Ein Flex-Container mit bloßer
   Mindesthöhe ist in der Höhe unbestimmt; die Kinder schrumpfen dann nicht,
   sondern der Container wächst mit – auf dem Handy lief dadurch die ganze
   Seite über den Bildschirmrand hinaus. `dvh` fängt zusätzlich die ein- und
   ausfahrende Adressleiste mobiler Browser ab. */
body.chat-body {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-page {
    position: relative;
    z-index: 10;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    padding: 0;
    background: rgba(10, 10, 26, 0.55);
    backdrop-filter: blur(2px);
}

.chat-topbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(12, 12, 30, 0.6);
    backdrop-filter: blur(10px);
}

.chat-topbar-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: bold;
    font-size: 1.05rem;
}

.chat-topbar-sub {
    font-size: 0.8rem;
    opacity: 0.55;
    font-weight: normal;
}

.chat-topbar-actions { margin-left: auto; display: flex; gap: 0.5rem; }

.chat-btn {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid var(--line);
    color: var(--cyan);
    border-radius: 10px;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.chat-btn:hover { background: rgba(0, 212, 255, 0.18); border-color: var(--cyan); }

.chat-btn.primary {
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    border-color: transparent;
    color: #fff;
    font-weight: bold;
}

/* min-height: 0 ist hier zwingend: ohne die Angabe steht min-height auf `auto`,
   das Element kann nicht unter seine Inhaltshöhe schrumpfen, die Chat-Seite wird
   höher als der Viewport und die ganze Seite scrollt unter den Header weg. */
.chat-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
}

.chat-scroll::-webkit-scrollbar { width: 8px; }
.chat-scroll::-webkit-scrollbar-track { background: transparent; }
.chat-scroll::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.3); border-radius: 10px; }

.chat-thread {
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.chat-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    animation: chatIn 0.3s ease-out;
}

@keyframes chatIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: bold;
}

.chat-row.bot .chat-avatar {
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    color: #08121f;
}

.chat-row.user .chat-avatar {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--line-soft);
}

.chat-bubble { padding-top: 0.35rem; min-width: 0; }

.chat-name {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.5;
    margin-bottom: 0.3rem;
}

.chat-text {
    font-size: 1rem;
    line-height: 1.75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-text p { margin-bottom: 0.75rem; }
.chat-text p:last-child { margin-bottom: 0; }
.chat-text ul, .chat-text ol { margin: 0.5rem 0 0.75rem 1.25rem; }
.chat-text li { margin-bottom: 0.3rem; }
.chat-text code {
    background: rgba(0, 0, 0, 0.35);
    padding: 0.1rem 0.35rem;
    border-radius: 5px;
    font-size: 0.92em;
}
.chat-text strong { color: var(--cyan); }

/* Startbildschirm */
.chat-welcome {
    max-width: 780px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 1rem;
    text-align: center;
}

.chat-welcome h1 {
    font-size: 1.7rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--cyan), var(--magenta), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chat-welcome > p { opacity: 0.85; margin-bottom: 0.9rem; }

/* Rahmen um Eckdaten und Datenschutzhinweis – fasst beides zu einem Block
   zusammen, statt zwei lose Elemente nebeneinander stehen zu lassen. */
.chat-briefing {
    max-width: 660px;
    margin: 0 auto 1rem;
    padding: 0.9rem 1.1rem 1rem;
    background: rgba(18, 18, 38, 0.55);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
}

/* Eckdaten zum Ablauf: Dauer, Anzahl der Blöcke, Ergebnis */
.chat-facts {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.chat-facts li {
    background: rgba(0, 212, 255, 0.07);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    padding: 0.45rem 0.95rem;
    font-size: 0.86rem;
    opacity: 0.9;
}

.chat-facts strong { color: var(--cyan); }

.chat-privacy {
    margin: 0;
    padding: 0.7rem 1.1rem;
    background: rgba(255, 0, 110, 0.07);
    border: 1px solid rgba(255, 0, 110, 0.25);
    border-radius: 12px;
    font-size: 0.88rem;
    opacity: 0.95;
}

.chat-privacy strong { color: #ff7ab0; }

.chat-start { font-size: 0.92rem; opacity: 0.85; margin-bottom: 0.85rem; }

.chat-suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.85rem;
    text-align: left;
}

.chat-suggestion {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.93rem;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-suggestion:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: var(--cyan);
    transform: translateY(-2px);
}

.chat-suggestion .s-title { display: block; font-weight: bold; color: var(--cyan); margin-bottom: 0.2rem; }

/* Tipp-Indikator */
.chat-typing { display: flex; gap: 0.35rem; align-items: center; padding-top: 0.9rem; }

.chat-dot {
    width: 7px;
    height: 7px;
    background: var(--cyan);
    border-radius: 50%;
    animation: chatBounce 1.4s ease-in-out infinite;
}

.chat-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-6px); opacity: 1; }
}

/* Fehlerbanner */
.chat-error {
    display: none;
    max-width: 780px;
    margin: 0 auto 1rem;
    padding: 0.8rem 1.1rem;
    background: rgba(255, 0, 110, 0.15);
    border: 1px solid rgba(255, 0, 110, 0.35);
    border-radius: 12px;
    font-size: 0.9rem;
    color: #ffaacc;
}

.chat-error.show { display: block; }
.chat-error a { color: var(--magenta); }

/* Eingabeleiste */
.chat-composer-wrap {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem 1.25rem;
}

.chat-composer {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    background: rgba(18, 18, 38, 0.95);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0.6rem 0.6rem 0.6rem 1.1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-composer:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.15);
}

.chat-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: none;
    max-height: 200px;
    padding: 0.45rem 0;
}

.chat-input::placeholder { color: rgba(255, 255, 255, 0.4); }

.chat-send {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), #0080cc);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-send:hover:not(:disabled) { transform: scale(1.07); }
.chat-send:disabled { opacity: 0.35; cursor: not-allowed; }

/* Diktier-Knopf – nur sichtbar, wenn der Browser Spracherkennung kann */
.chat-mic {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(0, 212, 255, 0.08);
    color: var(--cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-mic svg { width: 19px; height: 19px; }

.chat-mic:hover { background: rgba(0, 212, 255, 0.2); border-color: var(--cyan); }

.chat-mic.recording {
    background: var(--magenta);
    border-color: var(--magenta);
    color: #fff;
    animation: micPulse 1.4s ease-in-out infinite;
}

@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 110, 0.5); }
    50%      { box-shadow: 0 0 0 8px rgba(255, 0, 110, 0); }
}

.chat-legal {
    max-width: 780px;
    margin: 0.6rem auto 0;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.5;
}

.chat-legal a { color: rgba(0, 212, 255, 0.8); }

/* Debug-Panel der Diktierfunktion – erscheint nur bei #micdebug in der URL */
.mic-debug {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 9998;
    width: 100%;
    max-height: 45vh;
    overflow-y: auto;
    padding: 0.6rem 0.8rem;
    background: rgba(0, 0, 0, 0.88);
    border-top: 2px solid var(--magenta);
    color: #9ef;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.45;
}

.mic-debug strong { color: var(--magenta); display: block; margin-bottom: 0.35rem; }

/* ---------- 9. Footer & Utilities ---------- */
.site-footer {
    background: rgba(12, 12, 30, 0.9);
    border-top: 1px solid var(--line-soft);
    padding: 3rem 1.5rem 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid h4 {
    color: var(--cyan);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-grid p, .footer-grid li { font-size: 0.88rem; opacity: 0.85; margin-bottom: 0.55rem; line-height: 1.6; }
.footer-grid ul { list-style: none; }
.footer-grid a { color: #fff; text-decoration: none; opacity: 0.85; }
.footer-grid a:hover { color: var(--cyan); opacity: 1; }

.footer-social { display: flex; gap: 1.25rem; margin-top: 1rem; }

.footer-social a {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--cyan);
    font-size: 0.88rem;
    transition: opacity 0.3s ease;
}

.footer-social a:hover { opacity: 0.7; }

.footer-bottom {
    max-width: 1200px;
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line-soft);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Links positioniert, damit der Button der Chat-Bubble unten rechts
   nicht in die Quere kommt. */
.scroll-top {
    position: fixed;
    bottom: 1.75rem;
    left: 1.75rem;
    background: linear-gradient(45deg, var(--cyan), var(--magenta));
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.scroll-top svg { width: 22px; height: 22px; }

.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3); }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 3rem; }
    .page-hero h1 { font-size: 2.5rem; }
    .hero-bot { height: 130px; left: 1.5%; bottom: 4%; }
}

@media (max-width: 768px) {
    :root { --header-h: 68px; }

    .section-header h2 { font-size: 2.1rem; }
    .hero { padding: 4rem 1.25rem 4rem; }
    .hero h1 { font-size: 2.3rem; }
    .hero p { font-size: 1.1rem; }
    .page-hero { padding: 3rem 1.25rem 1rem; }
    .page-hero h1 { font-size: 2rem; }

    section { padding: 3rem 1.25rem; }

    .brand img { width: 40px; height: 40px; }
    .brand-name { font-size: 1.15rem; }

    .features, .benefits-grid { grid-template-columns: 1fr; }

    .team-member,
    .team-member:nth-child(even) {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2rem 1.25rem;
    }

    .member-image img { width: 175px; height: 210px; margin: 0 auto; }

    .process-timeline::before { display: none; }

    .process-number {
        position: relative;
        left: auto !important;
        right: auto !important;
        margin: 0 auto 1rem;
    }

    .process-step:nth-child(even) .step-content,
    .step-content {
        width: 100%;
        margin: 0;
        text-align: left;
    }

    .contact-form { padding: 1.75rem 1.25rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-social { justify-content: center; }

    /* Auf dem Handy fehlt neben Überschrift, Text und zwei Buttons schlicht der
       Platz – die Roboter-Figur lag sonst über den Buttons und machte sie
       unklickbar. Ab Tablet-Breite ist sie wieder da. */
    .hero-bot { display: none; }

    .chat-topbar { padding: 0.7rem 1rem; gap: 0.6rem; }
    .chat-topbar-sub { display: none; }
    .chat-topbar-title { font-size: 0.95rem; white-space: nowrap; }
    .chat-btn { padding: 0.45rem 0.7rem; font-size: 0.8rem; }
    .chat-thread, .chat-welcome { padding-left: 1rem; padding-right: 1rem; }
    .chat-composer-wrap { padding: 0.5rem 1rem 1rem; }
    .chat-suggestions { grid-template-columns: 1fr; }
    .scroll-top { width: 46px; height: 46px; bottom: 1.25rem; left: 1.25rem; }
    .scroll-top svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
