/* DC Farmer Base Stylesheet
 * Dark theme, mobile-first responsive design
 * No external dependencies
 */

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Colors - Dark Theme */
  --color-bg: #0a0e1a;
  --color-surface: #151b2e;
  --color-surface-elevated: #1f2937;
  --color-text: #f5f5f5;
  --color-text-muted: #9ca3af;
  --color-accent: #45e783;
  --color-accent-hover: #38c96d;
  --color-accent-glow: rgba(69, 231, 131, 0.4);
  --color-border: #2a3347;
  --color-error: #ff5555;
  --color-warning: #ffaa44;
  
  /* Gradient Colors */
  --gradient-primary: linear-gradient(135deg, #45e783 0%, #2dd4bf 100%);
  --gradient-surface: linear-gradient(135deg, #151b2e 0%, #1f2937 100%);
  --gradient-hero: linear-gradient(135deg, rgba(69, 231, 131, 0.1) 0%, rgba(45, 212, 191, 0.1) 100%);

  /* Typography */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --line-height-base: 1.6;
  --line-height-tight: 1.3;

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

  /* Layout */
  --content-max-width: 1200px;
  --container-padding: 1rem;
  --border-radius: 0.375rem;
  --border-radius-lg: 0.5rem;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--color-accent-glow);
  --shadow-glow-lg: 0 0 40px var(--color-accent-glow), 0 0 80px rgba(69, 231, 131, 0.2);

  /* Breakpoints (mobile-first) */
  --breakpoint-sm: 480px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1440px;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: radial-gradient(ellipse at top, #1a2332 0%, var(--color-bg) 50%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Animated background effect */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(69, 231, 131, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: backgroundMove 60s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes backgroundMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

body > * {
  position: relative;
  z-index: 1;
}

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

h1 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-lg);
}

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

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

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

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

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

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Lists */
ul, ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-xl);
}

li {
  margin-bottom: var(--spacing-xs);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--spacing-2xl) 0;
}

/* Header */
header {
  background: rgba(21, 27, 46, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.site-title a {
  color: var(--color-text);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--color-accent);
  text-shadow: 0 0 20px var(--color-accent-glow);
}

/* Navigation */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

nav a {
  color: var(--color-text);
  text-decoration: none;
  padding: var(--spacing-sm) 0;
  transition: color var(--transition-fast);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

nav a:hover,
nav a:focus {
  color: var(--color-accent);
}

nav a:hover::after {
  width: 100%;
}

/* Main Content */
main {
  flex: 1;
}

/* Footer */
footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-3xl);
}

footer .container {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

footer a {
  color: var(--color-text-muted);
}

footer a:hover {
  color: var(--color-accent);
}

.footer-nav {
  list-style: none;
  margin: var(--spacing-md) 0 0;
  padding: 0;
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

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

.text-center {
  text-align: center;
}

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

.mb-0 {
  margin-bottom: 0;
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
  :root {
    --container-padding: 2rem;
  }

  nav ul {
    gap: var(--spacing-xl);
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
  :root {
    --container-padding: 2rem;
  }

  .section {
    padding: var(--spacing-3xl) 0;
  }

  h1 {
    font-size: 3.5rem;
  }
}

/* Responsive Design - Large Desktop */
@media (min-width: 1440px) {
  :root {
    --font-size-base: 18px;
  }
}

/* Focus Styles for Accessibility */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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