/* ============================================
   VeniPay Landing — Design System & Styles
   ============================================ */

/* --- Tokens --- */
:root {
  --bg: #050508;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #22c55e;
  --accent-dark: #10b981;
  --accent-glow: #00ff88;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --container: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Container --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Typography --- */
.text-accent {
  color: var(--accent);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #000;
}

.btn--primary:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.35);
}

.btn--primary:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 2px;
}

.btn--outline {
  border: 1.5px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--outline:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--ghost {
  color: var(--text-secondary);
  background: transparent;
}

.btn--ghost:hover {
  color: var(--text);
}

.btn--ghost:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

.btn--full {
  width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background var(--transition), box-shadow var(--transition);
}

.header--scrolled {
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header__logo img {
  height: 36px;
  width: auto;
}

.header__nav {
  display: flex;
  gap: 2rem;
}

.header__link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.header__link:hover {
  color: var(--text);
}

.header__actions {
  display: flex;
  gap: 0.75rem;
}

.header__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: none;
}

.header__mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 5rem;
  overflow: hidden;
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

.hero__glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__tagline {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__shield-container {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1536 / 1024;
}

.hero__shield {
  width: 100%;
  height: 100%;
  animation: float 6s ease-in-out infinite;
}

.hero__shield--img {
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ============================================
   SECTIONS (generic)
   ============================================ */
.section {
  padding: 6rem 0;
}

.section--alt {
  background: rgba(255, 255, 255, 0.015);
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section__subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* ============================================
   CARDS (Proposta de Valor)
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  background: var(--surface-hover);
  border-color: rgba(34, 197, 94, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card__icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ============================================
   STEPS (Como Funciona)
   ============================================ */
.steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.step:hover {
  background: var(--surface-hover);
  border-color: rgba(34, 197, 94, 0.2);
}

.step__number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}

.step__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.step__text {
  font-size: 0.9rem;
  line-height: 1.6;
}

.step__connector {
  display: flex;
  align-items: center;
  width: 48px;
  flex-shrink: 0;
  position: relative;
}

.step__connector::after {
  content: '';
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--border), var(--accent), var(--border));
  opacity: 0.4;
}

/* ============================================
   TRUST (Seguranca)
   ============================================ */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.trust-item {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.trust-item:hover {
  border-color: rgba(34, 197, 94, 0.2);
}

.trust-item__icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin: 0 auto 1rem;
}

.trust-item__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.trust-item__text {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================
   SEGMENTS
   ============================================ */
.segments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.segment {
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: all var(--transition);
}

.segment:hover {
  background: var(--surface-hover);
  border-color: rgba(34, 197, 94, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.segment__icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin: 0 auto 1.25rem;
}

.segment__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.segment__text {
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  padding: 5rem 0;
}

.cta-block {
  text-align: center;
  padding: 4rem 2rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(34, 197, 94, 0.1) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
}

.cta-block__title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.cta-block__text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.cta-block__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 3rem;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__brand > a {
  align-self: flex-start;
  display: block;
}

.footer__brand .footer__logo {
  /* Evita stretch horizontal do flex (distoía o PNG em “faixa” verde) */
  align-self: flex-start;
  width: auto;
  height: auto;
  max-height: 64px;
  max-width: min(220px, 100%);
  object-fit: contain;
  object-position: left center;
}

.footer__tagline {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__col-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.footer__link {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__link:hover {
  color: var(--accent);
}

.footer__bottom {
  grid-column: 1 / -1;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================
   TOAST
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.4rem;
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.4s ease-out;
  max-width: 360px;
}

.toast__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================
   MOBILE NAV OVERLAY
   ============================================ */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(5, 5, 8, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.mobile-nav--open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}

.mobile-nav__link {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition);
}

.mobile-nav__link:hover {
  color: var(--accent);
}

.mobile-nav__divider {
  width: 60px;
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.5rem 0;
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
  .header__nav,
  .header__actions {
    display: none;
  }

  .header__mobile-toggle {
    display: flex;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__ctas {
    justify-content: center;
  }

  .hero__shield-container {
    width: min(100%, 360px);
    margin: 0 auto;
  }

  .steps {
    flex-direction: column;
    gap: 1rem;
  }

  .step__connector {
    width: auto;
    height: 32px;
    justify-content: center;
  }

  .step__connector::after {
    width: 2px;
    height: 100%;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .footer__links {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4rem 0;
  }

  .cards-grid,
  .trust-grid,
  .segments-grid {
    grid-template-columns: 1fr;
  }

  .footer__links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cta-block {
    padding: 3rem 1.5rem;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
  }

  .toast {
    max-width: 100%;
  }
}

/* --- Focus visible for keyboard nav --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* --- Selection --- */
::selection {
  background: rgba(34, 197, 94, 0.25);
  color: var(--text);
}
