/* Nationwide Utility Support
   "The Grid at Night" theme. The whole site is one dark navy world:
   deep brand navy canvas, ice white light, brand red reserved for
   exception marks. Tokens live here; the section styles below all
   reference them. */

:root {
  /* Grid at Night palette, approved rev 4f. */
  --canvas-deep: #030C22;   /* page ground, html and body */
  --canvas-lift: #061530;   /* lifted ground for scrims and panels */
  --canvas-floor: #020817;  /* deepest ground: footer, carousel band */
  --surface-1: #0B1834;     /* card and panel fill */
  --surface-2: #0F1F42;     /* hover and raised fill */
  --border: rgba(255,255,255,.08);
  --ink: rgba(255,255,255,.92);
  --muted: #98A9CC;         /* body text, tuned for AA on the surfaces */
  --accent: #9DB9FF;        /* lightened brand navy: links, eyebrows, glows */
  --red: #CA0819;           /* BRAND RED: marks beside light text only */
  --red-lit: #FF6B74;       /* the red that may touch dark grounds */
  --cta-fill: #E8F1FF;      /* primary button fill */

  --measure: 68ch;
  --shell: 1140px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 16px;

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

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

/* Navy on BOTH roots so no embedding context can paint its own ground
   over the page. The index canvas sits at z-index 0 above these, and
   all content rides above it at z-index 1 or higher. */
html, body { background: var(--canvas-deep); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.03125rem;
  line-height: 1.65;
  color: var(--muted);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.125rem); font-weight: 800; }
/* Small headings drop the display tracking and get roomier leading. */
h3 { font-size: 1.1875rem; letter-spacing: 0; line-height: 1.3; }
p  { margin: 0 0 1.1em; max-width: var(--measure); }
a  { color: var(--ink); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

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

.mono { font-family: var(--mono); }

/* Tagline bullet separators carry the one brand-red note the logo
   uses: red marks beside light text, never red body text on navy. */
.sep { color: var(--red); }

.shell { width: min(100% - (var(--pad) * 2), var(--shell)); margin-inline: auto; }

/* Skip link for keyboard users */
.skip {
  position: absolute; left: -9999px;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--border);
  padding: .75rem 1.25rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Convergence canvas (index) ----------
   Fixed full-viewport decoration behind the entire page. Positioned at
   z-index 0 so it paints above the root backgrounds; content stacks
   above it. Never interactive. */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--canvas-deep);
  pointer-events: none;
}
main, .site-footer { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(3,12,34,.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
/* Scroll-edge fade in place of a hard rule: a short navy gradient
   hanging below the bar. The sticky header is its own stacking
   context, so z-index -1 keeps the fade under the mobile nav panel
   (a positioned child of .shell) while it still rides above page
   content. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 24px;
  background: linear-gradient(rgba(3,12,34,.55), transparent);
  pointer-events: none;
  z-index: -1;
}
.site-header .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 76px; padding-top: .875rem; padding-bottom: .875rem;
}
.wordmark { display: flex; align-items: center; text-decoration: none; }
/* doubled 2026-08-28, then 10 percent smaller with breathing
   room in the bar 2026-08-31 */
.wordmark img { height: 90px; width: auto; }
@media (max-width: 460px) { .wordmark img { height: 72px; } }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { text-decoration: none; color: rgba(255,255,255,.78); letter-spacing: .01em; font-weight: 500; font-size: .9375rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"] { font-weight: 600; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 6px; padding: .5rem .7rem; font-size: 1rem; cursor: pointer;
}

/* ---------- Buttons ---------- */
/* Doubled class selectors (0-2-0) so these beat `.nav a` (0-1-1).
   Two roles only: solid ice pill and quiet outline pill. The legacy
   class names alias onto them so page diffs stay small. */
.btn {
  position: relative; isolation: isolate;
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .9375rem;
  padding: .8rem 1.75rem; border-radius: 999px; border: 1px solid transparent;
  line-height: 1.2;
  transition: border-color .25s ease, color .25s ease, transform .2s ease-out;
}
/* Hover glow lives on a pseudo-element and fades in through opacity, so
   hover never animates box-shadow. It sits behind the label inside the
   button's own stacking context (isolation above). The shadow paints
   outside the box, so no overflow rule is needed and nothing clips.
   inset -1px matches the pseudo to the border box the glow used to
   hang off. */
.btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity .25s ease;
}
.btn:active { transform: scale(.97); transition: transform 100ms ease-out; }
.btn.btn-primary, .btn.btn-light {
  background: var(--cta-fill); color: var(--canvas-deep); border-color: var(--cta-fill);
}
.btn.btn-primary::after, .btn.btn-light::after {
  box-shadow: 0 0 0 1px rgba(232,241,255,.35), 0 0 32px rgba(157,185,255,.28);
}
.btn.btn-primary:hover, .btn.btn-light:hover { color: var(--canvas-deep); }
.btn.btn-primary:hover::after, .btn.btn-light:hover::after { opacity: 1; }
.btn.btn-outline-light, .btn.btn-ghost {
  background: transparent; color: var(--ink); border-color: rgba(255,255,255,.35);
}
.btn.btn-outline-light:hover, .btn.btn-ghost:hover {
  color: var(--ink); border-color: rgba(255,255,255,.7);
}
.nav .btn { padding: .55rem 1.25rem; font-size: .84375rem; letter-spacing: 0; }

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 8vw, 6.875rem) 0; }
.section-head { max-width: var(--measure); margin-bottom: 2.75rem; }
.eyebrow {
  font-family: var(--mono);
  font-size: .71875rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .9rem; font-weight: 600;
}
.lede { font-size: 1.09375rem; color: var(--muted); }

/* Text-heavy bands on index ride over the mid-merge tangle, so each
   carries a vertical scrim of the page navy at partial alpha: lines
   glow at the band edges and haze out behind the copy. On pages with
   no canvas these read as flat navy, which is the intent. */
.problem-band {
  background: linear-gradient(180deg,
    rgba(3,12,34,0) 0%,
    rgba(3,12,34,.76) 16%,
    rgba(3,12,34,.76) 84%,
    rgba(3,12,34,0) 100%);
}

/* Lifted band with faint ice beams behind the content. */
.section-tint {
  background:
    repeating-linear-gradient(115deg,
      rgba(157,185,255,.028) 0 2px, transparent 2px 110px),
    linear-gradient(180deg,
      rgba(6,21,48,0) 0%,
      rgba(6,21,48,.66) 12%,
      rgba(6,21,48,.66) 88%,
      rgba(6,21,48,0) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------- Hero ---------- */
/* Shared dark hero. On index the convergence tangle lives on the fixed
   canvas behind it, so the ground stays translucent: a top navy lift
   and a soft light-navy bloom, nothing opaque. */
.hero {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(6,21,48,.55) 0%, rgba(6,21,48,0) 55%),
    radial-gradient(1100px 600px at 68% 30%, rgba(143,176,255,.06), transparent 65%);
  overflow: hidden;
  padding: clamp(4rem, 9vw, 6.5rem) 0;
}
.hero-home {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 4.5rem 0 13rem;
}
.hero .shell { position: relative; }
.hero h1 { max-width: 15em; margin-bottom: .55em; }
.hero-home h1 { font-size: clamp(2.375rem, 5.6vw, 3.875rem); line-height: 1.06; }
.hero p { color: rgba(255,255,255,.80); font-size: 1.09375rem; max-width: 56ch; }
.hero .eyebrow { color: var(--accent); }

/* Dim dotted field, two offset tiles for irregularity, faded at edges */
.dotfield {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.5px),
    radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.5px);
  background-size: 30px 30px, 46px 46px;
  background-position: 0 0, 15px 23px;
  -webkit-mask-image: radial-gradient(120% 90% at 55% 42%, #000 35%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 55% 42%, #000 35%, transparent 78%);
}

/* Strong scrim behind the index hero copy: the tangle passes behind a
   haze of the page navy, and the headline stays AA against the
   brightest transient line state. */
.hero-copy { max-width: 640px; position: relative; }
.hero-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -70px -90px -80px -130px;
  background: radial-gradient(closest-side, rgba(3,12,34,.93) 30%, rgba(3,12,34,.78) 62%, transparent);
}

.tagline {
  font-family: var(--mono);
  font-size: .75rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.hero .tagline { margin-top: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .875rem; margin-top: 2.1rem; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
/* The problem band carries four cards (2026-08-28): four across
   on desktop, two by two on tablets, one column on phones */
.problem-band .grid-3 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) { .problem-band .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .problem-band .grid-3 { grid-template-columns: 1fr; } }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Cards are static content, never links, so they carry no hover state. */
.card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.625rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
}
.card h3 { margin-bottom: .5rem; letter-spacing: -.01em; }
.card p { font-size: .9375rem; color: var(--muted); margin-bottom: 0; }
.card-num {
  display: block;
  font-family: var(--mono);
  font-size: .75rem; font-weight: 600; letter-spacing: .14em;
  color: var(--accent); margin-bottom: 1rem;
}

/* Bento grid (services): four panels since 2026-08-28. The auditing
   panel runs wide on row one and the fourth panel (account setup) runs
   wide on row two so both rows fill the three columns. */
.bento { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.bento .card-wide, .bento > :nth-child(4) { grid-column: span 2; }
.bento .card-full { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento .card-wide, .bento .card-full, .bento > :nth-child(4) { grid-column: auto; }
}

/* ---------- Narrative spacer (index) ----------
   One thin mono line of runway while a merge wave lands. */
.spacer-band {
  padding: 4.5rem 0;
  text-align: center;
  background: linear-gradient(180deg,
    rgba(3,12,34,0) 0%,
    rgba(3,12,34,.55) 35%,
    rgba(3,12,34,.55) 65%,
    rgba(3,12,34,0) 100%);
}
.spacer-band p {
  margin: 0 auto;
  max-width: none;
  font-family: var(--mono);
  font-size: .78125rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.spacer-band .lit { color: var(--accent); }

/* ---------- Stats ---------- */
.stats-band {
  background: linear-gradient(180deg,
    rgba(6,21,48,0) 0%,
    rgba(6,21,48,.62) 18%,
    rgba(6,21,48,.62) 82%,
    rgba(6,21,48,0) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats { display: grid; gap: 1.25rem; grid-template-columns: minmax(200px, 1fr) 2fr; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }
.stat {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  padding: 1.625rem 1.375rem;
}
.stat b {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(143,176,255,.35);
}
/* The utilities tile lists its value as chips instead of one big figure */
.stat-chips {
  list-style: none; margin: 0 0 .25rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.stat-chips li {
  font-family: var(--mono); font-weight: 700; font-size: .9375rem;
  letter-spacing: .02em; color: var(--accent);
  text-shadow: 0 0 24px rgba(143,176,255,.35);
  padding: .4rem .8rem; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(157,185,255,.06);
}
.stat span {
  display: block;
  margin-top: .5rem;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Checklist ---------- */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.checks li { position: relative; padding-left: 1.85rem; color: var(--muted); }
/* Ice check mark drawn from two borders */
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .5em;
  width: 11px; height: 5px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-48deg);
}
.checks strong { color: var(--ink); font-weight: 600; }

/* ---------- Split ---------- */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }

/* ---------- Timeline (services transfers) ----------
   Vertical run: a thin ice line down the left, boxed mono numerals,
   the six steps hanging off it. */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 780px; }
.timeline::before {
  content: ""; position: absolute; left: 20px; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(180deg,
    rgba(157,185,255,0) 0%,
    rgba(157,185,255,.45) 6%,
    rgba(157,185,255,.45) 94%,
    rgba(157,185,255,0) 100%);
}
.tl-item { position: relative; padding: 0 0 2.4rem 4.25rem; }
.tl-item:last-child { padding-bottom: .25rem; }
.tl-num {
  position: absolute; left: 0; top: -2px;
  width: 41px; height: 41px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .8125rem; font-weight: 600;
  color: var(--accent);
  background: var(--surface-1);
  border: 1px solid rgba(157,185,255,.35);
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(143,176,255,.12);
}
.tl-item h3 { margin-bottom: .35rem; }
.tl-item p { font-size: .9375rem; color: var(--muted); margin-bottom: 0; }

/* ---------- CTA band ----------
   Transparent ground: on index the one converged line threads behind
   this section on the fixed canvas. The lamp arc breathes above, and
   a radial scrim keeps the copy readable where the line passes. */
.cta-band {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: clamp(6rem, 12vw, 10rem) 0 clamp(7rem, 13vw, 11.25rem);
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0; left: 50%;
  width: min(900px, 120vw);
  height: 340px;
  transform: translateX(-50%);
  transform-origin: 50% 0;
  background: radial-gradient(55% 100% at 50% 0%, rgba(157,185,255,.17), transparent 72%);
  animation: lampbreathe 14s ease-in-out infinite;
}
@keyframes lampbreathe {
  0%, 100% { opacity: .65; transform: translateX(-50%) scaleY(.96); }
  50%      { opacity: 1;   transform: translateX(-50%) scaleY(1.05); }
}
.cta-band::after {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: min(680px, 90vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(233,240,255,.85), transparent);
}
.cta-band .shell { position: relative; }
.cta-band .shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -70px -30px;
  background: radial-gradient(closest-side, rgba(3,12,34,.9) 35%, rgba(3,12,34,.55) 65%, transparent);
}
.cta-band h2 { margin-inline: auto; max-width: 18em; }
.cta-band p { color: var(--muted); margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; margin-top: 2.25rem; }

/* ---------- Contact detail list ----------
   Mono dot-leader rows: label, a dotted run, then the value. */
.contact-list { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 1.15rem; }
.contact-list div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .9rem; }
.contact-list dt {
  flex: 1; display: flex; align-items: baseline; gap: .9rem;
  font-family: var(--mono);
  font-size: .6875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap;
}
.contact-list dt::after {
  content: ""; flex: 1; min-width: 2.5rem;
  border-bottom: 1px dotted rgba(152,169,204,.45);
  transform: translateY(-4px);
}
.contact-list dd { margin: 0 0 0 auto; text-align: right; max-width: 100%; }
.contact-value { font-size: 1.09375rem; font-weight: 600; color: var(--ink); }
.contact-value.contact-plain { font-size: 1rem; font-weight: 500; }
.contact-value a { text-decoration: none; }
.contact-value a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: rgba(2,8,23,.85);
  border-top: 1px solid var(--border);
  color: var(--muted); padding: 3.5rem 0 2rem; font-size: .9375rem;
}
.site-footer h4 {
  color: var(--ink); font-family: var(--mono);
  font-size: .71875rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .9rem;
}
.footer-logo { height: 44px; width: auto; margin-bottom: 1.1rem; opacity: .92; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .875rem;
}
.footer-bottom .tagline { color: var(--muted); }

/* ---------- Engine cards (index) ----------
   Full-bleed section with glowing gradient-border cards. Namespaced
   fx- so the site's section/h2/p rules cannot bleed in unnoticed. The
   gradients live in the ice and light-navy family on navy surfaces;
   the section ground is a deep scrim so canvas lines haze at its
   edges. */
.fx-engine {
  background: linear-gradient(180deg,
    rgba(3,12,34,0) 0%,
    rgba(2,8,23,.85) 12%,
    rgba(2,8,23,.85) 88%,
    rgba(3,12,34,0) 100%);
}

.fx-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px;
  max-width: 936px; margin-inline: auto;
}
.fx-card-wrap {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 260px; margin-inline: auto;
}
/* Soft halo behind the card: same footprint and gradient, blurred out. */
.fx-glow {
  position: absolute; left: 0; right: 0; top: 0; height: 220px;
  border-radius: 20px; opacity: .25; pointer-events: none;
  background: var(--card-gradient);
  filter: blur(45px);
}
/* Gradient border via two-layer background: navy fill clipped to the
   padding box, the gradient showing only through the transparent border. */
.fx-card {
  position: relative; z-index: 1; height: 220px;
  border-radius: 20px; overflow: hidden; border: 2px solid transparent;
  background: linear-gradient(var(--surface-1), var(--surface-1)) padding-box, var(--card-gradient) border-box;
  padding: 28px; display: flex; flex-direction: column; justify-content: flex-end;
}
.fx-title {
  color: var(--ink); font-weight: 600; font-size: 1.25rem;
  letter-spacing: -.01em; margin: 0 0 12px;
}
.fx-desc { color: var(--muted); font-size: .875rem; line-height: 1.6; margin: 0; min-height: 4.8em; }
/* min-height holds three lines so the three card titles sit level even
   when one description wraps to two */

@media (min-width: 768px) {
  .fx-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .fx-card-wrap { max-width: 300px; }
  .fx-glow, .fx-card { height: 240px; }
}

/* Entrance: fade in and rise 16px, staggered. The hidden state only exists
   once site.js tags the section .fx-ready, so no-JS visitors (and reduced
   motion, which site.js also checks) see the cards immediately. */
.fx-ready .fx-card-wrap { opacity: 0; transform: translateY(16px); }
.fx-ready.fx-in .fx-card-wrap { animation: fx-rise .5s ease-out forwards; }
.fx-ready.fx-in .fx-card-wrap:nth-child(1) { animation-delay: .06s; }
.fx-ready.fx-in .fx-card-wrap:nth-child(2) { animation-delay: .12s; }
.fx-ready.fx-in .fx-card-wrap:nth-child(3) { animation-delay: .18s; }
@keyframes fx-rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .fx-ready .fx-card-wrap { opacity: 1; transform: none; animation: none !important; }
}

/* ---------- Scroll reveals ----------
   Sitewide, via IntersectionObserver in site.js. The hiding state only
   exists once script has added the js class to body, so the no-script
   page renders fully visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity .45s cubic-bezier(.2,.6,.2,1),
    transform .45s cubic-bezier(.2,.6,.2,1);
}
.js .reveal.d1 { transition-delay: .07s; }
.js .reveal.d2 { transition-delay: .14s; }
.js .reveal.d3 { transition-delay: .21s; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.settled { transition-delay: 0s; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(6,21,48,.98); border-bottom: 1px solid var(--border); padding: .5rem 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem var(--pad); }
  .nav .btn { border-radius: 0; background: transparent; border-color: transparent; color: var(--ink); font-size: .9375rem; }
  .site-header .shell { position: relative; }
}

/* ---------- Lead form and the Talk to us dialog ----------
   Same form on contact.html (section #lead) and inside the index
   dialog. Posts to contact.php; without JS the hero button just
   follows its href to the contact form. */
.lead-form { max-width: 720px; }
.lead-grid { display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .lead-grid { grid-template-columns: 1fr; } }
.lead-grid label, .lead-hp label {
  display: flex; flex-direction: column; gap: .4rem;
  font-family: var(--mono); font-size: .6875rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.lead-full { grid-column: 1 / -1; }
.lead-form input, .lead-form textarea {
  font: inherit; font-family: var(--font); font-size: 1rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: .7rem .85rem; letter-spacing: 0; text-transform: none; width: 100%;
}
.lead-form input:focus-visible, .lead-form textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-color: transparent;
}
.lead-form textarea { resize: vertical; min-height: 7rem; }
/* honeypot: off canvas for people, present for bots */
.lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-actions { margin: 1.25rem 0 0; }
.lead-error { color: var(--red-lit); font-weight: 600; margin: 0 0 1rem; }
.lead-error[hidden] { display: none; }

.talk-dialog {
  border: 0; padding: 0; background: transparent; color: var(--ink);
  width: 100%; max-width: min(760px, calc(100vw - 2rem));
}
.talk-dialog::backdrop {
  background: rgba(3,12,34,.78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.talk-panel {
  position: relative;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.talk-panel h2 { margin: 0 0 .5rem; padding-right: 3rem; }
.talk-intro { color: var(--muted); margin: 0 0 1.5rem; max-width: 56ch; }
.talk-close {
  position: absolute; top: .75rem; right: .75rem;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--ink);
  font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.talk-close:hover { background: var(--canvas-lift); }
.talk-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Reduced motion ----------
   Ambient animations off, reveals shown; site.js drops canvas pulses
   and damping (direct scrub) on its side. */
@media (prefers-reduced-motion: reduce) {
  .cta-band::before { animation: none; }
  .btn, .btn::after { transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}


/* ==================== WHITE THEME (design-white) ====================
   The Ledger concept in white was picked 2026-08-31. This section
   flips the palette and counters every rule above that hardcodes a
   dark value, then carries the Ledger photo components. It is the
   tested override block from the approved preview, moved into the
   stylesheet; inlining it into the rules above is a cleanup for later.
   It sits BEFORE the accessibility signals so prefers-contrast still
   wins on the tokens it adjusts. */
:root {
  --canvas-deep: #FFFFFF;
  --canvas-lift: #F4F7FC;
  --canvas-floor: #EEF2F9;
  --surface-1: #FFFFFF;
  --surface-2: #F3F6FC;
  --border: rgba(9,28,68,.16);
  --ink: #10224E;
  --muted: #44547A;
  --accent: #002976;
  --red-lit: #CA0819;
  --cta-fill: #002976;
}
html, body { background: #FFFFFF; }

/* Header: white glass, soft edge fade, navy links */
.site-header { background: rgba(255,255,255,.85); }
.site-header::after { background: linear-gradient(rgba(9,28,68,.10), transparent); }
.nav a { color: rgba(16,34,78,.75); }
.nav a:hover, .nav a[aria-current] { color: var(--accent); }

/* Buttons: primary and light are solid navy (their text uses the page
   ground token, which is now white); outline goes navy hairline */
.btn.btn-primary::after, .btn.btn-light::after {
  box-shadow: 0 0 0 1px rgba(0,41,118,.22), 0 0 24px rgba(0,41,118,.20);
}
.btn.btn-outline-light, .btn.btn-ghost { color: var(--accent); border-color: rgba(0,41,118,.35); }
.btn.btn-outline-light:hover, .btn.btn-ghost:hover { color: var(--accent); border-color: rgba(0,41,118,.7); }

/* Dotfield: navy dots on white */
.dotfield {
  background-image:
    radial-gradient(rgba(9,28,68,.15) 1px, transparent 1.5px),
    radial-gradient(rgba(9,28,68,.09) 1px, transparent 1.5px);
}

.hero p { color: var(--muted); }

/* Bands: the canvas-era navy scrims become faint blue-gray washes */
.hero {
  background:
    linear-gradient(180deg, rgba(238,242,249,.9) 0%, rgba(238,242,249,0) 55%),
    radial-gradient(1100px 600px at 68% 30%, rgba(0,41,118,.05), transparent 65%);
}
.problem-band {
  background: linear-gradient(180deg,
    rgba(238,242,249,0) 0%,
    rgba(238,242,249,.9) 16%,
    rgba(238,242,249,.9) 84%,
    rgba(238,242,249,0) 100%);
}
.section-tint {
  background:
    repeating-linear-gradient(115deg, rgba(0,41,118,.03) 0 2px, transparent 2px 110px),
    linear-gradient(180deg,
      rgba(238,242,249,0) 0%,
      rgba(238,242,249,.9) 18%,
      rgba(238,242,249,.9) 82%,
      rgba(238,242,249,0) 100%);
}
.stats-band {
  background: linear-gradient(180deg,
    rgba(238,242,249,0) 0%,
    rgba(238,242,249,.85) 18%,
    rgba(238,242,249,.85) 82%,
    rgba(238,242,249,0) 100%);
}
.fx-engine {
  background: linear-gradient(180deg,
    rgba(255,255,255,0) 0%,
    rgba(238,242,249,.9) 12%,
    rgba(238,242,249,.9) 88%,
    rgba(255,255,255,0) 100%);
}
.stat { box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 10px 30px rgba(16,34,78,.06); }
.stat b { text-shadow: none; }
.stat-chips li { text-shadow: none; background: rgba(0,41,118,.05); }

/* CTA band: soft navy lamp, navy hairline, no copy scrim */
.cta-band::before { background: radial-gradient(closest-side, rgba(0,41,118,.14), transparent 70%); }
.cta-band::after { background: linear-gradient(90deg, transparent, rgba(0,41,118,.35), transparent); }
.cta-band .shell::before { content: none; }

/* Footer: light band */
.site-footer { background: #EEF2F9; }

/* Dialog and form on white */
.talk-dialog::backdrop { background: rgba(16,34,78,.35); }
.talk-panel { box-shadow: 0 30px 80px rgba(16,34,78,.25); }

/* Contact dot leaders darken to stay visible */
.contact-list dt::after { border-bottom-color: rgba(9,28,68,.35); }

/* Engine glow calmer on white */
.fx-glow { opacity: .18; }

/* Mobile nav panel goes white */
@media (max-width: 760px) {
  .nav { background: rgba(255,255,255,.98); border-bottom-color: rgba(9,28,68,.12); }
}

/* ---------- Ledger photo components (from the approved concept) ---------- */
.ledger-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--surface-2);
}
.ledger-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  filter: saturate(.85) contrast(1.02);
}
.ledger-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(3,12,34,.06);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.ledger-panel {
  border-radius: var(--radius);
  border: 1px solid rgba(9,28,68,.16);
  overflow: hidden;
  background: var(--surface-1);
  box-shadow: 0 20px 50px rgba(16,34,78,.12);
}
.ledger-cap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1.1rem;
  background: var(--surface-1);
  border-top: 1px solid rgba(9,28,68,.12);
  font-family: var(--mono);
  font-size: .71875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.ledger-cap b { font-weight: 600; color: var(--accent); }

/* Hero: copy left, photo panel right */
.hero-home { min-height: 0; padding: clamp(3rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 6rem); }
.hero-home .shell {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy::before { content: none; }
.ledger-hero-photo { margin: 0; width: 100%; }
.ledger-hero-photo .ledger-frame { aspect-ratio: 3 / 4; }
.ledger-hero-photo img { object-position: 42% 50%; }
@media (max-width: 860px) {
  .hero-home .shell { grid-template-columns: 1fr; gap: 2.5rem; }
  .ledger-hero-photo .ledger-frame { aspect-ratio: 16 / 10; }
}

/* Utility tile band inside the spacer band */
.spacer-band {
  min-height: 40vh;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  background: none;
}
.ledger-tiles {
  list-style: none;
  margin: 0;
  padding: 2.5rem var(--pad);
  display: flex;
  gap: 1.25rem;
  overflow: auto hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad);
  scrollbar-width: none;
}
.ledger-tiles::-webkit-scrollbar { display: none; }
.ledger-tile { flex: 0 0 min(300px, 78vw); scroll-snap-align: start; }
.ledger-tile:first-child { margin-left: auto; }
.ledger-tile:last-child { margin-right: auto; }
.ledger-tile figure { margin: 0; }
.ledger-tile .ledger-panel { box-shadow: 0 14px 34px rgba(16,34,78,.10); }
.ledger-tile .ledger-frame { aspect-ratio: 3 / 2; }
.ledger-tile figcaption {
  margin-top: .8rem;
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.ledger-tile-water img { object-position: 45% 50%; }
.ledger-tile-net img { object-position: 60% 50%; }

/* Engine cards with a photo header */
.fx-glow, .fx-card { height: 330px; }
.fx-card { padding: 0; }
.ledger-fx-head { flex: 0 0 34%; height: 34%; }
.ledger-fx-head img { object-position: 50% 50%; }
.ledger-fx-intake img { object-position: 50% 75%; }
.ledger-fx-audit img { object-position: 50% 55%; }
.ledger-fx-payment img { object-position: 50% 68%; }
.ledger-fx-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 28px 26px;
}
@media (min-width: 768px) {
  .fx-glow, .fx-card { height: 310px; }
}
/* ==================== end WHITE THEME ==================== */

/* ---------- Accessibility signals ----------
   Reduced transparency: the glass header goes solid page navy.
   Increased contrast: brighter hairlines and body text. */
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--canvas-deep);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  :root {
    --border: rgba(255,255,255,.35);
    --muted: #B8C6E0;
  }
}
