/* ============ Design tokens (matching the original Safe2Pay LP) ============ */
:root {
  --color-primary: #0052eb;
  --color-primary-dark: #003fc2;
  --color-text: #2b303b;
  --color-text-muted: #6b7280;
  --color-border: #e8eaee;
  --color-secondary-bg: #f6f7f9;
  --color-card-bg: #ffffff;
  --radius-lg: 12px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px -5px rgba(0, 82, 235, 0.15);
  --container-width: 1180px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --color-dark-bg: #0a0e16;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: #ffffff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  padding: 12px 22px;
  transition: background-color .2s ease, transform .15s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 82, 235, 0.05);
}
.btn--primary:hover { background: var(--color-primary-dark); box-shadow: 0 6px 16px rgba(0, 82, 235, 0.28); transform: translateY(-1px); }
.btn--primary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--light {
  background: #fff;
  color: var(--color-primary);
}
.btn--light:hover { background: #eef2ff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12); }
.btn--outline {
  background: #fff;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn--outline:hover { border-color: var(--color-primary); color: var(--color-primary); background: #f5f8ff; }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--block { width: 100%; }

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow .25s ease;
}
.header.is-scrolled { box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.header__logo {
  width: 168px;
  height: 50px;
  background-color: var(--color-primary);
  -webkit-mask: url(../assets/safe2pay-logo.png) no-repeat center / contain;
  mask: url(../assets/safe2pay-logo.png) no-repeat center / contain;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--color-primary) 0%, #0043c7 100%);
  overflow: hidden;
  padding: 40px 0 28px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 75%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
  margin-bottom: 14px;
}

.hero__title {
  color: #fff;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -.02em;
}
.hero__subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  line-height: 1.55;
  max-width: 520px;
  margin: 0 0 18px;
}

.hero__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
  padding: 0;
}
.hero__tag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}
.hero__tag .icon { width: 18px; height: 18px; }

/* ============ Lead form card ============ */
.lead-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow-lg);
}
.lead-card__title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
}
.lead-card__subtitle {
  margin: 0 0 18px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.lead-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--color-text); }
.field input,
.field select {
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 235, 0.15);
}
.field input:invalid:not(:placeholder-shown) { border-color: #e05252; }

/* Icon-prefixed inputs/selects */
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .field-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color .15s ease;
}
.input-wrap:focus-within .field-icon { color: var(--color-primary); }
.input-wrap input { padding-left: 40px; }
.input-wrap select {
  padding-left: 40px;
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.input-wrap select:invalid { color: var(--color-text-muted); }
.input-wrap .field-chevron {
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Two-step form reveal */
.form-step2 {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease-out);
}
.form-step2.is-open { grid-template-rows: 1fr; }
.form-step2__inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Conditional field reveal (e.g. "Outro" free-text) */
.field-conditional {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease-out);
}
.field-conditional.is-open { grid-template-rows: 1fr; }
.field-conditional__inner { min-height: 0; overflow: hidden; }

.form-actions { display: flex; gap: 12px; margin-top: 4px; }
.form-actions .btn { flex: 1; }

.lead-form__status {
  margin: 0;
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}
.lead-form__status--success { color: #1a8a4a; }
.lead-form__status--error { color: #d64545; }

/* Success state */
.lead-success {
  text-align: center;
  background: #eafcf3;
  border: 1px solid #b7ecd2;
  border-radius: var(--radius-lg);
  padding: 40px 32px;
}
.lead-success__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.lead-success__icon .icon { width: 28px; height: 28px; stroke-width: 2.5; }
.lead-success h3 { margin: 0 0 10px; font-size: 19px; font-weight: 700; color: #15803d; }
.lead-success p { margin: 0; color: #3f6650; font-size: 14px; line-height: 1.55; }

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.grid > .reveal:nth-child(1) { transition-delay: 0ms; }
.grid > .reveal:nth-child(2) { transition-delay: 80ms; }
.grid > .reveal:nth-child(3) { transition-delay: 160ms; }
.grid > .reveal:nth-child(4) { transition-delay: 240ms; }
.grid > .reveal:nth-child(5) { transition-delay: 320ms; }
.grid > .reveal:nth-child(6) { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ Sections ============ */
.section { padding: 56px 0; }
.section--muted { background: var(--color-secondary-bg); }
.section--dark { background: var(--color-dark-bg); color: #fff; }
.section--dark .section-heading p { color: rgba(255, 255, 255, 0.6); }

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}
.section-heading h2 {
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
.section-heading p {
  color: var(--color-text-muted);
  font-size: 17px;
  margin: 0;
}

/* ============ Grid & Cards ============ */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.card--compact { padding: 24px; }
.card h3 { margin: 16px 0 8px; font-size: 18px; font-weight: 700; }
.card p { margin: 0; color: var(--color-text-muted); font-size: 15px; line-height: 1.55; }
.card--compact h3 { margin-top: 0; font-size: 17px; }

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(0, 82, 235, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ Feature items (why choose us) ============ */
.feature-item { text-align: left; }
.feature-item__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-item h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.feature-item p { margin: 0; color: var(--color-text-muted); font-size: 15px; line-height: 1.55; }

/* ============ Steps ============ */
.step { text-align: center; padding: 8px; }
.step__number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.step h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.step p { margin: 0; color: var(--color-text-muted); font-size: 15px; }

/* ============ Stats & testimonial ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}
.stats__number {
  display: block;
  font-size: 40px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -.02em;
}
.stats__label {
  display: block;
  color: var(--color-text-muted);
  font-size: 14px;
  margin-top: 4px;
}
.section--dark .stats__number { color: #6699ff; text-shadow: 0 0 24px rgba(102, 153, 255, 0.35); }
.section--dark .stats__label { color: rgba(255, 255, 255, 0.55); }

.testimonial {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.testimonial__quote {
  font-size: 19px;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 0 20px;
  font-style: italic;
}
.testimonial__author { margin: 0; font-weight: 700; }
.testimonial__role { margin: 2px 0 0; color: var(--color-text-muted); font-size: 14px; }
.section--dark .testimonial {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}
.section--dark .testimonial__quote { color: #fff; }
.section--dark .testimonial__role { color: rgba(255, 255, 255, 0.55); }

/* ============ Final CTA ============ */
.cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-primary) 0%, #0043c7 100%);
  padding: 64px 0;
  text-align: center;
}
.cta__inner { position: relative; z-index: 1; }
.cta h2 {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -.01em;
}
.cta p {
  color: rgba(255,255,255,0.85);
  font-size: 17px;
  margin: 0 0 32px;
}

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__logo {
  width: 136px;
  height: 40px;
  background-color: var(--color-primary);
  -webkit-mask: url(../assets/safe2pay-logo.png) no-repeat center / contain;
  mask: url(../assets/safe2pay-logo.png) no-repeat center / contain;
}
.footer__links { display: flex; gap: 24px; }
.footer__links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14px;
}
.footer__links a:hover { color: var(--color-primary); }
.footer__copyright {
  color: var(--color-text-muted);
  font-size: 13px;
  margin: 0;
  width: 100%;
  text-align: center;
  order: 3;
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero__title { font-size: 38px; }
}

@media (max-width: 640px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 32px; }
  .hero__title { font-size: 32px; }
  .section { padding: 40px 0; }
  .section-heading h2 { font-size: 26px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { order: 2; }
  .footer__logo { order: 1; }
  .header__logo { width: 130px; height: 38px; }
  .form-actions { flex-direction: column; }
}
