/* =========================================================
   Billie Loans — shared chrome styles
   Loaded by every page. Page-specific styles live inline.
   Audit fixes applied here:
     - hamburger touch target ≥48×48 (was ~22×8 visual)
     - dropdown hover-bridge (no more lost-hover gap)
     - dropdown .open state for click-toggle support
     - accordion / drawer / dropdown all share aria-expanded handling via shared.js
   ========================================================= */

:root {
  --purple:   #8635f7;
  --purple-d: #6a1fd4;
  --orange:   #f25f07;
  --gold:     #f5cc32;
  --dark:     #1A1A1A;
  --pale:     #EDD9FE;
  --light:    #E8D5FE;
  --bg:       #F8F7FC;
  --grey:     #5A5A5A;
  --radius:   28px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  background: var(--bg);
  color: var(--dark);
  font-family: 'Alata', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: .5px;
  line-height: .95;
}

/* ─── OVERLAY ─────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.overlay.open { opacity: 1; pointer-events: all; }

/* ─── DRAWER ──────────────────────────────────────────── */
.drawer {
  position: fixed; top: 0; right: 0; left: auto;
  width: 300px; max-width: 85vw; height: 100%;
  background: var(--dark); color: #fff;
  z-index: 200;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.drawer-logo { display: flex; align-items: center; }
.drawer-logo img { height: 44px; width: auto; display: block; }

#drawer-close {
  background: none; border: none;
  color: rgba(255,255,255,.55);
  font-size: 30px; line-height: 1;
  cursor: pointer; padding: 8px 12px;
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s;
}
#drawer-close:hover { color: #fff; }

.drawer-nav { flex: 1; padding: 8px 0; }
.drawer-nav > li { border-bottom: 1px solid rgba(255,255,255,.06); }

.drawer-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; width: 100%;
  font-family: 'Alata', sans-serif; font-size: 16px;
  color: rgba(255,255,255,.88); background: none; border: none;
  cursor: pointer; text-align: left;
  transition: color .2s;
  text-decoration: none;
}
.drawer-link:hover { color: var(--gold); }

.chevron {
  font-size: 18px; color: rgba(255,255,255,.35);
  transition: transform .25s ease; display: inline-block;
}
.accordion-item.open .chevron { transform: rotate(90deg); }

.accordion-content {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
  background: rgba(255,255,255,.03);
}
.accordion-item.open .accordion-content { max-height: 500px; }
.accordion-content li { border-top: 1px solid rgba(255,255,255,.04); }

.drawer-sublink {
  display: block; padding: 12px 22px 12px 42px;
  font-size: 14px; color: rgba(255,255,255,.6);
  transition: color .2s;
  text-decoration: none;
}
.drawer-sublink:hover { color: var(--gold); }

.drawer-footer {
  padding: 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.drawer-cta {
  display: block; text-align: center;
  background: var(--purple); color: #fff;
  padding: 15px 24px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  transition: background .2s;
  text-decoration: none;
}
.drawer-cta:hover { background: var(--purple-d); color: #fff; }

/* ─── HEADER ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0;
  background: rgba(248,247,252,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.header-inner {
  max-width: 1320px; margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center;
}

/* HAMBURGER — touch target now 48×48 (audit fix) */
#hamburger {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 12px;
  min-width: 48px; min-height: 48px;
  order: 2; margin-left: auto;
  -webkit-tap-highlight-color: transparent;
}
#hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--dark); border-radius: 2px;
}

.site-logo { display: flex; align-items: center; order: 1; text-decoration: none; color: var(--dark); }
.site-logo img { height: 44px; width: auto; display: block; }

/* DESKTOP NAV */
.desktop-nav {
  display: none;
  align-items: center; gap: 28px;
  font-size: 15px; order: 3;
}
.desktop-nav a { color: var(--grey); transition: color .2s; text-decoration: none; }
.desktop-nav a:hover { color: var(--dark); }
.desktop-nav .d-cta {
  background: var(--purple); color: #fff !important;
  padding: 10px 20px; border-radius: 999px; font-weight: 700;
  transition: background .2s;
}
.desktop-nav .d-cta:hover { background: var(--purple-d); }

/* ─── DESKTOP DROPDOWNS ──────────────────────────────────
   Three-way activation: hover, focus-within, .open (click-toggled by shared.js).
   Hover bridge (.d-drop-panel::before) eliminates the lost-hover gap.
   ──────────────────────────────────────────────────────── */
.d-dropdown { position: relative; }

.d-drop-btn {
  background: none; border: none; cursor: pointer;
  color: var(--grey);
  font-family: 'Alata', sans-serif; font-size: 15px;
  padding: 8px 4px;
  display: flex; align-items: center; gap: 3px;
  transition: color .2s;
}
.d-drop-btn::after { content: '▾'; font-size: 11px; opacity: .55; }
.d-drop-btn:hover { color: var(--dark); }

.d-drop-panel {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fff; border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.13), 0 0 0 1px rgba(0,0,0,.05);
  padding: 6px; min-width: 210px;
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity .18s, transform .18s;
  z-index: 60;
}
/* Invisible bridge that keeps :hover state alive while cursor crosses the gap. */
.d-drop-panel::before {
  content: ''; position: absolute;
  top: -12px; left: 0; right: 0; height: 12px;
}
.d-dropdown:hover .d-drop-panel,
.d-dropdown:focus-within .d-drop-panel,
.d-dropdown.open .d-drop-panel {
  opacity: 1; pointer-events: all; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.d-drop-panel a {
  display: block; padding: 9px 14px; border-radius: 10px;
  font-size: 13px; color: var(--dark);
  transition: background .15s;
  text-decoration: none;
}
.d-drop-panel a:hover { background: var(--bg); color: var(--purple); }

@media (min-width: 900px) {
  #hamburger { display: none; }
  .site-logo { order: 1; margin-left: 0; margin-right: auto; }
  .desktop-nav { display: flex; }
}

/* ─── COMMON BUTTONS ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  border: none; width: fit-content;
  text-decoration: none;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-white  { background: #fff;          color: var(--purple); }
.btn-purple { background: var(--purple); color: #fff; }
.btn-gold   { background: var(--gold);   color: var(--dark); }
.btn-dark   { background: var(--dark);   color: #fff; }
.btn-full   { width: 100%; }

/* ─── FOOTER ──────────────────────────────────────────── */
footer {
  text-align: center; padding: 36px 20px;
  color: var(--grey); font-size: 13px; line-height: 1.75;
  border-top: 1px solid rgba(0,0,0,.06);
  max-width: 680px; margin: 0 auto;
}
