/* ============================================
   SHARED.CSS — Canonical Redshift Design System
   One file, one set of variable names, two themes.
   ============================================ */

/* --- Fonts (loaded once) --- */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,300;0,400;0,600;0,700;1,800;1,900&family=IBM+Plex+Mono:wght@300;400;500;600&family=Outfit:wght@200;300;400;500;600;700&display=swap');

/* --- Brand constants (theme-independent) --- */
:root {
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.12);
  --red-glow: rgba(220, 38, 38, 0.06);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.1);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.1);
  --blue: #2563eb;
  --blue-dim: rgba(37, 99, 235, 0.1);
  --gray: #6b7280;
  --gray-dim: rgba(107, 114, 128, 0.1);
}

/* --- Light theme --- */
[data-theme="light"] {
  --bg-body: #f2f1ec;
  --bg-card: #ffffff;
  --bg-card-alt: #fafaf8;
  --bg-input: #f5f5f0;
  --border-dim: #ddd9d0;
  --border-mid: #ccc8be;
  --text-primary: #1a1a18;
  --text-secondary: #5a5a55;
  --text-muted: #9a9a92;
  --logo-main: #1a1a18;
  --scanline-color: rgba(0,0,0,0.015);
  --grid-color: rgba(0,0,0,0.03);
}

/* --- Dark theme --- */
[data-theme="dark"] {
  --bg-body: #0a0a0a;
  --bg-card: #111111;
  --bg-card-alt: #161616;
  --bg-input: #1a1a1a;
  --border-dim: #1f1f1f;
  --border-mid: #333333;
  --text-primary: #e8e8e3;
  --text-secondary: #8a8a82;
  --text-muted: #4a4a45;
  --logo-main: #f5f5f0;
  --scanline-color: rgba(255,255,255,0.008);
  --grid-color: rgba(255,255,255,0.02);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* --- Scanline overlay --- */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    var(--scanline-color) 2px, var(--scanline-color) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ============================================
   NAV BAR
   ============================================ */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 60px;
  border-bottom: 1px solid var(--border-dim);
  background: var(--bg-card);
}

.nav-left { display: flex; align-items: center; gap: 16px; }

.nav-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo .red { color: var(--red); }

.nav-divider { width: 1px; height: 16px; background: var(--border-dim); }

.nav-links { display: flex; gap: 2px; }

.nav-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}

.nav-link:hover { color: var(--text-primary); background: var(--border-dim); }
.nav-link.active { color: var(--red); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 12px; }

.nav-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.08);
}

/* --- Theme toggle --- */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border-dim);
  padding: 5px 12px;
  transition: all 0.2s;
}

.theme-toggle:hover {
  border-color: var(--border-mid);
  color: var(--text-secondary);
}

/* --- Burger menu --- */
.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: 60px 60px 40px;
  max-width: 900px;
}

.hero-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 48px;
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 20px;
}

.hero h1 .red { color: var(--red); }

.hero p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.hero p strong {
  font-weight: 500;
  color: var(--text-primary);
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  margin: 0 60px;
  height: 1px;
  background: var(--border-dim);
}

/* ============================================
   SECTION LABEL
   ============================================ */
.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ============================================
   DEADLINE BANNER
   ============================================ */
.deadline-banner {
  background: linear-gradient(90deg, #b71c1c 0%, #d32f2f 50%, #b71c1c 100%);
  color: #fff;
  text-align: center;
  padding: 6px 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  z-index: 101;
  display: none;
}

.deadline-banner .deadline-clock {
  font-size: 14px;
  margin: 0 8px;
}

.deadline-banner .deadline-label {
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* ============================================
   BOTTOM BAR (Footer)
   ============================================ */
.bottom-bar {
  position: relative;
  border-top: 1px solid var(--border-dim);
  background: var(--bg-card);
  padding: 16px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.bottom-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ============================================
   EMPTY / LOADING STATES
   ============================================ */
.loading-spinner {
  text-align: center;
  padding: 40px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.empty-state-desc {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { opacity: 0; animation: fade-up 0.5s ease forwards; }
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================
   RESPONSIVE — NAV
   ============================================ */
@media (max-width: 768px) {
  .burger-btn { display: block; }
  .nav-bar { position: relative; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-dim);
    flex-direction: column;
    padding: 4px 0 8px;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 24px; display: block; }
  .nav-divider { display: none; }
  .theme-toggle { display: none; }
}

/* ============================================
   RESPONSIVE — CONTENT PADDING
   ============================================ */
@media (max-width: 1024px) {
  .nav-bar { padding: 12px 32px; }
  .hero { padding: 40px 32px 32px; }
  .divider { margin-left: 32px; margin-right: 32px; }
  .hero h1 { font-size: 36px; }
  .bottom-bar { padding: 16px 32px; }
}

@media (max-width: 640px) {
  .nav-bar { padding: 10px 20px; }
  .nav-logo { font-size: 14px; }
  .hero { padding: 28px 20px 24px; }
  .hero h1 { font-size: 28px; }
  .divider { margin-left: 20px; margin-right: 20px; }
  .bottom-bar { padding: 16px 20px; }
}
