/* ============================================================
   Silver Edge Quant — Design v60
   Basis: Dunkelblau (vertraut), sanfte Übergänge,
   klare Lesbarkeit, Silber als Akzent — nicht als Hauptfarbe
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Dunkelblau-Palette — wie v58 aber wärmer und stimmiger */
  --bg1:  #163060;
  --bg2:  #1c3d78;
  --bg3:  #234890;

  /* Oberflächen */
  --panel:  rgba(255,255,255,0.07);
  --panel2: rgba(255,255,255,0.04);
  --card-bg: rgba(18,32,54,0.85);

  /* Text */
  --text:  #f0f4f8;
  --muted: #8fa8c4;
  --faint: #4e6580;

  /* Silber — gezielt eingesetzt */
  --silver-hi:  #e8ecf0;
  --silver:     #c4ccd8;
  --silver-mid: #96a4b4;
  --silver-lo:  #5a6878;

  /* Silber-Gradient für Akzente */
  --grad-silver: linear-gradient(135deg, #edf0f3 0%, #c4ccd8 40%, #dde2e8 70%, #9aa6b4 100%);

  /* Status */
  --good:    #4ade80;
  --warn:    #fbbf24;
  --good-bg: rgba(74,222,128,0.10);
  --warn-bg: rgba(251,191,36,0.10);

  /* Linien */
  --line:  rgba(140,170,200,0.18);
  --line2: rgba(140,170,200,0.10);

  /* Hintergrund-Gradient */
  --grad-bg: linear-gradient(145deg, #0f1e38 0%, #152d58 40%, #1a3870 70%, #1e4080 100%);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 900px 500px at 10% 5%,  rgba(100,160,220,0.18), transparent 65%),
    radial-gradient(ellipse 400px 200px at 30% 0%, rgba(255,255,255,0.06), transparent 50%),
    radial-gradient(ellipse 700px 400px at 90% 25%, rgba(140,170,220,0.09), transparent 60%),
    radial-gradient(ellipse 800px 600px at 50% 95%, rgba(100,150,210,0.10), transparent 65%),
    var(--grad-bg);
  min-height: 100vh;
}

a { color: var(--text); text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { opacity: .85; }

/* ── Typografie ── */
.h1 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.4px;
  color: #fff;
  margin: 0 0 12px 0;
}

/* Silber-Akzent: einzelnes Wort oder kurze Phrase */
.h1 .accent,
.accent {
  background: var(--grad-silver);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.h2 { font-size: clamp(17px,2.5vw,22px); font-weight: 700; color: #fff; margin: 0 0 10px 0; }
.h3 { font-size: 15px; font-weight: 600; color: var(--silver-hi); margin: 0 0 6px 0; }

.sub   { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0 0 16px 0; }
.p     { color: var(--muted); line-height: 1.7; margin: 0; }
.small { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.code  { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--silver-mid); }

/* ── Layout ── */
.container  { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.hero       { padding: 52px 0 26px; }
.hero-grid  { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.section    { padding: 22px 0; }

.section-title {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.section-title h2 { margin: 0; }
.section-title p  { margin: 0; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ── Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background: rgba(14,24,42,0.82);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between; padding: 13px 0;
}

.brand {
  display: flex; align-items: center; gap: 11px;
  font-weight: 700; font-size: 15px; letter-spacing: .2px;
  color: var(--silver-hi); white-space: nowrap; flex-shrink: 0;
}

.brand img {
  width: 44px; height: 44px; border-radius: 6px;
  filter: drop-shadow(0 0 5px rgba(180,200,220,0.35));
}

.brand-title { color: var(--silver-hi); }

.nav-links {
  display: flex; flex-wrap: nowrap; align-items: center;
  gap: 10px 14px; font-size: 13px; font-weight: 500;
}
.nav-links a       { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--silver-hi); opacity: 1; text-decoration: none; }
.nav-links a.active{ color: #fff; font-weight: 600; }

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  /* sanfter Schatten, kein harter Kontrast */
  box-shadow: 0 2px 16px rgba(0,0,0,0.20), 0 1px 0 rgba(255,255,255,0.03) inset;
  transition: box-shadow .25s, transform .25s;
}

.card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.28), 0 0 0 1px rgba(160,185,210,0.12);
  transform: translateY(-1px);
}

/* Silver frame — subtil, kein harter Abbruch */
.silver-frame {
  border: 1px solid rgba(180,200,220,0.22);
  box-shadow:
    0 0 0 1px rgba(220,230,240,0.06),
    0 2px 20px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.silver-frame:hover {
  border-color: rgba(180,200,220,0.38);
  box-shadow:
    0 0 14px rgba(160,185,210,0.14),
    0 4px 24px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(160,185,210,0.09);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all .2s; text-decoration: none;
}
.btn:hover {
  background: rgba(160,185,210,0.15);
  border-color: rgba(160,185,210,0.32);
  color: #fff; transform: translateY(-1px); opacity: 1; text-decoration: none;
}

.btn.primary {
  background: rgba(160,185,210,0.14);
  border-color: rgba(180,205,230,0.35);
  color: var(--silver-hi);
}
.btn.primary:hover {
  background: rgba(160,185,210,0.22);
  border-color: rgba(200,220,240,0.50);
  box-shadow: 0 0 12px rgba(160,185,210,0.18);
}

.btn.ghost {
  background: transparent; border-color: var(--line); color: var(--muted);
}
.btn.ghost:hover {
  border-color: rgba(160,185,210,0.32); color: var(--silver-hi);
}

/* ── Badges ── */
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.badge {
  border: 1px solid var(--line); padding: 5px 11px;
  border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 500;
  background: rgba(160,185,210,0.06);
}
.badge strong { color: var(--silver-hi); }

/* ── Grids ── */
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 18px 0; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }

/* ── Card links ── */
.card-link { display: block; color: var(--text); text-decoration: none; }
.card-link:hover { text-decoration: none; opacity: 1; }

/* ── Glint ── */
.glint { position: relative; overflow: hidden; }
.glint::after {
  content: '';
  position: absolute; top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.07) 50%, transparent 60%);
  transform: skewX(-15deg);
  transition: left .55s ease; pointer-events: none;
}
.glint:hover::after { left: 125%; }

/* ── HR / Trennlinie ── */
.hr { height: 1px; background: var(--line); margin: 18px 0; }

/* ── Listen ── */
.ul { margin: 10px 0 0 0; padding: 0 0 0 16px; color: var(--muted); }
.ul li { margin: 6px 0; line-height: 1.65; }

/* ── Note ── */
.note {
  border-left: 3px solid rgba(251,191,36,0.45);
  padding: 10px 14px; color: var(--muted);
  background: rgba(251,191,36,0.06);
  border-radius: 0 10px 10px 0;
}

/* ── KPI ── */
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .label { color: var(--muted); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .7px; }
.kpi .value { font-size: 19px; font-weight: 700; color: #fff; }

/* ── Language switch ── */
.lang-switch {
  margin-left: auto; position: relative; flex-shrink: 0;
}
.lang-switch::before {
  content: "Language"; display: block;
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted); opacity: 0.6;
  padding: 0 8px; margin-bottom: 2px;
}
.lang-switch a {
  color: var(--muted); font-weight: 600; font-size: 12px;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 4px 8px; border-radius: 4px; transition: background .15s;
  text-decoration: none;
}
.lang-switch a:hover { background: rgba(160,185,210,0.12); color: var(--silver-hi); opacity: 1; }
.lang-switch a.active {
  color: #fff; order: -1; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 10px; margin-bottom: 2px;
}
.lang-switch a:not(.active) { display: none; }
.lang-switch.open a:not(.active) { display: flex; }
.lang-switch.open {
  position: absolute; right: 0; top: 0; z-index: 200;
  background: rgba(14,24,42,0.97); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px; box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; width: max-content;
}
.lang-sep            { display: none; }
.flag { width: 18px; height: 13px; border-radius: 2px; vertical-align: middle; object-fit: cover; flex-shrink: 0; }

/* ── Footer ── */
.footer {
  padding: 28px 0 42px; color: var(--muted); font-size: 13px;
  border-top: 1px solid var(--line2); margin-top: 16px;
}
.footer a       { color: var(--muted); transition: color .2s; }
.footer a:hover { color: var(--silver-hi); }

/* ── Banners ── */
.banner-live {
  background: linear-gradient(90deg, rgba(74,222,128,0.10), rgba(74,222,128,0.04));
  border: 1px solid rgba(74,222,128,0.30);
  border-radius: 12px; padding: 13px 18px; margin: 0 0 20px 0;
  display: flex; align-items: center; gap: 12px; font-size: 14px;
}
.banner-live .bl-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--good); flex-shrink: 0;
  box-shadow: 0 0 8px var(--good);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100%{ opacity:1; transform:scale(1); }
  50%    { opacity:.4; transform:scale(1.4); }
}
.banner-live strong { color: var(--good); }

.banner-coming {
  background: linear-gradient(90deg, rgba(251,191,36,0.10), rgba(251,191,36,0.04));
  border: 1px solid rgba(251,191,36,0.30);
  border-radius: 12px; padding: 13px 18px; margin: 0 0 20px 0;
  font-size: 14px; color: var(--muted);
}
.banner-coming strong { color: var(--warn); }

/* ── Page nav ── */
.page-nav { display: flex; justify-content: space-between; gap: 12px; margin: 26px 0 8px; }

/* ── Performance page ── */
.tab-row { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }

.tab-btn {
  padding: 7px 18px; border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent; color: var(--muted);
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px;
  cursor: pointer; transition: all .2s;
}
.tab-btn:hover { border-color: rgba(160,185,210,0.32); color: var(--silver-hi); }
.tab-btn.active {
  background: rgba(160,185,210,0.14);
  border-color: rgba(180,205,230,0.40);
  color: #fff;
}

.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 760px) { .kpi-grid { grid-template-columns: repeat(2,1fr); } }

.kpi-card {
  background: rgba(16,28,48,0.70);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 15px;
  transition: border-color .2s;
}
.kpi-card:hover { border-color: rgba(160,185,210,0.28); }

.kpi-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-bottom: 5px; }
.kpi-value { font-size: 21px; font-weight: 700; color: #fff; line-height: 1.1; }
.kpi-sub   { font-size: 11px; color: var(--faint); margin-top: 4px; }

.chart-wrap {
  background: rgba(10,18,32,0.55);
  border-radius: 12px; padding: 15px;
  border: 1px solid var(--line2); margin-bottom: 18px;
}
.chart-title {
  font-size: 12px; font-weight: 600; color: var(--muted);
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: .6px;
}

.dir-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .dir-grid { grid-template-columns: 1fr; } }

.dir-card {
  background: rgba(16,28,48,0.70);
  border: 1px solid var(--line); border-radius: 12px; padding: 15px;
}
.dir-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--silver-hi); }

.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid var(--line2); font-size: 13px;
}
.stat-row:last-child        { border-bottom: none; }
.stat-row span:first-child  { color: var(--muted); }
.stat-row span:last-child   { color: #fff; font-weight: 600; }

.assumptions-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.assumptions-table td { padding: 7px 10px; border-bottom: 1px solid var(--line2); color: var(--muted); }
.assumptions-table td:first-child { color: var(--silver-mid); font-weight: 500; width: 40%; }
.assumptions-table tr:last-child td { border-bottom: none; }

.period-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: rgba(160,185,210,0.08);
  border: 1px solid rgba(160,185,210,0.18);
  color: var(--silver-mid); margin-bottom: 12px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg1); }
::-webkit-scrollbar-thumb { background: rgba(140,170,200,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(140,170,200,0.40); }

/* ============================================================
   MOBILE RESPONSIVE — v77
   ============================================================ */

/* ── Hamburger Button (hidden on desktop) ── */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--silver-hi);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 768px) {
  /* Show hamburger, hide nav links by default */
  .nav-toggle { display: flex; align-items: center; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(14,24,42,0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 16px 20px;
    gap: 12px;
    z-index: 100;
  }
  .nav-links.open { display: flex; }

  .nav-links a { font-size: 16px; padding: 6px 0; }

  .nav-inner { position: relative; }

  .lang-switch {
    margin-left: 0; position: relative;
  }
  .lang-switch.open {
    position: relative; right: auto; top: auto;
    background: rgba(14,24,42,0.97); border: 1px solid var(--line);
    border-radius: 8px; padding: 6px;
    max-height: 55vh; overflow-y: auto;
    display: flex; flex-direction: column; width: 100%;
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
  }
  .lang-switch:hover, .lang-switch:focus-within {
    position: relative; right: auto; top: auto;
    background: none; border: none; box-shadow: none;
    padding: 0; border-top: 1px solid var(--line);
    padding-top: 8px; margin-top: 4px;
    flex-wrap: wrap; flex-direction: row; width: 100%;
  }
  .lang-switch a:not(.active) { display: flex; }

  /* Hero grid single column */
  .hero { padding: 28px 0 16px; }

  /* Container less padding */
  .container { padding: 0 14px; }

  /* Card padding */
  .card { padding: 16px; }

  /* CTA row wrap */
  .cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

  /* Banner font */
  .banner-live, .banner-coming { font-size: 13px; padding: 10px 14px; }

  /* Page nav */
  .page-nav { margin: 16px 0 6px; }
}

/* ── Tables: horizontal scroll on mobile ── */
@media (max-width: 768px) {
  .ranking-table,
  .assumptions-table,
  table[style*="border-collapse"] {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* Trade table on live page */
  .trade-table-wrap { max-height: 320px; }
  .trade-table { font-size: 12px; }
  .trade-table th, .trade-table td { padding: 6px 8px; }

  /* KPI grid 2 cols on mobile */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* Asset buttons smaller */
  .asset-btn { padding: 6px 14px; font-size: 12px; }

  /* Badges wrap tighter */
  .badges { gap: 6px; }
  .badge { font-size: 11px; padding: 4px 9px; }

  /* Footer */
  .footer { padding: 20px 0 30px; font-size: 12px; }

  /* Ordered/unordered lists */
  .ol, .ul { padding-left: 14px; }
  .ol li, .ul li { font-size: 14px; }

  /* Note boxes */
  .note { padding: 8px 12px; font-size: 13px; }

  /* Grid 3 already handled above (1fr) */

  /* Downloads grid on demo page */
  div[style*="grid-template-columns:1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Consent section on pricing */
  .consent { font-size: 14px; }

  /* Chart height adjust */
  .chart-canvas-wrap { height: 180px !important; }
}

/* ── Extra small screens ── */
@media (max-width: 400px) {
  .h1 { font-size: 26px; }
  .h2 { font-size: 17px; }
  .brand span { font-size: 13px; }
  .brand img { width: 36px; height: 36px; }
  .kpi-value { font-size: 18px; }
}

/* ── RTL Support (Arabic) ── */
[dir="rtl"] { direction: rtl; text-align: right; }
[dir="rtl"] .nav-inner { flex-direction: row-reverse; }
[dir="rtl"] .cta-row { flex-direction: row-reverse; }
[dir="rtl"] .page-nav { flex-direction: row-reverse; }
[dir="rtl"] .lang-switch { justify-content: flex-start; }
