/* ---------------------------------------------------------------
   Datalygence — Business demos landing page (/demos/)
   Brand blue, matches templates/core/index.html + chat/static/chat/chat.css
   tokens. Scoped to this page only -- do NOT reuse UFS Pulse (green) tokens.
   --------------------------------------------------------------- */

:root {
  --background: hsl(210 20% 98%);
  --foreground: #0c1426;
  --muted-foreground: #5b6b85;
  --card: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-hover: #bfdbfe;
  --primary: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent-a: #3b82f6;
  --accent-b: #1e40af;
  --shadow-card: 0 2px 12px -2px rgba(20, 24, 31, 0.08);
  --shadow-card-hover: 0 12px 28px -8px rgba(29, 78, 216, 0.22);
  --radius-lg: 16px;
  --radius-md: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ---------------- Header ---------------- */
.demos-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.demos-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.demos-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demos-brand__mark svg {
  display: block;
  width: 28px;
  height: 28px;
}

.demos-brand__word {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.demos-header__back {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.demos-header__back:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

/* ---------------- Main / intro ---------------- */
.demos-main__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px 72px 24px;
}

.demos-intro {
  max-width: 640px;
  margin: 0 0 40px 0;
}

.demos-intro__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.demos-intro h1 {
  margin: 0 0 12px 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--foreground);
}

.demos-intro p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted-foreground);
}

/* ---------------- Card grid ---------------- */
.demos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.demo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 220px;
  box-shadow: var(--shadow-card);
}

.demo-card__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  font-size: 26px;
  line-height: 1;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  margin-bottom: 16px;
}

.demo-card__name {
  margin: 0 0 8px 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--foreground);
}

.demo-card__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted-foreground);
  flex: 1 1 auto;
}

/* --- Live cards: whole card is a link, clear affordance + hover --- */
.demo-card--live {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.demo-card--live:hover,
.demo-card--live:focus-visible {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.demo-card--live:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.demo-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
}

.demo-card__arrow {
  transition: transform 0.18s ease;
}

.demo-card--live:hover .demo-card__arrow,
.demo-card--live:focus-visible .demo-card__arrow {
  transform: translateX(3px);
}

.demo-card__status-dot {
  position: absolute;
  top: 24px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #16a34a;
}

.demo-card__status-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

/* --- Coming-soon cards: visibly disabled, no link --- */
.demo-card--disabled {
  background: #f8fafc;
  border-style: dashed;
}

.demo-card--disabled .demo-card__logo {
  background: #eef1f5;
  filter: grayscale(0.4);
  opacity: 0.7;
}

.demo-card--disabled .demo-card__name,
.demo-card--disabled .demo-card__desc {
  color: var(--muted-foreground);
  opacity: 0.85;
}

.demo-card__badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #64748b;
  background: #e2e8f0;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 640px) {
  .demos-grid {
    grid-template-columns: 1fr;
  }

  .demos-intro h1 {
    font-size: 28px;
  }

  .demos-header__back span {
    display: none;
  }
}
