/* =========================================================
   MONEYCHECK — PURPLE THEME
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  background: #f7f8fc;
  color: #151827;

  line-height: 1.5;
}

button,
input {
  font-family: inherit;
}


/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(255, 255, 255, 0.94);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-bottom: 1px solid rgba(226, 228, 237, 0.85);
}

.nav-inner {
  max-width: 1120px;
  margin: auto;

  padding: 15px 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;

  color: #151827;
  text-decoration: none;

  font-size: 21px;
  font-weight: 800;

  letter-spacing: -0.5px;
}

.logo-icon {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: linear-gradient(
    135deg,
    #635bff,
    #5148e5
  );

  color: white;

  font-size: 17px;
  font-weight: 800;

  box-shadow:
    0 6px 16px rgba(99, 91, 255, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  position: relative;

  color: #626a7e;
  text-decoration: none;

  font-size: 14px;
  font-weight: 650;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-links a:hover {
  color: #5148e5;
}

.nav-links a::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: -8px;

  height: 2px;

  border-radius: 2px;

  background: #635bff;

  transform: scaleX(0);
  transform-origin: center;

  transition: transform 0.2s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;

  max-width: 900px;
  margin: auto;

  text-align: center;

  padding: 96px 20px 62px;
}

.hero::before {
  content: "";

  position: absolute;

  width: 420px;
  height: 420px;

  top: 10px;
  left: 50%;

  transform: translateX(-50%);

  background: radial-gradient(
    circle,
    rgba(99, 91, 255, 0.10) 0%,
    rgba(99, 91, 255, 0.04) 35%,
    transparent 70%
  );

  pointer-events: none;

  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 14px;
  margin-bottom: 22px;

  border-radius: 50px;

  background: rgba(99, 91, 255, 0.08);

  color: #574fe7;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 1.6px;

  border: 1px solid rgba(99, 91, 255, 0.16);

  box-shadow:
    0 4px 12px rgba(99, 91, 255, 0.05);
}

.hero h1 {
  position: relative;

  max-width: 850px;
  margin: 0 auto;

  font-size: clamp(44px, 7vw, 72px);

  line-height: 1.02;

  letter-spacing: -4px;

  font-weight: 850;

  background: linear-gradient(
    135deg,
    #111522 10%,
    #302b8f 55%,
    #635bff 100%
  );

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;
}

.hero > p {
  max-width: 650px;

  margin: 25px auto 27px;

  color: #687186;

  font-size: 18px;

  line-height: 1.7;
}

.trust-points {
  display: flex;
  justify-content: center;
  align-items: center;

  flex-wrap: wrap;

  gap: 10px 22px;

  color: #60697c;

  font-size: 13px;

  font-weight: 650;
}

.trust-points span {
  display: inline-flex;
  align-items: center;

  white-space: nowrap;
}


/* =========================================================
   MAIN AFFORDABILITY
   ========================================================= */

main {
  max-width: 680px;
  margin: auto;

  padding: 0 20px 90px;
}

.calculator-card {
  background: white;

  border: 1px solid #e5e7ef;
  border-radius: 24px;

  padding: 38px;

  box-shadow:
    0 24px 70px rgba(24, 30, 60, 0.09);

  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.calculator-card:hover {
  box-shadow:
    0 28px 80px rgba(24, 30, 60, 0.11);
}

.card-heading {
  padding-bottom: 28px;
  margin-bottom: 28px;

  border-bottom: 1px solid #eceef4;
}

.step {
  color: #635bff;

  font-size: 11px;
  font-weight: 800;

  letter-spacing: 1.5px;
}

.card-heading h2 {
  margin: 8px 0;

  font-size: 29px;
  line-height: 1.2;

  letter-spacing: -0.8px;
}

.card-heading p {
  margin: 0;

  color: #737b8d;
  font-size: 14px;
}


/* =========================================================
   FORM
   ========================================================= */

.form-section {
  margin-bottom: 35px;
}

.form-section h3 {
  margin: 0 0 16px;

  font-size: 18px;
  line-height: 1.3;
}

.section-help {
  margin-top: -8px;
  margin-bottom: 17px;

  color: #8a91a1;
  font-size: 13px;
}

label {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 16px 0 7px;

  color: #303548;

  font-size: 13px;
  font-weight: 650;
}

.optional {
  color: #949baa;

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 0.7px;
}

.input-wrapper {
  display: flex;
  align-items: center;

  overflow: hidden;

  background: #fafbfe;

  border: 1px solid #dfe2ea;
  border-radius: 11px;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.input-wrapper:hover {
  border-color: #cdd1dc;
}

.input-wrapper:focus-within {
  background: white;

  border-color: #635bff;

  box-shadow:
    0 0 0 4px rgba(99, 91, 255, 0.1);
}

.input-wrapper > span {
  padding-left: 14px;

  color: #8a91a1;

  font-weight: 650;
}

input {
  width: 100%;

  border: 0;
  outline: 0;

  background: transparent;

  padding: 14px 13px;

  color: #151827;

  font-size: 16px;
}

input::placeholder {
  color: #b4b9c5;
}

input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
  opacity: 0.5;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.calculate-button {
  width: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;

  padding: 17px 20px;

  border: 0;
  border-radius: 12px;

  background: linear-gradient(
    135deg,
    #635bff,
    #5148e5
  );

  color: white;

  font-size: 16px;
  font-weight: 750;

  cursor: pointer;

  box-shadow:
    0 9px 22px rgba(99, 91, 255, 0.24);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.calculate-button:hover {
  transform: translateY(-2px);

  box-shadow:
    0 13px 28px rgba(99, 91, 255, 0.3);

  filter: brightness(1.03);
}

.calculate-button:active {
  transform: translateY(0);
}

.reset-button {
  display: block;

  margin: 14px auto 0;

  padding: 5px;

  background: none;
  border: 0;

  color: #8b91a0;

  cursor: pointer;

  font-size: 13px;

  transition: color 0.2s ease;
}

.reset-button:hover {
  color: #635bff;
}


/* =========================================================
   RESULTS
   ========================================================= */

.result {
  margin-top: 25px;

  padding: 34px;

  background: white;

  border: 1px solid #e5e7ef;
  border-radius: 24px;

  box-shadow:
    0 20px 60px rgba(24, 30, 60, 0.08);

  animation: appear 0.3s ease;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none;
}

.score-circle {
  width: 108px;
  height: 108px;

  margin: 0 auto 18px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: linear-gradient(
    135deg,
    #f0efff,
    #e8e6ff
  );

  color: #635bff;

  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.65);
}

.score-circle span {
  font-size: 34px;
  line-height: 1;
  font-weight: 850;
}

.score-circle small {
  margin-top: 3px;

  color: #8b90a0;
  font-size: 11px;
}

.result h2 {
  margin: 0 0 13px;

  text-align: center;

  font-size: 27px;
  line-height: 1.2;
}

.result > p {
  color: #596174;
  line-height: 1.65;
}

.result h3 {
  margin-top: 30px;

  font-size: 17px;
}

.stat {
  display: flex;
  justify-content: space-between;
  gap: 20px;

  padding: 13px 0;

  border-bottom: 1px solid #eef0f4;

  font-size: 14px;
}

.stat span {
  color: #737b8d;
}

.stat strong {
  color: #151827;
}

.good {
  color: #08783d !important;
}

.warning {
  color: #b66b00 !important;
}

.bad {
  color: #c62828 !important;
}

.info-box {
  margin-top: 22px;

  padding: 17px;

  border-radius: 12px;

  background: #fff8e8;

  border: 1px solid #f2d79c;

  color: #765500;
}

.info-box p {
  margin-bottom: 0;
}

.good-box {
  background: #edfbf3;

  border-color: #a9e2bf;

  color: #08783d;
}

.disclaimer {
  margin-top: 25px;

  color: #9a9fac !important;

  font-size: 11px !important;

  text-align: center;
}


/* =========================================================
   SAVINGS CALCULATOR
   ========================================================= */

.savings-section {
  padding: 80px 20px;

  background:
    linear-gradient(
      180deg,
      #f7f8fc 0%,
      #f2f3f9 100%
    );
}

.savings-heading {
  max-width: 680px;

  margin: 0 auto 35px;
}

.savings-heading h2 {
  margin: 10px 0;

  font-size: 38px;
  line-height: 1.15;

  letter-spacing: -1.5px;
}

.savings-heading p {
  margin: 0;

  color: #737b8d;
}

.savings-card {
  max-width: 680px;
  margin: auto;
}

.progress-container {
  height: 12px;

  margin: 25px 0;

  overflow: hidden;

  background: #e9eaf2;

  border-radius: 20px;
}

.progress-bar {
  height: 100%;

  background: linear-gradient(
    90deg,
    #635bff,
    #817aff
  );

  border-radius: 20px;

  transition: width 0.6s ease;
}


/* =========================================================
   WHAT IF SAVINGS
   ========================================================= */

.what-if-box {
  margin-top: 25px;

  padding: 22px;

  border-radius: 16px;

  background: #f6f5ff;

  border: 1px solid #dedcff;
}

.what-if-box h3 {
  margin-top: 0;
  margin-bottom: 5px;
}

.what-if-intro {
  margin-top: 0;
  margin-bottom: 18px;

  color: #737b8d;

  font-size: 13px;
}

.what-if-grid {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 12px;
}

.what-if-card {
  display: flex;
  flex-direction: column;
  gap: 5px;

  padding: 17px;

  background: white;

  border: 1px solid #e5e5ee;
  border-radius: 13px;
}

.what-if-card span {
  color: #737b8d;

  font-size: 12px;
  font-weight: 650;
}

.what-if-card strong {
  color: #151827;

  font-size: 22px;
}

.what-if-card small {
  color: #08783d;

  font-size: 11px;
  font-weight: 650;
}

.what-if-card.featured {
  border-color: #635bff;

  box-shadow:
    0 6px 20px rgba(99, 91, 255, 0.1);
}


/* =========================================================
   DEBT CALCULATOR
   ========================================================= */

.debt-section {
  padding: 80px 20px;

  background: white;

  border-top: 1px solid #e8eaf0;
}

.debt-section .savings-heading {
  max-width: 680px;
}

.debt-section .savings-heading h2 {
  margin-bottom: 12px;
}

.debt-section .savings-heading p {
  margin-bottom: 0;
}

.debt-section .calculator-card {
  max-width: 680px;
  margin: auto;
}


/* =========================================================
   HOW IT WORKS
   ========================================================= */

.how-section {
  padding: 90px 20px;

  background: white;

  border-top: 1px solid #e8eaf0;
}

.how-inner {
  max-width: 1100px;
  margin: auto;
}

.how-inner > div:first-child {
  max-width: 600px;
}

.how-inner h2 {
  margin: 12px 0 18px;

  font-size: 38px;
  line-height: 1.15;

  letter-spacing: -1.5px;
}

.how-inner > div:first-child > p {
  max-width: 620px;

  margin: 0 0 40px;

  color: #737b8d;

  font-size: 16px;
  line-height: 1.7;
}

.how-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 25px;
}

.how-card {
  padding: 27px;

  background: #f8f9fc;

  border: 1px solid #eceef4;

  border-radius: 18px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.how-card:hover {
  transform: translateY(-4px);

  border-color: #dedcff;

  box-shadow:
    0 14px 35px rgba(24, 30, 60, 0.08);
}

.how-number {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 18px;

  border-radius: 10px;

  background: linear-gradient(
    135deg,
    #635bff,
    #5148e5
  );

  color: white;

  font-weight: 800;

  box-shadow:
    0 6px 15px rgba(99, 91, 255, 0.2);
}

.how-card h3 {
  margin: 0 0 8px;

  font-size: 17px;
}

.how-card p {
  margin: 0;

  color: #737b8d;

  font-size: 14px;
  line-height: 1.6;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
  padding: 50px 20px 25px;

  background: #151827;

  color: white;
}

.footer-inner {
  max-width: 1100px;
  margin: auto;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  gap: 30px;
}

footer .logo {
  color: white;
}

.footer-inner p {
  color: #9298aa;

  font-size: 13px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 25px;
}

.footer-links a {
  color: #b4b9c7;

  text-decoration: none;

  font-size: 13px;

  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1100px;

  margin: 35px auto 0;
  padding-top: 20px;

  display: flex;
  justify-content: space-between;

  gap: 20px;

  border-top: 1px solid #2b2f3f;

  color: #70778b;

  font-size: 11px;
}


/* =========================================================
   ACCESSIBILITY / FOCUS
   ========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(99, 91, 255, 0.35);
  outline-offset: 3px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  .nav-inner {
    padding: 14px 18px;
  }

  .nav-links {
    display: none;
  }

  .logo {
    font-size: 20px;
  }

  .logo-icon {
    width: 34px;
    height: 34px;
  }

  .hero {
    padding: 68px 18px 45px;
  }

  .hero::before {
    width: 300px;
    height: 300px;
  }

  .hero h1 {
    letter-spacing: -2.7px;
  }

  .hero > p {
    font-size: 17px;
    line-height: 1.65;
  }

  .trust-points {
    gap: 9px 15px;
  }

  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .calculator-card,
  .result {
    padding: 25px 19px;
    border-radius: 18px;
  }

  .card-heading h2 {
    font-size: 25px;
  }

  .savings-section,
  .debt-section {
    padding: 60px 14px;
  }

  .savings-heading h2,
  .how-inner h2 {
    font-size: 30px;
    letter-spacing: -1px;
  }

  .how-section {
    padding: 65px 20px;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .how-card {
    padding: 23px;
  }

  .what-if-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 420px) {

  .hero {
    padding-top: 52px;
  }

  .hero h1 {
    font-size: 42px;
    letter-spacing: -2.2px;
  }

  .hero-badge {
    font-size: 9px;
    letter-spacing: 1.3px;
  }

  .trust-points {
    flex-direction: column;
    gap: 7px;
  }

  .calculator-card,
  .result {
    padding: 21px 16px;
  }

  .calculate-button {
    padding: 16px;
    font-size: 15px;
  }

  .stat {
    flex-direction: column;
    gap: 4px;
  }
}
