/* Billrova — site styles
   Palette: navy #0F2A4A, teal #20C997, white, soft grey #f6f8fb
   Type: Fraunces (headings), Inter (text). Both self-hosted, open licence. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0F2A4A;
  --navy-soft: #16375E;
  --teal: #20C997;
  --teal-ink: #0A7B5E;      /* teal dark enough for text on white */
  --paper: #f6f8fb;
  --line: #D9E1EA;
  --ink: #12263F;
  --slate: #475A70;
  --mist: #C9D6E5;          /* body text on navy */
  --focus: #0F2A4A;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
}
h1, h2 { text-wrap: balance; }
h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.35; }

a { color: var(--teal-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  border-radius: 6px;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--primary { background: var(--teal); color: var(--navy); }
.btn--primary:hover { background: #45DBB0; }
.btn--ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn--ghost:hover { border-color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-soft); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 0.92rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Header ---------- */

.site-header {
  --focus: var(--teal);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand svg { width: 34px; height: 34px; }

.site-nav ul { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  color: #DCE6F2;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: #fff; text-decoration: underline; }

.nav-toggle {
  display: none;
  min-height: 40px;
  padding: 8px 14px;
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 919px) {
  .site-nav { width: 100%; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 0 20px; }
  .site-nav a:not(.btn) { display: block; padding: 10px 0; font-size: 1.05rem; }
  .site-nav .btn { margin-top: 10px; }
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
}

/* ---------- Hero ---------- */

.hero {
  --focus: var(--teal);
  background-color: var(--navy);
  /* faint ledger ruling */
  background-image: repeating-linear-gradient(to bottom, transparent 0 47px, rgba(255, 255, 255, 0.035) 47px 48px);
  color: #fff;
  padding-block: clamp(56px, 9vw, 112px) clamp(64px, 10vw, 128px);
}
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; }
}
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.25rem);
  line-height: 1.04;
  max-width: 12em;
}
.lede {
  margin-top: 24px;
  max-width: 54ch;
  color: var(--mist);
  font-size: 1.18rem;
  line-height: 1.55;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 20px; color: #A9BBCF; font-size: 0.95rem; }

/* The one worked example: a single claim traced to payment */
.trace-card {
  --focus: var(--navy);
  width: 100%;
  max-width: 470px;
  padding: 28px 28px 24px;
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  box-shadow: 0 32px 64px -24px rgba(2, 12, 28, 0.7);
}
@media (min-width: 980px) { .trace-card { justify-self: end; } }

.trace-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.trace-title { font-weight: 600; }
.trace-tag {
  flex: none;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--slate);
  font-size: 0.78rem;
}
.trace { margin-top: 22px; }
.trace-step { position: relative; padding: 0 0 22px 36px; }
.trace-step::before {
  content: "";
  position: absolute;
  left: 8px; top: 22px; bottom: 0;
  width: 2px;
  background: var(--line);
}
.trace-step:last-child { padding-bottom: 20px; }
.trace-step:last-child::before { display: none; }
.dot {
  position: absolute;
  left: 0; top: 4px;
  width: 18px; height: 18px;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 50%;
}
.trace-step--denied .dot { border-color: #C0362C; }
.trace-step--appeal .dot { border-color: #A8690A; }
.trace-step--paid .dot { background: var(--teal); border-color: var(--teal); }
.trace-step--paid .dot::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid var(--navy);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.trace-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 600; }
.trace-text { margin-top: 2px; color: var(--slate); font-size: 0.95rem; }
.pill { padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.pill--sent { background: #E7EDF5; color: #1C3A5E; }
.pill--denied { background: #FDECEA; color: #9B2219; }
.pill--appeal { background: #FFF2D1; color: #7A4B00; }
.pill--paid { background: #D9F6EC; color: #075E47; }
.trace-foot {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: no-preference) {
  .trace-step { animation: trace-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .trace-step:nth-child(1) { animation-delay: 0.3s; }
  .trace-step:nth-child(2) { animation-delay: 1s; }
  .trace-step:nth-child(3) { animation-delay: 1.7s; }
  .trace-step:nth-child(4) { animation-delay: 2.4s; }
  .trace-step--paid .dot { animation: dot-pop 0.45s 2.75s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
}
@keyframes trace-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes dot-pop {
  from { transform: scale(0.4); }
  to { transform: scale(1); }
}

/* ---------- Bands and the label/content split ---------- */

.band { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.band--paper { background: var(--paper); }
.band--navy { --focus: var(--teal); background: var(--navy); color: #fff; border-top: 0; }
.band--navy + .band { border-top: 0; }

.split { display: grid; gap: 32px; }
@media (min-width: 920px) {
  .split { grid-template-columns: 290px minmax(0, 1fr); gap: 72px; }
}
.split-head h2 { font-size: clamp(1.8rem, 3vw, 2.35rem); line-height: 1.12; }
.split-head p { margin-top: 14px; max-width: 36ch; color: var(--slate); }
.band--navy .split-head p { color: var(--mist); }

/* ---------- Where money is lost ---------- */

.leaks-cols {
  display: none;
  padding-bottom: 10px;
  color: var(--slate);
  font-size: 0.85rem;
  font-weight: 600;
}
.leaks { border-top: 2px solid var(--navy); }
.leak { display: grid; gap: 10px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.leak p { color: var(--slate); font-size: 0.98rem; }
.leak .fix { color: var(--ink); }
.cell-label { display: block; margin-bottom: 2px; color: var(--slate); font-size: 0.8rem; font-weight: 600; }
@media (min-width: 720px) {
  .leaks-cols, .leak { display: grid; grid-template-columns: 0.9fr 1.3fr 1.3fr; gap: 28px; }
  .cell-label {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Cell grids (services, privacy) ---------- */

.cells {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
@media (min-width: 640px) { .cells { grid-template-columns: 1fr 1fr; } }
.cell { padding: 26px; background: #fff; }
.cell svg { width: 28px; height: 28px; margin-bottom: 14px; color: var(--teal-ink); }
.cell p { margin-top: 6px; color: var(--slate); font-size: 0.97rem; }
.cell--note { background: var(--paper); }
.cell--note p { color: var(--ink); }
.after-cells { margin-top: 22px; max-width: 62ch; color: var(--slate); }

/* ---------- Steps ---------- */

.steps { counter-reset: step; }
.step { position: relative; padding: 0 0 32px 66px; counter-increment: step; }
.step::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -6px;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  background: #fff;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
}
.step::after {
  content: "";
  position: absolute;
  left: 21px; top: 38px; bottom: -6px;
  width: 1.5px;
  background: var(--line);
}
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }
.step h3 { font-size: 1.14rem; }
.step p { margin-top: 4px; max-width: 58ch; color: var(--slate); }

/* ---------- Pricing ---------- */

.price-line {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.012em;
}
.price-text { margin-top: 18px; max-width: 58ch; color: var(--mist); }
.price-points { margin-top: 36px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.price-points li {
  display: grid;
  gap: 2px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--mist);
}
.price-points strong { color: #fff; font-weight: 600; }
@media (min-width: 720px) {
  .price-points li { grid-template-columns: 240px 1fr; gap: 24px; }
}

/* ---------- Who we help ---------- */

.who-text { max-width: 60ch; }
.who-list { display: grid; margin-top: 28px; border-top: 2px solid var(--navy); }
@media (min-width: 640px) { .who-list { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.who-list li { padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 500; }

/* ---------- FAQ ---------- */

.faq { border-top: 2px solid var(--navy); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  font-size: 1.08rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--teal-ink);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.15;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--teal-ink); }
.faq-a { max-width: 64ch; padding: 0 0 22px; color: var(--slate); }

/* ---------- Contact ---------- */

.next { margin-top: 28px; padding-left: 1.3em; color: var(--slate); list-style: decimal; }
.next li { margin-top: 8px; padding-left: 4px; }
.contact-mail { margin-top: 26px; }
.contact-mail a { font-weight: 600; }

.form {
  padding: clamp(20px, 3.2vw, 36px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.form-grid { display: grid; gap: 18px; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}
.field label { display: block; margin-bottom: 6px; font-size: 0.93rem; font-weight: 600; }
.opt { color: var(--slate); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #7F91A6;
  border-radius: 6px;
  font: inherit;
}
.field textarea { min-height: 130px; resize: vertical; }
.field [aria-invalid="true"] { border-color: #B42318; box-shadow: 0 0 0 1px #B42318; }
.hint { margin-top: 6px; color: var(--slate); font-size: 0.88rem; }
.error { margin-top: 6px; color: #B42318; font-size: 0.88rem; font-weight: 500; }
.check { display: flex; align-items: flex-start; gap: 12px; }
.field .check input {
  flex: none;
  width: 20px; height: 20px;
  min-height: 0;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--navy);
}
.field .check input[aria-invalid="true"] { box-shadow: none; outline: 2px solid #B42318; outline-offset: 2px; }
.field .check label { margin-bottom: 0; font-size: 0.95rem; font-weight: 400; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 24px; }
.form-actions p { color: var(--slate); font-size: 0.9rem; }
.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  background: #FDECEA;
  color: #7A1A12;
  border: 1px solid #F1B5AE;
  border-radius: 8px;
  font-size: 0.97rem;
}
.form-status a { color: inherit; font-weight: 600; }
.form-done { padding: 8px 0 8px 20px; border-left: 4px solid var(--teal); }
.form-done h3 { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }
.form-done p { margin-top: 10px; max-width: 52ch; color: var(--slate); }
[hidden] { display: none !important; }

/* ---------- Footer ---------- */

.site-footer {
  --focus: var(--teal);
  padding: 56px 0 32px;
  background: var(--navy);
  color: var(--mist);
  font-size: 0.95rem;
}
.foot-grid { display: grid; gap: 36px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; } }
.foot-about p { margin-top: 14px; max-width: 34ch; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-title { margin-bottom: 10px; color: #fff; font-family: var(--sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; }
.foot-links li { margin-top: 6px; }
.fine {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #A9BBCF;
  font-size: 0.85rem;
}

/* ---------- Text pages (privacy, terms, blog) ---------- */

.page-head {
  --focus: var(--teal);
  padding-block: clamp(40px, 6vw, 76px);
  background: var(--navy);
  color: #fff;
}
.page-head h1 { max-width: 18em; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; }
.page-head p { margin-top: 14px; max-width: 60ch; color: var(--mist); }
.page-head .crumb { margin: 0 0 14px; font-size: 0.92rem; }
.page-head .crumb a { color: var(--mist); }

.prose { max-width: 70ch; padding-block: clamp(40px, 6vw, 72px); }
.prose h2 { margin-top: 1.9em; font-size: 1.6rem; line-height: 1.2; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose ul, .prose ol { margin-top: 1em; }
.prose ul { padding-left: 1.3em; list-style: disc; }
.prose ol { padding-left: 1.3em; list-style: decimal; }
.prose li { margin-top: 0.45em; padding-left: 2px; }

.prose .post-list { margin-top: 0; padding-left: 0; list-style: none; border-top: 2px solid var(--navy); }
.prose .post-list li { margin-top: 0; padding: 28px 0; border-bottom: 1px solid var(--line); }
.prose .post-list h2 { margin-top: 0; font-size: 1.55rem; line-height: 1.2; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--teal-ink); text-decoration: underline; }
.prose .post-list p { margin-top: 8px; max-width: 64ch; color: var(--slate); }
.prose .post-list .post-meta { font-size: 0.9rem; }

.post-cta {
  margin-top: 48px;
  padding: 24px 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.post-cta p { margin-top: 0; }
.post-cta .btn { margin-top: 16px; }

.center-page { padding-block: clamp(64px, 12vw, 140px); }
.center-page h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.1; }
.center-page p { margin-top: 16px; max-width: 54ch; color: var(--slate); }
.center-page .btn { margin-top: 28px; }
