/* 
   Termlate Modern Split-UI (Teams x Melnudens)
   Theme: Waldsee & Tannengrün | Contrast: Purple
*/

:root {
    --primary: #7C3AED;
    --primary-dark: #5B21B6;
    --theme-bg: #F2F9F9; /* Waldsee-Blaugrün (sehr hell) */
    --theme-accent: #CFE5E5; /* See-Wasser Ton */
    --white: #FFFFFF;
    --text: #1A2D2B; /* Dunkles Blaugrün-Grau */
    --text-muted: #5A716E;
    --border-color: #1A2D2B;
    --gutter: 4rem;
    --border: 2px solid var(--border-color);
    --transition-speed: 0.8s; /* Langsamerer, atmosphärischer Wechsel */
}

[data-theme="dark"] {
    --primary: #C084FC;
    --primary-dark: #7C3AED;
    --theme-bg: #121B19; /* Tiefes Tannengrün */
    --theme-accent: #1E2B28; /* Gedämpftes Moosgrün */
    --white: #1A2624; /* Schiefer-Anteil */
    --text: #E0EAE8;
    --text-muted: #8AA09B;
    --border-color: #E0EAE8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--theme-bg); 
    color: var(--text); 
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 4rem; }

/* Global Transition for all themed elements */
section, header, footer, .mid-nav, .price-card, .team-member, .image-wrap, summary, details, .search-bar, .btn, .theme-toggle, .hero-visual {
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed), transform 0.3s, box-shadow 0.3s;
}

/* Theme Toggle Button */
.btn-login {
    display: inline-block;
    padding: 0.45rem 1.25rem;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 8px;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.btn-login:hover {
    background: rgba(255,255,255,0.15);
    border-color: #ffffff;
}

.theme-toggle {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
    margin-left: 1.5rem;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

/* Typography */
h1, h2, h3 { font-weight: 900; text-transform: uppercase; line-height: 0.95; letter-spacing: -0.04em; }
h1 { font-size: clamp(3.5rem, 10vw, 7rem); }
h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: 2rem; }

.eyebrow { 
    display: block; 
    text-transform: uppercase; 
    font-weight: 800; 
    color: var(--primary); 
    margin-bottom: 1rem;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

/* Header */
.main-header { 
    height: 80px; 
    display: flex; 
    align-items: center; 
    background: var(--primary);
    border-bottom: none;
    position: sticky; 
    top: 0; 
    z-index: 1000;
}

.header-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { display: flex; align-items: center; gap: 1.5rem; text-decoration: none; color: #ffffff; font-weight: 900; font-size: 1.5rem; }
.header-slogan-text { font-size: 0.75rem; font-weight: 700; color: #000000; text-transform: none; letter-spacing: 0; line-height: 1.1; }
.header-slogan-text .highlight { color: var(--theme-accent); }
.top-nav ul { display: flex; list-style: none; gap: 2.5rem; }
.top-nav a { text-decoration: none; color: rgba(255,255,255,0.85); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; }
.top-nav a:hover { color: #ffffff; }

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.25);
}
.search-bar input { background: none; border: none; outline: none; padding-left: 0.5rem; font-weight: 600; width: 150px; color: #ffffff; }
.search-bar input::placeholder { color: rgba(255,255,255,0.6); }
.search-bar span { color: rgba(255,255,255,0.7); }

/* Section Base */
section { padding: 8rem 0; border-bottom: var(--border); }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: center; }

/* Carousel / Hero */
.hero-carousel { position: relative; overflow: hidden; height: calc(100vh - 80px); background: var(--white); border-bottom: var(--border); }
.carousel-inner { display: flex; height: 100%; transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); }
.carousel-item { min-width: 100%; height: 100%; display: flex; align-items: center; }
.carousel-item .split-grid { grid-template-columns: 1fr 1fr; }
.hero-text h1 { font-size: clamp(2.2rem, 4.5vw, 4rem); }

.hero-visual {
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-visual video { width: 100%; height: 100%; object-fit: contain; max-height: calc(100vh - 80px); }

/* Mid Nav */
.mid-nav { background: var(--white); padding: 2rem 0; border-bottom: var(--border); }
.mid-nav ul { display: flex; justify-content: center; list-style: none; gap: 4rem; }
.mid-nav a { text-decoration: none; color: var(--text); font-weight: 800; text-transform: uppercase; font-size: 0.9rem; }
.mid-nav a:hover { color: var(--primary); }

/* Features & News (Melnudens Style) */
.image-wrap { background: var(--primary); border-radius: 20px; overflow: hidden; line-height: 0; }
.image-wrap img, .image-wrap video { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.image-wrap:hover img { transform: scale(1.05); }

/* FAQ Accordion */
.faq-list { margin-top: 3rem; }

/* 3D Chat Field */
.chat-3d-wrap {
    perspective: 1200px;
    margin-top: 3rem;
    filter: drop-shadow(30px 30px 50px rgba(0,0,0,0.15));
}

.chat-container {
    background: var(--white);
    border: var(--border);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    height: 420px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    overflow-y: auto;
    transform: rotateY(15deg) rotateX(5deg);
    transition: transform 0.5s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.chat-3d-wrap:hover .chat-container {
    transform: rotateY(5deg) rotateX(2deg);
}

.chat-ws-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.chat-ws-dot {
    width: 8px;
    height: 8px;
    background: #22C55E;
    border-radius: 50%;
    box-shadow: 0 0 8px #22C55E;
    flex-shrink: 0;
}

.chat-msg {
    max-width: 85%;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    line-height: 1.45;
    font-size: 0.88rem;
    word-wrap: break-word;
}

.msg-original {
    align-self: flex-start;
    background: var(--theme-accent);
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    border-bottom-left-radius: 2px;
    font-style: italic;
}

.msg-translation {
    align-self: flex-end;
    background: color-mix(in srgb, var(--primary) 12%, var(--white));
    border: 1.5px solid color-mix(in srgb, var(--primary) 28%, var(--border-color));
    color: var(--text);
    border-bottom-right-radius: 2px;
    font-weight: 500;
}

.chat-time {
    display: block;
    font-size: 0.62rem;
    color: var(--text-muted);
    opacity: 0.55;
    margin-top: 0.2rem;
    text-align: right;
    font-style: normal;
    font-weight: 400;
}
.faq-item { border-top: 1px solid rgba(128,128,128,0.2); padding: 1.5rem 0; }
.faq-title { font-weight: 800; font-size: 1.5rem; text-transform: uppercase; margin-bottom: 0.75rem; }
.faq-content { color: var(--text-muted); font-size: 1.1rem; max-width: 90%; }

#about { min-height: calc(100vh - 80px); display: flex; align-items: center; }
/* Was ist Termlate? */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: start; margin-top: 4rem; }
.about-lead { color: var(--text-muted); font-size: 1.05rem; line-height: 1.75; margin: 2rem 0 2.5rem; max-width: 52ch; }
.about-steps { display: flex; flex-direction: column; gap: 1.5rem; }
.about-step { display: flex; gap: 1.5rem; align-items: flex-start; }
.step-num { font-size: 0.72rem; font-weight: 900; color: var(--primary); border: 2px solid var(--primary); border-radius: 4px; padding: 0.2rem 0.4rem; flex-shrink: 0; letter-spacing: 0.05em; margin-top: 0.15rem; }
.about-step strong { display: block; font-weight: 800; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.3rem; }
.about-step p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin: 0; }
.about-eltern { margin-top: 2rem; padding: 1.25rem 1.5rem; border-radius: 12px; background: color-mix(in srgb, var(--primary) 8%, var(--white)); border: 1.5px solid color-mix(in srgb, var(--primary) 25%, var(--border-color)); display: flex; flex-direction: column; gap: 0.6rem; }
.about-eltern-badge { font-size: 0.72rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); }
.about-eltern p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; margin: 0; }
.about-eltern strong { color: var(--text); }

/* Testimonial */
.testimonial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: start; margin-top: 4rem; }
.testimonial-location { font-weight: 700; color: var(--primary); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.08em; margin: 1rem 0 1.5rem; }
.testimonial-desc { color: var(--text-muted); font-size: 1.1rem; line-height: 1.7; max-width: 44ch; }
.testimonial-link { display: inline-block; margin-top: 2rem; font-weight: 900; font-size: 0.85rem; color: var(--primary); text-decoration: none; text-transform: uppercase; letter-spacing: 0.05em; }
.testimonial-link:hover { text-decoration: underline; }
.testimonial-quotes { display: flex; flex-direction: column; gap: 1.5rem; }
.quote-card { background: var(--white); border: var(--border); border-left: 4px solid var(--primary); padding: 2rem; border-radius: 0 12px 12px 0; }
.quote-card p { font-size: 1.1rem; line-height: 1.65; font-weight: 500; margin-bottom: 1rem; }
.quote-card cite { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); font-style: normal; }
.testimonial-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border-color); border: var(--border); margin-top: 0.5rem; }
.stat { background: var(--white); padding: 1.5rem 1rem; text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 900; color: var(--primary); line-height: 1; }
.stat-label { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-top: 0.4rem; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 4rem; }
.price-card { background: var(--white); border: var(--border); border-radius: 20px; padding: 2.5rem 2rem; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--primary); border-width: 2px; }
.price-card-header { margin-bottom: 2rem; }
.price-tier { display: block; font-size: 0.75rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); margin-bottom: 1rem; }
.price-tag { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; line-height: 1; margin-bottom: 0.4rem; }
.price-sub { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.price-suffix { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.price-features { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; flex: 1; }
.price-features li { font-size: 0.88rem; color: var(--text-muted); padding-left: 1.25rem; position: relative; line-height: 1.4; }
.price-features li::before { content: '→'; position: absolute; left: 0; color: var(--primary); font-weight: 900; }
.section-white { background-color: var(--white); }
.section-primary { background-color: var(--primary); color: var(--white); text-align: center; }
.text-white { color: var(--white) !important; }
.text-primary { color: var(--primary); }

/* Pricing adjustment */
.price-card.featured { background: var(--theme-accent); }
.price-tag { font-size: 5rem; font-weight: 900; margin: 2rem 0; color: var(--primary); }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 4rem; }
.team-card { background: var(--white); border: var(--border); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.team-photo { width: 100%; aspect-ratio: 1/1; background: var(--theme-accent); overflow: hidden; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-info { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.3rem; }
.team-name { font-weight: 900; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.03em; }
.team-role { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); }
.team-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-top: 0.5rem; }

/* Buttons */
.btn { 
    display: inline-block; 
    padding: 1.5rem 3rem; 
    font-weight: 900; 
    text-transform: uppercase; 
    text-decoration: none; 
    border: var(--border); 
    background: var(--primary);
    color: var(--white);
}
.btn:hover { background: var(--border-color); color: var(--theme-bg); transform: translate(-4px, -4px); box-shadow: 4px 4px 0 var(--primary); }

/* Footer */
footer { background: var(--border-color); color: var(--theme-bg); padding: 6rem 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; }
.footer-logo { font-size: 2rem; font-weight: 900; margin-bottom: 2rem; display: block; }
.footer-links h4 { text-transform: uppercase; margin-bottom: 1.5rem; color: var(--primary); }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-weight: 600; }

@media (max-width: 1024px) {
    :root { --gutter: 2rem; }
    .container { padding: 0 2rem; }
    .split-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-visual { height: 40vh; }
    .hero-carousel { height: auto; min-height: 80vh; padding: 4rem 0; }
    .mid-nav ul { gap: 1.5rem; flex-wrap: wrap; }
    .pricing-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
    .chat-container { margin: 0 auto; transform: rotateY(10deg); }
}

@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    .main-header { height: auto; padding: 1rem 0; }
    .header-container { flex-direction: column; gap: 1.5rem; }
    .top-nav ul { gap: 1rem; }
    .header-right { width: 100%; justify-content: center; }
    .search-bar { flex: 1; max-width: 300px; }
    
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    
    .pricing-grid, .team-grid { grid-template-columns: 1fr; }
    
    /* Landscape suggestion for mobile */
    .landscape-hint {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: var(--primary);
        color: white;
        z-index: 9999;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 2rem;
    }

    @media (orientation: portrait) {
        .landscape-hint { display: flex; }
    }
}

.landscape-hint span { font-size: 4rem; margin-bottom: 1rem; animation: rotate 2s infinite ease-in-out; display: block; }
.landscape-hint p { font-weight: 800; text-transform: uppercase; font-size: 1.2rem; }

@keyframes rotate {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
    100% { transform: rotate(0deg); }
}

@media (min-width: 769px) {
    .landscape-hint { display: none !important; }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    width: calc(100% - 4rem);
    max-width: 1000px;
    background: var(--white);
    border: var(--border);
    border-radius: 12px;
    padding: 2rem 0;
    z-index: 2000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
}

.cookie-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cookie-options {
    display: flex;
    gap: 1.5rem;
}

.cookie-switch {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}

.cookie-switch input {
    display: none;
}

.slider {
    width: 40px;
    height: 20px;
    background: var(--theme-accent);
    border-radius: 20px;
    position: relative;
    border: 1px solid var(--border-color);
}

.slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--white);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
    border: 1px solid var(--border-color);
}

input:checked + .slider {
    background: var(--primary);
}

input:checked + .slider::before {
    transform: translateX(20px);
}

.label-text {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
}

.btn-small {
    padding: 0.8rem 1.5rem;
    font-size: 0.8rem;
}

.btn-primary-bg {
    background: var(--primary);
    color: var(--white);
}

@media (max-width: 900px) {
    .cookie-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .cookie-actions {
        width: 100%;
        justify-content: space-between;
    }
}
