/*
 * Grand Funding original-site refinement rail.
 * This layer fixes flow, conversion friction, and resilient motion behavior
 * without changing the established desert-night, teal, and ember system.
 */

.hero-deadline-note {
  margin: -1.75rem 0 2rem;
  color: rgba(244, 247, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.5;
}

.hero-deadline-note strong {
  color: #f4f7ff;
}

.hero .loan-card[href] {
  display: block;
  color: inherit;
  text-decoration: none;
}

.hero .loan-card[href]:focus-visible {
  outline: 3px solid rgba(79, 227, 210, 0.8);
  outline-offset: 3px;
}

.hero .loan-card[href]::after {
  content: "View funded deals →";
  display: block;
  margin-top: 0.65rem;
  color: #7af1e5;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.hero .loan-card[href]:hover::after,
.hero .loan-card[href]:focus-visible::after {
  opacity: 1;
  transform: none;
}

.compare-table-scroll {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(79, 227, 210, 0.56) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.compare-table-scroll .compare-table {
  width: 100%;
  min-width: 660px;
}

.compare-scroll-cue {
  display: none;
}

.product-guide-links,
.blog-resource-note p {
  color: rgba(244, 247, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.6;
}

.product-guide-links {
  margin: 1rem 0 1.5rem;
}

.product-guide-links strong {
  color: #f4f7ff;
}

.product-guide-links a,
.blog-resource-note a {
  color: #7af1e5;
  font-weight: 700;
  text-underline-offset: 0.22em;
}

.product-guide-links a:hover,
.blog-resource-note a:hover {
  color: #f4f7ff;
}

.blog-resource-note {
  padding: 0 0 clamp(2.5rem, 6vw, 5rem);
  text-align: center;
}

.blog-resource-note p {
  margin: 0;
}

.faq-question:is(button) {
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}

.faq-question-title {
  display: block;
  margin: 0;
  color: #f4f7ff;
  font-size: inherit;
  font-weight: 750;
  line-height: 1.35;
}

.faq-answer[hidden] {
  display: none !important;
}

.form-status {
  min-height: 1.5em;
  margin: 0.75rem 0 0;
  color: rgba(244, 247, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.5;
}

form[aria-busy="true"] button[type="submit"] {
  cursor: wait;
  filter: saturate(0.72);
  opacity: 0.8;
}

[data-text-link],
.blog-callout__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 0.625rem;
}

main > div > p a[href^="tel:"],
main > p a[href^="tel:"] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 0.625rem;
}

.sticky-dual[hidden],
body[data-route="/apply"] .sticky-dual,
body[data-route="/contact"] .sticky-dual,
body[data-route^="/thanks"] .sticky-dual {
  display: none !important;
}

.sticky-dual.is-suppressed {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
}

.sticky-dual {
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

/*
 * Three legacy scripts previously competed to hide and reveal the same nodes.
 * Keep the site's signature hero motion and interaction motion, while making
 * ordinary page content visible by default for users, crawlers, screenshots,
 * browser agents, restored tabs, and no-JS fallbacks.
 */
.reveal,
.reveal-stagger,
.reveal-stagger > * {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

main > section {
  content-visibility: visible !important;
  contain-intrinsic-size: auto !important;
}

@media (min-width: 769px) {
  html body .header .mobile-menu-toggle {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .back-to-top {
    display: none !important;
  }

  body[data-route="/apply"] .header .cta-btn,
  body[data-route="/contact"] .header .cta-btn,
  body[data-route^="/thanks"] .header .cta-btn {
    display: none !important;
  }

  body.has-sticky-cta {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  body.has-sticky-cta .header .cta-btn {
    display: none !important;
  }

  .sticky-dual {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .compare-scroll-cue {
    display: block;
    margin: 0.75rem 0 0;
    color: rgba(244, 247, 255, 0.62);
    font-size: 0.8rem;
    text-align: center;
  }

  .hero-deadline-note {
    margin: -1.2rem auto 1.75rem;
    max-width: 30rem;
    text-align: center;
  }

  .hero .loan-card[href]::after {
    opacity: 1;
    transform: none;
  }

  .hero .hero-visual {
    display: block !important;
    width: 100%;
    margin: 1.5rem auto 0;
    text-align: left;
  }

  .hero .hero-loans {
    display: block !important;
    width: 100%;
    max-width: 100%;
    padding: 1rem;
  }

  .hero .hero-loans-header {
    margin-bottom: 0.85rem;
  }

  .hero .hero-loans-title {
    font-size: 1.05rem;
  }

  .hero .hero-loans-sub,
  .hero .hero-loans-footer {
    display: none !important;
  }

  .hero .loan-cards {
    display: flex !important;
    gap: 0.75rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0.1rem 0 0.75rem;
    scroll-padding-inline: 0.1rem;
    scroll-snap-type: x mandatory;
    scrollbar-color: rgba(79, 227, 210, 0.56) rgba(255, 255, 255, 0.08);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .hero .loan-card[href] {
    flex: 0 0 min(78vw, 19rem);
    opacity: 1 !important;
    scroll-snap-align: start;
    transform: none !important;
  }

  .hero .loan-card:nth-child(n + 4) {
    display: none !important;
  }

  .product-guide-links span[aria-hidden="true"] {
    display: none;
  }

  .product-guide-links a {
    display: block;
    margin-top: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .hero .hero-video,
  html body .hero-media .hero-video,
  html body video.hero-video {
    display: none !important;
    animation: none !important;
  }

  .sticky-dual,
  .hero .loan-card[href]::after {
    transition: none;
  }

  .reveal,
  .reveal-stagger,
  .reveal-stagger > * {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}
