/* =============================================================================
   Bevy Technologies LLC — gov.bevy.tech
   Single stylesheet. No build step, no external fonts, no external requests.
   Palette: deep navy / slate / white cards. All text pairs meet WCAG 2.1 AA.
   ========================================================================== */

/* ----------------------------- Design tokens ----------------------------- */
:root {
  --navy-900: #071a2f;
  --navy-800: #0c2540;
  --navy-700: #133961;

  --accent:      #0b5cad;   /* 6.6:1 on white */
  --accent-dark: #084785;
  --accent-soft: #e8f1fb;
  --accent-onDark: #9ecbf5; /* 8.1:1 on --navy-900 */

  --ink:       #0f172a;
  --ink-muted: #475569;     /* 7.5:1 on white */
  --onDark:       #f1f5f9;
  --onDark-muted: #c3d3e3;  /* 10.4:1 on --navy-900 */

  --surface:  #ffffff;
  --surface-2:#f4f7fb;
  --line:       #dbe4ee;    /* decorative separators */
  --line-strong:#7d90a6;    /* 3.3:1 on white — borders of interactive controls */
  --line-dark:  rgba(255, 255, 255, .18);
  --line-dark-strong: rgba(255, 255, 255, .45);  /* 4.0:1 on --navy-900 */

  /* Dual-tone focus ring: the dark outline carries contrast on light surfaces,
     the amber halo carries it on the navy ones. Meets 1.4.11 on both. */
  --focus:      #ffb703;
  --focus-edge: #0a0a0a;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(7, 26, 47, .06), 0 8px 24px rgba(7, 26, 47, .07);
  --shell: 1140px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

/* High-contrast mode: darker inks, solid borders, no tinted surfaces. */
[data-contrast="high"] {
  --navy-900: #000000;
  --navy-800: #000000;
  --navy-700: #000000;

  --accent:      #00408a;
  --accent-dark: #002d61;
  --accent-soft: #ffffff;
  --accent-onDark: #ffe680;

  --ink:       #000000;
  --ink-muted: #1a1a1a;
  --onDark:       #ffffff;
  --onDark-muted: #ffffff;

  --surface:  #ffffff;
  --surface-2:#ffffff;
  --line:       #000000;
  --line-strong:#000000;
  --line-dark:  #ffffff;
  --line-dark-strong: #ffffff;

  --shadow: none;
}

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

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.22; margin: 0; letter-spacing: -.015em; }
p  { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
address { font-style: normal; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------- Focus & skip link --------------------------- */
:focus-visible {
  outline: 3px solid var(--focus-edge);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus);
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
  border: 2px solid var(--accent);
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------- Layout ---------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 68px 0; }
.section--tint { background: var(--surface-2); border-block: 1px solid var(--line); }
.section--contact { background: var(--navy-800); color: var(--onDark); }

/* Sticky header offset for in-page anchors. */
[id] { scroll-margin-top: 84px; }

.section__head { max-width: 62ch; margin-bottom: 34px; }
.section__head h2 {
  font-size: clamp(1.6rem, 1.15rem + 1.8vw, 2.15rem);
  margin-bottom: 12px;
}
.section__lede { color: var(--ink-muted); font-size: 1.02rem; }
.section__lede--onDark { color: var(--onDark-muted); }

.eyebrow {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.eyebrow--onDark { color: var(--accent-onDark); }

.mono {
  font-family: var(--mono);
  font-size: .94em;
  letter-spacing: .02em;
}
.muted { color: var(--ink-muted); }
.nowrap { white-space: nowrap; }   /* keeps phone numbers from breaking mid-number */
.muted-onDark { color: var(--onDark-muted); }

/* ------------------------------- Header ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  padding: 6px 0;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--navy-800);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  flex-shrink: 0;
}
[data-contrast="high"] .brand__mark { border: 2px solid #000; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name { font-weight: 700; font-size: .98rem; }
.brand__unit {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--accent);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.primary-nav__list a {
  display: inline-block;
  padding: 8px 2px;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.primary-nav__list a:hover,
.primary-nav__list a[aria-current="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contrast-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  font: inherit;
  font-size: .85rem;
  font-weight: 650;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
}
.contrast-toggle svg { width: 17px; height: 17px; }
.contrast-toggle:hover { border-color: var(--accent); color: var(--accent); }
.contrast-toggle[aria-pressed="true"] {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  font: inherit;
  font-size: .9rem;
  font-weight: 650;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle__icon { width: 20px; height: 20px; }

/* --------------------------------- Hero ---------------------------------- */
.hero {
  background:
    radial-gradient(900px 420px at 82% -8%, rgba(11, 92, 173, .40), transparent 62%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 58%, var(--navy-700) 100%);
  color: var(--onDark);
  border-bottom: 1px solid var(--navy-900);
}
[data-contrast="high"] .hero { background: #000; }

/* Same left edge as every other section; the copy is narrowed per element. */
.hero__inner { padding-block: 76px 66px; }
.hero h1 {
  font-size: clamp(1.85rem, 1.1rem + 3.1vw, 3rem);
  max-width: 20ch;   /* keeps "HIPAA-Aligned" from splitting across lines */
  margin-bottom: 20px;
  text-wrap: balance;
}
.hero__sub {
  font-size: clamp(1.02rem, .96rem + .4vw, 1.2rem);
  color: var(--onDark-muted);
  max-width: 66ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* -------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  font: inherit;
  font-size: .96rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 19px; height: 19px; flex-shrink: 0; }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}
[data-contrast="high"] .btn--primary { background: #000; border-color: #fff; color: #fff; }

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
[data-contrast="high"] .btn--ghost { border-color: #fff; }

/* -------------------------- Federal identifiers -------------------------- */
.idbar {
  background: var(--navy-900);
  color: var(--onDark);
  border-bottom: 3px solid var(--accent);
  padding: 18px 0;
}
[data-contrast="high"] .idbar { background: #000; border-bottom-color: #fff; }

.idbar__list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 44px;
  margin: 0;
}
.idbar__item { display: flex; flex-direction: column; gap: 2px; }
.idbar__item dt {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--onDark-muted);
}
.idbar__item dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.06rem;
  font-weight: 700;
  color: #fff;
}

.copy {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  padding: 0;
  color: var(--onDark-muted);
  background: transparent;
  border: 1px solid var(--line-dark-strong);
  border-radius: 6px;
  cursor: pointer;
}
.copy svg { width: 15px; height: 15px; }
.copy:hover { color: #fff; border-color: #fff; }

/* --------------------------- Capability cards ---------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  border-top: 3px solid var(--accent);
}
.card__icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
[data-contrast="high"] .card__icon { border: 2px solid #000; }
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.09rem; margin-bottom: 9px; }
.card p { color: var(--ink-muted); font-size: .97rem; }

/* --------------------------- Differentiators ----------------------------- */
.diffs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px 40px;
}
@media (min-width: 760px) {
  /* Two columns keeps the four differentiators as a balanced 2x2 block. */
  .diffs { grid-template-columns: 1fr 1fr; }
}
.diff {
  padding-left: 18px;
  border-left: 3px solid var(--accent);
}
.diff h3 { font-size: 1.06rem; margin-bottom: 7px; }
.diff p { color: var(--ink-muted); font-size: .97rem; }

/* ------------------------------- Tables ---------------------------------- */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.panel__title {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 6px;
}
.panel__title--spaced { margin-top: 32px; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.table th, .table td {
  text-align: left;
  vertical-align: top;
  padding: 11px 10px 11px 0;
  border-bottom: 1px solid var(--line);
}
.table tbody tr:last-child th,
.table tbody tr:last-child td { border-bottom: 0; }
.table thead th {
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 2px solid var(--line);
}
/* WCAG 2.2 target size (2.5.8): inline links in these cells are only ~17px of
   text, so pad them out to a >=24px tall hit target. */
.table--kv td a {
  display: inline-block;
  padding-block: 4px;
}

.table--kv th[scope="row"] {
  width: 44%;
  font-weight: 650;
  color: var(--ink-muted);
  padding-right: 16px;
}
.table--kv td { font-weight: 600; }
.table tbody th[scope="row"].mono { font-weight: 700; white-space: nowrap; padding-right: 16px; }

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  vertical-align: 2px;
}

/* ------------------------ Conformance / validation ----------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat__value {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: .96rem; font-weight: 700; margin-top: 6px; }
.stat__note  { font-size: .82rem; color: var(--ink-muted); }

.stats__footnote {
  font-size: .88rem;
  color: var(--ink-muted);
  max-width: 78ch;
  margin-bottom: 14px;
}
.stats__footnote--disclosure {
  border-left: 3px solid var(--line-strong);
  padding-left: 14px;
  margin-bottom: 32px;
}

.data-grid--conformance { align-items: stretch; }
.panel__intro { font-size: .92rem; color: var(--ink-muted); margin: 12px 0 4px; }

.verify { display: grid; gap: 10px; margin-top: 14px; }
.verify a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 12px;
  min-height: 48px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
}
.verify a:hover { border-color: var(--accent); background: var(--accent-soft); }
[data-contrast="high"] .verify a:hover { background: #fff; border-width: 2px; }
.verify__name { font-weight: 700; font-size: .95rem; color: var(--accent); }
.verify__desc { grid-column: 1; font-size: .84rem; color: var(--ink-muted); }
.verify__icon {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 18px; height: 18px;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.verify a:hover .verify__icon { color: var(--accent); }

/* --------------------------- Past performance ---------------------------- */
.perf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.perf__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
}
.perf__meta {
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.perf__item h3 { font-size: 1.08rem; margin-bottom: 9px; }
.perf__item p:last-child { color: var(--ink-muted); font-size: .97rem; }

/* -------------------------------- Contact -------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.contact-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 26px 24px;
}
[data-contrast="high"] .contact-card { background: #000; border-width: 2px; }
.contact-card h3 {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-onDark);
  margin-bottom: 12px;
}
.contact-card__name { font-size: 1.3rem; font-weight: 700; }
.contact-card a { color: #fff; }
.contact-card a:hover { color: var(--accent-onDark); }

.contact-list { margin-top: 18px; display: grid; gap: 12px; }
.contact-list li { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.contact-list__label {
  flex: 0 0 74px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--onDark-muted);
  padding-top: 4px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 22px;
}

/* -------------------------------- Footer --------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: var(--onDark);
  padding: 52px 0 28px;
}
[data-contrast="high"] .site-footer { background: #000; border-top: 2px solid #fff; }

.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 32px;
}
.site-footer__brand { font-size: 1.2rem; font-weight: 800; }
.site-footer__ids { margin-top: 14px; color: var(--onDark-muted); font-size: .9rem; }
.site-footer__col h3 {
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-onDark);
  margin-bottom: 12px;
}
.site-footer__col p { color: var(--onDark-muted); font-size: .94rem; margin-bottom: 4px; }
.site-footer a { color: var(--onDark); }
.site-footer a:hover { color: var(--accent-onDark); }
.site-footer address { color: var(--onDark-muted); font-size: .94rem; }

.site-footer__legal {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  font-size: .86rem;
  color: var(--onDark-muted);
}

/* ------------------------------ Breakpoints ------------------------------ */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .primary-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 16px;
    border-top: 1px solid var(--line);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav__list a {
    display: block;              /* full-width rows so the rules line up */
    padding: 13px 4px;
    border-bottom: 1px solid var(--line);
  }
  .primary-nav__list a:hover,
  .primary-nav__list a[aria-current="true"] { border-bottom-color: var(--line); }
  .contrast-toggle { align-self: flex-start; margin-top: 14px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  .shell { padding: 0 16px; }
  .site-header__inner { gap: 12px; }
  .brand { gap: 10px; }
  .brand__mark { width: 34px; height: 34px; font-size: 1.05rem; }
  .brand__name { font-size: .88rem; }
  .brand__unit { font-size: .66rem; }

  .section { padding: 52px 0; }
  .hero__inner { padding-block: 54px 46px; }
  .hero__actions .btn { width: 100%; }
  .idbar__list { gap: 14px 28px; }
  /* Reclaim width for the value column. Deliberately NOT `display: block` on
     the cells - that strips table semantics out of the accessibility tree. */
  .panel { padding: 20px 16px; }
  .table { font-size: .9rem; }
  .table--kv th[scope="row"] { width: 38%; padding-right: 12px; }
  .verify a { padding: 12px 14px; }
}

/* --------------------------------- Print --------------------------------- */
/* Printing the page yields a clean, self-contained capability sheet. */
@media print {
  .site-header,
  .nav-toggle,
  .contrast-toggle,
  .skip-link,
  .hero__actions,
  .contact-actions,
  .copy { display: none !important; }

  body { font-size: 10.5pt; line-height: 1.4; color: #000; background: #fff; }

  /* The four navy blocks invert wholesale; anything nested in them inherits
     black-on-white so no light-on-dark text disappears into the paper. */
  .hero, .hero *,
  .idbar, .idbar *,
  .section--contact, .section--contact *,
  .site-footer, .site-footer * {
    color: #000 !important;
    background: transparent !important;
    border-color: #000 !important;
  }
  .hero,
  .idbar,
  .section--contact,
  .site-footer { background: #fff !important; }

  .hero h1 { font-size: 20pt; max-width: none; }
  .hero__inner { padding-block: 0 12pt; }

  .idbar { border-bottom: 2pt solid #000; }
  .contact-card { border: 1pt solid #000; background: #fff !important; }

  .section { padding: 14pt 0; }
  .section--tint { background: #fff; }

  .stat, .verify a { border: 1pt solid #999; break-inside: avoid; }
  .stats { display: block; }
  .stats > li { margin-bottom: 6pt; }

  .card, .perf__item, .panel {
    box-shadow: none;
    border: 1pt solid #999;
    padding: 10pt;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .cards, .diffs, .perf, .data-grid, .contact-grid, .site-footer__inner {
    display: block;
  }
  .cards > li, .diffs > li, .perf > li { margin-bottom: 8pt; }

  a { color: #000; text-decoration: none; }
  h2 { break-after: avoid; page-break-after: avoid; }
}
