/* ===========
   Quantora UI
   =========== */

/* Theme-Variablen */
:root {
  --bg: #0b0f14;          /* sehr dunkles Navy */
  --panel: #0f141b;       /* leicht heller */
  --gold: #d4af37;        /* Gold */
  --text: #e9edf1;        /* helles Grau/Weiß */
  --muted: #a9b3c1;
  --green: #3cb371;       /* PnL + */
  --red: #dc3545;         /* PnL - */
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
  --gap: 24px;
}

/* Basics / Reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }

/* Utilities */
.container { width: min(1100px, 92vw); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; border: 0; padding: 0; clip: rect(0 0 0 0); overflow: hidden; }

/* Header & Branding */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(to bottom, rgba(0,0,0,.6), rgba(0,0,0,.2));
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid rgba(212,175,55,.18);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gold); }
.brand-logo { width: 36px; height: 36px; object-fit: contain; }
.brand-name { font-family: "Cinzel", serif; font-weight: 700; letter-spacing: .06em; }

/* Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
}
.nav-menu { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: var(--text); text-decoration: none; font-weight: 500; }
.nav-menu a:hover, .nav-menu a.active { color: var(--gold); }

/* Hero */
.hero {
  background:
    radial-gradient(1200px 400px at 50% -10%, rgba(212,175,55,.18), transparent),
    linear-gradient(to bottom, rgba(212,175,55,.07), transparent 40%);
  padding: 76px 0 64px;
}
.hero-inner { text-align: center; }
.hero-logo {
  width: 120px; height: 120px; object-fit: contain;
  margin-inline: auto; margin-bottom: 18px;
  filter: drop-shadow(0 6px 18px rgba(212,175,55,.25));
}
.hero-title {
  font-family: "Cinzel", serif;
  font-size: clamp(28px, 5vw, 52px);
  letter-spacing: .06em;
  margin: 0 0 10px;
}
.hero-sub { color: var(--muted); margin: 0 0 24px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 600;
  transition: transform .08s ease, filter .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: #1a1a1a; box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { border: 1px solid rgba(212,175,55,.35); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* Sections */
.section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 24px; }
.section h2 { font-family: "Cinzel", serif; font-size: clamp(26px, 3.8vw, 38px); margin: 0 0 10px; }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
}
.kpi {
  background: var(--panel);
  border: 1px solid rgba(212,175,55,.16);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

/* Cards (Services) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.card {
  background: var(--panel);
  border: 1px solid rgba(212,175,55,.16);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: rgba(212,175,55,.35); }
.card-icon {
  width: 54px; height: 54px; display: grid; place-items: center;
  background: rgba(212,175,55,.12);
  color: var(--gold);
  border: 1px solid rgba(212,175,55,.35);
  border-radius: 12px;
  font-size: 26px; margin-bottom: 14px;
}
.card h3 { font-family: "Cinzel", serif; margin: 6px 0 8px; }
.card p { color: var(--muted); margin: 0; }

/* About */
.about-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: var(--gap); }
.about .about-box {
  background: var(--panel);
  border: 1px solid rgba(212,175,55,.16);
  border-radius: var(--radius);
  padding: 24px;
}
.bullets { margin: 12px 0 0 18px; color: var(--muted); }

/* Performance / Chart */
.performance .chart-card {
  background: var(--panel);
  border: 1px solid rgba(212,175,55,.16);
  border-radius: var(--radius);
  padding: 18px 18px 12px;
  box-shadow: var(--shadow);
}
.performance canvas { width: 100%; height: 360px; display: block; }
.chart-note { color: var(--muted); font-size: 0.92rem; margin: 10px 0 14px; }
.chart-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.site-footer {
  border-top: 1px solid rgba(212,175,55,.18);
  padding: 18px 0;
  background: linear-gradient(to top, rgba(0,0,0,.35), transparent);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer-right a { color: var(--text); text-decoration: none; margin-left: 14px; }
.footer-right a:hover { color: var(--gold); }

/* Responsive */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .about-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .nav-menu {
    display: none;
    position: absolute; right: 4vw; top: 60px;
    background: var(--panel);
    border: 1px solid rgba(212,175,55,.2);
    border-radius: 12px;
    padding: 12px 14px;
  }
  .nav-menu.open { display: block; }
  .nav-menu li { margin: 8px 0; }
  .cards { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}

/* --- Performance Block --- */
.muted{ color: var(--muted); }
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(120px,1fr));
  gap: var(--gap);
  margin-bottom: 20px;
}
.kpi{
  background: var(--panel);
  border:1px solid rgba(212,175,55,.16);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.kpi-label{ font-size:.9rem; color:var(--muted); margin-bottom:6px; }
.kpi-val{ font-size:1.2rem; font-weight:700; letter-spacing:.02em; }
.kpi-val.pos{ color:#31c48d; }   /* grün */
.kpi-val.neg{ color:#f05252; }   /* rot */
.kpi-val.neu{ color:var(--text); }

.chart-card{
  background: var(--panel);
  border:1px solid rgba(212,175,55,.16);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow);
  height: 380px;
  margin-bottom: 16px;
}
.perf-links .btn{
  display:inline-block;
  text-decoration:none;
  border:1px solid rgba(212,175,55,.35);
  color:var(--text);
  padding:10px 14px;
  border-radius:10px;
  margin-right: 10px;
}
.perf-links .btn:hover{ color: var(--gold); border-color: var(--gold); }

@media (max-width: 960px){
  .kpi-grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px){
  .kpi-grid{ grid-template-columns: repeat(2, 1fr); }
}

/* --- Mini-Sparkline beim Equity-KPI --- */
.kpi.kpi-equity .kpi-val{
  display:inline-block;
  margin-right:12px;
}
.kpi.kpi-equity .sparkline{
  display:inline-block;
  width:140px;      /* Breite der Mini-Chart */
  height:48px;      /* Höhe (spielt mit Canvas-Attribut zusammen) */
  vertical-align:middle;
}

/* --- kleinerer Performance-Chart --- */
.chart-card{ height: 240px !important; }

/* Statusline */
.statusline-wrap{ background:rgba(212,175,55,.08); border-top:1px solid rgba(212,175,55,.25); border-bottom:1px solid rgba(212,175,55,.12); }
.statusline{ width:min(1100px,92vw); margin:0 auto; padding:10px 0; color:#e9edf1; font: 500 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; white-space:nowrap; overflow:auto; }
.statusline::-webkit-scrollbar{ height:6px }
.statusline::-webkit-scrollbar-thumb{ background:rgba(212,175,55,.25); border-radius:8px }
.muted{ color:#a9b3c1 }

/* Statusline */
.statusline-wrap{ background:rgba(212,175,55,.08); border-top:1px solid rgba(212,175,55,.25); border-bottom:1px solid rgba(212,175,55,.12); }
.statusline{ width:min(1100px,92vw); margin:0 auto; padding:10px 0; color:#e9edf1; font: 500 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; white-space:nowrap; overflow:auto; }
.statusline::-webkit-scrollbar{ height:6px }
.statusline::-webkit-scrollbar-thumb{ background:rgba(212,175,55,.25); border-radius:8px }
.muted{ color:#a9b3c1 }
