/* PersonalCashflow marketing site
   Slate + Emerald palette matching the app's Theme.swift.
*/

:root {
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --emerald-50:  #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-900: #064e3b;
  --rose-600: #e11d48;

  --bg: var(--slate-50);
  --surface: #ffffff;
  --text: var(--slate-900);
  --muted: var(--slate-600);
  --border: var(--slate-200);
  --accent: var(--emerald-600);
  --accent-hover: var(--emerald-700);

  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, .12);

  --container: 1180px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--slate-900);
    --surface: var(--slate-800);
    --text: var(--slate-50);
    --muted: var(--slate-300);
    --border: #334155;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg) !important;
  font-weight: 600;
  font-size: 14px;
}
.nav-cta:hover { opacity: .9; color: var(--bg) !important; }

@media (max-width: 720px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px circle at 15% 10%, color-mix(in srgb, var(--emerald-500) 14%, transparent), transparent 60%),
    radial-gradient(600px circle at 85% 30%, color-mix(in srgb, var(--emerald-400) 10%, transparent), transparent 55%);
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--emerald-500) 14%, transparent);
  color: var(--emerald-700);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
@media (prefers-color-scheme: dark) {
  .eyebrow { color: var(--emerald-400); }
}
.h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -1.5px;
  font-weight: 800;
  margin: 18px 0 16px;
}
.h1 .accent {
  background: linear-gradient(120deg, var(--emerald-500), var(--emerald-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 560px;
  margin: 0 0 32px;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); color: var(--bg); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface); color: var(--text); }

/* ---------- phone mockup ---------- */
.mockup-wrap {
  display: flex;
  justify-content: center;
  position: relative;
}
.mockup-wrap::after {
  content: '';
  position: absolute;
  inset: -40px -20px 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--emerald-500) 18%, transparent), transparent 70%);
  z-index: -1;
  filter: blur(40px);
}
.phone {
  width: 320px;
  aspect-ratio: 9 / 19.5;
  background: var(--slate-900);
  border-radius: 48px;
  padding: 12px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px var(--slate-700);
  position: relative;
}
.phone::before {
  content: '';
  position: absolute;
  top: 18px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px;
  background: black;
  border-radius: 999px;
  z-index: 2;
}
.screen {
  width: 100%; height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: var(--slate-50);
  position: relative;
}

/* ---------- mockup screens (CSS-drawn) ---------- */
.mock-dashboard {
  padding: 50px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  background: var(--slate-50);
  color: var(--slate-900);
}
.mock-title { font-size: 22px; font-weight: 800; letter-spacing: -.5px; margin: 6px 0 -2px; }
.mock-sub   { font-size: 11px; color: var(--slate-500); margin-bottom: 6px; }
.mock-card {
  background: white;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
.mock-balance-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  padding: 4px 0;
}
.mock-balance-row + .mock-balance-row { border-top: 1px solid var(--slate-100); }
.mock-balance-row .name { color: var(--slate-700); }
.mock-balance-row .amount { font-weight: 700; color: var(--slate-900); }
.mock-chart {
  height: 110px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--emerald-500) 18%, white), white 90%);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.mock-chart svg { width: 100%; height: 100%; display: block; }

.mock-pill-row { display: flex; gap: 8px; }
.mock-pill {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
.mock-pill .label { font-size: 10px; color: var(--slate-500); text-transform: uppercase; letter-spacing: .4px; }
.mock-pill .val   { font-size: 16px; font-weight: 700; margin-top: 2px; }
.mock-pill .val.neg { color: var(--rose-600); }
.mock-pill .val.pos { color: var(--emerald-600); }

.mock-tabbar {
  margin-top: auto;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-radius: 18px;
  padding: 8px 4px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 8px 24px rgba(15,23,42,.1);
  font-size: 9px;
  color: var(--slate-500);
}
.mock-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 6px; }
.mock-tab.active { color: var(--emerald-600); }
.mock-tab .ic {
  width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: var(--ic) center/contain no-repeat;
          mask: var(--ic) center/contain no-repeat;
}

/* ---------- sections ---------- */
section { padding: 80px 0; }
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}
.section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}
.h2 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -1px;
  font-weight: 800;
  margin: 8px 0 12px;
}
.h2-sub {
  font-size: 17px;
  color: var(--muted);
  margin: 0;
}

/* ---------- value props ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 820px) { .values { grid-template-columns: 1fr; } }
.value {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.value-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--emerald-500) 18%, transparent), color-mix(in srgb, var(--emerald-500) 6%, transparent));
  display: grid; place-items: center;
  color: var(--accent);
  font-size: 22px;
  margin-bottom: 14px;
}
.value h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.3px; }
.value p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- features grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .features { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature-ic {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--emerald-500) 12%, transparent);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 18px;
}
.feature h4 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.feature p  { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- showcase strip ---------- */
.showcase {
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--emerald-500) 4%, transparent));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: end;
}
@media (max-width: 920px) {
  .showcase-grid { grid-template-columns: 1fr; gap: 56px; }
  .phone { width: 280px; }
}
.showcase-grid .phone { width: 280px; margin: 0 auto; }
.showcase-grid .phone:nth-child(2) { transform: translateY(-24px); }
.shot-caption { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 64px;
  margin-top: 40px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---------- real screenshot inside phone frame ---------- */
.screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 36px;
  display: block;
}

/* ---------- doc page (privacy / terms / help) ---------- */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px;
}
.doc h1 {
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -1px;
  font-weight: 800;
  margin: 0 0 8px;
}
.doc .updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}
.doc h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.3px;
  margin: 36px 0 12px;
}
.doc h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 8px;
}
.doc p, .doc li { color: var(--muted); font-size: 16px; line-height: 1.7; }
.doc strong { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc .callout {
  background: color-mix(in srgb, var(--emerald-500) 8%, transparent);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 8px;
  margin: 20px 0;
  color: var(--text);
}
.doc .review-needed {
  background: color-mix(in srgb, #f59e0b 14%, transparent);
  border-left: 3px solid #f59e0b;
  padding: 14px 18px;
  border-radius: 8px;
  margin: 20px 0;
  color: var(--text);
  font-size: 14px;
}

/* ---------- help accordion ---------- */
.help-list { display: grid; gap: 12px; }
details.help-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 0;
  overflow: hidden;
}
details.help-section summary {
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
}
details.help-section summary::-webkit-details-marker { display: none; }
details.help-section summary::after {
  content: '＋';
  margin-left: auto;
  color: var(--muted);
  font-weight: 400;
  transition: transform .2s ease;
}
details.help-section[open] summary::after { content: '−'; }
.help-icon {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald-100), white);
  display: grid; place-items: center;
  color: var(--emerald-700);
  font-size: 14px;
}
@media (prefers-color-scheme: dark) {
  .help-icon { background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700)); color: var(--emerald-100); }
}
details.help-section > .body {
  padding: 4px 20px 20px 64px;
  display: grid;
  gap: 10px;
}
details.help-section ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}
details.help-section li { color: var(--muted); font-size: 14px; line-height: 1.6; }
