/**
 * ARIA Story — Shared Design System
 * Claude Code-inspired dark aesthetic with zinc/cyan palette.
 * All pages link to this file for consistent styling.
 */

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

/* ── Variables ── */
:root {
  --bg-deep: #0a0a0c;
  --bg-card: #111114;
  --bg-card-hover: #161619;
  --bg-surface: #0e0e11;
  --border: rgba(63, 63, 70, 0.5);
  --border-hover: rgba(63, 63, 70, 0.8);
  --border-accent: rgba(34, 211, 238, 0.2);

  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-dim: #52525b;

  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.1);
  --cyan-glow: rgba(34, 211, 238, 0.15);
  --emerald: #34d399;
  --emerald-dim: rgba(52, 211, 153, 0.1);
  --violet: #8b5cf6;
  --violet-dim: rgba(139, 92, 246, 0.1);
  --amber: #fbbf24;
  --amber-dim: rgba(251, 191, 36, 0.1);
  --rose: #fb7185;
  --rose-dim: rgba(251, 113, 133, 0.1);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.1);
  --orange: #fb923c;
  --orange-dim: rgba(251, 146, 60, 0.1);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --max-width: 1200px;
  --nav-height: 48px;
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-height);
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #67e8f9; }

/* ── Typography ── */
h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
  border-bottom: 1px solid rgba(63, 63, 70, 0.2);
}
.section:last-child { border-bottom: none; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 0 3rem;
  position: relative;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.hero .subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--border-accent);
  margin-bottom: 1.5rem;
}

.hero .badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Section Headers ── */
.section-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}
.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-grid {
  display: grid;
  gap: 1rem;
}
.card-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card .card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.card .card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card .card-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Accent Cards (colored left border) ── */
.card.accent-cyan { border-left: 3px solid var(--cyan); }
.card.accent-emerald { border-left: 3px solid var(--emerald); }
.card.accent-violet { border-left: 3px solid var(--violet); }
.card.accent-amber { border-left: 3px solid var(--amber); }
.card.accent-rose { border-left: 3px solid var(--rose); }
.card.accent-blue { border-left: 3px solid var(--blue); }
.card.accent-orange { border-left: 3px solid var(--orange); }

/* ── Stat Cards ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-card .stat-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

/* Colored stat values */
.stat-card .stat-value.cyan { color: var(--cyan); }
.stat-card .stat-value.emerald { color: var(--emerald); }
.stat-card .stat-value.violet { color: var(--violet); }
.stat-card .stat-value.amber { color: var(--amber); }
.stat-card .stat-value.rose { color: var(--rose); }
.stat-card .stat-value.blue { color: var(--blue); }

/* ── Pipeline / Flow ── */
.pipeline {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.pipeline .stage {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem;
  position: relative;
  text-align: center;
}
.pipeline .stage:first-child { border-radius: 12px 0 0 12px; }
.pipeline .stage:last-child { border-radius: 0 12px 12px 0; }
.pipeline .stage + .stage { border-left: none; }

.pipeline .stage .stage-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.pipeline .stage .stage-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.pipeline .stage .stage-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Tags / Badges ── */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.tag.cyan { color: var(--cyan); background: var(--cyan-dim); }
.tag.emerald { color: var(--emerald); background: var(--emerald-dim); }
.tag.violet { color: var(--violet); background: var(--violet-dim); }
.tag.amber { color: var(--amber); background: var(--amber-dim); }
.tag.rose { color: var(--rose); background: var(--rose-dim); }
.tag.blue { color: var(--blue); background: var(--blue-dim); }

/* ── Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(63, 63, 70, 0.15);
}
.data-table tr:hover td {
  background: var(--bg-card);
}

/* ── Bar Chart ── */
.bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.bar-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  min-width: 120px;
  text-align: right;
}
.bar-track {
  flex: 1;
  height: 8px;
  background: rgba(63, 63, 70, 0.3);
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--cyan);
  animation: barGrow 1.5s ease-out;
  transform-origin: left;
}
.bar-value {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 50px;
}

/* ── Status Dots ── */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.green { background: var(--emerald); box-shadow: 0 0 8px rgba(52, 211, 153, 0.4); }
.status-dot.amber { background: var(--amber); box-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
.status-dot.red { background: var(--rose); box-shadow: 0 0 8px rgba(251, 113, 133, 0.4); }

/* ── Inline Stat ── */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
}
.stat-row .label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.stat-row .value {
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid rgba(63, 63, 70, 0.2);
  margin-top: 2rem;
}
.site-footer p {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ── Animations ── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

@keyframes barGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  .pipeline { flex-direction: column; }
  .pipeline .stage { border-radius: 0; }
  .pipeline .stage:first-child { border-radius: 12px 12px 0 0; }
  .pipeline .stage:last-child { border-radius: 0 0 12px 12px; }
  .pipeline .stage + .stage { border-left: 1px solid var(--border); border-top: none; }
  .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2rem; }
  .section { padding: 2.5rem 0; }
}

/* ── Print ── */
@media print {
  body { background: #fff !important; color: #000 !important; padding-top: 0; }
  .card { border: 1px solid #ddd !important; background: #f9f9f9 !important; }
  nav, .site-footer { display: none !important; }
}
