/* === MODERN GRADIENT DESIGN SYSTEM #10 === */

:root {
    --primary: #8b5cf6;
    --secondary: #6366f1;
    --accent: #14b8a6;
    --background: #fafafa;
    --surface: #ffffff;
    --card: #f5f3ff;
    --text: #18181b;
    --muted: #71717a;
    --border-color: #e5e7eb;

    --font-headings: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    
    --gradient-primary: linear-gradient(120deg, var(--primary), var(--secondary));
    --gradient-accent: linear-gradient(120deg, var(--primary), var(--accent));
}

/* === BASE & RESET === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.25rem;
    color: var(--muted);
    font-size: 1rem;
    max-width: 65ch;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}

/* === LAYOUT === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.grid-2-col.reverse .container {
    grid-template-areas: "b a";
}

.grid-3x2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* === COMPONENTS === */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background-image: var(--gradient-accent);
    color: white;
}

.btn-primary:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(20, 184, 166, 0.3);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--primary);
    border: 2px solid var(--card);
}

.btn-secondary:hover {
    background-color: var(--card);
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

/* --- Header --- */
.header {
    background-color: var(--surface);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-image: var(--gradient-accent);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--muted);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--text);
}

.main-nav a:hover::after {
    width: 100%;
}

.mobile-nav-toggle { display: none; }

/* --- Hero Section --- */
.hero {
    background-image: var(--gradient-primary);
    color: white;
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}
.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}
.hero h1, .hero p { color: white; }
.hero p { opacity: 0.9; max-width: 60ch; }
.hero-cta { margin-top: 2rem; display: flex; gap: 1rem; }
.hero-cta .btn-secondary { background-color: rgba(255,255,255,0.1); border-color: white; color: white; }
.hero-cta .btn-secondary:hover { background-color: white; color: var(--primary); }

.hero-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.gradient-blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.4;
    border-radius: 50%;
}
.blob1 {
    width: 500px;
    height: 500px;
    background-color: var(--accent);
    top: -150px;
    left: -150px;
    animation: blob-move 20s infinite alternate;
}
.blob2 {
    width: 600px;
    height: 600px;
    background-color: var(--primary);
    bottom: -200px;
    right: -200px;
    animation: blob-move 25s infinite alternate-reverse;
}

@keyframes blob-move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.2); }
}

/* --- Features Row --- */
.features-row { padding: 2rem 0; background-color: var(--card); }
.features-row .container { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 1rem; }
.feature-badge {
    font-weight: 600;
    color: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-lg);
    background-color: var(--surface);
    border: 1px solid var(--border-color);
}

/* --- Intro Section --- */
.intro-image-wrapper img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* --- Theory Section --- */
.theory-section { background-color: var(--background); }
.card {
    background-color: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-image: var(--gradient-accent);
}
.card p { font-size: 0.95rem; color: var(--muted); }
.card-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1.5rem;
    background-image: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}
.card-icon svg { width: 28px; height: 28px; }

/* --- Asset Allocation Section --- */
.asset-allocation-section { background-color: var(--surface); }
.asset-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.asset-card {
    background-color: var(--card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.3s ease;
}
.asset-card:hover { transform: scale(1.05); }
.asset-card-chart { margin-bottom: 1rem; }
.asset-card-chart svg { width: 80px; height: 80px; }
.circle-bg { fill: none; stroke: #e6e6e6; stroke-width: 3.8; }
.circle { fill: none; stroke-width: 2.8; stroke-linecap: round; }

/* --- Portfolio Examples Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.portfolio-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}
.portfolio-chart-wrapper {
    position: relative;
}
.portfolio-chart-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}
.donut-chart {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    transform: translate(-50%, -50%) rotate(-90deg);
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    backdrop-filter: blur(5px);
}
.donut-hole { fill: transparent; }
.donut-ring { fill: transparent; stroke: #eef2ff; stroke-width: 6; }
.donut-segment { fill: transparent; stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray 0.5s ease; }
.portfolio-content { padding: 1.5rem; }
.portfolio-content ul { list-style: none; margin-top: 1rem; }
.portfolio-content li { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* --- Rebalancing & KI Sections --- */
.rebalancing-section, .ki-section {
    padding: 0; /* Container handles padding */
}
.rebalancing-section .container, .ki-section .container { padding: 6rem 1.5rem; }
.rebalancing-image img, .ki-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* --- Tools Section --- */
.tools-section { background-color: var(--card); }
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.tool-card {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}
.tool-card:hover {
    border-color: var(--primary);
}

/* --- Ressourcen Section --- */
.ressourcen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.ressource-card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ressource-card img { width: 100%; height: 200px; object-fit: cover; }
.ressource-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.ressource-content p { margin-bottom: 1rem; }
.ressource-content a { font-weight: 600; margin-top: auto; }

/* --- FAQ Section --- */
.faq-section { background-color: var(--surface); }
.faq-accordion { max-width: 800px; margin: 0 auto; }
.faq-item {
    border-bottom: 1px solid var(--border-color);
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: var(--font-headings);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--primary);
}
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
.faq-answer p { padding-bottom: 1.5rem; }

/* --- Kontakt Section --- */
.kontakt-wrapper {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    position: relative;
    overflow: hidden;
}
.kontakt-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background-image: var(--gradient-accent);
}
.kontakt-info ul { list-style: none; margin-top: 2rem; }
.kontakt-info li { margin-bottom: 0.75rem; color: var(--muted); }
.kontakt-info a { color: var(--text); }
.kontakt-info a:hover { color: var(--primary); }

/* --- Footer --- */
.footer {
    background-image: var(--gradient-primary);
    color: white;
    padding: 5rem 0 2rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.footer p, .footer a, .footer h4 { color: white; }
.footer .logo span { color: white; }
.footer p { opacity: 0.8; font-size: 0.9rem; }
.footer h4 { margin-bottom: 1rem; opacity: 0.9; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 0.5rem; }
.footer a { opacity: 0.8; transition: opacity 0.3s ease; }
.footer a:hover { opacity: 1; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    font-size: 0.8rem;
}
.footer-bottom p { margin: 0; }
.disclaimer { font-weight: 600; }

/* --- ANIMATIONS --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }


/* === RESPONSIVE DESIGN === */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    .grid-2-col, .grid-2-col.reverse .container, .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content { order: 2; }
    .hero-image-wrapper { order: 1; margin-bottom: 2rem; }
    .hero-cta { justify-content: center; }
    .intro-text, .rebalancing-text, .ki-text { text-align: left; }
    .kontakt-wrapper { grid-template-columns: 1fr; padding: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 768px) {
    section { padding: 4rem 0; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--surface);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        padding: 1rem 0;
    }
    .main-nav.active { display: flex; }
    .main-nav ul { flex-direction: column; align-items: center; width: 100%; }
    .main-nav li { width: 100%; text-align: center; }
    .main-nav a { padding: 1rem; display: block; }
    .nav-cta { display: none; }
    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text);
    }
}

@media (max-width: 576px) {
    .hero { padding: 5rem 0; }
    .features-row .container { flex-direction: column; align-items: stretch; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer .logo { justify-content: center; }
}

/* === Contact Form Styles (Auto-Injected) === */
.contact-form-wrapper {
    background-color: var(--surface, #ffffff);
    padding: 2.5rem;
    border-radius: var(--border-radius, 8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 2rem auto;
}

.contact-form-wrapper h3 {
    margin-bottom: 1rem;
    color: var(--primary, #333);
}

.contact-form-wrapper p {
    margin-bottom: 2rem;
    color: var(--text, #666);
    opacity: 0.8;
}

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

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text, #333);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd; /* Fallback border */
    border-radius: var(--border-radius, 4px);
    background-color: var(#ffffff, #fff);
    color: var(--text, #333);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary, #007bff);
    box-shadow: 0 0 0 3px var(--primary);
}

.contact-form .submit-button {
    display: inline-block;
    width: 100%;
    padding: 1rem 2rem;
    background-color: var(--primary, #007bff);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius, 4px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s;
    margin-top: 1rem;
}

.contact-form .submit-button:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
}

.contact-form .submit-button:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: 1.5rem;
    }
}
