/* ---------------------------------- */
/*          DESIGN SYSTEM             */
/* ---------------------------------- */
:root {
    /* Colors */
    --primary: #1a1a2e;
    --secondary: #c2185b;
    --accent: #c2185b;
    --background: #fafaf9; /* Stone 50 */
    --surface: #f5f5f4; /* Stone 100 */
    --card: #ffffff;
    --text: #1c1917; /* Stone 900 */
    --muted: #a8a29e; /* Stone 400 */
    --border: #e7e5e4; /* Stone 200 */
    --highlight: #fef2f2; /* Red 50 */

    /* Typography */
    --font-headings: 'Cormorant Garamond', serif;
    --font-body: 'Work Sans', sans-serif;

    /* Transitions */
    --transition-speed: 0.4s;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3 {
    font-family: var(--font-headings);
    color: var(--primary);
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h2 {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-align: center;
    margin-bottom: 3rem;
}

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

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-speed) ease-in-out;
}

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

img {
    max-width: 100%;
    display: block;
}

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

.content-section {
    padding: 120px 0;
}

.surface-bg {
    background-color: var(--surface);
}

.text-column {
    max-width: 680px;
    margin: 0 auto 3rem auto;
}

.text-column h2, .text-column p {
    text-align: left;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--muted);
    line-height: 1.6;
    font-weight: 300;
}

.serif-subtitle {
    font-family: var(--font-headings);
    text-align: center;
    margin-top: -2rem;
    margin-bottom: 3rem;
    color: var(--text);
}

/* ---------------------------------- */
/*              HEADER                */
/* ---------------------------------- */
.main-header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 600;
}

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

.main-nav a {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width var(--transition-speed) ease-in-out;
}

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

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease-in-out;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--card);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--card);
}

/* ---------------------------------- */
/*           SECTION STYLES           */
/* ---------------------------------- */

/* HERO (Sektion 1) */
.hero-section {
    padding: 120px 0;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-content {
    flex: 3;
    position: relative;
}

.hero-content .subtitle {
    max-width: 500px;
    margin: 2rem 0;
}

.decorative-line {
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 80px;
    height: 2px;
    background-color: var(--accent);
}

.hero-image-container {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 400px;
    object-fit: contain;
}

/* GLOSSARY (Sektion 3) */
.glossary {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.glossary > div {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.glossary dt {
    font-family: var(--font-headings);
    font-size: 1.2rem;
    font-weight: 500;
}

/* TABLE (Sektion 4 & 9) */
.minimal-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.minimal-table th, .minimal-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-weight: 300;
}

.minimal-table th {
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--muted);
}

.tax-table td:last-child {
    text-align: right;
    font-weight: 400;
}

.tax-table .sum-row {
    border-top: 1px solid var(--text);
}

.tax-table .final-row td {
    font-weight: 600;
    color: var(--primary);
}


/* CARDS (Sektion 5, 8, 11) */
.card-grid-3, .card-grid-4 {
    display: grid;
    gap: 2rem;
}
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
    background-color: var(--card);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: transform var(--transition-speed) ease-in-out, border-color var(--transition-speed) ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.card h3 { margin-bottom: 1rem; }
.card p { margin-bottom: 0.5rem; }
.card .card-data { color: var(--muted); font-size: 0.9rem; margin-top: 1rem;}
.highlight-card { background-color: var(--highlight); }
.portfolio-item { margin-bottom: 0.5rem; }

/* CALCULATOR (Sektion 6) */
.calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background-color: var(--card);
    padding: 3rem;
    border: 1px solid var(--border);
}

.calculator-inputs { display: flex; flex-direction: column; gap: 2rem; }
.input-group label { display: block; margin-bottom: 0.5rem; color: var(--muted); font-size: 0.9rem;}
.input-group input[type="number"], .input-group input[type="range"] {
    width: 100%;
}

input[type="number"], select, textarea {
    padding: 0.75rem;
    border: 1px solid var(--border);
    background-color: var(--background);
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 0;
    transition: border-color var(--transition-speed);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    background: var(--border);
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    cursor: pointer;
    border-radius: 0;
    transition: background-color var(--transition-speed);
}
input[type="range"]::-webkit-slider-thumb:hover { background: var(--accent); }

.calculator-results { text-align: center; }
.result-label { font-size: 1rem; color: var(--muted); margin-bottom: 0.5rem; }
.result-value {
    font-size: 4rem;
    font-weight: 300;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 1rem;
}
.result-details { color: var(--muted); font-size: 0.9rem; }

/* BROKER (Sektion 7) */
.broker-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}
.broker-content { flex: 1; }
.broker-image-container { flex: 1; display: flex; justify-content: flex-end; }
.content-image { max-width: 450px; }

.comparison-list { list-style: none; margin-top: 2rem; }
.comparison-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.comparison-list li:first-child { border-top: 1px solid var(--border); }


/* PSYCHOLOGIE (Sektion 10) */
.rules-list {
    list-style: none;
    margin-top: 3rem;
}
.rules-list li {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}
.rules-list span {
    font-family: var(--font-headings);
    font-size: 2rem;
    color: var(--accent);
    line-height: 1;
}

/* FEHLER (Sektion 12) */
.numbered-list {
    list-style: none;
    counter-reset: fehler-counter;
}
.numbered-list li {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.numbered-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.numbered-list li span {
    font-family: var(--font-headings);
    font-size: 3rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1;
}
.numbered-list li h3 { margin-bottom: 0.5rem; }


/* TIMELINE (Sektion 13) */
.timeline {
    position: relative;
    max-width: 600px;
    margin: 3rem auto 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 1px;
    background-color: var(--border);
    top: 0;
    bottom: 0;
    left: 20px;
}
.timeline-item {
    padding: 1rem 0 2rem 60px;
    position: relative;
}
.timeline-dot {
    position: absolute;
    left: 15px;
    top: 1.2rem;
    width: 12px;
    height: 12px;
    background-color: var(--accent);
    border-radius: 50%;
    z-index: 1;
}
.timeline-content h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

/* FAQ (Sektion 14) */
.faq-accordion details {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
}
.faq-accordion details:first-child {
    border-top: 1px solid var(--border);
}
.faq-accordion summary {
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 2rem;
}
.faq-accordion summary::-webkit-details-marker { display: none; }
.faq-accordion summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform var(--transition-speed) ease-in-out;
}
.faq-accordion details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}
.faq-accordion p {
    padding-top: 1rem;
    max-width: 95%;
}

/* CONTACT (Sektion 15) */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}
.contact-info h2, .contact-info p {
    text-align: left;
}
address {
    font-style: normal;
    margin-top: 2rem;
    line-height: 1.8;
}
address a {
    display: block;
}
.contact-form .form-group {
    margin-bottom: 1.5rem;
}
.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
}
.contact-form button {
    width: 100%;
    margin-top: 1rem;
}

/* ---------------------------------- */
/*              FOOTER                */
/* ---------------------------------- */
.main-footer {
    background-color: var(--background);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    font-size: 0.9rem;
    color: var(--muted);
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-left span {
    font-size: 0.8rem;
}
.footer-right {
    display: flex;
    gap: 1.5rem;
}
.footer-right a {
    color: var(--muted);
}
.footer-right a:hover {
    color: var(--accent);
}

/* ---------------------------------- */
/*          RESPONSIVE DESIGN         */
/* ---------------------------------- */
@media (max-width: 992px) {
    .main-header .container {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
    }
    .main-nav { margin: 1rem 0; }
    
    .hero-container { flex-direction: column; text-align: center; }
    .hero-content { order: 2; }
    .hero-image-container { order: 1; margin-bottom: 2rem; }
    .hero-content .subtitle { margin: 2rem auto; }
    .decorative-line { left: 50%; transform: translateX(-50%); }

    .broker-container { flex-direction: column; }
    .broker-image-container { order: 1; margin-bottom: 2rem; }
    .broker-content { order: 2; text-align: center; }
    .broker-content h2 { text-align: center; }

    .calculator { grid-template-columns: 1fr; }
    .calculator-results { margin-top: 2rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    .content-section { padding: 80px 0; }
    
    .main-nav ul { gap: 1rem; flex-wrap: wrap; justify-content: center;}

    .glossary > div { grid-template-columns: 1fr; gap: 1rem; }
    .glossary dt { margin-bottom: 0.5rem; }

    .contact-container { grid-template-columns: 1fr; }
    .contact-info { text-align: center; }
    .contact-info h2 { text-align: center; }

    .footer-container { flex-direction: column; gap: 1.5rem; text-align: center;}
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .btn-header { display: none; }
}