/* Homepage: hero facts, the planning row, the two-questions estimate and the
   contact panel. Hero, form fields and video rules live in css/redesign.css;
   client stories, reviews and lenders live in css/home-social-proof.css.
   One loud element per screen: on this page it is the navy estimate card. */

/* ---------- Hero ---------- */
.home-hero-copy {
  max-width: 38rem;
}

.home-hero-note {
  margin-top: 0.9rem;
}

.home-hero-facts {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--rls-on-dark-muted);
  display: grid;
  font-size: 0.92rem;
  gap: 0;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
  line-height: 1.4;
  list-style: none;
  margin: 1.6rem 0 0;
  max-width: 40rem;
  padding: 1.1rem 0 0;
}

.home-hero-facts li {
  align-items: center;
  display: flex;
  min-height: 44px;
  padding-right: 1rem;
}

.home-hero-facts li + li {
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  padding-left: 1rem;
}

.home-hero-facts a {
  align-items: center;
  color: var(--rls-on-dark);
  display: inline-flex;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--rls-gold-light);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.home-hero-facts a:hover {
  color: var(--rls-gold-light);
}

@media (prefers-reduced-motion: no-preference) {
  .home-hero-grid > div:first-child > :nth-child(6) {
    animation-delay: 0.4s;
  }
}

/* ---------- What are you planning? ---------- */
.home-plans {
  background: #fff;
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
}

.home-plans-title {
  color: var(--rls-navy-deep);
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 1.1rem;
}

.home-plan-row {
  border-block: 1px solid var(--rls-border);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-plan-row li + li {
  border-left: 1px solid var(--rls-border);
}

.home-plan-row a {
  align-items: center;
  color: var(--rls-navy-deep);
  display: flex;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  min-height: 68px;
  padding: 0.9rem 1.25rem;
  text-decoration: underline;
  text-decoration-color: var(--rls-border);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: background-color var(--rls-dur-fast) ease, text-decoration-color var(--rls-dur-fast) ease;
}

.home-plan-row li:first-child a {
  padding-left: 0;
}

.home-plan-row a:hover {
  text-decoration-color: var(--rls-gold);
}

.home-plans-more {
  color: var(--rls-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 1rem 0 0;
}

.home-plans-more a,
.home-question-copy a,
.home-contact-intro a {
  color: var(--rls-navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.home-plans-more a:hover,
.home-question-copy a:hover,
.home-contact-intro a:hover {
  color: var(--rls-gold-dark);
}

/* ---------- The two questions ---------- */
.home-questions {
  background: var(--rls-surface);
  padding-block: clamp(3.5rem, 7vw, 6rem);
  scroll-margin-top: 80px;
}

.home-questions-intro {
  max-width: 46rem;
}

.home-questions-intro p {
  color: var(--rls-muted);
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.7;
  margin: 1rem 0 0;
  max-width: 38rem;
}

.home-question-title {
  color: var(--rls-navy-deep);
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0 0 0.6rem;
}

.home-question-copy {
  color: var(--rls-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
  max-width: 34rem;
}

.home-question-copy + .home-question-copy {
  margin-top: 0.8rem;
}

.home-estimate {
  align-items: start;
  display: grid;
  gap: 1.75rem clamp(2rem, 5vw, 4.5rem);
  grid-template-areas:
    "ask answer"
    "next answer";
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  margin-top: clamp(2.25rem, 4vw, 3rem);
}

.home-estimate-ask { grid-area: ask; }
.home-estimate-answer { grid-area: answer; }
.home-estimate-next { grid-area: next; }

.home-estimate-controls {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.home-estimate-controls[hidden] {
  display: none;
}

.home-estimate-field {
  border: 0;
  display: grid;
  gap: 0.5rem;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.home-estimate-field label,
.home-estimate-field legend {
  color: var(--rls-navy-deep);
  font-size: 0.9rem;
  font-weight: 700;
}

.home-estimate-field legend {
  margin-bottom: 0.5rem;
  padding: 0;
}

.home-estimate-field select {
  background-color: #fff;
  border: 1px solid #b9c5d2;
  border-radius: 12px;
  color: var(--rls-ink);
  font: inherit;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  width: 100%;
}

.home-estimate-field select:focus-visible {
  border-color: var(--rls-gold-dark);
  box-shadow: var(--rls-ring);
  outline: 0;
}

.home-estimate-price-label {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.home-estimate-price-label output {
  color: var(--rls-navy-deep);
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* The slider: a 44px hit area around a thin track, gold up to the thumb. */
.home-estimate-field input[type="range"] {
  --fill: 33.33%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  height: 44px;
  margin: 0;
  width: 100%;
}

.home-estimate-field input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--rls-gold) var(--fill), #c9d3de var(--fill));
  border-radius: 999px;
  height: 6px;
}

.home-estimate-field input[type="range"]::-moz-range-track {
  background: #c9d3de;
  border-radius: 999px;
  height: 6px;
}

.home-estimate-field input[type="range"]::-moz-range-progress {
  background: var(--rls-gold);
  border-radius: 999px;
  height: 6px;
}

.home-estimate-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
  border: 3px solid var(--rls-navy-deep);
  border-radius: 50%;
  height: 28px;
  margin-top: -11px;
  width: 28px;
}

.home-estimate-field input[type="range"]::-moz-range-thumb {
  background: #fff;
  border: 3px solid var(--rls-navy-deep);
  border-radius: 50%;
  box-sizing: border-box;
  height: 28px;
  width: 28px;
}

.home-estimate-field input[type="range"]:focus-visible {
  border-radius: 8px;
  outline: 3px solid var(--rls-navy-deep);
  outline-offset: 4px;
}

.home-estimate-range {
  color: var(--rls-muted);
  display: flex;
  font-size: 0.8rem;
  justify-content: space-between;
  margin-top: -0.35rem;
}

.home-estimate-choice {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-estimate-choice.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-estimate-choice label {
  align-items: center;
  background: #fff;
  border: 1px solid #b9c5d2;
  border-radius: 12px;
  color: var(--rls-ink);
  cursor: pointer;
  display: flex;
  font-weight: 600;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.6rem 0.85rem;
}

.home-estimate-choice input {
  accent-color: var(--rls-navy-deep);
  flex: 0 0 auto;
  height: 1.1rem;
  margin: 0;
  width: 1.1rem;
}

.home-estimate-choice label:has(input:checked) {
  border-color: var(--rls-navy-deep);
  box-shadow: inset 0 0 0 1px var(--rls-navy-deep);
  color: var(--rls-navy-deep);
}

.home-estimate-choice label:has(input:focus-visible) {
  outline: 3px solid var(--rls-navy-deep);
  outline-offset: 3px;
}

/* The answer: the one navy card, and the loudest thing below the hero. */
.home-estimate-answer {
  background: var(--rls-navy-deep);
  border-radius: 20px;
  color: var(--rls-on-dark);
  padding: clamp(1.5rem, 3.2vw, 2.5rem);
}

.home-estimate-answer p {
  margin: 0;
}

.home-estimate-scenario {
  color: var(--rls-on-dark-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.home-estimate-total-label {
  color: var(--rls-on-dark);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.25rem !important;
}

.home-estimate-total {
  color: #f9d66e;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: 0.2rem !important;
}

.home-estimate-note {
  color: var(--rls-on-dark-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 0.6rem !important;
  min-height: 3.1em;
}

.home-estimate-bar {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: flex;
  gap: 2px;
  height: 12px;
  margin: 1.4rem 0 0.4rem;
  overflow: hidden;
}

.home-estimate-bar span {
  display: block;
  flex: 0 0 auto;
  height: 100%;
  transition: width var(--rls-dur) var(--rls-ease);
}

.home-estimate .is-deposit { background: var(--rls-gold-light); }
.home-estimate .is-duty { background: #8fb3dd; }
.home-estimate .is-fees { background: #fff; }

.home-estimate-lines {
  margin: 0;
}

.home-estimate-lines > div {
  align-items: baseline;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-block: 0.8rem;
}

.home-estimate-lines > div:first-child {
  border-top: 0;
}

.home-estimate-lines dt {
  align-items: center;
  color: var(--rls-on-dark-muted);
  display: flex;
  font-size: 0.95rem;
  gap: 0.6rem;
}

.home-estimate-lines dd {
  color: var(--rls-on-dark);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

/* LMI sits outside the cash figure, so it gets its own quieter panel. */
.home-estimate-lmi {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  margin-top: 0.4rem;
  padding: 0.85rem 1rem;
}

.home-estimate-lmi-line {
  align-items: baseline;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.home-estimate-lmi-line span {
  color: var(--rls-on-dark-muted);
  font-size: 0.95rem;
}

.home-estimate-lmi-line strong {
  color: var(--rls-on-dark);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.home-estimate-lmi-note {
  color: var(--rls-on-dark-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.35rem !important;
}

.home-estimate-key {
  border-radius: 3px;
  display: inline-block;
  flex: 0 0 auto;
  height: 10px;
  width: 10px;
}

.home-estimate-next a {
  align-items: center;
  color: var(--rls-navy);
  display: inline-flex;
  font-weight: 700;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-color: var(--rls-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.home-estimate-next a:hover {
  color: var(--rls-gold-dark);
}

.home-estimate-next p {
  color: var(--rls-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0.35rem 0 0;
  max-width: 34rem;
}

/* Question two: the quieter companion. */
.home-question-two {
  border-top: 1px solid var(--rls-border);
  display: grid;
  gap: 1.5rem clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: clamp(2.75rem, 5vw, 4rem);
  padding-top: clamp(2.25rem, 4vw, 3rem);
}

.home-tool-links {
  border-top: 1px solid var(--rls-border);
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.home-tool-links li {
  border-bottom: 1px solid var(--rls-border);
}

.home-tool-links a {
  align-items: center;
  color: var(--rls-navy);
  display: flex;
  font-weight: 600;
  line-height: 1.4;
  min-height: 52px;
  padding-block: 0.65rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.home-tool-links a:hover {
  color: var(--rls-gold-dark);
}

/* ---------- Reddit and video ---------- */
.home-person-copy {
  color: var(--rls-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin: 1rem 0 0;
  max-width: 36rem;
}

.home-video-card {
  border: 0;
}

/* ---------- Contact ---------- */
.home-form-options {
  padding-block: 0.15rem;
}

.home-form-options summary {
  min-height: 44px;
  padding-block: 0.7rem;
}

.home-contact-grid {
  align-items: start;
}

.home-contact-intro p {
  color: var(--rls-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 1rem 0 0;
  max-width: 32rem;
}

.home-contact-direct {
  border-top: 1px solid var(--rls-border);
  margin: 1.75rem 0 0;
  max-width: 32rem;
}

.home-contact-direct > div {
  border-bottom: 1px solid var(--rls-border);
  display: grid;
  gap: 1rem;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  padding-block: 0.35rem;
}

.home-contact-direct dt {
  align-self: center;
  color: var(--rls-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.home-contact-direct dd {
  margin: 0;
}

.home-contact-direct a {
  align-items: center;
  color: var(--rls-navy);
  display: inline-flex;
  font-weight: 600;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.home-contact-card {
  background: var(--rls-surface);
  border-radius: var(--rls-radius);
}

/* ---------- Tablet and phone ---------- */
@media (max-width: 1023px) {
  .home-plan-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-plan-row li:nth-child(odd) {
    border-left: 0;
  }

  .home-plan-row li:nth-child(n + 3) {
    border-top: 1px solid var(--rls-border);
  }

  .home-plan-row li:nth-child(odd) a {
    padding-left: 0;
  }
}

@media (max-width: 860px) {
  .home-estimate {
    grid-template-areas:
      "ask"
      "answer"
      "next";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .home-question-two {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .home-hero-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero-facts li,
  .home-hero-facts li + li {
    border-left: 0;
    padding-inline: 0;
  }

  .home-estimate-choice label {
    font-size: 0.95rem;
    gap: 0.5rem;
    padding-inline: 0.7rem;
  }

  .home-plan-row a {
    font-size: 0.95rem;
    min-height: 64px;
    padding: 0.75rem 0.9rem;
  }

  .home-public-links {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .home-contact-direct > div {
    gap: 0;
    grid-template-columns: minmax(0, 1fr);
    padding-block: 0.6rem 0.2rem;
  }
}

@media (max-width: 420px) {
  .home-estimate-choice {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-estimate-bar span,
  .home-plan-row a {
    transition: none;
  }
}
