/* ============================================================
   Peso-FinFlow — marketing site
   Premium dark fintech theme mirroring the app's design tokens.
   ============================================================ */

:root {
  --bg: #0f1117;
  --bg-elev: #171b22;
  --card: rgba(255, 255, 255, 0.035);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f4f5f7;
  --muted: #9aa4b2;
  --brand: #6d5df6;
  --brand-bright: #9c6bff;
  --green: #16c784;
  --red: #ea3943;
  --gold: #f5a623;
  --blue: #4e9bff;
  --pink: #ff5c8d;
  --coral: #ff6b6b;
  --grad: linear-gradient(135deg, #9c6bff 0%, #6d5df6 100%);
  --radius: 20px;
  --radius-sm: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --shadow: 0 20px 50px -20px rgba(109, 93, 246, 0.35);
  --nav-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 3D canvas behind the hero ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(15, 17, 23, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(109, 93, 246, 0.45);
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--grad);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 8px 22px -8px rgba(109, 93, 246, 0.7);
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(109, 93, 246, 0.85); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: 0.25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(109, 93, 246, 0.22), transparent 60%),
    radial-gradient(800px 500px at 80% 110%, rgba(156, 107, 255, 0.12), transparent 55%);
}
.hero-inner { max-width: 860px; }
.pill {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--brand-bright);
  background: rgba(156, 107, 255, 0.12);
  border: 1px solid rgba(156, 107, 255, 0.3);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 1.04;
  margin-bottom: 22px;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 34px;
}
.lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 52px; }
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(24px, 6vw, 64px);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 26px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: 14px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  border: 0;
  cursor: pointer;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 14px 34px -12px rgba(109, 93, 246, 0.8); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(109, 93, 246, 0.95); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--card-border); }
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); }
.btn-muted { background: rgba(255, 255, 255, 0.05); color: var(--muted); border: 1px dashed rgba(255, 255, 255, 0.14); cursor: default; }

/* ---------- Sections ---------- */
.section { position: relative; z-index: 1; padding: 110px 24px; max-width: 1180px; margin: 0 auto; }
.section.alt { max-width: none; background: rgba(255, 255, 255, 0.015); border-top: 1px solid rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.section.alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--brand-bright);
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 800; letter-spacing: -1.5px; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 16.5px; }

.grid { display: grid; gap: 22px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.card:hover { transform: translateY(-5px); border-color: rgba(156, 107, 255, 0.35); box-shadow: var(--shadow); background: rgba(255, 255, 255, 0.05); }
.card-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.card-icon[data-tint="violet"] { background: rgba(109, 93, 246, 0.16); color: var(--brand-bright); }
.card-icon[data-tint="blue"] { background: rgba(78, 155, 255, 0.16); color: var(--blue); }
.card-icon[data-tint="green"] { background: rgba(22, 199, 132, 0.14); color: var(--green); }
.card-icon[data-tint="pink"] { background: rgba(255, 92, 141, 0.15); color: var(--pink); }
.card-icon[data-tint="coral"] { background: rgba(255, 107, 107, 0.15); color: var(--coral); }
.card-icon[data-tint="gold"] { background: rgba(245, 166, 35, 0.15); color: var(--gold); }
.card h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.features { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ---------- Download ---------- */
.download { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: stretch; }
.platform { display: flex; flex-direction: column; }
.platform-top { margin-bottom: 14px; }
.platform-top h3 { font-size: 20px; font-weight: 700; margin-top: 10px; }
.platform-desc { font-size: 14.5px; color: var(--muted); margin-bottom: 18px; }
.platform[data-featured] { border-color: rgba(156, 107, 255, 0.45); background: rgba(109, 93, 246, 0.07); }
.platform .btn { margin-top: auto; justify-content: center; }
.checks { list-style: none; margin-bottom: 24px; }
.checks li { position: relative; padding-left: 26px; margin-bottom: 9px; font-size: 14px; color: var(--text); }
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 5px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: rgba(22, 199, 132, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316c784' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 9px;
  background-position: center;
  background-repeat: no-repeat;
}
.platform-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  padding: 5px 12px;
  border-radius: 999px;
}
.platform-badge.web { background: rgba(156, 107, 255, 0.16); color: var(--brand-bright); border: 1px solid rgba(156, 107, 255, 0.35); }
.platform-badge.android { background: rgba(22, 199, 132, 0.14); color: var(--green); border: 1px solid rgba(22, 199, 132, 0.35); }
.platform-badge.ios { background: rgba(78, 155, 255, 0.15); color: var(--blue); border: 1px solid rgba(78, 155, 255, 0.35); }

/* ---------- Guide ---------- */
.guide-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
}
.tab {
  background: none;
  border: 0;
  color: var(--muted);
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(109, 93, 246, 0.8); }
.guide-panel { display: none; }
.guide-panel.active { display: block; }

.steps { list-style: none; max-width: 760px; margin: 0 auto; }
.step { display: flex; gap: 20px; padding: 26px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.step:last-child { border-bottom: 0; }
.step-num {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 17px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(109, 93, 246, 0.7);
}
.step h4 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 14.5px; }

.install { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.install .card h4 { font-size: 17px; margin: 12px 0 14px; }
.install .card a { color: var(--brand-bright); }
.mini-steps { list-style: none; counter-reset: mini; }
.mini-steps li {
  counter-increment: mini;
  position: relative;
  padding-left: 30px;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 14px;
}
.mini-steps li::before {
  content: counter(mini);
  position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px;
  border-radius: 7px;
  background: rgba(109, 93, 246, 0.18);
  color: var(--brand-bright);
  font-size: 11.5px;
  font-weight: 700;
  display: grid; place-items: center;
}
.mini-steps code { background: rgba(255, 255, 255, 0.08); padding: 2px 7px; border-radius: 6px; font-size: 12.5px; color: var(--text); }

/* ---------- What's new — static changelog summary ---------- */
.whats-new {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  align-items: stretch;
}
.wn-card { display: flex; flex-direction: column; padding: 26px 26px; }
/* Shared version/badge chips (also used by the summary cards). */
.release-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.release-version { font-size: 21px; font-weight: 800; letter-spacing: -0.5px; }
.release-badge { font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: rgba(22, 199, 132, 0.15); color: var(--green); border: 1px solid rgba(22, 199, 132, 0.35); }
.wn-card .release-top { margin-bottom: 4px; }
.wn-card .release-version { font-size: 17px; }
.wn-card .release-badge { background: rgba(245, 166, 35, 0.14); color: var(--gold); border-color: rgba(245, 166, 35, 0.35); }
.wn-card h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 10px; }
.wn-card ul { list-style: none; }
.wn-card li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13.5px;
}
.wn-card li::before {
  content: "";
  position: absolute;
  left: 2px; top: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 8px rgba(156, 107, 255, 0.7);
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 54px 24px 30px;
  background: rgba(15, 17, 23, 0.6);
}
.footer-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
.footer-brand .brand-icon { width: 36px; height: 36px; }
.footer-brand span { font-weight: 700; font-size: 17px; }
.footer-brand p { color: var(--muted); font-size: 13.5px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--brand-bright); }
.footer-note { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 36px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card-icon, .btn, .nav-cta { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: rgba(15, 17, 23, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 9px 0; width: 100%; }
  .nav-toggle { display: block; }
  .hero { min-height: 92vh; padding-top: calc(var(--nav-h) + 30px); }
  .section { padding: 76px 20px; }
}
