/* FlexLedger landing page — brand-matched to the app */
:root {
  --surface: #F9F9F8;
  --surface-2: #FFFFFF;
  --surface-3: #F0F0EE;
  --ink: #1C1C1E;
  --ink-2: #3A3A3C;
  --ink-3: #8E8E93;
  --brand: #114B5F;
  --brand-2: #457B9D;
  --brand-3: #E2E8F0;
  --success: #2A9D8F;
  --warning: #E9C46A;
  --error: #E76F51;
  --border: #E5E5EA;
  --shadow-sm: 0 1px 2px rgba(17, 75, 95, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 75, 95, 0.08);
  --shadow-lg: 0 24px 48px rgba(17, 75, 95, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
img, svg { display: block; }

/* NAV */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--brand);
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.nav-links a:hover { color: var(--brand); }
@media (max-width: 640px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn-ghost {
  background: var(--brand);
  color: white;
}
.btn-ghost:hover { box-shadow: var(--shadow-md); }

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 40px auto 80px;
  padding: 40px 32px;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 20px; margin: 20px auto 40px; }
}
.hero-copy h1 {
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 800;
  line-height: 1.05;
  color: var(--ink);
  margin: 20px 0 20px;
}
.grad {
  background: linear-gradient(135deg, var(--success) 0%, var(--brand) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 540px;
  margin-bottom: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  background: var(--brand-3);
  padding: 6px 12px;
  border-radius: 999px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* CTA FORM */
.cta-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  background: white;
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}
.cta-form input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.cta-form input::placeholder { color: var(--ink-3); }
.cta-form button {
  background: var(--brand);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: transform 0.1s ease, background 0.15s ease;
}
.cta-form button:hover { background: #0d3d4d; }
.cta-form button:active { transform: scale(0.97); }
.cta-form button:disabled { opacity: 0.7; cursor: default; }
.cta-form-large {
  max-width: 540px;
  margin: 20px auto 8px;
  padding: 8px;
}
.cta-form-large input { padding: 16px; font-size: 16px; }
.cta-form-large button { padding: 14px 24px; font-size: 15px; }

.cta-note {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.cta-note.ok { color: var(--success); font-weight: 500; }
.cta-note.err { color: var(--error); }

/* BADGES (store buttons) */
.badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 24px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  transition: transform 0.1s ease, opacity 0.15s ease;
  opacity: 0.85;
}
.badge:hover { opacity: 1; transform: translateY(-1px); }
.badge span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.badge small { font-size: 10px; opacity: 0.8; }
.badge strong { font-size: 16px; font-weight: 700; }

/* TRUST */
.trust {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
}
.trust-count { font-weight: 700; color: var(--brand); font-size: 15px; }

/* PHONE MOCKUP */
.phone-wrap {
  display: flex;
  justify-content: center;
  perspective: 1400px;
}
.phone {
  width: 320px;
  height: 640px;
  background: linear-gradient(145deg, #0a0a0a, #1f1f1f);
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 40px 80px rgba(17, 75, 95, 0.25), 0 12px 24px rgba(0, 0, 0, 0.1);
  position: relative;
  transform: rotate(-2deg);
  transition: transform 0.4s ease;
}
.phone:hover { transform: rotate(0); }
@media (max-width: 900px) {
  .phone { transform: none; width: 280px; height: 560px; }
}
.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 24px;
  background: #000;
  border-radius: 12px;
  z-index: 2;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border-radius: 34px;
  overflow: hidden;
  padding: 44px 16px 16px;
  position: relative;
}

/* APP CARDS INSIDE PHONE MOCKUP */
.app-hero { display: flex; flex-direction: column; gap: 12px; }
.app-hero-row { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.app-hi { font-size: 22px; font-weight: 700; color: var(--ink); }
.app-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.app-plan {
  background: var(--brand-3); color: var(--brand); font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.app-ai {
  background: var(--surface-2); border-radius: 12px; padding: 12px 14px;
  font-size: 13px; color: var(--ink); font-weight: 500;
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.app-card {
  background: var(--surface-2);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid var(--border);
}
.app-card-net {
  background: linear-gradient(140deg, #114B5F, #0d3d4d);
  color: white;
  border: none;
}
.app-toggle {
  display: inline-flex; gap: 2px; background: rgba(255,255,255,0.15); padding: 3px;
  border-radius: 999px; font-size: 10px; margin-bottom: 10px;
}
.app-toggle span { padding: 4px 10px; border-radius: 999px; color: rgba(255,255,255,0.6); }
.app-toggle .active { background: white; color: var(--brand); font-weight: 600; }
.app-net-label { font-size: 12px; opacity: 0.8; margin-bottom: 4px; }
.app-net-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.app-net-row { display: flex; gap: 16px; font-size: 11px; opacity: 0.9; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.green { background: var(--success); }
.dot.amber { background: var(--warning); }

.app-mini-row { display: flex; align-items: center; gap: 10px; }
.app-mini-icon {
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--brand-3); display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.app-mini-icon.amber { background: #FCE9DF; }
.app-mini-body { flex: 1; }
.app-mini-title { font-size: 13px; font-weight: 500; color: var(--ink); }
.app-mini-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.app-mini-badge {
  background: var(--brand-3); color: var(--brand); font-size: 11px; font-weight: 700;
  min-width: 22px; height: 22px; padding: 0 8px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}
.app-mini-amt { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* STATS BAR */
.stats {
  max-width: 1000px; margin: 0 auto 100px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  padding: 40px 32px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 32px; font-weight: 800; color: var(--brand); margin-bottom: 4px; letter-spacing: -0.02em; }
.stat span { font-size: 13px; color: var(--ink-3); }
@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr; gap: 24px; margin-bottom: 60px; }
  .stat strong { font-size: 28px; }
}

/* SECTIONS */
.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
  padding: 0 20px;
}
.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  margin-top: 16px;
  line-height: 1.15;
}

/* FEATURES */
.features { max-width: 1100px; margin: 0 auto 100px; padding: 0 32px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feature:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.feature h3 { font-size: 17px; margin-bottom: 8px; font-weight: 700; }
.feature p { color: var(--ink-2); font-size: 14px; }

/* PRICING */
.pricing { max-width: 900px; margin: 0 auto 100px; padding: 0 32px; }
.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 700px) { .tier-grid { grid-template-columns: 1fr; } }
.tier {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
  position: relative;
}
.tier-featured {
  background: linear-gradient(140deg, #114B5F, #0d3d4d);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}
.tier-featured .tier-desc { color: rgba(255,255,255,0.75); }
.tier-tag {
  position: absolute; top: -12px; right: 24px;
  background: var(--success); color: white;
  padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.tier-name { font-size: 15px; font-weight: 600; margin-bottom: 12px; opacity: 0.8; }
.tier-price { margin-bottom: 8px; }
.tier-price span { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; }
.tier-price small { font-size: 14px; opacity: 0.7; margin-left: 4px; }
.tier-desc { font-size: 14px; color: var(--ink-2); margin-bottom: 20px; }
.tier ul { list-style: none; padding: 0; margin: 0; }
.tier li { padding: 8px 0; font-size: 14px; padding-left: 24px; position: relative; }
.tier li::before {
  content: ''; position: absolute; left: 0; top: 13px;
  width: 14px; height: 8px; border-left: 2px solid var(--success); border-bottom: 2px solid var(--success);
  transform: rotate(-45deg);
}
.tier-featured li::before { border-color: var(--warning); }

/* FAQ */
.faq { max-width: 800px; margin: 0 auto 100px; padding: 0 32px; }
.faq-grid { display: flex; flex-direction: column; gap: 12px; }
details {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
details:hover { box-shadow: var(--shadow-sm); }
details[open] { box-shadow: var(--shadow-sm); }
summary {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::after {
  content: '+'; font-size: 20px; color: var(--ink-3); transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details summary::-webkit-details-marker { display: none; }
details p { margin-top: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }

/* FINAL CTA */
.final-cta {
  background: linear-gradient(140deg, #114B5F, #0d3d4d);
  color: white;
  padding: 100px 32px;
  text-align: center;
  margin-bottom: 0;
}
.final-cta-inner { max-width: 640px; margin: 0 auto; }
.final-cta h2 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; margin-bottom: 16px; }
.final-cta p { font-size: 17px; opacity: 0.85; margin-bottom: 12px; }
.final-cta .cta-note { color: rgba(255,255,255,0.7); }
.final-cta .cta-note.ok { color: var(--warning); }

/* FOOTER */
.footer {
  background: var(--surface-3);
  padding: 48px 32px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--brand); }
.footer-links { display: flex; gap: 24px; font-size: 14px; color: var(--ink-2); }
.footer-links a:hover { color: var(--brand); }
.footer-copy { font-size: 12px; color: var(--ink-3); flex-basis: 100%; text-align: center; margin-top: 16px; }
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
}
