/* Vestrix Website – gemeinsames Stylesheet.
   Farben, Schrift und Grundbausteine aus dem Entwurf v5 übernommen, Hero neu. */

/* ---------- Tokens ---------- */
:root {
  --sky: #0EA5E9; --sky-strong: #0284C7; --sky-soft: #38BDF8;
  --cortix: #8B5CF6; --cortix-soft: #A78BFA;
  --profit: #22C55E; --loss: #EF4444; --warn: #F59E0B;
  --r: 10px; --container: 1240px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --e: cubic-bezier(.22, 1, .36, 1);
}
:root[data-theme="dark"] {
  --bg: #0C0F14; --surface: #12161D; --surface-2: #161B23; --surface-3: #1C222C;
  --rule: #222A35; --rule-2: #2E3744; --text: #E9EEF4; --text-2: #B6BFCB; --muted: #8590A0;
  --nav-bg: rgba(10, 13, 18, .72); --grid: rgba(255, 255, 255, .045);
  --stage-shadow: 0 50px 120px -40px rgba(14, 165, 233, .35), 0 30px 80px -50px rgba(139, 92, 246, .5);
}
:root[data-theme="light"] {
  --bg: #F7F9FC; --surface: #FFFFFF; --surface-2: #F4F7FB; --surface-3: #EAF0F7;
  --rule: #E2E8F0; --rule-2: #CBD5E1; --text: #0F172A; --text-2: #334155; --muted: #5B6576;
  --nav-bg: rgba(255, 255, 255, .8); --grid: rgba(15, 23, 42, .05);
  --stage-shadow: 0 50px 110px -45px rgba(15, 23, 42, .35), 0 20px 60px -40px rgba(14, 165, 233, .45);
}

/* ---------- Basis ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
p { color: var(--text-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border-radius: var(--r); font: 600 .94rem/1 var(--font); border: 1px solid transparent; cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .2s; white-space: nowrap; }
.btn-sm { height: 36px; padding: 0 15px; font-size: .86rem; }
.btn-primary { background: var(--sky); color: #fff; box-shadow: 0 8px 24px -10px rgba(14, 165, 233, .8); }
.btn-primary:hover { background: var(--sky-strong); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- Navigation ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: var(--nav-bg); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom-color: var(--rule); }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; }
.logo__ai { color: var(--sky); }
.nav__links { display: flex; gap: 28px; font-size: .9rem; color: var(--text-2); white-space: nowrap; }
.nav__links a:hover { color: var(--text); }
.nav__lang { font: 500 .8rem var(--mono); color: var(--muted); padding: 6px 8px; border-radius: 6px; }
.nav__lang:hover { color: var(--text); }
.nav__theme { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.nav__theme:hover { color: var(--text); background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 148px 0 110px; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }

/* Hintergrund aus dem Entwurf v7/v9: Equity-Kurven (bg.js), Lichtschein, Laufraster, Lichtkugeln */
.pagebg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.pagebg canvas { width: 100%; height: 100%; display: block; }
main { position: relative; z-index: 1; }
.hero__bg { position: absolute; inset: 0 0 auto 0; height: 100%; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%); }
.hero__bg canvas { display: block; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 60% 45% at 50% 0%, rgba(14,165,233,.16), transparent 70%), radial-gradient(ellipse 40% 35% at 85% 30%, rgba(139,92,246,.10), transparent 70%); }
.hero__floor { position: absolute; left: -20%; right: -20%; bottom: -10%; height: 60%; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(14,165,233,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(14,165,233,.22) 1px, transparent 1px);
  background-size: 64px 64px; transform: perspective(600px) rotateX(64deg); transform-origin: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, transparent 95%); mask-image: linear-gradient(to bottom, transparent, #000 35%, transparent 95%);
  animation: floor 6s linear infinite; opacity: .55; }
@keyframes floor { to { background-position: 0 64px; } }
.hero__orb { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: 0; animation: orb 14s ease-in-out infinite alternate; }
.hero__orb.o1 { width: 420px; height: 420px; left: 55%; top: 6%; background: rgba(14,165,233,.22); }
.hero__orb.o2 { width: 360px; height: 360px; left: 72%; top: 30%; background: rgba(139,92,246,.18); animation-duration: 18s; }
@keyframes orb { to { transform: translate(-80px, 60px) scale(1.15); } }
:root[data-theme="light"] .hero__floor { opacity: .35; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(139, 92, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); } }

.hero h1 { font-size: clamp(2.5rem, 3.9vw, 3.9rem); letter-spacing: -.045em; }
.hero h1 .ln { display: block; white-space: nowrap; }
.hero h1 .ln--wrap { white-space: normal; text-wrap: balance; }
@media (max-width: 1080px) { .hero h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); } }
@media (max-width: 480px) { .hero h1 { font-size: 2.35rem; } .hero h1 .ln { white-space: normal; text-wrap: balance; } }
.grad { background: linear-gradient(100deg, var(--sky) 0%, var(--sky-soft) 35%, var(--cortix-soft) 75%, var(--cortix) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { margin-top: 22px; font-size: 1.14rem; line-height: 1.6; max-width: 34em; }

/* Eingabefeld */
.ask { position: relative; text-align: left; margin-top: 34px; max-width: 560px; border: 1px solid var(--rule-2); border-radius: 14px; background: var(--surface); box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .6); transition: border-color .2s, box-shadow .2s; }
.ask:focus-within { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(14, 165, 233, .18), 0 20px 50px -30px rgba(0, 0, 0, .6); }
.ask textarea { display: block; width: 100%; min-height: 76px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: 400 1rem/1.5 var(--font); padding: 15px 64px 15px 18px; }
.ask textarea::placeholder { color: transparent; }
.ask__typed { position: absolute; left: 18px; right: 64px; top: 15px; font-size: 1rem; line-height: 1.5; color: var(--muted); pointer-events: none; }
.ask__typed::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--sky); animation: blink 1s steps(1) infinite; }
.ask.has-text .ask__typed { display: none; }
.ask__go { position: absolute; right: 12px; bottom: 12px; width: 42px; height: 42px; border-radius: 10px; border: 0; background: var(--sky); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .2s; box-shadow: 0 8px 22px -8px rgba(14, 165, 233, .9); }
.ask__go:hover { background: var(--sky-strong); transform: translateX(2px); }
@keyframes blink { 50% { opacity: 0; } }

.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: .86rem; color: var(--muted); }
.trust li { display: flex; align-items: center; gap: 7px; }
.trust svg { width: 15px; height: 15px; fill: none; stroke: var(--profit); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.stage { position: relative; border: 1px solid var(--rule-2); border-radius: 16px; background: var(--surface); box-shadow: var(--stage-shadow); overflow: hidden; transform: rotateY(-7deg) rotateX(3deg); transform-origin: 60% 50%; transition: transform .8s var(--e); }
.stage::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(135deg, rgba(255, 255, 255, .06), transparent 40%); }
@keyframes ping-g { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 70%, 100% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); } }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--sky); animation: blink 1s steps(1) infinite; }
.caret.off { display: none; }

.cortix { display: flex; gap: 11px; align-items: flex-start; min-height: 92px; }
.steps { list-style: none; display: grid; gap: 5px; font-size: .8rem; color: var(--text-2); padding-top: 3px; }
.steps li { display: flex; align-items: center; gap: 8px; opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s var(--e); }
.steps li.on { opacity: 1; transform: none; }
.steps .ic { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--rule-2); border-top-color: var(--cortix-soft); animation: spin .8s linear infinite; }
.steps li.ok .ic { animation: none; border: 0; background: var(--profit); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 100 20 10 10 0 000-20zm-1.2 14.6l-4.3-4.3 1.4-1.4 2.9 2.9 6-6 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 100 20 10 10 0 000-20zm-1.2 14.6l-4.3-4.3 1.4-1.4 2.9 2.9 6-6 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat; }
@keyframes spin { to { transform: rotate(360deg); } }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.kpi { padding: 9px 12px; border-right: 1px solid var(--rule); background: var(--surface-2); }
.kpi:last-child { border-right: 0; }
.kpi__k { display: block; font: 500 .6rem var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__v { display: block; margin-top: 3px; font: 500 1.02rem var(--mono); color: var(--text); white-space: nowrap; }
.kpi__v.pos { color: var(--profit); } .kpi__v.neg { color: var(--loss); }

.res { position: relative; height: 214px; }

.bars { display: grid; grid-template-columns: max-content 1fr max-content; align-items: center; gap: 10px 12px; padding-top: 10px; font: 500 .78rem var(--mono); color: var(--text-2); }
.brow { display: contents; }
.note { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--rule); background: var(--surface-2); opacity: 0; transform: translateY(-8px) scale(.98); transition: opacity .45s, transform .45s var(--e); }
.note.on { opacity: 1; transform: none; }
.stage[data-type="checks"] .note { padding: 7px 12px; }
.lg { display: flex; align-items: center; gap: 6px; }
.lg::before { content: ""; width: 14px; height: 2px; border-radius: 2px; }

.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: rgba(139, 92, 246, .09); border: 1px solid rgba(139, 92, 246, .28); opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--e); min-height: 74px; }
.verdict.on { opacity: 1; transform: none; }
.verdict p { font-size: .82rem; line-height: 1.5; color: var(--text-2); }
.verdict b { color: var(--text); font-weight: 600; }
.grade { flex: none; white-space: nowrap; padding: 4px 9px; border-radius: 7px; font: 600 .76rem var(--mono); }
.grade.b { background: rgba(34, 197, 94, .15); color: var(--profit); border: 1px solid rgba(34, 197, 94, .35); }
.grade.src { background: rgba(14, 165, 233, .12); color: var(--sky); border: 1px solid rgba(14, 165, 233, .35); }
.grade.c { background: rgba(245, 158, 11, .14); color: var(--warn); border: 1px solid rgba(245, 158, 11, .35); }

.demo__tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; }
.demo__tab { position: relative; overflow: hidden; text-align: left; border: 1px solid var(--rule); background: color-mix(in srgb, var(--surface) 75%, transparent); color: var(--muted); font: 600 .82rem var(--font); padding: 7px 10px 9px; white-space: nowrap; border-radius: 10px; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.demo__tab small { display: none; font: 400 .7rem var(--font); color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo__tab .n { display: block; font: 500 .66rem var(--mono); color: var(--muted); margin-bottom: 1px; }
.demo__tab:hover { color: var(--text-2); }
.demo__tab[aria-selected="true"] { color: var(--text); border-color: rgba(14, 165, 233, .55); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.demo__tab[aria-selected="true"] .n { color: var(--sky); }
.demo__tab .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: linear-gradient(90deg, var(--sky), var(--cortix)); }
.demo__note { margin-top: 14px; text-align: center; font-size: .72rem; color: var(--muted); max-width: 520px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* Hero v3: Text zentriert oben, App-Nachbau gross darunter */
.wrap-wide { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.hero__copy { text-align: center; max-width: 900px; }
.hero__copy .hero__sub, .hero__copy .ask { margin-left: auto; margin-right: auto; }
.hero__copy .trust { justify-content: center; }
.hero__copy h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
.hero__app { margin-top: 64px; }
.hero__app .demo__note { max-width: 640px; }
@media (max-width: 600px) { .wrap-wide { padding: 0 16px; } .hero__app { margin-top: 44px; } .hero__copy h1 { font-size: 2.35rem; } }

/* ---------- Responsiv ---------- */
@media (max-width: 1080px) {
  .hero__in { grid-template-columns: 1fr; gap: 56px; }
  .hero__copy { text-align: center; }
  .hero__sub, .ask { margin-left: auto; margin-right: auto; }
  .trust { justify-content: center; }
  .stage { transform: none; }
  .hero__demo { max-width: 680px; margin: 0 auto; width: 100%; }
}
@media (max-width: 1000px) {
  .nav__links { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 108px 0 72px; }
  .hero__sub { font-size: 1.02rem; }
  .nav__lang { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .demo__tabs { display: flex; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .demo__tabs::-webkit-scrollbar { display: none; }
  .demo__tab { flex: none; }
  .res { height: auto; min-height: 200px; }
  .verdict { flex-direction: column; gap: 8px; }
}

/* Weniger Bewegung: alles im Endzustand */
@media (prefers-reduced-motion: reduce) {
  .hero__floor, .hero__orb { animation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stage { transform: none; }
}
