/* Base Design Guidelines Implementation */
/* Using semantic color tokens for light/dark themes */

:root {
  /* Light theme colors */
  --color-primary: #2E7BC3;
  --color-primary-hover: #2563a8;
  --color-secondary: #6c757d;
  --color-background: #ffffff;
  --color-surface: #f8f9fa;
  --color-text: #1a1a1a;
  --color-text-secondary: #6c757d;
  --color-border: #e0e0e0;
  --color-error: #b72b38;
  --color-success: #127f31;
  --color-warning: #C29010;
  
  /* Spacing - 8px base unit */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
  
  /* Touch targets - minimum 44px */
  --touch-target-min: 44px;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark theme colors */
    --color-primary: #2E7BC3;
    --color-primary-hover: #3d8dd4;
    --color-secondary: #9ca3af;
    --color-background: #0a0a0a;
    --color-surface: #1a1a1a;
    --color-text: #f5f5f5;
    --color-text-secondary: #9ca3af;
    --color-border: #2a2a2a;
    --color-error: #b72b38;
    --color-success: #127f31;
    --color-warning: #C29010;
  }
}

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

html {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  min-height: 100vh;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: var(--spacing-md);
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-2xl);
}

h2 {
  font-size: var(--font-size-xl);
}

h3 {
  font-size: var(--font-size-lg);
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text);
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target-min);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-background);
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  touch-action: manipulation;
}

.button:hover {
  background-color: var(--color-primary-hover);
}

.button:active {
  transform: scale(0.98);
}

.button-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.button-secondary:hover {
  background-color: var(--color-border);
}

/* Cards */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Empty states */
.empty-state,
.error-state {
  text-align: center;
  padding: var(--spacing-2xl);
  color: var(--color-text-secondary);
}

.error-state h1 {
  margin-bottom: var(--spacing-md);
}

.error-state p {
  margin-bottom: var(--spacing-lg);
}

/* Responsive - optimize for small viewports, portrait orientation */
@media (max-width: 768px) {
  .container {
    padding: var(--spacing-sm);
  }
  
  .page-title {
    font-size: var(--font-size-xl);
  }
}

/* Score color classes - Ethos credibility levels */
.score-untrusted {
  color: #b72b38 !important; /* <800 */
}

.score-questionable {
  color: #C29010 !important; /* 800-1200 */
}

.score-neutral {
  color: #c1c0b6 !important; /* 1200-1400 */
}

.score-known {
  color: #7C8DA8 !important; /* 1400-1600 */
}

.score-established {
  color: #4E86B9 !important; /* 1600-1800 */
}

.score-reputable {
  color: #2E7BC3 !important; /* 1800-2000 */
}

.score-exemplary {
  color: #427B56 !important; /* 2000-2200 */
}

.score-distinguished {
  color: #127f31 !important; /* 2200-2400 */
}

.score-revered {
  color: #836DA6 !important; /* 2400-2600 */
}

.score-renowned {
  color: #7A5EA0 !important; /* 2600+ */
}

.score-default {
  color: var(--color-text-secondary);
}

/* Ensure sufficient contrast for accessibility */
@media (prefers-contrast: high) {
  :root {
    --color-border: #000000;
  }
  
  @media (prefers-color-scheme: dark) {
    :root {
      --color-border: #ffffff;
    }
  }
}

