/* Startseite mit Weiche. Farbwelt der Ratgeber-Hefte (V2): Nacht #12191C, Petrol #1E2A2C, Gold #C99A55, Papier #F2EFE9. */
:root {
  --nacht: #0e1416; --petrol: #1e2a2c; --gold: #c99a55; --gold-tief: #a8722c; --papier: #f6f2ea; --grau: #a79c8b;
  --serif: 'Source Serif 4', Georgia, serif; --sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --weich: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.start { background: var(--nacht); color: var(--papier); font-family: var(--serif); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

/* Vorhang: Goldlinie zieht sich auf, dann öffnet sich die Seite */
.vorhang { position: fixed; inset: 0; z-index: 50; background: var(--nacht); display: grid; place-items: center; pointer-events: none;
  animation: vorhangAuf 1s var(--weich) 1.15s forwards; }
.vorhang-linie { width: 0; height: 1px; background: var(--gold); animation: linie 1s var(--weich) .15s forwards; }
@keyframes linie { to { width: min(420px, 60vw); } }
@keyframes vorhangAuf { to { opacity: 0; visibility: hidden; } }

/* Kopfleiste */
.leiste { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: 26px clamp(20px, 4vw, 56px); font-family: var(--sans); opacity: 0; animation: einblenden .9s var(--weich) 1.7s forwards; }
.wortmarke { display: flex; gap: 10px; align-items: center; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; }
.wortmarke .c { color: var(--gold); }
.wortmarke .m-icon { width: 24px; height: 24px; margin-right: 4px; border-radius: 3px; flex: none; box-shadow: 0 1px 8px rgba(0,0,0,.35); }
.leiste nav { display: flex; gap: 28px; font-size: 13px; letter-spacing: .06em; }
.leiste nav a { position: relative; color: #ded6c7; padding: 4px 0; }
.leiste nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--gold); transition: right .4s var(--weich); }
.leiste nav a:hover { color: #fff; } .leiste nav a:hover::after { right: 0; }

/* Weiche */
.weiche { min-height: 100vh; display: flex; flex-direction: column; }
/* Ab Tablet-Breite: die ganze Startseite passt in einen Bildschirm, ohne Scrollen */
@media (min-width: 700px) and (min-height: 560px) {
  body.start { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  body.start .weiche { flex: 1; min-height: 0; position: relative; }
  body.start .tueren { min-height: 0; }
  /* Beide Türen beginnen auf derselben Linie knapp unter der Frage, der Knopf steht unten bündig */
  body.start .tuer { padding-top: calc(30vh + 70px); align-items: stretch; transition: flex-grow .9s var(--weich), filter .9s var(--weich), padding-top .8s var(--weich); }
}
.kopfzeile { position: absolute; z-index: 10; left: 0; right: 0; top: clamp(64px, 8.5vh, 110px); text-align: center; pointer-events: none; transition: opacity .6s var(--weich), transform .6s var(--weich); }
.kopfzeile .strich { width: 0; height: 2px; background: var(--gold); margin: 0 auto clamp(12px, 2vh, 22px); animation: strich 1s var(--weich) 1.9s forwards; }
@keyframes strich { to { width: 64px; } }
.vorzeile { font-family: var(--sans); font-size: 12px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); margin: 0 0 clamp(8px, 1.5vh, 16px); }
.vorzeile span, .frage .w { display: inline-block; opacity: 0; transform: translateY(18px); animation: wortAuf .9s var(--weich) forwards; }
.vorzeile span:nth-child(1) { animation-delay: 2s } .vorzeile span:nth-child(2) { animation-delay: 2.06s }
.vorzeile span:nth-child(3) { animation-delay: 2.12s } .vorzeile span:nth-child(4) { animation-delay: 2.18s }
.frage { margin: 0; font-weight: 600; font-size: clamp(1.8rem, min(4.4vw, 6.2vh), 3.6rem); letter-spacing: -.015em; line-height: 1.08; text-shadow: 0 2px 30px rgba(0,0,0,.45); }
.frage .w:nth-child(1) { animation-delay: 2.25s } .frage .w:nth-child(2) { animation-delay: 2.33s } .frage .w:nth-child(3) { animation-delay: 2.41s }
.frage .w:nth-child(4) { animation-delay: 2.49s } .frage .w:nth-child(5) { animation-delay: 2.57s } .frage .w:nth-child(6) { animation-delay: 2.65s }
@keyframes wortAuf { to { opacity: 1; transform: none; } }
@keyframes einblenden { to { opacity: 1; } }

.tueren { flex: 1; display: flex; min-height: 100vh; perspective: 1400px; }
.tuer { position: relative; flex: 1 1 50%; padding-top: max(44vh, 380px); overflow: hidden; display: flex; align-items: stretch; isolation: isolate;
  transition: flex-grow .9s var(--weich), filter .9s var(--weich);
  clip-path: inset(100% 0 0 0); animation: tuerAuf 1.3s var(--weich) forwards; }
.tuer.privat { animation-delay: 1.35s; } .tuer.institutionell { animation-delay: 1.5s; }
@keyframes tuerAuf { to { clip-path: inset(0 0 0 0); } }
.tuer + .tuer { border-left: 1px solid rgba(201,154,85,.35); }
.tuer .bild { position: absolute; inset: -4%; background-size: cover; background-position: center; z-index: -2;
  transform: scale(1.1) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform .7s cubic-bezier(.2, .6, .2, 1), filter 1s;
  animation: kenBurns 26s ease-in-out infinite alternate; }
@keyframes kenBurns { from { background-position: 45% 50%; } to { background-position: 55% 45%; } }
.tuer .schleier { position: absolute; inset: 0; z-index: -1; transition: opacity .9s;
  background: linear-gradient(180deg, rgba(14,20,22,.78) 0%, rgba(14,20,22,.25) 38%, rgba(14,20,22,.82) 72%, rgba(14,20,22,.97) 100%); }
.tuer.institutionell .schleier { background: linear-gradient(180deg, rgba(14,24,28,.82) 0%, rgba(20,36,40,.45) 38%, rgba(14,24,28,.86) 72%, rgba(10,16,18,.98) 100%); }
.tuer.institutionell .bild { filter: saturate(.55) hue-rotate(-8deg); }

/* Oben bündig (Kicker und Titel auf einer Höhe), Knopf unten bündig: beide Türen stehen auf denselben Linien */
.inhalt { position: relative; padding: 0 clamp(24px, 4.6vw, 72px) clamp(26px, 6vh, 80px); max-width: 640px; display: flex; flex-direction: column; align-items: flex-start;
  transform: translate3d(var(--tx, 0), var(--ty, 0), 0); transition: transform .7s cubic-bezier(.2, .6, .2, 1); }
.inhalt .los { margin-top: auto; }
.inhalt > :nth-last-child(2) { margin-bottom: clamp(16px, 3vh, 30px); }
/* Kicker als dunkle Plakette: bleibt auf jedem Bildausschnitt lesbar */
.kicker { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: #e3b877; display: inline-flex; gap: 14px; align-items: center;
  padding: 6px 18px 6px 6px; border-radius: 999px; background: rgba(10,15,17,.3); border: 1px solid rgba(201,154,85,.3);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.kicker .nr { color: #fff; background: none; border: 1px solid rgba(255,255,255,.75); border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; letter-spacing: 0; font-size: 11px; font-weight: 400; }
.tuer h2 { font-size: clamp(2.2rem, min(4.6vw, 7vh), 4.4rem); line-height: 1.02; font-weight: 600; letter-spacing: -.02em; margin: clamp(12px, 2.2vh, 20px) 0 clamp(10px, 2vh, 18px); }
.tuer h2, .satz { width: fit-content; }
.tuer h2 em { font-style: italic; font-weight: 400; color: var(--gold); }
.satz { font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.55; color: #ded6c7; margin: 0; max-width: 480px; }

/* Aufklappende Details beim Überfahren */
.themen-liste, .phasen { list-style: none; padding: 0; margin: 0; max-height: 0; overflow: hidden; transition: max-height .8s var(--weich), margin .8s var(--weich); }
.themen-liste li, .phasen li { font-family: var(--sans); font-size: 14px; color: #ede7da; padding: 7px 0; border-top: 1px solid rgba(233,224,208,.18);
  opacity: 0; transform: translateX(-14px); transition: opacity .5s, transform .6s var(--weich); transition-delay: calc(var(--i) * 70ms); }
.phasen { display: flex; gap: 0; counter-reset: ph; }
.phasen li { flex: 1; border-top: 2px solid rgba(201,154,85,.4); padding-top: 12px; counter-increment: ph; font-size: 13px; }
.phasen li::before { content: "0" counter(ph); display: block; font-size: 11px; color: var(--gold); letter-spacing: .14em; margin-bottom: 4px; }

.los { display: inline-flex; align-items: center; gap: 14px; margin-top: clamp(18px, 3.4vh, 30px); font-family: var(--sans); font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  position: relative; padding: 16px 26px; border: 1px solid rgba(201,154,85,.38); transition: color .5s, gap .5s var(--weich); }
/* Filigran statt gefüllt: zwei haarfeine Goldlinien zeichnen den Rahmen von zwei Ecken aus nach */
.los::before, .los::after { content: ""; position: absolute; width: 0; height: 0; border: 0 solid var(--gold); opacity: 0; pointer-events: none;
  transition: width .3s var(--weich) .3s, height .3s var(--weich), opacity .1s .6s; }
.los::before { top: -1px; left: -1px; border-top-width: 1px; border-right-width: 1px; }
.los::after { bottom: -1px; right: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.los i { width: 26px; height: 1px; background: currentColor; position: relative; transition: width .5s var(--weich); }
@keyframes pfeil { 0%, 100% { transform: none; } 50% { transform: translateX(5px); } }
.los i::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); }

/* Investment-Zyklus: klein und filigran ganz oben in der Mitte, über dem Goldstrich */
.zyklus { display: block; margin: 0 auto clamp(10px, 1.6vh, 16px); width: clamp(40px, min(4vw, 6vh), 62px); opacity: 0; animation: einblenden 1s var(--weich) 2.3s forwards; overflow: visible; }
.zyklus circle { fill: none; }
.zyklus .bahn { stroke: rgba(233,224,208,.22); stroke-width: 3; }
.zyklus .zug { stroke: var(--gold); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 490; stroke-dashoffset: 490; transform-origin: center; transform: rotate(-90deg);
  animation: zug 3.2s var(--weich) 2.4s forwards; }
.zyklus .punkt { fill: var(--gold); stroke: none; transform-origin: 100px 100px; animation: umlauf 14s linear 2.4s infinite; }
@keyframes zug { to { stroke-dashoffset: 0; } }
@keyframes umlauf { to { transform: rotate(360deg); } }

/* Zustände (Desktop): die gewählte Tür wird breiter, die andere tritt zurück */
@media (hover: hover) and (min-width: 900px) {
  /* Aktiv erst, wenn die Maus eine Weile über dem Textbereich steht (Klasse .aktiv aus start.js) */
  .tueren:has(.tuer.aktiv) .tuer:not(.aktiv) { filter: brightness(.55) saturate(.7); }
  .tueren .tuer.aktiv { flex-grow: 1.55; filter: none; }
  .weiche:has(.tuer.aktiv) .kopfzeile { opacity: 0; transform: translateY(-12px); }
  body.start .tueren .tuer.aktiv { padding-top: calc(clamp(78px, 11vh, 140px) + 12px); }
  .tuer.aktiv .themen-liste { max-height: 240px; margin-top: clamp(12px, 2vh, 20px); }
  .tuer.aktiv .phasen { max-height: 90px; margin-top: 26px; }
  .tuer.aktiv li { opacity: 1; transform: none; }
  .tuer.aktiv .los { color: #e3b877; gap: 20px; }
  .tuer.aktiv .los::before, .tuer.aktiv .los::after { width: calc(100% + 2px); height: calc(100% + 2px); opacity: 1;
    transition: width .45s var(--weich), height .45s var(--weich) .45s, opacity .1s; }
  .tuer.aktiv .los i { width: 40px; animation: pfeil 1.8s ease-in-out .9s infinite; }
}

.unten { flex: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 30px; padding: 14px clamp(20px, 4vw, 56px);
  font-family: var(--sans); font-size: 12.5px; color: var(--grau); border-top: 1px solid rgba(201,154,85,.25); background: var(--nacht); }
.unten nav { display: flex; gap: 26px; } .unten a { color: #ded6c7; } .unten a:hover { color: var(--gold); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (hover: none) and (min-width: 700px) and (min-height: 1000px) {
  .themen-liste { max-height: none; margin-top: 18px; } .phasen { max-height: none; margin-top: 20px; }
  .themen-liste li, .phasen li { opacity: 1; transform: none; }
}
@media (min-width: 700px) and (max-width: 899px) { .leiste nav { gap: 20px; } .leiste { padding: 22px 28px; } }

/* Handy: Türen übereinander, Inhalte immer sichtbar */
@media (max-width: 699px) {
  .leiste { padding: 18px 20px; } .leiste nav a:not(.kontakt) { display: none; }
  .kopfzeile { position: relative; top: 0; padding: 110px 20px 30px; background: var(--nacht); }
  .tueren { flex-direction: column; min-height: 0; }
  .tuer { min-height: 82vh; padding-top: 0; align-items: flex-end; } .tuer + .tuer { border-left: 0; border-top: 1px solid rgba(201,154,85,.35); }
  .themen-liste { max-height: none; margin-top: 18px; } .phasen { max-height: none; margin-top: 20px; }
  .themen-liste li, .phasen li { opacity: 1; transform: none; }
  .zyklus { width: 48px; margin: 0 auto 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .tuer .bild { animation: none; }
}

/* Impressum und Datenschutz: ruhige Leseseite in derselben Farbwelt, Rückweg führt zur Startseite */
body.recht { height: auto; overflow: auto; display: block; }
body.recht .leiste { position: static; opacity: 1; animation: none; border-bottom: 1px solid rgba(201,154,85,.25); }
.rechtstext { max-width: 760px; margin: 0 auto; padding: clamp(36px, 6vh, 72px) clamp(20px, 4vw, 40px) 80px; font-size: 1.05rem; line-height: 1.65; color: #ded6c7; }
.rechtstext h1 { color: var(--papier); font-weight: 600; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.015em; margin: 18px 0 28px; }
.rechtstext h2 { color: var(--papier); font-weight: 600; font-size: 1.3rem; margin: 40px 0 10px; }
.rechtstext h3 { color: var(--papier); font-size: 1.08rem; margin: 26px 0 8px; }
.rechtstext a { color: var(--gold); } .rechtstext a:hover { text-decoration: underline; }
.rechtstext strong { color: var(--papier); }
.rechtstext .zurueck { font-family: var(--sans); font-size: 13px; letter-spacing: .08em; color: var(--gold); }

/* KI-Kennzeichnung je Bild, unten rechts (Rico 25.09.2026, EU-KI-Verordnung Art. 50) */
.ki-marke { position: absolute; right: 12px; bottom: 10px; z-index: 3; pointer-events: none;
  font-family: var(--sans, "Lato", Helvetica, Arial, sans-serif); font-size: 10px; line-height: 1; letter-spacing: .06em;
  color: rgba(200,200,200,.62); }
/* Immer unten rechts IM Bild (Rico 25.09. 14:03): im Bildband liegen Bild und Marke in derselben Rasterzelle,
   die Bildunterschrift darunter, so sitzt die Marke auf dem Bild statt auf der Unterschrift. */
.bildband { position: relative; display: grid; }
.bildband > img, .bildband > .ki-marke { grid-area: 1 / 1; }
.bildband > img { width: 100%; }
.bildband > .ki-marke { position: relative; right: auto; bottom: auto; align-self: end; justify-self: end; margin: 0 12px 10px 0; }
.bildband > figcaption { grid-row: 2; width: 100%; }
.karte .foto .ki-marke { z-index: 2; left: auto; right: 12px; bottom: 10px; font-size: 10px; letter-spacing: .06em; text-transform: none; color: rgba(200,200,200,.62); }
.mitnehmen .heft .ki-marke { left: auto; right: 6px; bottom: 5px; top: auto; font-family: var(--sans, "Lato", Helvetica, Arial, sans-serif); font-size: 8px; line-height: 1; letter-spacing: .06em; text-shadow: none; color: rgba(200,200,200,.62); }
