/* === DEALPIPE THEME === */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #050D1A;
  --bg-2: #081020;
  --bg-3: #0C1A2E;
  --fg: #E8F0FE;
  --fg-2: #8AA3C0;
  --fg-3: #5A7A9E;
  --teal: #00E5CC;
  --teal-dim: rgba(0, 229, 204, 0.12);
  --amber: #FFB547;
  --amber-dim: rgba(255, 181, 71, 0.12);
  --border: rgba(0, 229, 204, 0.1);
  --border-2: rgba(0, 229, 204, 0.06);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === NAV === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 40px;
  background: rgba(5, 13, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-2);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--teal); }
.nav-tagline { font-size: 13px; color: var(--fg-3); letter-spacing: 0.02em; }

/* === HERO === */
.hero {
  padding: 120px 40px 80px;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-dim);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 24px;
}
.hero-accent { color: var(--teal); }
.hero-lede {
  font-size: 18px;
  color: var(--fg-2);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 40px;
}
.hero-stats {
  display: flex;
  gap: 40px;
}
.hero-stat { display: flex; flex-direction: column; gap: 4px; }
.stat-val { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--teal); }
.stat-label { font-size: 12px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.05em; }

/* Hero Visual */
.hero-visual { display: flex; flex-direction: column; gap: 24px; }
.map-container {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}
.ontario-map { width: 100%; height: auto; }
.ontario-shape { filter: drop-shadow(0 0 8px rgba(0, 229, 204, 0.15)); }
.marker-label { font-family: 'DM Sans', sans-serif; font-size: 9px; fill: var(--teal); font-weight: 600; }
.marker-tag { font-family: 'DM Sans', sans-serif; font-size: 7px; fill: var(--teal); }
.live-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 229, 204, 0.08);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--teal);
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

/* Alert Feed */
.alert-feed {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.feed-header {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  border-bottom: 1px solid var(--border-2);
}
.feed-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-2);
  transition: background 0.15s;
}
.feed-item:last-child { border-bottom: none; }
.feed-item--new { background: rgba(0, 229, 204, 0.04); }
.feed-item:hover { background: rgba(0, 229, 204, 0.03); }
.feed-sector {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 4px;
}
.feed-name { font-size: 13px; font-weight: 500; color: var(--fg); margin-bottom: 6px; }
.feed-meta { display: flex; justify-content: space-between; align-items: center; }
.feed-value { font-size: 12px; font-weight: 600; color: var(--amber); }
.feed-stage {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  background: var(--bg-3);
  padding: 2px 7px;
  border-radius: 100px;
}

/* === PROBLEM === */
.problem { padding: 100px 40px; }
.problem-inner { max-width: 1200px; margin: 0 auto; }
.problem-label, .features-label, .sources-label, .manifesto-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 16px;
}
.problem-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 60px;
  max-width: 700px;
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
}
.problem-card {
  background: var(--bg);
  padding: 36px 32px;
  transition: background 0.2s;
}
.problem-card:hover { background: var(--bg-2); }
.problem-icon { margin-bottom: 20px; }
.problem-card h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.problem-card p { font-size: 15px; color: var(--fg-2); line-height: 1.65; }
.problem-quote {
  border-left: 2px solid var(--teal);
  padding-left: 28px;
}
.problem-quote p { font-size: 18px; color: var(--fg-2); font-style: italic; line-height: 1.6; }

/* === SOURCES === */
.sources { padding: 80px 40px; background: var(--bg-2); }
.sources-inner { max-width: 1200px; margin: 0 auto; }
.sources-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 52px;
}
.sources-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.source-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg-2);
}
.source-logo {
  width: 36px; height: 36px;
  background: var(--teal-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* === FEATURES === */
.features { padding: 100px 40px; }
.features-inner { max-width: 1200px; margin: 0 auto; }
.features-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 52px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 28px 28px 32px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}
.feature-icon-wrap {
  width: 52px; height: 52px;
  background: var(--teal-dim);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--fg-2); line-height: 1.65; }

/* === MANIFESTO === */
.manifesto { padding: 100px 40px; background: var(--bg-2); }
.manifesto-inner { max-width: 1200px; margin: 0 auto; }
.manifesto-content { max-width: 780px; margin-bottom: 52px; }
.manifesto-content blockquote {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--fg);
  margin-bottom: 28px;
  border-left: 3px solid var(--teal);
  padding-left: 28px;
}
.manifesto-content p { font-size: 16px; color: var(--fg-2); line-height: 1.75; margin-bottom: 16px; }
.manifesto-stats {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.m-stat {
  flex: 1;
  padding: 28px 32px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.m-stat:last-child { border-right: none; }
.m-val { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--teal); margin-bottom: 6px; }
.m-label { font-size: 12px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.05em; }

/* === CLOSING === */
.closing { padding: 120px 40px; text-align: center; }
.closing-inner { max-width: 640px; margin: 0 auto; }
.closing-ring { margin: 0 auto 48px; display: inline-block; }
.closing-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.closing-body { font-size: 17px; color: var(--fg-2); line-height: 1.7; margin-bottom: 16px; }
.closing-body--small { font-size: 14px; color: var(--fg-3); }

/* === FOOTER === */
.footer { padding: 48px 40px; border-top: 1px solid var(--border-2); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-name { font-family: var(--font-display); font-weight: 700; color: var(--teal); font-size: 16px; }
.footer-tagline { font-size: 13px; color: var(--fg-3); flex: 1; }
.footer-copy { font-size: 12px; color: var(--fg-3); }

/* === DASHBOARD === */
.dashboard {
  padding: 90px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}
.dash-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 8px;
}
.dash-subtitle { font-size: 14px; color: var(--fg-3); }
.dash-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.dash-refresh-btn:hover { background: rgba(0,229,204,0.2); border-color: var(--teal); }
.dash-refresh-btn.loading { opacity: 0.6; pointer-events: none; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.stat-card__val {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 4px;
}
.stat-card__val--amber { color: var(--amber); }
.stat-card__label { font-size: 12px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.05em; }

/* Source status indicators */
.sources-section { margin-bottom: 32px; }
.sources-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  margin-bottom: 12px;
}
.sources-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.source-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 220px;
}
.source-chip__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.source-chip__dot--ok { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.source-chip__dot--error { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.4); }
.source-chip__dot--checking { background: var(--amber); animation: pulse-dot 1s infinite; }
.source-chip__dot--disabled { background: var(--fg-3); }
.source-chip__name { font-size: 13px; font-weight: 600; color: var(--fg); }
.source-chip__meta { font-size: 11px; color: var(--fg-3); }
.source-chip__time { font-size: 10px; color: var(--fg-3); margin-left: auto; white-space: nowrap; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar__label {
  font-size: 12px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.filter-select {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--fg);
  font-family: var(--font-body);
  cursor: pointer;
  min-width: 160px;
}
.filter-select:focus { outline: none; border-color: var(--border); }

/* Deal table */
.deal-table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
}
table.deal-table {
  width: 100%;
  border-collapse: collapse;
}
table.deal-table thead tr {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border-2);
}
table.deal-table th {
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  text-align: left;
}
table.deal-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-2);
  font-size: 13px;
  color: var(--fg);
  vertical-align: middle;
}
table.deal-table tr:last-child td { border-bottom: none; }
table.deal-table tbody tr:hover { background: rgba(0,229,204,0.03); }
.deal-name { font-weight: 600; color: var(--fg); margin-bottom: 2px; max-width: 300px; }
.deal-source { font-size: 11px; color: var(--fg-3); }
.sector-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.stage-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid rgba(255,181,71,0.15);
  white-space: nowrap;
}
.size-label { font-size: 13px; font-weight: 600; color: var(--amber); }
.date-label { font-size: 12px; color: var(--fg-3); }
.empty-state {
  padding: 60px 40px;
  text-align: center;
  color: var(--fg-3);
}
.empty-state__icon { font-size: 40px; margin-bottom: 16px; opacity: 0.4; }
.empty-state__title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--fg-2); margin-bottom: 8px; }
.empty-state__body { font-size: 14px; color: var(--fg-3); }

/* Loading spinner */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(0,229,204,0.2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .hero-stats { gap: 24px; }
  .problem-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .sources-grid { grid-template-columns: repeat(2, 1fr); }
  .manifesto-stats { flex-direction: column; }
  .m-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .m-stat:last-child { border-bottom: none; }
}
@media (max-width: 600px) {
  .hero { padding: 100px 24px 60px; }
  .problem, .features, .manifesto, .closing { padding: 60px 24px; }
  .sources { padding: 60px 24px; }
  .nav { padding: 0 24px; }
  .nav-tagline { display: none; }
  .sources-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
