/* ==========================================================================
   Find a Loan — Landing page styles
   Brand: Fire #FF0000 · Ocean #003337 · Sand #F2DED6 · Sky #9AD4DB · Wine #45050E
   Heading face: Filson Pro (brand) with Montserrat as the sanctioned fallback.
   ========================================================================== */

:root {
  /* Brand palette */
  --fire: #ff0000;
  --fire-2: #d60000; /* darker fire for hovers / text on light */
  --ocean: #003337;
  --ocean-2: #06474c;
  --sand: #f2ded6;
  --sand-2: #faf1ec;
  --sky: #9ad4db;
  --wine: #45050e;

  /* Working tokens */
  --ink: #07211f; /* primary text */
  --muted: #4f6566; /* secondary text */
  --paper: #ffffff;
  --paper-2: #fbf6f3; /* warm off-white section */
  --line: #e7ddd6; /* hairlines on light */
  --line-d: rgba(255, 255, 255, 0.16); /* hairlines on dark */

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 72px; /* sticky .nav height — keep in sync with scroll offsets */
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 24px 60px -28px rgba(0, 51, 55, 0.45);
  --shadow-sm: 0 10px 30px -18px rgba(0, 51, 55, 0.4);

  --ff-display:
    "Filson Pro", "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-body:
    "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* -------------------------------------------------------------- Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
h1,
h2,
h3 {
  font-family: var(--ff-display);
  line-height: 1.04;
  margin: 0;
  letter-spacing: -0.01em;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
  border-radius: 6px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ocean);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 1000;
  transition: top 0.2s;
}
.skip:focus {
  top: 12px;
}

/* -------------------------------------------------------------- Buttons */
.btn {
  --bg: var(--fire);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  background: var(--bg);
  color: var(--fg);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.005em;
  padding: 0.95em 1.6em;
  border: 0;
  border-radius: 999px;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    background 0.18s var(--ease);
  box-shadow: 0 12px 24px -12px rgba(255, 0, 0, 0.6);
  text-align: center;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -12px rgba(255, 0, 0, 0.7);
}
.btn:active {
  transform: translateY(0);
}
.btn .arrow {
  transition: transform 0.2s var(--ease);
}
.btn:hover .arrow {
  transform: translateX(4px);
}
.btn--ocean {
  --bg: var(--ocean);
  --fg: #fff;
  box-shadow: 0 12px 24px -14px rgba(0, 51, 55, 0.7);
}
.btn--ghost {
  --bg: transparent;
  --fg: var(--ink);
  box-shadow: none;
  border: 2px solid var(--ink);
  padding: 0.85em 1.5em;
}
.btn--ghost:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}
.btn--white {
  --bg: #fff;
  --fg: var(--ocean);
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.5);
}
.btn--lg {
  font-size: 1.08rem;
  padding: 1.05em 1.9em;
}

/* -------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition:
    box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.site-header.scrolled {
  box-shadow: 0 8px 24px -18px rgba(0, 51, 55, 0.55);
  border-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  height: 26px;
  width: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--fire);
  transition: width 0.2s var(--ease);
}
.nav-links a:hover::after {
  width: 100%;
}
.nav-cta {
  margin-left: 8px;
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  color: var(--ink);
}
.nav-toggle svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 880px) {
  .nav-links {
    display: none;
  }
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .mobile-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px var(--gutter) 22px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu.open {
    display: flex;
  }
  .mobile-menu a {
    padding: 13px 4px;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu .btn {
    margin-top: 12px;
  }
}
@media (min-width: 881px) {
  .mobile-menu {
    display: none;
  }
}

/* -------------------------------------------------------------- Hero */
.hero {
  position: relative;
  overflow: clip;
  background:
    radial-gradient(
      120% 90% at 88% -10%,
      rgba(154, 212, 219, 0.3),
      transparent 60%
    ),
    linear-gradient(180deg, var(--sand-2), #fff 70%);
}
.hero-waves {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(
    95deg,
    transparent 0%,
    transparent 40%,
    #000 78%
  );
  mask-image: linear-gradient(95deg, transparent 0%, transparent 40%, #000 78%);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 7vw, 92px) 0 clamp(54px, 7vw, 96px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fire-2);
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fire);
  box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.16);
}
.hero h1 {
  font-size: clamp(2.45rem, 5.4vw, 4.05rem);
  font-weight: 800;
  margin: 0.5em 0 0.42em;
  max-width: 14ch;
}
.hero h1 .hl {
  color: var(--fire);
}
.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 1.7em;
}
.ticks {
  list-style: none;
  margin: 0 0 2em;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.ticks li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
}
.ticks svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--ocean);
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.hero-actions .note {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Reveal animation for hero stack */
.rise {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s var(--ease) forwards;
}
.rise.d1 {
  animation-delay: 0.05s;
}
.rise.d2 {
  animation-delay: 0.13s;
}
.rise.d3 {
  animation-delay: 0.21s;
}
.rise.d4 {
  animation-delay: 0.29s;
}
.rise.d5 {
  animation-delay: 0.37s;
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* -------------------------------------------------------------- Form card / mount */
.form-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 100%;
  max-width: 440px;
  justify-self: end;
  opacity: 0;
  transform: translateY(20px) scale(0.99);
  animation: rise 0.8s var(--ease) 0.18s forwards;
}
.form-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--ocean), var(--ocean-2));
  color: #fff;
}
.form-card__head h2 {
  font-size: 1.12rem;
}
.form-card__head .sub {
  font-size: 0.82rem;
  opacity: 0.85;
  font-weight: 500;
}
.form-card__body {
  padding: 30px 28px 30px;
}
.form-card__foot {
  padding: 14px 24px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.form-card__foot svg {
  width: 16px;
  height: 16px;
  color: var(--ocean);
}

/* (The multi-step lead form mounts inside #lead-form-mount — see form.css) */

/* -------------------------------------------------------------- Stat band */
.statband {
  background: var(--ocean);
  color: #fff;
}
.statband .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 38px;
  padding: 20px 0;
  text-align: center;
}
.statband .stat {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 1rem;
}
.statband .num {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--sky);
}
.statband .sep {
  color: var(--line-d);
}
.statband .ph {
  color: var(--sky);
  font-weight: 700;
}

/* -------------------------------------------------------------- Sections */
.section {
  padding: clamp(64px, 9vw, 116px) 0;
}
.section--sand {
  background: var(--paper-2);
}
.section--ocean {
  background: var(--ocean);
  color: #fff;
}
.kicker {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fire-2);
}
.section--ocean .kicker {
  color: var(--sky);
}
.section-head {
  max-width: 620px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section h2.title {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 800;
  margin: 0.35em 0 0.35em;
}
.section-head p {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0;
}
.section--ocean .section-head p {
  color: rgba(255, 255, 255, 0.78);
}

/* Reveal on scroll — hidden state only applies when JS is active (no-JS = visible) */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal.s2 {
  transition-delay: 0.08s;
}
.reveal.s3 {
  transition-delay: 0.16s;
}
.reveal.s4 {
  transition-delay: 0.24s;
}
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .rise,
  .form-card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* -------------------------------------------------------------- How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.step {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px 28px;
  box-shadow: var(--shadow-sm);
}
.step .n {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--fire);
  color: #fff;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 18px;
}
.step h3 {
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.step p {
  margin: 0;
  color: var(--muted);
}
.step .time {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ocean);
  background: var(--sky);
  padding: 4px 10px;
  border-radius: 999px;
}

/* -------------------------------------------------------------- Why / positioning */
.compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 6px;
}
.col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  background: #fff;
}
.col h3 {
  font-size: 1.06rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.col .tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.col ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 11px;
}
.col li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}
.col li svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 2px;
}
.col.dim li svg {
  color: #b9c4c4;
}
.col.win {
  background: var(--ocean);
  color: #fff;
  border-color: var(--ocean);
  box-shadow: var(--shadow);
  position: relative;
}
.col.win .tag {
  color: var(--sky);
}
.col.win li {
  color: rgba(255, 255, 255, 0.9);
}
.col.win li svg {
  color: var(--sky);
}
.col.win .badge {
  position: absolute;
  top: -13px;
  left: 24px;
  background: var(--fire);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
}

.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: clamp(40px, 5vw, 60px);
}
.value {
}
.value .ico {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--sand);
  color: var(--fire);
  margin-bottom: 14px;
}
.value .ico svg {
  width: 26px;
  height: 26px;
}
.value h3 {
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.value p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* -------------------------------------------------------------- Lenders */
/* (Logo wall is the rotating marquee — see "Rotating lender logo marquee" below.) */
.lenders-note {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* -------------------------------------------------------------- FAQ */
.faq {
  max-width: 780px;
  margin-inline: auto;
}
.qa {
  border-bottom: 1px solid var(--line);
}
.qa__btn {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 4px;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--ink);
}
.qa__btn .ic {
  margin-left: auto;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sand);
  color: var(--fire);
  transition:
    transform 0.25s var(--ease),
    background 0.2s;
}
.qa__btn[aria-expanded="true"] .ic {
  transform: rotate(45deg);
  background: var(--fire);
  color: #fff;
}
.qa__panel {
  overflow: hidden;
  height: 0;
  transition: height 0.3s var(--ease);
}
.qa__panel-inner {
  padding: 0 4px 22px;
  color: var(--muted);
  max-width: 64ch;
}

/* -------------------------------------------------------------- CTA band */
.ctaband {
  position: relative;
  overflow: clip;
  background: var(--fire);
  color: #fff;
  text-align: center;
}
.ctaband .wrap {
  padding: clamp(54px, 7vw, 82px) 0;
  position: relative;
  z-index: 1;
}
.ctaband h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  max-width: 18ch;
  margin-inline: auto;
}
.ctaband p {
  margin: 14px auto 28px;
  max-width: 48ch;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.92);
}
.ctaband .waves {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.25;
}

/* -------------------------------------------------------------- Footer */
.site-footer {
  position: relative;
  overflow: clip;
  background: var(--ocean);
  color: rgba(255, 255, 255, 0.82);
}
.site-footer .waves {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  opacity: 0.18;
  pointer-events: none;
}
.footer-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: clamp(54px, 7vw, 80px) 0 36px;
}
.footer-brand img {
  height: 30px;
  margin-bottom: 16px;
}
.footer-brand p {
  margin: 0;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}
.fcol h4 {
  font-family: var(--ff-display);
  font-weight: 800;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 4px 0 16px;
}
.fcol a {
  display: block;
  padding: 7px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}
.fcol a:hover {
  color: #fff;
}
.footer-legal {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-d);
  padding: 26px 0 40px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.7;
}
.footer-legal .entity {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  margin-bottom: 8px;
}
.footer-legal .ph {
  color: var(--sky);
}
.footer-legal .copy {
  margin-top: 16px;
}

/* -------------------------------------------------------------- Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .form-card {
    order: 2;
    justify-self: center;
  }
  .hero-copy {
    order: 1;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .compare {
    grid-template-columns: 1fr;
  }
  .values {
    grid-template-columns: 1fr 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 560px) {
  /* Viewport-fit card: head band, form body and trust foot all on screen at
     once. The dvh line wins where supported; the vh line above it is the
     fallback. Steps compact their spacing to fit (form.css phone block), so
     the form itself never scrolls; the min-height floor is what the tallest
     step needs fully compacted — below it (very short screens) the page
     scrolls natively instead. The cap stops tall phones stretching the
     steps. (The foot's own phone condensing lives with its base rules
     further down — the cascade there wins over this block.) */
  .form-card {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-h) - 20px);
    height: calc(100dvh - var(--header-h) - 20px);
    min-height: 540px;
    max-height: 780px;
  }
  .form-card__head {
    padding: 12px 18px;
  }
  /* Flex chain down to `.lf` so the form shell can flex to the card */
  .form-card__body {
    padding: 16px 18px 18px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  #lead-form-mount {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  /* Side breathing room: .hero-grid's padding shorthand zeroes the wrap's
     horizontal gutter (the hero is full-bleed by design on desktop), so at
     phone widths give it back explicitly to lift the card off the edges. */
  .hero-grid {
    padding-inline: 16px;
  }
  .values {
    grid-template-columns: 1fr;
  }
  .statband .wrap {
    gap: 6px 20px;
  }
  .statband .sep {
    display: none;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
}
/* Short phones (iPhone SE/8 class): slim the card's own chrome — head band,
   body padding, trust foot — so the step box gains ~45px; the form steps
   compact in lockstep (form.css short-phone tier). */
@media (max-width: 560px) and (max-height: 750px) {
  .form-card__head {
    padding: 7px 18px;
  }
  .form-card__head .sub {
    font-size: 0.72rem;
  }
  .form-card__body {
    padding: 8px 16px 10px;
  }
  .form-card__foot {
    padding: 4px 16px 6px;
    gap: 2px 12px;
    font-size: 0.72rem;
  }
}
/* Very narrow phones: the card head's title wraps to two lines and steals
   step height, so shrink the band's type one notch. */
@media (max-width: 360px) {
  .form-card__head h2 {
    font-size: 1rem;
  }
  .form-card__head .sub {
    font-size: 0.76rem;
  }
}
/* Tiny phones (iPhone SE 1st gen class): even fully compacted, the tallest
   steps need a slightly taller card — the page scrolls the remainder
   natively; the form itself still never scrolls. */
@media (max-width: 340px) {
  .form-card {
    min-height: 620px;
  }
}

/* ==========================================================================
   Enhancements — animated brand waves, header phone, review stars,
   rotating lender logo marquee
   ========================================================================== */

/* ---- Animated flowing waves --------------------------------------------- */
/* The contour-wave motif drifts and undulates for a living, dynamic feel.
   Layers are scaled up so the motion never reveals an empty edge (parents
   clip the overflow). */
.hero-waves svg,
.ctaband .waves svg,
.site-footer .waves svg {
  will-change: transform;
  transform-origin: center;
}

.hero-waves .waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-waves .waves--back {
  opacity: 0.55;
  animation: waveFlow 19s var(--ease) infinite;
}
.hero-waves .waves--front {
  opacity: 1;
  animation: waveFlowAlt 13s var(--ease) infinite;
}
.ctaband .waves svg {
  animation: waveFlowAlt 16s var(--ease) infinite;
}
.site-footer .waves svg {
  animation: waveFlow 22s var(--ease) infinite;
}

@keyframes waveFlow {
  0% {
    transform: translate3d(0, 0, 0) scale(1.28);
  }
  50% {
    transform: translate3d(-5.5%, -2%, 0) scale(1.28);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1.28);
  }
}
@keyframes waveFlowAlt {
  0% {
    transform: translate3d(-5%, 1.5%, 0) scale(1.34);
  }
  50% {
    transform: translate3d(1.5%, -1.5%, 0) scale(1.34);
  }
  100% {
    transform: translate3d(-5%, 1.5%, 0) scale(1.34);
  }
}

/* ---- Header / mobile phone link ----------------------------------------- */
.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ocean);
  margin-left: auto;
}
.nav-phone svg {
  width: 17px;
  height: 17px;
  color: var(--fire);
}
.nav-phone:hover {
  color: var(--fire-2);
}
.nav-links + .nav-phone {
  margin-left: 24px;
}
.nav-cta {
  margin-left: 18px;
}
.mobile-menu .nav-phone {
  margin: 6px 4px 2px;
  font-size: 1.05rem;
}
@media (max-width: 880px) {
  .nav > .nav-phone {
    display: none;
  }
}

/* ---- Review stars in the stat band -------------------------------------- */
.statband .stars {
  color: #ffc83d;
  letter-spacing: 2px;
  font-size: 1rem;
}
.statband .src {
  font-weight: 700;
  color: #fff;
}

/* ---- Footer contact block ----------------------------------------------- */
.footer-contact {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  width: max-content;
}
.footer-contact a:hover {
  color: var(--sky);
}

/* ---- Form card foot — stacked reassurances ------------------------------ */
.form-card__foot {
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 16px;
}
.form-card__foot .ff-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.form-card__foot .ff-item svg {
  flex: 0 0 16px;
}
/* Phones: tighter, smaller reassurance rows so the foot takes minimal height
   (the card is viewport-fit at this width — see the 560px block above). */
@media (max-width: 560px) {
  .form-card__foot {
    padding: 10px 16px 12px;
    gap: 4px 12px;
    font-size: 0.76rem;
  }
  .form-card__foot .ff-item svg {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }
}

/* ---- Rotating lender logo marquee --------------------------------------- */
.logo-marquee {
  position: relative;
  overflow: hidden;
  padding: 6px 0;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 7%,
    #000 93%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 7%,
    #000 93%,
    transparent
  );
}
.logo-track {
  display: flex;
  align-items: center;
  gap: 18px;
  width: max-content;
  animation: logoScroll 46s linear infinite;
}
.logo-marquee:hover .logo-track {
  animation-play-state: paused;
}
.logo-chip {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 180px;
  height: 88px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 26px;
  box-shadow: var(--shadow-sm);
}
.logo-chip img {
  max-width: 100%;
  max-height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}
.logo-chip--dark {
  background: var(--ocean);
  border-color: var(--ocean);
}
@keyframes logoScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 560px) {
  .logo-chip {
    width: 148px;
    height: 76px;
    padding: 14px 20px;
  }
  .logo-chip img {
    max-height: 38px;
  }
  .nav-phone {
    font-size: 0.9rem;
  }
}

/* ---- Reduced motion: calm everything ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .hero-waves svg,
  .ctaband .waves svg,
  .site-footer .waves svg {
    animation: none !important;
    transform: none !important;
  }
  .logo-track {
    animation: none !important;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
}
