/* Blue Bolt Analytics
   One family (Archivo) carries the personality through its width axis:
   expanded and heavy for headlines, normal width for reading.
   Blue is deliberately more violet than Microsoft's Azure blue (#0078D4)
   so the brand never reads as a Microsoft knockoff. Yellow is the spark:
   it appears only in the mark and the hero, nowhere else. */

:root {
  --paper: #f5f7fb;
  --surface: #ffffff;
  --ink: #0c1b33;
  --navy: #102a4c;
  --navy-deep: #0a1d38;
  --bolt: #2f5bff;
  --bolt-light: #9db2ff;
  --spark: #ffc83d;
  --muted: #51627a;
  --line: #d8dfea;
  --on-navy: #e8eefb;
  --on-navy-muted: #a9b8d3;

  --radius: 6px;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);

  /* Type scale: a 1.25 ratio from an 18px body, tightened at the top */
  --step-0: 1.125rem;
  --step-1: 1.35rem;
  --step-2: 1.7rem;
  --step-3: clamp(1.9rem, 3.2vw, 2.4rem);
  --step-4: clamp(2.3rem, 5.4vw, 3.9rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--bolt); text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }

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

h1, h2, h3 {
  font-variation-settings: "wdth" 118;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 780; }
h3 { font-size: var(--step-1); font-weight: 700; line-height: 1.25; }

p { margin: 0 0 1em; max-width: 68ch; }

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

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--navy); color: #fff; padding: 0.6rem 1rem; z-index: 50;
}
.skip:focus { left: 1rem; top: 1rem; }

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem;
}

.brand {
  display: flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink);
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-name {
  font-size: 1.2rem; font-weight: 820;
  font-variation-settings: "wdth" 122; letter-spacing: -0.01em;
}
.brand-name span { font-weight: 420; color: var(--muted); font-variation-settings: "wdth" 100; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 520; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--bolt); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.45rem 0.8rem; font: inherit; font-size: 1rem; color: var(--ink); cursor: pointer;
}

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

.btn {
  display: inline-block; text-decoration: none; font-weight: 650; font-size: 1rem;
  padding: 0.85rem 1.35rem; border-radius: var(--radius); border: 2px solid var(--bolt);
  background: var(--bolt); color: #fff; line-height: 1.2; cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-quiet { background: transparent; color: var(--bolt); }
.btn-quiet:hover { background: var(--bolt); color: #fff; border-color: var(--bolt); }
.nav .btn { padding: 0.55rem 1rem; color: #fff; }
.nav .btn:hover { color: #fff; }

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

.hero {
  background: var(--navy-deep);
  color: var(--on-navy);
  overflow: hidden;
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero h1 { color: #fff; }
.hero .lede { font-size: var(--step-1); color: var(--on-navy); max-width: 34ch; line-height: 1.5; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.hero .btn-quiet { color: #fff; border-color: var(--on-navy-muted); }
.hero .btn-quiet:hover { background: #fff; color: var(--navy); border-color: #fff; }
.hero .fine { font-size: 0.95rem; color: var(--on-navy-muted); margin-top: 1.4rem; }

/* The data path diagram: CE tables converge, bolt into the lake, fan out */
.flow { width: 100%; height: auto; }
.flow .table-label { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 14px; fill: var(--on-navy-muted); }
.flow .node-label { font-family: "Archivo", sans-serif; font-size: 15px; font-weight: 650; fill: #fff; }
.flow .out-label { font-family: "Archivo", sans-serif; font-size: 14px; font-weight: 550; fill: var(--on-navy); }
.flow .feed { stroke: #3a5680; stroke-width: 1.5; fill: none; }
.flow .bolt-path { stroke: var(--bolt-light); stroke-width: 3; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.flow .fan { stroke: var(--bolt); stroke-width: 2; fill: none; }
.flow .dot { fill: #5e7aa6; }
.flow .lake { fill: var(--bolt); }
.flow .spark { fill: var(--spark); }

@media (prefers-reduced-motion: no-preference) {
  .flow .feed { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 0.9s ease-out forwards; }
  .flow .bolt-path { stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 0.5s 0.8s ease-in forwards; }
  .flow .fan { stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 0.7s 1.35s ease-out forwards; }
  .flow .spark { transform-origin: center; transform-box: fill-box; opacity: 0; animation: spark 0.6s 1.25s ease-out forwards; }
  .flow .out-label { opacity: 0; animation: fade 0.5s 1.8s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spark { 0% { opacity: 0; transform: scale(0.2); } 60% { opacity: 1; transform: scale(1.6); } 100% { opacity: 1; transform: scale(1); } }
@keyframes fade { to { opacity: 1; } }

/* ---------- Page header (interior pages) ---------- */

.page-head { background: var(--navy-deep); color: var(--on-navy); padding-block: clamp(2.8rem, 6vw, 4.5rem); }
.page-head h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 22ch; }
.page-head p { font-size: var(--step-1); line-height: 1.5; max-width: 46ch; margin: 0; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-navy { background: var(--navy); color: var(--on-navy); }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy a { color: var(--bolt-light); }

.intro { max-width: 44rem; margin-bottom: 2.5rem; }
.intro p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.section-navy .intro p { color: var(--on-navy-muted); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }

.photo { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }

.banner-photo { margin: 0; background: var(--navy); }
.banner-photo img { width: 100%; height: clamp(12rem, 30vw, 22rem); object-fit: cover; }

/* The operator line: the one pull quote on the site */
.operator {
  font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 720; line-height: 1.3;
  font-variation-settings: "wdth" 112; max-width: 30ch; margin: 0; color: #fff;
}
.operator-note { margin-top: 1.2rem; color: var(--on-navy-muted); }

/* Pain list: plain rows, not cards */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.rows strong { display: block; font-size: var(--step-0); }
.rows span { color: var(--muted); }

/* A real sequence, so it gets numbers */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 2rem 3.6rem; border-left: 2px solid var(--line); margin-left: 1.2rem;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: -1.25rem; top: -0.2rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: #fff; font-weight: 750; font-size: 1rem;
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { color: var(--muted); margin: 0; }
.steps .when { font-size: 0.95rem; color: var(--bolt); font-weight: 600; margin-bottom: 0.3rem; }

/* ---------- Pricing tiers ----------
   Equal-height cards; Ask is set apart in navy. Buttons align along the bottom. */

.stairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.tier {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--bolt);
  border-radius: var(--radius); padding: 1.6rem 1.5rem 1.8rem;
  display: flex; flex-direction: column;
}
.tier:nth-child(3) { background: var(--navy); color: var(--on-navy); border-color: var(--navy); border-top-color: var(--spark); }
.tier:nth-child(3) h3, .tier:nth-child(3) .price { color: #fff; }
.tier:nth-child(3) .price small, .tier:nth-child(3) .tier-sum { color: var(--on-navy-muted); }
.tier:nth-child(3) li::before { background: var(--spark); }
.tier h3 { margin-bottom: 0.2em; }
.tier-sum { color: var(--muted); font-size: 1rem; margin-bottom: 1.2rem; }
.price { font-size: 2.3rem; font-weight: 800; font-variation-settings: "wdth" 115; color: var(--ink); line-height: 1.1; margin-bottom: 1.2rem; }
.price small { display: block; font-size: 0.9rem; font-weight: 500; color: var(--muted); font-variation-settings: "wdth" 100; margin-bottom: 0.2rem; }
.tier ul { list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: 1rem; }
.tier li { position: relative; padding-left: 1.2rem; margin-bottom: 0.55rem; }
.tier li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--bolt); }
.tier .btn { margin-top: auto; text-align: center; }
.tier:nth-child(3) .btn { background: var(--spark); border-color: var(--spark); color: var(--ink); }
.tier:nth-child(3) .btn:hover { background: #fff; border-color: #fff; }

.included { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.included h3 { font-size: var(--step-0); margin-bottom: 0.3em; }
.included p { color: var(--muted); margin: 0; font-size: 1rem; }

.costs { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.costs table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.costs th, .costs td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.costs tr:last-child td { border-bottom: 0; }
.costs th { font-weight: 650; background: var(--paper); }
.costs td:last-child { white-space: nowrap; }

/* ---------- Doc pages with a sticky side nav (How it works, FAQ) ---------- */

.doc { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.toc { position: sticky; top: 6rem; font-size: 0.98rem; }
.toc p { font-weight: 700; margin-bottom: 0.6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 0.35rem 0 0.35rem 1rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--bolt); border-left-color: var(--bolt); }
.doc-body > section { padding-bottom: 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--line); scroll-margin-top: 6rem; }
.doc-body > section:last-child { border-bottom: 0; margin-bottom: 0; }
.doc-body ul { padding-left: 1.2rem; max-width: 68ch; }
.doc-body li { margin-bottom: 0.5rem; }

.pipeline { background: var(--navy-deep); border-radius: var(--radius); padding: 1.2rem; margin: 1.5rem 0; }

.faq dt { font-weight: 700; font-size: var(--step-0); margin-top: 1.8rem; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 0.4rem 0 0; color: var(--ink); }
.faq dd p { margin-bottom: 0.6em; }

/* ---------- Case study facts ---------- */

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-block: 1px solid var(--line); margin: 2rem 0 3rem; }
.facts div { padding: 1.4rem 1rem 1.4rem 0; }
.facts div + div { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.facts strong { display: block; font-size: 1.9rem; font-weight: 800; font-variation-settings: "wdth" 115; line-height: 1.1; color: var(--navy); }
.facts span { font-size: 0.95rem; color: var(--muted); }

.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; max-width: 68ch; }
.prose li { margin-bottom: 0.5rem; }

/* ---------- CTA band ---------- */

.cta { background: var(--bolt); color: #fff; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.cta h2 { color: #fff; margin: 0 0 0.3em; }
.cta p { margin: 0; color: #e6ecff; }
.cta .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta .btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

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

.form { display: grid; gap: 1.1rem; max-width: 40rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form label { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 0.35rem; }
.form .hint { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 0.75rem 0.85rem; border: 1px solid #8593aa; border-radius: var(--radius); background: var(--surface);
}
.form textarea { min-height: 8rem; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid var(--bolt); outline-offset: 1px; border-color: var(--bolt); }
.form-status { padding: 1rem 1.1rem; border-radius: var(--radius); font-size: 1rem; }
.form-status[hidden] { display: none; }
.form-status.ok { background: #e7f6ec; border: 1px solid #9ad3ae; color: #14532d; }
.form-status.err { background: #fdecec; border: 1px solid #f0a8a8; color: #7f1d1d; }

.aside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.aside h2 { font-size: var(--step-1); }
.aside ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.aside li { margin-bottom: 0.45rem; }

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

.site-footer { background: var(--navy-deep); color: var(--on-navy-muted); font-size: 0.95rem; padding-block: 3rem 2rem; }
.site-footer .wrap { display: grid; gap: 2rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: flex-start; }
.site-footer .brand { color: #fff; }
.site-footer .brand-name span { color: var(--on-navy-muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.site-footer a { color: var(--on-navy); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.legal { border-top: 1px solid #22395c; padding-top: 1.5rem; font-size: 0.85rem; line-height: 1.55; }
.legal p { max-width: none; margin-bottom: 0.4rem; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .stairs { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; }
  .toc { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .menu-toggle { display: inline-block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .nav li a:not(.btn) { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .nav li:last-child .btn { display: block; margin-top: 0.9rem; padding: 0.85rem 1rem; text-align: center; }
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .included { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; }
  .facts div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .costs th, .costs td { padding: 0.75rem 0.7rem; }
  .costs td:last-child { white-space: normal; }
}

/* Rows on navy backgrounds */
.section-navy .rows, .section-navy .rows li { border-color: #22395c; }
.section-navy .rows strong { color: #fff; }
.section-navy .rows span { color: var(--on-navy-muted); }

/* A split whose photo failed to load collapses to one column */
.split:has(> :only-child) { grid-template-columns: 1fr; }

/* Example agent questions: the words a controller would actually type */
.asks li { font-size: var(--step-1); font-weight: 600; line-height: 1.4; padding: 0.9rem 0 0.9rem 1.1rem; border-left: 3px solid var(--bolt); margin-bottom: 0.4rem; border-bottom: 0; }
.asks { border-top: 0; }

/* Diagrams that should render still, with no load animation */
.flow.static * { animation: none !important; stroke-dasharray: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; }

/* ---------- Review fixes ---------- */

/* Focus stays visible on navy, blue and dark-tier backgrounds */
.hero :focus-visible, .page-head :focus-visible, .section-navy :focus-visible,
.cta :focus-visible, .site-footer :focus-visible, .tier:nth-child(3) :focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Generated photos are labeled so nobody mistakes them for a client's site */
.banner-photo { position: relative; }
.banner-photo[data-note]::after {
  content: attr(data-note); position: absolute; right: 0.75rem; bottom: 0.6rem;
  font-size: 0.75rem; color: #fff; background: rgba(10, 29, 56, 0.6);
  padding: 0.15rem 0.5rem; border-radius: 3px;
}

/* The pipeline diagram becomes a plain list on phones, where SVG text gets too small */
.pipeline-list { display: none; }

@media (max-width: 600px) {
  .flow .table-label { font-size: 20px; }
  .flow .out-label, .flow .node-label { font-size: 22px; }
  .pipeline .flow { display: none; }
  .pipeline-list {
    display: grid; gap: 0.5rem; list-style: none; margin: 0; padding: 0; counter-reset: pipe;
    color: var(--on-navy); font-weight: 600;
  }
  .pipeline-list li { counter-increment: pipe; display: flex; gap: 0.75rem; align-items: center; }
  .pipeline-list li::before {
    content: counter(pipe); width: 1.6rem; height: 1.6rem; border-radius: 50%; flex: none;
    display: grid; place-items: center; background: var(--bolt); color: #fff; font-size: 0.85rem;
  }
}

/* Case studies page: a jump list, then one article per project */
.case-index { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin-bottom: 3rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.case-index a { font-weight: 600; }
.case { scroll-margin-top: 6rem; }
.case + .case { margin-top: 4rem; padding-top: 3.5rem; border-top: 1px solid var(--line); }
.case > h2 { margin-bottom: 0.3em; }
.case-who { color: var(--muted); font-size: var(--step-1); margin: 0; }
.prose h3 { margin-top: 2rem; }
.prose h3:first-child { margin-top: 0; }
