/* MANA OS · Signal page styles. Ported from the design prototype.
   Built on manaos/site.css tokens + primitives. */
/* =========================================================
   SIGNAL · product page
   Same chrome / theme as the homepage (option-a-signal-led).
   Magenta accent for Signal.
   ========================================================= */

/* ---- theme overrides (copied from homepage) ---- */
:root { --font-display: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }

.btn--spark { background: var(--midnight); box-shadow: 0 10px 28px rgba(14,6,38,.18); }
.btn--spark:hover { background: var(--mana-plum); }

.btn--ghost-dark { color: var(--fg1); border-color: rgba(23,18,37,.22); }
.btn--ghost-dark:hover { border-color: var(--fg1); background: rgba(23,18,37,.04); }

/* The final CTA sits on a dark midnight field — invert the buttons so they
   read against it (the page-level overrides above target light sections). */
.final-cta .btn--spark { background: var(--on-dark-1); color: var(--midnight); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.final-cta .btn--spark:hover { background: #ffffff; }
.final-cta .btn--ghost-dark { color: var(--on-dark-1); border-color: rgba(246,244,240,.30); }
.final-cta .btn--ghost-dark:hover { border-color: rgba(246,244,240,.55); background: rgba(246,244,240,.08); }

.glow { display: none; }

/* ---- HERO ---- */
.hero {
  background: var(--paper);
  color: var(--fg1);
  border-bottom: 1px solid var(--hairline);
  padding: 96px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 1100px) { .hero__grid { grid-template-columns: 1fr; gap: 56px; } }

.hero__eyebrow { color: var(--mana-magenta); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 6.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--fg1);
  margin: 22px 0 28px;
  text-wrap: balance;
}
.hero__lead {
  font-size: 21px;
  line-height: 1.5;
  color: var(--fg2);
  max-width: 560px;
  margin: 0 0 40px;
}
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero__cta .meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; color: var(--fg3); text-transform: uppercase; margin-left: 12px; }

/* ---- HERO VISUAL: live momentum chart (light theme) ---- */
.viz {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 580px;
  margin: 0 auto;
}
.viz__frame {
  position: absolute;
  inset: 0;
  border: 1px solid var(--hairline);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.viz__ticker {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--fg2);
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 3;
}
.viz__live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #1B7F4D;
  box-shadow: 0 0 8px rgba(27,127,77,.4);
  animation: liveBlink 2s ease-in-out infinite;
}
@keyframes liveBlink { 50% { opacity: 0.45; } }

.viz svg.chart { width: 100%; height: 100%; display: block; position: relative; z-index: 1; }

@keyframes drawIn { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
.viz .stroke-anim {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: drawIn 2.6s ease-out 0.4s forwards;
}
.viz .decay-anim {
  opacity: 0;
  animation: decayIn .8s ease-out 1.6s forwards;
}
@keyframes decayIn { to { opacity: 0.5; } }

@keyframes haloPulse {
  0%,100% { transform: scale(1); opacity: .35; }
  50%     { transform: scale(1.15); opacity: .6; }
}
.viz .endpoint-halo {
  transform-origin: center; transform-box: fill-box;
  opacity: 0;
  animation: haloIn .4s ease-out 2.6s forwards, haloPulse 2.4s ease-in-out 3s infinite;
}
@keyframes haloIn { to { opacity: .35; } }
.viz .endpoint-dot { opacity: 0; animation: dotIn .3s ease-out 2.7s forwards; }
@keyframes dotIn { to { opacity: 1; } }

.viz .pulse { fill: var(--mana-magenta); filter: drop-shadow(0 0 4px rgba(254,65,251,.7)); }

.viz__card {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  color: var(--fg1);
  font-family: var(--font-sans);
  min-width: 178px;
  z-index: 4;
}
.viz__card .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; color: var(--mana-magenta); text-transform: uppercase; margin-bottom: 6px; display: block; }
.viz__card .fig { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: -.02em; color: var(--fg1); display: block; }
.viz__card .sub { font-size: 11.5px; color: var(--fg2); margin-top: 6px; font-family: var(--font-mono); letter-spacing: .02em; display: block; }

.viz__chip-peak  { top: 12%; right: -16px; transform: translateY(8px); opacity: 0; animation: cardIn .5s ease-out 2.9s forwards; }
.viz__chip-decay { bottom: 16%; left: -20px; transform: translateY(8px); opacity: 0; animation: cardIn .5s ease-out 2.2s forwards; }
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .viz .stroke-anim, .viz .decay-anim, .viz .endpoint-halo, .viz .endpoint-dot,
  .viz__live-dot, .viz__chip-peak, .viz__chip-decay { animation: none !important; }
  .viz .stroke-anim { stroke-dashoffset: 0; }
  .viz .decay-anim { opacity: 0.5; }
  .viz .endpoint-halo { opacity: .35; }
  .viz .endpoint-dot { opacity: 1; }
  .viz__chip-peak, .viz__chip-decay { opacity: 1; transform: none; }
  .viz .pulse { display: none; }
}

/* ---- LENSES (10-up grid, 5 cols) ---- */
.lenses {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.lens {
  padding: 36px 24px 36px 0;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lens:nth-child(n+2) { padding-left: 24px; }
.lens:nth-child(5n) { border-right: 0; padding-right: 0; }
.lens:nth-child(5n+1) { padding-left: 0; }
.lens:nth-last-child(-n+5) { border-bottom: 0; }
.lens__glyph {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--magenta-tint);
  color: var(--mana-magenta);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
}
.lens h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.015em; margin: 0; color: var(--fg1); }
.lens p { font-size: 14px; line-height: 1.5; color: var(--fg2); margin: 0; }
@media (max-width: 1100px) {
  .lenses { grid-template-columns: repeat(2, 1fr); }
  .lens { padding: 32px 20px 32px 0; }
  .lens:nth-child(5n) { border-right: 1px solid var(--hairline); padding-right: 20px; }
  .lens:nth-child(2n) { border-right: 0; padding-right: 0; }
  .lens:nth-child(5n+1) { padding-left: 20px; }
  .lens:nth-child(2n+1) { padding-left: 0; }
  .lens:nth-last-child(-n+5) { border-bottom: 1px solid var(--hairline); }
  .lens:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 720px) {
  .lenses { grid-template-columns: 1fr; }
  .lens { border-right: 0; border-left: 0; padding-left: 0; padding-right: 0; }
  .lens:not(:last-child) { border-bottom: 1px solid var(--hairline); }
}

/* ---- SCOPE OUTPUT CARD (anchor for the dataviz section) ---- */
.scope-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 40px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.scope-card__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}
.scope-card__title h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  letter-spacing: -.022em;
  line-height: 1.04;
  color: var(--fg1);
  margin: 10px 0 6px;
}
.scope-card__title p {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--fg3);
  margin: 0;
}
.scope-card__badge {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg3);
  padding: 12px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.4;
}
.scope-card__badge b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -.02em;
  text-transform: none;
  color: var(--fg1);
  line-height: 1;
}
.scope-card__finding {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}
.scope-card__finding-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mana-magenta);
  padding-top: 4px;
}
.scope-card__finding-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -.012em;
  color: var(--fg1);
  margin: 0;
  text-wrap: pretty;
}
.scope-card__finding-text b { color: var(--mana-violet); font-weight: 700; }
@media (max-width: 900px) {
  .scope-card { padding: 28px; }
  .scope-card__head { grid-template-columns: 1fr; gap: 20px; }
  .scope-card__badge { text-align: left; }
  .scope-card__finding { grid-template-columns: 1fr; gap: 14px; }
  .scope-card__title h3 { font-size: 30px; }
  .scope-card__finding-text { font-size: 18px; }
}

/* ---- DATAVIZ SHOWCASE (2x2 grid of mockup cards) ---- */
.dv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .dv-grid { grid-template-columns: 1fr; } }
.dv-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.dv-card__head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
}
.dv-card__head h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.005em;
  margin: 0;
  color: var(--fg1);
}
.dv-card__tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--fg3);
  background: var(--card);
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}
.dv-card__body { padding: 22px; }

/* Mass chart */
.mass-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mass-row:last-of-type { margin-bottom: 0; }
.mass-row__lbl { width: 64px; font-family: var(--font-mono); font-size: 11px; color: var(--fg3); text-align: right; }
.mass-row__bg { flex: 1; height: 22px; background: var(--paper); border-radius: 4px; overflow: hidden; }
.mass-row__bar {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: white;
  font-weight: 600;
}
.mass-row__val { width: 88px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--fg1); text-align: right; }
.mass-total { display: flex; justify-content: space-between; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--hairline); }
.mass-total span:first-child { font-size: 12px; color: var(--fg3); }
.mass-total span:last-child { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--fg1); letter-spacing: -.015em; }

/* Gravity dots */
.grav-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.grav-row:last-of-type { border-bottom: 0; }
.grav-row__name { width: 140px; font-size: 12px; font-weight: 500; color: var(--fg1); }
.grav-row__bg {
  flex: 1; height: 4px; background: var(--paper); border-radius: 2px;
  position: relative;
}
.grav-row__dot {
  position: absolute;
  top: -5px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--card);
  background: var(--mana-magenta);
  box-shadow: 0 1px 3px rgba(23,18,37,.15);
  transform: translateX(-50%);
}
.grav-row__score { width: 36px; font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--fg1); text-align: right; }
.grav-row__pct { width: 56px; font-family: var(--font-mono); font-size: 10px; color: var(--fg3); }
.grav-foot { margin-top: 8px; font-size: 11px; color: var(--fg3); font-style: italic; }

/* Overlap matrix */
.ovl-matrix { width: 100%; border-collapse: separate; border-spacing: 3px; }
.ovl-matrix td { text-align: center; font-family: var(--font-mono); font-size: 11px; padding: 8px 0; border-radius: 4px; }
.ovl-matrix th { font-size: 10px; color: var(--fg3); padding-bottom: 6px; font-weight: 500; font-family: var(--font-mono); letter-spacing: .04em; }
.ovl-matrix td.lbl { font-family: var(--font-mono); font-size: 10px; color: var(--fg3); padding-right: 8px; text-align: right; background: transparent; }
.ovl-aff { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.ovl-aff__h { font-size: 11px; font-weight: 600; color: var(--fg1); margin-bottom: 8px; }
.ovl-aff__row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.ovl-aff__row:last-child { border-bottom: 0; }
.ovl-aff__rank { width: 16px; text-align: center; font-family: var(--font-mono); font-size: 10px; color: var(--fg3); }
.ovl-aff__tok { flex: 1; font-size: 12px; font-weight: 500; color: var(--fg1); }
.ovl-aff__kind { font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; padding: 2px 8px; border-radius: var(--r-pill); background: var(--paper); color: var(--fg2); }
.ovl-aff__bar { width: 80px; height: 4px; background: var(--paper); border-radius: 2px; overflow: hidden; }
.ovl-aff__bar i { display: block; height: 100%; background: var(--mana-violet); border-radius: 2px; }

/* Creator list */
.crt-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.crt-row:last-of-type { border-bottom: 0; }
.crt-row__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--magenta-tint);
  color: var(--mana-magenta);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.crt-row__name { flex: 1; }
.crt-row__name b { display: block; font-size: 13px; font-weight: 600; color: var(--fg1); }
.crt-row__name span { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--fg3); margin-top: 2px; }
.crt-row__val { text-align: right; }
.crt-row__val b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--fg1); letter-spacing: -.01em; }
.crt-row__val span { display: block; font-family: var(--font-mono); font-size: 9px; color: var(--fg3); margin-top: 2px; letter-spacing: .04em; }
.crt-total { display: flex; justify-content: space-between; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--hairline); font-size: 12px; }
.crt-total span:first-child { color: var(--fg3); }
.crt-total span:last-child { font-family: var(--font-display); font-weight: 700; color: var(--fg1); }

/* ---- PROCESS (3 steps with numbered cards) ---- */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.process__step {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.process__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--mana-magenta);
}
.process__step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.015em;
  margin: 0;
  color: var(--fg1);
  text-wrap: balance;
}
.process__step p { font-size: 15px; line-height: 1.55; color: var(--fg2); margin: 0; }
@media (max-width: 900px) { .process { grid-template-columns: 1fr; } }

/* ---- SOURCES PILLS ---- */
.sources { display: flex; flex-wrap: wrap; gap: 12px; }
.source-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: var(--card);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--fg1);
}
.source-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mana-magenta); }
.source-pill.coming { color: var(--fg3); border-style: dashed; }
.source-pill.coming .dot { background: var(--fg3); }

/* ---- BRIDGE CTA ---- */
.bridge {
  background: var(--paper-2);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 96px 0;
}
.bridge__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.bridge__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mana-violet);
  margin-bottom: 14px;
}
.bridge__h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.06;
  letter-spacing: -.02em;
  color: var(--fg1);
  margin: 0 0 18px;
  text-wrap: balance;
}
.bridge__p { font-size: 17px; line-height: 1.5; color: var(--fg2); margin: 0 0 28px; max-width: 540px; }
@media (max-width: 900px) { .bridge__grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---- FINAL CTA ---- */
.final-cta {
  position: relative;
  background: var(--midnight);
  color: var(--on-dark-1);
  padding: 140px 0;
  text-align: center;
  overflow: hidden;
}
.final-cta__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 5.4vw, 80px);
  line-height: 1.02;
  letter-spacing: -.03em;
  color: var(--on-dark-1);
  margin: 0 0 24px;
}
.final-cta__lead { font-size: 20px; color: var(--on-dark-2); max-width: 640px; margin: 0 auto 40px; line-height: 1.45; }
.final-cta__cta { display: inline-flex; gap: 14px; }
