/* ===================================================================
   Exness Trading — Hub Components (trading-bridge.css)
   Swiss-modular panels, ticker, tables, tabs, accordions, mocks
   =================================================================== */

/* ----- Hero ----- */
.hero {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 56px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}
.hero-copy .eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--system);
  margin-bottom: 12px;
}
.hero-copy h1 { margin-bottom: 16px; }
.hero-copy .lede { margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}
.hero-stat { background: var(--panel-2); border-radius: var(--radius); padding: 16px; border: 1px solid var(--border); }
.hero-stat .val { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--text-light); }
.hero-stat .lbl { font-size: .78rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ----- Market dashboard mock ----- */
.dashboard-mock {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.dashboard-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.dashboard-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: var(--bear); }
.dot.y { background: #f5b942; }
.dot.g { background: var(--bull); }
.dashboard-bar .label { margin-left: 8px; font-size: .8rem; color: var(--ink-muted); }
.dashboard-rows { padding: 8px; }
.dash-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
}
.dash-row:nth-child(odd) { background: var(--panel-2); }
.dash-row .sym { font-weight: 700; font-size: .92rem; }
.dash-row .px { font-variant-numeric: tabular-nums; font-weight: 600; }
.dash-row .chg { font-variant-numeric: tabular-nums; font-size: .85rem; font-weight: 700; }
.chg.up { color: var(--bull); }
.chg.down { color: var(--bear); }

/* ----- Ticker marquee ----- */
.ticker-viewport {
  overflow: hidden;
  background: var(--text-light);
  color: #f4f6f9;
  border-block: 1px solid rgba(255,255,255,.08);
  padding: 0;
}
.ticker-viewport * { color: inherit; }
.ticker-marquee {
  display: flex;
  width: max-content;
  animation: ticker-scroll 36s linear infinite;
}
.ticker-viewport:hover .ticker-marquee,
.ticker-viewport:focus-within .ticker-marquee { animation-play-state: paused; }
.ticker-track { display: flex; }
.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 24px;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.08);
  font-size: .9rem;
}
.ticker-item .sym { font-weight: 700; }
.ticker-item .px { font-variant-numeric: tabular-nums; color: #c7cedb; }
.ticker-item .chg { font-weight: 700; font-variant-numeric: tabular-nums; }
.ticker-item .chg.up { color: var(--bull); }
.ticker-item .chg.down { color: var(--bear); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ----- Panel cards ----- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.panel h3 { margin-bottom: 10px; }
.panel-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.card-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--system);
  font-weight: 800;
  margin-bottom: 14px;
}
.card-icon.bull { color: var(--bull); }
.card-icon.bear { color: var(--bear); }

/* ----- Tabs ----- */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: .94rem;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.tab-btn:hover { color: var(--text-light); }
.tab-btn.is-active { color: var(--system); border-bottom-color: var(--system); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade-in .3s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ----- Seg control ----- */
.seg-control {
  display: inline-flex;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}
.seg-btn {
  background: none;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.seg-btn.is-active { background: var(--panel); color: var(--text-light); box-shadow: var(--shadow-sm); }
.seg-panel { display: none; }
.seg-panel.is-active { display: block; }

/* ----- Comparison matrix / dense tables ----- */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 560px;
  background: var(--panel);
}
.matrix th, .matrix td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.matrix thead th { background: var(--panel-2); font-weight: 700; color: var(--text-light); position: sticky; top: 0; }
.matrix tbody tr:hover { background: var(--panel-2); }
.matrix td { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.matrix td:first-child, .matrix th:first-child { font-weight: 700; color: var(--text-light); }
.matrix .yes { color: var(--bull); font-weight: 700; }
.matrix .no { color: var(--bear); font-weight: 700; }
.matrix .hot { color: var(--system); font-weight: 700; }

/* ----- Platform mock frame ----- */
.platform-mock {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
}
.platform-mock .pm-head {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; background: var(--panel-2); border-bottom: 1px solid var(--border);
}
.platform-mock .pm-head .dot { width: 9px; height: 9px; border-radius: 50%; }
.platform-mock .pm-body { padding: 20px; }
.pm-chart {
  height: 160px;
  background:
    linear-gradient(180deg, rgba(0,197,130,.12), transparent),
    repeating-linear-gradient(90deg, var(--panel-2) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, var(--panel-2) 0 1px, transparent 1px 40px);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.pm-chart::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 30%;
  height: 2px; background: var(--bull);
  box-shadow: 0 0 12px rgba(0,197,130,.6);
}

/* ----- Steps / timeline ----- */
.steps { display: grid; gap: 18px; grid-template-columns: 1fr; counter-reset: step; }
.step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 22px 64px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px; top: 22px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--system);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: .95rem;
}
.step h4 { margin-bottom: 6px; }
.step p { margin: 0; }
.step-timeline .step:not(:last-child)::after {
  content: "";
  position: absolute; left: 33px; top: 54px; bottom: -18px;
  width: 2px; background: var(--border);
}

/* ----- Accordion (generic / faq / checklist) ----- */
.accordion-item, .faq-item, .checklist-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 52px 18px 20px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  color: var(--text-light);
  display: flex;
  align-items: center;
}
.accordion-trigger::after {
  content: "+";
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--system);
  transition: transform .2s var(--ease);
  line-height: 1;
}
.accordion-item.open > .accordion-trigger::after,
.faq-item.open > .faq-trigger::after,
.checklist-item.open > .checklist-trigger::after { content: "\2212"; }
.accordion-body, .faq-body, .checklist-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s var(--ease);
}
.accordion-body > div, .faq-body > div, .checklist-body > div {
  padding: 0 20px 20px;
  color: var(--ink-muted);
}
.checklist-trigger { padding-left: 52px; }
.checklist-trigger::before {
  content: "";
  position: absolute;
  left: 20px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  border: 2px solid var(--border-strong);
  border-radius: 4px;
}
.checklist-item.open .checklist-trigger::before {
  background: var(--bull);
  border-color: var(--bull);
}
.checklist-item.open .checklist-trigger::after { color: var(--bull); }

/* ----- Expand cards ----- */
.expand-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.expand-trigger {
  width: 100%; text-align: left; background: none; border: none;
  padding: 18px 20px; font-weight: 700; cursor: pointer; color: var(--text-light);
}
.expand-body {
  max-height: 0; overflow: hidden;
  transition: max-height .3s var(--ease);
}
.expand-card.open .expand-body { max-height: 600px; }
.expand-body > div { padding: 0 20px 20px; color: var(--ink-muted); }

/* ----- Conversion band ----- */
.cta-band {
  background: var(--text-light);
  color: #f4f6f9;
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
}
.cta-band * { color: inherit; }
.cta-band h2 { color: #f4f6f9; margin-bottom: 12px; }
.cta-band p { color: #c7cedb; max-width: 620px; margin-inline: auto; margin-bottom: 24px; }
.cta-band .btn-primary { color: #fff; }
.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cta-band .btn-secondary { background: transparent; color: #f4f6f9; border-color: rgba(255,255,255,.3); }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,.08); }

/* ----- Pitch / feature list ----- */
.feature-list { display: grid; gap: 14px; margin-top: 18px; }
.feature-item { display: flex; gap: 12px; align-items: flex-start; }
.feature-item .tick {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,197,130,.15);
  color: var(--bull);
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 800;
  margin-top: 2px;
}
.feature-item p { margin: 0; }

/* ----- Prose (legal / body) ----- */
.prose { max-width: 760px; }
.prose h2 { margin: 32px 0 12px; }
.prose h3 { margin: 24px 0 10px; }
.prose p, .prose li { color: var(--ink-muted); }
.prose ul { padding-left: 20px; margin-bottom: 16px; }
.prose ul li { list-style: disc; margin-bottom: 8px; }
.prose a { color: var(--system); text-decoration: underline; }

/* ----- Pill / badge ----- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: .76rem; font-weight: 700;
  background: var(--panel-2); color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: .05em;
}
.badge.bull { background: rgba(0,197,130,.12); color: var(--bull); }
.badge.system { background: rgba(59,130,246,.12); color: var(--system); }

/* ----- Contact form ----- */
.form-grid { display: grid; gap: 16px; max-width: 560px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: .95rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--system);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}

/* ----- Winner guide head ----- */
.guide-head { background: var(--panel); border-bottom: 1px solid var(--border); padding: 44px 0; }
.guide-head .badge { margin-bottom: 14px; }

/* ===================================================================
   Responsive
   =================================================================== */
@media (min-width: 640px) {
  .panel-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { gap: 20px; }
}
@media (min-width: 780px) {
  .hero { padding: 72px 0 80px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 48px; }
  .panel-grid { grid-template-columns: repeat(3, 1fr); }
  .panel-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .cta-band { padding: 56px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-marquee { animation: none !important; }
  .tab-panel.is-active { animation: none !important; }
}
