/* =========================================================
   Hero + mockup do painel
   ========================================================= */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(48px, 7vw, 96px));
  padding-bottom: clamp(88px, 10vw, 136px);
  overflow: hidden;
}

/* ---------- Fundo: brilho verde suave + folhas de palmeira abstratas ---------- */

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(46% 58% at 92% 2%, rgba(0, 223, 162, 0.15), transparent 72%),
    radial-gradient(36% 40% at 0% 100%, rgba(0, 223, 162, 0.06), transparent 70%);
  pointer-events: none;
}

/* Folhas de palmeira abstratas no canto superior direito (versão aprovada).
   Só folhas: sem tronco, sem cocos, nada que pareça uma árvore desenhada.
   Discretas: baixa opacidade e esmaecendo em direção ao conteúdo. */
.hero__palm {
  position: absolute;
  top: -24px;
  right: -40px;
  width: clamp(440px, 64vw, 1040px);
  height: auto;
  overflow: visible;
  fill: var(--brand-500);
  opacity: 0.11; /* intensidade das folhas: subir ou descer aqui */
  -webkit-mask-image: radial-gradient(120% 120% at 100% 0%, #000 22%, transparent 70%);
  mask-image: radial-gradient(120% 120% at 100% 0%, #000 22%, transparent 70%);
}

@media (min-width: 1024px) {
  .hero__palm {
    opacity: 0.15;
  }
}

/* Balanço lento das folhas, cada uma no seu ritmo */
.palm-sway {
  transform-origin: 850px 30px;
  animation: palm-sway 9s ease-in-out infinite;
}

.palm-sway:nth-child(odd) {
  animation-duration: 11s;
  animation-delay: -4s;
}

.palm-sway:nth-child(3n) {
  animation-duration: 13s;
  animation-delay: -7s;
}

@keyframes palm-sway {
  0%, 100% { transform: rotate(-1.2deg); }
  50% { transform: rotate(1.6deg); }
}

.hero__grid {
  position: relative;
  display: grid;
  gap: 72px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
  }
}

@media (min-width: 1200px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
    gap: 88px;
  }
}

/* ---------- Texto ---------- */

.hero__title {
  margin-top: 28px;
  font-size: clamp(2.5rem, 1.4rem + 5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.hero__subtitle {
  max-width: 520px;
  margin-top: 28px;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--gray-600);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.hero__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  position: relative;
  max-width: 560px;
  margin-top: 40px;
  padding-top: 28px;
}

/* Linha divisória que some para a direita */
.hero__checks::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gray-200) 55%, transparent);
}

.hero__checks li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-700);
}

.hero__checks .icon {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: var(--brand-500);
  color: var(--black);
  stroke-width: 3.2;
}

@media (max-width: 479px) {
  .hero__actions .btn {
    width: 100%;
  }

  .hero__checks {
    flex-direction: column;
  }
}

/* ---------- Visual ---------- */

.hero__visual {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

/* Profundidade atrás do painel, em duas camadas:
   1) glow verde difuso  2) um segundo cartão aparecendo por baixo */
.hero__visual::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 14% -4% -8% 10%;
  border-radius: 48px;
  background: linear-gradient(135deg, var(--brand-300), var(--brand-500));
  filter: blur(64px);
  opacity: 0.26;
}

@media (min-width: 640px) {
  .hero__visual::before {
    opacity: 0.36;
  }
}

.hero__visual::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 24px 20px -14px;
  border: 1px solid rgba(10, 10, 11, 0.06);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.panel {
  position: relative;
  z-index: 1;
  container-type: inline-size;
  padding: 20px;
  /* Borda com um fio verde no canto superior esquerdo, sumindo para o cinza */
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    linear-gradient(150deg, var(--brand-300), rgba(10, 10, 11, 0.08) 28%) border-box;
  box-shadow:
    0 1px 2px rgba(10, 10, 11, 0.04),
    0 14px 28px -12px rgba(10, 10, 11, 0.08),
    0 44px 88px -32px rgba(0, 105, 76, 0.26);
}

@media (min-width: 640px) {
  .panel {
    padding: 28px;
  }
}

.panel__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel__top .logo__symbol {
  height: 26px;
}

.panel__title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
}

.panel__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--success-soft);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
}

.panel__live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.panel__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
}

.panel__balance {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.panel__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
}

.panel__delta .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

/* Mini gráfico ao lado do saldo (só quando o painel tem largura para isso) */
.panel__spark {
  display: none;
  flex-shrink: 0;
  width: 132px;
  height: auto;
  margin-bottom: 6px;
  overflow: visible;
}

.panel__spark-line {
  fill: none;
  stroke: var(--brand-600);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@container (min-width: 440px) {
  .panel__spark {
    display: block;
  }
}

.panel__amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 9cqi, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.panel__amount small {
  font-size: 0.5em;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0;
}

.panel__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.stat {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
}

.stat:first-child {
  grid-column: 1 / -1;
}

.stat strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@container (min-width: 440px) {
  .panel__stats {
    grid-template-columns: 1.3fr 1fr 1.15fr;
  }

  .stat:first-child {
    grid-column: auto;
  }
}

.panel__list {
  margin-top: 20px;
}

.panel__list-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.8125rem;
  font-weight: 600;
}

.panel__list-head span:last-child {
  font-weight: 500;
  color: var(--gray-500);
}

.tx {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.tx:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.tx__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  font-size: 0.875rem;
}

.tx__info strong,
.tx__value strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.tx__info small {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.tx__value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.tx__value strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Notificação flutuante ---------- */

.hero__toast {
  position: absolute;
  z-index: 2;
  top: -40px; /* no mobile fica acima do topo do painel, sem cobrir o título */
  right: -6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  background: var(--white);
  border: 1px solid rgba(10, 10, 11, 0.06);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(10, 10, 11, 0.04), 0 14px 32px -10px rgba(10, 10, 11, 0.16);
  animation: float 5s ease-in-out infinite;
}

@media (min-width: 640px) {
  .hero__toast {
    top: -22px;
    right: -20px;
  }
}

.hero__toast-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.8125rem;
}

.hero__toast-icon .icon {
  stroke-width: 3;
}

.hero__toast strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
}

.hero__toast small {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.3;
}

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