/* Mastra Talk- Deck Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Ink palette- deep editorial dark */
  --ink-0: #0a0807;        /* deepest- near-black with warmth */
  --ink-1: #110d0c;        /* slide bg */
  --ink-2: #1a1413;        /* card bg */
  --ink-3: #251c1a;        /* elevated card */
  --ink-4: #322624;        /* divider */
  --ink-5: #4a3835;        /* subtle border */

  /* Reds- talk's accent system */
  --red-deep: #2a0a0a;     /* darkest red, glow base */
  --red-1: #5a1414;        /* dark red */
  --red-2: #8a1f1f;        /* mid red */
  --red-3: #c43030;        /* bright red */
  --red-4: #e85050;        /* hot red highlight */
  --red-glow: #ff4040;     /* glow / emission */

  /* Neutrals (text) */
  --text-0: #f5ebe6;       /* primary, warm white */
  --text-1: #d4c4bc;       /* secondary */
  --text-2: #9a8a83;       /* tertiary / muted */
  --text-3: #6b5d57;       /* placeholder / dim */
  --text-4: #4a3f3a;       /* disabled */

  /* Section colors (for the diagram lighting up) */
  --sec-1: #c43030;        /* model- red */
  --sec-2: #d97757;        /* context- warm orange */
  --sec-3: #c9a227;        /* action- gold */
  --sec-4: #6a8e3f;        /* orchestration- sage */
  --sec-5: #4a90a4;        /* observability- blue */

  /* Code / IDE */
  --code-bg: #0d0807;
  --code-border: #2a1f1c;
  --code-comment: #6b5d57;
  --code-keyword: #e85050;
  --code-string: #c9a227;
  --code-fn: #d97757;
  --code-type: #4a90a4;
  --code-text: #d4c4bc;
  --code-punc: #6b5d57;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Type scale (for 1920x1080) */
  --t-eyebrow: 18px;
  --t-body: 24px;
  --t-bullet: 28px;
  --t-h3: 36px;
  --t-h2: 56px;
  --t-h1: 84px;
  --t-display: 124px;

  /* Animation speed multiplier- controlled by tweaks */
  --anim-speed: 1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink-0);
  color: var(--text-0);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  overflow: hidden;
  height: 100vh;
}

deck-stage {
  background: var(--ink-0);
}

/* === SLIDE BASE === */
.slide {
  width: 1920px;
  height: 1080px;
  position: relative;
  background: var(--ink-1);
  color: var(--text-0);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* film-grain bg texture */
  background-image:
    radial-gradient(ellipse at top right, rgba(196, 48, 48, 0.04), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(20, 10, 8, 0.6), transparent 70%);
}

/* Subtle grain overlay on every slide */
.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.95  0 0 0 0 0.9  0 0 0 0.07 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  z-index: 1;
}

.slide-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--s-9) var(--s-9) var(--s-7);
}

/* === SLIDE CHROME (header bar) === */
.chrome {
  position: absolute;
  top: 32px;
  left: 48px;
  right: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chrome-left { display: flex; gap: 24px; align-items: center; }
.chrome-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chrome-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--red-3);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--red-glow);
}
.chrome-section {
  color: var(--text-2);
}
.chrome-right {
  color: var(--text-3);
}

/* === TYPOGRAPHY === */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--t-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--red-3);
  margin: 0 0 var(--s-5);
  font-weight: 500;
}

h1.title {
  font-size: var(--t-h1);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin: 0 0 var(--s-5);
  text-wrap: balance;
}

h2.title {
  font-size: var(--t-h2);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 var(--s-5);
  text-wrap: balance;
}

h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-3);
}

.subtitle {
  font-size: 32px;
  color: var(--text-1);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 1200px;
  text-wrap: pretty;
}

p { margin: 0; }

/* === BULLETS === */
.bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.bullets li {
  font-size: var(--t-bullet);
  color: var(--text-1);
  line-height: 1.4;
  display: flex;
  gap: var(--s-4);
  align-items: baseline;
  position: relative;
  cursor: help;
  transition: color 0.2s;
}
.bullets li:hover { color: var(--text-0); }

.bullets li::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--red-3);
  flex-shrink: 0;
  transform: translateY(-4px) rotate(45deg);
  box-shadow: 0 0 12px rgba(232, 80, 80, 0.4);
}

.bullets li.warn::before {
  background: #d97757;
  box-shadow: 0 0 12px rgba(217, 119, 87, 0.5);
}

/* === TOOLTIPS (hover bullets) === */
.tip {
  position: absolute;
  left: 0;
  top: calc(100% + 12px);
  width: 520px;
  background: var(--ink-3);
  border: 1px solid var(--ink-5);
  border-left: 3px solid var(--red-3);
  padding: var(--s-4) var(--s-5);
  font-family: 'Inter Tight', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-1);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.bullets li:hover .tip,
[data-has-tip]:hover .tip {
  opacity: 1;
  transform: translateY(0);
}

/* === CODE BLOCK === */
.code {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 6px;
  padding: var(--s-5) var(--s-6);
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  line-height: 1.55;
  color: var(--code-text);
  white-space: pre;
  overflow: hidden;
  position: relative;
}
.code::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 28px;
  background: linear-gradient(to bottom, rgba(196,48,48,0.06), transparent);
  border-bottom: 1px solid var(--code-border);
}
.code-header {
  position: absolute;
  top: 6px; left: 16px;
  font-size: 12px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.code-body { margin-top: 24px; }
.kw  { color: var(--code-keyword); }
.str { color: var(--code-string); }
.fn  { color: var(--code-fn); }
.ty  { color: var(--code-type); }
.cm  { color: var(--code-comment); font-style: italic; }
.pn  { color: var(--code-punc); }

/* === MINI DIAGRAM (corner) === */
.mini-diagram {
  position: absolute;
  bottom: 28px;
  right: 32px;
  width: 220px;
  height: 150px;
  pointer-events: auto;
  z-index: 5;
  border: 1px solid var(--ink-5);
  border-radius: 4px;
  background: rgba(15,10,9,0.6);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
/* Belt-and-suspenders: make sure mini-diagrams from non-active slides
   never leak into view, regardless of how visibility cascades. */
.slide:not([data-deck-active]) .mini-diagram {
  display: none !important;
}
.mini-diagram:hover {
  transform: scale(1.04);
  border-color: var(--red-3);
  box-shadow: 0 0 18px rgba(196,48,48,0.35);
}
.mini-diagram.hidden { display: none; }

/* === Placeholder boxes === */
.placeholder {
  position: relative;
  background: var(--ink-2);
  border: 1px dashed var(--ink-5);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 24px;
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 16px,
      rgba(74, 56, 53, 0.15) 16px,
      rgba(74, 56, 53, 0.15) 17px
    );
}
.placeholder-label {
  background: var(--ink-1);
  padding: 4px 10px;
  border: 1px solid var(--ink-5);
  color: var(--text-2);
}

/* === Notes drawer === */
.notes-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  height: 100vh;
  background: var(--ink-2);
  border-left: 1px solid var(--ink-5);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 32px 28px;
  overflow-y: auto;
  font-family: 'Inter Tight', sans-serif;
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.55;
}
.notes-drawer.open { transform: translateX(0); }
.notes-drawer h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-3);
  margin: 0 0 8px;
}
.notes-drawer .nd-title {
  font-size: 22px;
  color: var(--text-0);
  font-weight: 600;
  margin: 0 0 24px;
  line-height: 1.2;
}
.notes-drawer .nd-section { margin-bottom: 28px; }
.notes-drawer .nd-section p { margin-bottom: 10px; }
.notes-drawer .nd-section .verbal {
  font-style: italic;
  color: var(--text-0);
  border-left: 2px solid var(--red-3);
  padding-left: 14px;
}
.notes-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  background: var(--ink-3);
  border: 1px solid var(--ink-5);
  color: var(--text-1);
  padding: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
}
.notes-toggle:hover { background: var(--red-deep); color: var(--text-0); border-color: var(--red-2); }

/* === Glow utility === */
.glow {
  filter: drop-shadow(0 0 12px var(--red-glow));
}

/* === Fade utilities === */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fadeIn { animation: fadeIn calc(0.6s / var(--anim-speed)) ease both; }

/* === Layout helpers === */
.row { display: flex; gap: var(--s-6); }
.col { display: flex; flex-direction: column; gap: var(--s-5); }
.fill { flex: 1; }
.center { display: flex; align-items: center; justify-content: center; }

/* HR */
hr.rule {
  border: 0;
  border-top: 1px solid var(--ink-4);
  margin: var(--s-5) 0;
}
