/* ==========================================================================
   CredNova — Premium Credit Intelligence Styles
   Built on top of Bootstrap 5
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&display=swap');

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Ink (neutral) ramp */
  --ink-50: #f6f7f9;
  --ink-100: #eceef2;
  --ink-200: #d5d9e2;
  --ink-300: #b0b8c8;
  --ink-400: #8590a8;
  --ink-500: #67738c;
  --ink-600: #525c72;
  --ink-700: #434b5d;
  --ink-800: #3a404f;
  --ink-900: #1f2330;
  --ink-950: #13161f;

  /* Brand (green) ramp */
  --brand-50: #eefbf3;
  --brand-100: #d6f5e0;
  --brand-200: #aeebc4;
  --brand-300: #7ad9a3;
  --brand-400: #45c07f;
  --brand-500: #1fa863;
  --brand-600: #128a4d;
  --brand-700: #0f6e3f;
  --brand-800: #105734;
  --brand-900: #0e472c;
  --brand-950: #062817;

  /* Gold (accent) ramp */
  --gold-50: #fbf8ee;
  --gold-100: #f6edcf;
  --gold-200: #edd99c;
  --gold-300: #e4be63;
  --gold-400: #dca73d;
  --gold-500: #c98a25;
  --gold-600: #a96b1d;
  --gold-700: #884f1c;
  --gold-800: #713f1d;
  --gold-900: #60351c;
  --gold-950: #381c0d;

  /* Semantic */
  --bg: var(--ink-50);
  --surface: #ffffff;
  --text: var(--ink-900);
  --text-muted: var(--ink-600);
  --border: var(--ink-100);

  /* Shadows */
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lift: 0 2px 4px rgba(15, 23, 42, 0.05), 0 18px 40px rgba(15, 23, 42, 0.10);
  --shadow-glow: 0 0 0 1px rgba(31, 168, 99, 0.18), 0 18px 50px rgba(31, 168, 99, 0.18);

  /* Type */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  /* Bootstrap overrides */
  --bs-body-font-family: var(--font-sans);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-primary: var(--brand-600);
  --bs-primary-rgb: 18, 138, 77;
  --bs-link-color: var(--brand-600);
  --bs-link-color-rgb: 18, 138, 77;
  --bs-link-hover-color: var(--brand-700);
  --bs-link-hover-color-rgb: 15, 110, 63;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--brand-200); color: var(--brand-900); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

a { text-decoration: none; transition: color 0.2s ease; }

img { max-width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.container-page {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) { .container-page { padding-inline: 2rem; } }
@media (min-width: 1024px) { .container-page { padding-inline: 3rem; } }

.section { padding-block: 5rem; }
@media (min-width: 1024px) { .section { padding-block: 7rem; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--brand-100);
}

.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* --------------------------------------------------------------------------
   Backgrounds
   -------------------------------------------------------------------------- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}
.bg-dots {
  background-image: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}
.mask-fade-b {
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.btn:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  background: var(--brand-700);
  color: #fff;
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: #fff;
  color: var(--ink-900);
  border-color: var(--ink-200);
}
.btn-secondary:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
  box-shadow: var(--shadow-soft);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-700);
}
.btn-ghost:hover { background: var(--ink-100); }
.btn-light-custom {
  background: #fff;
  color: var(--brand-700);
}
.btn-light-custom:hover { background: var(--brand-50); color: var(--brand-700); }
.btn-outline-light-custom {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-outline-light-custom:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card-soft {
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}
.card-soft:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--brand-200);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-control-custom,
.form-select-custom,
.form-textarea-custom {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--ink-900);
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}
.form-control-custom::placeholder,
.form-textarea-custom::placeholder { color: var(--ink-400); }
.form-control-custom:focus,
.form-select-custom:focus,
.form-textarea-custom:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(31, 168, 99, 0.15);
}
.form-label-custom {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-700);
}
.form-select-custom {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2367738c' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1030;
  transition: all 0.3s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ink-100);
  box-shadow: var(--shadow-soft);
}
.site-header .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-900);
}
.site-header .brand-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 6rem;
  height: 5rem;
  border-radius: 0.75rem;
  /*background: var(--brand-600);*/
  color: #fff;
  transition: transform 0.3s ease;
}
/*.site-header .navbar-brand:hover .brand-mark { transform: scale(1.05); }*/
/*.site-header .brand-mark::after {*/
/*  content: '';*/
/*  position: absolute;*/
/*  top: -2px;*/
/*  right: -2px;*/
/*  width: 8px;*/
/*  height: 8px;*/
/*  border-radius: 999px;*/
/*  background: var(--gold-400);*/
/*  box-shadow: 0 0 0 2px #fff;*/
/*}*/
.site-header .brand-text { display: flex; flex-direction: column; line-height: 1; }
.site-header .brand-name { font-size: 1.125rem; }
.site-header .brand-tag {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-500);
}
.site-header .nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-600);
  border-radius: 999px;
  transition: color 0.2s ease;
}
.site-header .nav-link:hover { color: var(--ink-900); }
.site-header .nav-link.active { color: var(--brand-700); }
.site-header .nav-link.active::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-500);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 4rem 0 auto 0;
  z-index: 1029;
  pointer-events: none;
}
.mobile-menu.open { pointer-events: auto; }
.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 22, 31, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-menu.open .mobile-menu-backdrop { opacity: 1; }
.mobile-menu-panel {
  position: relative;
  transform: translateY(-0.75rem);
  opacity: 0;
  transition: all 0.3s ease;
}
.mobile-menu.open .mobile-menu-panel {
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu-panel-inner {
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: 1rem;
  box-shadow: var(--shadow-lift);
  padding: 0.75rem;
}
.mobile-menu .nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-700);
}
.mobile-menu .nav-link:hover { background: var(--ink-50); }
.mobile-menu .nav-link.active { background: var(--brand-50); color: var(--brand-700); }

.navbar-toggler-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--ink-200);
  background: transparent;
  color: var(--ink-800);
  cursor: pointer;
  transition: background 0.2s ease;
}
.navbar-toggler-custom:hover { background: var(--ink-100); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: 6rem;
  overflow: hidden;
  background: var(--ink-950);
  color: var(--ink-200);
}
.site-footer a { color: var(--ink-300); transition: color 0.2s ease; }
.site-footer a:hover { color: #fff; }
.footer-heading {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-400);
}
.footer-link { font-size: 0.875rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--ink-400);
}
.footer-fineprint {
  font-size: 0.6875rem;
  line-height: 1.6;
  color: var(--ink-500);
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */
.page-header {
  position: relative;
  overflow: hidden;
  padding-top: 9rem;
  padding-bottom: 3rem;
}
@media (min-width: 1024px) {
  .page-header { padding-top: 11rem; padding-bottom: 4rem; }
}

/* --------------------------------------------------------------------------
   Score gauge
   -------------------------------------------------------------------------- */
.score-gauge { position: relative; }
.score-gauge svg { transform: rotate(-90deg); }
.score-gauge .gauge-track { stroke: var(--ink-100); }
.score-gauge .gauge-fill {
  transition: stroke-dasharray 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.7; }
  70% { transform: scale(1.1); opacity: 0; }
  100% { transform: scale(1.1); opacity: 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fade-up { animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-fade-in { animation: fadeIn 0.6s ease-out both; }
.animate-scale-in { animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse-ring { animation: pulseRing 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-spin { animation: spin 0.8s linear infinite; }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-gradient {
  background: linear-gradient(to right, var(--brand-600), var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.bg-ink-950 { background-color: var(--ink-950) !important; }
.bg-ink-100\/60 { background-color: rgba(236, 238, 242, 0.6) !important; }
.text-ink-300 { color: var(--ink-300) !important; }
.text-ink-400 { color: var(--ink-400) !important; }
.text-ink-500 { color: var(--ink-500) !important; }
.text-ink-600 { color: var(--ink-600) !important; }
.text-ink-700 { color: var(--ink-700) !important; }
.text-ink-900 { color: var(--ink-900) !important; }
.text-brand-400 { color: var(--brand-400) !important; }
.text-brand-500 { color: var(--brand-500) !important; }
.text-brand-600 { color: var(--brand-600) !important; }
.text-brand-700 { color: var(--brand-700) !important; }
.text-gold-300 { color: var(--gold-300) !important; }
.text-gold-500 { color: var(--gold-500) !important; }
.text-gold-700 { color: var(--gold-700) !important; }
.bg-brand-50 { background-color: var(--brand-50) !important; }
.bg-brand-600 { background-color: var(--brand-600) !important; }
.bg-brand-700 { background-color: var(--brand-700) !important; }
.bg-gold-100 { background-color: var(--gold-100) !important; }
.bg-ink-50 { background-color: var(--ink-50) !important; }
.bg-ink-900 { background-color: var(--ink-900) !important; }
.fw-display { font-family: var(--font-display); font-weight: 700; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.lh-1\.05 { line-height: 1.05; }
.lh-tight { line-height: 1.15; }
.fs-7 { font-size: 0.875rem; }
.fs-8 { font-size: 0.75rem; }
.fs-9 { font-size: 0.6875rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow-lift { box-shadow: var(--shadow-lift); }
.ring-1 { box-shadow: 0 0 0 1px var(--ink-100); }
.ring-brand-100 { box-shadow: 0 0 0 1px var(--brand-100); }
.divider-dot { width: 0.375rem; height: 0.375rem; border-radius: 999px; display: inline-block; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--ink-100); }
.faq-item:last-child { border-bottom: none; }
.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-900);
  list-style: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  border-radius: 999px;
  background: var(--ink-100);
  color: var(--ink-600);
  transition: all 0.2s ease;
}
details[open] .faq-summary .faq-icon {
  background: var(--brand-100);
  color: var(--brand-700);
  transform: rotate(45deg);
}
.faq-answer { padding-bottom: 1.5rem; color: var(--ink-600); }

/* Policy layout */
.policy-toc-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-600);
  transition: all 0.2s ease;
}
.policy-toc-link:hover { background: var(--ink-50); color: var(--brand-700); }
.policy-toc-num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-300);
}
.policy-toc-link:hover .policy-toc-num { color: var(--brand-500); }
.policy-section { scroll-margin-top: 6rem; }
.policy-callout {
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid;
}
.policy-callout-brand { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-900); }
.policy-callout-gold { background: var(--gold-50); border-color: var(--gold-100); color: var(--gold-900); }
.policy-callout-ink { background: var(--ink-100); border-color: var(--ink-200); color: var(--ink-900); }
.policy-list { list-style: none; padding: 0; margin: 0; }
.policy-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}
.policy-list li::before {
  content: '';
  margin-top: 0.5rem;
  width: 0.375rem;
  height: 0.375rem;
  flex: none;
  border-radius: 999px;
  background: var(--brand-500);
}

/* Spinner */
.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

/* Alert */
.alert-soft {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  border: 1px solid;
}
.alert-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.alert-success {
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--brand-900);
}

/* Score band dots */
.band-dot { width: 0.625rem; height: 0.625rem; border-radius: 999px; display: inline-block; }
