/* ========================================
   FinanceFlow — Marketing Home Page
   Built on top of the shared tokens in styles.css
   ======================================== */

.container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.num, .home-stat-val, .home-tx-amt, .home-budget-top .amt, .home-goal-sub, .home-currency-pill .sym {
  font-variant-numeric: tabular-nums;
}

/* ── Nav ── */
.home-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-primary) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border-light);
  padding-block: 14px;
}

.home-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.home-nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.home-nav-links a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

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

.home-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-nav-actions .btn {
  padding: 9px 18px;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .home-nav-links { display: none; }
}

/* ── Hero ── */
.home-hero { padding-block: 64px 40px; }

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 52px;
  align-items: center;
}

@media (max-width: 980px) {
  .home-hero-grid { grid-template-columns: 1fr; }
}

.home-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.9em;
}

.home-hero-copy h1 {
  font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 0.5em;
}

.home-lede {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 46ch;
  margin-bottom: 1.8em;
}

.home-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 1.9em;
}

.home-hero-facts {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.home-hero-facts div {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.home-hero-facts strong {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.home-hero-facts span {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

/* ── Preview card ── */
.home-preview {
  padding: 22px;
}

.home-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.home-preview-head h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.home-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.home-stat-tile {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
}

.home-stat-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.home-stat-val {
  font-size: 1.05rem;
  font-weight: 700;
}

.home-delta {
  font-size: 0.74rem;
  font-weight: 700;
  margin-top: 4px;
}

.home-delta.up { color: var(--success); }
.home-delta.down { color: var(--danger); }

.home-chart-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px 4px;
  margin-bottom: 16px;
}

.home-chart-legend {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.home-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.home-chart-box svg text {
  fill: var(--text-tertiary);
  font-family: 'Inter', sans-serif;
  font-size: 9px;
}

.home-grid-line {
  stroke: var(--border-light);
  stroke-width: 1;
}

.home-tx-list {
  border-top: 1px solid var(--border-light);
}

.home-tx-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.86rem;
}

.home-tx-row:last-child { border-bottom: none; }

.home-tx-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--c) 18%, var(--bg-card));
  font-size: 0.95rem;
  flex-shrink: 0;
}

.home-tx-mid {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.home-tx-mid .name { font-weight: 600; }
.home-tx-mid .meta { color: var(--text-tertiary); font-size: 0.75rem; }

.home-tx-amt { font-weight: 700; white-space: nowrap; }
.home-tx-amt.pos { color: var(--success); }
.home-tx-amt.neg { color: var(--text-primary); }

/* ── Section scaffolding ── */
main section { padding-block: 60px; }

.home-rule {
  height: 1px;
  background: var(--border-light);
  border: none;
}

.home-section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.home-section-head h2 {
  font-size: clamp(1.55rem, 1.3rem + 1vw, 2.2rem);
  font-weight: 800;
  margin-top: 0.35em;
  letter-spacing: -0.01em;
}

.home-section-head p {
  color: var(--text-secondary);
  margin-top: 0.7em;
  font-size: 1.02rem;
}

/* ── Currency strip ── */
.home-currency-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-currency-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  padding: 8px 13px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
}

.home-currency-pill .sym { font-weight: 700; color: var(--primary); }
.home-currency-pill .code { font-weight: 700; }
.home-currency-pill .cname { color: var(--text-tertiary); font-size: 0.78rem; }

/* ── How it works ── */
.home-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

@media (max-width: 820px) {
  .home-steps { grid-template-columns: 1fr; }
}

.home-step {
  border-top: 2px solid var(--border-light);
  padding-top: 16px;
}

.home-step-no {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
}

.home-step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-block: 0.5em 0.3em;
}

.home-step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Feature grid ── */
.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 820px) {
  .home-feature-grid { grid-template-columns: 1fr; }
}

.home-feature-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4em;
}

.home-feature-card > div:first-child p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.home-feature-visual {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: auto;
}

.home-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.home-chip {
  font-size: 0.75rem;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.home-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.home-fake-input {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  background: var(--bg-card);
}

.home-budget-row { margin-bottom: 12px; }
.home-budget-row:last-child { margin-bottom: 0; }

.home-budget-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
  margin-bottom: 5px;
}

.home-budget-top .cat { font-weight: 600; }
.home-budget-top .amt { color: var(--text-tertiary); }

.home-budget-track {
  height: 7px;
  border-radius: 4px;
  background: var(--border-light);
  overflow: hidden;
}

.home-budget-fill {
  height: 100%;
  border-radius: 4px;
}

.home-goal-row { margin-bottom: 14px; }
.home-goal-row:last-child { margin-bottom: 0; }

.home-goal-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.home-goal-top .name { font-weight: 700; font-size: 0.92rem; }

.home-goal-top .deadline {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
}

.home-goal-sub {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 5px;
}

.home-cat-mosaic {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--c) 16%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--c) 42%, transparent);
}

.home-insight-layout {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.home-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  flex: 1;
  min-width: 150px;
}

.home-donut-legend div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.home-donut-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.home-curr-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  background: var(--bg-card);
  font-size: 0.9rem;
  font-weight: 600;
}

.home-curr-note {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-top: 10px;
}

/* ── Closing CTA ── */
.home-cta { padding-block: 20px 72px; }

.home-cta-card {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: 52px 40px;
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.home-cta-card h2 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem);
  font-weight: 800;
}

.home-cta-card p {
  max-width: 46ch;
  opacity: 0.92;
}

.home-cta-card .btn-primary {
  background: #fff;
  color: var(--primary);
  margin-top: 6px;
}

.home-cta-card .btn-primary:hover {
  background: #fff;
  opacity: 0.92;
}

/* ── Footer ── */
.home-footer {
  padding-block: 40px 56px;
  border-top: 1px solid var(--border-light);
}

.home-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.home-footer-note {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  margin-top: 10px;
}

.home-back-top {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1px;
}

.home-back-top:hover {
  color: var(--primary);
  border-color: var(--primary);
}
