/* ============================================================
   LONESTAR FINANCE GROUP — CUSTOMER-FACING FINANCING PORTAL
   Colors matched exactly to lonestarfinancegrp.com
   ============================================================ */

/* ── CSS Variables (exact Lonestar brand) ─────────────────── */
:root {
  --navy:          #0D1B2E;
  --navy-light:    #1a2d45;
  --navy-lighter:  #243d5e;
  --red:           #CC0000;
  --red-hover:     #a30000;
  --blue:          #4A90D9;
  --blue-hover:    #3478c0;
  --bg-white:      #FFFFFF;
  --bg-light:      #F8F9FB;
  --bg-lighter:    #F3F5F7;
  --bg-gray:       #E8EAED;
  --text-dark:     #1a1a1a;
  --text-gray:     #5a5a5a;
  --text-light:    #8a8a8a;
  --font-heading:  'Montserrat', sans-serif;
  --font-body:     'Open Sans', sans-serif;
  --shadow-sm:     0 2px 8px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 24px rgba(0,0,0,.12);
  --radius:        8px;
  --radius-lg:     12px;
  --transition:    0.3s ease;
  --max-width:     1200px;
  --header-height: 74px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--bg-white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: var(--red); transition: color var(--transition); }
a:hover { color: var(--red-hover); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 16px;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p  { margin-bottom: 16px; color: var(--text-gray); }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 80px 0; }
.section-alt { background: var(--bg-light); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 13px 30px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-navy {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn-navy:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: #fff;
}

.btn-lg { padding: 16px 40px; font-size: 17px; }
.btn-sm { padding: 9px 20px; font-size: 14px; }

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

/* Lonestar wordmark — no logo image */
.nav-brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
}
.nav-brand-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.01em;
  line-height: 1;
}
.nav-brand-sub {
  font-family: var(--font-heading);
  font-size: .65rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-brand:hover .nav-brand-name { color: var(--navy-light); }

.nav-phone-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: color var(--transition);
}
.nav-phone-link:hover { color: var(--red); }
.nav-phone-link svg { width: 18px; height: 18px; }

/* Mobile toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
}
.mobile-menu-toggle span {
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
  display: block;
}
.mobile-menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
  padding: 16px 24px 24px;
  border-top: 1px solid var(--bg-gray);
}
.mobile-menu.active { display: flex; }
.mobile-link {
  padding: 12px 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  border-bottom: 1px solid var(--bg-gray);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.mobile-link:hover { color: var(--red); }
.mobile-link svg { width: 16px; height: 16px; }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
  padding: 90px 0 80px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-gray);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}
.hero-phone-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition);
}
.hero-phone-cta:hover { color: var(--red); }
.hero-phone-cta svg { width: 22px; height: 22px; color: var(--red); }
.hero-phone-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: .25rem;
}

/* ── STEPS SECTION ───────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  margin-top: 20px;
}

.step-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border-top: 4px solid var(--navy);
  position: relative;
}
.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  color: var(--bg-gray);
  position: absolute;
  top: 16px;
  right: 20px;
  line-height: 1;
}

.step-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #fff;
  font-size: 1.5rem;
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--navy);
}
.step-card p {
  font-size: .93rem;
  line-height: 1.7;
  color: var(--text-gray);
  margin: 0;
}

/* ── WHAT TO HAVE READY ──────────────────────────────────── */
.checklist-wrap {
  max-width: 700px;
  margin: 0 auto;
}
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 2rem;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  font-size: .93rem;
  color: var(--text-dark);
  font-family: var(--font-body);
}
.checklist-item svg {
  width: 18px;
  height: 18px;
  color: var(--navy);
  flex-shrink: 0;
  margin-top: 1px;
}
.checklist-note {
  margin-top: 1.5rem;
  background: var(--bg-light);
  border-left: 4px solid var(--navy);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .88rem;
  color: var(--text-gray);
  line-height: 1.65;
}

/* ── DISCLAIMER ──────────────────────────────────────────── */
.disclaimer-box {
  background: var(--bg-light);
  border: 1px solid var(--bg-gray);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: .82rem;
  color: var(--text-light);
  line-height: 1.7;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

/* ── CONTACT / CTA STRIP ─────────────────────────────────── */
.cta-strip {
  background: var(--navy);
  padding: 60px 0;
  text-align: center;
}
.cta-strip h2 { color: #fff; margin-bottom: .75rem; }
.cta-strip p  { color: rgba(255,255,255,.72); margin-bottom: 2rem; font-size: 1.05rem; }
.cta-phone-big {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  transition: color var(--transition);
}
.cta-phone-big:hover { color: rgba(255,255,255,.82); }
.cta-phone-big svg { width: 28px; height: 28px; color: var(--red); }

/* ── SECTION HEADER ──────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 50px;
}
.section-header h2 { margin-bottom: 14px; }
.section-header p { font-size: 1.05rem; color: var(--text-gray); line-height: 1.8; margin: 0; }

.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .6rem;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.6);
  padding: 40px 0 24px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-brand-name {
  font-family: var(--font-heading);
  font-size: .9rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  letter-spacing: -.01em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  font-size: .82rem;
}
.footer-links a { color: rgba(255,255,255,.5); transition: color var(--transition); }
.footer-links a:hover { color: rgba(255,255,255,.9); }
.footer-disclaimer {
  font-size: .78rem;
  max-width: 700px;
  line-height: 1.65;
  color: rgba(255,255,255,.35);
  margin-top: 4px;
}
.footer-copy {
  font-size: .78rem;
  color: rgba(255,255,255,.3);
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 16px;
  margin-top: 8px;
  width: 100%;
  text-align: center;
}

/* ── DEALER PAGE (HIDDEN) ────────────────────────────────── */
.dealer-page { min-height: 100vh; background: var(--bg-light); }

.dealer-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 60px 0 50px;
  text-align: center;
}
.dealer-hero h1 { color: #fff; font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: .5rem; }
.dealer-hero p   { color: rgba(255,255,255,.72); max-width: 540px; margin: 0 auto 1.5rem; }

.dealer-hero-phone {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: rgba(255,255,255,.85);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: color var(--transition);
}
.dealer-hero-phone:hover { color: #fff; }
.dealer-hero-phone svg { width: 16px; height: 16px; }

.dealer-body { padding: 40px 0 60px; }

.dealer-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

/* Application embed wrapper */
.app-embed-wrap {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-gray);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.app-embed-top {
  padding: 18px 24px;
  border-bottom: 1px solid var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}

.app-embed-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .95rem;
  color: var(--navy);
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 600;
  color: #15803D;
  font-family: var(--font-heading);
}
.secure-badge svg { width: 14px; height: 14px; }

.app-notice {
  padding: 12px 24px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--bg-gray);
  font-size: .82rem;
  color: var(--text-light);
  line-height: 1.6;
}

.app-widget-container {
  padding: 24px;
  min-height: 500px;
  position: relative;
}

/* The mount div itself needs no min-height — the widget sets its own iframe height */
#transax-widget-mount {
  width: 100%;
}
#transax-widget-mount iframe {
  width: 100% !important;
  border: none !important;
  display: block;
}

/* Loader floats above the mount div as an absolute overlay while the iframe loads */
.widget-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-light);
  font-size: .9rem;
  /* overlay positioning */
  position: absolute;
  top: 0; left: 0; right: 0;
  min-height: 300px;
  background: #fff;
  z-index: 10;
  border-radius: 0 0 8px 8px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--bg-gray);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.app-consent {
  padding: 16px 24px;
  border-top: 1px solid var(--bg-gray);
  font-size: .79rem;
  color: var(--text-light);
  line-height: 1.65;
  background: var(--bg-light);
}
.app-consent a { color: var(--navy); font-weight: 600; }
.app-consent p + p { margin-top: .6rem; }

/* Sidebar */
.dealer-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-gray);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h4 {
  font-size: .85rem;
  font-family: var(--font-heading);
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg-gray);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sidebar-card p { font-size: .86rem; margin: 0; line-height: 1.65; }
.sidebar-card .btn { width: 100%; text-align: center; margin-top: 12px; }

.sidebar-checklist { display: flex; flex-direction: column; gap: 8px; }
.sidebar-check {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .86rem;
  color: var(--text-gray);
  line-height: 1.4;
}
.sidebar-check svg { width: 15px; height: 15px; color: var(--navy); flex-shrink: 0; margin-top: 1px; }

.dealer-disclaimer {
  font-size: .79rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-top: 4px;
}

/* ── 404 ─────────────────────────────────────────────────── */
.not-found {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-light);
}
.not-found-inner h1 { font-size: 6rem; color: var(--bg-gray); line-height: 1; }
.not-found-inner h2 { margin-bottom: .75rem; }
.not-found-inner p  { margin-bottom: 1.5rem; }
.not-found-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Animations ──────────────────────────────────────────── */
.animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.animate.in { opacity: 1; transform: none; }
.anim-delay-1 { transition-delay: .1s; }
.anim-delay-2 { transition-delay: .2s; }
.anim-delay-3 { transition-delay: .3s; }
.anim-delay-4 { transition-delay: .4s; }

/* ── Utilities ───────────────────────────────────────────── */
.text-center { text-align: center; }
.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; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .dealer-layout { grid-template-columns: 1fr; }
  .dealer-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .checklist-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .mobile-menu-toggle { display: flex; }
  .nav-phone-link { display: none; }
  .hero { padding: 60px 0 50px; }
  .section { padding: 56px 0; }
  .steps-grid { grid-template-columns: 1fr; gap: 18px; }
  .dealer-sidebar { grid-template-columns: 1fr; }
  .cta-phone-big { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .animate { opacity: 1 !important; transform: none !important; }
}

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
