/* ============================================================
   A&7 · Dashboard Financeiro — HERO + FERRAMENTA (o protagonista)
   Com animações: aurora flutuante, entradas em cascata, botão brilhante
   ============================================================ */

.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 20px) 0 28px;
  background:
    radial-gradient(circle at 88% 12%, rgba(20,200,164,.16), transparent 36%),
    radial-gradient(circle at 12% 26%, rgba(59,130,246,.14), transparent 32%),
    radial-gradient(circle at 55% 90%, rgba(246,183,60,.08), transparent 40%),
    linear-gradient(180deg, var(--hero-bg-1) 0%, var(--hero-bg-2) 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

/* ---- Bolhas de aurora (animação) ---- */
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}
.aurora-1 {
  width: 380px; height: 380px;
  top: 6%; right: 4%;
  background: radial-gradient(circle, rgba(20,200,164,.55), transparent 70%);
  animation: auroraFloat 16s ease-in-out infinite alternate;
}
.aurora-2 {
  width: 320px; height: 320px;
  bottom: 8%; left: -4%;
  background: radial-gradient(circle, rgba(59,130,246,.5), transparent 70%);
  animation: auroraFloat 20s ease-in-out infinite alternate-reverse;
}
.aurora-3 {
  width: 220px; height: 220px;
  top: 55%; right: 30%;
  background: radial-gradient(circle, rgba(246,183,60,.4), transparent 70%);
  animation: auroraFloat 24s ease-in-out infinite alternate;
}
@keyframes auroraFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.15); }
  100% { transform: translate(-30px, 24px) scale(.92); }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  width: 100%;
}
.hero-copy {
  max-width: 820px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-copy .display { max-width: 820px; text-align: center; }
.hero-copy .section-lead { max-width: 680px; margin-top: 8px; text-align: center; }

/* ---- Entrada em cascata no load ---- */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}
.hero-copy > .eyebrow, .hero-copy > h1, .hero-copy > .section-lead, .tool-wrap {
  opacity: 0;
  animation: heroIn .8s cubic-bezier(.2,.7,.3,1) forwards;
}
.hero-copy > .eyebrow { animation-delay: .05s; }
.hero-copy > h1 { animation-delay: .15s; }
.hero-copy > .section-lead { animation-delay: .28s; }
.tool-wrap { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .hero-copy > .eyebrow, .hero-copy > h1, .hero-copy > .section-lead, .tool-wrap { opacity: 1; animation: none; }
}

/* ---------- Card da ferramenta ---------- */
.tool-wrap { max-width: 1040px; width: 100%; justify-self: center; margin-inline: auto; }
.tool-card {
  position: relative;
  background: var(--tool-bg);
  border: 1px solid var(--tool-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
  background-size: 200% 100%;
  animation: gradSlide 6s ease infinite;
}
@keyframes gradSlide { 0%,100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }

.tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.tool-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.tool-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
  font-size: .96rem;
}
.tool-live .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(43,208,138,.5);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(43,208,138,.5); }
  70% { box-shadow: 0 0 0 9px rgba(43,208,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(43,208,138,0); }
}
.tool-sub {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 650;
}
.tool-badge {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--line-strong);
  padding: 4px 9px;
  border-radius: 999px;
}

/* ---- Formulário ---- */
.tool-form { display: grid; gap: 12px; width: 100%; box-sizing: border-box; }
.tool-group-label {
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-group-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tool-field { display: grid; gap: 6px; min-width: 0; width: 100%; }
.tool-field-half { grid-column: 1 / -1; min-width: 0; }
.tool-label {
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.tool-label .tip {
  text-transform: none;
  font-weight: 600;
  color: var(--muted);
  opacity: .8;
}
.tool-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: .95rem;
  letter-spacing: .02em;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.tool-input::placeholder { color: var(--muted); }
.tool-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--glow);
}
.tool-input.error { border-color: var(--red); }

.tool-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  padding-right: 42px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.tool-go {
  min-width: 100%;
  position: relative;
  overflow: hidden;
}
.tool-go::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  animation: btnShine 3.2s ease infinite;
}
@keyframes btnShine {
  0%, 55% { left: -60%; }
  85%, 100% { left: 130%; }
}

.tool-extra { display: grid; gap: 8px; }
.tool-extra-receitas { display: grid; gap: 8px; }
@media (min-width: 460px) {
  .tool-extra { grid-template-columns: repeat(2, 1fr); }
  .tool-extra-receitas { grid-template-columns: repeat(2, 1fr); }
  .tool-field-half { grid-column: auto; }
}
@media (min-width: 700px) {
  .tool-extra { grid-template-columns: repeat(3, 1fr); }
  .tool-extra-receitas { grid-template-columns: repeat(3, 1fr); }
}

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.chip-label { font-size: .68rem; color: var(--muted); font-weight: 650; }
.chip {
  font-size: .68rem;
  font-weight: 700;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 9px;
  border-radius: 999px;
  transition: .22s ease;
}
.chip:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.chip-demo {
  border-color: rgba(246, 183, 60, .55);
  color: var(--gold);
  background: rgba(246, 183, 60, .08);
}



/* ---- Erro ---- */
.tool-error {
  margin-top: 14px;
  border: 1px solid var(--badge-danger-bg);
  background: var(--badge-danger-bg);
  color: var(--badge-danger-ink);
  border-radius: var(--radius-xs);
  padding: 13px 15px;
  font-size: .86rem;
  font-weight: 650;
  animation: rise .4s ease;
}

/* ---- Nota de honestidade ---- */
.tool-limit {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .74rem;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.5;
}
.tool-limit .limited { color: var(--amber); font-weight: 800; }

/* ---------- Responsivo hero ---------- */
@media (max-width: 400px) {
  .tool-card { padding: 14px; }
}

@media (min-width: 980px) {
  .hero {
    min-height: calc(100vh - var(--header-h));
    height: auto;
    padding: calc(var(--header-h) + 20px) 0 28px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
  }
  .hero-grid {
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    gap: 20px;
  }
  .hero-copy {
    max-width: 860px;
    text-align: center;
  }
  .hero-copy .display {
    font-size: clamp(1.45rem, 2.2vw, 1.95rem);
    line-height: 1.08;
  }
  .hero-copy .section-lead {
    font-size: clamp(.82rem, 1vw, .92rem);
    margin-top: 6px;
    max-width: 720px;
  }
  .hero-trust {
    margin-top: 8px;
  }
  .tool-wrap {
    justify-self: center;
    max-width: 1040px;
    width: 100%;
    margin-inline: auto;
  }
  .tool-card {
    padding: 16px 20px;
    max-height: calc(100vh - var(--header-h) - 140px);
    overflow-y: auto;
  }
  .tool-card::-webkit-scrollbar {
    width: 6px;
  }
  .tool-card::-webkit-scrollbar-track {
    background: transparent;
  }
  .tool-card::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 999px;
  }
  .tool-card-head {
    margin-bottom: 8px;
  }
  .tool-form {
    gap: 8px;
  }
  .tool-group-label {
    margin: 2px 0 0;
  }
  .tool-extra {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }
  .tool-extra-receitas {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
  }
  .tool-field {
    gap: 4px;
  }
  .tool-label {
    font-size: .64rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tool-input {
    min-height: 38px;
    padding: 0 12px;
    font-size: .88rem;
  }
  .tool-go {
    min-height: 42px;
    font-size: .9rem;
  }
  .tool-chips {
    margin-top: 2px;
  }
  .tool-limit {
    margin-top: 8px;
  }
}
