/* ============================================================
   MoneyRecon — Marketing Site Styles
   A bold, game-inspired aesthetic with dark theme and vibrant accents.
   ============================================================ */

/* --- Tokens ------------------------------------------------ */
:root {
  --bg:           #0a0b0f;
  --bg-card:      #12131a;
  --bg-card-alt:  #181a24;
  --surface:      #1e2030;
  --border:       #2a2d3e;

  --text:         #e4e6f0;
  --text-muted:   #8b8fa7;

  --accent:       #6c5ce7;
  --accent-light: #a29bfe;
  --green:        #00cec9;
  --gold:         #fdcb6e;
  --pink:         #fd79a8;
  --red:          #ff6b6b;

  --grad:         linear-gradient(135deg, var(--accent-light), var(--green));
  --grad-text:    linear-gradient(135deg, var(--accent-light) 0%, var(--green) 100%);

  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', var(--font);

  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;

  --container:    1140px;
  --gutter:       clamp(1rem, 4vw, 3rem);

  --ease:         cubic-bezier(.4, 0, .2, 1);
}

/* --- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input { font: inherit; border: none; outline: none; background: none; color: inherit; }

/* --- Utilities --------------------------------------------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.text-center { text-align: center; }
.mw-prose { max-width: 680px; margin-left: auto; margin-right: auto; }
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- NAV --------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1rem 0;
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.nav.scrolled {
  background: rgba(10, 11, 15, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  display: flex; align-items: center; gap: 2rem;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.35rem;
  display: flex; align-items: center; gap: .45rem;
  white-space: nowrap;
}
.logo-icon {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}
.nav-links {
  display: flex; gap: 1.5rem; margin-left: auto;
}
.nav-links a {
  font-size: .875rem; font-weight: 500;
  color: var(--text-muted);
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); }

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px; cursor: pointer;
  width: 28px; padding: 4px 0;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .3s var(--ease), opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- BUTTONS ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; border-radius: var(--radius);
  transition: transform .15s var(--ease), box-shadow .25s var(--ease), background .25s;
  cursor: pointer; white-space: nowrap;
  background: var(--grad); color: #fff;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108, 92, 231, .35); }
.btn:active { transform: translateY(0); }
.btn-sm  { font-size: .85rem; padding: .5rem 1.25rem; }
.btn-lg  { font-size: 1rem; padding: .85rem 2rem; }
.btn-outline {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--border);
  color: var(--text);
}
.btn-outline:hover { box-shadow: inset 0 0 0 2px var(--accent-light), 0 8px 30px rgba(108, 92, 231, .2); }

/* --- HERO ------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-badge {
  display: inline-block;
  font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  background: var(--surface); color: var(--accent-light);
  padding: .4rem 1.2rem; border-radius: 999px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 640px; margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 4rem; }

.hero-stats {
  display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: .8rem; color: var(--text-muted); }

/* Glow effect behind hero */
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108,92,231,.18) 0%, transparent 70%);
  pointer-events: none;
}

/* --- SECTIONS --------------------------------------------- */
.section {
  padding: clamp(4rem, 10vw, 7rem) 0;
}
.section-dark { background: var(--bg-card); }
.section-label {
  display: inline-block;
  font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent-light);
  margin-bottom: .75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -.015em;
  margin-bottom: 1.25rem;
}
.section-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

/* --- FEATURES GRID ---------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color .3s var(--ease), transform .2s var(--ease);
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.feature-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(108, 92, 231, .12);
  color: var(--accent-light);
  margin-bottom: 1.25rem;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 {
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: .5rem;
}
.feature-card p {
  color: var(--text-muted); font-size: .95rem;
}

/* --- SPLIT LAYOUT ----------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split-reverse .split-content { order: 2; }
.split-reverse .split-visual  { order: 1; }

.split-content h2 { text-align: left; }
.split-content p { color: var(--text-muted); margin-bottom: 1.5rem; }

.check-list { margin-top: .5rem; }
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: .6rem;
  color: var(--text);
  font-size: .95rem;
}
.check-list li::before {
  content: '\2713';
  position: absolute; left: 0; top: 0;
  color: var(--green);
  font-weight: 700;
}

/* --- CALCULATOR MOCKUP ------------------------------------ */
.calc-mockup {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.calc-header {
  display: flex; align-items: center; gap: .5rem;
  padding: .9rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.calc-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border);
}
.calc-dot:nth-child(1) { background: var(--red); }
.calc-dot:nth-child(2) { background: var(--gold); }
.calc-dot:nth-child(3) { background: var(--green); }
.calc-title { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.calc-body { padding: 1.5rem; }
.calc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem 0;
  font-size: .95rem;
  color: var(--text-muted);
}
.calc-val { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.calc-divider {
  height: 1px; background: var(--border);
  margin: .5rem 0;
}
.calc-result { font-weight: 700; }
.calc-result .calc-val {
  font-size: 1.05rem;
}

/* --- PROJECTION CHART ------------------------------------- */
.projection-chart {
  position: relative;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1rem;
}
.chart-svg { width: 100%; height: auto; }
.chart-band { fill: rgba(108, 92, 231, .12); }
.chart-line { stroke-width: 2.5; }
.chart-line-best   { stroke: var(--green); }
.chart-line-median { stroke: var(--accent-light); stroke-dasharray: 6 4; }
.chart-line-worst  { stroke: var(--red); opacity: .7; }
.chart-label {
  position: absolute; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.chart-label-best   { top: 1rem; right: 2rem; color: var(--green); }
.chart-label-median { bottom: 40%; right: 2rem; color: var(--accent-light); }
.chart-label-worst  { bottom: 22%; right: 2rem; color: var(--red); }
.chart-x {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: var(--text-muted);
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  margin-top: .5rem;
}

/* --- PRIVACY GRID ----------------------------------------- */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.privacy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color .3s var(--ease), transform .2s var(--ease);
}
.privacy-card:hover { border-color: var(--green); transform: translateY(-4px); }
.privacy-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(0, 206, 201, .1);
  color: var(--green);
}
.privacy-icon svg { width: 24px; height: 24px; }
.privacy-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.privacy-card p { font-size: .9rem; color: var(--text-muted); }

/* --- LEADERBOARD MOCKUP ----------------------------------- */
.leaderboard-mockup {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 1.5rem;
}
.lb-header {
  text-align: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.lb-league {
  font-weight: 700; font-size: 1.1rem;
  color: var(--gold);
}
.lb-row {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: .75rem;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  position: relative;
}
.lb-row-you {
  background: rgba(108, 92, 231, .15);
  border: 1px solid var(--accent);
}
.lb-rank {
  font-weight: 800; font-size: .9rem; color: var(--text-muted);
  width: 1.5rem; text-align: center; flex-shrink: 0;
}
.lb-row-you .lb-rank { color: var(--accent-light); }
.lb-bar {
  display: block; height: 6px;
  border-radius: 4px;
  background: var(--grad);
  flex-shrink: 1;
  transition: width .6s var(--ease);
}
.lb-score {
  font-weight: 700; font-size: .85rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 3.5rem; text-align: right; flex-shrink: 0;
}
.lb-you {
  position: absolute; right: -3rem; top: 50%; transform: translateY(-50%);
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-light);
}
.lb-promo {
  text-align: center; font-size: .8rem; color: var(--green);
  margin-top: 1rem; font-weight: 600;
}

/* --- WAITLIST FORM ---------------------------------------- */
.waitlist-form { max-width: 640px; margin: 0 auto; }
.form-row {
  display: flex; gap: .75rem; flex-wrap: wrap;
}
.form-input {
  flex: 1 1 180px;
  padding: .85rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  color: var(--text);
  transition: border-color .2s var(--ease);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { border-color: var(--accent-light); }
.btn-submit { flex: 0 0 auto; position: relative; }

/* HTMX spinner */
.spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
.htmx-indicator.spinner { display: none; }
.htmx-request .htmx-indicator.spinner { display: inline-block; }
.htmx-request .btn-submit span:first-child { opacity: .6; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-response { margin-top: 1.25rem; min-height: 1.5rem; }
.form-success {
  color: var(--green); font-weight: 600; font-size: 1rem;
}
.success-icon { font-size: 1.15rem; }
.form-error { color: var(--red); font-weight: 500; }
.form-note { margin-top: 1rem; font-size: .8rem; color: var(--text-muted); }

/* --- FOOTER ----------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 2rem;
  align-items: center; justify-content: space-between;
}
.footer-brand p { font-size: .85rem; color: var(--text-muted); margin-top: .35rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: .85rem; color: var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy {
  width: 100%; text-align: center;
  font-size: .8rem; color: var(--text-muted);
  margin-top: 1rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* --- ANIMATIONS ------------------------------------------- */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- RESPONSIVE ------------------------------------------- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav .btn-sm { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }

  /* Mobile menu */
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10, 11, 15, .97);
    backdrop-filter: blur(12px);
    padding: 1.5rem var(--gutter);
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .split-reverse .split-content { order: 1; }
  .split-reverse .split-visual  { order: 2; }
  .split-content h2 { text-align: center; }

  .hero-stats { gap: 1.5rem; }

  .form-row { flex-direction: column; }
  .form-input, .btn-submit { width: 100%; }

  .lb-you { position: static; transform: none; margin-left: .5rem; }

  .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.2rem; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .privacy-grid { grid-template-columns: 1fr; }
}
