/* =====================================================================
   Home page (2026-09 redesign). Same palette as the calculator and the
   Refer / Sales Agent pages: navy #1d407e, deep navy #16305d, yellow #fde362.
   Every class is prefixed .hm- so nothing leaks into other pages.
   ===================================================================== */
.hm-page {
  --hm-navy: #1d407e;
  --hm-navy-deep: #16305d;
  --hm-yellow: #fde362;
  --hm-ink: #1f2937;
  --hm-muted: #5b6b85;
  --hm-line: #e3e8f1;
  --hm-shadow: 0 18px 48px rgba(22, 48, 93, .14), 0 2px 6px rgba(22, 48, 93, .06);
  color: var(--hm-ink);
}

/* ---- Shared pieces ---- */
.hm-section { padding: 88px 0; }
.hm-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.hm-head h2 { color: var(--hm-navy); font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; margin: 10px 0 12px; }
.hm-head p { color: var(--hm-muted); font-size: 17px; margin: 0; }
.hm-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--hm-navy); color: var(--hm-yellow);
  font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px;
}
.hm-center { text-align: center; margin-top: 40px; }

.hm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 15.5px;
  text-decoration: none; border: 2px solid transparent;
  transition: transform .15s, box-shadow .15s, background .15s, color .15s, border-color .15s;
}
.hm-btn:hover { transform: translateY(-1px); }
.hm-btn-navy { background: var(--hm-navy); color: #fff; box-shadow: 0 6px 16px rgba(29, 64, 126, .25); }
.hm-btn-navy:hover { background: var(--hm-yellow); color: var(--hm-navy-deep); box-shadow: 0 8px 20px rgba(253, 227, 98, .45); }
.hm-btn-yellow { background: var(--hm-yellow); color: var(--hm-navy-deep); box-shadow: 0 6px 16px rgba(253, 227, 98, .35); }
.hm-btn-yellow:hover { background: #fff0a0; color: var(--hm-navy-deep); }
.hm-btn-ghost { background: #fff; color: var(--hm-navy); border-color: rgba(29, 64, 126, .25); }
.hm-btn-ghost:hover { border-color: var(--hm-navy); color: var(--hm-navy); }
.hm-btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.hm-btn-ghost-light:hover { border-color: #fff; color: #fff; }
.hm-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Slider ---- */
.hm-slider { overflow: hidden; }
.hm-slider .item { height: 100%; }
.hm-slide {
  /* Every slider image is a 1900 x 750 banner: size the slide to that shape
     so the whole picture shows at any screen width, never cropped. */
  position: relative; display: flex; align-items: center;
  aspect-ratio: 1900 / 750; width: 100%;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hm-slide-poster { display: block; }
.hm-slide-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(22, 48, 93, .82) 0%, rgba(22, 48, 93, .45) 45%, rgba(22, 48, 93, 0) 75%);
}
.hm-slide-inner { position: relative; z-index: 1; }
.hm-slide-card { max-width: 560px; color: #fff; }
.hm-slide-card h2 {
  text-align: left; color: #fff; font-weight: 800; font-size: clamp(28px, 4.2vw, 52px); line-height: 1.1;
  margin: 14px 0 24px; text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.hm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--hm-yellow); color: var(--hm-navy-deep);
  font-weight: 800; font-size: 14px; padding: 6px 14px; border-radius: 999px;
}

/* ---- Hero ---- */
.hm-hero { background: linear-gradient(to bottom, #fde362, #ffffff 70%); padding: 80px 0 72px; overflow: hidden; }
.hm-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hm-hero-copy h1 {
  color: var(--hm-navy); font-weight: 900; line-height: 1.02; margin: 16px 0 18px;
  font-size: clamp(44px, 6vw, 76px); letter-spacing: -1px;
}
.hm-hero-copy h1 span { background: linear-gradient(transparent 60%, rgba(255, 255, 255, .95) 60%); padding: 0 6px; }
.hm-lead { color: var(--hm-navy-deep); font-size: 18.5px; line-height: 1.6; margin: 0 0 28px; max-width: 520px; }
.hm-links { margin-top: 18px; font-size: 15px; color: var(--hm-muted); display: flex; gap: 10px; align-items: center; }
.hm-links a { color: var(--hm-navy); font-weight: 600; text-decoration: none; }
.hm-links a:hover { text-decoration: underline; }
.hm-trust {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 26px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hm-navy);
}
.hm-trust i { color: #16a34a; font-size: 18px; }

.hm-hero-art { position: relative; }
.hm-hero-img { width: 100%; height: auto; border-radius: 22px; box-shadow: var(--hm-shadow); display: block; }
.hm-float {
  position: absolute; display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--hm-shadow);
}
.hm-float strong { display: block; color: var(--hm-navy); font-size: 18px; line-height: 1.1; }
.hm-float span { font-size: 12.5px; color: var(--hm-muted); }
.hm-float-icon {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 40px;
  background: var(--hm-yellow); color: var(--hm-navy-deep);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.hm-float-rate { left: -24px; bottom: 28px; }
.hm-float-term { right: -18px; top: 26px; }

/* ---- Rates strip ---- */
.hm-rates { margin-top: -8px; position: relative; z-index: 2; }
.hm-rates-box { background: #fff; border-radius: 18px; box-shadow: var(--hm-shadow); padding: 28px 28px 22px; }
.hm-rates-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 18px; }
.hm-rates-head h2 { color: var(--hm-navy); font-weight: 800; font-size: 20px; margin: 0; }
.hm-rates-head a { color: var(--hm-navy); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.hm-rates-head a:hover { text-decoration: underline; }
.hm-rates-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.hm-rate {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 16px 10px; border-radius: 14px; border: 1.5px solid var(--hm-line);
  text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s, background .15s;
}
.hm-rate:hover { border-color: var(--hm-navy); background: #f7f9fd; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(22, 48, 93, .08); }
.hm-rate-icon { width: 40px; height: 40px; object-fit: contain; margin-bottom: 6px; }
.hm-rate strong { color: var(--hm-navy); font-size: 22px; font-weight: 800; line-height: 1.1; }
.hm-rate span { color: var(--hm-muted); font-size: 13.5px; line-height: 1.3; }

/* ---- Loan products ---- */
.hm-products { background: linear-gradient(to bottom, #ffffff, #fffbe3); }
.hm-tabs-wrap { overflow-x: auto; margin: 0 -12px 28px; padding: 0 12px 4px; }
.hm-tabs {
  display: flex; flex-wrap: nowrap; justify-content: center; gap: 6px;
  background: #fff; border: 1.5px solid var(--hm-line); border-radius: 999px;
  padding: 6px; width: max-content; margin: 0 auto;
}
.hm-tabs .nav-link {
  border: 0; border-radius: 999px; padding: 9px 18px; white-space: nowrap;
  color: var(--hm-navy); font-weight: 600; font-size: 14.5px; background: transparent;
}
.hm-tabs .nav-link:hover { background: #f1f4fa; }
.hm-tabs .nav-link.active { background: var(--hm-navy); color: #fff; }
.hm-panel { background: #fff; border-radius: 22px; box-shadow: var(--hm-shadow); overflow: hidden; }
.hm-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); align-items: center; }
.hm-product-copy { padding: 44px 44px 40px; }
.hm-product-copy h3 { color: var(--hm-navy); font-weight: 800; font-size: clamp(26px, 3vw, 34px); margin: 0 0 8px; }
.hm-quote { color: var(--hm-muted); font-size: 17px; font-style: italic; margin: 0 0 22px; }
.hm-checks { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.hm-checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--hm-ink); font-size: 15.5px; }
.hm-checks i { color: #16a34a; margin-top: 2px; }
/* The product pictures are square posters with their own text: show them
   whole, at their own shape. */
.hm-product-art { align-self: stretch; display: flex; align-items: center; background: #eef2f8; }
.hm-product-art img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }

/* ---- How to apply ---- */
.hm-steps-sec { background: linear-gradient(to bottom, #fde362, #ffffff 65%); }
.hm-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.hm-step {
  position: relative; background: #fff; border-radius: 18px; box-shadow: var(--hm-shadow);
  padding: 34px 26px 28px; text-align: center;
}
.hm-step-num {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 38px; border-radius: 50%; background: var(--hm-navy); color: var(--hm-yellow);
  display: flex; align-items: center; justify-content: center; font-weight: 800; box-shadow: 0 6px 14px rgba(29, 64, 126, .3);
}
.hm-step-img { width: 100%; max-width: 190px; height: 150px; object-fit: contain; margin: 4px auto 14px; display: block; }
.hm-step h3 { color: var(--hm-navy); font-weight: 800; font-size: 21px; margin: 0 0 8px; }
.hm-step p { color: var(--hm-muted); font-size: 15px; margin: 0; line-height: 1.55; }

/* ---- Why choose us ---- */
.hm-why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hm-why { border: 1.5px solid var(--hm-line); border-radius: 18px; padding: 30px 28px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.hm-why:hover { border-color: rgba(29, 64, 126, .35); box-shadow: 0 10px 26px rgba(22, 48, 93, .08); }
.hm-why-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--hm-yellow); color: var(--hm-navy-deep);
  display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 18px;
}
.hm-why h3 { color: var(--hm-navy); font-weight: 800; font-size: 20px; margin: 0 0 8px; }
.hm-why p { color: var(--hm-muted); font-size: 15px; line-height: 1.6; margin: 0; }

/* ---- Testimonials ---- */
.hm-tests-sec { background: linear-gradient(to top, #fde362, #ffffff 60%); }
.hm-tests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hm-test {
  position: relative; margin: 0; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, var(--hm-navy) 0%, var(--hm-navy-deep) 100%);
  color: #fff; border-radius: 18px; padding: 30px 28px 24px; box-shadow: var(--hm-shadow); overflow: hidden;
}
.hm-test-mark { position: absolute; right: 16px; bottom: -14px; font-size: 76px; line-height: 1; color: rgba(253, 227, 98, .18); pointer-events: none; }
.hm-test blockquote { margin: 0 0 22px; font-size: 16px; line-height: 1.65; font-style: italic; position: relative; }
.hm-test figcaption { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--hm-yellow); }
.hm-test-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--hm-yellow); color: var(--hm-navy-deep);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
}

/* ---- Closing call to action ---- */
.hm-cta { padding: 0 0 88px; background: #fde362; background: linear-gradient(to bottom, #fde362 0%, #fde362 50%, #ffffff 50%); }
.hm-cta-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
  background: linear-gradient(120deg, var(--hm-navy) 0%, var(--hm-navy-deep) 100%);
  border-radius: 22px; padding: 38px 44px; box-shadow: var(--hm-shadow); color: #fff;
}
.hm-cta-box h2 { text-align: left; color: #fff; font-weight: 800; font-size: clamp(24px, 2.8vw, 32px); margin: 0 0 6px; }
.hm-cta-box p { color: rgba(255, 255, 255, .8); margin: 0; font-size: 16px; }

/* ---- Responsive ----
   1200+  desktop as designed
   992-1199  rates in 3 columns
   768-991  tablet: one-column hero with a capped picture, product card
            still side by side, steps / why-us in three columns
   576-767  large phone: everything stacks, tabs wrap as chips
   <=575    phone: tighter spacing, full-width buttons                    */
@media (max-width: 1199px) {
  .hm-rates-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
  .hm-section { padding: 64px 0; }
  .hm-head { margin-bottom: 36px; }
  .hm-hero { padding: 52px 0 56px; }
  .hm-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hm-hero-copy { text-align: center; }
  .hm-hero-copy .hm-lead { margin-left: auto; margin-right: auto; }
  .hm-hero-copy .hm-actions, .hm-links { justify-content: center; }
  .hm-hero-art { max-width: 520px; width: 100%; margin: 0 auto; }
  .hm-float-rate { left: -12px; bottom: 20px; }
  .hm-float-term { right: -12px; top: 20px; }
  /* Product tabs wrap as chips instead of scrolling off the edge. */
  .hm-tabs-wrap { overflow: visible; margin: 0 0 22px; padding: 0; }
  .hm-tabs { flex-wrap: wrap; border-radius: 0; overflow: visible; justify-content: center; width: auto; border: 0; background: transparent; padding: 0; gap: 8px; }
  .hm-tabs .nav-link { background: #fff; border: 1.5px solid var(--hm-line); padding: 8px 14px; font-size: 14px; }
  .hm-tabs .nav-link.active { border-color: var(--hm-navy); }

  .hm-product { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
  .hm-product-copy { padding: 32px 30px 30px; }
  .hm-steps, .hm-why-grid { gap: 16px; }
  .hm-step { padding: 32px 18px 24px; }
  .hm-step-img { height: 120px; }
  .hm-why { padding: 24px 20px; }
  .hm-tests { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  .hm-cta-box { padding: 30px 28px; }
}
@media (max-width: 767px) {
  .hm-section { padding: 56px 0; }
  .hm-head h2 { font-size: 27px; }
  .hm-head p { font-size: 16px; }

  /* Slider: the banner is short on a phone, so the headline stays out of the
     way (the picture already says it) and only the rate and button show.
     The arrows would cover most of it; swiping works instead. */
  .hm-slider .controls { display: none; }
  .hm-slide { align-items: flex-end; }
  .hm-slide-shade { background: linear-gradient(0deg, rgba(22, 48, 93, .7) 0%, rgba(22, 48, 93, 0) 60%); }
  .hm-slide-inner { padding-bottom: 10px; }
  .hm-slide-card { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .hm-slide-card h2 { display: none; }
  .hm-slide-card .hm-chip { font-size: 13px; padding: 4px 10px; }
  .hm-slide-card .hm-btn { padding: 5px 12px; font-size: 13.5px; border-radius: 8px; }

  .hm-product { grid-template-columns: 1fr; }
  .hm-product-art { order: -1; }
  .hm-product-art img { max-width: 420px; margin: 0 auto; }
  .hm-product-copy { padding: 26px 22px 24px; }
  .hm-quote { font-size: 16px; margin-bottom: 18px; }
  .hm-checks { margin-bottom: 22px; }

  .hm-steps, .hm-why-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .hm-steps { gap: 34px; }
  .hm-step-img { height: 130px; }
}
@media (max-width: 575px) {
  .hm-hero { padding: 40px 0 44px; }
  .hm-hero-copy h1 { margin: 14px 0 14px; }
  .hm-lead { font-size: 16.5px; margin-bottom: 22px; }
  .hm-actions .hm-btn { flex: 1 1 100%; }
  .hm-float { padding: 9px 12px; gap: 10px; }
  .hm-float-icon { width: 34px; height: 34px; flex-basis: 34px; font-size: 16px; }
  .hm-float strong { font-size: 16px; }
  .hm-float-rate { left: 8px; bottom: 10px; }
  .hm-float-term { right: 8px; top: 10px; }

  .hm-rates { margin-top: 0; }
  .hm-rates-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hm-rates-box { padding: 20px 14px 14px; border-radius: 16px; }
  .hm-rates-head { flex-direction: column; align-items: center; text-align: center; }
  .hm-rates-head h2 { font-size: 18px; }
  .hm-rate { padding: 14px 8px; }
  .hm-rate strong { font-size: 20px; }

  .hm-product-copy h3 { font-size: 24px; }
  .hm-test { padding: 24px 22px 20px; }
  .hm-test blockquote { font-size: 15.5px; }
  .hm-cta { padding-bottom: 56px; }
  .hm-cta-box { padding: 26px 20px; border-radius: 18px; text-align: center; }
  .hm-cta-box h2, .hm-cta-box p { text-align: center; }
}
@media (max-width: 359px) {
  .hm-tabs .nav-link { padding: 7px 11px; font-size: 13px; }
  .hm-rate span { font-size: 12.5px; }
}
