/* ==========================================================================
   USBCA — United States Broker-Carrier Advocates
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme
   -------------------------------------------------------------------------- */

:root {
  /* Brand palette — sampled from the USBCA logo */
  --usbca-navy:        #0f1032;
  --usbca-navy-700:    #1b1d52;
  --usbca-navy-900:    #08091d;
  --usbca-red:         #c8313a;
  --usbca-red-700:     #a5252d;
  --usbca-blue:        #3a578d;

  --usbca-white:       #ffffff;
  --usbca-ink:         #1a1a24;
  --usbca-muted:       #5c5f70;
  --usbca-line:        #dcdee6;
  --usbca-surface:     #f4f5f8;

  --usbca-foot-text:   #b9bcd0;
  --usbca-foot-line:   rgba(255, 255, 255, 0.14);

  /* Type */
  --usbca-font-body:    'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --usbca-font-display: 'Oswald', 'Open Sans', 'Segoe UI', Arial, sans-serif;

  /* Layout */
  --usbca-maxw:        1200px;
  --usbca-gutter:      24px;

  --usbca-radius:      4px;
  --usbca-shadow:      0 2px 10px rgba(15, 16, 50, 0.16);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--usbca-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--usbca-ink);
  background: var(--usbca-white);
  /* Sticky footer: chrome top and bottom, content stretches between */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; }

a { color: var(--usbca-blue); }

/* Override Boxicons */
[class^="bx"], [class*=" bx"], .bx {
  line-height: 0;
}

/* A single, consistent focus ring everywhere — including on dark grounds */
:focus-visible {
  outline: 3px solid var(--usbca-red);
  outline-offset: 2px;
  border-radius: 2px;
}
.usbca-header :focus-visible,
.usbca-footer :focus-visible {
  outline-color: #ffd34d;
}

.usbca-shell {
  width: 100%;
  max-width: var(--usbca-maxw);
  margin-inline: auto;
  padding-inline: var(--usbca-gutter);
}

/* Visually hidden, still read by screen readers */
.usbca-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.usbca-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--usbca-red);
  color: var(--usbca-white);
  font-family: var(--usbca-font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.usbca-skip-link:focus {
  left: 8px;
  top: 8px;
}

/* --------------------------------------------------------------------------
   3. Header — utility strip
   -------------------------------------------------------------------------- */

.usbca-header {
  background: var(--usbca-navy);
  color: var(--usbca-white);
}

.usbca-utility {
  background: var(--usbca-navy-900);
  font-size: 13.5px;
  line-height: 1.4;
}

.usbca-utility .usbca-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 24px;
  min-height: 40px;
  padding-block: 8px;
}

.usbca-utility a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--usbca-foot-text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.usbca-utility a:hover { color: var(--usbca-white); }

.usbca-utility svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: currentColor;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   4. Header — brand band
   -------------------------------------------------------------------------- */

.usbca-masthead .usbca-shell {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 22px;
}

.usbca-logo {
  display: block;
}

.usbca-logo img {
  width: 208px;
}

.usbca-tagline {
  margin: 0;
  font-family: var(--usbca-font-display);
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.375rem);
  line-height: 1.35;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d8dae8;
}
.usbca-tagline strong {
  display: block;
  font-weight: 500;
  color: var(--usbca-white);
}

.usbca-masthead-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.usbca-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border: 2px solid transparent;
  border-radius: var(--usbca-radius);
  font-family: var(--usbca-font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.usbca-btn--primary {
  background: var(--usbca-red);
  border-color: var(--usbca-red);
  color: var(--usbca-white);
}
.usbca-btn--primary:hover {
  background: var(--usbca-red-700);
  border-color: var(--usbca-red-700);
}

.usbca-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--usbca-white);
}
.usbca-btn--ghost:hover {
  background: var(--usbca-white);
  border-color: var(--usbca-white);
  color: var(--usbca-navy);
}

/* --------------------------------------------------------------------------
   6. Header — navigation
   -------------------------------------------------------------------------- */

.usbca-navbar { background: var(--usbca-red); }

.usbca-navbar .usbca-shell {
  display: flex;
  align-items: stretch;
}

.usbca-nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.usbca-nav-list a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 15px 20px;
  font-family: var(--usbca-font-display);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--usbca-white);
  text-decoration: none;
  border-bottom: 4px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.usbca-nav-list a:hover { background: var(--usbca-red-700); }

/* Current page — marked with aria-current in the markup, styled off it here
   so the visual state can never drift from the announced state */
.usbca-nav-list a[aria-current='page'] {
  background: var(--usbca-red-700);
  border-bottom-color: var(--usbca-white);
  font-weight: 500;
}

/* Mobile menu trigger — hidden until the breakpoint */
.usbca-nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  background: transparent;
  color: var(--usbca-white);
  font-family: var(--usbca-font-display);
  font-size: 0.9375rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
}

.usbca-nav-toggle-bars {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  flex: none;
  background: currentColor;
}
.usbca-nav-toggle-bars::before,
.usbca-nav-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease;
}
.usbca-nav-toggle-bars::before { top: -7px; }
.usbca-nav-toggle-bars::after  { top: 7px; }

.usbca-nav-toggle[aria-expanded='true'] .usbca-nav-toggle-bars {
  background: transparent;
}
.usbca-nav-toggle[aria-expanded='true'] .usbca-nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}
.usbca-nav-toggle[aria-expanded='true'] .usbca-nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   7. Main / content placeholder
   -------------------------------------------------------------------------- */

.usbca-main {
  flex: 1 0 auto;   /* pushes the footer down on short pages */
  width: 100%;
  padding-block: 40px 64px;
  /* Column chain so a stretchy child (like the placeholder) can fill the
     leftover height instead of leaving a gap above the footer */
  display: flex;
  flex-direction: column;
}
.usbca-main > .usbca-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Temporary stand-in for the VoterVoice widget. Delete this block (and its
   rules here) once the real embed is dropped into .usbca-main. */
.usbca-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 620px;
  padding: 56px 24px;
  text-align: center;
  border: 2px dashed var(--usbca-line);
  border-radius: 6px;
  background: var(--usbca-surface);
}

.usbca-placeholder-eyebrow {
  font-family: var(--usbca-font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--usbca-red);
}

.usbca-placeholder h1 {
  margin: 0;
  font-family: var(--usbca-font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--usbca-navy);
}

.usbca-placeholder p {
  max-width: 46ch;
  margin: 0;
  color: var(--usbca-muted);
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */

.usbca-footer {
  flex: none;
  background: var(--usbca-navy);
  color: var(--usbca-foot-text);
  font-size: 0.9375rem;
}

.usbca-footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-block: 56px 44px;
}

.usbca-footer h2 {
  margin: 0 0 18px;
  font-family: var(--usbca-font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--usbca-white);
}

.usbca-footer a {
  color: var(--usbca-foot-text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.usbca-footer a:hover {
  color: var(--usbca-white);
}

.usbca-footer-logo {
  display: block;
  width: 172px;
  height: 116px;
}

.usbca-footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.usbca-footer-list li + li { margin-top: 10px; }

/* Address block — <address> defaults to italic */
.usbca-footer address {
  margin: 0;
  font-style: normal;
  line-height: 1.75;
}
.usbca-footer address a { display: inline-block; }

.usbca-social {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.usbca-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--usbca-foot-line);
  border-radius: var(--usbca-radius);
  color: var(--usbca-white);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.usbca-social a:hover {
  background: var(--usbca-red);
  border-color: var(--usbca-red);
}
.usbca-social i.bxl {
  font-size: 18px;
}

.usbca-footer-bottom {
  border-top: 1px solid var(--usbca-foot-line);
}
.usbca-footer-bottom .usbca-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding-block: 22px;
  font-size: 0.875rem;
}
.usbca-footer-bottom .usbca-shell a { text-decoration: underline; }

.usbca-footer-bottom p { margin: 0; }

.usbca-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --------------------------------------------------------------------------
   9. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .usbca-footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 860px) {
  .usbca-masthead .usbca-shell {
    flex-wrap: wrap;
    gap: 16px;
    padding-block: 18px;
  }
  .usbca-tagline { order: 2; flex-basis: 100%; }
  .usbca-masthead-actions { order: 3; margin-left: auto; }

  /* Collapse the nav behind the toggle */
  .usbca-navbar .usbca-shell { display: block; }

  .usbca-nav-toggle { display: flex; }

  .usbca-nav-list {
    display: none;
    flex-direction: column;
    padding-bottom: 8px;
  }
  .usbca-nav-list.is-open { display: flex; }

  .usbca-nav-list a {
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }
  .usbca-nav-list a:hover { background: transparent; }
  .usbca-nav-list a[aria-current='page'] {
    background: transparent;
    border-bottom-color: var(--usbca-white);
  }
}

@media (max-width: 560px) {
  :root { --usbca-gutter: 18px; }

  .usbca-utility .usbca-shell { justify-content: center; }

  .usbca-logo { width: 168px; height: 113px; }

  .usbca-masthead-actions { flex-basis: 100%; margin-left: 0; }
  .usbca-masthead-actions .usbca-btn { flex: 1; }

  .usbca-footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 40px 32px;
  }

  .usbca-footer-bottom .usbca-shell { justify-content: center; text-align: center; }

  .usbca-placeholder { min-height: 460px; }
}

@media (max-width: 356px) {
  .usbca-masthead-actions { flex-direction: column; align-items: stretch; }
}

/* --------------------------------------------------------------------------
   10. Preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  .usbca-utility,
  .usbca-navbar,
  .usbca-masthead-actions,
  .usbca-social { display: none; }

  .usbca-header,
  .usbca-footer {
    background: none;
    color: #000;
  }
  .usbca-footer a { color: #000; }
}
