/* --- DESIGN-SYSTEM: "Clean Finance" --- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400&display=swap');

:root {
    /* Color Palette */
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --secondary: #059669;
    --accent: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --card: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --success: #22c55e;
    --warning: #eab308;
    --border-color: #e2e8f0;

    /* Typography */
    --font-headings: 'IBM Plex Sans', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Spacing & Layout */
    --container-width: 1140px;
    --section-padding: 4.5rem 0;
    --card-padding: 1.5rem;
    --border-radius: 6px;
}

/* --- GLOBAL STYLES --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.75rem; color: var(--primary-dark); }
h2 { font-size: 1.875rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- UI ELEMENTS --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-headings);
    font-weight: 500;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

.btn-primary { background-color: var(--primary); color: var(--surface); }
.btn-primary:hover { background-color: var(--primary-dark); }

.btn-secondary { background-color: var(--secondary); color: var(--surface); }
.btn-secondary:hover { background-color: #047857; }

.btn-outline { border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background-color: var(--primary); color: var(--surface); }

.card {
    background-color: var(--surface);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

.info-box {
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
    margin-top: 1.5rem;
}
.info-box.accent { background-color: #fffbeb; border-color: var(--accent); }
.info-box.warning { background-color: #fefce8; border-color: var(--warning); }
.info-box p { margin-bottom: 0; }

.checklist {
    list-style: none;
    padding-left: 0;
}
.checklist li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
}
.checklist li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--secondary);
    font-size: 1.25rem;
    line-height: 1.4;
}
.checklist li.warning-item::before { content: '⚠️'; }


/* --- HEADER --- */
header.site-header {
    background: var(--surface);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}
header nav ul {
    display: flex;
    gap: 1.5rem;
}
header nav a {
    color: var(--muted);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}
header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}
header nav a:hover { color: var(--text); }
header nav a:hover::after { width: 100%; }

/* --- SECTIONS --- */
section { padding: var(--section-padding); }
section:nth-of-type(even) { background-color: var(--card); }

/* Hero */
.hero-section { background-color: var(--background); padding-top: 3rem; padding-bottom: 5rem; }
.hero-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; }
.hero-text .subtitle { font-size: 1.125rem; color: var(--muted); max-width: 600px; }
.hero-cta { margin-top: 2rem; display: flex; gap: 1rem; }
.hero-image img { border-radius: var(--border-radius); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.stat-card {
    background-color: var(--surface);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.stat-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}
.stat-card p { margin: 0; color: var(--muted); }
.stats-text { max-width: 800px; margin: 0 auto; text-align: center; }

/* Basics */
.basics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.basics-section .card { text-align: center; }
.card-icon { font-size: 3rem; margin-bottom: 1rem; }

/* Savings (Tabs) */
.tab-buttons {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}
.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
    position: relative;
    transition: color 0.2s ease;
}
.tab-button.active { color: var(--primary); }
.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Calculator */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.5rem; }
.calc-input, .calculator-wrapper select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-mono);
    font-size: 1rem;
    background-color: var(--background);
}
.slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--border-color);
    outline: none;
    border-radius: 4px;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    cursor: pointer;
    border-radius: 50%;
}
.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}
.calculator-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.result-box {
    background: var(--background);
    padding: 1rem;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.result-box.total {
    background-color: var(--secondary);
    color: var(--surface);
}
.result-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
}
.result-box.total .result-value { font-size: 2rem; }

/* KI & Steuern */
.ki-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; }
.ki-features img { border-radius: var(--border-radius); margin-top: 1.5rem; }
.feature-list { list-style: none; }
.feature-list li { position: relative; padding-left: 2rem; margin-bottom: 0.75rem; font-weight: 500; }
.feature-list li::before {
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 1.2rem;
}
.feature-list li.success::before { content: '✅'; }
.feature-list li.warning::before { content: '⚠️'; }

/* Timeline */
.timeline {
    position: relative;
    max-width: 750px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: var(--border-color);
    top: 0;
    bottom: 0;
    left: 30px;
    margin-left: -1.5px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background: inherit;
    width: 100%;
    padding-left: 70px;
}
.timeline-dot {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface);
    border: 4px solid var(--primary);
    top: 25px;
    left: 20px;
    z-index: 1;
}
.timeline-content { padding: 1.5rem; }
.step-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background: var(--primary);
    color: var(--surface);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

/* Checklist Section */
.checklist-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.interactive-checklist li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}
.interactive-checklist input[type="checkbox"] {
    display: none;
}
.interactive-checklist label {
    cursor: pointer;
    position: relative;
    padding-left: 2rem;
}
.interactive-checklist label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--surface);
}
.interactive-checklist label::after {
    content: '✔';
    position: absolute;
    left: 4px;
    top: 0;
    font-size: 1.2rem;
    color: var(--secondary);
    opacity: 0;
    transition: opacity 0.2s;
}
.interactive-checklist input[type="checkbox"]:checked + label::before {
    border-color: var(--secondary);
}
.interactive-checklist input[type="checkbox"]:checked + label::after {
    opacity: 1;
}

/* Errors */
.errors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.error-card { border-left: 4px solid #ef4444; }
.error-card h3 { color: #b91c1c; }

/* Deadlines (Table) */
.table-container { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: var(--surface);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
th {
    background-color: var(--card);
    font-weight: 600;
}
tbody tr:nth-child(even) {
    background-color: var(--background);
}
tbody tr:hover {
    background-color: #e0e7ff;
}

/* Groups */
.groups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }

/* FAQ (Accordion) */
.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item {
    border-bottom: 1px solid var(--border-color);
}
.accordion-header {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.25rem 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}
.accordion-header:hover { background-color: var(--card); }
.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}
.accordion-header.active::after {
    transform: rotate(45deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 1rem;
}
.accordion-content p { padding-bottom: 1rem; }

/* Contact */
.contact-section { background: var(--card); }
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--border-radius);
}
.contact-info p { margin-bottom: 1.5rem; }
.map-container { margin-top: 1.5rem; }
.contact-form .form-group { margin-bottom: 1.25rem; }
.contact-form label { display: block; font-weight: 500; margin-bottom: 0.5rem; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-body);
}
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.form-group-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}
.form-group-checkbox label { margin: 0; }
.contact-form .btn { width: 100%; }

/* --- FOOTER --- */
footer.site-footer {
    background-color: var(--primary-dark);
    color: #e0e7ff;
    padding: 4rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #3b5998;
}
.logo-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--surface);
    margin-bottom: 1rem;
}
.footer-col h4 {
    color: var(--surface);
    margin-bottom: 1rem;
}
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: #a5b4fc; }
.footer-col a:hover { color: var(--surface); }
.footer-bottom {
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
    color: #a5b4fc;
}
.footer-bottom p { margin-bottom: 0.25rem; }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    
    .header-content nav { display: none; } /* Simple hide for demo */
    .hero-layout { grid-template-columns: 1fr; text-align: center; }
    .hero-text { order: 2; }
    .hero-image { order: 1; max-width: 500px; margin: 0 auto; }
    .hero-cta { justify-content: center; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .basics-grid { grid-template-columns: 1fr; }
    .ki-layout { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    section { padding: 3rem 0; }
    
    .stats-grid { grid-template-columns: 1fr; }
    .calculator-wrapper { grid-template-columns: 1fr; }
    .checklist-columns { grid-template-columns: 1fr; }
    
    .timeline::after { left: 15px; }
    .timeline-item { padding-left: 45px; }
    .timeline-dot { left: 5px; width: 18px; height: 18px; }
    
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
    .btn { width: 100%; margin-bottom: 0.5rem; }
    .hero-cta { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .logo-footer { justify-content: center; }
}