/* Paleta alinhada ao app (lib/core/theme.dart) + login_page.dart */
:root {
  --space-1: #030206;
  --space-2: #080612;
  --space-3: #0f0b1e;
  --space-4: #05030a;
  --neb-1: #2a1545;
  --neb-2: #1e143a;
  --neb-3: #3b1a40;
  --soft-purple: #a78bfa;
  --deep-purple: #7c3aed;
  --soft-pink: #f472b6;
  --income: #34d399;
  --text: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.55);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--space-1);
  overflow-x: hidden;
}

.galaxy-root {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--space-1) 0%, var(--space-2) 35%, var(--space-3) 70%, var(--space-4) 100%);
}

/* Nebulosas */
.galaxy-root::before,
.galaxy-root::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.galaxy-root::before {
  width: min(120vw, 900px);
  height: min(120vw, 900px);
  top: -18%;
  left: -15%;
  background: radial-gradient(circle, color-mix(in srgb, var(--neb-1) 35%, transparent) 0%, transparent 70%);
  filter: blur(2px);
}

.galaxy-root::after {
  width: min(100vw, 700px);
  height: min(100vw, 700px);
  bottom: -10%;
  right: -20%;
  background: radial-gradient(circle, color-mix(in srgb, var(--neb-2) 30%, transparent) 0%, transparent 65%);
}

.nebula-mid {
  position: fixed;
  bottom: 18%;
  left: -8%;
  width: min(80vw, 500px);
  height: min(80vw, 500px);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--neb-3) 25%, transparent) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.nebula-drift {
  animation: nebula-drift 28s ease-in-out infinite alternate;
}

@keyframes nebula-drift {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(4vw, -2vh) scale(1.06);
    opacity: 0.92;
  }
}

/* Poeira / partículas suaves */
.orbit-dust {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 88%, rgba(167, 139, 250, 0.35), transparent),
    radial-gradient(1px 1px at 88% 22%, rgba(244, 114, 182, 0.25), transparent),
    radial-gradient(1px 1px at 44% 8%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 72% 92%, rgba(124, 58, 237, 0.3), transparent);
  opacity: 0.5;
  animation: dust-shimmer 14s ease-in-out infinite;
}

@keyframes dust-shimmer {
  0%,
  100% {
    opacity: 0.42;
  }
  50% {
    opacity: 0.62;
  }
}

/* Estrelas */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 80% 15%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 35% 45%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1.5px 1.5px at 65% 60%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 20% 75%, rgba(255, 255, 255, 0.15), transparent),
    radial-gradient(1px 1px at 90% 85%, rgba(255, 255, 255, 0.22), transparent),
    radial-gradient(1px 1px at 50% 10%, rgba(255, 255, 255, 0.18), transparent),
    radial-gradient(1px 1px at 15% 55%, rgba(255, 255, 255, 0.12), transparent);
  opacity: 0.85;
}

.stars-twinkle {
  background-image:
    radial-gradient(1px 1px at 25% 30%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 60% 18%, rgba(167, 139, 250, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 78% 44%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 40% 82%, rgba(244, 114, 182, 0.35), transparent),
    radial-gradient(1px 1px at 92% 68%, rgba(255, 255, 255, 0.28), transparent);
  background-size: 100% 100%;
  animation: twinkle 5s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.25;
  }
  45% {
    opacity: 0.7;
  }
  55% {
    opacity: 0.65;
  }
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.logo-sparkle {
  display: flex;
  color: color-mix(in srgb, var(--soft-purple) 95%, white);
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--soft-purple) 45%, transparent));
}

.logo-text {
  line-height: 1.1;
}

.nav-dashboard {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--soft-purple) 88%, white);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--soft-purple) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--soft-purple) 32%, var(--glass-border));
  box-shadow: 0 0 20px color-mix(in srgb, var(--soft-purple) 12%, transparent);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  flex-shrink: 0;
}

.nav-dashboard:hover {
  color: #fff;
  background: color-mix(in srgb, var(--soft-purple) 26%, transparent);
  border-color: color-mix(in srgb, var(--soft-purple) 48%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--soft-purple) 22%, transparent);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1rem, 5vw, 3rem) 0;
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--glass);
  border: 1px solid var(--glass-border);
}

.badge-ai {
  color: color-mix(in srgb, var(--soft-purple) 75%, white);
  border-color: color-mix(in srgb, var(--soft-purple) 25%, var(--glass-border));
  background: color-mix(in srgb, var(--soft-purple) 8%, transparent);
}

.badge-mic {
  flex-shrink: 0;
  opacity: 0.85;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--income);
  box-shadow: 0 0 10px var(--income);
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5.5vw, 3.05rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 20ch;
}

.gradient-text {
  background: linear-gradient(120deg, var(--soft-purple), var(--soft-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 0 1.75rem;
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 52ch;
}

.lead strong,
.release-card strong {
  color: color-mix(in srgb, var(--text) 88%, var(--soft-purple));
  font-weight: 600;
}

/* Demo diálogo: fala (cima/direita) → ícone à esquerda no eixo → resposta (baixo/direita) */
.hero-showcase {
  margin-bottom: 1.75rem;
  width: 100%;
  max-width: min(100%, 720px);
  align-self: center;
}

.hero-dialog-layout {
  display: grid;
  width: 100%;
  column-gap: clamp(0.75rem, 3vw, 1.35rem);
  row-gap: 0.65rem;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  justify-items: stretch;
}

/* Mobile: ordem temporal — você → processando (ícone) → Finance AI */
.hero-eq-slot {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
}

.bubble-user-slot {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}

.ai-replies-slot {
  grid-column: 1;
  grid-row: 3;
  justify-self: end;
  width: 100%;
  max-width: min(100%, 400px);
}

@media (min-width: 768px) {
  .hero-dialog-layout {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
  }

  .hero-eq-slot {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: center;
  }

  .bubble-user-slot {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .ai-replies-slot {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    max-width: min(100%, 420px);
  }
}

.hero-eq {
  position: relative;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
}

.hero-eq-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--soft-purple) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--soft-purple) 22%, transparent);
  box-shadow:
    0 0 40px color-mix(in srgb, var(--soft-purple) 28%, transparent),
    0 0 80px color-mix(in srgb, var(--soft-purple) 12%, transparent);
  animation: ring-pulse 4s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.92;
  }
}

.eq-bars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 44px;
  padding-bottom: 2px;
}

.eq-bar {
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--soft-purple), color-mix(in srgb, var(--deep-purple) 70%, var(--soft-purple)));
  transform-origin: bottom center;
  animation: eq-dance 0.9s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1) {
  height: 38%;
  animation-delay: 0s;
}
.eq-bar:nth-child(2) {
  height: 62%;
  animation-delay: 0.12s;
}
.eq-bar:nth-child(3) {
  height: 100%;
  animation-delay: 0.24s;
}
.eq-bar:nth-child(4) {
  height: 55%;
  animation-delay: 0.08s;
}
.eq-bar:nth-child(5) {
  height: 42%;
  animation-delay: 0.2s;
}

@keyframes eq-dance {
  0% {
    transform: scaleY(0.35);
    opacity: 0.75;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.bubble {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.62rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  max-width: 100%;
  width: fit-content;
}

.bubble .dialogue {
  font-style: italic;
  color: color-mix(in srgb, var(--text) 82%, transparent);
}

.bubble-icon {
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.65;
  color: inherit;
}

.bubble-user {
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  /* Balão à direita: pontinha embaixo à direita */
  border-radius: 16px 16px 4px 16px;
  animation: bubble-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

/* Área da resposta: digitação e mensagem no mesmo slot */
.ai-replies {
  position: relative;
  width: 100%;
  min-height: clamp(175px, 42vw, 230px);
}

.typing-layer,
.bubble-ai-body {
  position: absolute;
  left: auto;
  right: 0;
  top: 0;
  width: fit-content;
  max-width: 100%;
}

.bubble-typing {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  color: color-mix(in srgb, var(--soft-purple) 70%, var(--text-muted));
  background: color-mix(in srgb, var(--soft-purple) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--soft-purple) 22%, transparent);
  border-radius: 16px 16px 4px 16px;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  animation:
    typing-layer-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards,
    typing-layer-out 0.45s ease forwards 2s;
}

.typing-avatar {
  display: flex;
  color: var(--soft-purple);
  flex-shrink: 0;
}

.typing-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.typing-name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--soft-purple) 90%, white);
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--soft-purple);
  opacity: 0.85;
  animation: dot-bounce 0.55s ease-in-out infinite alternate;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.12s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes typing-layer-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes typing-layer-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    visibility: hidden;
  }
}

@keyframes dot-bounce {
  from {
    transform: translateY(0);
    opacity: 0.35;
  }
  to {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.bubble-ai-body {
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  color: var(--text);
  background: color-mix(in srgb, var(--soft-purple) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--soft-purple) 32%, transparent);
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 0 24px color-mix(in srgb, var(--soft-purple) 14%, transparent);
  padding: 0.7rem 1rem 0.75rem;
  opacity: 0;
  transform: translateY(14px);
  animation: ai-body-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 2.12s forwards;
}

@keyframes ai-body-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-bubble-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.bubble-icon-ai-head {
  flex-shrink: 0;
  color: var(--soft-purple);
}

.ai-name {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--soft-purple) 95%, white);
}

.ai-lead {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--text) 94%, var(--soft-purple));
}

.ai-points {
  margin: 0;
  padding: 0 0 0 1rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text) 88%, transparent);
}

.ai-points li {
  margin-bottom: 0.25rem;
}

.ai-points li:last-child {
  margin-bottom: 0;
}

.ai-k {
  display: inline-block;
  min-width: 4.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-muted) 92%, var(--soft-purple));
}

.balance {
  color: var(--income);
  font-weight: 700;
}

.ai-foot {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-muted);
  font-style: italic;
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.release-card {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  margin-left: auto;
  margin-right: auto;
  padding: clamp(1.35rem, 3.5vw, 2rem);
  border-radius: 22px;
  max-width: min(100%, 640px);
  background: linear-gradient(
    158deg,
    color-mix(in srgb, var(--soft-purple) 11%, rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.release-heading {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 3.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.release-body {
  margin: 0 0 1.15rem;
}

.release-intro {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.62;
  color: var(--text-muted);
}

.release-subhead {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--soft-purple) 85%, white);
}

.release-steps-box {
  margin: 1.15rem 0 1.25rem;
  padding: clamp(1.15rem, 3.2vw, 1.55rem) clamp(1.1rem, 3.5vw, 1.65rem);
  border-radius: 18px;
  text-align: center;
  background: color-mix(in srgb, var(--soft-purple) 9%, rgba(255, 255, 255, 0.03));
  border: 1px solid color-mix(in srgb, var(--soft-purple) 22%, rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 32px rgba(0, 0, 0, 0.2);
}

.release-steps-box .release-subhead {
  margin: 0 0 1.05rem;
  text-align: center;
}

.release-steps-box .release-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.875rem;
  line-height: 1.58;
  color: var(--text-muted);
}

.release-steps-box .release-steps li {
  margin: 0;
  padding: 0;
  max-width: min(100%, 34rem);
  text-align: center;
}

/* Marcador na mesma linha do texto (sem “ponto sozinho” em cima) */
.release-steps-box .release-steps li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.5rem;
  vertical-align: 0.2em;
  border-radius: 50%;
  background: var(--soft-purple);
  box-shadow: 0 0 10px color-mix(in srgb, var(--soft-purple) 45%, transparent);
}

.release-summary {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.62;
  color: var(--text-muted);
}

.release-cta {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  font-weight: 600;
  color: color-mix(in srgb, var(--text) 92%, var(--soft-purple));
}

.release-badges-label {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.release-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.25rem;
}

.store-badge-link {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.store-badge-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.store-badge-link:focus-visible {
  outline: 2px solid var(--soft-purple);
  outline-offset: 3px;
}

.store-badge-img {
  height: 50px;
  width: auto;
  display: block;
}

.store-badge-img--apple {
  height: 48px;
}

footer {
  padding: 2rem 0 0;
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--text-muted) 80%, transparent);
}

footer a {
  color: var(--soft-purple);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .nebula-drift,
  .orbit-dust,
  .stars-twinkle {
    animation: none;
  }

  .hero-eq-ring {
    animation: none;
  }

  .eq-bar {
    animation: none;
    transform: scaleY(0.72);
    opacity: 1;
  }

  .bubble-user {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .bubble-typing {
    animation: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    pointer-events: none;
  }

  .bubble-ai-body {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .typing-dots span {
    animation: none;
  }

  .store-badge-link:hover {
    transform: none;
  }
}
