/* ==========================================================================
   Quick Lender Capital LLC — Custom Design System
   Design language: "Capital Markets meets Permian Basin precision"
   See /notes/design-plan.md for full rationale.
   ========================================================================== */

:root {
  /* Palette */
  --color-ink: #0B1F2A;         /* primary dark bg */
  --color-ink-light: #14303F;   /* dark bg secondary layer */
  --color-off-white: #FAFAF7;   /* primary light bg */
  --color-brass: #B8873B;       /* signature accent */
  --color-brass-light: #D6AE6D;
  --color-green: #1F7A5C;       /* success / approved */
  --color-steel: #4A5A63;       /* secondary text / borders */
  --color-rule: #D8D2C4;        /* hairline dividers on light bg */
  --color-rule-dark: rgba(250, 250, 247, 0.12); /* hairline on dark bg */

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background-color: var(--color-off-white);
}

/* ---- Typography rule: ALL numerals render in mono (the signature system) ---- */
.font-display { font-family: var(--font-display); }
.font-mono, .data-figure, .rate-figure, .stat-figure {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "zero" 1;
}

/* ---- Focus states (accessibility floor) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Simple Text Marquee ---- */

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 25s linear infinite;
}

.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: inline-block;
}

.ticker-item::after {
  content: '•';
  color: var(--color-brass);
  margin: 0 1.75rem;
  opacity: 0.6;
}

/* ---- Scroll reveal ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Header shrink on scroll ---- */
#site-header {
  transition: box-shadow 0.3s var(--ease-out), padding 0.3s var(--ease-out);
}
#site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--color-rule), 0 8px 24px -12px rgba(11, 31, 42, 0.15);
}

/* ---- Card hover: 4px lift + brass border, no scale gimmicks ---- */
.term-card {
  transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.term-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-brass);
  box-shadow: 0 16px 32px -20px rgba(11, 31, 42, 0.35);
}

/* ---- Mega menu: opens on click via .is-open (JS-controlled), not hover ---- */
.mega-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), visibility 0.2s;
}
.mega-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
#business-loans-trigger[aria-expanded="true"] [data-mega-chevron] {
  transform: rotate(180deg);
}

/* ---- Mobile nav slide-in ---- */
#mobile-nav {
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
}
#mobile-nav.is-open {
  transform: translateX(0);
}

/* ---- Marquee / counters respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ---- Utility: hairline rule on dark backgrounds ---- */
.rule-dark { border-color: var(--color-rule-dark); }

/* ---- Sticky mobile apply bar (product pages) ---- */
#mobile-apply-bar {
  transform: translateY(100%);
  transition: transform 0.3s var(--ease-out);
}
#mobile-apply-bar.is-visible {
  transform: translateY(0);
}