/* root vars */
:root {
    --primary-color: #262730;
    --primary-bg-color: #f4f6f4;
    --dark-bg-color: #f4f6f4;
    --primary-bg-color-rgb: 244, 246, 244;
    --primary-bg-color-bright-rgb: 253, 251, 237;
    --site-header-height: 180px;
    --chat-form-offset: 10px;
    --chat-log-gap: 25px;
    --chat-form-height: 200px;
    --chat-log-height: 320px;

    /* Akzentfarben */
    --accent-color: #fb5012;
    --accent-secondary: #587b7f;

    /* Typografie */
    --font-sans: 'PP Neue Montreal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    --space-2xl: 12rem;
    --gutter: clamp(20px, 4vw, 60px);
    --page-margin: 20px;

    /* iOS Keyboard Fix - Visual Viewport Offset */
    --vv-offset-top: 0px;
    --vvh: 1vh;
    --kb: 0px;
}

/* Dark mode vars */
[data-theme="dark"] {
    --primary-color: #f4f6f4;
    --primary-bg-color: #262730;
    --primary-bg-color-rgb: 38, 39, 48;
    --primary-bg-color-bright-rgb: 64, 65, 74;
    --accent-secondary: #587b7f;
}

@media (prefers-color-scheme: dark) {
    [data-theme="system"] {
        --primary-color: #f4f6f4;
        --primary-bg-color: #262730;
    }
}


/* Reset and Base Styles */
@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/OTF/PPNeueMontreal-Thin.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/OTF/PPNeueMontreal-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/OTF/PPNeueMontreal-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/OTF/PPNeueMontreal-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/OTF/PPNeueMontreal-Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../fonts/OTF/PPNeueMontreal-SemiBolditalic.otf') format('opentype');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}

body {
    font-family: 'PP Neue Montreal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--primary-bg-color);
}

/* WPML Default-Switcher verstecken — wir nutzen unseren eigenen */
.wpml-ls-statics-footer,
.wpml-ls-statics-header,
.wpml-ls {
    display: none !important;
}

/* Globaler Outline-Reset */
*:focus,
*:focus-visible,
button:focus,
a:focus {
    outline: none !important;
    outline-width: 0 !important;
}

header,
main {
    max-width: none;
    margin: 0;
    padding: 20px var(--page-margin);
}

header {
    height: var(--site-header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5; /* UNVERÄNDERT: header überdeckt main */
    background: linear-gradient(
        to bottom,
        rgba(var(--primary-bg-color-rgb), 1) 0%,
        rgba(var(--primary-bg-color-rgb), 1) 10%,
        rgba(var(--primary-bg-color-rgb), 0) 100%
    );
    overflow: visible;
    
    /* iOS Keyboard Fix: Header folgt Visual Viewport */
    transform: translateY(var(--vv-offset-top));
}

.chat-section {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    gap: 0;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.site-header .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: none;
    margin: 0;
}

.header-actions {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 15; /* UNVERÄNDERT: action-bar überdeckt ghost */
    
    /* iOS Keyboard Fix: Actions folgen Visual Viewport */
    transform: translateY(var(--vv-offset-top));
}

.action-popup {
    z-index: 14; /* UNVERÄNDERT */
}

.action-tooltip {
    z-index: 15; /* UNVERÄNDERT: tooltipps überdecken toggle-menus */
}

/* Chat UI */
.chat-form {
    position: sticky;
    bottom: var(--chat-form-offset);
    z-index: 4; /* UNVERÄNDERT */
    margin: 0;
    padding: 20px 100px 72px 20px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.06);
    border-radius: 22px;
}

[data-theme="dark"] .chat-form {
    background-color: #2B2B27;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 36px rgba(150, 150, 150, 0.1);
}

textarea.chat-input {
    width: 100%;
    border: 0;
    outline: none;
    font-family: monospace;
    font-size: 18px;
    font-weight: 200;
    color: #f43151;
    background: transparent;
    resize: none;
}

[data-theme="dark"] textarea.chat-input {
    background: transparent;
    color: #f43151;
}

.chat-log {
    position: relative;
    display: block;
    height: calc(100vh - var(--chat-form-height) - var(--chat-log-gap) - var(--chat-form-offset));
    min-height: 0; /* Wichtig für Flexbox: verhindert Overflow-Issues */
    overflow-y: auto;
    overflow-x: hidden;
    overflow-anchor: none;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    box-sizing: border-box;
    margin-bottom: 0;
    padding: 0;
    z-index: 1; /* UNVERÄNDERT */
}

.chat-log-content {
    min-height: 100%;
    width: 100%;
    margin-top: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    padding-bottom: var(--chat-log-gap);
    box-sizing: border-box;
}

.chat-log-end {
    height: 1px;
    flex-shrink: 0;
}

.chat-message-user {
    background-color: rgba(246, 248, 246, 1);
    border-radius: 12px;
    padding: 8px 12px;
    display: inline-block;
    max-width: 80%;
    margin-left: auto;
    text-align: right;
}

[data-theme="dark"] .chat-message-user {
    background-color: rgba(64, 62, 60, 0.95);
}

@media (prefers-color-scheme: dark) {
    [data-theme="system"] .chat-message-user {
        background-color: rgba(64, 62, 60, 0.95);
    }
}

.chat-message-assistant {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.chat-message-assistant .chat-ghost-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
}

.chat-message-text p {
    margin: 0 0 8px;
}

.chat-message-text p:last-child {
    margin-bottom: 0;
}

.chat-message-text code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.95em;
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
}

.chat-message-text pre {
    margin: 8px 0 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow-x: auto;
}

.chat-message-text pre code {
    display: block;
    background: transparent;
    padding: 0;
}

.chat-message-text ul,
.chat-message-text ol {
    margin: 0 0 8px 20px;
    padding: 0;
}

.chat-message-pending .chat-message-text {
    color: currentColor;
}

.chat-pending-char {
    display: inline-block;
    animation: chat-thinking-wave 0.8s ease-in-out infinite;
    animation-delay: calc(var(--chat-wave-index, 0) * 0.04s);
}

@keyframes chat-thinking-wave {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
    100% {
        transform: translateY(0);
    }
}

.chat-pending-swipe {
    animation: chat-pending-swipe 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes chat-pending-swipe {
    0% {
        opacity: 0;
        transform: translateX(24px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-clear {
    position: absolute;
    right: 20px;
    bottom: 16px;
    transform: none;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: transparent;
    color: inherit;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

[data-theme="dark"] .chat-clear {
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.chat-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}


body.chat-started .site-header {
    height: 85px;
}

body.chat-started {
    --site-header-height: 85px;
}
@media (min-width: 500px) {
    .site-header {
        margin-bottom: -50px;
    }
}

.chat-ghost {
    position: fixed;
    top: 27vh;
    left: 50%;
    transform: translateX(-50%) scale(1);
    transform-origin: top center;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 10; /* UNVERÄNDERT: ghost überdeckt header */
    opacity: 1;
    transition: opacity 200ms ease, transform 200ms ease, top 200ms ease;
}

.chat-ghost[data-ready="false"] {
    transition: none !important;
}

.chat-ghost * {
    pointer-events: none;
}

.chat-ghost svg {
    width: clamp(160px, 22vw, 220px);
    height: auto;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.3));
    --ghost-body: #f43151;
    --ghost-eyes: #ffffff;
    --ghost-pupils: #020202;
    transition: transform 200ms ease;
    transform-origin: top center;
}

.chat-ghost #isrcd_ghost_pupil_left,
.chat-ghost #isrcd_ghost_pupil_right {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 180ms ease;
}

[data-theme="dark"] .chat-ghost svg {
    filter: drop-shadow(0 14px 28px rgba(150, 150, 150, 0.5));
}

.chat-ghost--compact {
    top: 75px;
    transform: translateX(-50%) scale(0.55);
}

/* Ghost verstecken wenn Chat-Nachrichten vorhanden */
.chat-ghost--hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scale(0.8);
    transition: opacity 250ms ease, transform 250ms ease;
}

/* Smooth transition beim Wieder-Erscheinen nach Clear */
.chat-ghost:not(.chat-ghost--hidden) {
    transition: opacity 300ms ease 100ms, transform 300ms ease 100ms, top 200ms ease;
}

.chat-send {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: 14px;
    background: #ffffff;
    color: #1c1917;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, opacity 0.2s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.chat-send:hover {
    transform: translateY(-50%) scale(1.02);
}

.chat-send:active {
    transform: translateY(-50%) scale(0.98);
}

[data-theme="dark"] .chat-send {
    background: #2B2B27;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 20px rgba(150, 150, 150, 0.1);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.primary-menu {
    display: none;
}

/* Header */
.site-branding #logo-isarcode {
    width: 60px;
    height: auto;
    display: block;
}

#logo-isarcode {
    fill: var(--primary-color);
}

#logo-isarcode .logo-ghost-eyes {
    fill: var(--primary-bg-color);
}

/* ============================================================
   Hero Section — Typografischer Hero mit Scroll-Reveal
============================================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 0 var(--page-margin);
    padding-bottom: var(--space-lg);
}

/* Dotted Lines — nur Sections/Rows begrenzen, nicht durch Typo */
.hero__deco-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px dotted var(--primary-color);
    opacity: 0.12;
    pointer-events: none;
}

.hero__deco-line--top {
    bottom: 0;
}

.hero__deco-line--mid {
    display: none;
}

/* Inner Container */
.hero__inner {
    position: relative;
    width: 100%;
    z-index: 2;
}

/* Sektionsnummer */
.hero__index {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-secondary);
    margin-bottom: var(--space-lg);
    opacity: 0;
}

/* Ghost BG entfernt — Ghost nur als subtiles Brandmark */
.hero__ghost {
    display: none;
}

/* Headline */
.hero__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.hero__headline-wrap {
    position: relative;
    z-index: 1;
}

.hero__headline {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(3.5rem, 15vw, 18vw);
    line-height: 0.88;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--primary-color);
    text-transform: uppercase;
}

.hero__headline-line {
    display: block;
    overflow: hidden;
}

.hero__headline-line--2 {
    padding-left: clamp(2rem, 8vw, 12vw);
}

.hero__headline-dot {
    color: var(--accent-color);
}

/* Subline — rechts unten positioniert */
.hero__sub-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-md);
    text-align: right;
}

.hero__sub {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: flex-end;
}

.hero__sub-label {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-secondary);
}

.hero__sub-text {
    font-family: var(--font-sans);
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    font-weight: 400;
    line-height: 1.5;
    color: var(--primary-color);
    opacity: 0.7;
}

/* CTA */
.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.hero__cta:hover {
    background: var(--accent-color);
    color: #ffffff;
}

.hero__cta-arrow {
    transition: transform 0.2s ease;
}

.hero__cta:hover .hero__cta-arrow {
    transform: translateX(4px);
}

/* Scroll-Indikator */
.hero__scroll-hint {
    position: absolute;
    bottom: var(--space-md);
    left: var(--gutter);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero__scroll-line {
    display: block;
    width: 1px;
    height: 48px;
    background: var(--primary-color);
    opacity: 0.25;
    animation: hero-scroll-pulse 2s ease-in-out infinite;
}

@keyframes hero-scroll-pulse {
    0%, 100% { transform: scaleY(1); opacity: 0.25; }
    50% { transform: scaleY(0.5); opacity: 0.1; }
}

.hero__scroll-label {
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-color);
    opacity: 0.3;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
}

/* Mobile Hero-Anpassungen */
@media (max-width: 768px) {
    .hero-section {
        padding-bottom: var(--space-md);
    }

    .hero__content {
        gap: var(--space-md);
    }

    .hero__headline {
        font-size: clamp(3rem, 18vw, 6rem);
    }

    .hero__headline-line--2 {
        padding-left: 1rem;
    }

    .hero__sub-wrap {
        align-items: flex-start;
        text-align: left;
    }

    .hero__ghost {
        width: 160px;
        right: -20px;
        opacity: 0.04;
    }

    .hero__scroll-hint {
        display: none;
    }
}

/* ============================================================
   Problems Section — Was und wie wir arbeiten
============================================================ */
.problems-section {
    position: relative;
    padding: 0 var(--page-margin);
    padding-bottom: var(--space-xl);
}

.problems__rule {
    width: 100%;
    height: 0;
    border-top: 1px dotted var(--primary-color);
    opacity: 0.12;
    margin-bottom: var(--space-xl);
}

.problems__index {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-secondary);
    margin-bottom: var(--space-lg);
}

.problems__grid {
    max-width: 780px;
}

.problems__item {
    padding: var(--space-md) 0;
}

.problems__headline {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 var(--space-sm);
    color: var(--primary-color);
}

.problems__text {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: clamp(0.875rem, 1.2vw, 1rem);
    line-height: 1.6;
    margin: 0;
    color: var(--primary-color);
    opacity: 0.7;
}

.problems__divider {
    width: 100%;
    height: 0;
    border-top: 1px dotted var(--primary-color);
    opacity: 0.08;
}

@media (max-width: 640px) {
    .problems__headline {
        font-size: 1.125rem;
    }
}

/* ============================================================
   Site Footer — Asymmetrisches Grid, full-width
============================================================ */
.site-footer {
    position: relative;
    overflow: hidden;
    color: var(--primary-color);
    background: var(--primary-bg-color);
    padding: 0 var(--page-margin);
    margin-top: var(--space-xl);
}

/* Trennlinien */
.site-footer__rule {
    width: 100%;
    height: 0;
    border: none;
    border-top: 1px solid var(--primary-color);
    opacity: 0.12;
}

.site-footer__rule--bottom {
    margin-top: var(--space-lg);
}

/* Grid-Layout */
.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg) var(--space-md);
    padding: var(--space-lg) 0;
}

/* Labels (Monospace) */
.site-footer__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 900;
    letter-spacing: normal;
    text-transform: uppercase;
    color: var(--accent-secondary);
    margin-bottom: 0.625rem;
}

/* Standorte */
.site-footer__locations {
    display: flex;
    gap: var(--space-lg);
}

.site-footer__address {
    font-style: normal;
    font-size: 0.875rem;
    line-height: 1.7;
    opacity: 0.7;
}

.site-footer__address strong {
    font-weight: 500;
    opacity: 1;
    color: var(--primary-color);
}

/* Kontakt */
.site-footer__contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.site-footer__contact-list a {
    font-size: 0.8125rem;
    line-height: 1.15;
    color: var(--primary-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.site-footer__contact-list a:hover {
    opacity: 1;
}

/* Navigation */
.site-footer__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.site-footer__menu a {
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.15;
    color: var(--primary-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.site-footer__menu a:hover {
    opacity: 1;
}

/* Social */
.site-footer__social-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.site-footer__social-list a {
    font-size: 0.8125rem;
    line-height: 1.15;
    color: var(--primary-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.site-footer__social-list a:hover {
    opacity: 1;
}

/* CTA-Zeile */
.site-footer__cta-row {
    padding: var(--space-md) 0;
}

.site-footer__cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--accent-color);
    transition: gap 0.2s ease;
}

.site-footer__cta-link:hover {
    gap: 1.25rem;
}

.site-footer__cta-arrow {
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

/* Bottom-Bar */
.site-footer__bottom {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: var(--space-md) 0 var(--space-lg);
    gap: var(--space-md);
}

/* Wordmark */
.site-footer__wordmark {
    display: block;
    text-decoration: none;
    color: var(--primary-color);
}

.site-footer__wordmark-svg {
    width: clamp(200px, 40vw, 500px);
    height: auto;
    display: block;
    fill: currentColor;
    opacity: 0.08;
    transition: opacity 0.3s ease;
}

.site-footer__wordmark:hover .site-footer__wordmark-svg {
    opacity: 0.2;
}

/* Bottom rechts */
.site-footer__bottom-right {
    display: flex;
    align-items: flex-end;
    gap: var(--space-md);
}

/* Animierter Ghost — laeuft vom Wordmark zum Legal Menu */
.site-footer__ghost-runner {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 24px;
    height: 24px;
    display: block;
    z-index: 3;
}

.site-footer__ghost-runner:hover .site-footer__ghost-runner-svg {
    transform: scale(1.15);
}

.site-footer__ghost-runner-svg {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s ease;
}

/* Legal */
.site-footer__legal {
    display: flex;
    gap: var(--space-sm);
}

.site-footer__legal a {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--primary-color);
    opacity: 0.4;
    transition: opacity 0.15s ease;
}

.site-footer__legal a:hover {
    opacity: 0.8;
}

/* Copyright */
.site-footer__copyright {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    opacity: 0.3;
    margin: 0;
    white-space: nowrap;
}

/* Footer Mobile */
@media (max-width: 1024px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }

    .site-footer__col--locations {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .site-footer__locations {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .site-footer__bottom-right {
        width: 100%;
        justify-content: space-between;
    }

    .site-footer__wordmark-svg {
        width: 80%;
    }
}

/* Button (Legacy, behalten fuer Kompatibilitaet) */
.button {
    display: inline-block;
    padding: 12px 24px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.button:hover {
    background: #333;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: #f9f9f9;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: 8px;
}

/* Team Grid */
.team-grid {
    padding: 80px 0;
}

.team-grid h2 {
    text-align: center;
    margin-bottom: 40px;
}

.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.team-member {
    text-align: center;
}

.team-member img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-bottom: 15px;
}

/* Legacy Footer (entfernt, neuer Footer ist .site-footer) */

.beta-badge {
    display: inline-block;
    width: 90px;
    height: 90px;
    transform: rotate(26deg);
    transition: transform 0.15s ease;
    align-self: center;
}

.beta-badge:hover {
    transform: rotate(28deg) scale(1.05);
}

/* Theme Toggle */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.theme-toggle {
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    width: 40px;
    height: 40px;
    color: var(--primary-color);
}

.theme-toggle:hover {
    background: transparent;
    color: var(--primary-color);
}

.theme-toggle:focus {
    outline: none;
}

.theme-toggle[aria-expanded="true"] {
    background: transparent;
    color: var(--primary-color);
}

/* Tooltip on hover */
.theme-toggle-wrapper .theme-tooltip {
    position: absolute;
    top: 110%;
    right: 0;
    background: #1f1b18;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.theme-toggle-wrapper:hover .theme-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.theme-toggle-wrapper[data-popup-open="true"] .theme-tooltip {
    opacity: 0;
    transform: translateY(-4px);
}

/* Tooltip invertieren in Dark Mode */
[data-theme="dark"] .theme-toggle-wrapper .theme-tooltip {
    background: #f0f3f0;
    color: #191817;
}

.theme-toggle-wrapper[data-tooltip-off="true"] .theme-tooltip {
    opacity: 0;
    transform: translateY(-4px);
}

/* Language Toggle */
.language-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.language-toggle {
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 4px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.language-toggle:hover {
    background: transparent;
    color: var(--primary-color);
}

.language-toggle:focus {
    outline: none;
}

.language-toggle[aria-expanded="true"] {
    background: transparent;
    color: var(--primary-color);
}

.language-icon {
    width: 18px;
    height: 18px;
    stroke-width: 1.5;
    display: block;
}

/* Burger Toggle */
.burger-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.burger-toggle {
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 4px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.burger-toggle:hover {
    background: transparent;
    color: var(--primary-color);
}

.burger-toggle:focus {
    outline: none;
}

.burger-toggle[aria-expanded="true"] {
    background: transparent;
    color: var(--primary-color);
}

.burger-icon {
    width: 20px;
    height: 20px;
    stroke-width: 1.6;
}

.burger-tooltip {
    position: absolute;
    top: 110%;
    right: 0;
    background: #1f1b18;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.burger-toggle-wrapper:hover .burger-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.burger-toggle-wrapper[data-popup-open="true"] .burger-tooltip,
.burger-toggle-wrapper[data-tooltip-off="true"] .burger-tooltip {
    opacity: 0;
    transform: translateY(-4px);
}

[data-theme="dark"] .burger-tooltip {
    background: #f0f3f0;
    color: #191817;
}

.burger-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    color: #4a4542;
    border: 1px solid #4a4542;
    border-radius: 12px;
    padding: 12px;
    min-width: 200px;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.burger-toggle-wrapper[data-popup-open="true"] .burger-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.burger-popup-line {
    font-size: 16px;
    font-weight: 500;
    color: #3b342f;
}

.language-toggle-label {
    display: none;
}

.language-tooltip {
    position: absolute;
    top: 110%;
    right: 0;
    background: #1f1b18;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.language-toggle-wrapper:hover .language-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.language-toggle-wrapper[data-popup-open="true"] .language-tooltip {
    opacity: 0;
    transform: translateY(-4px);
}

[data-theme="dark"] .language-tooltip {
    background: #f0f3f0;
    color: #191817;
}

.language-toggle-wrapper[data-tooltip-off="true"] .language-tooltip {
    opacity: 0;
    transform: translateY(-4px);
}

.language-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    color: #4a4542;
    border: 1px solid #4a4542;
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.language-toggle-wrapper[data-popup-open="true"] .language-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.language-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #3b342f;
    font-size: 17px;
    font-weight: 500;
    transition: background 0.2s ease;
    position: relative;
    box-sizing: border-box;
    margin: 0;
    text-align: left;
}

.language-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .language-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.language-option-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    stroke-width: 1.5;
    stroke: currentColor;
}

.language-option-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    color: currentColor;
}

.language-option-check {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.language-option-check svg {
    width: 16px;
    height: 16px;
    display: block;
    stroke-width: 1.5;
}

.language-option[data-selected="true"] .language-option-check {
    opacity: 1;
}

/* Theme Toggle Button Icons - only apply to icons inside .theme-toggle */
.theme-toggle .theme-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
}

.theme-toggle .theme-icon-light,
.theme-toggle .theme-icon-dark,
.theme-toggle .theme-icon-system {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

[data-theme="light"] .theme-toggle .theme-icon-light,
[data-theme="dark"] .theme-toggle .theme-icon-dark,
[data-theme="system"] .theme-toggle .theme-icon-system {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Theme Popup */
.theme-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    color: #4a4542;
    border: 1px solid #4a4542;
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.theme-toggle-wrapper[data-popup-open="true"] .theme-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.theme-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #3b342f;
    font-size: 17px;
    font-weight: 500;
    transition: background 0.2s ease;
    position: relative;
    box-sizing: border-box;
    margin: 0;
    text-align: left;
}

.theme-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.theme-option-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    stroke: currentColor;
    opacity: 1;
    stroke-width: 1.5;
}

.theme-option-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    color: currentColor;
    opacity: 1;
}

.theme-option-check {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.theme-option-check svg {
    width: 16px;
    height: 16px;
    display: block;
    stroke-width: 1.5;
}

.theme-option[data-selected="true"] .theme-option-check {
    opacity: 1;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}


/* ============================================================
   Mobile Optimierungen
   – Kompaktere chat-form
   – Gleich große Buttons (50x50)
============================================================ */

@media (max-width: 768px) {
    :root {
        --chat-form-height: 127px;
    }
    
    .chat-form {
        padding: 20px 100px 20px 20px;
    }
    
    .chat-send {
        top: 35%;
        width: 50px;
        height: 50px;
    }
    
    .chat-clear {
        width: 50px;
        height: 25px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        bottom: 10px;
    }
}


/* ============================================================
   iOS Mobile Keyboard Fix
   – z-index Struktur UNVERÄNDERT
   – Nutzt CSS Variables die vom JS gesetzt werden
============================================================ */

/* Visual viewport height für Layout (alle Browser) */
.chat-section {
    min-height: calc(var(--vvh, 1vh) * 100);
}

/* Chat log height basierend auf visual viewport */
.chat-log {
    height: calc(
        (var(--vvh, 1vh) * 100)
        - var(--chat-form-height)
        - var(--chat-log-gap)
        - var(--chat-form-offset)
    );
    min-height: 0;
}

/* iOS Zoom verhindern (16px minimum) */
textarea.chat-input {
    font-size: 16px;
}

/* Overscroll verhindern */
html, body {
    overscroll-behavior: none;
}


/* ============================================================
   iOS-spezifische Anpassungen (Safari)
============================================================ */

@supports (-webkit-touch-callout: none) {
    
    /* Flexbox Layout für dynamische Höhenanpassung */
    .chat-section {
        height: calc(var(--vvh, 1vh) * 100);
        min-height: calc(var(--vvh, 1vh) * 100);
        max-height: calc(var(--vvh, 1vh) * 100);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    /* Chat-log füllt verfügbaren Platz */
    .chat-log {
        flex: 1;
        height: auto;
        min-height: 0;
        overflow-y: auto;
    }
    
    /* Chat-form bleibt am Ende */
    .chat-form {
        flex-shrink: 0;
        margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 70px);
    }
    
    /* Ghost ausblenden wenn Keyboard offen */
    body.kb-open .chat-ghost {
        opacity: 0;
        pointer-events: none;
        transition: opacity 160ms ease;
    }

    body:not(.kb-open) .chat-ghost {
        transition: opacity 200ms ease 80ms;
    }

    /* Safe area für Header (Notch/Dynamic Island) */
    header {
        top: env(safe-area-inset-top);
    }
    
    /* GPU-Acceleration nur wenn Keyboard offen (Performance) */
    body.kb-open header,
    body.kb-open .site-header,
    body.kb-open .header-actions {
        will-change: transform;
        backface-visibility: hidden;
    }
}