/* Olson-IT – ruhiger KI-Look. Keine externen Ressourcen. */
:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --soft: #eef1ee;
  --line: #dfe4e0;
  --text: #1d2330;
  --muted: #6b7484;
  --accent: #14a38b;
  --accent-soft: #e2f4ef;
  --shadow: 0 1px 2px rgba(20, 30, 40, .04), 0 8px 28px rgba(20, 30, 40, .06);
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --surface: #1b1f26;
    --soft: #222832;
    --line: #2c333e;
    --text: #e8ecf2;
    --muted: #949daa;
    --accent: #2fc4a8;
    --accent-soft: #173a34;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: 1rem clamp(1rem, 4vw, 2rem); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.brand b { color: var(--accent); font-weight: 600; }
.model { font-size: .85rem; color: var(--muted); padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; }

/* ---------- Bühne ---------- */
.stage { flex: 1; width: min(46rem, 100% - 2rem); margin: 0 auto; padding-bottom: 3rem; }

/* 1. Startfenster */
.welcome { display: none; flex-direction: column; align-items: center; padding-top: clamp(3rem, 14vh, 9rem); transition: opacity .45s ease, transform .45s ease; }
.js .welcome { display: flex; }
.welcome.leave { opacity: 0; transform: translateY(-12px); }
.js .welcome[hidden] { display: none; }
.welcome-logo { margin-bottom: 1.25rem; }
.greeting { font: 400 clamp(1.8rem, 5vw, 2.6rem)/1.2 var(--serif); letter-spacing: -.01em; text-align: center; margin: 0 0 2rem; }

.composer {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1rem .7rem 1.2rem; transition: border-color .2s;
}
.composer.focus { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.composer-field { min-height: 3.2rem; font-size: 1.08rem; position: relative; }
.placeholder { color: var(--muted); }
.typing .placeholder { display: none; }
.caret { display: inline-block; width: 2px; height: 1.2em; background: var(--accent); vertical-align: -.2em; margin-left: 1px; animation: blink 1s steps(1) infinite; }
.placeholder + .caret, .caret + .placeholder { margin-left: 0; }
@keyframes blink { 50% { opacity: 0; } }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.composer-hint { font-size: .8rem; color: var(--muted); }
.send {
  display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 10px;
  background: var(--soft); color: var(--muted); transition: background .2s, color .2s, transform .15s;
}
.send svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.typing .send { background: var(--accent); color: #fff; }
.send.press { transform: scale(.88); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.25rem; }
.chip { font-size: .88rem; color: var(--muted); padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }

/* 2.–4. Chat */
.chat { padding-top: 2rem; }
.js .chat { display: none; }
.js .stage.is-chat .chat { display: block; }
.msg-user {
  margin-left: auto; width: fit-content; max-width: 85%;
  background: var(--soft); padding: .7rem 1.1rem; border-radius: 16px 16px 4px 16px; margin-bottom: 1.75rem;
}
.msg-ai { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.75rem; }
.js .turn { display: none; }
.js .msg-user.show { display: block; animation: rise .4s ease both; }
.js .msg-ai.show { display: flex; animation: rise .4s ease both; }
.no-js #pick-msg, .no-js #ai1 .thinking, .no-js #ai2 .thinking, .no-js .choice { display: none; }
.no-js .result + .result { margin-top: 1.5rem; }
.ai-avatar { flex: none; margin-top: .15rem; }
.ai-avatar.spin { animation: think 1.6s ease-in-out infinite; }
@keyframes think { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(.88); } 100% { transform: rotate(360deg) scale(1); } }
.ai-body { flex: 1; min-width: 0; }

.thinking { display: none; }
.js .thinking.show { display: block; animation: rise .35s ease both; }
.thinking-head { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .95rem; }
.thinking.done .dots { display: none; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.steps { list-style: none; margin: .6rem 0 1.2rem; padding: 0 0 0 1rem; border-left: 2px solid var(--line); font-size: .9rem; color: var(--muted); }
.steps li { display: none; padding: .15rem 0; }
.steps li.active, .steps li.ok { display: block; animation: rise .3s ease both; }
.steps li.active::before { content: "◌ "; color: var(--accent); }
.steps li.ok::before { content: "✓ "; color: var(--accent); }
.thinking.done .steps { display: none; }
.thinking.done { margin-bottom: .6rem; }

.answer { margin: 0 0 1.25rem; font-size: 1.05rem; }
.answer:empty { display: none; }

/* Rückfrage: Beruflich / Privat */
.choice { display: flex; flex-wrap: wrap; gap: .6rem; }
.js .choice { display: none; }
.js .choice.show { display: flex; animation: rise .35s ease both; }
.choice button {
  font: 600 1rem/1 var(--font); color: var(--text); background: var(--surface); cursor: pointer;
  padding: .8rem 1.4rem; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  transition: border-color .15s, background .15s, transform .15s;
}
.choice button:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.choice button.chosen { background: var(--accent); border-color: var(--accent); color: #fff; }
.choice button:not(.chosen) { opacity: .75; }
.choice:not(:has(.chosen)) button { opacity: 1; }
.choice.busy button { cursor: progress; }
.choice:not(.busy) button:not(.chosen):hover { opacity: 1; }
.js .answer { display: none; }
.js .answer.show { display: block; }

/* Die erzeugte Website */
.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.js .result { display: none; }
.js .result.show { display: block; animation: rise .4s ease both; }
.result-bar { display: flex; align-items: center; justify-content: space-between; padding: .65rem 1rem; border-bottom: 1px solid var(--line); background: var(--soft); }
.file { font: 500 .82rem/1 var(--mono); color: var(--muted); }
.badge { font-size: .78rem; color: var(--accent); background: var(--accent-soft); padding: .2rem .6rem; border-radius: 999px; }
.result-body { padding: clamp(1.25rem, 4vw, 2rem); }

.gen { margin-bottom: 2rem; }
.gen:last-child { margin-bottom: 0; }
.js .gen { display: none; }
.js .gen.skeleton, .js .gen.show { display: block; }
.js .gen.skeleton { position: relative; color: transparent; }
.js .gen.skeleton * { color: transparent !important; border-color: transparent !important; background: transparent !important; }
.js .gen.skeleton::after {
  content: ""; position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(90deg, var(--soft) 0%, var(--line) 50%, var(--soft) 100%); background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
}
.js .gen.show { animation: rise .45s ease both; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.eyebrow { font: 500 .8rem/1 var(--mono); color: var(--accent); letter-spacing: .03em; margin: 0 0 .8rem; }
.r-hero h2 { font: 400 clamp(2rem, 6vw, 2.8rem)/1.1 var(--serif); margin: 0 0 .8rem; letter-spacing: -.015em; }
.lead { color: var(--muted); font-size: 1.05rem; margin: 0; }
.r-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; }
.js .r-cards.show, .js .r-cards.skeleton { display: grid; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; background: var(--bg); }
.card h3 { font-size: 1rem; margin: 0 0 .3rem; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.r-lab h3, .r-contact h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.r-lab p { margin: 0; color: var(--muted); }
.mail { display: inline-block; margin-top: .3rem; padding: .6rem 1rem; border-radius: 12px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; }
.mail:hover { filter: brightness(1.08); }

/* Private Karte: Fotos */
.photo-hero { margin: calc(-1 * clamp(1.25rem, 4vw, 2rem)) calc(-1 * clamp(1.25rem, 4vw, 2rem)) 2rem; }
.photo-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }
.photo-hero figcaption { padding: .5rem clamp(1.25rem, 4vw, 2rem) 0; }
.r-private { max-width: 34rem; }
.r-private p { color: var(--muted); margin: 0 0 .8rem; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.js .gallery.show, .js .gallery.skeleton { display: grid; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--soft); }
.gallery img.pos-top { object-position: 50% 30%; }
figcaption { font-size: .82rem; color: var(--muted); margin-top: .4rem; }
.aside { margin: 1rem 0 0; font-size: .82rem; }
.aside a { color: var(--muted); }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* Beruflich: Zeitleiste + Schwerpunkte */
.sub { font: 400 1.5rem/1.2 var(--serif); margin: 0 0 1rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; margin: 0 0 1.4rem; max-width: 36rem; }
.timeline li:last-child { margin-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.4rem - 7px); top: .35rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--accent);
}
.timeline li.now::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline h4 { margin: 0; font-size: 1rem; }
.when { display: inline-block; margin: .2rem 0 .35rem; font: 500 .78rem/1 var(--mono); color: var(--accent); }
.timeline p { margin: 0; color: var(--muted); font-size: .95rem; }
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem; }
.ico { width: 22px; height: 22px; margin-bottom: .5rem; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.js .gen.skeleton .ico, .js .gen.skeleton .timeline li::before { visibility: hidden; }

/* Nachricht an Marco */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.composer-chat { margin: .5rem 0 1.75rem; }
.js .composer-chat.show { display: block; animation: rise .4s ease both; }
.composer-chat textarea {
  display: block; width: 100%; min-height: 3.2rem; max-height: 14rem; resize: none; border: 0; outline: 0; padding: 0;
  background: transparent; color: var(--text); font: 400 1.05rem/1.55 var(--font);
}
.composer-chat textarea::placeholder { color: var(--muted); }
.composer-chat:focus-within { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.composer-chat .send { border: 0; cursor: pointer; margin-left: auto; }
.composer-chat.ready .send { background: var(--accent); color: #fff; }
.nojs-contact { display: none; }
.no-js .nojs-contact { display: block; color: var(--muted); }
.no-js .composer-chat, .no-js #contact-msg, .no-js #ai3 { display: none; }
.msg-user { white-space: pre-wrap; word-break: break-word; }

/* ---------- Fußzeile ---------- */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem;
  padding: 1.25rem clamp(1rem, 4vw, 2rem); font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line);
}
.foot nav { display: flex; gap: 1.1rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */
.page { width: min(44rem, 100% - 2rem); margin: clamp(1.5rem, 5vw, 3rem) auto; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.page h1 { font: 400 clamp(2rem, 5vw, 2.5rem)/1.1 var(--serif); margin: 0 0 1.25rem; }
.page h2 { font-size: 1.05rem; margin: 1.8rem 0 .4rem; }
.page p { color: var(--muted); margin: 0 0 1rem; }
.back { display: inline-block; margin-bottom: 1.5rem; color: var(--accent); text-decoration: none; font-weight: 600; }
