/* SignalMatrix pre-seed deck — v2
   All sizes are px on a fixed 1920×1080 stage, scaled by js/app.js. */

:root {
  --bg: #f8f4e9;
  --surface: #ffffff;
  --ink: #001219;
  --ink-2: #1f3a44;
  --muted: #5e7079;
  --line: #e9dfc4;
  --teal: #005f73;   --teal-soft: #e1eff1;
  --cyan: #0a9396;   --cyan-soft: #e2f4f0;
  --amber: #ca6702;  --amber-soft: #fbefdc;
  --red: #9b2226;    --red-soft: #f7e6e4;
  --gold: #ee9b00;
  --vanilla: #e9d8a6;

  /* default component colour */
  --c: var(--teal);
  --soft: var(--teal-soft);

  --elev-2: 0 3px 1px -2px rgba(0,0,0,.12), 0 2px 2px 0 rgba(0,0,0,.09), 0 1px 5px 0 rgba(0,0,0,.08);
  --elev-8: 0 5px 5px -3px rgba(0,0,0,.14), 0 8px 10px 1px rgba(0,0,0,.09), 0 3px 14px 2px rgba(0,0,0,.08);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

.c-teal  { --c: var(--teal);  --soft: var(--teal-soft); }
.c-cyan  { --c: var(--cyan);  --soft: var(--cyan-soft); }
.c-amber { --c: var(--amber); --soft: var(--amber-soft); }
.c-red   { --c: var(--red);   --soft: var(--red-soft); }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
  font-family: var(--font);
  color: var(--ink-2);
  -webkit-font-smoothing: antialiased;
}

/* ---------- stage ---------- */

#stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  background: var(--bg);
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 90px 120px 120px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}
.slide.active {
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease, visibility 0s;
}

/* ---------- builds ---------- */

.step {
  opacity: 0;
  transform: translateY(40px) scale(.98);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1);
}
.step.shown { opacity: 1; transform: none; }
body.show-all .step { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  .slide, .step, #progress span { transition: none !important; }
}

/* ---------- chrome: footer + progress ---------- */

#foot {
  position: absolute;
  left: 120px;
  right: 120px;
  bottom: 44px;
  display: flex;
  justify-content: space-between;
  font-size: 24px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}
#progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: var(--line);
}
#progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width .4s ease;
}

/* ---------- type ---------- */

.kicker {
  font-size: 30px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--teal);
  margin: 0 0 28px;
}
h1 {
  font-size: 190px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--ink);
  margin: 0;
}
h1.two-line { font-size: 128px; line-height: 1.02; }
h1.closing { font-size: 96px; letter-spacing: -.03em; line-height: 1.08; }
h2 {
  font-size: 76px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0;
}
.lead {
  font-size: 50px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink-2);
  margin: 0;
}
.sub {
  font-size: 36px;
  font-weight: 500;
  color: var(--muted);
  margin: 18px 0 0 112px;
  line-height: 1.3;
}
h3 {
  font-size: 44px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 16px;
  line-height: 1.15;
}
p { margin: 0; }
.body-text, .card p {
  font-size: 32px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-2);
}
.sources {
  font-size: 24px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 32px;
  line-height: 1.35;
}
strong { color: var(--ink); font-weight: 700; }
em.k { font-style: normal; color: var(--c); font-weight: 700; }
code {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .9em;
  background: var(--soft);
  color: var(--c);
  border-radius: 4px;
  padding: 2px 10px;
}
.ar {
  font-family: var(--font-ar);
  font-weight: 500;
  direction: rtl;
  text-align: right;
}

/* ---------- slide header ---------- */

.head { display: flex; align-items: center; gap: 28px; }
.badge {
  flex: none;
  width: 84px; height: 84px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- body layouts ---------- */

.body {
  flex: 1;
  display: grid;
  gap: 36px;
  align-content: center;
  min-height: 0;
  margin-top: 24px;
}
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-6 { grid-template-columns: repeat(6, 1fr); }
.span-2 { grid-column: span 2; }
.full { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 36px; }
.wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }

.centered {
  justify-content: center;
  align-items: center;
  text-align: center;
}
.centered .kicker, .centered .lead { text-align: center; }

/* ---------- card ---------- */

.card {
  position: relative;
  background: var(--surface);
  border-radius: 8px;
  padding: 54px 42px 44px;
  overflow: hidden;
  box-shadow: var(--elev-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 10px;
  background: var(--c);
}
.card.emph { box-shadow: var(--elev-8); }
.card.compact { padding: 40px 36px 34px; }
.card.muted { background: #fdfbf5; --c: var(--vanilla); }
.card.muted h3, .card.muted .stat { color: var(--muted); }
.card.placeholder {
  background: transparent;
  box-shadow: none;
  border: 4px dashed var(--ink);
}
.card.placeholder::before { display: none; }
.card.center { align-items: center; text-align: center; justify-content: center; }
.card.row {
  flex-direction: row;
  align-items: center;
  gap: 36px;
  padding: 36px 42px;
}
.card.row p { font-size: 38px; font-weight: 600; line-height: 1.3; color: var(--ink-2); }
.card .divider { height: 2px; background: var(--line); margin: 14px 0; }
.card .grow { flex: 1; }

.stat, p.stat {
  font-size: 96px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--c);
  margin: 0 0 8px;
}
.stat.sm, p.stat.sm { font-size: 76px; }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stat-row .stat { margin: 0; }
.stat-label, p.stat-label {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* icon tile */
.icon {
  width: 96px; height: 96px;
  border-radius: 8px;
  background: var(--soft);
  display: flex; align-items: center; justify-content: center;
  flex: none;
  margin-bottom: 14px;
}
.icon svg {
  width: 56px; height: 56px;
  stroke: var(--c);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* number circle */
.num {
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  margin-bottom: 18px;
}
.card.row .num { width: 76px; height: 76px; font-size: 36px; margin: 0; }

/* chip / tag */
.chips { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.chip {
  padding: 18px 34px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--c);
  font-size: 34px;
  font-weight: 700;
  white-space: nowrap;
}
.tags { display: flex; gap: 16px; flex-wrap: wrap; }
.tag {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--c);
  font-size: 28px;
  font-weight: 700;
  align-self: flex-start;
  white-space: nowrap;
}

/* check list */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}
.checks li > span { flex: 1; }
.checks li {
  font-size: 34px;
  line-height: 1.35;
  color: var(--ink-2);
}
.checks li::before {
  content: '✓';
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 800;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.checks li strong { color: var(--teal); }
.checks li.no { color: var(--muted); }
.checks li.no::before { content: '✕'; background: #f1ead6; color: #a08e5c; }
.checks li.dot::before { content: ''; background: var(--c); width: 16px; height: 16px; margin: 16px 14px; }

/* plain list */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.list li { font-size: 34px; line-height: 1.35; color: var(--ink-2); }

/* callout */
.callout {
  justify-self: center;
  align-self: center;
  max-width: 1500px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  padding: 24px 48px;
  text-align: center;
}

/* link box */
.linkbox {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 36px;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 20px 40px;
  box-shadow: var(--elev-2);
}

/* quote */
p.quote {
  font-size: 50px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}
/* portrait */
.portrait { width: 180px; height: 180px; border-radius: 8px; object-fit: cover; flex: none; box-shadow: var(--elev-2); }
.card.row p.quote { font-size: 50px; font-weight: 500; }
.card.row p.quote-by { font-size: 28px; font-weight: 600; color: var(--muted); margin-top: 10px; }
p.quote-by { font-size: 28px; font-weight: 600; color: var(--muted); }

/* ---------- flow diagram (slide 2) ---------- */

.flow {
  display: grid;
  grid-template-columns: 1fr 72px 1.25fr 72px 1fr;
  align-items: center;
  gap: 24px;
}
.arrow {
  font-size: 64px;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
  line-height: 1;
}
.pipe { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.pipe .tag { align-self: stretch; text-align: center; font-size: 30px; }

/* ---------- data table (slide 4) ---------- */

.tbl { display: flex; flex-direction: column; gap: 0; background: #fff; border-radius: 8px; box-shadow: var(--elev-2); overflow: hidden; }
.tbl .tr {
  display: grid;
  grid-template-columns: 260px 250px 300px 1fr 300px;
  align-items: center;
  gap: 24px;
  padding: 0 42px;
  height: 54px;
  border-top: 2px solid var(--line);
  font-size: 30px;
}
.tbl .tr.th {
  height: 54px;
  border-top: 0;
  background: var(--ink);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.tbl .tr > :nth-child(2), .tbl .tr > :nth-child(3), .tbl .tr > :nth-child(5) { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .lang { font-weight: 800; color: var(--ink); font-size: 32px; }
.tbl .hours { font-weight: 700; color: var(--c); }
.tbl .bar { height: 26px; background: var(--soft); border-radius: 4px; position: relative; }
.tbl .bar i { position: absolute; inset: 0; width: var(--w); background: var(--c); border-radius: 4px; }
.tbl .bar.zero { background: transparent; border: 2px dashed var(--red); }
.tbl .group { display: block; flex: none; }

/* ---------- funnel (slide 10) ---------- */

.funnel { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.funnel .fr {
  display: grid;
  grid-template-columns: 330px 300px 1fr;
  align-items: center;
  gap: 36px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--elev-2);
  padding: 0 42px;
  height: 96px;
  width: var(--w);
  border-left: 10px solid var(--c);
}
.funnel .fr .l { font-size: 32px; font-weight: 800; color: var(--ink); }
.funnel .fr .n { font-size: 44px; font-weight: 800; color: var(--c); letter-spacing: -.02em; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.funnel .fr .d { font-size: 26px; color: var(--muted); font-weight: 500; line-height: 1.25; }

/* ---------- map (slide 11) ---------- */

.map-wrap { display: flex; flex-direction: column; gap: 24px; align-items: center; justify-content: center; height: 100%; }
.worldmap { width: 1200px; height: 522px; display: block; flex: none; }
.map-base path { fill: #efe9d6; stroke: #fff; stroke-width: .6; }
.map-next path { fill: #fff; stroke: var(--amber); stroke-width: 2.5; stroke-dasharray: 6 4; }
.map-covered path { fill: var(--teal); stroke: #fff; stroke-width: .8; }
.map-dot { fill: var(--teal); }
.legend { display: flex; gap: 40px; justify-content: center; font-size: 26px; font-weight: 600; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 12px; }
.legend i { width: 36px; height: 22px; border-radius: 4px; display: inline-block; }
.legend .l-cov { background: var(--teal); }
.legend .l-next { background: #fff; border: 2.5px dashed var(--amber); }

/* ---------- 2×2 (slide 15) ---------- */

.quad {
  display: grid;
  grid-template-columns: 250px 1fr 1fr;
  grid-template-rows: auto 1fr 1fr;
  gap: 20px 28px;
  align-items: stretch;
}
.quad .ax-x { grid-column: 2; font-size: 28px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; text-align: center; }
.quad .ax-x + .ax-x { grid-column: 3; }
.quad .ax-y {
  grid-column: 1;
  font-size: 28px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
  display: flex; align-items: center; justify-content: center; text-align: center;
  line-height: 1.2;
}
.quad .card { padding: 34px 38px 30px; gap: 10px; min-height: 200px; }
.quad .card h3 { font-size: 40px; margin-bottom: 4px; }
.quad .card p { font-size: 28px; }
.quad .empty { display: flex; align-items: center; justify-content: center; font-size: 64px; color: var(--line); font-weight: 800; }

/* ---------- flywheel (slide 16) ---------- */

.wheel-wrap { display: grid; grid-template-columns: 1fr 520px; gap: 36px; align-items: center; }
.wheel { position: relative; width: 1000px; height: 600px; justify-self: center; }
.wheel svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wheel .ring { fill: none; stroke: var(--line); stroke-width: 6; }
.wheel .arc { fill: none; stroke: var(--teal); stroke-width: 6; }
.wheel .ah { fill: var(--teal); }
.wheel .node {
  position: absolute;
  width: 230px;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--elev-2);
  padding: 16px 20px;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
  border-top: 10px solid var(--c);
}
.wheel .node.step { transform: translate(-50%, calc(-50% + 40px)) scale(.98); }
.wheel .node.step.shown { transform: translate(-50%, -50%); }
body.show-all .wheel .node.step { transform: translate(-50%, -50%); }

/* ---------- segment example (slide 8) ---------- */

.segment .ar { font-size: 48px; line-height: 1.6; color: var(--ink); }
.segment .tr-en { font-size: 32px; font-style: italic; color: var(--ink-2); line-height: 1.4; }
.wer { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; }
.wer .stat { font-size: 110px; }
.wer .stat.muted { color: var(--muted); }
.wer .stat-label { font-size: 26px; }

/* ---------- before / after strip (slide 20) ---------- */

.strip { display: flex; gap: 28px; justify-content: center; margin: 36px 0; }
.strip .card { flex-direction: row; align-items: center; gap: 28px; padding: 26px 36px; }
.strip .card .z { font-size: 44px; font-weight: 800; color: var(--muted); letter-spacing: -.02em; white-space: nowrap; }
.strip .card .z b { color: var(--ink); }
.strip .card .to { font-size: 44px; color: var(--muted); }
.strip .card .tag { font-size: 28px; }

/* ---------- scorecard (slide 15) ---------- */

.scorecard { display: flex; flex-direction: column; gap: 12px; }
.sc-row {
  display: grid;
  grid-template-columns: 460px repeat(4, 1fr);
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--elev-2);
  padding: 0 36px;
  height: 100px;
  position: relative;
  overflow: hidden;
}
.sc-row.sc-head {
  background: transparent; box-shadow: none; height: auto; padding-bottom: 4px;
  font-size: 24px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; line-height: 1.2;
}
.sc-row.muted { background: #fdfbf5; }
.sc-row.win { box-shadow: var(--elev-8); height: 112px; }
.sc-row.win::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--c); }
.sc-name { display: flex; flex-direction: column; gap: 4px; }
.sc-name strong { font-size: 40px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.sc-row.muted .sc-name strong { color: var(--muted); }
.sc-name span { font-size: 24px; font-weight: 600; color: var(--muted); }
.sc-cell { display: flex; align-items: center; gap: 16px; font-size: 28px; color: var(--ink-2); line-height: 1.2; }
.sc-row.muted .sc-cell { color: var(--muted); }
.sc-row.win .sc-cell { font-weight: 700; color: var(--teal); }
.mk {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-weight: 800; font-size: 24px;
}
.mk.y { background: var(--teal-soft); color: var(--teal); }
.mk.n { background: #f1ead6; color: #a08e5c; }
.mk.q { background: #f1ead6; color: #a08e5c; }

/* founder header (slide 17) */
.person { display: flex; align-items: center; gap: 32px; margin-bottom: 12px; }
.person .tag { margin-bottom: 14px; }
.person h3 { margin: 0; }
.avatar { width: 140px; height: 140px; border-radius: 8px; object-fit: cover; flex: none; box-shadow: var(--elev-2); }
