/* starthomeloans.com: homepage and thank-you page (resources/views/websites/starthomeloans). Credit 101 has its own credit-101.css. */

:root {
  --green: #82c341;
  --grey-bg: #ebebeb;
  --heading: #555555;
  --muted: #b7b7b7;
  --footer: #414347;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Full-height column so the footer sits at the bottom of short pages like the thank-you page. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--grey-bg);
  color: #828282;
  font-family: 'Poppins', Calibri, Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

.green-text {
  color: var(--green);
}

/* Shared pill button ("More", "Get Started") */
.shl-button {
  display: inline-block;
  margin: 5px;
  padding: 12px 25px;
  border: 2px solid var(--grey-bg);
  border-radius: 30px;
  background: var(--green);
  color: #f9f9f9;
  cursor: pointer;
  font: inherit;
  font-size: 125%;
  text-decoration: none;
  text-transform: uppercase;
}

.shl-button:hover,
.shl-button:focus-visible {
  background: var(--heading);
  outline: none;
}

/* Header: fixed mark at top left, menu centered over the hero */
.shl-mark {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 50;
}

.shl-mark img {
  display: block;
  width: 38px;
}

.shl-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 20px 60px;
}

.shl-nav ul {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shl-nav li + li a {
  border-left: 1px solid rgba(255, 255, 255, 0.7);
}

.shl-nav a {
  display: block;
  padding: 2px 25px;
  color: #6d6d6d;
  font-size: 15px;
  text-decoration: none;
}

.shl-nav a:hover,
.shl-nav a:focus-visible {
  color: #ffffff;
}

.shl-menu-toggle {
  display: none;
}

/* Hero: background video with the logo in the middle */
.shl-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The 6 Questions section is pulled up 175px into the hero; this keeps it clear of the logo on short windows. */
  min-height: max(50vh, 640px);
  overflow: hidden;
  background: var(--grey-bg);
}

.shl-hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shl-hero a {
  position: relative;
}

/* The SVG has no width/height of its own, so it needs a fixed height to size from. */
.shl-hero img {
  display: block;
  height: 250px;
  width: auto;
}

/* 6 Questions: pulled up over the bottom of the hero */
.shl-questions {
  position: relative;
  z-index: 2;
  margin-top: -175px;
  padding-bottom: 5em;
  text-align: center;
}

.shl-title {
  margin: 2px 0 20px;
  color: var(--heading);
  font-size: 350%;
  font-weight: 700;
  letter-spacing: -3px;
  line-height: 1.2;
  text-transform: uppercase;
}

/* 6 Questions form (resources/views/components/websites/starthomeloans/lead-form.blade.php) */
.shl-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1em;
  max-width: 85%;
  margin: 0 auto;
  animation: shl-reveal-down 3.5s;
}

@keyframes shl-reveal-down {
  0%,
  50% {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
  }

  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

.shl-field {
  position: relative;
  height: 3em;
  text-align: left;
}

.shl-field label {
  position: absolute;
  top: 1em;
  left: 0;
  z-index: 2;
  width: 100%;
  color: #888888;
  pointer-events: none;
  transform-origin: top left;
  transition: transform 250ms ease;
}

.shl-field label::before {
  content: "*";
  color: #eb8281;
}

/* Label moves up once the field has focus or a value. */
.shl-field:focus-within label,
.shl-field input:not(:placeholder-shown) + label {
  transform: translateY(-1em) scale(0.75);
}

.shl-field input {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  height: 24px;
  padding: 0 0 0.5em;
  border: 0;
  border-bottom: 1px solid var(--green);
  border-radius: 0;
  outline: none;
  background: none;
  color: #333333;
  font: inherit;
  font-size: 1em;
}

.shl-field input:focus {
  border-bottom-color: #3b8cff;
}

.shl-consent {
  grid-column: span 2;
  margin: 0;
  color: #888888;
  font-size: 0.75em;
  text-align: center;
}

.shl-submit {
  grid-column: span 2;
  text-align: center;
}

.shl-submit button {
  padding: 0.75em 3em;
  border: 0;
  border-radius: 50px;
  background: linear-gradient(to right, #82c341, #98da56);
  color: #ffffff;
  cursor: pointer;
  font-size: 1.2em;
  text-transform: uppercase;
}

.shl-submit button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.shl-errors {
  max-width: 85%;
  margin: 0 auto 1em;
  color: #333333;
  text-align: left;
}

.shl-errors ul {
  margin: 0.5em 0;
  padding: 0.5em 2em;
  border: 1px solid red;
}

/* Programs */
.shl-programs {
  padding: 70px 10px;
  background: var(--green);
}

.shl-programs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  max-width: 1600px;
  margin: 0 auto;
  text-align: center;
}

.shl-programs-grid > div {
  display: grid;
  align-content: center;
  justify-items: center;
}

.shl-programs img {
  max-height: 445px;
  margin: 3px 3px 30px;
}

.shl-programs p {
  margin: 0 0 1em;
  color: #5e5e5e;
  font-size: 120%;
}

/* Partners */
.shl-partners {
  padding: 20px 20px 100px;
  color: var(--muted);
  text-align: center;
}

.shl-partners h2 {
  margin: 0;
  padding: 80px 0 30px;
  font-size: 200%;
  font-weight: 300;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.shl-partners-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1800px;
  margin: 0 auto;
}

.shl-partners-grid > div {
  padding: 20px;
}

.shl-partners img {
  max-height: 180px;
  margin-bottom: 30px;
}

.shl-partners h3 {
  margin: 0 0 1em;
  font-size: 110%;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.shl-partners p {
  margin: 0;
}

/* Bottom banner and footer */
.shl-promo img {
  display: block;
  width: 100%;
}

.shl-brand {
  height: 60px;
  background: var(--footer);
}

.shl-footer {
  margin-top: auto;
  padding: 20px;
  background: var(--footer);
  color: #e6e6e6;
  font-size: 70%;
  text-align: center;
  text-transform: uppercase;
}

.shl-footer p {
  margin: 1em 0;
}

.shl-footer a {
  color: #81c342;
  text-decoration: none;
}

/* "Mortgage Websites powered by Etrafficers" line, as on the other sites. */
.shl-credit {
  font-size: 12px;
  text-transform: none;
}

.shl-credit a {
  text-decoration: underline;
}

.shl-footer a:hover,
.shl-footer a:focus-visible {
  color: #ffffff;
}

/* Thank-you page */
.shl-done {
  padding: 120px 20px 80px;
  text-align: center;
}

.shl-done img {
  width: 250px;
}

.shl-done p {
  margin: 0.5em 0 1.5em;
  font-size: 1.5em;
}

/* Popups */
.shl-popup {
  width: 90%;
  max-width: 960px;
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  background: var(--grey-bg);
  color: var(--heading);
}

.shl-popup::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.shl-popup[open] {
  animation: shl-popup-in 0.4s ease;
}

@keyframes shl-popup-in {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
}

.shl-popup--photo {
  min-height: min(90vh, 1000px);
  background: var(--grey-bg) url('img/popup-bg.jpg') center bottom / cover no-repeat;
}

.shl-popup-body {
  padding: 42px 34px 44px;
}

.shl-popup h2 {
  margin: 0;
  color: var(--heading);
  font-size: 400%;
  font-weight: 700;
  letter-spacing: -3px;
  line-height: 1.2;
}

.shl-popup h4 {
  margin: 0;
  padding-bottom: 5px;
  color: var(--green);
  font-size: 110%;
  font-weight: 400;
  letter-spacing: 3px;
}

.shl-popup p {
  color: var(--heading);
}

.shl-popup ul {
  margin: 25px 0 0;
  padding-bottom: 10px;
}

.shl-popup li {
  margin-bottom: 14px;
  color: var(--green);
  font-size: 108%;
}

/* No reveal animation here: it would replay (and hide the form for ~2s) every time the popup opens. */
.shl-popup .shl-form {
  max-width: none;
  margin-top: 30px;
  animation: none;
}

.shl-popup-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  font-size: 26px;
  line-height: 36px;
}

.shl-popup-close:hover,
.shl-popup-close:focus-visible {
  color: #000000;
}

/* Back-to-top button */
.shl-top {
  position: fixed;
  top: 100px;
  right: 6px;
  z-index: 60;
  padding: 5px 12px;
  border-radius: 50px;
  background: var(--green);
  color: #ffffff;
  font-size: 1.5em;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(60px);
  transition: opacity 1s, transform 0.5s;
}

.shl-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* Fade-in as sections scroll into view (site.js adds .is-visible). */
.js [data-reveal] {
  opacity: 0;
  transition: opacity 2.2s ease var(--delay, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .shl-form,
  .shl-popup[open] {
    animation: none;
  }

  .js [data-reveal] {
    opacity: 1;
    transition: none;
  }
}

/* Tablet */
@media (max-width: 1025px) {
  .shl-hero {
    min-height: max(50vh, 480px);
  }

  .shl-hero img {
    height: 150px;
  }

  .shl-nav a {
    padding: 2px 15px;
  }

  .shl-questions {
    margin-top: -148px;
  }

  .shl-partners p {
    font-size: 80%;
  }
}

/* Phone */
@media (max-width: 768px) {
  .shl-nav {
    padding: 10px 10px 0 60px;
    text-align: right;
  }

  .shl-menu-toggle {
    display: inline-block;
    padding: 0 8px;
    border: 0;
    background: none;
    color: #6d6d6d;
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
  }

  .shl-nav ul {
    display: none;
    flex-direction: column;
    margin-top: 10px;
    padding: 15px;
    background: #81c341;
    text-align: left;
  }

  .shl-nav.is-open ul {
    display: flex;
  }

  .shl-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .shl-nav li + li a {
    border-left: 0;
  }

  .shl-nav a {
    padding: 10px;
    color: #ffffff;
    font-size: 150%;
  }

  .shl-questions {
    margin-top: -140px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .shl-title {
    padding-top: 50px;
    font-size: 250%;
    line-height: 35px;
  }

  .shl-form,
  .shl-errors {
    max-width: none;
  }

  .shl-form {
    display: flex;
    flex-direction: column;
    gap: 2em;
  }

  .shl-programs-grid,
  .shl-partners-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .shl-programs p {
    font-size: 90%;
  }

  .shl-popup h2 {
    font-size: 250%;
    letter-spacing: -2px;
  }

  .shl-popup-body {
    padding: 42px 20px 30px;
  }

  .shl-footer {
    font-size: 60%;
  }
}
