/* Ceasul care iartă tot: Matematica impunității în justiția română */
/* Conformează cu regulile de contrast WCAG AAA, dual-theme și zero culori inline hardcodate */

:root {
  --bg-canvas: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-card: #131b2e;
  --bg-card-hover: #1c2742;
  --bg-input: #0b1120;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-invert: #090d16;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-accent: rgba(249, 115, 22, 0.4);
  
  --accent-primary: #f97316;
  --accent-primary-hover: #ea580c;
  --accent-alert: #ef4444;
  --accent-alert-bg: rgba(239, 68, 68, 0.15);
  --accent-success: #10b981;
  --accent-success-bg: rgba(16, 185, 129, 0.15);
  --accent-gold: #f59e0b;
  --accent-gold-bg: rgba(245, 158, 11, 0.15);
  --accent-blue: #38bdf8;
  --accent-blue-bg: rgba(56, 189, 248, 0.15);
  
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --max-width: 1180px;
}

[data-theme="light"] {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  
  --text-primary: #090d16;
  --text-secondary: #1e293b;
  --text-muted: #475569;
  --text-invert: #f8fafc;
  
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-accent: rgba(234, 88, 12, 0.4);
  
  --accent-primary: #c2410c;
  --accent-primary-hover: #9a3412;
  --accent-alert: #dc2626;
  --accent-alert-bg: #fef2f2;
  --accent-success: #059669;
  --accent-success-bg: #ecfdf5;
  --accent-gold: #d97706;
  --accent-gold-bg: #fffbeb;
  --accent-blue: #0284c7;
  --accent-blue-bg: #f0f9ff;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

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

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Skip link accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Layout Shell */
.shell {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
}

.brand-badge {
  background-color: var(--accent-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-sub {
  color: var(--text-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--accent-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Typography Base */
h1, h2, h3, h4 {
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
}

p.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 400;
  max-width: 860px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.05) 0%, transparent 60%);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--accent-primary);
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-primary);
}

/* Stat Grid Cards */
.stats-banner {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.stat-card.alert-card {
  border-left: 4px solid var(--accent-alert);
}

.stat-card.gold-card {
  border-left: 4px solid var(--accent-gold);
}

.stat-card.blue-card {
  border-left: 4px solid var(--accent-blue);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.stat-caption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Content Sections */
.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-intro {
  max-width: 820px;
  margin-bottom: 2.5rem;
}

/* Simulator Section */
.simulator-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.sim-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sim-select-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 280px;
  flex: 1;
}

.sim-select-group label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sim-select {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.sim-select:focus {
  border-color: var(--accent-primary);
}

.sim-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.control-item {
  background-color: var(--bg-surface-elevated);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.control-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.control-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.control-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.slider-input {
  width: 100%;
  height: 6px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  outline: none;
  -webkit-appearance: none;
  margin: 0.75rem 0 0.5rem;
  cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
  transition: transform 0.1s ease;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.control-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

/* Dynamic Timeline Visualization */
.timeline-viz-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.timeline-viz-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clock-bar-container {
  position: relative;
  height: 48px;
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-strong);
}

.clock-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #f59e0b 60%, #ef4444 100%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.75rem;
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.limit-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #ffffff;
  z-index: 10;
  box-shadow: 0 0 6px #ffffff;
}

.limit-marker-label {
  position: absolute;
  top: -24px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.marker-general {
  background-color: var(--accent-alert);
  color: #ffffff;
}

.marker-special {
  background-color: var(--accent-blue);
  color: #ffffff;
}

.sim-verdict-panel {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.sim-verdict-panel.verdict-prescris {
  background-color: var(--accent-alert-bg);
  border: 1px solid var(--accent-alert);
}

.sim-verdict-panel.verdict-activ {
  background-color: var(--accent-success-bg);
  border: 1px solid var(--accent-success);
}

.verdict-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.verdict-text h4 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.verdict-prescris .verdict-text h4 {
  color: var(--accent-alert);
}

.verdict-activ .verdict-text h4 {
  color: var(--accent-success);
}

.verdict-text p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Case Registry */
.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input {
  width: 100%;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--accent-primary);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.filter-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  background-color: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
}

.case-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.case-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.case-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.case-name {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.case-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.badge-prescris {
  background-color: var(--accent-alert-bg);
  color: var(--accent-alert);
  border: 1px solid var(--accent-alert);
}

.case-role {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.case-dossier-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.dossier-label {
  color: var(--text-muted);
}

.dossier-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.case-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 1rem 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
}

.case-civil {
  font-size: 0.75rem;
  color: var(--accent-gold);
  background-color: var(--accent-gold-bg);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-top: auto;
}

/* Timeline 1456 Days */
.chronology-list {
  position: relative;
  padding-left: 2rem;
  margin-top: 2rem;
}

.chronology-list::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--border-strong);
}

.chronology-item {
  position: relative;
  margin-bottom: 2.25rem;
}

.chrono-dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-canvas);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 0 3px var(--bg-canvas);
}

.chrono-date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.chrono-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.chrono-body {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.chrono-impact {
  font-size: 0.8125rem;
  color: var(--text-muted);
  background-color: var(--bg-surface-elevated);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-gold);
}

/* Narrative deep-dive */
.prose-block {
  max-width: 820px;
  font-size: 1.125rem;
  line-height: 1.75;
}

.prose-block p {
  margin-bottom: 1.5rem;
}

.prose-block strong {
  color: var(--text-primary);
}

.callout-box {
  background-color: var(--bg-surface-elevated);
  border-left: 4px solid var(--accent-primary);
  padding: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0;
  font-size: 1rem;
}

.callout-box h4 {
  color: var(--accent-primary);
  font-size: 1rem;
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

/* Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2.5rem;
  margin-top: auto;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-inner {
    height: auto;
    padding: 0.85rem 0;
    flex-wrap: wrap;
  }
  
  .nav-links {
    display: none; /* Mobile navigation simplified */
  }
  
  .hero-section {
    padding: 2.5rem 0 2rem;
  }
  
  .simulator-box {
    padding: 1.25rem;
  }
  
  .cases-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-grid {
    grid-template-columns: 1fr;
  }
}
