/* ===================================================================
   Another Chance Bail Bonds: Design System
   =================================================================== */

:root {
  --navy-950: #0a1a2e;
  --navy-900: #0f2a4e;
  --navy-800: #17385f;
  --navy-700: #22497a;
  --navy-600: #3c5677;
  --gold-600: #a2822c;
  --gold-500: #ba9b37;
  --gold-400: #d4b85a;
  --gold-100: #f7f0dc;
  --ink: #1d1e20;
  --ink-soft: #4a4f57;
  --paper: #ffffff;
  --paper-soft: #f7f8fa;
  --paper-dim: #eceef1;
  --line: #e2e5ea;
  --success: #1e7d4c;

  --font-head: "Roboto", "Georgia", serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 10px rgba(15, 42, 78, 0.08);
  --shadow-md: 0 10px 30px rgba(15, 42, 78, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 42, 78, 0.18);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-sm: 0.35s;
  --dur-md: 0.6s;

  --header-h: 96px;
  --banner-h: 40px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--banner-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
}
p { margin: 0 0 1em; color: var(--ink-soft); line-height: 1.7; }
button { font-family: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .section-tight { padding: 44px 0; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 14px;
}

.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform var(--dur-sm) var(--ease), box-shadow var(--dur-sm) var(--ease), background var(--dur-sm) var(--ease), color var(--dur-sm) var(--ease), border-color var(--dur-sm) var(--ease);
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.35), transparent 60%);
  opacity: 0;
  transition: opacity var(--dur-sm) var(--ease);
  z-index: -1;
}
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-navy { background: var(--navy-900); color: #fff; box-shadow: var(--shadow-sm); }
.btn-navy:hover { background: var(--navy-800); box-shadow: var(--shadow-md); }

.btn-gold { background: var(--gold-500); color: #fff; box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--gold-600); box-shadow: 0 10px 30px rgba(186,155,55,0.35); }

.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

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

.btn-block { width: 100%; }
.btn-sm { padding: 11px 20px; font-size: 0.88rem; }

/* ---------- Top utility banner ---------- */
.top-banner {
  height: var(--banner-h);
  background: var(--gold-500);
  color: var(--navy-950);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 0 16px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 60;
}
.top-banner .pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--navy-950);
  animation: pulseDot 1.8s ease-in-out infinite;
  flex: none;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}
.top-banner a { text-decoration: underline; }

/* ---------- Header / Nav ---------- */
header.site-header {
  position: sticky;
  top: var(--banner-h);
  z-index: 55;
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur-sm) var(--ease);
}
header.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
header.site-header.scrolled { box-shadow: var(--shadow-sm); }

.nav-wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: height var(--dur-sm) var(--ease);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 56px; width: auto; transition: height var(--dur-sm) var(--ease); }
header.site-header.scrolled .nav-wrap { height: 74px; }
header.site-header.scrolled .brand img { height: 46px; }

nav.primary-nav ul { display: flex; gap: 4px; align-items: center; }
nav.primary-nav a:not(.btn) {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--navy-900);
  position: relative;
  transition: color var(--dur-sm) var(--ease), background var(--dur-sm) var(--ease);
}
nav.primary-nav a:not(.btn):hover { background: var(--paper-dim); }
nav.primary-nav a.active { color: var(--gold-600); }
nav.primary-nav a.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 2px;
  background: var(--gold-500);
  border-radius: 2px;
}

.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-call {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--navy-900);
  padding: 10px 14px;
  border-radius: 999px;
  transition: background var(--dur-sm) var(--ease);
}
.nav-call:hover { background: var(--paper-dim); }
.nav-call svg { flex: none; }

.menu-toggle {
  display: none;
  background: none; border: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  align-items: center; justify-content: center;
  position: relative;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  content: "";
  position: absolute;
  width: 22px; height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform var(--dur-sm) var(--ease), opacity var(--dur-sm) var(--ease), top var(--dur-sm) var(--ease);
}
.menu-toggle span { top: 50%; transform: translateY(-50%); }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-toggle.open span { background: transparent; }
.menu-toggle.open span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.open span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .brand span.brand-text { display: none; }
  nav.primary-nav {
    position: fixed;
    inset: calc(var(--banner-h) + 74px) 0 0 0;
    background: var(--paper);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-md) var(--ease), transform var(--dur-md) var(--ease), visibility var(--dur-md);
    overflow-y: auto;
  }
  nav.primary-nav.open { opacity: 1; transform: translateY(0); visibility: visible; }
  nav.primary-nav ul { flex-direction: column; align-items: stretch; padding: 20px; gap: 6px; }
  nav.primary-nav a:not(.btn) { display: block; padding: 16px 18px; font-size: 1.1rem; }
  .nav-cta.desktop-only { display: none; }
  .menu-toggle { display: inline-flex; }
  nav.primary-nav .mobile-cta { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 28px; margin-top: 10px; border-top: 1px solid var(--line); }
}
@media (min-width: 901px) {
  nav.primary-nav .mobile-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy-900);
  color: #fff;
  overflow: hidden;
  padding: 110px 0 120px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 15% 20%, rgba(186,155,55,0.28), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(60,86,119,0.55), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(15,42,78,0.9), transparent 60%);
  animation: heroDrift 18s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes heroDrift {
  0% { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.08); }
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { max-width: 760px; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 5.4vw, 3.8rem);
  margin-bottom: 0.4em;
}
.hero .lede { color: rgba(255,255,255,0.82); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

.hero-badges {
  display: flex; flex-wrap: wrap; gap: 28px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-badge { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.9); font-weight: 600; font-size: 0.92rem; }
.hero-badge svg { color: var(--gold-400); flex: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: transform var(--dur-sm) var(--ease), box-shadow var(--dur-sm) var(--ease), border-color var(--dur-sm) var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.card .icon-badge { margin-bottom: 18px; }
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { margin-bottom: 0; font-size: 0.96rem; }

.icon-badge {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-100);
  color: var(--gold-600);
  flex: none;
}

.grid {
  display: grid;
  gap: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; position: relative; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-left: 0; }
.step-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-400);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.step h3 { font-size: 1.15rem; }

/* ---------- Alt sections ---------- */
.section-alt { background: var(--paper-soft); }
.section-navy { background: var(--navy-900); color: #fff; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy p { color: rgba(255,255,255,0.78); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-800));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(186,155,55,0.35), transparent 70%);
  top: -120px; right: -80px;
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.78); margin-bottom: 0; }
.cta-band .cta-actions { display: flex; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.cta-band > div:first-child { position: relative; z-index: 1; }

/* ---------- Testimonials ---------- */
.quote-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px;
}
.quote-card .stars { color: var(--gold-500); letter-spacing: 2px; margin-bottom: 14px; }
.quote-card p.quote { color: var(--ink); font-style: italic; font-size: 1.02rem; }
.quote-who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.quote-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy-900); color: var(--gold-400);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--font-head);
}
.quote-name { font-weight: 700; color: var(--navy-900); font-size: 0.92rem; }
.quote-loc { font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 700; font-size: 0.88rem; color: var(--navy-900); margin-bottom: 8px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-family: inherit;
  font-size: 0.98rem;
  background: var(--paper);
  transition: border-color var(--dur-sm) var(--ease), box-shadow var(--dur-sm) var(--ease);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(186,155,55,0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 10px; }
.form-success {
  display: none;
  background: rgba(30,125,76,0.1);
  border: 1px solid rgba(30,125,76,0.3);
  color: var(--success);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-top: 16px;
}
.form-success.show { display: block; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.7);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 18px; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--gold-400); }
.footer-brand img { height: 48px; margin-bottom: 16px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > * { }
[data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-stagger].is-visible > * { opacity: 1; transform: translateY(0); }
[data-stagger].is-visible > *:nth-child(1) { transition-delay: 0.05s; }
[data-stagger].is-visible > *:nth-child(2) { transition-delay: 0.15s; }
[data-stagger].is-visible > *:nth-child(3) { transition-delay: 0.25s; }
[data-stagger].is-visible > *:nth-child(4) { transition-delay: 0.35s; }
[data-stagger].is-visible > *:nth-child(5) { transition-delay: 0.45s; }
[data-stagger].is-visible > *:nth-child(6) { transition-delay: 0.55s; }

/* ---------- Sticky mobile call bar ---------- */
.mobile-call-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 70;
  background: var(--navy-900);
  padding: 12px 16px;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.2);
  gap: 10px;
}
@media (max-width: 720px) {
  .mobile-call-bar { display: flex; }
  body { padding-bottom: 72px; }
}
.mobile-call-bar .btn { flex: 1; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--navy-900);
  color: #fff;
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(186,155,55,0.25), transparent 55%);
}
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.8); max-width: 600px; font-size: 1.05rem; margin-bottom: 0; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--gold-400); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-12 { gap: 12px; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-100); color: var(--gold-600);
  padding: 8px 16px; border-radius: 999px;
  font-weight: 700; font-size: 0.82rem;
}
