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

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg:           #F7F8FC;
  --surface:      #FFFFFF;
  --surface-2:    #F0F2F8;
  --navy:         #0F1F3D;
  --navy-light:   #1A3460;
  --teal:         #00B4A2;
  --teal-dark:    #009688;
  --teal-light:   #E6F9F7;
  --text:         #111827;
  --text-muted:   #6B7280;
  --border:       #E5E7EB;
  --green:        #10B981;
  --green-light:  #ECFDF5;
  --red:          #EF4444;
  --red-light:    #FEF2F2;
  --amber:        #F59E0B;
  --amber-light:  #FFFBEB;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06);
  --shadow:       0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-md:    0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-lg:    0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    16px;
  --radius-xl:    24px;
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ─── Typography ─────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-muted); line-height: 1.7; }

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* ─── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background: var(--navy);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  font-size: 1.375rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.nav-logo span { color: var(--teal); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.nav-links a.active { color: var(--teal); }
.nav-cta {
  background: var(--teal) !important;
  color: #fff !important;
  padding: 0.5rem 1.125rem !important;
  border-radius: var(--radius-sm) !important;
}
.nav-cta:hover { background: var(--teal-dark) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  gap: 0.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 0.5rem;
}
.nav-mobile a {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-mobile.open { display: flex; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,180,162,0.35); }
.btn-secondary {
  background: var(--surface);
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }
.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-navy:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; border-radius: var(--radius); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger {
  background: var(--red-light);
  color: var(--red);
  border: 1.5px solid #fca5a5;
}
.btn-danger:hover { background: #fee2e2; }

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
}
.card-body { padding: 1.75rem; }
.card-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-header h3 { margin: 0; }

/* ─── Form Controls ──────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.125rem;
}
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.375rem;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.6875rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--surface);
  transition: all 0.15s ease;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,180,162,0.12);
}
.form-group input::placeholder { color: #9CA3AF; }

.input-prefix {
  position: relative;
}
.input-prefix span {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1rem;
  pointer-events: none;
}
.input-prefix input {
  padding-left: 1.75rem;
}

.input-suffix {
  position: relative;
}
.input-suffix span {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  pointer-events: none;
}
.input-suffix input {
  padding-right: 2.5rem;
}

.range-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.range-wrapper input[type="range"] {
  flex: 1;
  padding: 0;
  border: none;
  box-shadow: none;
  accent-color: var(--teal);
  cursor: pointer;
}
.range-wrapper input[type="range"]:focus { box-shadow: none; }
.range-value {
  font-weight: 700;
  font-size: 1rem;
  color: var(--teal);
  min-width: 3.5rem;
  text-align: right;
}

/* ─── Section Dividers ───────────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.375rem;
}
.stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.stat-positive { color: var(--green); }
.stat-negative { color: var(--red); }
.stat-neutral  { color: var(--navy); }

/* ─── Progress Bars ──────────────────────────────────────────── */
.progress-bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 0.5rem;
}
.progress-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green  { background: var(--green-light); color: #065F46; }
.badge-red    { background: var(--red-light);   color: #991B1B; }
.badge-amber  { background: var(--amber-light); color: #92400E; }
.badge-teal   { background: var(--teal-light);  color: #005A52; }
.badge-navy   { background: #EEF2FF;            color: var(--navy); }

/* ─── Tool Layout (split view) ───────────────────────────────── */
.tool-page { padding: 2.5rem 0 4rem; }
.tool-header { margin-bottom: 2.5rem; }
.tool-header h1 { color: var(--navy); margin-bottom: 0.5rem; }
.tool-header p { font-size: 1.05rem; }

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.panel { display: flex; flex-direction: column; gap: 1.5rem; }

/* ─── Chart Container ────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  width: 100%;
}
.chart-wrap canvas { width: 100% !important; }

/* ─── Debt Items ─────────────────────────────────────────────── */
.debt-item {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1.5px solid var(--border);
  position: relative;
  transition: border-color 0.15s;
}
.debt-item:hover { border-color: var(--teal); }
.debt-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.debt-item-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.debt-item .form-group { margin-bottom: 0; }

/* ─── Comparison Table ───────────────────────────────────────── */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.method-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 2px solid var(--border);
  transition: all 0.2s;
}
.method-card.winner { border-color: var(--teal); background: var(--teal-light); }
.method-card h4 { margin-bottom: 0.75rem; font-size: 0.9375rem; }
.method-stat { margin-bottom: 0.5rem; }
.method-stat .label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.method-stat .value { font-size: 1.0625rem; font-weight: 700; color: var(--navy); }
.winner-badge {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.1875rem 0.5rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

/* ─── Category Rows ──────────────────────────────────────────── */
.category-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}
.category-row:last-child { border-bottom: none; }
.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.category-name { flex: 1; font-size: 0.9rem; font-weight: 500; }
.category-amount { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.category-pct { font-size: 0.8rem; color: var(--text-muted); min-width: 3rem; text-align: right; }

/* ─── Simulator Inputs ───────────────────────────────────────── */
.sim-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}
.timeline-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1.5px solid var(--border);
  text-align: center;
  transition: all 0.2s;
}
.timeline-card:hover { border-color: var(--teal); }
.timeline-year { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.375rem; }
.timeline-amount { font-size: 1.25rem; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; }
.timeline-saved { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ─── Hero (index) ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(0,180,162,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { max-width: 640px; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,180,162,0.15);
  color: var(--teal);
  border: 1px solid rgba(0,180,162,0.3);
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero h1 { color: #fff; margin-bottom: 1.25rem; }
.hero h1 span { color: var(--teal); }
.hero p { color: rgba(255,255,255,0.72); font-size: 1.1rem; margin-bottom: 2.5rem; max-width: 520px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── Tool Cards (index) ─────────────────────────────────────── */
.tools-section { padding: 5rem 0; }
.tools-section h2 { text-align: center; color: var(--navy); margin-bottom: 0.75rem; }
.tools-section .subtitle { text-align: center; max-width: 540px; margin: 0 auto 3rem; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.tool-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
}
.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.tool-icon-teal   { background: var(--teal-light); }
.tool-icon-navy   { background: #EEF2FF; }
.tool-icon-green  { background: var(--green-light); }
.tool-icon-amber  { background: var(--amber-light); }
.tool-card h3 { color: var(--navy); }
.tool-card p { font-size: 0.9rem; flex: 1; }
.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  transition: gap 0.15s;
}
.tool-card:hover .tool-card-link { gap: 0.625rem; }

/* ─── How It Works ───────────────────────────────────────────── */
.how-section {
  background: var(--navy);
  padding: 5rem 0;
}
.how-section h2 { color: #fff; text-align: center; margin-bottom: 0.75rem; }
.how-section .subtitle { color: rgba(255,255,255,0.6); text-align: center; max-width: 500px; margin: 0 auto 3rem; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.step {
  text-align: center;
  padding: 2rem;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.step h3 { color: #fff; margin-bottom: 0.5rem; }
.step p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }

/* ─── Email Capture ──────────────────────────────────────────── */
.email-section {
  padding: 5rem 0;
}
.email-box {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius-xl);
  padding: 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.email-box::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 50%;
  height: 160%;
  background: radial-gradient(ellipse, rgba(0,180,162,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.email-box h2 { color: #fff; margin-bottom: 0.75rem; position: relative; }
.email-box p { color: rgba(255,255,255,0.68); max-width: 480px; margin: 0 auto 2rem; position: relative; }
.email-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.email-form input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
}
.email-form input::placeholder { color: rgba(255,255,255,0.45); }
.email-form input:focus { outline: none; border-color: var(--teal); background: rgba(255,255,255,0.12); }
.email-disclaimer {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
  position: relative;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  background: #090F1E;
  padding: 3rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo { font-size: 1.125rem; font-weight: 800; color: #fff; }
.footer-logo span { color: var(--teal); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.5); font-size: 0.875rem; transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-copy { color: rgba(255,255,255,0.35); font-size: 0.8125rem; }

/* ─── Disclaimer ─────────────────────────────────────────────── */
.disclaimer {
  background: var(--amber-light);
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.125rem;
  font-size: 0.8125rem;
  color: #78350F;
  line-height: 1.55;
}

/* ─── Utility ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* ─── Loading / Empty States ─────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state p { font-size: 0.9375rem; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
  .steps-grid { grid-template-columns: 1fr; gap: 1rem; }
  .email-form { flex-direction: column; }
  .sim-timeline { grid-template-columns: repeat(2, 1fr); }
  .comparison { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero { padding: 4rem 0 3.5rem; }
  .hero-actions { flex-direction: column; }
  .tools-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .email-box { padding: 2rem 1.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .grid-2 { grid-template-columns: 1fr; }
  .sim-timeline { grid-template-columns: repeat(2, 1fr); }
  .debt-item-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .sim-timeline { grid-template-columns: 1fr 1fr; }
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease forwards; }

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: #CBD5E1; }
