/* V2 Main Styles - Modern Responsive Design */

/* CSS Variables for Design System */
:root {
  /* Colors - Editorial Palette */
  --color-primary: #4a90e2;     /* D3 blue (keep for compatibility) */
  --color-secondary: #50c878;   /* PureScript green (keep for compatibility) */
  --color-accent: #f39c12;      /* Highlight orange (keep for compatibility) */
  --color-dark: #2c3e50;        /* Code background */
  --color-light: #ecf0f1;       /* Page background */
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #dddddd;

  /* Editorial/Print Aesthetic Colors */
  --color-beige-base: #D4C9A8;      /* Warm beige background */
  --color-beige-light: #D9C9B8;     /* Light beige */
  --color-beige-dark: #C9B8A0;      /* Darker beige */
  --color-red-accent: #E63946;      /* Bold red focal point */
  --color-coral: #D97560;           /* Coral accent */
  --color-peach: #E8B8A0;           /* Peach accent */
  --color-teal: #5A8A8A;            /* Muted teal */
  --color-line: #999999;            /* Divider lines */
  --color-text-dark: #333333;       /* Primary text */
  --color-text-muted: #666666;      /* Secondary text */

  /* Typography */
  --font-headers: Inter, system-ui, -apple-system, sans-serif;
  --font-body: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-code: 'Fira Code', Monaco, 'Courier New', monospace;

  /* Editorial Typography */
  --font-mono: 'Courier New', 'Courier', Monaco, monospace;
  --font-size-tiny: 0.5rem;        /* 8px - small labels */
  --font-size-small: 0.5625rem;    /* 9px - small text */
  --font-size-label: 0.6875rem;    /* 11px - main labels */
  --letter-spacing-wide: 0.125rem; /* 2px - uppercase labels */
  --letter-spacing-normal: 0.0625rem; /* 1px - body text */

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Breakpoints (for reference in media queries) */
  --breakpoint-mobile: 768px;
  --breakpoint-tablet: 1024px;
  --breakpoint-desktop: 1280px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-light);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headers);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-md);
}

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

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

code, pre {
  font-family: var(--font-code);
  font-size: 0.875rem;
}

/* Layout Utilities */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-lg);
}

/* App Root */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Placeholder Styles - To be replaced by component-specific styles */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-size: 1.25rem;
  color: var(--color-text-light);
}

/* Responsive Utilities */
.mobile-only {
  display: block;
}

.tablet-up {
  display: none;
}

.desktop-up {
  display: none;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }
  .tablet-up {
    display: block;
  }
}

@media (min-width: 1024px) {
  .desktop-up {
    display: block;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark Mode Support (future) */
@media (prefers-color-scheme: dark) {
  /* Dark mode variables will go here */
}
