/* ==========================================================================
   Page — Home (web/welcome.blade.php + web/welcome/*): hero + money-flow band,
   how it works, anonymous vault. Shared blocks (section, feature, CTA,
   navbar, footer) live in components/ and layouts/.
   ========================================================================== */

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 72px) 0 64px;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #f7f7ff 0%, #ffffff 70%);
}
/* Drifting aurora orbs */
.hero__bg::before {
  content: "";
  position: absolute; inset: -20% -10% 30% -10%;
  background:
    radial-gradient(38% 46% at 22% 30%, rgba(99, 102, 241, .28), transparent 70%),
    radial-gradient(34% 42% at 78% 22%, rgba(192, 38, 211, .20), transparent 70%),
    radial-gradient(30% 40% at 55% 60%, rgba(56, 189, 248, .18), transparent 70%);
  filter: blur(40px);
  animation: aurora-drift 18s ease-in-out infinite;
}
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}

.hero__inner { display: flex; flex-direction: column; align-items: center; gap: 64px; }
.hero__content { max-width: 820px; text-align: center; }
.hero__content > * { animation: rise-in .9s var(--ease) backwards; }
.hero__content > :nth-child(2) { animation-delay: 80ms; }
.hero__content > :nth-child(3) { animation-delay: 160ms; }
.hero__content > :nth-child(4) { animation-delay: 240ms; }
.hero__content > :nth-child(5) { animation-delay: 320ms; }

.hero__title {
  margin: 26px 0 22px;
  font-size: clamp(2.6rem, 6.4vw, 4.75rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.045em;
  color: var(--ink);
}
.hero__text {
  max-width: 620px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.hero__meta {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px 24px;
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted);
}
.hero__meta-item { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Floating card (chips of the money-flow band below) ---------- */
.float {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  white-space: nowrap;
  animation: floaty 6s ease-in-out infinite;
}
/* .icon-tile .icon-tile--<tone> */
.float__icon { width: 38px; height: 38px; }
.float__icon svg { width: 18px; height: 18px; }
.float__label { font-size: 12px; color: var(--muted); line-height: 1.3; }
.float__value { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.35; }

/* ==========================================================================
   Hero money-flow band (web/welcome/hero-flow.blade.php) — bridge into Features
   A balance line draws itself over a soft gradient area; chips float above it and
   drift at different speeds on scroll (js/motion.js [data-parallax] → --parallax).
   The band fades out at the bottom, so the hero melts into the next section.
   ========================================================================== */
.hero:has(.hero-flow) { padding-bottom: 0; }
.hero:has(.hero-flow) + .section { padding-top: 56px; }
/* the grid + aurora fade out too, so the hero has no visible bottom edge */
.hero:has(.hero-flow) .hero__bg {
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.hero-flow {
  position: relative;
  width: 100%; max-width: 1180px;
  height: 360px;
}
.hero-flow [data-parallax] { transform: translate3d(0, var(--parallax, 0px), 0); will-change: transform; }

/* the fade is on the chart only — a mask on the whole band would also cut off chips drifting up */
.hero-flow__chart {
  position: absolute; inset: 40px 0 64px;   /* empty strip below: nothing (chart, chip shadows) touches the hero's clipped bottom */
  -webkit-mask-image: linear-gradient(180deg, #000 65%, transparent);
  mask-image: linear-gradient(180deg, #000 65%, transparent);
}
.hero-flow__chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hero-flow__area { animation: fade-in 1.4s var(--ease) .6s backwards; }
.hero-flow__line,
.hero-flow__expenses { fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.hero-flow__line { stroke-width: 3; animation: flow-draw 1.8s var(--ease) .4s backwards; }
.hero-flow__expenses { stroke: var(--slate-300); stroke-width: 2; stroke-dasharray: .006 .008; opacity: .8; animation: fade-in 1.2s var(--ease) 1s backwards; }
@keyframes flow-draw { from { stroke-dashoffset: 1; } }

.hero-flow__dot {
  position: absolute; left: var(--x); top: var(--y);
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50);
  animation: scale-in .5s var(--ease) 1.6s backwards;
}
.hero-flow__dot--pulse::after {
  content: ""; position: absolute; inset: -9px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  animation: flow-pulse 2.4s ease-out 2.2s infinite;
}
@keyframes flow-pulse { from { opacity: .6; transform: scale(.5); } to { opacity: 0; transform: scale(1.6); } }

.hero-flow__chip { position: absolute; animation: rise-in .9s var(--ease) backwards; }
.hero-flow__chip--income   { left: 2%;   top: 34%; animation-delay: 1s; }
.hero-flow__chip--expenses { left: 27%;  top: 6%;  animation-delay: 1.15s; }
.hero-flow__chip--saved    { right: 30%; top: 2%;  animation-delay: 1.3s; }
.hero-flow__chip--vault    { right: 3%;  top: 50%; animation-delay: 1.45s; }

@media (max-width: 1024px) {
  .hero-flow__chip--expenses { left: 22%; }
  .hero-flow__chip--saved { right: 18%; }
}
@media (max-width: 720px) {
  .hero-flow { height: 270px; }
  .hero-flow__chart { inset: 70px -16px 40px; }
  .hero-flow__chip--expenses,
  .hero-flow__chip--saved { display: none; }
  .hero-flow [data-parallax] { transform: none; }   /* no room to drift on a phone */
  .hero-flow__chip--income { left: 0; top: 0; }
  .hero-flow__chip--vault { right: 0; top: 74px; }
  .hero:has(.hero-flow) + .section { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-flow *, .hero-flow *::after { animation: none !important; }
}

/* ==========================================================================
   How it works (steps) + vault section (benefits layout, checklist)
   ========================================================================== */
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.benefits__visual { display: flex; flex-direction: column; gap: 20px; }

.checklist { display: flex; flex-direction: column; gap: 24px; margin-top: 36px; }
.checklist__item { display: flex; gap: 16px; }
/* .icon-tile .icon-tile--xl .icon-tile--raised */
.checklist__icon { border: 1px solid var(--border); }
.checklist__title { font-size: 17px; font-weight: 700; color: var(--ink); }
.checklist__text { margin-top: 4px; font-size: 15px; color: var(--muted); }

/* Simplified "How it works" (web/welcome/how-it-works.blade.php): numbered steps in one row,
   no boxes — a dashed line links the icons. Same tile / type styles as the checklist above. */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; max-width: 1000px; margin: 0 auto; }
.steps::before {
  content: "";
  position: absolute; top: 22px; left: 16.66%; right: 16.66%;
  border-top: 1px dashed var(--border);
}
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
/* .icon-tile .icon-tile--xl .icon-tile--raised */
.step__icon { border: 1px solid var(--border); }
.step__num { margin-top: 16px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--primary); }
.step__title { margin-top: 6px; font-size: 17px; font-weight: 700; color: var(--ink); }
.step__text { max-width: 280px; margin-top: 6px; font-size: 15px; color: var(--muted); }

/* Anonymous Financial Vault (web/welcome/vault.blade.php): account card ⟷ vault card, kept apart.
   Cards: raised surface; the dashed line in the gap = "no stored link". */
.vault-map { display: flex; flex-direction: column; align-items: stretch; }
.vault-map__card {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.vault-map__card--vault { border-color: var(--primary-100); box-shadow: var(--shadow-card), 0 0 0 4px var(--primary-50); }
.vault-map__title { font-size: 17px; font-weight: 700; color: var(--ink); }
.vault-map__text { margin-top: 2px; font-size: 14px; color: var(--muted); }

.vault-map__gap { position: relative; display: flex; justify-content: center; padding: 28px 0; }
.vault-map__line {
  position: absolute; top: 0; bottom: 0; left: 50%;
  border-left: 2px dashed var(--border-strong);
}
.vault-map__note {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 90%;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 13px; font-weight: 600; text-align: center;
  color: var(--text);
}
.vault-map__note .icon { flex-shrink: 0; color: var(--primary); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .benefits { grid-template-columns: 1fr; gap: 56px; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps::before { display: none; }
}

@media (max-width: 720px) {
  .hero { padding-top: calc(var(--nav-h) + 48px); }
  .hero__inner { gap: 48px; }
  .hero__actions > .btn { flex: 1 1 100%; }
}
