/* ===== Base ===== */
:root {
  --gutter: 34px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: #0c0007;
  background: #fbfbfb;
}

/* títulos em Poppins com traço mais fino; o corpo do texto fica em Inter */
h1,
h2,
h3 {
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  font-weight: 500;
}

.wrap {
  max-width: 1180px;
  margin: auto;
  padding: 0 var(--gutter);
}

.muted {
  color: #888;
}

.eyebrow {
  color: #56d590;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
}

.eyebrow-dark {
  color: #0c0007;
}

.eyebrow-green {
  color: #27a965;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0c0007;
  color: white;
  padding: 11px 18px;
  border: 0;
  border-radius: 8px;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: translate 0.2s, background 0.2s;
}

/* ===== Ícones (Lucide) ===== */
.lucide {
  width: 1em;
  height: 1em;
  stroke-width: 2;
  flex-shrink: 0;
}

.btn .lucide {
  transition: translate 0.2s;
}

.btn:hover .lucide {
  translate: 3px 0;
}

.eyebrow .lucide {
  vertical-align: -2px;
}

.btn:hover {
  background: #27a965;
}

.btn-green {
  background: #56d590;
  color: #0c0007;
  font-weight: 700;
}

.btn-green:hover {
  background: #0c0007;
  color: white;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 15px 18px;
  font-size: 15px;
}

/* ===== Header ===== */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 70px;
  background: #0c0007;
  color: white;
  transition: box-shadow 0.3s;
}

.top.scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.top .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 42px;
}

.logo {
  width: 116px;
}

.nav {
  display: flex;
  gap: 30px;
  font-size: 14px;
}

.nav a {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
}

.nav .active {
  color: #56d590;
}

.spacer {
  flex: 1;
}

.circle {
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 11px;
  background: #1b191b;
  color: white;
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.circle:hover {
  background: #2a272a;
}

.has-dot::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #56d590;
}

/* ===== Hero ===== */
.hero {
  background: #0c0007;
  color: white;
  min-height: 380px;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
  align-items: center;
}

.hero-text > * {
  animation: fade-up 0.7s both;
}

.hero-text h1 {
  animation-delay: 0.1s;
}

.hero-text p {
  animation-delay: 0.2s;
}

.hero h1 {
  font-size: 54px;
  line-height: 0.98;
  margin: 18px 0 26px;
  max-width: 560px;
}

.hero p {
  color: #aaa;
  line-height: 1.6;
  max-width: 430px;
}

.visual {
  height: 100%;
  min-height: 380px;
  position: relative;
}

.visual > * {
  position: absolute;
}

.outline {
  right: -60px;
  top: 0;
  width: 440px;
  height: 300px;
  border: 1.5px solid #56d590;
  border-radius: 0 0 0 90px;
  border-top: 0;
  border-right: 0;
  opacity: 0.6;
}

.shape {
  right: -40px;
  top: 40px;
  width: 400px;
  height: 340px;
  border: 46px solid #56d590;
  border-bottom: 0;
  border-radius: 90px 90px 0 0;
  animation: fade-in 0.8s 0.2s both;
}

.person {
  right: 30px;
  bottom: 0;
  height: 360px;
  width: auto;
  animation: rise 0.9s 0.3s both;
}

.brandmark {
  left: 30px;
  top: 110px;
  width: 78px;
  height: 78px;
  border: 4px solid white;
  border-radius: 18px;
  /* recorta o centro do ícone para o "e" ficar em destaque */
  background: #56d590 url('assets/icon-green.png') center / 300% no-repeat;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  animation: pop 0.6s 0.7s both;
}

/* ===== Marketplace ===== */
.market {
  padding: 62px 0 70px;
}

.market h2 {
  font-size: 38px;
  margin: 0 0 6px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 10px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ddd;
  border-radius: 99px;
  padding: 0 16px;
  background: white;
  color: #888;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus-within {
  border-color: #56d590;
  box-shadow: 0 0 0 3px rgba(86, 213, 144, 0.2);
}

.search input {
  border: 0;
  outline: 0;
  padding: 10px 0;
  width: 190px;
  font-family: inherit;
  font-size: 13px;
  background: none;
}

.filter-btn {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid #ddd;
  border-radius: 99px;
  padding: 10px 16px;
  background: white;
  font-family: inherit;
  font-size: 13px;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.filter-badge {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #56d590;
  color: #0c0007;
  font-size: 11px;
  font-weight: 700;
}

.filter-badge[hidden] {
  display: none;
}

.count {
  font-size: 13px;
  margin-bottom: 20px;
}

.empty {
  padding: 40px;
  text-align: center;
  color: #888;
  border: 1px dashed #ddd;
  border-radius: 18px;
}

.pill {
  border: 1px solid #ddd;
  border-radius: 99px;
  padding: 10px 18px;
  font-size: 13px;
  background: none;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

.pill.active {
  background: #0c0007;
  color: white;
  border-color: #0c0007;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: white;
  border: 1px solid #eee;
  border-radius: 18px;
  padding: 24px;
  min-height: 250px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.045);
  display: flex;
  flex-direction: column;
  transition: translate 0.25s, box-shadow 0.25s;
}

.card:hover {
  translate: 0 -6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.09);
}

.card[hidden] {
  display: none;
}

.card.card-in {
  animation: fade-up 0.4s both;
}

.card.pop {
  border-top: 3px solid #56d590;
}

.card-head {
  display: flex;
  align-items: flex-start;
}

.ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #e4f9ee;
  color: #0c0007;
  display: grid;
  place-items: center;
  font-size: 24px;
  transition: background 0.25s, color 0.25s;
}

.ico .lucide {
  stroke-width: 1.75;
}

.card:hover .ico,
.card.pop .ico {
  background: #56d590;
  color: white;
}

.card h3 {
  margin: 18px 0 8px;
}

.card p {
  font-size: 14px;
  color: #777;
  line-height: 1.5;
}

.bottom {
  margin-top: auto;
  border-top: 1px solid #eee;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.tag {
  display: inline-block;
  background: #e6f8ee;
  color: #27a965;
  padding: 5px 9px;
  border-radius: 99px;
  font-size: 11px;
  margin-left: auto;
}

.tag-neutral {
  background: #f2f2f2;
  color: #777;
}

/* ===== Lira ===== */
.lira {
  background: #56d590;
  padding: 44px 0;
  overflow: hidden;
}

.lira .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.lira h2 {
  font-size: 34px;
  margin: 10px 0;
}

.lira p {
  max-width: 560px;
  line-height: 1.5;
}

.lira-ico {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  border-radius: 5px;
  background: #1f9d55;
  vertical-align: -5px;
}

.lira-ico img {
  width: 14px;
  height: 14px;
}

.lira-art {
  height: 180px;
  position: relative;
}

.lira-art::before {
  content: 'LIRA';
  position: absolute;
  right: 60px;
  top: 10px;
  width: 150px;
  height: 150px;
  border-radius: 75px;
  background: #fbfbfb;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  color: #0c0007;
}

/* ===== Footer ===== */
.footer {
  background: #0c0007;
  color: white;
  padding: 34px 0;
}

.footer .logo {
  width: 110px;
}

.footer p {
  color: #777;
  font-size: 12px;
}

/* ===== Modal ===== */
.modal {
  width: min(440px, calc(100% - 32px));
  border: 0;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.modal[open] {
  animation: pop 0.3s both;
}

/* o foco inicial fica no próprio modal (ver App.dialog), sem contorno visível */
.modal:focus {
  outline: none;
}

.modal::backdrop {
  background: rgba(12, 0, 7, 0.6);
}

.modal h3 {
  margin: 18px 0 8px;
}

.modal p {
  color: #777;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  background: #f2f2f2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
}

/* Modal de filtros no mobile: painel que sobe da base da tela */
.sheet {
  margin: auto 0 0;
  width: 100%;
  max-width: 100%;
  border-radius: 22px 22px 0 0;
  padding: 10px 20px 24px;
}

.sheet[open] {
  animation: slide-up 0.3s ease-out both;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: #ddd;
  margin: 0 auto 14px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sheet-head h3 {
  margin: 0;
}

.sheet .modal-close {
  position: static;
}

.options {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 4px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: none;
  font-family: inherit;
  font-size: 15px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.option-count {
  color: #aaa;
  font-size: 13px;
}

.option .lucide {
  margin-left: auto;
  font-size: 18px;
  color: #27a965;
  opacity: 0;
}

.option.active {
  font-weight: 700;
}

.option.active .lucide {
  opacity: 1;
}

/* ===== Pop-up de consulta de CNPJ ===== */
.promo {
  width: min(420px, calc(100% - 32px));
  padding: 32px 28px 22px;
  text-align: center;
}

.promo h3 {
  margin: 8px 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

.promo p {
  margin: 0 0 22px;
  font-size: 14px;
}

.promo-ico {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: #56d590;
  color: #0c0007;
  font-size: 28px;
  animation: pop 0.4s 0.1s both;
}

.promo-ico-alerta {
  background: #fff1d6;
  color: #b7791f;
}

.promo-form {
  text-align: left;
}

.promo-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.promo-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-family: inherit;
  font-size: 17px;
  letter-spacing: 0.5px;
  outline: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.promo-input:focus {
  border-color: #56d590;
  box-shadow: 0 0 0 3px rgba(86, 213, 144, 0.2);
}

.promo-error {
  min-height: 20px;
  margin: 6px 0 10px;
  font-size: 12.5px;
  color: #d14343;
}

.promo-skip {
  margin-top: 12px;
  padding: 6px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  color: #999;
  cursor: pointer;
}

.promo-skip:hover {
  color: #0c0007;
}

.result-list {
  margin: 18px 0;
  padding: 4px 16px;
  border: 1px solid #eee;
  border-radius: 14px;
  text-align: left;
}

.result-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  font-size: 13px;
}

.result-list div + div {
  border-top: 1px solid #f2f2f2;
}

.result-list dt {
  color: #888;
}

.result-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.result-list .ok {
  color: #27a965;
}

.result-list .alerta {
  color: #b7791f;
}

/* ===== Animação ao rolar (classes aplicadas pelo JS) ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s, transform 0.6s;
}

.card.reveal {
  transition: opacity 0.6s, transform 0.6s, translate 0.25s, box-shadow 0.25s;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; translate: 0 40px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes slide-up {
  from { translate: 0 100%; }
  to { translate: 0 0; }
}

@keyframes pop {
  from { opacity: 0; scale: 0.85; }
  to { opacity: 1; scale: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== Responsivo ===== */
@media (max-width: 800px) {
  :root {
    --gutter: 20px;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 50px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .visual {
    min-height: 300px;
    margin-top: 20px;
  }

  .outline {
    display: none;
  }

  .shape {
    right: 0;
    width: 280px;
    height: 240px;
    top: 60px;
    border-width: 34px;
  }

  .person {
    right: 10px;
    height: 290px;
  }

  .brandmark {
    left: 0;
    top: 60px;
    width: 60px;
    height: 60px;
  }

  /* filtros vão para o modal; na barra ficam só a busca e o botão "Filtros" */
  .toolbar {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .filters {
    display: none;
  }

  .filter-btn {
    display: inline-flex;
  }

  .search {
    flex: 1;
    min-width: 0;
  }

  .search input {
    width: 100%;
  }

  .market h2 {
    font-size: 32px;
  }

  /* produtos em grade de 2 colunas, com cards compactos */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .card {
    padding: 16px;
    min-height: 0;
    border-radius: 16px;
  }

  .card:hover {
    translate: none;
  }

  .card .ico {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: 20px;
  }

  .card .tag {
    padding: 4px 7px;
    font-size: 10px;
  }

  .card h3 {
    margin: 14px 0 6px;
    font-size: 15px;
    line-height: 1.25;
  }

  /* no mobile o card fica minimalista: só ícone, título, preço e botão */
  .card p {
    display: none;
  }

  .card h3 {
    margin-bottom: 16px;
  }

  .card .bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 14px;
    font-size: 14px;
  }

  .card .btn {
    justify-content: center;
    padding: 10px 12px;
    font-size: 12px;
  }

  .lira .wrap {
    grid-template-columns: 1fr;
  }

  .lira-art {
    display: none;
  }

  /* no mobile o pop-up sobe da base da tela, como os outros modais */
  .promo {
    margin: auto 0 0;
    width: 100%;
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .promo[open] {
    animation: slide-up 0.3s ease-out both;
  }
}
