/* ==========================================================================
   MNI Corp — Investor Pitch Deck Stylesheet
   Corporate Brand Identity: Deep Obsidian, Signal Red, Pure White, Element Accents
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand Colors */
  --mni-red: #EC2127;
  --mni-red-bright: #FF383F;
  --mni-red-glow: rgba(236, 33, 39, 0.35);
  --mni-red-soft: rgba(236, 33, 39, 0.12);

  --mni-slate: #77787B;
  --mni-slate-light: #9DA3AE;
  --mni-slate-dark: #333842;

  /* Elemental & Metallurgy Accents */
  --accent-gold: #F59E0B;
  --accent-gold-glow: rgba(245, 158, 11, 0.25);
  --accent-cyan: #06B6D4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-emerald: #10B981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-purple: #A855F7;

  /* Surfaces */
  --bg-deep: #07080B;
  --bg-surface: #0E1118;
  --bg-card: rgba(18, 22, 31, 0.75);
  --bg-card-hover: rgba(24, 30, 42, 0.9);
  --bg-glass: rgba(14, 17, 24, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-red: rgba(236, 33, 39, 0.45);
  --border-gold: rgba(245, 158, 11, 0.35);
  --border-cyan: rgba(6, 182, 212, 0.35);

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --text-white: #FFFFFF;
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Presentation Viewport Wrapper */
.deck-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 15%, #151a24 0%, #08090d 75%, #050608 100%);
  user-select: none;
}

/* Subtle background particle grid */
.deck-viewport::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Top Header Bar */
.deck-header {
  position: relative;
  z-index: 10;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(7, 8, 11, 0.85);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
}

.deck-context-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mni-slate-light);
}

.deck-context-title span {
  color: var(--mni-red);
}

/* Header Controls */
.deck-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.deck-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.deck-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-white);
  border-color: var(--border-medium);
}

.deck-btn-primary {
  background: var(--mni-red);
  color: white;
  border-color: var(--mni-red);
}

.deck-btn-primary:hover {
  background: var(--mni-red-bright);
  border-color: var(--mni-red-bright);
  box-shadow: 0 0 15px var(--mni-red-glow);
}

.slide-counter {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text-white);
  padding: 0.35rem 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.slide-counter .current-num {
  color: var(--mni-red-bright);
  font-weight: 700;
}

/* Stage & Slides Container */
.deck-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow: hidden;
  z-index: 1;
}

/* Slide Canvas (Standard 16:9 ratio locked) */
.slide {
  position: absolute;
  width: min(94vw, calc((90vh - 80px) * (16 / 9)));
  height: min(calc(94vw * (9 / 16)), calc(90vh - 80px));
  max-width: 1400px;
  max-height: 787.5px;
  background: linear-gradient(145deg, rgba(16, 20, 28, 0.95) 0%, rgba(10, 12, 18, 0.98) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: none;
  flex-direction: column;
  padding: 2.2rem 2.75rem;
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  user-select: text;
}

.slide.active {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
  z-index: 5;
}

/* Ambient Corner Glow */
.slide::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--mni-red-soft) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Slide Header */
.slide-top {
  position: relative;
  z-index: 2;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.slide-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mni-red);
  margin-bottom: 0.45rem;
}

.slide-category-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mni-red);
  box-shadow: 0 0 8px var(--mni-red);
}

.slide-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-white);
  letter-spacing: -0.02em;
}

.slide-subtitle {
  font-size: clamp(0.88rem, 1.1vw, 1.05rem);
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
  font-weight: 400;
}

/* Slide Body / Content Layouts */
.slide-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

/* Grids & Cards */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  height: 100%;
  align-items: stretch;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  height: 100%;
  align-items: stretch;
}

.grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  height: 100%;
  align-items: stretch;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.card-accent-red {
  border-top: 3px solid var(--mni-red);
}

.card-accent-gold {
  border-top: 3px solid var(--accent-gold);
}

.card-accent-cyan {
  border-top: 3px solid var(--accent-cyan);
}

.card-accent-emerald {
  border-top: 3px solid var(--accent-emerald);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.6rem;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

/* Stat & Metric Boxes */
.metric-box {
  display: flex;
  flex-direction: column;
  padding: 1.1rem;
  background: rgba(10, 13, 19, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.metric-val {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--text-white);
  margin-bottom: 0.35rem;
}

.metric-val.red { color: var(--mni-red-bright); }
.metric-val.gold { color: var(--accent-gold); }
.metric-val.cyan { color: var(--accent-cyan); }
.metric-val.emerald { color: var(--accent-emerald); }

.metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
  font-family: var(--font-mono);
}

/* Data Table Component */
.deck-table-wrapper {
  background: rgba(12, 15, 22, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.deck-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

.deck-table th {
  background: rgba(22, 27, 38, 0.85);
  padding: 0.5rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.deck-table td {
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-size: 0.82rem;
  vertical-align: middle;
}

.deck-table tr:last-child td {
  border-bottom: none;
}

.deck-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.deck-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.badge-red { background: var(--mni-red-soft); color: var(--mni-red-bright); border: 1px solid var(--border-red); }
.badge-gold { background: rgba(245, 158, 11, 0.12); color: var(--accent-gold); border: 1px solid var(--border-gold); }
.badge-cyan { background: rgba(6, 182, 212, 0.12); color: var(--accent-cyan); border: 1px solid var(--border-cyan); }
.badge-emerald { background: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.35); }

/* Flowchart / Step Pipeline */
.pipeline-row {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}

.pipeline-step {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.15rem 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pipeline-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mni-red-bright);
  margin-bottom: 0.4rem;
}

.pipeline-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.35rem;
}

.pipeline-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.pipeline-arrow {
  color: var(--mni-slate);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Comparison Layout */
.comp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  height: 100%;
}

.comp-panel {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.comp-panel.legacy {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.05) 0%, rgba(18, 22, 31, 0.8) 100%);
}

.comp-panel.mni {
  border: 1px solid var(--border-red);
  background: linear-gradient(180deg, rgba(236, 33, 39, 0.08) 0%, rgba(18, 22, 31, 0.9) 100%);
  box-shadow: 0 0 20px rgba(236, 33, 39, 0.1);
}

.comp-header {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.comp-panel.legacy .comp-header { color: #FCA5A5; }
.comp-panel.mni .comp-header { color: var(--text-white); }

.comp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.comp-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.comp-item svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* Bottom Deck Navigation Bar */
.deck-footer {
  position: relative;
  z-index: 10;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  background: rgba(7, 8, 11, 0.9);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.deck-nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-arrow-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.nav-arrow-btn:hover:not(:disabled) {
  background: var(--mni-red);
  border-color: var(--mni-red);
  color: white;
  box-shadow: 0 0 15px var(--mni-red-glow);
}

.nav-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.deck-shortcut-hint {
  font-size: 0.76rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.deck-shortcut-hint kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
  color: var(--text-muted);
}

/* Progress Bar */
.deck-progress-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.deck-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--mni-red) 0%, var(--mni-red-bright) 100%);
  box-shadow: 0 0 10px var(--mni-red);
  width: 8.33%;
  transition: width 0.3s ease;
}

/* Slide Grid Drawer Modal */
.deck-drawer-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 2.5rem;
  overflow-y: auto;
}

.deck-drawer-modal.open {
  display: flex;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  max-width: 1300px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
}

.drawer-close-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover {
  background: var(--mni-red);
  border-color: var(--mni-red);
  color: white;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
}

.drawer-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.drawer-item:hover {
  border-color: var(--mni-red);
  background: rgba(236, 33, 39, 0.08);
  transform: translateY(-2px);
}

.drawer-item.active {
  border-color: var(--mni-red);
  box-shadow: 0 0 15px var(--mni-red-glow);
}

.drawer-item-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mni-red);
  margin-bottom: 0.4rem;
}

.drawer-item-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
  line-height: 1.3;
}

/* Print Styles for PDF Export */
@media print {
  html, body {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    background: #07080B !important;
    color: #F1F5F9 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .deck-header, .deck-footer, .deck-drawer-modal {
    display: none !important;
  }

  .deck-viewport {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    background: #07080B !important;
  }

  .deck-stage {
    display: block !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .slide {
    display: flex !important;
    opacity: 1 !important;
    transform: none !important;
    width: 100vw !important;
    height: 56.25vw !important; /* Strict 16:9 ratio */
    max-width: none !important;
    max-height: none !important;
    page-break-after: always !important;
    break-after: page !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 3rem !important;
    background: #0A0D14 !important;
  }
}

/* Presentation Image Styles */
.slide-photo-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: rgba(10, 13, 20, 0.9);
  display: flex;
  flex-direction: column;
}

.slide-photo-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.photo-caption {
  padding: 0.5rem 0.75rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(14, 18, 26, 0.95);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.flowsheet-viewer {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  height: 100%;
  max-height: 530px;
  padding: 8px;
  overflow: hidden;
}

.flowsheet-viewer img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
}
