/* ═══════════════════════════════════════════════════════════
   CreditPlanner.in — styles.css (Part 3 — refreshed theme)
   
   WHAT CHANGED from Part 1/2:
   - Base bg lifted from #0c0c0e → #141416 (softer, less harsh)
   - Card surfaces lifted for better depth perception
   - Text contrast improved — secondary text is more readable
   - Borders slightly more visible
   - Status colors slightly brighter backgrounds for readability
   - Accent shifted warmer (less neon purple, more refined indigo)
   
   Aesthetic: Soft dark — like Linear, Vercel dashboard, Raycast
═══════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* ── Backgrounds — lifted from pure black ── */
  --bg:           #141416;   /* was #0c0c0e — now soft dark, not black */
  --bg-1:         #1a1a1e;   /* was #111115 */
  --bg-2:         #202024;   /* was #17171c */
  --bg-3:         #26262c;   /* was #1e1e24 */
  --bg-card:      #1e1e22;   /* was #141418 — cards now clearly visible */
  --bg-hover:     #242428;

  /* ── Borders — slightly more visible ── */
  --border:       rgba(255, 255, 255, 0.08);   /* was .07 */
  --border-md:    rgba(255, 255, 255, 0.13);   /* was .11 */
  --border-lg:    rgba(255, 255, 255, 0.22);   /* was .18 */

  /* ── Text — improved readability ── */
  --text-1:       #f0f0f3;   /* primary — slightly softer than pure white */
  --text-2:       #a0a0b4;   /* secondary — was #9898a8, now more readable */
  --text-3:       #6a6a80;   /* muted — was #55556a, now less invisible */
  --text-inv:     #141416;

  /* ── Status colors — slightly warmer/brighter for dark bg ── */
  --green:        #34d974;   /* was #22c55e — slightly brighter */
  --green-bg:     rgba(52, 217, 116, 0.10);
  --green-border: rgba(52, 217, 116, 0.22);
  --green-text:   #86efac;

  --yellow:       #f0b429;   /* was #eab308 — warmer */
  --yellow-bg:    rgba(240, 180, 41, 0.10);
  --yellow-border:rgba(240, 180, 41, 0.22);
  --yellow-text:  #fde68a;

  --red:          #f05252;   /* was #ef4444 — slightly softer */
  --red-bg:       rgba(240, 82, 82, 0.10);
  --red-border:   rgba(240, 82, 82, 0.22);
  --red-text:     #fca5a5;

  --blue:         #4f8ef7;
  --blue-bg:      rgba(79, 142, 247, 0.10);
  --blue-border:  rgba(79, 142, 247, 0.22);
  --blue-text:    #93c5fd;

  /* ── Accent — warmer indigo, less neon ── */
  --accent:       #6e5ff0;   /* was #7c6aff */
  --accent-2:     #9488f5;   /* was #9d8fff — slightly lighter for dark bg */
  --accent-bg:    rgba(110, 95, 240, 0.12);
  --accent-border:rgba(110, 95, 240, 0.25);

  /* ── Typography ── */
  --font-serif:   'Instrument Serif', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;

  /* ── Spacing & radius ── */
  --nav-h:        64px;
  --r-sm:         8px;
  --r-md:         12px;
  --r-lg:         18px;
  --r-xl:         24px;

  /* ── Shadows — softer on lifted backgrounds ── */
  --shadow:       0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg:    0 8px 40px rgba(0, 0, 0, 0.40);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: 11px 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  white-space: nowrap;
  position: relative;
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(110, 95, 240, 0.3);
}
.btn-primary:active  { transform: translateY(0); }
.btn-primary.full    { width: 100%; padding: 13px; font-size: 15px; }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-ghost:hover {
  border-color: var(--border-md);
  color: var(--text-1);
  background: var(--bg-hover);
}
.btn-ghost.full { width: 100%; }

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text-1);
  color: var(--text-inv);
  border: none;
  border-radius: var(--r-sm);
  padding: 15px 32px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s;
}
.btn-hero:hover  { opacity: 0.88; transform: translateY(-1px); }
.btn-hero:active { transform: translateY(0); }

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--text-2);
  border: none;
  font-family: var(--font-sans);
  font-size: 15px;
  cursor: pointer;
  padding: 12px 0;
  transition: color 0.15s;
}
.btn-hero-ghost:hover { color: var(--text-1); }

.link-btn {
  background: none;
  border: none;
  color: var(--accent-2);
  font-family: var(--font-sans);
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.link-btn:hover { color: var(--accent); }

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(20, 20, 22, 0.90);  /* matches new --bg */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon  { font-size: 20px; color: var(--accent-2); line-height: 1; }
.logo-text  { font-family: var(--font-sans); font-size: 16px; font-weight: 600; color: var(--text-1); letter-spacing: -0.3px; }
.logo-tld   { color: var(--accent-2); }

.nav-links  { display: flex; gap: 28px; margin-left: 8px; }
.nav-link   { color: var(--text-2); text-decoration: none; font-size: 14px; transition: color 0.15s; }
.nav-link:hover { color: var(--text-1); }

.nav-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-2);
  border-radius: 2px;
}
.nav-hamburger:hover span { background: var(--text-1); }

.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 80px;
}
.hero-inner { padding-top: 60px; }

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 24px;
}
.hero-label-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}
.hero-title em { font-style: italic; color: var(--accent-2); }

.hero-sub {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.7;
  font-weight: 300;
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.hero-disclaimer { font-size: 12px; color: var(--text-3); }

/* Hero mockup */
.hero-mockup { display: flex; justify-content: center; align-items: center; padding-top: 60px; }
.mockup-card {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--r-xl);
  padding: 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.mockup-date { font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.mockup-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.mockup-action { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--r-md); border: 1px solid; }
.mockup-action.green  { background: var(--green-bg);  border-color: var(--green-border); }
.mockup-action.red    { background: var(--red-bg);    border-color: var(--red-border); }
.mockup-action.yellow { background: var(--yellow-bg); border-color: var(--yellow-border); }
.mockup-action-icon  { font-size: 18px; flex-shrink: 0; }
.mockup-action-title { font-size: 13px; font-weight: 600; }
.mockup-action-sub   { font-size: 11px; color: var(--text-2); }
.mockup-footer { font-size: 11px; color: var(--text-3); text-align: center; padding-top: 12px; border-top: 1px solid var(--border); }

/* ══════════════════════════════════════
   SECTIONS
══════════════════════════════════════ */
.section     { padding: 96px 24px; }
.section-alt { background: var(--bg-1); }
.section-cta { border-top: 1px solid var(--border); }
.section-inner      { max-width: 1100px; margin: 0 auto; }
.section-inner.center { text-align: center; }

.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 48px;
  max-width: 640px;
}
.section-inner.center .section-title { margin-left: auto; margin-right: auto; }
.section-title em { font-style: italic; color: var(--accent-2); }

/* Steps */
.steps { display: flex; align-items: flex-start; gap: 24px; }
.step  { flex: 1; }
.step-num { font-family: var(--font-serif); font-size: 42px; font-weight: 400; color: var(--bg-3); line-height: 1; margin-bottom: 16px; }
.step-title { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.step-desc  { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.step-divider { font-size: 22px; color: var(--text-3); flex-shrink: 0; margin-top: 12px; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--border-md); transform: translateY(-2px); }
.feature-card--large { grid-column: span 3; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.feature-card--large .feature-icon  { font-size: 36px; }
.feature-card--large .feature-title { font-size: 20px; margin-bottom: 10px; }
.feature-card--large .feature-desc  { font-size: 15px; }
.feature-icon  { font-size: 26px; margin-bottom: 14px; display: block; }
.feature-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.feature-desc  { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* Trust bar */
.trust-bar   { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 20px 24px; }
.trust-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.trust-item  { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.trust-icon  { font-size: 16px; }
.trust-sep   { width: 1px; height: 16px; background: var(--border); }

/* Footer */
.footer       { padding: 48px 24px; border-top: 1px solid var(--border); }
.footer-inner { max-width: 600px; margin: 0 auto; text-align: center; }
.footer-logo  { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; }
.footer-note  { font-size: 12px; color: var(--text-3); line-height: 1.65; margin-bottom: 16px; }
.footer-copy  { font-size: 12px; color: var(--text-3); }

/* ══════════════════════════════════════
   AUTH MODAL
══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-xl);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.22s ease;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  border-radius: var(--r-sm);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.modal-close:hover { border-color: var(--border-md); color: var(--text-2); }

.auth-tabs {
  display: flex;
  background: var(--bg-3);
  border-radius: var(--r-sm);
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.auth-tab.active { background: var(--bg-card); color: var(--text-1); box-shadow: 0 1px 6px rgba(0,0,0,0.25); }

.auth-panel         { display: none; }
.auth-panel.active  { display: block; }
.auth-greeting      { font-size: 16px; font-weight: 500; margin-bottom: 22px; }

/* Form fields */
.field-group   { margin-bottom: 17px; }
.field-label   { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 7px; }
.field-hint    { font-weight: 400; color: var(--text-3); }
.field-input-wrap { position: relative; }

.field-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 11px 14px;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
  -moz-appearance: textfield;
}
.field-input::-webkit-outer-spin-button,
.field-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.field-input:focus   { border-color: var(--accent); background: var(--bg-2); }
.field-input::placeholder { color: var(--text-3); }
.field-input-wrap .field-input { padding-right: 42px; }

.field-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: var(--text-3);
  cursor: pointer; display: flex; align-items: center; padding: 2px;
  transition: color 0.15s;
}
.field-eye:hover { color: var(--text-2); }

.password-strength {
  margin-top: 7px; height: 18px;
  font-size: 11px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.strength-bar  { flex: 1; height: 3px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 2px; transition: width 0.25s, background 0.25s; }

.form-error {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red-text);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.auth-disclaimer { font-size: 11px; color: var(--text-3); text-align: center; line-height: 1.55; margin-top: 14px; margin-bottom: 12px; }
.auth-switch     { font-size: 13px; color: var(--text-2); text-align: center; margin-top: 16px; }

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 11px 20px;
  font-size: 13px;
  color: var(--text-1);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  animation: slideUp 0.2s ease;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.success { border-color: var(--green-border); color: var(--green-text); }
.toast.error   { border-color: var(--red-border);   color: var(--red-text); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: calc(var(--nav-h) + 20px); }
  .hero-inner  { padding-top: 40px; }
  .hero-sub    { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-mockup { padding-top: 0; }
  .nav-links   { display: none; }
  .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
  .steps { flex-direction: column; gap: 32px; }
  .step-divider { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-card--large { grid-column: span 2; grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 34px; }
  .section    { padding: 64px 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card--large { grid-column: span 1; }
  .modal-box  { padding: 24px 20px; }
  .trust-sep  { display: none; }
}
@media (max-width: 380px) {
  .hero-title { font-size: 28px; }
  .hero-actions { flex-direction: column; align-items: center; }
}