/* ============================================
   ez-NFe - Site Comercial
   ============================================ */

/* Reset e Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Cores da marca */
  --primary: rgb(15, 98, 106);
  --primary-dark: rgb(10, 78, 85);
  --primary-light: rgb(20, 130, 140);
  --primary-bg: rgba(15, 98, 106, 0.08);

  --text: #212529;
  --text-light: #6b7280;
  --text-muted: #9ca3af;

  --white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-alt: #f1f5f9;
  --border: #e5e7eb;

  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  --gradient-light: linear-gradient(135deg, #f0f9fa 0%, #e0f2f4 100%);

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);

  /* Tipografia */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Espaçamento */
  --section-padding: 100px;
  --container-max: 1200px;

  /* Transições */
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
}

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.25rem; }
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--primary-dark);
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER / NAVEGAÇÃO
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

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

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: baseline;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-ez {
  color: var(--primary);
}

.logo-nfe {
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
}

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

.nav-cta {
  display: flex;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    flex-direction: column;
    gap: 24px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-slow);
  }

  .nav.mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    gap: 16px;
    display: flex;
  }

  .nav-cta {
    flex-direction: column;
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* ============================================
   BOTÕES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--bg-light);
  color: var(--text);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 160px 0 100px;
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-bg) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero h1 .highlight {
  color: var(--primary);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-features {
  display: flex;
  gap: 32px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-feature-icon {
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  color: var(--primary);
  font-size: 1.25rem;
}

.hero-feature-text {
  font-size: 0.9rem;
}

.hero-feature-text strong {
  display: block;
  color: var(--text);
}

.hero-feature-text span {
  color: var(--text-light);
}

@media (max-width: 768px) {
  .hero {
    padding: 120px 0 60px;
  }

  .hero-features {
    flex-direction: column;
    gap: 20px;
  }
}

/* ============================================
   SEÇÕES
   ============================================ */
section {
  padding: var(--section-padding) 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
}

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

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

/* ============================================
   CARDS DE FUNCIONALIDADES
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
  transition: all var(--transition-slow);
}

.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--gradient-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--primary);
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 0;
}

/* ============================================
   TIPOS DE DOCUMENTO (NF-e / NFS-e)
   ============================================ */
.doc-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

@media (max-width: 768px) {
  .doc-types {
    grid-template-columns: 1fr;
  }
}

.doc-type-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  border: 2px solid var(--border);
  transition: all var(--transition-slow);
}

.doc-type-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
}

.doc-type-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.doc-type-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.75rem;
}

.doc-type-header h3 {
  font-size: 1.75rem;
}

.doc-type-header span {
  display: block;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 4px;
}

.doc-type-description {
  color: var(--text-light);
  margin-bottom: 24px;
}

.doc-type-features {
  list-style: none;
}

.doc-type-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.doc-type-features li:last-child {
  border-bottom: none;
}

.doc-type-features .check {
  color: var(--primary);
  font-weight: bold;
  flex-shrink: 0;
}

/* ============================================
   COMO FUNCIONA (TABS)
   ============================================ */
.how-it-works-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
}

.tab-btn {
  padding: 12px 28px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 50px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  text-align: center;
  position: relative;
}

.step::after {
  content: '';
  position: absolute;
  top: 32px;
  right: -12px;
  width: 24px;
  height: 2px;
  background: var(--border);
}

.step:last-child::after {
  display: none;
}

@media (max-width: 900px) {
  .step::after {
    display: none;
  }
}

.step-number {
  width: 64px;
  height: 64px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.step h4 {
  margin-bottom: 8px;
}

.step p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
}

/* ============================================
   CASOS DE USO
   ============================================ */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .use-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .use-cases-grid {
    grid-template-columns: 1fr;
  }
}

.use-case-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  transition: all var(--transition-slow);
}

.use-case-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.use-case-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.use-case-card h4 {
  margin-bottom: 8px;
}

.use-case-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.use-case-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

/* ============================================
   SEGURANÇA
   ============================================ */
.security-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .security-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .security-grid {
    grid-template-columns: 1fr;
  }
}

.security-item {
  text-align: center;
  padding: 32px 20px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.security-icon {
  width: 72px;
  height: 72px;
  background: var(--gradient-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: var(--primary);
}

.security-item h4 {
  margin-bottom: 8px;
}

.security-item p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
}

/* ============================================
   CTA
   ============================================ */
.cta {
  background: var(--gradient-primary);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}

.cta h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta p {
  opacity: 0.9;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

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

.cta .btn-primary:hover {
  background: var(--bg-light);
  transform: translateY(-2px);
}

.cta .btn-secondary {
  border-color: var(--white);
  color: var(--white);
  background: transparent;
}

.cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--text);
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

.footer-brand .logo {
  font-size: 2rem;
  margin-bottom: 16px;
}

.footer-brand .logo .logo-ez {
  color: var(--primary-light);
}

.footer-brand .logo .logo-nfe {
  color: var(--white);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

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

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

.footer-links li {
  margin-bottom: 12px;
}

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

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

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ============================================
   CODE BLOCK (para documentação)
   ============================================ */
.code-block {
  background: #1e293b;
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  margin: 20px 0;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.6;
}

.code-block .comment {
  color: #64748b;
}

.code-block .keyword {
  color: #f472b6;
}

.code-block .string {
  color: #a5f3fc;
}

.code-block .property {
  color: #93c5fd;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
