/* KeepSafe Ledger — public site. Palette matches the desktop app
   (src/styles/variables.css) so the site and product feel like one thing. */

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

:root {
  --ink:     #1a1a2e;
  --ink2:    #4a4a6a;
  --ink3:    #8888aa;
  --paper:   #fafaf8;
  --paper2:  #f0f0ec;
  --paper3:  #e8e8e2;
  --accent:  #2d6a4f;
  --accent2: #40916c;
  --gold:    #c9974a;
  --gold2:   #e0b872;
  --blue:    #4a7fc9;
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:     #e8e8f0;
    --ink2:    #a8a8c0;
    --ink3:    #666688;
    --paper:   #0f0f1a;
    --paper2:  #1a1a2a;
    --paper3:  #222232;
    --accent:  #52b788;
    --accent2: #74c69d;
    --gold:    #e0b872;
    --gold2:   #edc98f;
    --blue:    #7aa5e0;
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--accent); }
a:hover { color: var(--accent2); }

/* AMBIENT BACKGROUND — soft drifting color behind the whole page, not just
   the hero. Multi-hue (green + gold + blue) for the vibrancy pass; primary
   green still dominates so it stays recognizably "us," not a repaint. */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.28;
  animation: drift 22s ease-in-out infinite;
}
.blob-a { width: 460px; height: 460px; background: var(--accent); top: -160px; left: -120px; }
.blob-b { width: 380px; height: 380px; background: var(--gold); top: 60px; right: -160px; animation-delay: -7s; }
.blob-c { width: 420px; height: 420px; background: var(--blue); bottom: -180px; left: 18%; animation-delay: -14s; opacity: 0.18; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.1); }
  66%      { transform: translate(-30px, 25px) scale(0.92); }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .hero-badge, .hero h1, .hero p, .trust-row, .app-preview, .feature-card {
    animation: none !important;
  }
}

/* NAV */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--paper3);
  max-width: 860px;
  margin: 0 auto;
}
.site-logo {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.site-nav-links a {
  font-size: 14px;
  color: var(--ink2);
  text-decoration: none;
}
.site-nav-links a:hover { color: var(--ink); }

/* HERO (coming-soon page) */
.hero {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 5.5rem 2rem 3rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease both;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5.5vw, 3.4rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.6s 0.08s ease both;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  font-size: 1.08rem;
  color: var(--ink2);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s 0.16s ease both;
}

/* Trust row */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto;
  max-width: 560px;
  animation: fadeUp 0.6s 0.24s ease both;
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink2);
  background: var(--paper2);
  border: 1px solid var(--paper3);
  padding: 6px 14px 6px 10px;
  border-radius: 100px;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.trust-chip:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--ink);
  transform: translateY(-1px);
}
.trust-chip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.trust-chip-dot.c-green { background: var(--accent2); }
.trust-chip-dot.c-gold  { background: var(--gold); }
.trust-chip-dot.c-blue  { background: var(--blue); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* APP PREVIEW — a "flash" of the real dashboard, same nav labels/layout
   as the actual product (src/components/Sidebar.jsx). */
.app-preview {
  max-width: 760px;
  margin: 3.5rem auto 0;
  animation: fadeUp 0.7s 0.32s ease both;
}
.app-chrome {
  background: var(--ink);
  border-radius: 14px 14px 0 0;
  padding: 12px 16px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-chrome .dot { width: 9px; height: 9px; border-radius: 50%; }
.app-chrome-bar {
  flex: 1;
  height: 20px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  margin: 0 8px;
}
.app-body {
  background: #14141f;
  border-radius: 0 0 14px 14px;
  padding: 22px;
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.35);
}
.app-sidebar { display: flex; flex-direction: column; gap: 3px; }
.app-sidebar-item {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.42);
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-sidebar-item.active {
  background: color-mix(in srgb, var(--accent2) 22%, transparent);
  color: rgba(255,255,255,0.95);
}
.app-sidebar-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.app-sidebar-ai {
  margin-top: auto;
  padding: 7px 10px;
  font-size: 10.5px;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-sidebar-ai-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent2) 30%, transparent); }
.app-main { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.app-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.app-stat {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  padding: 12px;
}
.app-stat-label { font-size: 10px; color: rgba(255,255,255,0.42); margin-bottom: 5px; letter-spacing: 0.04em; text-transform: uppercase; }
.app-stat-val { font-size: 19px; font-weight: 600; color: rgba(255,255,255,0.95); font-family: var(--serif); }
.app-stat-sub { font-size: 10px; color: var(--accent2); margin-top: 3px; }
.app-chart {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  padding: 14px;
  flex: 1;
}
.app-chart-label { font-size: 11px; color: rgba(255,255,255,0.42); margin-bottom: 12px; }
.chart-bars { display: flex; align-items: flex-end; gap: 7px; height: 72px; }
.chart-bar { flex: 1; background: rgba(255,255,255,0.12); border-radius: 3px 3px 0 0; }
.chart-bar.highlight { background: linear-gradient(180deg, var(--accent2), var(--accent)); }
.app-ai {
  background: color-mix(in srgb, var(--accent2) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent2) 25%, transparent);
  border-radius: 9px;
  padding: 11px 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}
.app-ai-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
}
@media (max-width: 600px) {
  .app-body { grid-template-columns: 1fr; }
  .app-sidebar { flex-direction: row; flex-wrap: wrap; }
  .app-sidebar-ai { display: none; }
}

/* Floating accent fragments around the preview — depth cue borrowed from
   premium fintech landing pages (Monarch-style floating UI pieces). */
.preview-wrap { position: relative; }
.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--paper);
  border: 1px solid var(--paper3);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink2);
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.18);
  animation: floatBob 5s ease-in-out infinite, fadeUp 0.7s 0.5s ease both;
}
.float-chip-icon { font-size: 14px; }
.float-chip.fc-1 { top: -18px; right: 6%; }
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@media (max-width: 700px) {
  .float-chip { display: none; }
}

/* FEATURE SECTION — "what's coming," organized by category the way
   Monarch groups Track/Budget/Plan. Real product facts only. */
.features {
  max-width: 900px;
  margin: 5rem auto 2rem;
  padding: 0 2rem;
}
.features-head {
  text-align: center;
  max-width: 480px;
  margin: 0 auto 2.5rem;
}
.features-head h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin-bottom: 0.6rem;
}
.features-head p {
  font-size: 0.98rem;
  color: var(--ink2);
  font-weight: 300;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.feature-card {
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--paper3);
  border-radius: var(--radius);
  padding: 1.3rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -16px rgba(0,0,0,0.16);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.feature-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  margin-bottom: 0.85rem;
}
.feature-icon.fi-green { background: color-mix(in srgb, var(--accent2) 18%, transparent); }
.feature-icon.fi-gold  { background: color-mix(in srgb, var(--gold) 20%, transparent); }
.feature-icon.fi-blue  { background: color-mix(in srgb, var(--blue) 18%, transparent); }
.feature-card h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.feature-card p {
  font-size: 0.87rem;
  color: var(--ink2);
  line-height: 1.55;
}

/* DOC PAGES (privacy/terms/support) */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}
.doc h1 {
  font-family: var(--serif);
  font-size: 2rem;
  margin-bottom: 0.25rem;
}
.doc .doc-meta {
  font-size: 13px;
  color: var(--ink3);
  margin-bottom: 2rem;
}
.doc .doc-entity {
  font-size: 14px;
  color: var(--ink2);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--paper3);
}
.doc h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 2.25rem 0 0.85rem;
}
.doc p { margin-bottom: 1rem; color: var(--ink2); }
.doc ul, .doc ol { margin: 0 0 1rem 1.25rem; color: var(--ink2); }
.doc li { margin-bottom: 0.4rem; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc code {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--paper2);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.92rem;
}
.doc th, .doc td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--paper3);
  color: var(--ink2);
}
.doc th { color: var(--ink); font-weight: 600; }

/* FOOTER */
.site-footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  border-top: 1px solid var(--paper3);
  font-size: 13px;
  color: var(--ink3);
  text-align: center;
}
.site-footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  list-style: none;
}
.site-footer-links a {
  color: var(--ink3);
  text-decoration: none;
}
.site-footer-links a:hover { color: var(--accent); }
