:root {
  --bg: #0b1020;
  --bg-soft: #11182e;
  --panel: #161f3a;
  --ink: #e8ecf5;
  --ink-dim: #aab4c8;
  --brand: #22c55e;
  --brand-2: #34d399;
  --line: #27314f;
  --maxw: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11,16,32,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site .bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site .brand { font-weight: 700; letter-spacing: 0.5px; font-size: 1.1rem; color: var(--ink); }
.site .brand span { color: var(--brand-2); }
.site nav a { color: var(--ink-dim); margin-left: 20px; font-size: 0.95rem; }
.site nav a:hover { color: var(--ink); text-decoration: none; }
.site nav a.active { color: var(--ink); }

/* Hero */
.hero { padding: 80px 0 64px; }
.hero h1 { font-size: 2.6rem; line-height: 1.1; margin: 0 0 16px; max-width: 18ch; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-dim); max-width: 60ch; margin: 0 0 24px; }
.cta { display: inline-flex; gap: 12px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: var(--radius); font-weight: 600; border: 1px solid transparent; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn:hover { text-decoration: none; opacity: 0.92; }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--bg-soft); }
h2.section { font-size: 1.8rem; margin: 0 0 8px; }
p.section-sub { color: var(--ink-dim); margin: 0 0 32px; max-width: 70ch; }

.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--ink-dim); }
.card .num { color: var(--brand-2); font-weight: 700; font-size: 0.95rem; }

/* Stats */
.stats { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 8px; }
.stats .stat .v { font-size: 1.9rem; font-weight: 700; }
.stats .stat .k { color: var(--ink-dim); font-size: 0.9rem; }

/* Timeline */
.timeline { border-left: 2px solid var(--line); padding-left: 22px; }
.timeline .item { margin-bottom: 22px; }
.timeline .when { color: var(--brand-2); font-weight: 700; font-size: 0.85rem; }
.timeline .what { font-weight: 600; }
.timeline .desc { color: var(--ink-dim); }

/* Code-ish block */
.kv { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9rem; overflow:auto; }

/* Form */
.form-card { max-width: 640px; }
form .row { margin-bottom: 16px; }
form label { display: block; font-size: 0.9rem; color: var(--ink-dim); margin-bottom: 6px; }
form input, form select, form textarea {
  width: 100%; padding: 11px 13px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink);
  font-size: 1rem; font-family: inherit;
}
form textarea { min-height: 140px; resize: vertical; }
form .err { color: #ff8b8b; font-size: 0.85rem; margin-top: 6px; min-height: 1em; }
form .ok { color: var(--brand-2); font-size: 0.95rem; margin-top: 10px; }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-dim); font-size: 0.9rem; }
footer.site .bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Misc */
.muted { color: var(--ink-dim); }
.tag { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.8rem; color: var(--ink-dim); margin-right: 6px; }

/* Screenshot gallery (product showcase) */
.shot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; }
.shot .cap { padding: 12px 16px; font-size: 0.9rem; color: var(--ink-dim); border-top: 1px solid var(--line); }
.shot .cap b { color: var(--ink); font-weight: 600; }

/* Browser-frame hero mockup */
.bwindow { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.45); margin-top: 40px; }
.bwindow .bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #0d1426; border-bottom: 1px solid var(--line); }
.bwindow .dot { width: 11px; height: 11px; border-radius: 50%; background: #33425e; display: inline-block; }
.bwindow .url { margin-left: 12px; color: var(--ink-dim); font-size: 0.8rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #0b1020; padding: 3px 12px; border-radius: 6px; border: 1px solid var(--line); }
.bwindow img { display: block; width: 100%; height: auto; }

/* Clickable product screenshot -> opens the live demo (trader2.cybotrader.com) */
.demo-link { display: block; cursor: pointer; }

/* Two-column hero: text left, product shot right */
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-shot { min-width: 0; }
.hero-shot .bwindow { margin-top: 0; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-shot { max-width: 640px; }
  .hero-shot .bwindow { margin-top: 16px; }
}

/* Single half-width screenshot (platform page) - max half of screen width */
.shot-half { max-width: min(50vw, 640px); margin: 0 auto 10px; }
.shot-half .bwindow { margin-top: 0; }
.shot-half .cap { padding: 12px 16px; font-size: 0.9rem; color: var(--ink-dim); border-top: 1px solid var(--line); }

/* Demo CTA (external link to the live trading platform demo) */
.btn.demo { background: var(--brand-2); color: #06231a; }
.btn.demo:hover { text-decoration: none; opacity: 0.92; }

/* Footer legal / company address */
footer.site .foot-sites { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer.site .foot-sites a { color: var(--brand); font-size: 0.85rem; }
footer.site .foot-legal { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-dim); font-size: 0.85rem; }
footer.site .foot-contact { margin-top: 6px; color: var(--ink-dim); font-size: 0.85rem; }
footer.site .foot-contact a { color: var(--brand); }
footer.site .foot-copy { margin-top: 6px; color: var(--ink-dim); font-size: 0.8rem; }
.addr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.addr h3 { margin: 0 0 10px; font-size: 1rem; }
.addr .line { color: var(--ink-dim); font-size: 0.95rem; padding: 2px 0; }
.addr .name { color: var(--ink); font-weight: 600; }

/* Feature checklist */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 6px 0 6px 22px; position: relative; color: var(--ink-dim); }
.checks li:before { content: "+"; position: absolute; left: 0; color: var(--brand-2); font-weight: 700; }

/* Pricing-ish tiers */
.tiers { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media (max-width:820px){ .tiers { grid-template-columns: 1fr; } }
.tier { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tier.featured { border-color: var(--brand-2); }
.tier h3 { margin: 0 0 4px; }
.tier .price { color: var(--brand-2); font-weight: 700; margin: 8px 0 12px; }
.tier ul { list-style: none; padding: 0; margin: 0; }
.tier ul li { padding: 5px 0; color: var(--ink-dim); font-size: 0.92rem; }
/* Demo maintenance popup (DX-017). Dismissible toast shown only when the
   live demo probe (/api/demo-status) reports it unavailable. */
.demo-maint {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 1000; max-width: min(92vw, 560px); width: auto;
  animation: demo-maint-in 0.25s ease-out;
}
.demo-maint-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: #1b2230; color: #fff; border: 1px solid #3a4660;
  border-left: 4px solid #e0a04b; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
  padding: 14px 16px; font-size: 0.95rem; line-height: 1.4;
}
.demo-maint-ico {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: #e0a04b; color: #1b2230; font-weight: 700;
  display: grid; place-items: center; margin-top: 2px;
}
.demo-maint-body { flex: 1 1 auto; }
.demo-maint-body strong { display: block; margin-bottom: 2px; font-size: 1rem; }
.demo-maint-body p { margin: 0; color: #c8d0e0; }
.demo-maint-close {
  flex: 0 0 auto; background: transparent; border: 0; color: #aab4c8;
  font-size: 1.25rem; line-height: 1; cursor: pointer; padding: 0 4px;
  border-radius: 4px;
}
.demo-maint-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
@keyframes demo-maint-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 540px) {
  .demo-maint { bottom: 12px; }
  .demo-maint-card { padding: 12px 12px; gap: 10px; }
}
