/* 
 * 🎨 AURA PREMIUM SYSTEM - CAMADA DE EVOLUÇÃO VISUAL
 * Criado para coexistir com institutional.css sem quebrar o legado.
 * Foco em: Dark Mode, Glassmorphism, Typographic Impact (Padrão Linear/Apple)
 */

:root {
  /* 🌊 SURFACES & DEPTH (Dark Mode First) */
  --em-base-bg: #0f172a;
  --em-surface-solid: #1e293b;
  --em-surface-glass-light: rgba(255, 255, 255, 0.03);
  --em-surface-glass-medium: rgba(255, 255, 255, 0.08);
  --em-surface-glass-heavy: rgba(15, 23, 42, 0.7);
  
  /* 🌈 BORDERS & DIVIDERS */
  --em-border-subtle: rgba(255, 255, 255, 0.08);
  --em-border-strong: rgba(255, 255, 255, 0.15);
  --em-border-primary: rgba(59, 130, 246, 0.5);

  /* ✒️ TYPOGRAPHY SCALES (Fluid via Clamp) */
  --em-text-display: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  --em-text-h1: clamp(2rem, 4vw + 1rem, 3.5rem);
  --em-text-h2: clamp(1.75rem, 3vw + 1rem, 2.5rem);
  --em-text-h3: clamp(1.25rem, 2vw + 0.5rem, 1.5rem);
  --em-text-body-lg: clamp(1rem, 1.5vw + 0.5rem, 1.125rem);
  --em-text-body: 1rem;
  --em-text-caption: 0.875rem;

  /* 📏 TRACKING */
  --em-tracking-tighter: -0.04em;
  --em-tracking-tight: -0.02em;
  --em-tracking-normal: 0em;

  /* ⚡ MOTION EASINGS */
  --em-ease-snappy: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --em-ease-smooth: cubic-bezier(0.32, 0.72, 0, 1);
  
  /* ⏱️ MOTION DURATIONS */
  --em-duration-fast: 150ms;
  --em-duration-normal: 300ms;
  --em-duration-slow: 600ms;
}

/* =========================================
   🔘 BUTTON SYSTEM
   ========================================= */
.em-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.875rem 1.5rem;
  border-radius: 9999px;
  font-size: var(--em-text-body);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--em-duration-normal) var(--em-ease-snappy);
  cursor: pointer;
  white-space: nowrap;
}

.em-btn-primary {
  background-color: var(--color-primary-500, #3b82f6);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.em-btn-primary:hover {
  background-color: var(--color-primary-600, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.em-btn-glass {
  background-color: var(--em-surface-glass-light);
  color: #ffffff;
  border: 1px solid var(--em-border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.em-btn-glass:hover {
  background-color: var(--em-surface-glass-medium);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* =========================================
   🎛️ CARDS & SURFACES
   ========================================= */
/* Solid Card (Para leitura limpa no conteúdo, reduzindo excesso de glass) */
.em-card {
  background-color: var(--em-surface-solid);
  border: 1px solid var(--em-border-subtle);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: transform var(--em-duration-normal) var(--em-ease-snappy),
              border-color var(--em-duration-normal) var(--em-ease-snappy),
              box-shadow var(--em-duration-normal) var(--em-ease-snappy);
}
.em-card:hover {
  transform: translateY(-4px);
  border-color: var(--em-border-primary);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.1); /* Glow azulado sutil SaaS */
}

/* Glass Card (Manter apenas para elementos sobre mídia/vídeo) */
.em-card-glass {
  background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--em-border-subtle);
  border-radius: 24px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform var(--em-duration-normal) var(--em-ease-snappy), 
              border-color var(--em-duration-normal) var(--em-ease-snappy);
}

.em-card-glass:hover {
  transform: translateY(-4px);
  border-color: var(--em-border-strong);
}

/* =========================================
   📏 TYPOGRAPHY CLASSES
   ========================================= */
.em-display {
  font-size: var(--em-text-display);
  letter-spacing: var(--em-tracking-tighter);
  font-weight: 700;
  line-height: 1.05;
  color: #ffffff;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5); /* Melhor leitura sobre mídia */
}

.em-heading-1 {
  font-size: var(--em-text-h1);
  letter-spacing: var(--em-tracking-tighter);
  font-weight: 600;
  line-height: 1.1;
  color: #f8fafc;
}

.em-text-h3 {
  font-size: var(--em-text-h3);
  font-weight: 600;
  letter-spacing: var(--em-tracking-tight);
  color: #ffffff;
  margin-bottom: 12px;
}

.em-body-lg {
  font-size: var(--em-text-body-lg);
  color: var(--color-neutral-300, #cbd5e0);
  line-height: 1.6;
  font-weight: 400;
}

.em-label {
  font-size: var(--em-text-caption);
  color: var(--color-primary-500, #3b82f6);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =========================================
   📐 LAYOUT & GRIDS
   ========================================= */
.em-section {
  padding: 120px 5%;
  background-color: var(--em-base-bg);
  position: relative;
}

.em-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.em-section-header {
  text-align: center;
  margin-bottom: 80px;
  max-width: 800px;
  margin-inline: auto;
}

.em-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

/* =========================================
   ✨ FEATURE ICONS (Modular UI)
   ========================================= */
.em-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.em-feature-icon.primary {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--color-primary-400, #60a5fa);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.em-feature-icon.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-success-400, #34d399);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* =========================================
   💻 ABSTRACT SYSTEM MOCKUP (Visual Proof)
   ========================================= */
.em-abstract-mockup {
  width: 100%;
  height: 340px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--em-border-strong);
  border-radius: 16px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.em-mockup-topbar {
  height: 48px;
  border-bottom: 1px solid var(--em-border-subtle);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.em-mockup-dot {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.15);
}

.em-mockup-schedule {
  display: flex;
  flex: 1;
  padding: 1.5rem;
  gap: 1.5rem;
  position: relative;
}

.em-mockup-sidebar {
  width: 32px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 1.75rem;
}

.em-mockup-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.em-mockup-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.em-mockup-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.em-mockup-header {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 0.5rem;
  width: 60%;
}

.em-mockup-block {
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.em-mockup-block.blue {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.em-mockup-block.green {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

.em-mockup-block.animated::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: sweep 3.5s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.em-mockup-block.blue.animated::after { background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.4), transparent); }
.em-mockup-block.green.animated::after { background: linear-gradient(to right, transparent, rgba(16, 185, 129, 0.4), transparent); }

.delay-1 { animation-delay: 0.7s !important; }
.delay-2 { animation-delay: 1.4s !important; }
.delay-3 { animation-delay: 2.1s !important; }

@keyframes sweep { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

/* =========================================
   🤖 MICRO-UI & AI ANIMATIONS (Visual Proof)
   ========================================= */
.em-mockup-validation {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--color-success-400, #34d399);
  margin-left: auto; /* Alinha o indicador à direita na Topbar */
}

.em-mockup-validation span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Animação: Escalas Inteligentes (Preenchimento e Validação) */
@keyframes em-ai-resolve {
  0%, 15% { background: transparent; border: 1px dashed rgba(59, 130, 246, 0.3); box-shadow: none; }
  20% { background: rgba(59, 130, 246, 0.2); border: 1px solid var(--color-primary-400); box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); transform: scale(1.02); }
  25%, 100% { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); box-shadow: none; transform: scale(1); }
}

.em-mockup-block.ai-resolve {
  animation: em-ai-resolve 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* Animação: Trocas Automatizadas (Sincronismo de Cores e Posição) */
@keyframes em-ai-swap-1 {
  0%, 45% { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.3); } /* Começa Azul */
  50% { transform: scale(0.9); opacity: 0.5; }
  55%, 100% { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); } /* Vira Verde */
}

@keyframes em-ai-swap-2 {
  0%, 45% { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); } /* Começa Verde */
  50% { transform: scale(0.9); opacity: 0.5; }
  55%, 100% { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.3); } /* Vira Azul */
}

.em-mockup-block.ai-swap-1 { animation: em-ai-swap-1 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; }
.em-mockup-block.ai-swap-2 { animation: em-ai-swap-2 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; }

/* Ícone sutil flutuando durante a troca */
@keyframes em-ai-swap-icon {
  0%, 45% { opacity: 0; transform: translate(-50%, -50%) scale(0.5) rotate(-45deg); }
  50%, 55% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
  60%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5) rotate(45deg); }
}

.em-swap-indicator {
  position: absolute; width: 24px; height: 24px; background: var(--em-surface-solid); border: 1px solid var(--em-border-strong); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--color-success-400); box-shadow: 0 4px 12px rgba(0,0,0,0.5); animation: em-ai-swap-icon 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; z-index: 10; pointer-events: none;
}

/* Indicador de tempo real (Timeline do dia atual) */
.em-mockup-timeline {
  position: absolute;
  top: 1.5rem;
  bottom: 0;
  left: 38%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-primary-500), transparent);
  box-shadow: 0 0 12px var(--color-primary-500);
  opacity: 0.6;
  z-index: 2;
}

/* Fade de profundidade na parte inferior */
.em-mockup-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--em-base-bg));
  pointer-events: none;
  z-index: 3;
}

/* =========================================
   📱 MOBILE ADAPTATIONS
   ========================================= */
@media (max-width: 768px) {
  .em-section { padding: 80px 5%; }
  .em-card, .em-card-glass { padding: 1.5rem; }
  .em-abstract-mockup { height: 260px; margin-bottom: 2rem; }
  .em-mockup-grid { grid-template-columns: repeat(3, 1fr); }
  .em-mockup-col:nth-child(4), .em-mockup-col:nth-child(5) { display: none; }
  .em-mockup-schedule { padding: 1rem; gap: 1rem; }
  .em-mockup-sidebar { padding-top: 1.25rem; }
}

/* =========================================
   🍱 BENTO GRID SYSTEM (Value Transition)
   ========================================= */
.em-bento-section {
  padding: 160px 5% 120px;
  background-color: var(--em-base-bg);
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.em-statement-block {
  max-width: 800px;
  margin: 0 auto 100px;
  text-align: center;
}

.em-statement-eyebrow {
  font-size: var(--em-text-caption);
  color: var(--color-primary-500);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: block;
}

.em-statement-headline {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.em-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.em-bento-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  overflow: hidden;
}

.em-bento-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25); /* Leve aumento na opacidade da borda (estabilidade) */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); /* Remove o glow azul herdado, mantendo a sombra original */
}

.em-bento-large {
  grid-column: 1 / -1;
}

/* =========================================
   🍱 BENTO MICRO-UI (Visual Anchors)
   ========================================= */
.em-bento-micro-ui {
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--em-border-subtle);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.15);
}

.em-bento-micro-ui.large { height: 140px; }
.em-bento-micro-ui:not(.large) { height: 120px; }

/* CARD 1: Previsibilidade (Timeline) */
.em-timeline-grid {
  display: flex; gap: 12px; width: 100%; padding: 0 32px; position: relative; z-index: 2;
}
.em-timeline-col {
  display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.em-timeline-header {
  font-size: 0.6rem; font-weight: 600; color: var(--color-neutral-500); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; text-align: center;
}
.em-timeline-pill {
  height: 8px; border-radius: 4px; background: rgba(255,255,255,0.05);
}
/* Estilos abstratos de turnos */
.em-timeline-pill.blue { background: rgba(59, 130, 246, 0.2); border: 1px solid rgba(59, 130, 246, 0.3); }
.em-timeline-pill.blue.solid { background: rgba(59, 130, 246, 0.8); border: none; box-shadow: 0 0 8px rgba(59, 130, 246, 0.4); }
.em-timeline-pill.green { background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.3); }
.em-timeline-pill.green.solid { background: rgba(16, 185, 129, 0.8); border: none; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }

/* Feixe de luz validando a timeline */
.em-bento-scanner {
  position: absolute; top: 0; bottom: 0; left: -100%; width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: em-bento-scan 4s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}
@keyframes em-bento-scan { 0% { left: -100%; } 100% { left: 200%; } }

/* CARD 2: Sincronia (Avatars Cluster) */
.em-sync-wrapper { position: relative; display: flex; align-items: center; justify-content: center; }
.em-sync-avatars { display: flex; align-items: center; }
.em-sync-avatar {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--em-surface-solid); background-image: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0)); margin-left: -16px; position: relative; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.em-sync-avatar:first-child { margin-left: 0; background-color: var(--color-primary-700); z-index: 3; }
.em-sync-avatar:nth-child(2) { background-color: var(--color-primary-500); z-index: 2; }
.em-sync-avatar:nth-child(3) { background-color: var(--color-success-600); z-index: 1; }

/* Badge de sincronia flutuante com animação de respiração */
.em-sync-badge {
  position: absolute; bottom: -4px; right: -12px; width: 24px; height: 24px;
  background: var(--em-surface-solid); border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--color-success-400); border: 1px solid var(--em-border-strong); z-index: 4;
  animation: em-bento-pulse 2.5s infinite cubic-bezier(0.4, 0, 0.6, 1);
}
@keyframes em-bento-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* CARD 3: Cobertura (Success Ring) */
.em-coverage-wrapper { position: relative; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; }
.em-coverage-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); animation: em-bento-spin-ring 12s linear infinite; }
.em-ring-bg { fill: none; stroke: rgba(16, 185, 129, 0.15); stroke-width: 2; }
.em-ring-fill {
  fill: none; stroke: var(--color-success-400); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 100, 100;
  filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.5));
}
@keyframes em-bento-spin-ring { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
.em-coverage-text { font-size: 1.125rem; font-weight: 700; color: var(--color-success-400); z-index: 2; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

/* Mobile Ajustes para os Micro-UIs */
@media (max-width: 768px) {
  .em-timeline-grid { padding: 0 16px; gap: 8px; }
  .em-timeline-col:nth-child(6), .em-timeline-col:nth-child(7) { display: none; } /* Esconde fds no mobile para não espremer */
}

/* =========================================
   🛤️ CONNECTED STEPPER (Flow & Workflow)
   ========================================= */
.em-stepper-wrapper {
  position: relative;
  margin-top: 80px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.em-stepper-track {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--em-border-strong);
  z-index: 1;
  border-radius: 2px;
}

.em-stepper-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--color-primary-500);
  box-shadow: 0 0 12px var(--color-primary-500);
  border-radius: 2px;
}

.em-stepper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
  z-index: 2;
}

.em-step-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.em-step-node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--em-base-bg);
  border: 2px solid var(--em-border-strong);
  margin-top: 19px;
  margin-bottom: 12px;
  transition: all 0.4s var(--em-ease-smooth);
  position: relative;
  z-index: 2;
}

.em-step-card.active .em-step-node {
  border-color: var(--color-primary-500);
  background: var(--color-primary-500);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.6);
  transform: scale(1.3);
}

.em-step-number {
  position: absolute;
  top: -12px;
  left: 16px;
  font-size: 7.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.04);
  line-height: 0.8;
  transition: all 0.5s var(--em-ease-snappy);
  letter-spacing: -0.04em;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.em-step-card.active .em-step-number {
  color: rgba(255, 255, 255, 0.08);
  transform: translateY(-8px) scale(1.02);
}

.em-step-micro-ui {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: var(--em-surface-solid);
  border: 1px solid var(--em-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: all 0.4s var(--em-ease-smooth);
}

.em-step-card.active .em-step-micro-ui {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

/* --- PASSO 1: O INSUMO (Data Slots) --- */
.em-micro-input {
  display: flex; flex-direction: column; gap: 6px; width: 44px;
}
.em-micro-slot {
  display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 6px;
  background: transparent; border: 1px dashed var(--em-border-strong);
  transition: all 0.5s var(--em-ease-snappy);
}
.em-micro-slot-avatar {
  width: 10px; height: 10px; border-radius: 50%; background: var(--em-border-strong);
  transition: all 0.5s var(--em-ease-snappy);
}
.em-micro-slot-line {
  height: 4px; width: 12px; border-radius: 2px; background: var(--em-border-strong);
  transition: all 0.5s var(--em-ease-snappy);
}
.em-step-card.active .em-micro-slot {
  border-style: solid; border-color: rgba(59, 130, 246, 0.3); background: rgba(59, 130, 246, 0.1);
  transform: translateX(4px); /* Simula dado recebido */
}
.em-step-card.active .em-micro-slot-avatar { background: var(--color-primary-500); }
.em-step-card.active .em-micro-slot-line { background: var(--color-primary-400); width: 16px; }
.em-step-card.active .em-micro-slot:nth-child(2) { transition-delay: 0.15s; }
.em-step-card.active .em-micro-slot:nth-child(2) .em-micro-slot-avatar { opacity: 0.6; }

/* --- PASSO 2: A MÁGICA (Algorithm Sort & Scan) --- */
.em-micro-algo {
  position: relative; width: 48px; height: 16px;
}
.em-micro-algo-block {
  position: absolute; height: 16px; border-radius: 4px; background: var(--em-border-strong);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy Snap Edge */
}
/* Estado Caótico (Buscando peças) */
.em-micro-algo-block.b1 { width: 14px; transform: translate(0px, -12px); opacity: 0.4; }
.em-micro-algo-block.b2 { width: 16px; transform: translate(16px, 12px); opacity: 0.4; }
.em-micro-algo-block.b3 { width: 14px; transform: translate(34px, -8px); opacity: 0.4; }

/* Estado Resolvido (Grade Encaixada) */
.em-step-card.active .em-micro-algo-block { opacity: 1; }
.em-step-card.active .em-micro-algo-block.b1 { transform: translate(0px, 0px); background: var(--color-primary-500); }
.em-step-card.active .em-micro-algo-block.b2 { transform: translate(16px, 0px); background: var(--color-success-500); }
.em-step-card.active .em-micro-algo-block.b3 { transform: translate(34px, 0px); background: var(--color-primary-400); }

/* Scanner ótico simulando validação da IA */
.em-micro-scanner {
  position: absolute; top: -8px; bottom: -8px; width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.8), transparent);
  box-shadow: 0 0 8px var(--color-primary-500); transform: translateX(-10px); opacity: 0; transition: opacity 0.3s;
}
@keyframes em-scanner-sweep { 0% { transform: translateX(-10px); } 100% { transform: translateX(58px); } }
.em-step-card.active .em-micro-scanner {
  opacity: 1; animation: em-scanner-sweep 2s infinite ease-in-out; animation-delay: 0.6s;
}

/* --- PASSO 3: O RESULTADO (Success Pulse Ring) --- */
.em-micro-check { 
  position: relative; color: var(--em-border-strong); transition: all 0.5s var(--em-ease-snappy); 
  display: flex; align-items: center; justify-content: center;
}
.em-micro-check::before {
  content: ''; position: absolute; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--color-success-500); opacity: 0; transform: scale(0.5); pointer-events: none;
}
@keyframes em-success-pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
.em-step-card.active .em-micro-check {
  color: var(--color-success-500);
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
  transform: scale(1.15);
}
.em-step-card.active .em-micro-check::before {
  animation: em-success-pulse 2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94); animation-delay: 0.3s;
}

/* 📱 Responsive Bento */
@media (max-width: 768px) {
  .em-bento-section { padding: 100px 5% 80px; }
  .em-statement-block { margin-bottom: 60px; }
  .em-bento-grid { grid-template-columns: 1fr; }
  .em-bento-large { grid-column: 1 / -1; }
  
  .em-stepper-wrapper { margin-top: 40px; }
  .em-stepper-grid { grid-template-columns: 1fr; gap: 48px; }
  .em-stepper-track {
    top: 0; bottom: 0; left: 23px;
    width: 2px; height: 100%;
  }
  .em-stepper-fill { width: 100%; height: 0%; }
  .em-step-card { padding-left: 64px; position: relative; }
  .em-step-node {
    position: absolute; left: 18px; top: 0; margin-top: 6px;
  }
  .em-step-number {
    top: -20px;
    left: 48px;
    font-size: 6rem;
  }
}

/* =========================================
   📰 EDITORIAL GRID SYSTEM (Dobra 5 - Impact)
   ========================================= */
.em-editorial-section {
  padding: 160px 5% 120px;
  background-color: var(--em-base-bg);
  position: relative;
}

.em-editorial-header {
  max-width: 800px;
  margin-bottom: 80px;
}

.em-editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.em-editorial-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.em-editorial-bar {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  opacity: 0.3; /* Muito mais sutil, atua como um feixe de luz guiado */
}

.em-editorial-bar.blue { background: var(--color-primary-500); }
.em-editorial-bar.green { background: var(--color-success-500); }
.em-editorial-bar.silver { background: var(--color-neutral-400); }

.em-editorial-title {
  font-size: var(--font-size-2xl);
  font-weight: 600; /* Peso "Apple" focado em solidez */
  color: #ffffff;
  letter-spacing: -0.02em; /* Tracking mais denso e refinado */
  line-height: 1.2;
}

.em-editorial-desc {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.7); /* Contraste ideal (70% opacity real) */
  line-height: 1.6; /* Mais confortável para o ritmo dos olhos */
}

/* 📱 Responsive Editorial */
@media (max-width: 992px) {
  .em-editorial-grid { gap: 48px; }
}

@media (max-width: 768px) {
  .em-editorial-section { padding: 100px 5% 80px; }
  .em-editorial-header { margin-bottom: 60px; }
  .em-editorial-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* =========================================
   🎯 ALTERNATING FEATURE SHOWCASE (Dobra 6)
   ========================================= */
.em-showcase-section {
  padding: 120px 5%;
  background-color: var(--em-base-bg);
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.em-showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 160px;
}

.em-showcase-row:last-child {
  margin-bottom: 0;
}

/* Text Content */
.em-showcase-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.em-showcase-eyebrow {
  font-size: var(--em-text-caption);
  color: var(--color-primary-500);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.em-showcase-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Visual Content (Feature Frames) */
.em-showcase-visual {
  background: #000000;
  border: 1px solid var(--em-border-strong);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Inversão no grid para Zigue-Zague */
.em-showcase-row:nth-child(even) .em-showcase-text {
  order: 1;
}

/* 📱 Responsive Showcase */
@media (max-width: 992px) {
  .em-showcase-row { grid-template-columns: 1fr; gap: 48px; margin-bottom: 100px; }
  .em-showcase-row:nth-child(even) .em-showcase-text { order: -1; } /* Texto sempre em cima no mobile */
  .em-showcase-visual { padding: 1.5rem; }
}

/* =========================================
   🎯 SHOWCASE MICRO-UI (Dobra 6 Refinements)
   ========================================= */
.em-showcase-glass-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
}

/* Feature 1: Drag & Validate Animation */
@keyframes em-mockup-drag {
  0%, 100% { transform: translate(0, 0) scale(1); box-shadow: none; border-color: rgba(59, 130, 246, 0.3); }
  15% { transform: translate(0, -6px) scale(1.05); box-shadow: 0 12px 24px rgba(59, 130, 246, 0.3); border-color: var(--color-primary-400); z-index: 10; }
  40%, 60% { transform: translate(16px, -6px) scale(1.05); box-shadow: 0 12px 24px rgba(59, 130, 246, 0.3); border-color: var(--color-primary-400); z-index: 10; }
  75% { transform: translate(16px, 0) scale(1); box-shadow: none; border-color: rgba(59, 130, 246, 0.3); z-index: 10; }
}
.em-drag-anim { animation: em-mockup-drag 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; position: relative; }

.em-drag-tooltip {
  position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
  background: var(--color-success-500); color: white; font-size: 0.65rem; font-weight: 600;
  padding: 4px 10px; border-radius: 12px; display: flex; align-items: center; gap: 4px;
  box-shadow: 0 4px 12px rgba(16,185,129,0.3); white-space: nowrap;
  opacity: 0; animation: em-tooltip-fade 4s infinite;
}
@keyframes em-tooltip-fade {
  0%, 65%, 100% { opacity: 0; transform: translate(-50%, 0); }
  75%, 90% { opacity: 1; transform: translate(-50%, -8px); }
}

/* Feature 2: Approve Button Pulse */
.em-approve-btn {
  background: var(--color-success-500); color: white; border-radius: 10px; height: 44px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2); animation: em-pulse-approve 2.5s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94); border: 1px solid rgba(255,255,255,0.1); cursor: pointer;
}
@keyframes em-pulse-approve {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Feature 3: Apple-style Notification Card */
.em-notification-card {
  width: 100%; max-width: 320px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 24px; padding: 1.25rem;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.2);
}
.em-notification-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.em-float-subtle { animation: em-float-subtle 6s ease-in-out infinite; }
@keyframes em-float-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* =========================================
   ✨ THE FINAL HANDSHAKE (Dobra 7 - CTA)
   ========================================= */
.em-cta-final-section {
  padding: 200px 5% 160px;
  background-color: #000000; /* Vazio absoluto para foco máximo */
  position: relative;
  overflow: hidden;
}

/* 🎬 CTA Video Background System */
.em-cta-video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  /* ESTRATÉGIA ENTERPRISE: Fallback absoluto de poster no wrapper */
  background-color: #000000;
  background-image: url('../videos/video2-poster.jpg');
  background-size: cover;
  background-position: center;
}

.em-cta-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0; /* Começa invisível para evitar flicker e pulos de renderização */
  transition: opacity 1.5s ease-in-out; /* Fade-in majestoso de textura */
}

/* Anti-flicker state ativado via JS */
.em-cta-video.is-loaded {
  opacity: 0.35; /* Visibilidade ajustada: atua como "textura viva", sem competir com o CTA */
}

/* Vignette Overlay: Funde o topo e a base com o fundo preto da página */
.em-cta-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #000000 0%, rgba(0,0,0,0.6) 20%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.6) 80%, #000000 100%);
}

.em-cta-final-container {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2; /* Garante que o texto flutue sobre o vídeo */
}

.em-cta-final-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.em-cta-final-subheadline {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 3rem;
  text-wrap: balance;
  max-width: 540px;
}

.em-cta-final-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.em-cta-final-trust {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* 📱 Responsive CTA Final */
@media (max-width: 768px) {
  .em-cta-final-section { padding: 120px 5% 100px; }
  .em-cta-final-actions { flex-direction: column; width: 100%; }
  .em-cta-final-actions .em-btn { width: 100%; }
}

/* ♿ ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  .em-cta-video {
    display: none !important;
  }
}

/* =========================================
   ⬛ SILENT FOOTER (Dobra Final - Fechamento)
   ========================================= */
.em-footer-minimal {
  background-color: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px 5%;
}

.em-footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.em-footer-copyright {
  font-size: var(--em-text-caption);
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.em-footer-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.em-footer-link {
  font-size: var(--em-text-caption);
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-weight: 400;
  transition: color var(--em-duration-normal) var(--em-ease-snappy);
}

.em-footer-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* 📱 Responsive Minimal Footer */
@media (max-width: 768px) {
  .em-footer-minimal {
    padding: 48px 5% 64px;
  }
  .em-footer-container {
    flex-direction: column-reverse; /* Copyright empurrado para o último elemento visual */
    justify-content: center;
    text-align: center;
    gap: 32px;
  }
  .em-footer-nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
  }
}

/* =========================================
   ⚖️ LEGAL PAGES (Privacy & Terms)
   ========================================= */
.em-legal-layout {
  display: flex;
  align-items: flex-start;
  gap: 64px;
}

.em-legal-sidebar {
  position: sticky;
  top: 120px;
  width: 240px;
  flex-shrink: 0;
}

.em-legal-nav {
  display: flex;
  flex-direction: column;
  gap: 10px; /* Levemente mais agrupado para formar um bloco coeso */
}

/* Label "Nesta Página" - Silenciado */
.em-legal-sidebar-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  display: block;
}

.em-legal-nav-link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  line-height: 1.4;
  transition: color var(--em-duration-fast) var(--em-ease-snappy);
}

.em-legal-nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.em-legal-nav-link.active {
  color: #ffffff;
  font-weight: 500;
}

.em-legal-content {
  flex: 1;
  max-width: 680px;
}

/* Tipografia Premium de Documento */
.em-legal-h1 {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.em-legal-h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f8fafc;
  margin-top: 3.5rem;
  margin-bottom: 1rem;
}

.em-legal-p {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.em-legal-p strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.em-legal-section {
  margin-bottom: 0; /* As margens são controladas pelos H2 e HR agora */
}

.em-legal-list {
  list-style-type: none;
  padding-left: 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.em-legal-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.em-legal-list li::before {
  content: '—'; /* Em-dash reduz o apelo de marketing, fica mais sério */
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.3);
}

.em-legal-hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 4rem 0; /* 64px de respiro */
}

/* Botão silencioso para Header de Docs */
.em-legal-back-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.em-legal-back-link:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

/* 📱 Responsive Legal Pages */
@media (max-width: 768px) {
  .em-legal-layout {
    flex-direction: column;
    gap: 40px;
  }
  .em-legal-sidebar {
    position: relative;
    top: 0;
    width: 100%;
    border-bottom: 1px solid var(--em-border-subtle);
    padding-bottom: 24px;
  }
  .em-legal-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* =========================================
   🪟 DEMONSTRATION MODAL SYSTEM
   ========================================= */
.em-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--em-ease-snappy);
}

.em-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.em-modal-wrapper {
  width: 100%;
  max-width: 460px;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s var(--em-ease-snappy);
}

.em-modal-overlay.is-active .em-modal-wrapper {
  transform: translateY(0) scale(1);
}

.em-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--em-border-subtle);
  color: var(--color-neutral-300);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.em-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.em-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.em-form-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--em-border-subtle);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.em-form-input:focus {
  outline: none;
  border-color: var(--color-primary-500);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}