/* ==========================================================================
   MR Invest – Design-System (1:1 nach Kundenentwurf V7, Schrift Quicksand)
   Gemeinsame Bausteine. Section-spezifisches CSS liegt inline in den Sections.
   ========================================================================== */

@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/quicksand-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/quicksand-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    /* === Die 3 Markenfarben – nur hier ändern === */
    --black: #0f0f0f;
    --gold: #c19a55;
    --white: #fff;

    /* Abstufungen derselben 3 Farben (Transparenzen / Tönungen) */
    --black-2: #1a1a1a;                      /* etwas hellere schwarze Fläche */
    --gold-deep: #9b7534;                    /* Gold für kleine Schrift auf Weiß (Lesbarkeit) */
    --gold-soft: rgba(193,154,85,.10);       /* zarte Goldfläche (Abschnitte, Auswahl) */
    --muted: rgba(15,15,15,.68);             /* Fließtext grau auf Weiß */
    --muted-inv: rgba(255,255,255,.74);      /* Fließtext auf Schwarz */
    --line: rgba(15,15,15,.13);              /* Linien auf Weiß */
    --line-inv: rgba(255,255,255,.16);       /* Linien auf Schwarz */
    --shadow: 0 30px 80px rgba(15,15,15,.10);

    /* Rundungen */
    --radius: 18px;      /* Karten, Boxen */
    --radius-sm: 12px;   /* Buttons, Felder */

    /* Höhen für den bildschirmfüllenden Start-Hero */
    --header-h: 89px;    /* Header 88px + 1px Linie */
    --marquee-h: 46px;   /* Laufband unter dem Hero */

    --font: 'Quicksand', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
    margin: 0;
    padding: 0;
    width: 100%;
    background: var(--white);
    color: var(--black);
    font-family: var(--font);
    font-weight: 500;
    line-height: 1.55;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { text-decoration: none; color: inherit; }
a:hover, a:focus { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, h5 { font-family: var(--font); }

.shell { max-width: 1320px; margin: auto; padding: 0 34px; }
.serif { font-family: var(--font); font-weight: 700; }
.micro { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--gold-deep); }
/* Auf schwarzen Flächen das helle Gold (bessere Lesbarkeit) */
.dark .micro, .topicHero .micro, .calcIntro .micro, .customerStory .micro, .coopCard.dark .micro,
.wizSide .micro, .scoreVisual .micro, .contactSide .micro, .footer .micro { color: var(--gold); }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-width: 210px; padding: 15px 17px; border: 1px solid var(--black); background: transparent; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; transition: .25s; color: var(--black); }
.btn:hover { color: var(--black); background: rgba(15,15,15,.04); }
.btn.solid, .btn.solid:hover { background: var(--black); color: #fff; }
.btn.solid:hover { background: var(--gold); border-color: var(--gold); }
.btn.light, .btn.light:hover { border-color: rgba(255,255,255,.45); color: #fff; }
.btn.light:hover { background: rgba(255,255,255,.08); }
.btn.copper, .btn.copper:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.copper:hover { filter: brightness(1.06); }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section.bone { background: var(--gold-soft); }
.section.white { background: #fff; }
.section.dark { background: var(--black); color: #fff; }
.detailSection { border-bottom: 1px solid var(--line); }
.headrow { display: grid; grid-template-columns: 1.15fr .85fr; gap: 80px; align-items: end; margin-bottom: 46px; }
.headrow h2 { font-weight: 700; font-size: 50px; line-height: 1.08; margin: 13px 0 0; letter-spacing: -.03em; }
.headrow > p { color: var(--muted); line-height: 1.75; font-size: 16px; margin: 0; }
.dark .headrow > p { color: var(--muted-inv); }

/* ---------- Themen-Hero (Unterseiten) ---------- */
.topicHero { background: var(--black); color: #fff; overflow: hidden; position: relative; }
/* Hero läuft rechts bis zum Bildschirmrand, links bündig mit dem Inhalt (.shell = 1320px) */
.topicGrid { display: grid; grid-template-columns: min(640px, 52%) 1fr; min-height: 560px; padding-left: max(34px, calc((100% - 1320px) / 2 + 34px)); }
.topicGrid > * { min-width: 0; }
.topicCopy { padding: 86px 70px 74px 0; display: flex; flex-direction: column; justify-content: center; }
.topicCopy h1 { font-weight: 700; font-size: 60px; line-height: 1.06; margin: 18px 0 22px; letter-spacing: -.035em; }
.topicCopy p { max-width: 610px; color: var(--muted-inv); font-size: 18px; line-height: 1.75; }
.topicPhoto { position: relative; min-height: 560px; margin-left: 22px; }
.topicPhoto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.topicPhoto:after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--black) 0%, rgba(15,15,15,.48) 15%, transparent 46%); pointer-events: none; }
.heroBadge { position: absolute; z-index: 2; right: 24px; bottom: 24px; background: rgba(255,255,255,.95); color: var(--black); padding: 18px 20px; width: 265px; border-top: 3px solid var(--gold); }
.heroBadge span { display: block; font-size: 12px; letter-spacing: .16em; color: var(--gold-deep); text-transform: uppercase; font-weight: 700; }
.heroBadge strong { display: block; font-weight: 700; font-size: 21px; line-height: 1.15; margin: 5px 0; }
.heroBadge p { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- Textspalten ---------- */
.textColumns { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; max-width: 1120px; }
.textColumns h3 { font-weight: 700; font-size: 23px; margin: 0 0 8px; }
.textColumns p { font-size: 16px; color: var(--muted); line-height: 1.8; margin: 0 0 27px; }

/* ---------- Unterschied-Karten ---------- */
.differenceGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.differenceCard { background: var(--gold-soft); padding: 25px; min-height: 260px; border-top: 3px solid var(--gold); }
.differenceCard .ico-head > span:first-child { font-size: 13px; color: var(--gold-deep); font-weight: 700; }
.differenceCard h3 { font-weight: 700; font-size: 22px; margin: 28px 0 10px; }
.differenceCard .ico { background: #fff; }
.differenceCard p { font-size: 14px; color: var(--muted); line-height: 1.75; }
.differenceCard b { color: var(--black); }

/* ---------- Rechner ---------- */
.calcWrap { display: grid; grid-template-columns: .88fr 1.12fr; gap: 24px; align-items: stretch; margin-top: 38px; }
.calcIntro { background: var(--black); color: #fff; padding: 34px; min-height: 460px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.calcIntro h3 { font-weight: 700; font-size: 32px; line-height: 1.12; margin: 10px 0; }
.calcIntro p { font-size: 15px; color: var(--muted-inv); }
.calcFacts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.calcFacts div { border-top: 1px solid var(--line-inv); padding-top: 12px; font-size: 12px; color: var(--muted-inv); }
.calcFacts b { display: block; color: #fff; font-size: 15px; }
.calcBox { background: #fff; border: 1px solid var(--line); padding: 30px; }
.calcBox h3 { font-weight: 700; font-size: 26px; margin: 0 0 18px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.field input, .field select { width: 100%; border: 1px solid var(--line); background: #fff; padding: 12px; outline: none; border-radius: var(--radius-sm); }
.field input:focus, .field select:focus { border-color: var(--gold); }
.calcAction { margin-top: 16px; border: 0; background: var(--black); color: #fff; padding: 13px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.calcAction:hover { background: var(--gold); }
.calcResult { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; }
.calcResult:empty { display: none; }
.ring { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) 0deg 225deg, var(--line) 225deg); position: relative; }
.ring:after { content: ""; position: absolute; inset: 15px; background: #fff; border-radius: 50%; }
.ringText { position: relative; z-index: 2; text-align: center; }
.ringText b { display: block; font-weight: 700; font-size: 25px; }
.ringText span { font-size: 12px; color: var(--muted); }
.resultBig { font-weight: 700; font-size: 34px; color: var(--black-2); margin-bottom: 4px; line-height: 1.15; }
.resultMeta { font-size: 14px; color: var(--muted); }
.resultBars { display: grid; gap: 8px; margin-top: 14px; }
.resultBar { height: 8px; background: var(--line); position: relative; }
.resultBar i { display: block; height: 100%; background: var(--gold); width: 50%; }
.chartArea { height: 180px; margin-top: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, #fff, var(--gold-soft)); position: relative; padding: 10px; }
.chartArea svg { width: 100%; height: 100%; }
.wealthSummary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.wealthSummary > div { border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Modal (Financial Lab) ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 3000; background: rgba(15,15,15,.7); align-items: center; justify-content: center; padding: 30px; }
.modal.open { display: flex; }
.modalBox { width: min(860px, 100%); max-height: 90vh; overflow: auto; background: var(--white); padding: 30px; position: relative; }
.modalClose { position: absolute; right: 16px; top: 16px; border: 1px solid var(--line); background: #fff; width: 34px; height: 34px; font-size: 18px; line-height: 1; }
.modalBox h2 { font-weight: 700; font-size: 30px; margin-top: 0; padding-right: 40px; }
.modalBox .calcBox { border: 0; padding: 0; background: transparent; }
.modalChart { height: 170px; border: 1px solid var(--line); background: linear-gradient(180deg, #fff, var(--gold-soft)); margin-top: 18px; padding: 8px; }
.modalChart svg { width: 100%; height: 100%; }
.modalMetrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.modalMetric { border-top: 1px solid var(--line); padding-top: 10px; }
.modalMetric b { display: block; font-weight: 700; font-size: 23px; color: var(--black-2); }
.modalMetric span { font-size: 12px; color: var(--muted); }
.toolHint { font-size: 12px; color: var(--muted); margin-top: 8px; }

@keyframes fade { from { opacity: .35; } to { opacity: 1; } }
main { animation: fade .35s ease; }

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; animation: none !important; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1150px) {
    .shell { padding: 0 26px; }
    .topicGrid { padding-left: 26px; }
    .headrow { gap: 40px; }
    .headrow h2 { font-size: 42px; }
    .topicCopy { padding: 70px 40px 60px 0; }
    .topicCopy h1 { font-size: 48px; }
    .differenceGrid { grid-template-columns: 1fr 1fr; }
    .differenceCard { min-height: 0; }
    .differenceCard h3 { margin-top: 22px; }
}

@media (max-width: 900px) {
    .section { padding: 72px 0; }
    .headrow { grid-template-columns: 1fr; gap: 16px; margin-bottom: 34px; }
    .headrow h2 { font-size: 36px; }
    .topicGrid { grid-template-columns: 1fr; min-height: 0; padding: 0 26px; }
    .topicCopy { padding: 56px 0 40px; }
    .topicCopy h1 { font-size: 40px; }
    .topicPhoto { min-height: 340px; margin: 0 -26px; order: -1; } /* Bild mobil ganz oben */
    .topicPhoto:after { background: linear-gradient(0deg, var(--black) 0%, rgba(15,15,15,.25) 22%, transparent 50%); }
    .textColumns { grid-template-columns: 1fr; gap: 0; }
    .calcWrap { grid-template-columns: 1fr; }
    .calcIntro { min-height: 0; }
}

@media (max-width: 600px) {
    .shell { padding: 0 18px; }
    .section { padding: 56px 0; }
    .headrow h2 { font-size: 29px; }
    .topicCopy { padding: 44px 0 34px; }
    .topicGrid { padding: 0 18px; }
    .topicCopy h1 { font-size: 33px; }
    .topicCopy p { font-size: 16px; }
    .topicPhoto { min-height: 340px; margin: 0 -18px; }
    .heroBadge { padding: 12px 16px; }
    .heroBadge p { display: none; }
    .heroBadge strong { font-size: 18px; margin-bottom: 0; }
    .heroBadge { left: 18px; right: 18px; bottom: 18px; width: auto; }
    .btn { min-width: 0; width: 100%; }
    .differenceGrid { grid-template-columns: 1fr; }
    .calcIntro, .calcBox { padding: 22px; }
    .calcIntro h3 { font-size: 26px; }
    .fields { grid-template-columns: 1fr; }
    .calcAction { width: 100%; }
    .calcResult { grid-template-columns: 1fr; justify-items: start; }
    .resultBig { font-size: 28px; }
    .wealthSummary { grid-template-columns: 1fr; }
    .modal { padding: 10px; }
    .modalBox { padding: 22px 18px; max-height: 94vh; }
    .modalBox h2 { font-size: 24px; }
    .modalMetrics { grid-template-columns: 1fr 1fr; }
}

/* Sprungziele nicht unter dem Sticky-Header verstecken */
[id] { scroll-margin-top: 100px; }

/* ==========================================================================
   RUNDUNGEN – alle Karten, Boxen, Buttons und Felder
   ========================================================================== */
.btn, .navcta, .calcAction, .submit, .smallBtn, .quizNav button, .wizNav button, .modalClose,
.open-sidebar, .hide-sidebar, .field input, .field select, .contactChoice, .multi, .scoreAnswer,
.docButtons button, .quickLinks a, .toolTabs button { border-radius: var(--radius-sm); }

.partnerCard, .heroBadge, .customerPhoto, .customerStory, .segment, .tool, .coopCard,
.calcIntro, .calcBox, .chartArea, .modalChart, .differenceCard, .insCard, .wizChoice, .rec,
.quizCard, .scoreVisual, .labTool, .utilityCard, .aboutImage, .aboutPrinciples > div,
.success, .legalContent details, .modalBox, .dropdown, .dropdown a, .wizard, .statBand, .contactBoard { border-radius: var(--radius); }

.wizard, .statBand, .contactBoard, .customerPhoto, .aboutImage, .legalContent details { overflow: hidden; }
.differenceCard { border-top: 0; box-shadow: inset 0 3px 0 var(--gold); }
.heroBadge, .partnerCard { border-top: 0; box-shadow: inset 0 3px 0 var(--gold), var(--shadow); }
.toolTabs button { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.modalBox .calcBox { border-radius: 0; }
.quizProgress, .quizProgress i, .wizProgress, .wizProgress i, .localProgress, .localProgress i,
.resultBar, .resultBar i, .scoreCat i, .scoreCat i span { border-radius: 99px; }
.tag { border-radius: 6px; }
.cursorLine { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.topicPhoto { border-radius: var(--radius) 0 0 var(--radius); overflow: hidden; }

@media (max-width: 900px) { .topicPhoto { border-radius: 0; } }

/* Lange deutsche Wörter auf sehr kleinen Displays umbrechen statt überlaufen */
h1, h2, h3, h4, .micro, .calcFacts, .field label { overflow-wrap: break-word; hyphens: auto; }
.headrow > *, .fields > *, .calcWrap > *, .calcFacts > *, .differenceGrid > *, .processGrid > *,
.quizLayout > *, .customerGrid > *, .coopGrid > *, .utilityGrid > *, .toolGrid > *, .toolLibrary > *,
.wizChoices > *, .multiGrid > *, .wizMain, .textColumns > *, .insuranceCards > *, .aboutGrid > *, .credentialGrid > *, .aboutPrinciples > *, .wizard > * { min-width: 0; }

@media (max-width: 1080px) { :root { --header-h: 77px; } }

/* ==========================================================================
   ICONS (Font Awesome, lokal in js/fontawesome.js)
   Einheitlicher runder Icon-Kreis: <span class="ico"><i class="fa-solid fa-..."></i></span>
   ========================================================================== */
.ico { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: var(--gold-soft); color: var(--gold-deep);
       display: inline-grid; place-items: center; font-size: 19px; transition: .25s; }
.ico.sm { width: 40px; height: 40px; font-size: 16px; }
.ico.lg { width: 56px; height: 56px; font-size: 22px; }
/* auf schwarzen Flächen */
.dark .ico, .customerStory .ico, .wizSide .ico { background: rgba(193,154,85,.16); color: var(--gold); }
.dark .tool .ico { background: var(--gold-soft); color: var(--gold-deep); } /* weiße Karten im schwarzen Bereich */
/* Hover: Kreis füllt sich gold */
a:hover > .ico, button:hover > .ico, a:hover .ico-head .ico, button:hover .ico-head .ico { background: var(--gold); color: #fff; }
/* Kopfzeile einer Karte: Nummer links, Icon rechts */
.ico-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
/* Textlisten der Unterseiten: Icon links, Titel + Text rechts */
.tcItem { display: flex; gap: 16px; align-items: flex-start; }
.tcItem h3 { margin-top: 10px; }
/* Kurzfakten in den Rechnern */
.calcFacts b svg { color: var(--gold); margin-right: 5px; }
