/* loanableusa.com motion layer, on top of styles.css and in its palette and type.
   Vanilla ports of 21st.dev / Magic UI pieces: Animated Shiny Text (the announcement pill),
   Blur In and Text Reveal (headings, word by word), the Financial Hero's grid and aurora
   background, Number Ticker (stats), Spotlight cards with a lit edge, Border Beam, Shimmer
   Button, FAQ Accordion Reveal, Blur Fade (sections as they scroll in), and Scroll Progress.
   js/site-motion.js turns it on (html.lx) and adds the small layers the effects draw on, so
   the cards' own ::before/::after decorations stay as they are. Reduced motion: still. */
@property --lx-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

html.lx { --lx-p1: #8a6cf6; --lx-p2: #6B5B95; --lx-p3: #4b367c; --lx-ink: #1a1a2e; --lx-ease: cubic-bezier(.16, 1, .3, 1); }

/* ---------- Scroll Progress, and the bar turns to glass once the page scrolls ---------- */
.lx-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10003; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--lx-p1), var(--lx-p3)); }
html.lx .navbar.lx-scrolled { background: rgba(255, 255, 255, .92) !important; -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 12px 30px -20px rgba(45, 30, 90, .45) !important; }

/* ---------- Hero: grid + aurora behind it (Financial Hero) ---------- */
html.lx .hero { position: relative; isolation: isolate; }
.lx-hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
.lx-hero-bg::before { content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(107, 91, 149, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(107, 91, 149, .09) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 65% 70% at 28% 40%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 65% 70% at 28% 40%, #000 15%, transparent 72%); }
.lx-hero-bg i { position: absolute; border-radius: 50%; filter: blur(30px); }
.lx-hero-bg i:nth-child(1) { width: 560px; height: 560px; left: -140px; top: -220px; background: radial-gradient(circle, rgba(138, 108, 246, .2), transparent 62%); animation: lx-drift 19s ease-in-out infinite alternate; }
.lx-hero-bg i:nth-child(2) { width: 460px; height: 460px; right: -120px; bottom: -200px; background: radial-gradient(circle, rgba(107, 91, 149, .16), transparent 62%); animation: lx-drift 23s ease-in-out infinite alternate-reverse; }
@keyframes lx-drift { to { transform: translate(90px, 60px) scale(1.12); } }

/* Animated Shiny Text: the pill above the headline (opens the Loanable CRM pop-up). */
.lx-announce { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 5px 14px 5px 5px; border-radius: 999px;
  text-decoration: none; font-size: .82rem; font-weight: 600; background: rgba(255, 255, 255, .85); border: 1px solid rgba(107, 91, 149, .22);
  box-shadow: 0 12px 26px -20px rgba(75, 54, 124, .9); transition: border-color .25s ease, transform .25s var(--lx-ease), box-shadow .25s ease;
  animation: lx-rise .8s var(--lx-ease) both; }
.lx-announce:hover, .lx-announce:focus-visible { border-color: var(--lx-p1); transform: translateY(-1px); box-shadow: 0 14px 30px -18px rgba(90, 63, 208, .9); }
.lx-announce-tag { padding: 3px 9px; border-radius: 999px; color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(180deg, #8467f4, var(--lx-p3)); }
.lx-shiny { background: linear-gradient(110deg, var(--lx-p3) 35%, #c4b4ff 50%, var(--lx-p3) 65%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: lx-shiny 3.6s linear infinite; }
.lx-announce svg { flex: none; color: var(--lx-p3); transition: transform .2s ease; }
.lx-announce:hover svg { transform: translateX(3px); }
@keyframes lx-shiny { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes lx-rise { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Blur In: the headline, word by word. */
html.lx .hero-content.animate-hero h1 { animation: none; opacity: 1; }
html.lx .lx-word { display: inline-block; }
html.lx h1 .lx-word { opacity: 0; filter: blur(10px); transform: translateY(14px); animation: lx-word .85s var(--lx-ease) forwards;
  animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
@keyframes lx-word { to { opacity: 1; filter: none; transform: none; } }
/* Text Reveal: section headings, word by word as they scroll in. */
html.lx .lx-words .lx-word { opacity: 0; filter: blur(8px); transform: translateY(12px);
  transition: opacity .75s var(--lx-ease), filter .75s var(--lx-ease), transform .75s var(--lx-ease); transition-delay: calc(var(--i, 0) * 55ms); }
html.lx .lx-words.lx-in .lx-word { opacity: 1; filter: none; transform: none; }

/* The photo leans toward the pointer. */
html.lx .hero-image-container { transform: perspective(1100px) rotateX(var(--lx-rx, 0deg)) rotateY(var(--lx-ry, 0deg)); transition: transform .6s var(--lx-ease); will-change: transform; }
html.lx .trust-logos img { transition: transform .3s ease, filter .3s ease, opacity .3s ease; }
html.lx .trust-logos img:hover { transform: translateY(-2px); }

/* Shimmer Button: a shine passes over the main calls to action now and then. */
html.lx .btn-hero, html.lx .btn-primary-large, html.lx .calculator-actions .btn-primary { position: relative; overflow: hidden; isolation: isolate; }
html.lx .btn-hero::after, html.lx .btn-primary-large::after, html.lx .calculator-actions .btn-primary::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%;
  z-index: -1; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .32), transparent); transform: skewX(-20deg); animation: lx-sweep 4.2s ease-in-out 1s infinite; }
html.lx .btn-hero:hover, html.lx .btn-primary-large:hover { box-shadow: 0 16px 34px -14px rgba(26, 26, 46, .85); }
@keyframes lx-sweep { 0%, 62% { left: -60%; } 100% { left: 130%; } }

/* ---------- Blur Fade: sections rise and come into focus as they scroll in ---------- */
html.lx .animate-on-scroll { transition: opacity .75s var(--lx-ease), transform .75s var(--lx-ease), filter .75s var(--lx-ease), box-shadow .4s ease, border-color .3s ease, background .3s ease; }
html.lx body.animations-ready .animate-on-scroll:not(.animated):not(.visible) { opacity: 0; filter: blur(8px); transform: translateY(26px) scale(.985); }
html.lx .animate-on-scroll.visible, html.lx .animate-on-scroll.animated { filter: none; }

/* ---------- Spotlight cards with a lit edge (funding options, benefits, articles) ---------- */
html.lx .lx-spot { position: relative; isolation: isolate; }
.lx-glow, .lx-edge { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.lx-glow { z-index: -1; background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 0%), rgba(138, 108, 246, .11), transparent 45%); }
.lx-edge { z-index: 2; padding: 1.5px; background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(138, 108, 246, .9), transparent 46%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
html.lx .lx-spot:hover .lx-glow, html.lx .lx-spot:hover .lx-edge { opacity: 1; }
html.lx .why-choose-us .lx-glow { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(196, 180, 255, .16), transparent 45%); }
html.lx .why-choose-us .lx-edge { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(196, 180, 255, .75), transparent 46%); }
/* Feature icons: Loanable's own duotone line set (24px grid, 1.75 stroke, one #8a6cf6 accent at 18%), each in a soft
   lavender tile. The icons set their own stroke on an inner <g>, so older "svg { stroke }" rules can't recolor them.
   Not gated on html.lx: the tiles are there without scripts too. The buttons carry an arrow. */
.lx-tile { display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; color: #4b367c;
  background: linear-gradient(145deg, #f4f0ff, #ebe4ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85), 0 0 0 1px rgba(107, 91, 149, .1), 0 10px 22px -16px rgba(75, 54, 124, .6); }
.lx-tile .lx-ico { display: block; width: 26px; height: 26px; }
.lx-tile-sm { width: 44px; height: 44px; border-radius: 11px; }
.lx-tile-sm .lx-ico { width: 24px; height: 24px; }
.funding-card-icon.lx-tile { width: 56px; height: 56px; border-radius: 14px; }
.funding-card-icon.lx-tile .lx-ico { width: 28px; height: 28px; }
.result-icon.lx-tile { display: grid; margin: 0 auto var(--spacing-sm, .5rem); }
.why-choose-us .lx-tile { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 12px 26px -14px rgba(10, 6, 30, .75); }
@media (max-width: 768px) { .floating-badge-bottom .lx-tile { width: 36px; height: 36px; border-radius: 10px; } }
html.lx .funding-card-btn { display: inline-flex; align-items: center; gap: 8px; }
html.lx .funding-card-btn::after { content: '\2192'; font-weight: 600; transition: transform .25s var(--lx-ease); }
html.lx .funding-card-btn:hover::after { transform: translateX(3px); }
html.lx .funding-card-btn { transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--lx-ease); }
html.lx .funding-card:hover .funding-card-btn { transform: translateX(3px); }
html.lx .funding-card-icon svg, html.lx .benefit-icon-simple svg { transition: transform .5s var(--lx-ease); }
html.lx .funding-card:hover .funding-card-icon svg, html.lx .benefit-card:hover .benefit-icon-simple svg { transform: translateY(-3px) scale(1.06) rotate(-4deg); }
/* Funding options lift and grow on hover, like the why-us cards below (owner, Nov 27, 2026). Their old 4px lift in
   styles.css never showed: the scroll reveal's ".animate-on-scroll.visible { transform: translateY(0) }" comes later
   with the same weight and cancelled it. Mouse and trackpad only, so a tap on a phone doesn't leave a card raised. */
/* They also carried a finished fadeInUp animation from styles.css. While an animation holds transform the browser
   skips the transition, so the lift snapped. The scroll reveal already shows them, so the animation goes. */
html .funding-options-section .funding-card.animate-on-scroll { animation: none !important; }
@media (hover: hover) and (pointer: fine) {
  html .funding-options-section .funding-card.animate-on-scroll:hover { z-index: 2; transform: translateY(-6px) scale(1.04) !important; transition-delay: 0s !important;
    border-color: rgba(138, 108, 246, .32) !important; box-shadow: 0 26px 50px -18px rgba(75, 54, 124, .34), 0 10px 24px rgba(17, 12, 34, .07) !important; }
  html .funding-options-section .funding-card.animate-on-scroll:hover:active { transform: translateY(-3px) scale(1.02) !important; }
}
html.lx .resource-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px -22px rgba(75, 54, 124, .45); }
html.lx .resource-card .resource-category { transition: letter-spacing .3s ease, color .3s ease; }
html.lx .resource-card:hover .resource-category { letter-spacing: .08em; color: var(--lx-p3); }

/* The benefit icons draw themselves in as their cards arrive. */
html.lx .benefit-card .benefit-icon-simple svg > * { stroke-dasharray: 140; stroke-dashoffset: 140; transition: stroke-dashoffset 1.4s var(--lx-ease) .25s; }
html.lx .benefit-card.visible .benefit-icon-simple svg > *, html.lx .benefit-card.animated .benefit-icon-simple svg > * { stroke-dashoffset: 0; }

/* ---------- Border Beam: a light runs around the stat cards and the calculator ---------- */
.lx-beam { position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--lx-angle), transparent 0 72%, rgba(138, 108, 246, .0) 74%, var(--lx-p1) 86%, #d9ccff 90%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: lx-beam 7s linear infinite; }
.lx-beam.lx-slow { animation-duration: 11s; }
html.lx .stat-glass-card { transition: transform .45s var(--lx-ease), box-shadow .45s ease; }
html.lx .stat-glass-card:hover { transform: translateY(-4px); }
html.lx .calculator-form { position: relative; }
@keyframes lx-beam { to { --lx-angle: 360deg; } }

/* ---------- Aurora behind the dark "why us" band and the closing call to action ---------- */
html.lx .why-choose-us, html.lx .cta-section { position: relative; overflow: hidden; isolation: isolate; }
.lx-aurora { position: absolute; inset: -20%; z-index: 0; pointer-events: none; opacity: .9;
  background: radial-gradient(40% 50% at 20% 30%, rgba(138, 108, 246, .28), transparent 70%), radial-gradient(35% 45% at 80% 70%, rgba(196, 180, 255, .18), transparent 70%),
    radial-gradient(30% 40% at 60% 10%, rgba(91, 123, 163, .16), transparent 70%);
  animation: lx-aurora 22s ease-in-out infinite alternate; }
html.lx .why-choose-us > .container, html.lx .cta-section > .container { position: relative; z-index: 1; }
html.lx .cta-section .lx-aurora { opacity: .55; background: radial-gradient(40% 55% at 15% 20%, rgba(138, 108, 246, .25), transparent 70%), radial-gradient(35% 50% at 85% 85%, rgba(107, 91, 149, .2), transparent 70%); }
.lx-dots { position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: radial-gradient(rgba(75, 54, 124, .16) 1px, transparent 1.3px); background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 75%); }
@keyframes lx-aurora { 0% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(4%, -3%) rotate(6deg); } 100% { transform: translate(-3%, 4%) rotate(-4deg); } }

/* ---------- FAQ Accordion Reveal ---------- */
html.lx .faq-item { transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, opacity .75s var(--lx-ease), transform .75s var(--lx-ease), filter .75s var(--lx-ease); }
html.lx .faq-item.active { box-shadow: 0 0 0 1px rgba(196, 180, 255, .35), 0 18px 40px -24px rgba(138, 108, 246, .7); }
html.lx .faq-answer { transition: max-height .5s var(--lx-ease), padding .5s var(--lx-ease), opacity .4s ease; opacity: 0; }
html.lx .faq-item.active .faq-answer { opacity: 1; }

/* ---------- Phones: lighter, and nothing tilts ---------- */
@media (max-width: 768px) {
  .lx-hero-bg i { filter: blur(40px); opacity: .7; }
  html.lx .hero-image-container { transform: none; }
  .lx-announce { font-size: .76rem; margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .lx-hero-bg i, .lx-aurora, .lx-beam, .lx-shiny, .lx-announce, html.lx .btn-hero::after, html.lx .btn-primary-large::after, html.lx .calculator-actions .btn-primary::after { animation: none !important; }
  html.lx h1 .lx-word, html.lx .lx-words .lx-word { opacity: 1 !important; filter: none !important; transform: none !important; animation: none !important; transition: none !important; }
  html.lx body.animations-ready .animate-on-scroll:not(.animated):not(.visible) { filter: none; }
  html.lx .benefit-card .benefit-icon-simple svg > * { stroke-dashoffset: 0; transition: none; }
  .lx-progress { display: none; }
}

/* ---------- Nov 28: cards carry their icon in the card (no tile), and phones get a shorter page ----------
   Owner, Nov 27: no "big card with a small icon card on it"; drop the "How much can I qualify for"
   calculator on phones. The icon sits on a soft glow, a large ghost of it rests in the corner
   (js/lx-site.js adds it for [data-ghost] cards), and it draws itself in as the card arrives. */
.funding-card-icon.lx-tile, .benefit-icon-simple.lx-tile, .result-icon.lx-tile { position: relative; width: 48px; height: 48px; border-radius: 0; background: none; box-shadow: none; place-items: start; }
.funding-card-icon.lx-tile::before, .benefit-icon-simple.lx-tile::before, .result-icon.lx-tile::before { content: ''; position: absolute; left: -36px; top: -36px; width: 120px; height: 120px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 108, 246, .22), transparent 66%); pointer-events: none; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.funding-card-icon.lx-tile .lx-ico, .benefit-icon-simple.lx-tile .lx-ico { width: 44px; height: 44px; }
.result-icon.lx-tile .lx-ico { width: 34px; height: 34px; }
.result-icon.lx-tile { place-items: center; margin-left: auto; margin-right: auto; }
.result-icon.lx-tile::before { left: -38px; top: -38px; }
.funding-card:hover .funding-card-icon.lx-tile::before, .benefit-card:hover .benefit-icon-simple.lx-tile::before { transform: scale(1.25); }
.why-choose-us .benefit-icon-simple.lx-tile { color: #d9ccff; box-shadow: none; margin-left: auto; margin-right: auto; place-items: center; }
.why-choose-us .benefit-icon-simple.lx-tile::before { left: -36px; background: radial-gradient(circle, rgba(196, 180, 255, .22), transparent 66%); }
[data-ghost] { position: relative; overflow: hidden; isolation: isolate; }
[data-ghost] > .lx-feat-ghost { position: absolute; right: -26px; bottom: -30px; z-index: -1; width: 150px; height: 150px; color: #8a6cf6; opacity: .09; pointer-events: none; transform: rotate(-12deg); transition: transform .8s cubic-bezier(.16, 1, .3, 1), opacity .5s ease; }
[data-ghost]:hover > .lx-feat-ghost { transform: rotate(-4deg) translate(-8px, -8px) scale(1.06); opacity: .15; }
.why-choose-us [data-ghost] > .lx-feat-ghost { color: #c4b4ff; opacity: .07; }

@media (max-width: 768px) {
  /* No calculator on phones (it stays on tablets and desktops). */
  html body section.fundability-calculator#calculator { display: none !important; }
  /* The funding options come back on phones as compact cards, so the page still shows what we fund. */
  html body section.funding-options-section { display: block !important; padding: 48px 0 8px !important; }
  html body .funding-options-section h2 { font-size: 1.55rem !important; text-align: left !important; margin: 0 0 18px !important; }
  html body .funding-options-section .funding-cards { display: grid !important; grid-template-columns: 1fr !important; gap: 12px !important; }
  html body .funding-options-section .funding-card { display: grid !important; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px; padding: 20px 18px !important; border-radius: 18px !important; }
  html body .funding-options-section .funding-card-icon.lx-tile { grid-row: span 2; width: 36px; height: 36px; margin: 2px 0 0 !important; }
  html body .funding-options-section .funding-card-icon.lx-tile .lx-ico { width: 34px; height: 34px; }
  html body .funding-options-section .funding-card h3 { margin: 0 0 4px !important; font-size: 1.08rem !important; }
  html body .funding-options-section .funding-card-desc { margin: 0 !important; font-size: .93rem !important; }
  html body .funding-options-section .funding-card-features { grid-column: 1 / -1; margin: 12px 0 0 !important; }
  html body .funding-options-section .funding-card-btn { grid-column: 1 / -1; justify-self: start; margin-top: 12px !important; min-height: 44px; }
  /* The phone bar already holds Apply now, and it sits clear of the photo now. */
  html.lx-site body .floating-apply-btn { display: none !important; }
  html.lx-site body .hero-visual { margin-top: 14px !important; }
}

/* Hero on the shared frame (css/lx-site.css "Hero"; owner, Nov 28, 2026: the text and buttons sit where they do on every
   other page). The words use the lx hero classes; the photo stays as the right column, and on phones it follows the words. */
.lx-home-hero .trust-row { margin-top: 22px; }
.lx-home-hero .hero-visual { min-height: 0; }
@media (max-width: 768px) {
  html.lx-site body .lx-home-hero .hero-visual { margin-top: 28px !important; padding: 0 !important; }
  .lx-home-hero .trust-row { align-items: flex-start; text-align: left; }
  .lx-home-hero .trust-logos { justify-content: flex-start; }
}
