/* Bellcourt Systems — MID Equities LLC
   Single stylesheet. No external dependencies beyond the optional webfont link. */

/* ---------- tokens ---------- */
:root {
  --ink:        #0e1826;
  --ink-2:      #24344b;
  --muted:      #56657c;
  --line:       #dde3ec;
  --line-2:     #eef1f6;
  --paper:      #ffffff;
  --paper-2:    #f6f8fb;
  --paper-3:    #eef2f7;
  --accent:     #15564f;
  --accent-2:   #0f403a;
  --accent-ink: #ffffff;
  --wash:       #e8f0ee;

  --serif: "Source Serif 4", ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --maxw: 1140px;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:      #e8edf5;
    --ink-2:    #c2cddd;
    --muted:    #92a1b8;
    --line:     #26313f;
    --line-2:   #1c2531;
    --paper:    #0d131b;
    --paper-2:  #121a24;
    --paper-3:  #18222e;
    --accent:   #6fbfb2;
    --accent-2: #97d6cb;
    --accent-ink: #06120f;
    --wash:     #14232169;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
}

/* ---------- skip link (WCAG 2.4.1) ---------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: .75rem 1.25rem; z-index: 100; font-weight: 600;
  text-decoration: none; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

:where(a, button, summary, input, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.35rem); letter-spacing: -0.022em; }
h2 { font-size: clamp(1.55rem, 3.1vw, 2.1rem); }
h3 { font-size: 1.19rem; font-family: var(--sans); font-weight: 650; letter-spacing: -0.005em; }
p  { margin: 0 0 1.1rem; max-width: var(--measure); text-wrap: pretty; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); }

.lede { font-size: clamp(1.13rem, 2vw, 1.32rem); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.eyebrow {
  font: 600 .74rem/1 var(--sans);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  line-height: 1.45;
}
.eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--line); max-width: 4rem; min-width: 2rem; }
@media (max-width: 680px) { .eyebrow::after { display: none; } }
.small { font-size: .88rem; color: var(--muted); }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: clamp(3.25rem, 7vw, 5.5rem); }
.band { background: var(--paper-2); border-block: 1px solid var(--line); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.head-in { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand svg { flex: none; }
.brand-text { display: block; }
.brand-text b { font: 600 1.06rem/1 var(--serif); letter-spacing: -.01em; display: block; text-transform: none; }
.brand-text > span { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: block; margin-top: .22rem; }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  font-size: .93rem; font-weight: 520; color: var(--ink-2);
  text-decoration: none; padding: .5rem .7rem; border-radius: var(--radius);
}
.nav a:hover { color: var(--accent); background: var(--paper-3); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 640; }
/* .nav a would otherwise out-specify .btn and break the button's contrast */
.nav a.btn, .nav a.btn:hover { color: var(--accent-ink); background: var(--accent); }
.nav a.btn:hover { background: var(--accent-2); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .95rem/1 var(--sans);
  padding: .8rem 1.3rem; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; border: 1px solid var(--accent);
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper-3); color: var(--ink); border-color: var(--muted); }
.btn-sm { padding: .58rem 1rem; font-size: .88rem; }

.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 6vw, 4.5rem); position: relative; overflow: hidden; }
/* constrain the children, not the .wrap itself — overriding .wrap's max-width
   re-centres the block and knocks the hero out of alignment with the sections below */
.hero-single h1 { max-width: 22ch; }
.hero-single .lede { max-width: 54ch; font-size: clamp(1.16rem, 2.1vw, 1.4rem); }
.hero h1 { margin-bottom: .5em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }


/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.7rem; background: var(--paper);
}
.card h3 { margin-bottom: .5rem; }
.card p { margin-bottom: 0; font-size: .97rem; color: var(--ink-2); }
.card .num { font: 600 .8rem/1 var(--mono); color: var(--accent); display: block; margin-bottom: .9rem; }

/* ---------- capability list ---------- */
.caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.caps li { display: grid; grid-template-columns: 1.9rem 1fr; gap: .9rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.caps li:first-child { border-top: 1px solid var(--line-2); }
.caps svg { margin-top: .18rem; color: var(--accent); }
.caps strong { display: block; font-weight: 640; margin-bottom: .18rem; }
.caps span { color: var(--muted); font-size: .95rem; }

/* ---------- work ---------- */
.work { display: grid; gap: 0; }
.work-item {
  display: grid; grid-template-columns: minmax(0,.34fr) minmax(0,.66fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  padding-block: 2.1rem; border-top: 1px solid var(--line);
  align-items: start;
}
.work-item:last-child { border-bottom: 1px solid var(--line); }
.work-item h3 { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; margin-bottom: .35rem; }
.work-meta { font-size: .84rem; color: var(--muted); font-family: var(--mono); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; padding: 0; list-style: none; }
.tags li { font: 500 .78rem/1 var(--sans); padding: .34rem .6rem; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); }

/* ---------- table ---------- */
.table-scroll { overflow-x: auto; margin-bottom: 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; min-width: 30rem; }
th, td { text-align: left; padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-weight: 640; color: var(--muted); font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; }
td.k { color: var(--muted); width: 34%; }
td.v { font-weight: 550; }
td .mono, .mono { font-family: var(--mono); font-size: .93em; }

/* ---------- note ---------- */
.note {
  border-left: 3px solid var(--accent); background: var(--paper-2);
  padding: 1.15rem 1.35rem; border-radius: 0 var(--radius) var(--radius) 0;
}
.note p:last-child { margin-bottom: 0; }
.note p { max-width: none; }

/* ---------- CTA ---------- */
.cta { background: var(--ink); color: #f2f5fa; border: 0; }
.cta h2, .cta p { color: inherit; }
.cta h2 { margin-bottom: .5rem; }
.cta p { color: #b9c5d6; }
.cta .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta .btn:hover { background: #dfe6f0; border-color: #dfe6f0; color: var(--ink); }
.cta-in { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 2.75rem 2.25rem; background: var(--paper-2); }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.foot-in h2 { font-family: var(--sans); font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }
.foot-in ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.foot-in a { color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.foot-in a:hover { color: var(--accent); text-decoration: underline; }
.foot-bar { margin-top: 2.25rem; padding-top: 1.4rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .84rem; color: var(--muted); }
.foot-bar p { margin: 0; max-width: none; }

/* ---------- page head ---------- */
.page-head { padding-block: clamp(2.75rem, 6vw, 4.25rem) clamp(1.5rem, 3vw, 2.25rem); border-bottom: 1px solid var(--line); }
.prose h2 { margin-top: 2.6rem; padding-top: 0; }
.prose h2:first-child { margin-top: 0; }
.prose ul { max-width: var(--measure); padding-left: 1.15rem; }
.prose li { margin-bottom: .5rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .work-item { grid-template-columns: 1fr; gap: .75rem; }
  .foot-in { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; padding: 0;
    background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--ink); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.1rem;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: .8rem .25rem; border-bottom: 1px solid var(--line-2); border-radius: 0; }
  .nav .btn { margin-top: .9rem; justify-content: center; border-bottom: 0; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; gap: 1.75rem; }
  .cta-in { flex-direction: column; align-items: flex-start; }
}

/* ---------- print (capability statement) ---------- */
@media print {
  .site-head, .site-foot, .skip, .no-print, .cta { display: none !important; }
  body { font-size: 10.5pt; color: #000; background: #fff; }
  section { padding-block: 0 .6rem; }
  .page-head { padding-block: 0 .5rem; }
  a { color: #000; text-decoration: none; }
  .wrap { max-width: none; padding: 0; }
  .card { break-inside: avoid; border-color: #999; }
  h1 { font-size: 20pt; } h2 { font-size: 13pt; margin-top: 1rem; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* ---------- contact form ---------- */
.form { margin-top: 1.5rem; max-width: 34rem; }
.form-row { display: grid; gap: .4rem; margin: 0 0 1.15rem; max-width: none; }
.form-row label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.form-row .req { color: var(--accent); }
.form-row .opt { font-weight: 400; color: var(--muted); }

.form input[type="text"],
.form input[type="email"],
.form textarea {
  font: inherit; font-size: 1rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .68rem .8rem; width: 100%;
}
.form textarea { resize: vertical; min-height: 8.5rem; line-height: 1.55; }
.form input:hover, .form textarea:hover { border-color: var(--muted); }
.form input:focus-visible, .form textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
/* Error styling only AFTER the user has interacted. :invalid alone would paint
   every empty required field red on page load, which reads as broken. Browsers
   without :user-invalid simply get no error tint, which is the safe direction. */
.form input:user-invalid,
.form textarea:user-invalid { border-color: #b3261e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form input:user-invalid,
  :root:not([data-theme="light"]) .form textarea:user-invalid { border-color: #f2b8b5; }
}

.form-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1.5rem 0 0; max-width: none; }
.form button { cursor: pointer; }

/* Spam trap — off-screen rather than display:none, and hidden from AT. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
