/* =====================================================
   WalletFortify — Main Design System
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────── */
:root {
  /* Colors */
  --navy-900: #050a1e;
  --navy-800: #0a0e27;
  --navy-700: #0d1235;
  --navy-600: #111845;
  --navy-500: #1a2455;
  --navy-400: #243068;
  --gold-400: #ffd93d;
  --gold-500: #f5c518;
  --gold-600: #d4a800;
  --gold-glow: rgba(245, 197, 24, 0.25);
  --teal: #00d4aa;
  --red-alert: #ff4757;
  --green-up: #2ed573;

  /* Text */
  --text-primary: #f0f4ff;
  --text-secondary: #94a3b8;
  --text-muted: #576080;

  /* Surfaces */
  --surface-1: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.07);
  --surface-3: rgba(255,255,255,0.10);
  --border: rgba(255,255,255,0.08);
  --border-gold: rgba(245,197,24,0.3);

  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-gap: 6rem;
  --container-width: 1280px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 30px rgba(245,197,24,0.2);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Category Colors */
  --cat-investing: #4f46e5;
  --cat-budgeting: #059669;
  --cat-debt: #dc2626;
  --cat-crypto: #7c3aed;
  --cat-retirement: #d97706;
  --cat-tax: #0891b2;
  --cat-income: #be185d;
}

/* Light Mode Override */
body.light-mode {
  --navy-900: #f0f4ff;
  --navy-800: #e8eeff;
  --navy-700: #dde4f8;
  --navy-600: #cfd8f5;
  --navy-500: #bbc8f0;
  --text-primary: #0d1235;
  --text-secondary: #3d4d7a;
  --text-muted: #6577a8;
  --surface-1: rgba(0,0,0,0.03);
  --surface-2: rgba(0,0,0,0.05);
  --surface-3: rgba(0,0,0,0.08);
  --border: rgba(0,0,0,0.08);
}

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--navy-800);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* Background gradient layer */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79,70,229,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(245,197,24,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5 { font-size: 0.95rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }

p { color: var(--text-secondary); line-height: 1.75; }
a { color: var(--gold-500); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-400); }
img { max-width: 100%; display: block; }

/* ── Layout ────────────────────────────────────────── */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section { padding: var(--section-gap) 0; }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-500);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--gold-500);
  border-radius: 2px;
}

/* ── Grid Utilities ────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-800);
  box-shadow: 0 4px 20px rgba(245,197,24,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245,197,24,0.5);
  color: var(--navy-800);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--border-gold);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--gold-500);
  border: 1.5px solid var(--gold-500);
}
.btn-outline:hover {
  background: var(--gold-glow);
  color: var(--gold-400);
  transform: translateY(-2px);
}

.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }

/* ── Category Badges ───────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-investing   { background: rgba(79,70,229,0.2);  color: #818cf8; border: 1px solid rgba(79,70,229,0.3); }
.badge-budgeting   { background: rgba(5,150,105,0.2);  color: #34d399; border: 1px solid rgba(5,150,105,0.3); }
.badge-debt        { background: rgba(220,38,38,0.2);  color: #f87171; border: 1px solid rgba(220,38,38,0.3); }
.badge-crypto      { background: rgba(124,58,237,0.2); color: #a78bfa; border: 1px solid rgba(124,58,237,0.3); }
.badge-retirement  { background: rgba(217,119,6,0.2);  color: #fbbf24; border: 1px solid rgba(217,119,6,0.3); }
.badge-tax         { background: rgba(8,145,178,0.2);  color: #22d3ee; border: 1px solid rgba(8,145,178,0.3); }
.badge-income      { background: rgba(190,24,93,0.2);  color: #f472b6; border: 1px solid rgba(190,24,93,0.3); }
.badge-premium     { background: linear-gradient(135deg,rgba(245,197,24,0.2),rgba(245,197,24,0.1)); color: var(--gold-500); border: 1px solid var(--border-gold); }

/* ── Glass Cards ───────────────────────────────────── */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(245,197,24,0.1);
}

/* ── Divider ───────────────────────────────────────── */
.divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* ── Gold Text ─────────────────────────────────────── */
.text-gold { color: var(--gold-500); }
.text-muted { color: var(--text-muted); }
.text-gradient {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500), #ff9500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Reading Progress Bar ──────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--teal));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy-800); }
::-webkit-scrollbar-thumb { background: var(--navy-400); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-600); }

/* ── Animations ────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,197,24,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(245,197,24,0); }
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-fade-up   { animation: fadeInUp 0.6s ease forwards; }
.animate-fade      { animation: fadeIn 0.5s ease forwards; }
.animate-float     { animation: float 4s ease-in-out infinite; }

/* ── Ad Zones ──────────────────────────────────────── */
.ad-zone {
  background: var(--surface-1);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}
.ad-zone.leaderboard { height: 90px; width: 100%; max-width: 728px; margin: 0 auto; }
.ad-zone.rectangle   { height: 250px; width: 300px; }
.ad-zone.inline      { height: 120px; width: 100%; margin: 2rem 0; }

/* ── Utility Classes ───────────────────────────────── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mt-4  { margin-top: 2rem; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.mb-4  { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.w-full { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Authority & Trust Elements ─────────────────────── */
.expert-tip {
  background: rgba(79,70,229,0.05);
  border-left: 4px solid var(--gold-500);
  padding: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0;
  position: relative;
}
.expert-tip::before {
  content: '💡 Expert Opinion';
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.scam-alert {
  background: rgba(220,38,38,0.05);
  border: 1px solid rgba(220,38,38,0.2);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.scam-alert-icon { font-size: 1.5rem; }
.scam-alert-content h4 { color: #f87171; margin-bottom: 0.25rem; font-size: 1rem; }
.scam-alert-content p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }

.trust-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  padding: 2rem 0;
  opacity: 0.6;
  filter: grayscale(1);
  transition: var(--transition);
  flex-wrap: wrap;
}
.trust-bar:hover { opacity: 1; filter: grayscale(0); }
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lead-magnet {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lead-magnet::after {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  z-index: 0;
}

/* ── Comparison & Monetization ─────────────────────── */
.comp-table-container { margin: 2rem 0; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-card); }
.comp-header { display: grid; grid-template-columns: 180px 1fr 140px 180px; gap: 1rem; padding: 1.25rem 2rem; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border); font-family: var(--font-heading); font-weight: 800; font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
.comp-row { display: grid; grid-template-columns: 180px 1fr 140px 180px; gap: 1rem; padding: 2rem; border-bottom: 1px solid var(--border); align-items: center; transition: var(--transition); }
.comp-row:last-child { border-bottom: none; }
.comp-row:hover { background: rgba(245,197,24,0.02); }

.comp-platform { display: flex; flex-direction: column; gap: 0.5rem; }
.comp-logo-wrap { width: 120px; height: 40px; background: white; border-radius: 4px; padding: 0.5rem; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.comp-logo-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }

.comp-pros { display: flex; flex-direction: column; gap: 0.25rem; }
.comp-pro-item { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.5rem; }
.comp-pro-item::before { content: '✓'; color: var(--teal); font-weight: 900; }

.comp-rating { display: flex; align-items: center; gap: 0.25rem; }
.star-filled { color: var(--gold-500); }
.star-muted { color: var(--border); }
.rating-num { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); margin-top: 0.25rem; }

@media (max-width: 1024px) {
  .comp-header { display: none; }
  .comp-row { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .comp-logo-wrap { margin: 0 auto; }
  .comp-pros { align-items: center; }
  .comp-rating { justify-content: center; }
}

.badge-affiliate { background: rgba(79,70,229,0.1); color: var(--gold-500); border: 1px solid var(--gold-500); font-size: 0.6rem; padding: 0.2rem 0.6rem; border-radius: 100px; text-transform: uppercase; font-weight: 800; width: fit-content; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --section-gap: 4rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .btn-lg { padding: 0.85rem 1.75rem; font-size: 0.95rem; }
}
