/* ═══════════════════════════════════════════════════════════════
   M&M SOLUÇÕES CONTÁBEIS - SISTEMA DE DESIGN
   Paleta Exclusiva: Azul Corporativo + Neutros Sofisticados
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Paleta Principal */
  --primary-900: #1e3a5f;
  --primary-800: #2c5282;
  --primary-700: #3a6ba5;
  --primary-600: #4a90e2;
  --primary-500: #5eb3f6;
  --primary-400: #7ec8f9;
  --primary-300: #a8dcfc;
  --primary-200: #c9ebff;
  --primary-100: #e6f5ff;
  
  /* Neutros */
  --neutral-900: #1a202c;
  --neutral-800: #2d3748;
  --neutral-700: #4a5568;
  --neutral-600: #718096;
  --neutral-500: #a0aec0;
  --neutral-400: #cbd5e0;
  --neutral-300: #e2e8f0;
  --neutral-200: #edf2f7;
  --neutral-100: #f7fafc;
  --white: #ffffff;
  
  /* Semânticas */
  --success: #38a169;
  --warning: #d69e2e;
  --error: #e53e3e;
  --info: var(--primary-600);
  
  /* Tipografia */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 
               Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 
               'Fira Mono', monospace;
  
  /* Espaçamentos */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Transições */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
               0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
               0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
               0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-800);
  background: var(--white);
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--neutral-900);
  margin-bottom: var(--space-md);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
  max-width: 70ch;
}

.text-large {
  font-size: 1.25rem;
  line-height: 1.7;
}

.text-small {
  font-size: 0.875rem;
}

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

.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; }
.font-mono { font-family: var(--font-mono); }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT & CONTAINERS
   ═══════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: 800px;
}

.container-wide {
  max-width: 1400px;
}

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

.section-alt {
  background: var(--neutral-100);
  background-image: url('../images/pattern.svg');
  background-size: 100px 100px;
  background-repeat: repeat;
}

.section-dark {
  background: var(--primary-900);
  color: var(--white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--white);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER & NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

.header {
  position: sticky;
  top: 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

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

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

.nav {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--neutral-700);
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--transition-base);
}

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

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-xs);
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--neutral-800);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */

.hero {
  min-height: 600px;
  background: var(--primary-900);
  background-image: url('../images/hero.svg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
  color: var(--white);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(30, 58, 95, 0.95) 0%, 
    rgba(44, 82, 130, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-title {
  color: var(--white);
  margin-bottom: var(--space-md);
  font-size: clamp(2.5rem, 6vw, 4rem);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--primary-200);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS & CONTENT BLOCKS
   ═══════════════════════════════════════════════════════════════ */

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--neutral-300);
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-title {
  color: var(--primary-800);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-700);
  font-weight: 700;
  font-size: 1.25rem;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS & CTA
   ═══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  text-align: center;
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-600);
  border-color: var(--primary-600);
}

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

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* ═══════════════════════════════════════════════════════════════
   TABLES & DATA DISPLAY
   ═══════════════════════════════════════════════════════════════ */

.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

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

thead {
  background: var(--primary-900);
  color: var(--white);
}

th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 600;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--neutral-300);
}

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

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

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

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-md);
  font-size: 1rem;
  font-family: inherit;
  color: var(--neutral-800);
  background: var(--white);
  border: 2px solid var(--neutral-400);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px var(--primary-100);
}

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

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

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

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

.form-success {
  background: var(--success);
  color: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  text-align: center;
  display: none;
  margin-top: var(--space-lg);
}

.form-success.show {
  display: block;
}

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

.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: var(--space-lg);
  text-align: left;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--neutral-900);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background var(--transition-base);
}

.faq-question:hover {
  background: var(--neutral-100);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary-600);
  transition: transform var(--transition-base);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

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

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

/* ═══════════════════════════════════════════════════════════════
   BADGES & TAGS
   ═══════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary-100);
  color: var(--primary-800);
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

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

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

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

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

.footer-link {
  display: block;
  padding: var(--space-xs) 0;
  color: var(--neutral-400);
  transition: color var(--transition-base);
}

.footer-link:hover {
  color: var(--primary-400);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--neutral-800);
  font-size: 0.8125rem;
  opacity: 0.7;
  line-height: 1.4;
}

.footer-info {
  margin-bottom: var(--space-xs);
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */

.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); }

.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); }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }

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

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .section {
    padding: var(--space-2xl) 0;
  }
  
  .nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    transition: transform var(--transition-base);
  }
  
  .nav.active {
    transform: translateY(0);
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .hero {
    min-height: 500px;
  }
  
  .card {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }
  
  .container {
    padding: 0 var(--space-sm);
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

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

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
