/* =====================================================
   Thrive Financial — Design System v2
   Aesthetic: Deep Purple Noir · Investigative Precision
   Typography: Cormorant Garamond + Outfit
   Palette: Deep Purple · Aged Gold · Violet
   ===================================================== */

/* ─── Variables ─────────────────────────────────────── */
:root {
  /* Backgrounds — Deep Purple */
  --tf-bg:          #0A0514;
  --tf-surface:     #100820;
  --tf-card:        #160C2C;
  --tf-card-alt:    #1C1138;

  /* Borders */
  --tf-border:        rgba(124, 58, 237, 0.22);
  --tf-border-hover:  rgba(124, 58, 237, 0.5);
  --tf-border-muted:  rgba(124, 58, 237, 0.1);
  --tf-border-white:  rgba(255, 255, 255, 0.06);

  /* Brand Purple — Primary Accent */
  --tf-purple:        #7c3aed;
  --tf-purple-bright: #9c5bff;
  --tf-purple-pale:   rgba(124, 58, 237, 0.12);
  --tf-purple-glow:   rgba(124, 58, 237, 0.4);

  /* Brand Gold — Buttons & Labels */
  --tf-gold:        #C89A3A;
  --tf-gold-bright: #E8B84E;
  --tf-gold-pale:   rgba(200, 154, 58, 0.12);

  /* Accent / Tech */
  --tf-teal:        #7c3aed; /* Unified: purple used as accent */
  --tf-teal-pale:   rgba(124, 58, 237, 0.12);
  --tf-teal-bright: #9c5bff;

  /* Risk/Alert */
  --tf-rose:        #f472b6;
  --tf-rose-pale:   rgba(244, 114, 182, 0.1);

  /* Text */
  --tf-text:        #EDE8F8;
  --tf-text-muted:  #9A88C0;
  --tf-text-dim:    #5A4A78;

  /* Typography */
  --tf-font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --tf-font-body:    'Outfit', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --tf-shadow-sm:     0 2px 12px rgba(0, 0, 0, 0.5);
  --tf-shadow-md:     0 8px 32px rgba(0, 0, 0, 0.6);
  --tf-shadow-lg:     0 20px 60px rgba(0, 0, 0, 0.7);
  --tf-shadow-purple: 0 20px 60px -10px rgba(124, 58, 237, 0.35);
  --tf-shadow-gold:   0 8px 32px -8px rgba(200, 154, 58, 0.3);

  /* Spacing */
  --tf-section-py:    6rem;
  --tf-container-px:  1rem;

  /* Transitions */
  --tf-ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --tf-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--tf-font-body);
  background-color: var(--tf-bg);
  color: var(--tf-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

/* Subtle noise texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.02;
  pointer-events: none;
  z-index: 9999;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ─── Layout ─────────────────────────────────────────── */
.tf-container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--tf-container-px);
  padding-right: var(--tf-container-px);
}

.container {
  padding-left: var(--tf-container-px);
  padding-right: var(--tf-container-px);
}

@media (min-width: 640px)  {
  :root { --tf-container-px: 1.5rem; }
  .tf-container { max-width: 640px; }
}

@media (min-width: 768px)  {
  .tf-container { max-width: 768px; }
}

@media (min-width: 1024px) {
  :root { --tf-container-px: 2rem; --tf-section-py: 8rem; }
  .tf-container { max-width: 1024px; }
}

@media (min-width: 1280px) {
  .tf-container { max-width: 1280px; }
}

@media (min-width: 1536px) {
  .tf-container { max-width: 1536px; }
}

.tf-section { padding-top: var(--tf-section-py); padding-bottom: var(--tf-section-py); }

/* ─── Typography ─────────────────────────────────────── */
.tf-display {
  font-family: var(--tf-font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--tf-text);
}

.tf-display em, .tf-display i {
  font-style: italic;
  font-weight: 400;
  color: var(--tf-gold-bright);
}

.tf-heading {
  font-family: var(--tf-font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--tf-text);
}

.tf-subheading {
  font-family: var(--tf-font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--tf-text-muted);
}

.tf-label {
  font-family: var(--tf-font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tf-gold);
}

.tf-body {
  font-family: var(--tf-font-body);
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--tf-text-muted);
}

/* ─── Eyebrow ────────────────────────────────────────── */
.tf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.tf-eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--tf-gold);
  flex-shrink: 0;
}

/* ─── Buttons ────────────────────────────────────────── */
.tf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.625rem;
  border-radius: 8px;
  font-family: var(--tf-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--tf-transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Gold primary CTA */
.tf-btn-primary {
  background: linear-gradient(135deg, #C89A3A, #E8B84E);
  color: #0A0514;
  border-color: transparent;
  font-weight: 700;
}
.tf-btn-primary:hover {
  background: linear-gradient(135deg, #E8B84E, #F5CC6A);
  box-shadow: 0 0 28px rgba(232, 184, 78, 0.45), 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

/* Purple outline */
.tf-btn-outline {
  background: rgba(124, 58, 237, 0.08);
  color: var(--tf-text);
  border-color: rgba(124, 58, 237, 0.35);
}
.tf-btn-outline:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--tf-purple);
  color: var(--tf-text);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

/* Ghost */
.tf-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--tf-text-muted);
  border-color: rgba(255, 255, 255, 0.08);
}
.tf-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--tf-text);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ─── Badges ─────────────────────────────────────────── */
.tf-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tf-badge-gold {
  background: var(--tf-gold-pale);
  color: var(--tf-gold-bright);
  border: 1px solid rgba(200, 154, 58, 0.25);
}
.tf-badge-purple {
  background: var(--tf-purple-pale);
  color: var(--tf-purple-bright);
  border: 1px solid rgba(124, 58, 237, 0.25);
}
/* Alias for backward compat */
.tf-badge-teal { background: var(--tf-purple-pale); color: var(--tf-purple-bright); border: 1px solid rgba(124,58,237,0.25); }
.tf-badge-muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--tf-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* ─── Cards ──────────────────────────────────────────── */
.tf-card {
  background: var(--tf-card);
  border: 1px solid var(--tf-border-muted);
  border-radius: 16px;
  transition: border-color var(--tf-transition), box-shadow var(--tf-transition), transform var(--tf-transition);
}
.tf-card:hover {
  border-color: var(--tf-border);
  box-shadow: var(--tf-shadow-md), 0 0 0 1px rgba(124, 58, 237, 0.06);
  transform: translateY(-3px);
}

/* ─── Icon Wraps ─────────────────────────────────────── */
.tf-icon-teal,
.tf-icon-purple {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--tf-purple-pale);
  color: var(--tf-purple-bright);
  flex-shrink: 0;
}
.tf-icon-gold {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--tf-gold-pale);
  color: var(--tf-gold-bright);
  flex-shrink: 0;
}

/* ─── Stat Display ───────────────────────────────────── */
.tf-stat-num {
  font-family: var(--tf-font-display);
  font-size: clamp(2.5rem, 4vw, 3.75rem);
  font-weight: 600;
  color: var(--tf-gold-bright);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ─── Divider ────────────────────────────────────────── */
.tf-divider { border: none; border-top: 1px solid var(--tf-border-muted); }

/* ─── Hero ───────────────────────────────────────────── */
.tf-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  padding-bottom: 4rem;
  overflow: hidden;
  background: linear-gradient(180deg, #1e0a3c 0%, #2a0e4a 30%, #1a0c24 65%, #0A0514 100%);
}

.tf-hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 20% 40%, rgba(124, 58, 237, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(192, 132, 252, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 40% 70% at 60% 90%, rgba(10, 5, 20, 0.9) 0%, transparent 60%);
}

.tf-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0.7) 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0.7) 70%, transparent 100%);
}

/* ─── Page Hero (subpages) ───────────────────────────── */
.tf-page-hero {
  padding-top: 9rem;
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #1e0a3c 0%, #1a0c24 50%, #100820 100%);
}
.tf-page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(124, 58, 237, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* ─── Header ─────────────────────────────────────────── */
[data-site-header] { position: fixed; top: 0; left: 0; right: 0; z-index: 200; }

.tf-header-bar {
  background: rgba(10, 5, 20, 0.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
  height: 68px;
  display: flex;
  align-items: center;
}
.tf-header-bar .tf-brand-name {
  font-family: var(--tf-font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tf-text);
}
.tf-nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--tf-text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: color var(--tf-transition), background var(--tf-transition);
  text-decoration: none;
}
.tf-nav-link:hover, .tf-nav-link.is-active {
  color: var(--tf-text);
  background: rgba(124, 58, 237, 0.12);
}

/* ─── Footer ─────────────────────────────────────────── */
[data-site-footer] {
  background: #0D0720 !important;
  border-top: 1px solid rgba(124, 58, 237, 0.15) !important;
}

/* Footer link columns: 1-col on mobile → 2-col on sm → 4-col on lg */
.tf-footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 640px) {
  .tf-footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .tf-footer-cols { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; }
}
.tf-footer-heading {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tf-text);
  margin-bottom: 1rem;
}
.tf-footer-link {
  font-size: 0.875rem;
  color: var(--tf-text-muted);
  transition: color var(--tf-transition);
  display: block;
  padding: 0.25rem 0;
  text-decoration: none;
}
.tf-footer-link:hover { color: var(--tf-text); }

/* ─── Pricing Cards ──────────────────────────────────── */
.tf-price-card {
  background: var(--tf-card);
  border: 1px solid var(--tf-border-muted);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  position: relative;
}
.tf-price-card:hover {
  border-color: rgba(124, 58, 237, 0.6);
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5),
              0 0 30px rgba(124,58,237,0.18),
              0 0 60px rgba(124,58,237,0.08),
              inset 0 0 30px rgba(124,58,237,0.04);
}
.tf-price-card--featured {
  background: linear-gradient(150deg, #1e0a3c 0%, #160C2C 100%);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.08), 0 20px 50px rgba(0,0,0,0.5), 0 0 40px rgba(124,58,237,0.15);
}
.tf-price-card--featured:hover {
  border-color: var(--tf-purple);
  box-shadow: 0 0 50px rgba(124, 58, 237, 0.35),
              0 0 100px rgba(124, 58, 237, 0.12),
              0 30px 60px rgba(0,0,0,0.6),
              inset 0 0 40px rgba(124,58,237,0.06);
}
.tf-price-number {
  font-family: var(--tf-font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--tf-text);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ─── Section Alternates ─────────────────────────────── */
.tf-section-alt {
  background: #100820;
  border-top: 1px solid rgba(124, 58, 237, 0.08);
  border-bottom: 1px solid rgba(124, 58, 237, 0.08);
}

/* ─── Article Cards ──────────────────────────────────── */
.tf-article-card {
  display: flex;
  flex-direction: column;
  background: var(--tf-card);
  border: 1px solid var(--tf-border-muted);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  text-decoration: none;
  color: inherit;
}
.tf-article-card:hover {
  border-color: var(--tf-border);
  transform: translateY(-4px);
  box-shadow: var(--tf-shadow-lg), 0 0 20px rgba(124,58,237,0.1);
}

/* ─── Comparison Table ───────────────────────────────── */
.tf-compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}
.tf-compare-table th {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tf-text-muted);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--tf-border-muted);
  text-align: center;
}
.tf-compare-table th:first-child { text-align: left; }
.tf-compare-table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(124,58,237,0.04);
  color: var(--tf-text-muted);
  text-align: center;
  vertical-align: middle;
}
.tf-compare-table td:first-child { text-align: left; color: var(--tf-text); font-weight: 500; }
.tf-compare-table tr:last-child td { border-bottom: none; }
.tf-compare-table .tf-yes { color: var(--tf-purple-bright); font-weight: 600; }
.tf-compare-table .tf-no  { color: var(--tf-text-dim); }

/* ─── Feature List ───────────────────────────────────── */
.tf-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.tf-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--tf-text-muted);
}
.tf-feature-list li::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin-top: 2px;
  background-color: var(--tf-purple-bright);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='currentColor' d='M11.6 3.4a.8.8 0 0 1 0 1.13L5.87 10.27a.8.8 0 0 1-1.14 0L2.4 7.94A.8.8 0 1 1 3.53 6.8l1.77 1.77 5.17-5.17a.8.8 0 0 1 1.13 0Z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='currentColor' d='M11.6 3.4a.8.8 0 0 1 0 1.13L5.87 10.27a.8.8 0 0 1-1.14 0L2.4 7.94A.8.8 0 1 1 3.53 6.8l1.77 1.77 5.17-5.17a.8.8 0 0 1 1.13 0Z'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
}
.tf-feature-list li.tf-excluded { opacity: 0.38; }
.tf-feature-list li.tf-excluded::before {
  background-color: var(--tf-text-dim);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='currentColor' d='M11 7a.7.7 0 0 1-.7.7H3.7a.7.7 0 0 1 0-1.4h6.6A.7.7 0 0 1 11 7Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='currentColor' d='M11 7a.7.7 0 0 1-.7.7H3.7a.7.7 0 0 1 0-1.4h6.6A.7.7 0 0 1 11 7Z'/%3E%3C/svg%3E");
}

/* ─── Step Numbers ───────────────────────────────────── */
.tf-step-num {
  font-family: var(--tf-font-display);
  font-size: 9.5rem;
  font-weight: 600;
  color: var(--tf-purple);
  opacity: 0.12;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

/* ─── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--tf-bg); }
::-webkit-scrollbar-thumb { background: rgba(124, 58, 237, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124, 58, 237, 0.45); }

/* ─── Utilities ──────────────────────────────────────── */
.tf-text-gold    { color: var(--tf-gold-bright); }
.tf-text-purple  { color: var(--tf-purple-bright); }
.tf-text-muted   { color: var(--tf-text-muted); }
.tf-text-dim     { color: var(--tf-text-dim); }
.tf-bg-card      { background: var(--tf-card); }
.tf-bg-surface   { background: var(--tf-surface); }
.tf-border-line  { border-top: 1px solid var(--tf-border-muted); }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .tf-hero { min-height: 0; padding-top: 6rem; padding-bottom: 4rem; }
  .tf-stat-num { font-size: 2.25rem; }
  .max-md\:grid-cols-1 { grid-template-columns: 1fr !important; }
  .max-md\:order-1 { order: 1 !important; }
  .max-md\:order-2 { order: 2 !important; }

  /* Mobile: ensure sections with inline grid don't overflow */
  section, .tf-section, .tf-page-hero {
    max-width: 100%;
    overflow-x: hidden;
  }
}
@media (max-width: 1024px) {
  .max-lg\:grid-cols-1 { grid-template-columns: 1fr !important; }
}
