:root {
  --paper: #f1ece1;
  --paper-2: #fbf8f1;
  --ink: #1a1d24;
  --ink-dim: #6b6f7a;
  --line: #ded4c1;

  --phone-bg: #14161c;
  --phone-body: #0f1115;
  --phone-line: #262a34;
  --bubble-in-text: #eceef3;
  --bubble-out: #2a2d35;
  --bubble-out-text: #e7e9ee;

  --amber: #ffb300;
  --flame: #ff3d00;
  --gradient: linear-gradient(135deg, var(--amber), var(--flame));

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(26, 29, 36, 0.05) 1px, transparent 1.4px);
  background-size: 20px 20px;
  color: var(--ink);
  line-height: 1.6;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- perforation divider (receipt tear-line) ---------- */

.perf {
  height: 3px;
  background-image: radial-gradient(circle, rgba(26, 29, 36, 0.28) 1.4px, transparent 1.6px);
  background-size: 14px 100%;
  background-repeat: repeat-x;
  background-position: left center;
}

/* ---------- header ---------- */

header {
  padding: 56px 0 40px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.logo .mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
}

.tagline {
  color: var(--ink-dim);
  font-size: 15px;
  margin-top: 6px;
}

a.logo {
  color: var(--ink);
  text-decoration: none;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px 32px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding-top: 6px;
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  color: var(--ink-dim);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

/* ---------- hero ---------- */

.hero {
  padding: 8px 0 56px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.lede {
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 480px;
  margin: 0 0 26px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 30px;
}

.pill {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--ink-dim);
}

.cta {
  display: inline-block;
  background: var(--gradient);
  color: #fff;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 14px 28px -12px rgba(255, 61, 0, 0.45);
}

.cta:hover {
  filter: brightness(1.06);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.cta-secondary {
  color: var(--flame);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.cta-secondary:hover {
  text-decoration: underline;
}

/* ---------- phone mockup ---------- */

.phone-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
}

.phone-caption {
  font-size: 13px;
  color: var(--ink-dim);
  text-align: center;
}

.phone {
  width: min(360px, 100%);
  background: var(--phone-bg);
  border-radius: 32px;
  padding: 10px;
  box-shadow:
    0 40px 70px -24px rgba(38, 18, 4, 0.5),
    0 14px 28px -14px rgba(38, 18, 4, 0.4);
}

.phone__screen {
  background: var(--phone-body);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--phone-line);
}

.phone__bar img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.phone__who {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.phone__name {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--bubble-in-text);
  font-weight: 600;
}

.phone__status {
  font-size: 11px;
  color: #6fcf7e;
}

.phone__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px;
  min-height: 460px;
}

.phone__input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--phone-line);
  color: var(--ink-dim);
  font-size: 12.5px;
}

.phone__input .field {
  flex: 1;
  background: var(--bubble-out);
  border-radius: 999px;
  padding: 8px 14px;
  color: #7a7f8c;
}

.phone__input .mic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gradient);
  flex: none;
}

/* ---------- chat bubbles ---------- */

.bubble {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  position: relative;
}

.bubble.in {
  align-self: flex-start;
  background: var(--gradient);
  color: #fff;
  border-bottom-left-radius: 4px;
}

.bubble.out {
  align-self: flex-end;
  background: var(--bubble-out);
  color: var(--bubble-out-text);
  border-bottom-right-radius: 4px;
}

.bubble .time {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.65;
}

.bubble b {
  font-family: var(--font-mono);
  font-weight: 600;
}

.bubble.voice .row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bubble.voice .play {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent currentColor;
  flex: none;
}

.bubble.voice .wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 18px;
  flex: 1;
}

.bubble.voice .wave span {
  width: 2.5px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.85;
}

.bubble.voice .wave span:nth-child(1) { height: 35%; }
.bubble.voice .wave span:nth-child(2) { height: 70%; }
.bubble.voice .wave span:nth-child(3) { height: 45%; }
.bubble.voice .wave span:nth-child(4) { height: 95%; }
.bubble.voice .wave span:nth-child(5) { height: 55%; }
.bubble.voice .wave span:nth-child(6) { height: 80%; }
.bubble.voice .wave span:nth-child(7) { height: 40%; }

.bubble.voice .dur {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.8;
}

.bubble.voice .transcript {
  margin: 6px 0 0;
  font-size: 12.5px;
  font-style: italic;
  opacity: 0.85;
}

/* entrance animation, hero phone only */

.phone--animate .bubble {
  animation: bubbleIn 0.5s ease both;
}

.phone--animate .bubble:nth-child(1) { animation-delay: 0.15s; }
.phone--animate .bubble:nth-child(2) { animation-delay: 0.4s; }
.phone--animate .bubble:nth-child(3) { animation-delay: 0.75s; }
.phone--animate .bubble:nth-child(4) { animation-delay: 1.05s; }
.phone--animate .bubble:nth-child(5) { animation-delay: 1.4s; }
.phone--animate .bubble:nth-child(6) { animation-delay: 1.65s; }
.phone--animate .bubble:nth-child(7) { animation-delay: 2s; }
.phone--animate .bubble:nth-child(8) { animation-delay: 2.25s; }

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

@media (prefers-reduced-motion: reduce) {
  .phone--animate .bubble {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- generic sections ---------- */

section {
  padding: 48px 0;
}

h2 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.section-lede {
  color: var(--ink-dim);
  font-size: 15px;
  max-width: 560px;
  margin: -10px 0 24px;
}

/* ---------- steps (timeline) ---------- */

.steps {
  display: grid;
  gap: 0;
}

.step {
  display: flex;
  gap: 18px;
  position: relative;
  padding-bottom: 30px;
}

.step:last-child {
  padding-bottom: 0;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.step .n {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.step p {
  margin: 3px 0 0;
  max-width: 64ch;
  color: var(--ink-dim);
}

.step strong {
  color: var(--ink);
}

/* ---------- memory vignette ---------- */

.memory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.memory-copy p {
  color: var(--ink-dim);
  font-size: 15px;
  max-width: 420px;
}

.mini-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}

.mini-chat .bubble {
  font-size: 13px;
}

/* ---------- category grid ---------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.cat-card {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 22px 22px 20px 26px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.cat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient);
}

.cat-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
}

.cat-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--ink-dim);
}

.chip::before {
  content: "\201C";
  color: var(--flame);
}

.chip::after {
  content: "\201D";
  color: var(--flame);
}

.cat-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-dim);
}

/* ---------- audience ---------- */

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

.audience__item {
  padding-right: 28px;
}

.audience__item + .audience__item {
  padding-left: 28px;
  background-image: radial-gradient(circle, rgba(26, 29, 36, 0.28) 1.4px, transparent 1.6px);
  background-size: 3px 14px;
  background-repeat: repeat-y;
  background-position: left top;
}

.audience__item h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.audience__item p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-dim);
}

/* ---------- about / ledger (receipt-style fact sheet) ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-copy p {
  color: var(--ink-dim);
  font-size: 15px;
  margin: 0 0 14px;
}

.about-copy .about-note {
  font-size: 13.5px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.ledger {
  position: relative;
  margin: 6px 0;
  background: var(--paper-2);
  padding: 18px 24px;
  filter: drop-shadow(0 0 1px rgba(26, 29, 36, 0.35));
}

/* torn receipt edges: scalloped strips above and below */
.ledger::before,
.ledger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: radial-gradient(circle at 7px 6px, var(--paper-2) 5px, transparent 5.5px);
  background-size: 14px 6px;
}

.ledger::before {
  top: -6px;
}

.ledger::after {
  bottom: -6px;
  transform: scaleY(-1);
}

.ledger > div {
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}

.ledger > div:last-child {
  border-bottom: 0;
}

.ledger dt {
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 3px;
}

.ledger dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

/* ---------- integration flow ---------- */

.flow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 8px 0 12px;
  max-width: 460px;
}

.flow__node {
  width: 100%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
}

.flow__node--faturei {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  align-items: center;
  border: 2px solid var(--ink);
  padding: 16px 18px;
}

.flow__node--faturei img {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.flow__node strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
}

.flow__node span {
  font-size: 13.5px;
  color: var(--ink-dim);
}

.flow__node--result {
  background: var(--gradient);
  border-color: transparent;
}

.flow__node--result strong,
.flow__node--result span {
  color: #fff;
}

.flow__link {
  position: relative;
  margin-left: 28px;
  padding: 12px 0 12px 22px;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-dim);
}

.flow__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-image: radial-gradient(circle, rgba(26, 29, 36, 0.35) 1.4px, transparent 1.6px);
  background-size: 100% 8px;
  background-repeat: repeat-y;
}

/* ---------- data table ---------- */

.table-scroll {
  overflow-x: auto;
  margin: 8px 0 16px;
}

.data-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: 14px;
}

.data-table th,
.data-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-dim);
}

.data-table thead th {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.data-table tbody th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.data-table tr:last-child th,
.data-table tr:last-child td {
  border-bottom: 0;
}

.callout {
  background: var(--paper-2);
  border: 1px dashed var(--ink-dim);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
}

.doc .callout p {
  margin: 0;
  color: var(--ink);
}

/* ---------- footer ---------- */

footer {
  padding: 40px 0 64px;
  color: var(--ink-dim);
  font-size: 14px;
}

footer a {
  color: var(--ink-dim);
}

footer a:hover {
  color: var(--ink);
}

.site-footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px 40px;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer strong {
  color: var(--ink);
}

.foot-id {
  font-size: 13px;
  line-height: 1.7;
}

.foot-id .num {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.foot-col .foot-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}

.foot-col a {
  text-decoration: none;
}

.foot-col a:hover {
  text-decoration: underline;
}

.foot-legal {
  grid-column: 1 / -1;
  font-size: 12.5px;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
}

/* ---------- doc page (privacidade) ---------- */

.doc h1 {
  font-family: var(--font-display);
  font-size: 28px;
}

.doc h2 {
  font-size: 18px;
  margin-top: 34px;
}

.doc p,
.doc li {
  color: var(--ink-dim);
  font-size: 15px;
  max-width: 70ch;
}

.doc code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}

.doc .updated {
  color: var(--ink-dim);
  font-size: 13px;
  margin-bottom: 32px;
}

.back {
  color: var(--flame);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .phone-col {
    order: -1;
  }

  .memory-grid,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .audience {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .audience__item {
    padding: 0 0 20px;
  }

  .audience__item + .audience__item {
    padding: 20px 0;
    background-size: 14px 3px;
    background-repeat: repeat-x;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .foot-brand {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: 34px;
  }
}

@media (max-width: 480px) {
  .hero-copy h1 {
    font-size: 30px;
  }

  section {
    padding: 36px 0;
  }

  header {
    padding: 36px 0 28px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }
}

/* ---------- accessibility ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--flame);
  outline-offset: 3px;
}

/* Portal access: header buttons and the portal section */
.nav .nav-cta {
  background: var(--gradient);
  color: #fff;
  padding: 6px 14px;
  border-radius: 9px;
  font-weight: 700;
}
.nav .nav-cta:hover {
  color: #fff;
  filter: brightness(1.05);
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 40px;
  align-items: center;
  margin-bottom: 36px;
}
.portal-copy p {
  margin: 0 0 14px;
  max-width: 52ch;
}
.portal-copy .cta-row {
  margin-top: 22px;
}
.shot {
  margin: 0;
  min-width: 0;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.shot--wide {
  max-width: 900px;
}
.shot figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-dim);
}
@media (max-width: 820px) {
  .portal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}
