:root {
  /* Trustworthy green palette for competence and reliability */
  --brand-primary: #2d7d32;     /* Forest green - primary brand */
  --brand-secondary: #4caf50;   /* Material green - accent */
  --brand-light: #81c784;       /* Light green for highlights */
  --brand-dark: #1b5e20;        /* Dark green for depth */

  /* Professional neutrals */
  --bg-primary: #ffffff;
  --bg-secondary: #f8faf9;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f1;

  /* Text colors */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6a6a6a;
  --text-light: #8a8a8a;
  --text-inverse: #ffffff;

  /* Borders and lines */
  --border-light: #e8e8e8;
  --border-medium: #d0d0d0;
  --border-brand: var(--brand-light);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(45, 125, 50, 0.1);
  --shadow-md: 0 4px 12px rgba(45, 125, 50, 0.15);
  --shadow-lg: 0 8px 24px rgba(45, 125, 50, 0.2);

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

  /* Typography */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  /* Line heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

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

/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
               'Helvetica Neue', Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-lg);
}

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

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

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

h6 {
  font-size: var(--font-size-base);
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-md) 0;
  line-height: var(--line-height-relaxed);
}

.lead {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  font-weight: 400;
  line-height: var(--line-height-relaxed);
}

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

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

a:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

/* For very large screens, add more generous side margins */
@media (min-width: 1600px) {
  .container {
    max-width: 1600px;
    padding: 0 var(--space-3xl);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
}

/* Header */
.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
  letter-spacing: -0.025em;
}

.logo:hover {
  text-decoration: none;
  color: var(--brand-dark);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-xl);
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--space-sm) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-primary);
  text-decoration: none;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-primary);
  border-radius: var(--radius-sm);
}

/* Mobile navigation */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-top: none;
    flex-direction: column;
    gap: 0;
    padding: var(--space-md);
  }

  .nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-light);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px; /* Touch target */
}

.btn-primary {
  background: var(--brand-primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: var(--text-inverse);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-primary);
  border: 2px solid var(--brand-primary);
}

.btn-secondary:hover {
  background: var(--brand-primary);
  color: var(--text-inverse);
  text-decoration: none;
}

.btn-group {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Hero section */
.hero {
  padding: var(--space-3xl) 0;
  text-align: left;
}

.hero h1 {
  font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-5xl));
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
}

.hero .lead {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
}

/* Center hero content on large screens */
@media (min-width: 1024px) {
  .hero {
    text-align: center;
  }

  .hero .lead {
    margin-left: auto;
    margin-right: auto;
  }
}
/* Cards */
.cards {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin: var(--space-2xl) 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

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

.card h3 {
  color: var(--brand-primary);
  margin-top: 0;
}

.card p {
  color: var(--text-secondary);
}

/* Feature lists */
.feature-list {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0;
}

.feature-list li {
  padding: var(--space-sm) 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: var(--space-lg);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand-primary);
  font-weight: 700;
}

/* Forms */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  color: #dc2626;
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-3xl);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2xl);
  align-items: start;
  margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* Animated text highlighting */
.highlight-text {
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-light));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: shimmer 3s ease-in-out infinite;
  font-weight: 600;
  position: relative;
  display: inline-block;
  transition: all 0.3s ease-in-out;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.highlight-text::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-secondary), var(--brand-light));
  border-radius: 1px;
  opacity: 0.7;
}

/* Text change animation */
.highlight-text.changing {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* Fallback for browsers that don't support background-clip: text */
@supports not (-webkit-background-clip: text) {
  .highlight-text {
    color: var(--brand-secondary);
    background: none;
    -webkit-text-fill-color: inherit;
  }
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: var(--font-size-sm); }

/* Screen reader only content for SEO and 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: 0;
}

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-light: #000000;
    --border-medium: #000000;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

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

  html {
    scroll-behavior: auto;
  }
}
