/* ============================================================
   Agentic Competitive Intelligence — Toptal-flavored light deck
   1920×1080
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --bg-2: #F4F6FA;
  --bg-3: #EDF0F5;
  --line: #E2E6EF;
  --line-2: #CDD3E0;
  --ink: #0F1320;
  --ink-2: #3A4258;
  --ink-3: #6B7594;
  --ink-4: #9AA3B8;
  --accent: #2F6BFF;       /* electric blue */
  --accent-2: #1A4FCC;
  --accent-glow: rgba(47, 107, 255, 0.18);
  --warn: #B87800;
  --good: #1B9E6E;
  --bad:  #D63B3B;

  /* Type scale (px) for 1920x1080 */
  --t-display: 128px;
  --t-title:   72px;
  --t-subtitle:44px;
  --t-body:    32px;
  --t-small:   26px;
  --t-mono:    24px;

  /* Spacing */
  --pad-x:     112px;
  --pad-top:   96px;
  --pad-bot:   88px;
  --gap-title: 56px;
  --gap-item:  28px;

  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter Tight", "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

deck-stage section {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  position: relative;
}

/* Subtle grid backdrop available on demand */
.grid-bg::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

.dot-bg::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* ---------- Frame primitives ---------- */
.frame {
  position: absolute;
  inset: 0;
  padding: var(--pad-top) var(--pad-x) var(--pad-bot);
  display: flex;
  flex-direction: column;
}

.eyebrow {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 18px;
}
.eyebrow .num {
  color: var(--accent);
}
.eyebrow .bar {
  width: 56px; height: 1px; background: var(--line-2);
}

h1.title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--t-title);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 32px 0 0;
  color: var(--ink);
  text-wrap: balance;
}
h1.title em {
  font-style: normal;
  color: var(--accent);
}

.subtitle {
  font-size: var(--t-subtitle);
  line-height: 1.18;
  color: var(--ink-2);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 28px 0 0;
  max-width: 1500px;
  text-wrap: pretty;
}

.body {
  font-size: var(--t-body);
  line-height: 1.42;
  color: var(--ink-2);
  font-weight: 400;
  text-wrap: pretty;
}

.small {
  font-size: var(--t-small);
  line-height: 1.45;
  color: var(--ink-3);
}

.mono {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0;
  color: var(--ink-2);
}

.rule {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* Slide footer (page number + project mark) */
.slide-foot {
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.slide-foot .mark { display: flex; align-items: center; gap: 14px; }
.slide-foot .mark .dot {
  width: 8px; height: 8px; background: var(--accent);
  display: inline-block;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 32px 36px;
  position: relative;
}
.card.accent {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 30px 80px -20px var(--accent-glow);
}
.card-label {
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}

/* ---------- Buttons / chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.chip .dot {
  width: 8px; height: 8px; background: var(--accent);
  display: inline-block;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes drawLine {
  from { stroke-dashoffset: var(--len, 1000); }
  to   { stroke-dashoffset: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes flowDot {
  0%   { offset-distance: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
@keyframes orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes typeIn {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Per-slide entrance: animate when slide becomes active. Default opacity:1 so static views still show. */
.anim, .anim-fade { opacity: 1; }
deck-stage section[data-deck-active] .anim {
  animation: fadeUp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
deck-stage section[data-deck-active] .anim-fade {
  animation: fadeIn 0.9s ease both;
}

/* Stagger helpers */
.d1 { animation-delay: 0.10s !important; }
.d2 { animation-delay: 0.22s !important; }
.d3 { animation-delay: 0.34s !important; }
.d4 { animation-delay: 0.46s !important; }
.d5 { animation-delay: 0.58s !important; }
.d6 { animation-delay: 0.70s !important; }
.d7 { animation-delay: 0.82s !important; }
.d8 { animation-delay: 0.94s !important; }
.d9 { animation-delay: 1.06s !important; }

/* Active slide also runs flow + draw + pulse */
deck-stage section:not([data-deck-active]) .flow-dot,
deck-stage section:not([data-deck-active]) .draw-line,
deck-stage section:not([data-deck-active]) .pulse-dot {
  animation: none !important;
}

/* Cursor blink for terminal-style */
.caret::after {
  content: "▍";
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

/* ---------- Cover slide ---------- */
.cover {
  position: absolute; inset: 0;
  background: var(--bg);
  overflow: hidden;
}
.cover .glow {
  position: absolute;
  width: 1400px; height: 1400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,107,255,0.10) 0%, transparent 60%);
  top: -400px; right: -400px;
  filter: blur(20px);
  animation: fadeIn 1.4s ease both;
}
.cover .meta-top {
  position: absolute;
  top: 56px; left: var(--pad-x); right: var(--pad-x);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cover .stack {
  position: absolute;
  left: var(--pad-x);
  bottom: 180px;
  max-width: 1500px;
}
.cover .kicker {
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 36px;
  display: flex; align-items: center; gap: 16px;
}
.cover .kicker .bar { width: 72px; height: 1px; background: var(--accent); }
.cover h1 {
  font-size: var(--t-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--ink);
}
.cover h1 .accent { color: var(--accent); }
.cover .sub {
  margin-top: 36px;
  font-size: 40px;
  color: var(--ink-2);
  font-weight: 400;
  line-height: 1.25;
  max-width: 1300px;
  letter-spacing: -0.01em;
}
.cover .meta-bottom {
  position: absolute;
  bottom: 56px; left: var(--pad-x); right: var(--pad-x);
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ---------- Big number / metric ---------- */
.metric {
  display: flex; flex-direction: column; gap: 18px;
}
.metric .num {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 144px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.metric .num .unit {
  color: var(--accent);
  font-size: 64px;
  margin-left: 8px;
}
.metric .lbl {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Diagram primitives ---------- */
.node {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  padding: 18px 22px;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.node .num {
  color: var(--accent);
  font-size: 18px;
}
.node.accent {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(47,107,255,0.10), rgba(47,107,255,0.02));
  color: var(--ink);
}

/* ---------- Tables ---------- */
.tbl {
  width: 100%;
  border-collapse: collapse;
}
.tbl th, .tbl td {
  text-align: left;
  padding: 14px 24px;
  font-size: 26px;
  line-height: 1.28;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tbl th {
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  border-bottom-color: var(--line-2);
  padding-top: 10px;
  padding-bottom: 14px;
}
.tbl td.mono { font-family: var(--mono); font-size: 24px; }
.tbl tr:last-child td { border-bottom: none; }

/* ---------- Section headers ---------- */
.section-head {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad-x);
  background: var(--bg);
}
.section-head .num {
  font-family: var(--mono);
  font-size: 28px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 32px;
}
.section-head h2 {
  font-size: 112px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin: 0;
  max-width: 1500px;
  text-wrap: balance;
}

/* Utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-40 { gap: 40px; }
.gap-56 { gap: 56px; }
.flex-1 { flex: 1; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.mt-auto { margin-top: auto; }

/* ---------- Logo lockup ---------- */
.logo-lockup {
  position: absolute;
  top: 44px;
  right: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 10;
}
.logo-lockup-inline {
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo-lockup img,
.logo-lockup-inline img {
  height: 22px;
  width: auto;
  display: block;
  object-fit: contain;
}
.logo-sep {
  width: 1px;
  height: 18px;
  background: var(--line-2);
  display: block;
}

/* SVG defaults */
svg .stroke { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
svg .stroke-2 { fill: none; stroke: var(--accent); stroke-width: 2; }
svg .label {
  font-family: var(--mono);
  font-size: 18px;
  fill: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
svg .node-fill { fill: var(--bg-2); }
svg .node-stroke { stroke: var(--line-2); fill: none; }
svg .accent-fill { fill: var(--accent); }
svg .accent-stroke { stroke: var(--accent); fill: none; stroke-width: 2; }
