/* Snapshot — Design Tokens & Base Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Primary palette — white & green */
  --green: #16a34a;
  --green-dark: #15803d;
  --green-light: #22c55e;
  --green-glow: rgba(22, 163, 74, 0.35);

  --dark: #1a1a1a;
  --dark-soft: #2a2a2a;

  --orange: #f97316;
  --orange-hover: #ea580c;

  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  --bg-gray: #f3f4f6;
  --bg-card: #ffffff;

  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  --border-light: #e5e7eb;
  --border-medium: #d1d5db;

  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.03);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;

  --page-px: clamp(24px, 4vw, 80px);
}

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

html {
  scroll-behavior: smooth;
  font-size: min(18px, calc(0.875rem + 0.2vw));
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-white);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  text-wrap: balance;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--green-dark); }

code, .mono {
  font-family: 'IBM Plex Mono', monospace;
}

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  padding: 0 var(--page-px);
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* Score color classes */
.score-fatal { color: #ef4444; }
.score-poor { color: #f97316; }
.score-fair { color: #eab308; }
.score-good { color: #22c55e; }
.score-excellent { color: #16a34a; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: white;
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Loading spinner */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(22, 163, 74, 0.2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Fade in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn 0.7s ease-out both;
}

/* In-view reveal — triggered by scroll observer */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Shared nav logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--green);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: white;
}

.nav-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.footer-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
