:root {
  --paper: #F7F9F8;
  --sheet: #FFFFFF;
  --ink: #10263B;
  --ink-soft: #4A5E6E;
  --rule: #D3DCE0;
  --green: #0E7A55;
  --green-deep: #0A5C40;
  --marker: #FFE36E;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.012em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--green); color: #fff; text-decoration: none;
  font: 600 1rem/1 var(--body); border-radius: 8px;
  transition: background .15s;
}
.btn:hover { background: var(--green-deep); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: var(--marker); color: var(--ink); }
.btn--light:hover { background: #fff; }
.link { text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* topo */
.top { position: sticky; top: 0; z-index: 5; background: rgba(247, 249, 248, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.top__in { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font: 800 1.375rem/1 var(--display); letter-spacing: -0.03em; }
.logo svg { width: 28px; height: 28px; fill: var(--green); stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
.nav { display: none; gap: 24px; margin-left: 16px; }
.nav a { text-decoration: none; color: var(--ink-soft); font-size: .9375rem; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.top__cta { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.top__cta .link { display: none; }
@media (min-width: 860px) { .nav, .top__cta .link { display: flex; } }

/* hero */
.hero { padding: 48px 0 72px; overflow: hidden; }
.hero__in { display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) { .hero { padding: 80px 0 112px; } .hero__in { grid-template-columns: 1.05fr .95fr; gap: 64px; } }
.hero h1 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); font-weight: 800; max-width: 15ch; }
.lead { margin-top: 24px; font-size: 1.1875rem; color: var(--ink-soft); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__note { margin-top: 20px; font-size: .9375rem; color: var(--ink-soft); max-width: 34em; }

/* DANFE */
.danfe {
  position: relative; margin: 0;
  background: var(--sheet); border: 1.5px solid var(--ink);
  font-size: .8125rem; line-height: 1.35;
  box-shadow: 10px 10px 0 var(--rule);
  transform: rotate(1.2deg);
  max-width: 520px; justify-self: center; width: 100%;
}
.danfe small { display: block; font-size: .625rem; color: var(--ink-soft); margin-bottom: 2px; }
.danfe__head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1.5px solid var(--ink); }
.danfe__head strong { display: block; font: 800 1.375rem/1 var(--display); letter-spacing: .02em; }
.danfe__head span { font-size: .6875rem; color: var(--ink-soft); }
.danfe__num { text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.danfe__num span:first-child { font-weight: 600; color: var(--ink); font-size: .8125rem; }
.danfe__row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--rule); }
.danfe__row > div { padding: 8px 14px; }
.danfe__row > div + div { border-left: 1px solid var(--rule); }
.danfe__row--tax { grid-template-columns: 1fr 1fr 1.4fr; font-variant-numeric: tabular-nums; border-bottom: 1.5px solid var(--ink); }
.danfe__row--tax b { font-size: 1rem; }
.danfe__items { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.danfe__items th { text-align: left; font-weight: 500; font-size: .625rem; color: var(--ink-soft); padding: 6px 14px 4px; border-bottom: 1px solid var(--rule); }
.danfe__items td { padding: 6px 14px; border-bottom: 1px solid var(--rule); }
.danfe__items th:not(:first-child), .danfe__items td:not(:first-child) { text-align: right; }
.danfe__key { padding: 10px 14px 14px; }
.key { display: block; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .04em; font-size: .78rem; min-height: 1.35em; }
.barcode { width: 100%; height: 34px; margin-top: 8px; fill: var(--ink); }

.stamp {
  position: absolute; right: -18px; top: 118px;
  padding: 10px 16px; border: 3px solid var(--green); border-radius: 6px;
  background: color-mix(in srgb, var(--marker) 85%, transparent);
  color: var(--green-deep); transform: rotate(-9deg);
  font: 800 1.0625rem/1.1 var(--display); text-align: center;
}
.stamp small { display: block; font: 500 .625rem/1.3 var(--body); margin-top: 4px; color: var(--green-deep); }
@media (max-width: 520px) { .stamp { right: 6px; top: 104px; font-size: .9375rem; } .danfe { transform: none; box-shadow: 6px 6px 0 var(--rule); } }

/* animação: a chave é "digitada" e o carimbo cai uma vez */
.js .stamp { opacity: 0; transform: rotate(-9deg) scale(1.6); }
.js .stamp.is-on { animation: stamp .45s cubic-bezier(.2, .9, .3, 1.25) forwards; }
@keyframes stamp { to { opacity: 1; transform: rotate(-9deg) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .js .stamp, .js .stamp.is-on { opacity: 1; transform: rotate(-9deg); animation: none; }
  html { scroll-behavior: auto; }
}

/* para quem */
.who { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--sheet); }
.who__list { list-style: none; margin: 0; padding: 0; display: grid; }
.who__list li { padding: 24px 0; color: var(--ink-soft); }
.who__list li + li { border-top: 1px solid var(--rule); }
.who__list b { display: block; color: var(--ink); font: 700 1.125rem/1.2 var(--display); margin-bottom: 6px; }
@media (min-width: 820px) {
  .who__list { grid-template-columns: repeat(4, 1fr); }
  .who__list li { padding: 32px 24px 32px 0; }
  .who__list li + li { border-top: 0; border-left: 1px solid var(--rule); padding-left: 24px; }
}

/* recursos */
.features { padding: 96px 0; }
.features h2, .steps h2, .faq h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); font-weight: 800; max-width: 20ch; }
.features__grid { display: grid; gap: 0 48px; margin-top: 48px; }
@media (min-width: 760px) { .features__grid { grid-template-columns: 1fr 1fr; } }
.feat { padding: 24px 0; border-top: 1.5px solid var(--ink); }
.feat h3 { font-size: 1.25rem; font-weight: 700; }
.feat p { margin-top: 8px; color: var(--ink-soft); max-width: 38em; }

/* passos — sequência real */
.steps { padding: 96px 0; background: var(--ink); color: #fff; }
.steps h2 { color: #fff; }
.steps__list { list-style: none; counter-reset: passo; margin: 48px 0 0; padding: 0; display: grid; gap: 32px; }
@media (min-width: 900px) { .steps__list { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.steps__list li { counter-increment: passo; position: relative; padding-top: 64px; border-top: 1.5px solid rgba(255, 255, 255, .35); }
.steps__list li::before {
  content: counter(passo); position: absolute; top: 16px; left: 0;
  font: 800 2rem/1 var(--display); color: var(--marker);
}
.steps__list h3 { font-size: 1.25rem; color: #fff; }
.steps__list p { margin-top: 8px; color: rgba(255, 255, 255, .78); }

/* devs */
.dev { padding: 96px 0; }
.dev__in { display: grid; gap: 40px; align-items: start; }
@media (min-width: 980px) { .dev__in { grid-template-columns: 1fr 1fr; gap: 64px; } }
.dev h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 800; }
.dev__copy p { margin-top: 20px; color: var(--ink-soft); max-width: 36em; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
.code {
  margin: 0; padding: 24px; overflow-x: auto;
  background: #0F2132; color: #DCE6EC; border-radius: 10px;
  font: 400 .875rem/1.6 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.code .c { color: #8FA5B4; }
.code .r { color: #9FE3C4; }

/* faq */
.faq { padding: 96px 0; border-top: 1px solid var(--rule); background: var(--sheet); }
.faq__in { display: grid; gap: 40px; }
@media (min-width: 900px) { .faq__in { grid-template-columns: .8fr 1.2fr; gap: 64px; } }
.faq__list details { border-bottom: 1px solid var(--rule); }
.faq__list details:first-child { border-top: 1px solid var(--rule); }
.faq__list summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font: 600 1.0625rem/1.4 var(--body);
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq__list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__list details p { padding: 0 0 20px; color: var(--ink-soft); max-width: 40em; }

/* final */
.final { padding: 96px 0; background: var(--green); color: #fff; }
.final__in { display: grid; gap: 20px; justify-items: start; }
.final h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 800; }
.final p { font-size: 1.1875rem; color: rgba(255, 255, 255, .88); max-width: 32em; }
.final .btn { margin-top: 8px; }

.foot { padding: 32px 0; font-size: .9375rem; color: var(--ink-soft); }
.foot__in { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.foot nav { display: flex; gap: 24px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
