/* =============================================================================
   OnTrack Budget — marketing site styles.
   Brand-matched to the app (Theme B "Friendly Growth"): emerald palette,
   Manrope, rounded cards, cream background. Pure static, no framework.
   Shared by / (English) and /fr/ (French).
============================================================================= */

:root {
  --emerald-700: #047857;
  --emerald-600: #059669;
  --teal-600:    #0d9488;
  --ink:         #0f172a;
  --ink-soft:    #334155;
  --muted:       #64748b;
  --cream:       #fdfbf7;
  --card:        #ffffff;
  --line:        rgba(15, 23, 42, 0.08);
  --shadow-sm:   0 2px 12px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-lg:   0 20px 60px rgba(4, 120, 87, 0.18), 0 6px 18px rgba(15, 23, 42, 0.08);
  --radius:      18px;
  --maxw:        1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--emerald-700) 0%, var(--teal-600) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(4, 120, 87, 0.38); }
.btn-ghost {
  background: rgba(13, 148, 136, 0.08);
  color: var(--emerald-700);
}
.btn-ghost:hover { background: rgba(13, 148, 136, 0.14); }
.btn-lg { padding: 1rem 2rem; font-size: 1.08rem; }

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 251, 247, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand img { width: 36px; height: 36px; border-radius: 9px; display: block; }
.brand .name { font-weight: 800; font-size: 1.2rem; }
.brand .name .light { color: var(--muted); font-weight: 500; }
.nav .spacer { flex: 1; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--emerald-700); }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 700;
}
.lang-toggle a { padding: 0.35rem 0.7rem; color: var(--muted); }
.lang-toggle a.active { background: var(--emerald-700); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding: 4.5rem 0 3rem; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-600);
  background: rgba(13, 148, 136, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1.1rem; }
.hero h1 .grad {
  background: linear-gradient(135deg, var(--emerald-700), var(--teal-600));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lede { font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 1.8rem; max-width: 30rem; }
.hero-cta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.hero-note { font-size: 0.85rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Section scaffolding ---------- */
section { padding: 4rem 0; }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 3rem; }
.section-head h2 { font-size: 2.1rem; font-weight: 800; margin-bottom: 0.8rem; }
.section-head p { font-size: 1.1rem; color: var(--ink-soft); }

/* ---------- Feature grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.feature .ficon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(4,120,87,0.12), rgba(13,148,136,0.12));
  margin-bottom: 1rem;
}
.ficon svg { width: 24px; height: 24px; stroke: var(--emerald-700); }
.feature h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.45rem; }
.feature p { color: var(--ink-soft); font-size: 0.96rem; }

/* ---------- Showcase band ---------- */
.showcase { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.showcase-grid.reverse .browser { order: -1; }
.showcase h2 { font-size: 1.9rem; font-weight: 800; margin-bottom: 1rem; }
.showcase ul { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.showcase li { display: flex; gap: 0.7rem; align-items: flex-start; margin-bottom: 0.9rem; color: var(--ink-soft); }
.showcase li svg { width: 20px; height: 20px; stroke: var(--emerald-600); flex-shrink: 0; margin-top: 3px; }

/* ---------- Browser mockup ---------- */
.browser {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: #f1f5f4;
  border-bottom: 1px solid var(--line);
}
.browser-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.browser-bar .dot.r { background: #ff5f57; }
.browser-bar .dot.y { background: #febc2e; }
.browser-bar .dot.g { background: #28c840; }
.browser-bar .url {
  flex: 1;
  margin-left: 0.6rem;
  background: #fff;
  border-radius: 6px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
}
.browser-body { padding: 1.1rem; background: var(--cream); }

/* toolbar strip inside mockup */
.mock-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--emerald-700), var(--teal-600));
  color: #fff;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  margin-bottom: 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
}
.mock-toolbar .leaf { width: 20px; height: 20px; }

/* stat row */
.mock-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-bottom: 0.9rem; }
.mock-stat { background: #fff; border-radius: 10px; padding: 0.6rem 0.7rem; box-shadow: var(--shadow-sm); }
.mock-stat .l { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.mock-stat .v { font-size: 0.98rem; font-weight: 700; margin-top: 2px; }
.mock-stat .v.pos { color: var(--emerald-700); }

/* mock table */
.mock-card { background: #fff; border-radius: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
.mock-section-h { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; padding: 0.55rem 0.8rem 0.2rem; }
.mock-row { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.8rem; border-top: 1px solid var(--line); font-size: 0.82rem; }
.mock-row:first-of-type { border-top: none; }
.mock-row .cat { color: var(--ink-soft); font-weight: 600; }
.mock-row .amt { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.mock-row .amt.green { color: var(--emerald-700); }
.mock-row.income-row { background: linear-gradient(to right, rgba(13,148,136,0.06), transparent); }
.mock-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--emerald-700);
  background: #d1fae5;
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 0.4rem;
}
.mock-list-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.8rem; border-top: 1px solid var(--line); font-size: 0.82rem; }
.mock-list-item:first-of-type { border-top: none; }
.mock-list-item.current { background: linear-gradient(to right, rgba(13,148,136,0.08), transparent); border-left: 3px solid var(--teal-600); }
.mock-list-item .ev { width: 26px; height: 26px; border-radius: 7px; background: rgba(13,148,136,0.12); display: grid; place-items: center; flex-shrink: 0; }
.mock-list-item .ev svg { width: 14px; height: 14px; stroke: var(--emerald-700); }
.mock-list-item .meta { flex: 1; }
.mock-list-item .meta .t { font-weight: 700; color: var(--ink); }
.mock-list-item .meta .s { font-size: 0.7rem; color: var(--muted); }

/* ---------- Privacy band ---------- */
.privacy {
  background: linear-gradient(135deg, var(--emerald-700) 0%, var(--teal-600) 100%);
  color: #fff;
}
.privacy .section-head h2 { color: #fff; }
.privacy .section-head p { color: rgba(255,255,255,0.85); }
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.pcard {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 1.6rem;
  backdrop-filter: blur(4px);
}
.pcard .ficon { background: rgba(255,255,255,0.16); }
.pcard .ficon svg { stroke: #fff; }
.pcard h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.pcard p { color: rgba(255, 255, 255, 0.88); font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 46rem; margin: 0 auto; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 1.2rem;
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 1.1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; color: var(--teal-600); font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--ink-soft); padding: 0 0 1.1rem; }

/* ---------- Final CTA + footer ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.8rem; }
.cta-band p { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 1.8rem; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.foot .spacer { flex: 1; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--emerald-700); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .showcase-grid, .showcase-grid.reverse { grid-template-columns: 1fr; }
  .showcase-grid.reverse .browser { order: 0; }
  .features, .privacy-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.3rem; }
  .nav-links { display: none; }
  .hero { padding: 3rem 0 2rem; }
  .mock-stats { grid-template-columns: repeat(2, 1fr); }

  /* Keep the language toggle and CTA from being crushed by flexbox on
     narrow screens; the brand may shrink instead. */
  .nav { gap: 0.75rem; }
  .brand, .lang-toggle, .nav .btn-primary { flex-shrink: 0; }
  .nav .btn-primary { padding: 0.6rem 1.1rem; font-size: 0.9rem; }
}
@media (max-width: 520px) {
  .section-head h2, .cta-band h2 { font-size: 1.7rem; }
  .hero h1 { font-size: 2rem; }
  /* Logo-only brand on very small screens to free up header width. */
  .brand .name { display: none; }
}
