/* ============================================
   ACVALE ASSESSORIA CONTÁBIL - Design System
   ============================================ */

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

:root {
  /* Paleta de Cores */
  --primary-dark: #1a4d7a;
  --primary-main: #2c7ba0;
  --primary-light: #4a9bc7;
  --accent: #3d8eb5;
  --bg-light: #f8fafb;
  --bg-white: #ffffff;
  --text-primary: #1e2936;
  --text-secondary: #546074;
  --text-muted: #7a8699;
  --border-light: #e1e8ed;
  --border-medium: #c5d0dd;
  --success: #2c7a4f;
  --warning: #b85e1f;
  --info: #2c7ba0;
  
  /* Tipografia */
  --font-system: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 
                 Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', 
               Consolas, 'Courier New', monospace;
  
  /* Espaçamento */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  
  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(26, 77, 122, 0.08);
  --shadow-md: 0 4px 12px rgba(26, 77, 122, 0.12);
  --shadow-lg: 0 12px 28px rgba(26, 77, 122, 0.15);
  
  /* Transições */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

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

body {
  font-family: var(--font-system);
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- TIPOGRAFIA --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -0.01em;
}

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

h5 {
  font-size: 1.125rem;
}

p {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.text-large {
  font-size: 1.125rem;
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

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

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

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

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

section:nth-child(even) {
  background: var(--bg-light);
}

/* --- HEADER & NAVIGATION --- */
header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

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

.logo-container {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

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

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-main);
}

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

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-xs);
}

/* --- HERO SECTION --- */
.hero {
  background: linear-gradient(135deg, #f8fafb 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
  padding: var(--space-2xl) 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: url('../assets/hero.svg') no-repeat center right;
  background-size: contain;
  opacity: 0.6;
  z-index: 0;
}

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

.hero h1 {
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-main));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

/* --- CARDS & BOXES --- */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-main), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
  color: white;
}

.card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.375rem;
}

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

/* --- GRID 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(260px, 1fr));
}

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

/* --- ALERT BOXES --- */
.alert {
  padding: var(--space-md);
  border-radius: 8px;
  border-left: 4px solid;
  margin-bottom: var(--space-md);
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.alert-warning {
  background: #fff8f0;
  border-color: var(--warning);
  color: #7a4a1f;
}

.alert-info {
  background: #f0f8fc;
  border-color: var(--info);
  color: #1a4d7a;
}

.alert-success {
  background: #f0f8f4;
  border-color: var(--success);
  color: #1f5a3a;
}

.alert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* --- LISTS --- */
.list-check {
  list-style: none;
  padding: 0;
}

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

.list-check li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
  font-size: 1.1rem;
}

/* --- TABLES --- */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

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

thead {
  background: var(--bg-light);
}

th {
  padding: var(--space-md);
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  border-bottom: 2px solid var(--border-medium);
}

td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

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

tbody tr:hover {
  background: var(--bg-light);
}

/* --- FAQ ACCORDION --- */
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: var(--space-sm);
  overflow: hidden;
  background: var(--bg-white);
}

.faq-question {
  width: 100%;
  padding: var(--space-md);
  background: none;
  border: none;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: var(--bg-light);
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--primary-main);
  transition: transform var(--transition-base);
}

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

.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-md) var(--space-md) var(--space-md);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- FORM STYLES --- */
.form-group {
  margin-bottom: var(--space-md);
}

label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  font-family: var(--font-system);
  font-size: 1rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  background: var(--bg-white);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-main);
  box-shadow: 0 0 0 3px rgba(44, 123, 160, 0.1);
}

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

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

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

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

/* --- BUTTONS --- */
button,
.btn {
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: 6px;
  font-family: var(--font-system);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-main), var(--primary-light));
  color: white;
  box-shadow: var(--shadow-sm);
}

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

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

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

.btn-large {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.125rem;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- SUCCESS MESSAGE --- */
.success-message {
  display: none;
  padding: var(--space-lg);
  background: var(--bg-light);
  border: 2px solid var(--success);
  border-radius: 8px;
  text-align: center;
  margin-top: var(--space-lg);
}

.success-message.show {
  display: block;
  animation: slideIn var(--transition-base);
}

.success-icon {
  font-size: 3rem;
  color: var(--success);
  margin-bottom: var(--space-sm);
}

/* --- FOOTER --- */
footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-xl) 0 var(--space-md) 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

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

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

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: block;
  margin-bottom: var(--space-xs);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  text-align: center;
  opacity: 0.5;
  font-size: 0.8rem;
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.footer-legal a {
  display: inline;
  margin: 0;
}

/* --- ANIMATIONS --- */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }
  
  .nav-links {
    position: fixed;
    top: 73px;
    left: -100%;
    width: 100%;
    background: var(--bg-white);
    flex-direction: column;
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
    transition: left var(--transition-base);
    gap: var(--space-md);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .hero::before {
    opacity: 0.3;
    width: 100%;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .footer-legal {
    flex-direction: column;
    gap: var(--space-xs);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 var(--space-sm);
  }
  
  section {
    padding: var(--space-xl) 0;
  }
}

/* --- UTILITIES --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.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); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
