/* ErgoLite landing page — palette derived from the comic:
   slate gray / surgical blue / cool white  → the "before"
   amber #E8A817                            → headlamp light
   deep purple #3D35C7                      → ErgoLite */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --white: #f4f7fa;          /* cool white */
  --ink: #1e2634;            /* near-black slate */
  --slate: #4a5568;          /* mid slate */
  --slate-light: #94a3b8;
  --slate-dark: #232b3a;     /* evidence section bg */
  --blue: #5b7a9d;           /* surgical blue */
  --amber: #e8a817;          /* headlamp light */
  --purple: #3d35c7;         /* ErgoLite */
  --purple-ink: #2a2496;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --wrap: 62rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;         /* 17px */
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--purple); }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- header ---------- */

.site-head {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.wordmark {
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.head-note {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------- hero / comic ---------- */

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}

.lede {
  font-size: 1rem;
  color: var(--slate);
  margin-bottom: 1.5rem;
}

/* Each comic row is its own grid; the column fractions follow the art's
   panel aspect ratios so both images in a row land at the same height.
   Middle row splits 59/41 (panel 4 with inset + citation vs purple panel). */
.comic {
  background: #fff;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(30, 38, 52, 0.10), 0 12px 40px rgba(30, 38, 52, 0.12);
}

.panel { width: 100%; }

.crow {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.crow-half { grid-template-columns: 1fr 1fr; }
.crow-mid  { grid-template-columns: 59fr 41fr; }

/* mobile: stack the 7 panels full-width in reading order */
@media (max-width: 720px) {
  .comic { padding: 10px; }
  .crow { display: block; margin-top: 0; }
  .panel { margin-bottom: 10px; }
  .crow:last-child .panel:last-child { margin-bottom: 0; }
}

/* ---------- section scaffolding ---------- */

.kicker {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.kicker span {
  margin-right: 0.75em;
  opacity: 0.55;
}

/* ---------- evidence: the cold gray world ---------- */

.evidence {
  background: var(--slate-dark);
  color: #dde5ee;
  padding: 4.5rem 0 5rem;
}

.evidence .kicker { color: var(--slate-light); }

.stat-lead { margin-bottom: 3rem; max-width: 40rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 4rem;
}

@media (max-width: 720px) {
  .stat-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.stat-fig {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 3.25rem;
  line-height: 1.1;
  color: var(--amber);           /* headlamp light in the gray world */
  margin-bottom: 0.5rem;
}

.stat-lead .stat-fig { font-size: 4.5rem; }

.stat-body { max-width: 34rem; }

.stat-body strong { color: #fff; font-weight: 600; }

.stat-src {
  font-size: 0.875rem;
  color: var(--slate-light);
  margin-top: 0.5rem;
}

.stat-src cite { font-style: italic; }

/* ---------- technology: purple arrives ---------- */

.technology {
  background: var(--purple);
  color: #eceafd;
  padding: 4.5rem 0 5rem;
}

.technology .kicker { color: #b9b3f2; }

.patents { list-style: none; }

.patent { margin-bottom: 2rem; }

.patent-num {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 0.75rem;
}

.patent-title { max-width: 40rem; }

.tech-body {
  max-width: 40rem;
  font-size: 1.1875rem;
  color: #fff;
  margin-bottom: 2.5rem;
}

.tech-facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 3rem;
  max-width: 46rem;
}

@media (max-width: 720px) {
  .tech-facts { grid-template-columns: 1fr; }
}

.tech-facts li {
  padding-left: 1.1rem;
  border-left: 3px solid var(--amber);
  font-size: 0.9375rem;
}

/* scroll-reveal on the purple turn */
.reveal .wrap {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in .wrap {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal .wrap { opacity: 1; transform: none; transition: none; }
}

/* ---------- the ask ---------- */

.ask {
  padding: 4.5rem 0 5rem;
}

.ask .kicker { color: var(--blue); }

.ask h2 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 2rem;
  max-width: 30rem;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border-radius: 4px;
}

.btn-primary {
  background: var(--purple);
  color: #fff;
}

.btn-primary:hover { background: var(--purple-ink); }

.btn-secondary {
  color: var(--purple);
  border: 2px solid var(--purple);
  padding: calc(0.9rem - 2px) calc(1.6rem - 2px);
}

.btn-secondary:hover { background: rgba(61, 53, 199, 0.07); }

.cta-note {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--slate);
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid #dbe3ec;
  padding: 1.5rem 1.25rem 2rem;
  max-width: var(--wrap);
  margin: 0 auto;
  font-size: 0.875rem;
  color: var(--slate);
}

.site-foot a { color: var(--slate); }
