/* ════════════════════════════════════════════════════════════════════
   AGUIAR ARAUJO CONTABILIDADE - DESIGN SYSTEM
   Conceito: Estrutura, Clareza e Crescimento Estratégico
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* Paleta Principal - Verde Estratégico */
  --primary-dark: #1a4d2e;
  --primary: #2d7a4f;
  --primary-light: #4a9d6f;
  --primary-pale: #e3f2ea;
  
  /* Neutros Sofisticados */
  --neutral-900: #1a1f1c;
  --neutral-800: #2c3330;
  --neutral-700: #3e4744;
  --neutral-600: #5a6863;
  --neutral-500: #7a8682;
  --neutral-400: #9aa8a3;
  --neutral-300: #bac6c2;
  --neutral-200: #d9e2de;
  --neutral-100: #f0f7f4;
  --neutral-50: #f8fbfa;
  
  /* Acentos Funcionais */
  --accent-success: #2d7a4f;
  --accent-warning: #d97706;
  --accent-error: #b91c1c;
  --accent-info: #1e40af;
  
  /* Tipografia */
  --font-display: 'Georgia', 'Palatino', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Consolas', monospace;
  
  /* Espacamentos */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  
  /* Breakpoints */
  --mobile: 768px;
  --tablet: 1024px;
  --desktop: 1280px;
}

/* ════════════════════════════════════════════════════════════════════
   RESET E BASE
   ════════════════════════════════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-body);
  color: var(--neutral-800);
  background: var(--neutral-50);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ════════════════════════════════════════════════════════════════════
   TIPOGRAFIA
   ════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h5 { font-size: clamp(1.125rem, 2vw, 1.5rem); }

p {
  margin-bottom: 1.25rem;
  color: var(--neutral-700);
  font-size: 1.0625rem;
  max-width: 75ch;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--neutral-600);
  font-weight: 400;
}

.small-caps {
  font-family: var(--font-body);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--primary);
}

/* ════════════════════════════════════════════════════════════════════
   NAVEGAÇÃO
   ════════════════════════════════════════════════════════════════════ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(248, 251, 250, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-200);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
  box-shadow: 0 4px 24px rgba(26, 77, 46, 0.08);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.3s;
}

.logo-link:hover {
  opacity: 0.85;
}

.logo {
  height: 50px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--neutral-700);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
  color: var(--primary-dark);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.cta {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s;
}

.nav-link.cta::after {
  display: none;
}

.nav-link.cta:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 122, 79, 0.3);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-icon {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--neutral-800);
  position: relative;
  transition: all 0.3s;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 2px;
  background: var(--neutral-800);
  transition: all 0.3s;
}

.menu-icon::before { top: -8px; }
.menu-icon::after { bottom: -8px; }

/* ════════════════════════════════════════════════════════════════════
   LAYOUT E CONTAINERS
   ════════════════════════════════════════════════════════════════════ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

.section-alt {
  background: white;
}

.section-accent {
  background: var(--primary-pale);
  position: relative;
  overflow: hidden;
}

.section-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/pattern.svg');
  opacity: 0.4;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════════
   COMPONENTES
   ════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 122, 79, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.card {
  background: white;
  border-radius: 12px;
  padding: var(--space-lg);
  box-shadow: 0 2px 8px rgba(26, 77, 46, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  box-shadow: 0 8px 32px rgba(26, 77, 46, 0.12);
  transform: translateY(-4px);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-pale);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--primary);
  font-size: 1.75rem;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--primary-pale);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ════════════════════════════════════════════════════════════════════
   GRIDS E LAYOUTS
   ════════════════════════════════════════════════════════════════════ */

.grid {
  display: grid;
  gap: var(--space-lg);
}

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

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.split-reverse {
  direction: rtl;
}

.split-reverse > * {
  direction: ltr;
}

/* ════════════════════════════════════════════════════════════════════
   FORMULÁRIO
   ════════════════════════════════════════════════════════════════════ */

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--neutral-800);
  font-size: 0.9375rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--neutral-800);
  background: white;
  border: 2px solid var(--neutral-300);
  border-radius: 8px;
  transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.1);
}

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

.form-error {
  color: var(--accent-error);
  font-size: 0.875rem;
  margin-top: 0.375rem;
  display: none;
}

.form-group.error .form-error {
  display: block;
}

.form-group.error .form-input,
.form-group.error .form-textarea {
  border-color: var(--accent-error);
}

/* ════════════════════════════════════════════════════════════════════
   TABELAS
   ════════════════════════════════════════════════════════════════════ */

.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(26, 77, 46, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

thead {
  background: var(--primary-pale);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--neutral-200);
  color: var(--neutral-700);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--neutral-50);
}

/* ════════════════════════════════════════════════════════════════════
   ACCORDION / FAQ
   ════════════════════════════════════════════════════════════════════ */

.faq-item {
  background: white;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(26, 77, 46, 0.06);
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--neutral-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-content {
  padding: 0 1.5rem 1.5rem;
  color: var(--neutral-700);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 1000px;
}

/* ════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════ */

.footer {
  background: var(--neutral-900);
  color: var(--neutral-400);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h3 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--neutral-400);
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--neutral-800);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.8125rem;
  opacity: 0.6;
  line-height: 1.6;
}

.footer-legal {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-legal a {
  color: var(--neutral-400);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-legal a:hover {
  color: var(--primary-light);
}

/* ════════════════════════════════════════════════════════════════════
   ANIMAÇÕES
   ════════════════════════════════════════════════════════════════════ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVO
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }
  
  .section {
    padding: var(--space-xl) 0;
  }
  
  .split {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 81px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 81px);
    background: white;
    flex-direction: column;
    padding: 2rem;
    gap: 0;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu li {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--neutral-200);
  }
  
  .nav-link {
    display: block;
    width: 100%;
  }
  
  .nav-link.cta {
    margin-top: 1rem;
    text-align: center;
  }
  
  .container,
  .container-narrow {
    padding: 0 1.25rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .footer-legal {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }
  
  :root {
    --space-lg: 2rem;
    --space-xl: 2.5rem;
    --space-2xl: 3rem;
  }
  
  .card {
    padding: var(--space-md);
  }
  
  th, td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* ════════════════════════════════════════════════════════════════════
   UTILITÁRIOS
   ════════════════════════════════════════════════════════════════════ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.hidden { display: none; }
.visible { display: block; }

/* Acessibilidade */
.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;
}
