/* ===========================================================
   LapaPay — Landing Page
   Aesthetic: "financial infrastructure noir" — deep navy space,
   luminous globe, editorial serif display type, single warm-gold
   accent used sparingly against a disciplined navy/blue palette.
   =========================================================== */

:root {
  --navy-950: #050a17;
  --navy-900: #081124;
  --navy-850: #0a1730;
  --navy-800: #0e1e3d;
  --navy-700: #142a52;
  --navy-600: #1c3968;

  --blue-500: #2f7fd6;
  --blue-400: #4f9eea;
  --blue-300: #86c1f5;
  --blue-200: #bcdcfb;

  --ice-100: #f5f9ff;
  --ice-200: #dbe6f5;
  --ice-300: #a9bcda;
  --ice-400: #728098;

  --gold-300: #f7cd7a;
  --gold-400: #f2b84b;
  --gold-500: #e59a1f;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Instrument Sans", -apple-system, sans-serif;

  --container: 1220px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--ice-100);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* film-grain overlay for depth/texture */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===================== Typography ===================== */

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin: 0 0 1.1rem;
}
.eyebrow--light { color: var(--blue-300); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ice-100);
}

.section-head { max-width: 720px; margin: 0 auto 4rem; text-align: center; }

/* ===================== Buttons ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: linear-gradient(135deg, var(--blue-400), var(--blue-500));
  color: var(--navy-950);
  box-shadow: 0 8px 24px -6px rgba(47, 127, 214, 0.55);
}
.btn--primary:hover { box-shadow: 0 12px 30px -6px rgba(47, 127, 214, 0.75); }

.btn--outline {
  border-color: rgba(219, 230, 245, 0.28);
  color: var(--ice-100);
}
.btn--outline:hover { border-color: var(--blue-300); background: rgba(79, 158, 234, 0.08); }

.btn--ghost {
  border-color: rgba(219, 230, 245, 0.22);
  color: var(--ice-100);
  font-size: 0.86rem;
  padding: 0.6rem 1.3rem;
}
.btn--ghost:hover { border-color: var(--gold-400); color: var(--gold-300); }

.btn--gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--navy-950);
  box-shadow: 0 8px 24px -6px rgba(242, 184, 75, 0.45);
}
.btn--gold:hover { box-shadow: 0 12px 32px -6px rgba(242, 184, 75, 0.65); }

/* ===================== Nav ===================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.3rem 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5, 10, 23, 0.78);
  backdrop-filter: blur(14px);
  padding: 0.9rem 0;
  border-color: rgba(219, 230, 245, 0.08);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav__brand { display: flex; align-items: center; }
.nav__logo { height: 58px; width: auto; }
.nav__links {
  display: flex;
  gap: 2.1rem;
  font-size: 0.9rem;
  color: var(--ice-300);
}
.nav__links a { transition: color 0.25s; }
.nav__links a:hover { color: var(--ice-100); }

@media (max-width: 820px) {
  .nav__links { display: none; }
}

@media (max-width: 480px) {
  /* Two nav CTAs plus the logo don't fit comfortably on the smallest
     phones — keep only the primary "Cadastro" here; "Painel de vendedor"
     stays reachable via the Hero and the footer. */
  .nav__cta--secondary { display: none; }
}

/* ===================== Hero ===================== */

.hero {
  position: relative;
  padding: 9.5rem 2rem 0;
  background:
    radial-gradient(ellipse 900px 600px at 82% 8%, rgba(47, 127, 214, 0.22), transparent 60%),
    radial-gradient(ellipse 700px 500px at 10% 90%, rgba(242, 184, 75, 0.07), transparent 60%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900) 60%, var(--navy-950));
  overflow: hidden;
}

.hero__grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 2rem;
  min-height: 78vh;
}

.hero__copy { position: relative; z-index: 2; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 580;
  font-size: clamp(2.9rem, 6vw, 5rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin: 0 0 1.6rem;
  color: #ffffff;
  text-shadow: 0 4px 40px rgba(47, 127, 214, 0.35);
}
.hero__title em {
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(100deg, var(--gold-400), var(--gold-300) 40%, var(--blue-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ice-300);
  max-width: 460px;
  margin: 0 0 2.4rem;
}

.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }

.hero__trust {
  font-size: 0.82rem;
  color: var(--ice-400);
  letter-spacing: 0.01em;
}

.hero__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 640px;
  justify-self: end;
  margin-right: -4%;
}
#globe { width: 100%; height: 100%; display: block; }
.hero__visual-glow {
  position: absolute;
  inset: 8%;
  z-index: -1;
  background: radial-gradient(circle, rgba(79, 158, 234, 0.35), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; min-height: auto; gap: 3rem; padding-bottom: 3rem; }
  .hero__visual { max-width: 440px; margin: 0 auto; justify-self: center; }
  .hero__subtitle { max-width: 100%; }
}

/* ---- stats strip ---- */

.stats {
  position: relative;
  z-index: 2;
  margin-top: 4rem;
  border-top: 1px solid rgba(219, 230, 245, 0.1);
  background: linear-gradient(180deg, rgba(14, 30, 61, 0.5), transparent);
}
.stats__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2.6rem 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stat { display: flex; flex-direction: column; gap: 0.3rem; }
.stat__number {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  color: var(--ice-100);
  font-weight: 500;
}
.stat__number small { font-size: 0.5em; color: var(--blue-300); }
.stat__label { font-size: 0.85rem; color: var(--ice-400); }

@media (max-width: 720px) {
  .stats__inner { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== Features / Bento ===================== */

.features { padding: 8rem 2rem; max-width: var(--container); margin: 0 auto; }

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.card {
  background: linear-gradient(160deg, var(--navy-850), var(--navy-900));
  border: 1px solid rgba(219, 230, 245, 0.08);
  border-radius: 22px;
  padding: 2.2rem;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(79, 158, 234, 0.35);
  box-shadow: 0 24px 50px -20px rgba(47, 127, 214, 0.35);
}
.card--lg { grid-column: span 2; }

.card__icon {
  width: 48px; height: 48px;
  color: var(--blue-300);
  margin-bottom: 1.4rem;
}
.card__icon svg { width: 100%; height: 100%; }

.card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 0 0.6rem;
  color: var(--ice-100);
}
.card p { margin: 0; color: var(--ice-300); font-size: 0.95rem; line-height: 1.55; }

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .card--lg { grid-column: span 1; }
}

/* ===================== How it works ===================== */

.how {
  padding: 6rem 2rem 8rem;
  max-width: var(--container);
  margin: 0 auto;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 1.6rem;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 158, 234, 0.4), transparent);
}
.step { position: relative; }
.step__num {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3rem;
  color: transparent;
  -webkit-text-stroke: 1px rgba(134, 193, 245, 0.45);
  margin-bottom: 1rem;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0 0 0.6rem;
}
.step p { color: var(--ice-300); margin: 0; font-size: 0.95rem; line-height: 1.6; }

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps::before { display: none; }
}

/* ===================== Security ===================== */

.security {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
  padding: 7rem 2rem;
  position: relative;
}
.security::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 700px 400px at 50% 0%, rgba(79, 158, 234, 0.14), transparent 70%);
  pointer-events: none;
}
.security__inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.security__quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.45;
  color: var(--ice-100);
  margin: 0 0 3rem;
}
.security__quote em { font-style: italic; color: var(--gold-300); }

.security__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}
.security__badges span {
  font-size: 0.82rem;
  color: var(--blue-200);
  border: 1px solid rgba(134, 193, 245, 0.25);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  background: rgba(79, 158, 234, 0.06);
}

/* ===================== CTA ===================== */

.cta {
  padding: 8rem 2rem;
  text-align: center;
  background:
    radial-gradient(ellipse 800px 400px at 50% 100%, rgba(242, 184, 75, 0.14), transparent 65%),
    var(--navy-950);
}
.cta__inner { max-width: 640px; margin: 0 auto; }
.cta__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  line-height: 1.12;
  margin: 0 0 1.2rem;
}
.cta__inner p { color: var(--ice-300); font-size: 1.05rem; margin: 0 0 2.4rem; }

/* ===================== Footer ===================== */

.footer {
  border-top: 1px solid rgba(219, 230, 245, 0.08);
  background: var(--navy-950);
  padding: 4.5rem 2rem 2rem;
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  padding-bottom: 3rem;
}
.footer__brand { max-width: 320px; }
.footer__logo { height: 52px; width: auto; margin-bottom: 1rem; }
.footer__brand p { color: var(--ice-400); font-size: 0.9rem; margin: 0; }

.footer__cols { display: flex; gap: 4rem; }
.footer__cols h4 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ice-400);
  margin: 0 0 1rem;
  font-weight: 600;
}
.footer__cols a {
  display: block;
  color: var(--ice-300);
  font-size: 0.92rem;
  margin-bottom: 0.7rem;
  transition: color 0.25s;
}
.footer__cols a:hover { color: var(--blue-300); }

.footer__bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(219, 230, 245, 0.06);
  font-size: 0.8rem;
  color: var(--ice-400);
}

@media (max-width: 640px) {
  .footer__inner { flex-direction: column; }
  .footer__cols { gap: 2.5rem; }
}

/* ===================== Scroll reveal ===================== */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.hero .reveal.is-visible:nth-child(1) { transition-delay: 0.05s; }
.hero__copy .reveal:nth-child(1) { transition-delay: 0s; }
.hero__copy .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero__copy .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero__copy .reveal:nth-child(4) { transition-delay: 0.24s; }
.hero__copy .reveal:nth-child(5) { transition-delay: 0.32s; }

.bento .card:nth-child(1) { transition-delay: 0s; }
.bento .card:nth-child(2) { transition-delay: 0.06s; }
.bento .card:nth-child(3) { transition-delay: 0.12s; }
.bento .card:nth-child(4) { transition-delay: 0.18s; }
.bento .card:nth-child(5) { transition-delay: 0.24s; }
.bento .card:nth-child(6) { transition-delay: 0.3s; }

.steps .step:nth-child(1) { transition-delay: 0s; }
.steps .step:nth-child(2) { transition-delay: 0.1s; }
.steps .step:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
