/* MoneyTree marketing site — matches the app's emerald gradient theme */
/* cache: HTML + this file are served no-cache via landing/_headers (updates are immediate) */
:root {
  --g0: #053828;
  --g1: #064e3b;
  --g2: #059669;
  --g3: #10b981;
  --emerald: #059669;
  --emerald-deep: #047857;
  --mint: #a7f3d0;
  --mint-soft: #d1fae5;
  --mint-bright: #6ee7b7;
  --ink: #0f2e23;
  --body: #374151;
  --muted: #6b7280;
  --card: #ffffff;
  --line: #e5e7eb;
  --radius: 16px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--g0);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Emerald gradient surfaces ---------- */
.gradient {
  background: linear-gradient(160deg, var(--g0) 0%, var(--g1) 28%, var(--g2) 78%, var(--g3) 100%);
}
.section { padding: 84px 0; }
.section-white { background: #f6faf8; }
.section-light { background: #eef6f2; }
.section-dark { background: #06432f; }

/* ---------- Floating nav (Copilot-style detached pill) ---------- */
.nav {
  position: fixed; top: 16px; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center;
  padding: 0 20px;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: 100%; max-width: 960px;
  height: 66px; padding: 0 20px 0 24px;
  background: rgba(6, 44, 33, 0.55);
  backdrop-filter: saturate(170%) blur(18px);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.nav.scrolled .nav-inner {
  background: rgba(5, 40, 30, 0.86);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.34);
}
.nav-logo { display: flex; align-items: center; overflow: visible; }
.nav-logo .wordmark { height: 76px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--mint); font-size: 15px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: #fff; }
.nav-links .btn-sm { color: var(--g0); }

/* hamburger (mobile only) */
.nav-toggle {
  display: none; width: 40px; height: 40px; padding: 0; margin: 0;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--mint); transition: transform .25s ease, opacity .2s ease;
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font); font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: 12px; border: 0; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--g3); color: #04241a; box-shadow: 0 8px 26px rgba(16, 185, 129, 0.35); }
.btn-primary:hover { background: #34d399; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(16, 185, 129, 0.45); }
.btn-ghost:hover, .btn-sm:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.45); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn-sm { padding: 9px 18px; font-size: 14px; border-radius: 10px; background: var(--g3); color: #04241a; }
.btn-sm:hover { background: #34d399; }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-emerald:hover { background: var(--emerald-deep); }

/* ---------- Hero ---------- */
.hero { padding: 132px 0 90px; position: relative; overflow: hidden; }
/* soft radial glow orbs for a modern, dynamic backdrop */
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; z-index: 0; pointer-events: none;
  filter: blur(10px);
}
.hero::before {
  width: 520px; height: 520px; top: -160px; right: -120px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.28), transparent 62%);
  animation: floatGlow 13s ease-in-out infinite;
}
.hero::after {
  width: 420px; height: 420px; bottom: -180px; left: -140px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 64%);
  animation: floatGlow 17s ease-in-out infinite reverse;
}
@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 34px) scale(1.08); }
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; position: relative; z-index: 1; }
.hero-copy { text-align: left; }
.hero .eyebrow { color: var(--mint-bright); font-size: 13px; letter-spacing: 1.4px; margin: 0 0 18px; text-align: left; }
.hero h1 {
  color: #fff; font-size: 50px; line-height: 1.05; font-weight: 700;
  letter-spacing: -1.8px; margin: 0 0 20px; max-width: 560px;
}
.hero p.sub { color: var(--mint); font-size: 19px; line-height: 1.55; max-width: 500px; margin: 0 0 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: flex-start; flex-wrap: wrap; }
.hero-note { color: var(--mint-soft); font-size: 13.5px; margin-top: 20px; }
.hero-soon { color: rgba(167, 243, 208, 0.62); font-size: 12.5px; margin-top: 6px; }

/* hero art: two overlapping phones on the right (YNAB-style) */
.hero-art { position: relative; height: 476px; }
.hero-art .phone { position: absolute; top: 8px; width: 214px; }
.hero-art .phone.front { left: 6%; z-index: 2; animation: phoneFloat 6s ease-in-out infinite; }
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art .phone.front, .hero::before, .hero::after { animation: none; }
}
.hero-art .phone.back { right: 4%; z-index: 1; opacity: 0.95; transform: rotate(7deg) translateY(26px); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* decorative leaves (injected per .leafy section) */
.leaf { position: absolute; z-index: 0; pointer-events: none; display: block; }
.leafy { position: relative; overflow: hidden; }
.leafy > .wrap { position: relative; z-index: 1; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .hero-copy { text-align: center; }
  .hero .eyebrow, .hero h1, .hero p.sub { text-align: center; margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { height: 470px; margin-top: 26px; }
  .hero-art .phone.front { left: 50%; margin-left: -142px; }
  .hero-art .phone.back { right: 50%; margin-right: -150px; }
}
@media (max-width: 480px) {
  .hero-art { height: 424px; }
  .hero-art .phone { width: 190px; }
}

/* ---------- Phone frame (hero art + feature rows) ---------- */
.phone {
  border-radius: 30px; padding: 7px; background: #04241a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 24px; }

/* ---------- Feature-facts band ---------- */
.facts { background: var(--g0); }
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { padding: 30px 20px; text-align: center; }
.fact + .fact { border-left: 1px solid rgba(255, 255, 255, 0.09); }
.fact .ico { color: var(--g3); font-size: 26px; display: block; margin-bottom: 10px; }
.fact h4 { color: #fff; font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.fact p { color: var(--mint); font-size: 13px; margin: 0; }
@media (max-width: 640px) {
  .facts-grid { grid-template-columns: 1fr; }
  .fact + .fact { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.09); }
}

/* ---------- Alternating feature rows ---------- */
.altrow { display: flex; align-items: center; gap: 56px; max-width: 940px; margin: 0 auto; }
.altrow.reverse { flex-direction: row-reverse; }
.altrow .copy { flex: 1; min-width: 0; }
.altrow .shot { flex: 0 0 232px; display: flex; justify-content: center; }
.altrow .copy .eyebrow { text-align: left; margin: 0 0 12px; }
.altrow h3 { color: var(--ink); font-size: 30px; font-weight: 600; line-height: 1.18; letter-spacing: -0.6px; margin: 0 0 14px; }
.altrow p { color: var(--muted); font-size: 16px; line-height: 1.65; margin: 0; }
.altrow .phone { width: 232px; }
.altrow.dark h3 { color: #fff; }
.altrow.dark p { color: var(--mint); }
.altrow.dark .eyebrow { color: var(--mint-bright); }
@media (max-width: 760px) {
  .altrow, .altrow.reverse { flex-direction: column; gap: 30px; text-align: center; }
  .altrow .copy .eyebrow { text-align: center; }
  .altrow .shot { flex: 0 0 auto; }
}

/* ---------- Method band ---------- */
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 820px; margin: 0 auto; }
.step { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px; padding: 26px 22px; }
.step .num { color: var(--g3); font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.step h4 { color: #fff; font-size: 19px; font-weight: 600; margin: 0 0 6px; }
.step p { color: var(--mint); font-size: 14px; line-height: 1.55; margin: 0; }
@media (max-width: 640px) { .method-grid { grid-template-columns: 1fr; } }

/* ---------- Philosophy band ---------- */
.philo { text-align: center; }
.philo .mark { color: var(--emerald); font-size: 40px; line-height: 1; font-weight: 700; margin-bottom: 6px; }
.philo blockquote { margin: 0 auto; max-width: 640px; color: var(--ink); font-size: 27px; font-weight: 500; line-height: 1.35; letter-spacing: -0.4px; }
.philo .attrib { color: var(--muted); font-size: 15px; margin-top: 18px; }

/* ---------- Section headings ---------- */
.eyebrow { color: var(--emerald); font-size: 14px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; text-align: center; margin: 0 0 12px; }
.h2 { color: var(--ink); font-size: 38px; line-height: 1.15; font-weight: 700; letter-spacing: -0.8px; text-align: center; margin: 0 auto 14px; max-width: 620px; }
.lead { color: var(--muted); font-size: 18px; text-align: center; max-width: 560px; margin: 0 auto 52px; }

/* on-gradient section headings */
.gradient .eyebrow { color: var(--mint-bright); }
.gradient .h2 { color: #fff; }
.gradient .lead { color: var(--mint); }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 26px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(5, 80, 60, 0.1); }
.card .ico {
  width: 48px; height: 48px; border-radius: 13px;
  background: #ecfdf5; color: var(--emerald);
  display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 18px;
}
.card h3 { color: var(--ink); font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }

/* compact feature list */
.feat { display: flex; gap: 14px; align-items: flex-start; }
.feat .ico { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 11px; background: #ecfdf5; color: var(--emerald); display: flex; align-items: center; justify-content: center; font-size: 21px; }
.feat h4 { color: var(--ink); font-size: 17px; font-weight: 600; margin: 3px 0 4px; }
.feat p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font); font-size: 17px; font-weight: 600; color: var(--ink);
  padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-q .chev { color: var(--emerald); font-size: 22px; transition: transform .2s ease; flex: 0 0 auto; }
.faq-item.open .chev { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a p { color: var(--body); font-size: 15px; margin: 0; padding: 0 22px 22px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 84px 0; position: relative; overflow: hidden; }
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; font-size: 40px; font-weight: 700; letter-spacing: -0.9px; margin: 0 0 14px; }
.cta-band p { color: var(--mint); font-size: 18px; line-height: 1.6; max-width: 520px; margin: 0 auto 32px; }
/* center the button as its own block so it sits cleanly between the two paragraphs
   (as inline-flex it overflowed its line-box and crowded the note below it) */
.cta-band .btn { display: flex; width: fit-content; margin: 0 auto; }
.cta-band .cta-note { color: rgba(167, 243, 208, 0.7); font-size: 13px; line-height: 1.55; max-width: 460px; margin: 32px auto 0; }

/* ---------- Footer ---------- */
.footer { background: var(--g0); padding: 48px 0 40px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.footer-logo { display: flex; align-items: center; gap: 9px; }
.footer-logo img { height: 22px; }
.footer-logo .submark { height: 44px; width: 44px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--mint); font-size: 14px; transition: color .15s; }
.footer-links a:hover { color: #fff; }
.footer-copy { color: rgba(167, 243, 208, 0.55); font-size: 13px; margin-top: 26px; }

/* ---------- Legal pages ---------- */
.legal-hero { padding: 120px 0 40px; text-align: center; }
.legal-hero h1 { color: #fff; font-size: 40px; font-weight: 700; letter-spacing: -0.8px; margin: 0 0 10px; }
.legal-hero .date { color: var(--mint); font-size: 14px; }
.legal-body { max-width: 780px; margin: -20px auto 0; padding: 44px 40px; background: #fff; border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18); }
.legal-body .intro { color: var(--body); font-size: 16px; margin: 0 0 28px; }
.legal-body h2 { color: var(--ink); font-size: 20px; font-weight: 600; margin: 30px 0 8px; }
.legal-body p { color: var(--body); font-size: 15px; margin: 0 0 4px; }
.legal-back { display: inline-flex; align-items: center; gap: 6px; color: var(--mint); font-size: 14px; font-weight: 500; margin-bottom: 20px; }
.legal-back:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
  .hero p.sub { font-size: 18px; }
  .h2 { font-size: 30px; }
  /* mobile nav: hamburger reveals a dropdown panel under the pill */
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: calc(100% + 10px); right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    min-width: 200px; padding: 8px;
    background: rgba(5, 40, 30, 0.92);
    backdrop-filter: saturate(170%) blur(18px);
    -webkit-backdrop-filter: saturate(170%) blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 11px 14px; border-radius: 9px; font-size: 16px; }
  .nav-links a:hover, .nav-links a:active { background: rgba(255, 255, 255, 0.08); color: #fff; }
  .section { padding: 60px 0; }
  .legal-body { padding: 32px 22px; border-radius: 14px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 33px; }
  .cta-band h2 { font-size: 27px; }
}
