/* ---------------------------------------------------------------------------
   CashWise site styles.

   Two kinds of page share this sheet:
   - the landing page (index.html): nav, hero, feature grid, FAQ
   - the legal pages (privacy, terms, delete-account): .container > .card

   The legal pages came first and their markup is unchanged, so every class they
   rely on (.container, .card, .back-link, header, footer) still behaves as it
   did. Add landing-page styles below rather than repurposing those.
--------------------------------------------------------------------------- */

:root {
  --primary-color: #0052CC;
  --primary-dark: #003D99;
  --text-color: #333333;
  --text-muted: #5c6670;
  --bg-color: #f4f7f6;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --radius: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.container.narrow {
  max-width: 680px;
}

header {
  text-align: center;
  margin-bottom: 50px;
}

h1 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 2.2em;
}

h2 {
  color: #222;
  margin-top: 35px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  font-size: 1.5em;
  font-weight: 600;
}

p {
  margin-bottom: 16px;
}

ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
}

a {
  color: var(--primary-color);
}

.card {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.links {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: var(--card-bg);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  border: 2px solid var(--border-color);
}

.links a div {
  display: flex;
  flex-direction: column;
}

.btn-title {
  font-size: 1.15em;
  color: #222;
  margin-bottom: 4px;
}

.btn-desc {
  font-size: 0.85em;
  font-weight: 400;
  color: #666;
}

.links a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
  background: #fdfdfd;
  border-color: var(--primary-color);
}

.links a::after {
  content: '→';
  font-size: 1.2em;
  transition: transform 0.2s ease;
}

.links a:hover::after {
  transform: translateX(4px);
}

.back-link {
  display: inline-block;
  margin-bottom: 25px;
  color: #666;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--primary-color);
}

footer {
  text-align: center;
  margin-top: 60px;
  color: #888;
  font-size: 0.9em;
}

/* --- Landing page ------------------------------------------------------- */

.nav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
  font-size: 1.25em;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95em;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* The hero is a <header>, which the legal pages centre and margin — override
   both here rather than loosening the shared rule. */
.hero {
  text-align: left;
  margin-bottom: 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-color) 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero .container {
  padding: 72px 20px 64px;
}

.hero h1 {
  font-size: clamp(2.1em, 5.5vw, 3.4em);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #111827;
  margin: 0 0 20px;
}

.lede {
  font-size: 1.15em;
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 82, 204, 0.08);
  border: 1px solid rgba(0, 82, 204, 0.2);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.95em;
}

.store-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.store-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Second store button, once iOS ships: same shape, lower emphasis so the two
   do not compete for the same tap. */
.store-btn-alt {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.store-btn-alt:hover {
  background: rgba(0, 82, 204, 0.06);
  color: var(--primary-dark);
}

.hero-note {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.92em;
}

.section {
  padding: 8px 0 16px;
}

.section-alt {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* Section headings sit above their own content, so they drop the rule and the
   top margin that the legal pages' <h2> carries. */
.section-title {
  border-bottom: none;
  padding-bottom: 0;
  margin: 0 0 28px;
  font-size: clamp(1.5em, 3vw, 2em);
  letter-spacing: -0.02em;
  color: #111827;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  border-color: rgba(0, 82, 204, 0.35);
}

.feature h3 {
  margin: 0 0 10px;
  font-size: 1.1em;
  font-weight: 600;
  color: #111827;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96em;
}

/* The feature grid needs the wider measure; the prose sections do not. */
#features .container {
  max-width: 1080px;
}

.faq-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.05em;
  font-weight: 600;
  color: #111827;
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
}

.site-footer {
  background: #111827;
  color: #9ca3af;
  margin-top: 0;
}

.site-footer .container {
  padding: 40px 20px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9em;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-bottom: 20px;
}

.footer-links a {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95em;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .container {
    padding: 20px 15px;
  }
  .card {
    padding: 25px 20px;
  }
  .hero .container {
    padding: 48px 15px 44px;
  }
  .nav-links {
    gap: 16px;
  }
}
