/* ==========================================================================
   Services page — bespoke layout
   Overview grid · alternating detail rows · segments bento · comparison table
   Uses shared tokens from main.css. No hard-coded palette values.
   (One exception: #8b5cf6 legend dot matches the donut widget's 4th slice,
    which has no design-system token.)
   ========================================================================== */

/* Screen-reader-only utility (not present in main.css) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---- Hero: service anchors + stats ---- */
.svc-anchors {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
}
.svc-anchor {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: var(--r-pill);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-1);
  font-size: 0.88rem;
  font-weight: 500;
  backdrop-filter: blur(var(--blur));
  transition: transform var(--t-fast) var(--ease-out),
              border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.svc-anchor .icon-chip { width: 32px; height: 32px; border-radius: var(--r-sm); }
.svc-anchor .icon-chip svg { width: 16px; height: 16px; }
.svc-anchor:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--glass-2);
  color: var(--text-0);
}

.svc-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-10);
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}
.shs-item { display: flex; flex-direction: column; gap: 2px; }
.shs-item .mono {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: -0.02em;
  line-height: 1;
}
.shs-item small { color: var(--text-3); font-size: 0.78rem; }

/* ---- Overview grid (numbered service cards) ---- */
.svc-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
.svc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  overflow: hidden;
}
.svc-card h3 { font-size: var(--fs-h4); }
.svc-card p { color: var(--text-2); font-size: var(--fs-sm); flex: 1; }
.svc-card .link-arrow { margin-top: auto; }
.svc-num {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-6);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-0);
  opacity: 0.08;
  letter-spacing: -0.03em;
  transition: opacity var(--t-med), color var(--t-med);
}
.svc-card:hover .svc-num { opacity: 0.22; color: var(--emerald-bright); }

/* ---- Detailed alternating rows ---- */
.svc-rows { display: grid; gap: clamp(48px, 7vw, 104px); }
.svc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.svc-row.rev .svc-copy { order: 2; }

.svc-copy .icon-chip { margin-bottom: var(--sp-5); }
.svc-copy .eyebrow { margin-bottom: var(--sp-4); }
.svc-copy h2 { margin-bottom: var(--sp-4); }
.svc-copy > p { color: var(--text-2); font-size: var(--fs-lead); margin-bottom: var(--sp-6); max-width: 46ch; }

.svc-feats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3) var(--sp-5);
  margin-bottom: var(--sp-8);
}
.svc-feats li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--text-1);
  line-height: 1.35;
}
.svc-feats .ck {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: var(--r-xs);
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-bright);
  margin-top: 1px;
}
.svc-feats .ck svg { width: 14px; height: 14px; }

/* ---- Visual panels ---- */
.svc-visual {
  position: relative;
  padding: var(--sp-6);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--grad-brand-soft), transparent 60%),
    linear-gradient(180deg, var(--glass-2), var(--glass));
}
.svc-vis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.svc-vis-head h4 { font-size: 0.98rem; color: var(--text-0); }
.svc-vis-note { font-size: 0.78rem; margin-top: var(--sp-4); line-height: 1.45; }

/* Signal card (Trading Signals) */
.svc-signal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.ss-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--bg-inset);
  border: 1px solid var(--line);
}
.ss-k { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.ss-v { font-size: 0.95rem; color: var(--text-0); font-weight: 600; }

/* Donut allocation (Advisory) */
.svc-donut { display: flex; align-items: center; gap: var(--sp-5); }
.svc-donut .svc-legend { flex: 1; }

/* Metric row (Portfolio) */
.svc-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.svc-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-inset);
  border: 1px solid var(--line);
}
.svc-metric .m-k { font-size: 0.7rem; color: var(--text-3); }
.svc-metric .m-v { font-size: 1rem; color: var(--text-0); font-weight: 600; }

/* Report card (Research) */
.svc-report { display: flex; flex-direction: column; gap: var(--sp-5); }
.rep-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
.rep-title { font-size: 0.95rem; color: var(--text-0); font-weight: 600; }
.rep-sub { font-size: 0.76rem; margin-top: 4px; }
.rep-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  color: var(--emerald-bright);
  background: rgba(16, 185, 129, 0.12);
  white-space: nowrap;
}
.rep-scen { display: grid; gap: var(--sp-3); }
.rep-bar { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: var(--sp-3); }
.rep-bar .rb-k { font-size: 0.72rem; color: var(--text-2); font-family: var(--font-mono); }
.rb-track { height: 8px; border-radius: var(--r-pill); background: var(--bg-inset); overflow: hidden; border: 1px solid var(--line); }
.rb-fill { display: block; height: 100%; border-radius: var(--r-pill); background: var(--text-3); }
.rb-fill.up { background: var(--grad-emerald); }
.rb-fill.down { background: linear-gradient(90deg, var(--down), rgba(244, 63, 94, 0.5)); }
.rb-v { font-size: 0.82rem; color: var(--text-0); }
.rep-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.rep-kpi { display: flex; flex-direction: column; gap: 3px; }
.rep-kpi .rk-k { font-size: 0.68rem; color: var(--text-3); }
.rep-kpi .rk-v { font-size: 0.92rem; color: var(--text-0); font-weight: 600; }

/* Index pills (Market Insights) */
.svc-idx { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-5); }
.idx-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-inset);
  border: 1px solid var(--line);
}
.idx-pill .muted { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; }
.idx-pill strong { color: var(--text-0); font-size: 0.98rem; }
.idx-pill .q-chg { font-family: var(--font-mono); font-size: 0.76rem; }

/* Learning path ring + modules (Academy) */
.svc-ring { display: grid; place-items: center; margin: var(--sp-2) 0 var(--sp-5); }
.svc-ring svg { width: 148px; height: 148px; }
.ring-num { font-family: var(--font-display); font-size: 22px; font-weight: 700; fill: var(--text-0); }
.ring-lbl { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.06em; fill: var(--text-3); text-transform: uppercase; }
.svc-modules { display: grid; gap: var(--sp-2); }
.svc-modules li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-inset);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--text-2);
}
.svc-modules .mk { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: var(--r-xs); color: var(--text-3); background: var(--glass); }
.svc-modules .mk svg { width: 13px; height: 13px; }
.svc-modules li.done { color: var(--text-0); }
.svc-modules li.done .mk { color: var(--emerald-bright); background: rgba(16, 185, 129, 0.12); }
.svc-modules li.now { color: var(--text-0); border-color: var(--line-strong); }
.svc-modules li.now .mk { color: var(--gold-bright); background: rgba(245, 184, 61, 0.14); }

/* ---- Who we help — bento segments ---- */
.seg-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-5);
}
.seg-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.seg-card.wide { grid-column: span 3; }
.seg-card h3 { font-size: var(--fs-h4); }
.seg-card p { color: var(--text-2); font-size: var(--fs-sm); flex: 1; }
.seg-card .icon-chip { margin-bottom: var(--sp-2); }
.seg-tag {
  display: inline-block;
  margin-top: var(--sp-2);
  font-size: 0.78rem;
  color: var(--text-3);
}
.seg-tag strong { color: var(--emerald-bright); font-weight: 600; }

/* ---- Comparison table ---- */
.svc-compare table.data { min-width: 760px; }
.svc-compare th[scope="row"] { background: var(--bg-inset); }
.svc-compare .tc-name { color: var(--text-0); font-weight: 600; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.svc-compare .link-arrow { font-size: 0.82rem; white-space: nowrap; }
.svc-compare-note { text-align: center; font-size: 0.82rem; margin-top: var(--sp-5); }
.svc-compare-note a { color: var(--text-1); text-decoration: underline; text-underline-offset: 3px; }
.svc-compare-note a:hover { color: var(--emerald-bright); }

/* ---- CTA band ---- */
.svc-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  background:
    radial-gradient(90% 120% at 50% 0%, var(--grad-brand-soft), transparent 60%),
    linear-gradient(180deg, var(--glass-2), var(--glass));
}
.svc-cta-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.svc-cta-inner p { color: var(--text-1); }
.svc-cta-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3) var(--sp-6); }
.svc-cta-meta span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text-2); }
.svc-cta-meta svg { width: 16px; height: 16px; color: var(--emerald-bright); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .svc-overview { grid-template-columns: repeat(2, 1fr); }
  .seg-grid { grid-template-columns: repeat(4, 1fr); }
  .seg-card { grid-column: span 2; }
  .seg-card.wide { grid-column: span 2; }
}
@media (max-width: 860px) {
  .svc-row { grid-template-columns: 1fr; gap: var(--sp-8); }
  .svc-row.rev .svc-copy { order: 0; }
  .svc-copy > p { max-width: none; }
}
@media (max-width: 640px) {
  .svc-overview { grid-template-columns: 1fr; }
  .seg-grid { grid-template-columns: 1fr; }
  .seg-card, .seg-card.wide { grid-column: 1 / -1; }
  .svc-feats { grid-template-columns: 1fr; }
  .svc-signal { grid-template-columns: repeat(2, 1fr); }
  .svc-hero-stats { gap: var(--sp-6) var(--sp-8); }
  .shs-item .mono { font-size: 1.4rem; }
  .svc-donut { flex-direction: column; align-items: stretch; }
}
