/* ===== RESET E BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Paleta de cores - Verde e Azul (tema sustentabilidade e tecnologia) */
  --primary: #2E7D32;
  --primary-light: #66BB6A;
  --primary-dark: #1B5E20;
  --secondary: #1565C0;
  --secondary-light: #42A5F5;
  --secondary-dark: #0D47A1;
  --accent: #FFD54F;
  --accent-dark: #FFA000;
  
  /* Neutros */
  --bg-light: #F5F5F5;
  --bg-white: #FFFFFF;
  --text-dark: #212121;
  --text-medium: #424242;
  --text-light: #757575;
  --border-color: #E0E0E0;
  
  /* Alertas */
  --warning-bg: #FFF9C4;
  --warning-border: #F9A825;
  --success: #4CAF50;
  --error: #F44336;
  
  /* Espaçamentos */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  
  /* Tipografia */
  --font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --line-height: 1.6;
  
  /* Transições */
  --transition: all 0.3s ease;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height);
  color: var(--text-dark);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

/* ===== TIPOGRAFIA ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-medium);
}

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

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

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

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

.section-alt {
  background-color: var(--bg-light);
}

/* ===== GRID SYSTEM ===== */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== UTILITÁRIOS ===== */
.text-center {
  text-align: center;
}

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

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

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

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

.hidden {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 2.5rem;
    --spacing-lg: 2rem;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-lg: 1.5rem;
    --font-size-base: 14px;
  }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===== ACESSIBILIDADE ===== */
:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

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