/* Spendy landing — dark gradient fintech.
 *
 * Direction chosen by the user from three (see public/_design/directions.html). The reference
 * class is Stripe / Mercury / Robinhood: a deep ground, ONE feathered gradient mesh, hairline
 * detail, and real product data as the graphic. Our own brand green stays the accent rather
 * than drifting to the generic fintech navy — the app is green and the store art is green.
 *
 * Type is Sora (display) + Plus Jakarta Sans (body). Deliberate: a system stack carries no
 * identity, and it was part of why the first two attempts read as pale.
 *
 * The page is dark at every system setting. That is a brand decision, not an oversight: a
 * light variant of this direction would be a different design, not a theme of it.
 */

:root {
  --ground: #07100c;
  --surface: #0e1a15;
  --raised: #152420;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-2: rgba(255, 255, 255, 0.14);
  --text: #f1f6f2;
  --dim: #94a89b;
  --mint: #5fcfa6;
  --mint-soft: #8fd9bc;
  --green: #1d9e75;
  --green-deep: #0f6e56;
  --gold: #e0b45c;
  --coral: #ff8b85;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 16px/1.65 "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--mint); text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: Sora, "Plus Jakarta Sans", -apple-system, sans-serif;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  font-weight: 700;
}
h1 { font-size: clamp(38px, 6.4vw, 66px); }
h2 { font-size: clamp(27px, 3.8vw, 40px); }
h3 { font-size: 19px; letter-spacing: -0.02em; margin-bottom: 8px; }

p { margin: 0 0 16px; max-width: 62ch; }
.lead { font-size: clamp(17px, 1.9vw, 20px); line-height: 1.6; color: var(--dim); }
.muted { color: var(--dim); }
.small { font-size: 14px; }

.step {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 16px;
}

/* Bands ------------------------------------------------------------------- */
.band { padding: 76px 0; position: relative; }
.band-tight { padding: 40px 0 8px; }
.inner { max-width: 1080px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }
.inner.narrow { max-width: 780px; }
.inner.center { text-align: center; }
.inner.center p { margin-inline: auto; }

/* A hairline that fades at both ends reads as depth; a full-width 1px rule reads as a table. */
.band-plain::before,
.band-tint::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hair) 20%, var(--hair) 80%, transparent);
}
.band-tint { background: linear-gradient(180deg, rgba(29, 158, 117, 0.05), transparent 60%); }

/* The single mesh. One per page, feathered to the ground colour, slowly drifting. */
.band-hero { padding: 8px 0 0; overflow: hidden; }
.band-hero::after {
  content: "";
  position: absolute;
  inset: -30% -20% auto -20%;
  height: 900px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 46% at 22% 32%, rgba(95, 207, 166, 0.42), transparent 62%),
    radial-gradient(32% 42% at 78% 20%, rgba(29, 158, 117, 0.36), transparent 62%),
    radial-gradient(40% 48% at 62% 72%, rgba(224, 180, 92, 0.18), transparent 64%);
  filter: blur(20px);
  animation: drift 22s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(26px, -22px, 0) scale(1.06); }
}

/* Header ------------------------------------------------------------------ */
/* Sticky, because the page is 16 sections long and the download button is the only thing on
   it that has a job. Translucent + blurred so the mesh still reads underneath. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 16, 12, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header.stuck { border-bottom-color: var(--hair); background: rgba(7, 16, 12, 0.9); }
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: Sora, sans-serif; font-weight: 700; font-size: 18px;
  letter-spacing: -0.02em; text-decoration: none; color: var(--text);
  min-height: 44px;
}
.brand img { border-radius: 8px; }
.header-nav { display: flex; align-items: center; gap: 10px; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  text-decoration: none; font-weight: 500; font-size: 15px; color: var(--dim);
  border-radius: 10px; transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* Language switcher. Both languages visible, active one marked, and each half is a real
   44px target — the previous 13px pill was below the minimum on a phone. */
.langs { display: inline-flex; align-items: center; border: 1px solid var(--hair-2); border-radius: 12px; padding: 3px; gap: 2px; }
.langs .lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 38px; padding: 0 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  border-radius: 9px; text-decoration: none; color: var(--dim);
  transition: background 0.2s ease, color 0.2s ease;
}
.langs a.lang:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.langs .lang.on { background: rgba(95, 207, 166, 0.16); color: var(--mint); }

/* Screen-reader-only text: the language codes alone are terse out of context. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Below this width three targets start fighting; guides lives in the body and footer too. */
/* The button carries two labels; only one is ever rendered. WHY not just shrink the padding:
   below 400px the full label overflowed the bar entirely, and a clipped download button is
   worse than a shorter word. */
.lbl-short { display: none; }
@media (max-width: 560px) {
  .header-inner { padding: 10px 14px; gap: 8px; }
  .nav-link { display: none; }
  .brand span { font-size: 17px; }
  .lbl-full { display: none; }
  .lbl-short { display: inline; }
  .langs .lang { min-width: 40px; }
}

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: linear-gradient(100deg, var(--mint), var(--green));
  color: #04150f;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 15px 28px;
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(95, 207, 166, 0.26);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(95, 207, 166, 0.36); }
.btn-sm {
  padding: 9px 18px; font-size: 14px; border-radius: 10px;
  background: none; color: var(--text); border: 1px solid var(--hair-2); box-shadow: none;
}
.btn-sm:hover { background: rgba(255, 255, 255, 0.06); transform: none; box-shadow: none; }
.cta { margin: 26px 0 0; }
.cta p { margin: 12px 0 0; }
.cta-inline { margin: 6px 0 24px; }
.inner.center .cta p { margin-inline: auto; }

/* Devices ----------------------------------------------------------------- */
.device {
  display: block; width: auto; max-height: 430px;
  border-radius: 24px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--hair);
}
@media (prefers-reduced-motion: no-preference) {
  .float { animation: float 8s ease-in-out infinite; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* Hero -------------------------------------------------------------------- */
.hero-grid { display: grid; gap: 26px; }
.hero-text { padding-top: 26px; }
.hero-media { display: flex; justify-content: center; align-self: end; }
.hero-media .device { border-radius: 24px 24px 0 0; max-height: 400px; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: end; gap: 44px; }
  .hero-text { padding: 52px 0 88px; }
  .hero-media .device { max-height: 540px; }
}

/* Glass panels — the "live data" graphic ---------------------------------- */
.glass {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  padding: 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.glass-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim);
  margin-bottom: 18px;
}
.metric { font-family: Sora, sans-serif; font-size: clamp(30px, 4vw, 42px); font-weight: 700; letter-spacing: -0.03em; margin: 0; }
.metric small { display: block; font-family: "Plus Jakarta Sans", sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }

.rows { margin-top: 18px; }
.row-line { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.row-line b { font-weight: 600; }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-bottom: 16px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--mint), var(--green)); width: 0; transition: width 1.1s var(--ease); }
.bar.over i { background: linear-gradient(90deg, var(--coral), #e24b4a); }
.bar.gold i { background: linear-gradient(90deg, var(--gold), #b8862f); }

/* Donut — drawn with stroke-dashoffset when it scrolls into view */
.donut { display: block; margin: 0 auto; }
.donut circle { fill: none; stroke-width: 14; stroke-linecap: round; }
.donut .track { stroke: rgba(255, 255, 255, 0.08); }
.donut .seg { stroke-dasharray: 314; stroke-dashoffset: 314; transition: stroke-dashoffset 1.3s var(--ease); }
.donut-wrap { position: relative; }
.donut-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-mid b { font-family: Sora, sans-serif; font-size: 26px; letter-spacing: -0.02em; }
.donut-mid span { display: block; font-size: 12px; color: var(--dim); letter-spacing: 0.1em; text-transform: uppercase; }
.legend { display: flex; gap: 18px; justify-content: center; margin-top: 18px; font-size: 14px; flex-wrap: wrap; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 7px; }

/* Trend line — drawn with stroke-dasharray */
.spark { width: 100%; height: auto; display: block; }
.spark .line { fill: none; stroke: var(--mint); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 900; stroke-dashoffset: 900; transition: stroke-dashoffset 1.8s var(--ease); }
.spark .area { fill: url(#sparkfill); opacity: 0; transition: opacity 1s ease 0.5s; }
.spark .dot { fill: var(--mint); opacity: 0; transition: opacity 0.4s ease 1.4s; }

/* Feature splits ---------------------------------------------------------- */
.feature { display: grid; gap: 30px; align-items: center; }
.feature-media { margin: 0; display: flex; justify-content: center; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 60px; }
  .feature.reverse .feature-text { order: 2; }
  .feature.reverse .feature-media { order: 1; }
}

/* Stat strip -------------------------------------------------------------- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
.stat { border: 1px solid var(--hair); border-radius: var(--r); padding: 18px; background: var(--surface); }
.stat b { display: block; font-family: Sora, sans-serif; font-size: clamp(24px, 4vw, 34px); font-weight: 700; letter-spacing: -0.03em; color: var(--mint); }
.stat span { font-size: 13px; color: var(--dim); }

/* Pair band --------------------------------------------------------------- */
.pair-head { max-width: 60ch; margin-bottom: 36px; }
.pair { display: grid; gap: 34px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .pair { grid-template-columns: 1fr 1fr; gap: 44px; } }
.pair figure { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pair figcaption { font-size: 15px; line-height: 1.55; margin-top: 18px; max-width: 34ch; color: var(--dim); }

/* Plans ------------------------------------------------------------------- */
.plans { display: grid; gap: 18px; margin-top: 30px; }
@media (min-width: 720px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 28px; }
.plan-alt { background: linear-gradient(160deg, rgba(29, 158, 117, 0.16), rgba(14, 26, 21, 0.9)); border-color: rgba(95, 207, 166, 0.3); }
.plan ul { list-style: none; padding: 0; margin: 0; }
.plan li { padding: 11px 0 11px 28px; position: relative; font-size: 15px; line-height: 1.5; border-bottom: 1px solid var(--hair); }
.plan li:last-child { border-bottom: 0; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--mint); font-weight: 700; }

/* Cards ------------------------------------------------------------------- */
.section-title { margin-bottom: 28px; }
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 22px; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r);
  padding: 24px; transition: transform 0.2s var(--ease), border-color 0.2s ease, background 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(95, 207, 166, 0.35); background: var(--raised); }
.card h3 a { text-decoration: none; color: var(--text); }
.card p { margin: 0; font-size: 15px; color: var(--dim); }

/* FAQ --------------------------------------------------------------------- */
.faq details { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); padding: 18px 22px; margin-bottom: 10px; }
.faq details[open] { background: var(--raised); border-color: var(--hair-2); }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mint); font-weight: 700; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 14px 0 0; color: var(--dim); }

/* Closing CTA ------------------------------------------------------------- */
.band-cta { overflow: hidden; }
.band-cta::after {
  content: ""; position: absolute; inset: auto -20% -60% -20%; height: 460px; z-index: 0; pointer-events: none;
  background: radial-gradient(45% 60% at 50% 40%, rgba(95, 207, 166, 0.26), transparent 66%);
  filter: blur(24px);
}

/* Guides ------------------------------------------------------------------ */
.guide { padding: 36px 0 8px; max-width: 730px; margin: 0 auto; }
.guide h1 { font-size: clamp(31px, 4.6vw, 46px); }
.guide section { padding: 34px 0 0; }
.guide p { color: #cfdbd3; }
.crumbs { font-size: 14px; color: var(--dim); margin-bottom: 18px; }
.crumbs a { color: var(--dim); }
.guide ul, .guide ol { max-width: 62ch; padding-left: 22px; color: #cfdbd3; }
.guide li { margin-bottom: 8px; }
.guide figure { margin: 30px 0; }
.guide figure img { display: block; border-radius: 20px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--hair); max-height: 440px; width: auto; }
.guide figcaption { font-size: 14px; color: var(--dim); margin-top: 14px; max-width: 62ch; }

/* Footer ------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--hair); padding: 48px 22px 56px; background: #050b08; }
.site-footer .footer-cols { max-width: 1080px; margin: 0 auto; display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-footer .footer-cols { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer strong { font-family: Sora, sans-serif; letter-spacing: -0.02em; }
.site-footer ul { list-style: none; padding: 0; margin: 12px 0 0; }
.site-footer li { margin-bottom: 9px; font-size: 15px; }
.site-footer a { text-decoration: none; color: var(--dim); }
.site-footer a:hover { color: var(--mint); }
.site-footer > .small { max-width: 1080px; margin: 30px auto 0; color: var(--dim); }

/* Scroll reveal ----------------------------------------------------------- */
.rv { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s var(--ease); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, .band-hero::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}

/* The dashboard graphic — two glass panels side by side on wide screens. */
.dash { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .dash { grid-template-columns: 1.15fr 0.85fr; align-items: start; } }
.dash .stats { grid-template-columns: repeat(3, 1fr); margin-top: 22px; }
.dash .stat { padding: 14px; background: rgba(255, 255, 255, 0.03); }
.dash .stat b { font-size: clamp(20px, 3vw, 26px); }
