/* ══════════════════════════════════════════════════════════════════════
   Enverium Eligibility Marketing Site — Design System
   Inspired by br.enverium.com: dark theme, Inter, green accents
   ══════════════════════════════════════════════════════════════════════ */

/* ── Reset & Globals ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors */
  --bg: #000000;
  --bg-card: #0a0a0a;
  --bg-card-hover: #111111;
  --bg-input: #0d0d0d;
  --border: #1a1a1a;
  --border-focus: #22c55e;

  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-muted: #6b6b6b;

  --accent: #22c55e;
  --accent-light: #4ade80;
  --accent-bg: rgba(34, 197, 94, 0.08);
  --accent-bg-strong: rgba(34, 197, 94, 0.15);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.08);

  --warning: #f59e0b;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --container-max: 720px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* ── Header ──────────────────────────────────────────────────────── */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-secondary);
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--accent-light);
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}

.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.text-accent {
  color: var(--accent-light);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ── Lookup Card ─────────────────────────────────────────────────── */
.lookup-card {
  max-width: 500px;
  margin: 0 auto;
}

.input-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.input-wrapper {
  flex: 1;
  position: relative;
}

.cnpj-input {
  width: 100%;
  padding: 14px 18px;
  font-family: 'Inter', monospace;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cnpj-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 2px;
}

.cnpj-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.input-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 4px;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 12px 28px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.btn-secondary:hover {
  background: var(--accent-bg);
  transform: translateY(-1px);
}

.btn-spinner {
  flex-shrink: 0;
}

/* ── Error Card ──────────────────────────────────────────────────── */
.error-card {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeSlideIn 0.3s ease-out;
}

.error-icon {
  width: 28px;
  height: 28px;
  background: rgba(239, 68, 68, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.error-card p {
  color: #fca5a5;
  font-size: 14px;
}

/* ── Results ─────────────────────────────────────────────────────── */
.results-section {
  padding-bottom: 64px;
  animation: fadeSlideIn 0.4s ease-out;
}

.company-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.company-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.company-cnpj {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Inter', monospace;
  letter-spacing: 0.5px;
}

.eligibility-summary {
  text-align: right;
  flex-shrink: 0;
}

.eligibility-summary .summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.summary-badge.has-eligible {
  background: var(--accent-bg-strong);
  color: var(--accent-light);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.summary-badge.none-eligible {
  background: var(--danger-bg);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.summary-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Activities Card ─────────────────────────────────────────────── */
.activities-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.activities-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.activities-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-eligible {
  background: var(--accent);
}

.dot-not-eligible {
  background: var(--text-muted);
}

.badge-primary-tag {
  width: 16px;
  height: 16px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.activities-list {
  /* activity items */
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background: var(--bg-card-hover);
}

.activity-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.activity-status-dot.eligible {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
}

.activity-status-dot.not-eligible {
  background: var(--text-muted);
  opacity: 0.5;
}

.activity-code {
  font-family: 'Inter', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 80px;
  letter-spacing: 0.3px;
}

.activity-desc {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: capitalize;
  line-height: 1.4;
}

.activity-tags {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tag-primary {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}

.tag-eligible {
  background: var(--accent-bg-strong);
  color: var(--accent-light);
}

.tag-not-eligible {
  background: rgba(107, 107, 107, 0.1);
  color: var(--text-muted);
}

/* ── Lead Card ───────────────────────────────────────────────────── */
.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.lead-header {
  margin-bottom: 24px;
}

.lead-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.lead-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (min-width: 520px) {
  .form-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.lead-success {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  animation: fadeSlideIn 0.3s ease-out;
}

.success-icon {
  width: 28px;
  height: 28px;
  background: var(--accent-bg-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.lead-success p {
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 500;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ── Skeleton loader ─────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #222 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .input-row {
    flex-direction: column;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .company-header {
    flex-direction: column;
  }

  .eligibility-summary {
    text-align: left;
  }

  .activities-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .activity-item {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
  }

  .activity-desc {
    flex-basis: 100%;
    width: 100%;
    order: 5;
    padding-left: 24px;
  }

  .hero {
    padding: 40px 0 24px;
  }

  .lead-card {
    padding: 24px 16px;
  }
}