/* BoolSi launch site — single consolidated stylesheet.

   Default scope = landing page (index.html).
   Article page (seed-announcement.html) opts in via `body.article`.

   Sections in order: tokens · reset · chrome · type · primitives ·
   hero · landing sections · article · CTA · footer · animations · responsive. */

/* ===== Tokens ===== */

:root {
  color-scheme: light;
  --bg: #e8e5de;
  --bg-soft: #ddd9d0;
  --ink: #1f1d1b;
  --ink-soft: #5c574e;
  --rule: #c4bfb3;
  --accent: #d63a2f;
  --accent-soft: #d63a2f1a;
  --max: 1240px;
  --col: 680px;
}

/* ===== Reset & body ===== */

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

html { scroll-behavior: smooth; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

em { font-style: italic; }
strong { font-weight: 600; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Paper texture overlay — article page only */
body.article::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,0.015) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.015) 0%, transparent 50%);
  z-index: -1;
}

/* ===== Top bar ===== */

header.top {
  background: var(--ink);
  color: var(--bg);
  height: 64px;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.logo {
  display: inline-flex;
  align-items: center;
  height: 100%;
  line-height: 0;
}
.logo img {
  height: 75%;
  width: auto;
  display: block;
}

.top-meta { color: rgba(232, 229, 222, 0.6); }
.top-meta a {
  color: var(--bg);
  text-decoration: none;
  margin-left: 24px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.top-meta a:hover { border-bottom-color: var(--accent); }

/* ===== Type ===== */

h1 {
  font-family: 'Source Serif 4', serif;
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h1 em { font-style: italic; color: var(--accent); }
body.article h1 {
  font-size: clamp(36px, 6vw, 68px);
}

h2 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
h2 em { font-style: italic; color: var(--accent); }

.subhead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 50ch;
}
body.article .subhead {
  font-size: 22px;
  line-height: 1.45;
  max-width: 60ch;
}

/* ===== Primitives ===== */

/* Filing-style metadata: mono small caps with red // prefix */
.filing {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.filing span::before { content: "// "; color: var(--accent); }

/* Author byline — mirrors the .filing idiom */
.byline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.byline span::before { content: "// "; color: var(--accent); }

/* Sidebar section marker: § 0X label */
.marker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: sticky;
  top: 40px;
}
.marker .num {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

/* Buttons */
.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.accent { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn.accent:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn .arrow { transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ml → hw mapping rows (used on both pages) */
.map-list {
  list-style: none;
  border-top: 1px solid var(--rule);
  margin: 28px 0;
}
.map-list li {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.map-list .arr { color: var(--accent); text-align: center; }
.map-list .hw { color: var(--ink-soft); }

/* ===== Hero ===== */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 70px 40px 60px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 60px;
  align-items: center;
}
body.article .hero {
  padding: 100px 40px 80px;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: stretch;
}

/* Landing's split hero adds vertical margins inside .hero-text;
   the article hero relies on `gap` on .hero itself. */
.hero-text .filing { margin-bottom: 32px; }
.hero-text h1 { margin-bottom: 28px; }
.hero-text .subhead { margin-bottom: 40px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-scene { position: relative; width: 100%; }
.hero-scene img { width: 100%; height: auto; display: block; animation: float 6s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== Landing-only sections ===== */

/* Section shell: full-width content column */
.lp-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 90px 40px;
  border-top: 1px solid var(--rule);
}
.section-body { min-width: 0; }
.lp-section h2 { font-size: 36px; margin-bottom: 28px; }

/* Offering — process figure beside a compact feature grid */
.offering-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.offering-figure { margin: 0; }
.offering-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.offering-figure figcaption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin-top: 12px;
  text-align: center;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
}
.feature { display: flex; flex-direction: column; gap: 6px; }
.feature .fnum {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.feature h3 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.feature p { font-size: 15px; line-height: 1.5; color: var(--ink-soft); }

/* Results — benchmark table */
.results-lead,
.section-lead {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
  /* max-width: 62ch; */
  margin-bottom: 28px;
}
.benchmark {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--rule);
  font-family: 'JetBrains Mono', monospace;
}
.benchmark th,
.benchmark td {
  padding: 16px 12px;
  text-align: right;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.benchmark th:first-child,
.benchmark td:first-child { text-align: left; padding-left: 0; }
.benchmark th:last-child,
.benchmark td:last-child { padding-right: 0; }
.benchmark th {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.benchmark .speedup { color: var(--accent); }
.benchmark tr.peak td { font-weight: 700; }
.benchmark tr.peak .speedup { font-size: 17px; }
.benchmark-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin-top: 14px;
}

/* ===== Article page ===== */

article {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 40px 0;
}
article section {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 40px;
  padding: 60px 0;
  border-top: 1px solid var(--rule);
}
/* Article-page marker tweaks — applied inside <article> and in the CTA below it */
article .marker,
body.article .cta .marker {
  font-size: 13px;
  letter-spacing: 0.05em;
  top: 20px;
  padding-top: 4px;
  align-self: start;
}
article .marker .num,
body.article .cta .marker .num {
  margin-bottom: 6px;
  letter-spacing: 0.1em;
}

.body-col { max-width: var(--col); }

body.article p { margin-bottom: 20px; }
body.article p + p { margin-top: 0; }

.lead { font-size: 19px; line-height: 1.55; }

.thesis {
    font-weight: 500;
}

/* Author sign-off — closes the article body */
.signoff {
  margin-top: 40px;
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
}
.signoff span {
  display: block;
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
}


/* Inline media (video/img) inside article body */
.body-col figure.media { margin: 28px 0; }
.body-col figure.media video,
.body-col figure.media img,
.body-col figure.media object {
  width: 100%;
  height: auto;
  display: block;
}
.body-col figure.media figcaption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--accent);
  text-align: center;
  letter-spacing: 0.03em;
  margin-top: 10px;
}

/* Per-figure sizing: scope to the specific SVG so other animated figures
   can pick their own widths. */
#program-animated img {
  max-width: 70%;
  margin-left: auto;
  margin-right: auto;
}
#cpu img,
#cpu object {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
#fpga img,
#fpga object {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
#butterfly img,
#butterfly object {
  max-width: 70%;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 768px) {
  #program-animated img,
  #cpu img, #cpu object,
  #fpga img, #fpga object,
  #butterfly img, #butterfly object { max-width: 100%; }
}

sup {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  vertical-align: super;
  margin-left: 1px;
}
sup a { color: inherit; text-decoration: none; }

ul.invariants {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  counter-reset: inv;
}
ul.invariants li {
  padding: 14px 0 14px 32px;
  border-top: 1px solid var(--rule);
  position: relative;
  font-size: 17px;
  line-height: 1.5;
}
ul.invariants li:last-child { border-bottom: 1px solid var(--rule); }
ul.invariants li::before {
  content: counter(inv, decimal-leading-zero);
  counter-increment: inv;
  position: absolute;
  left: 0;
  top: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.footnotes {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 40px 80px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-soft);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.6;
}
.footnotes a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
}
.footnotes a:hover { border-bottom-color: var(--accent); }
.footnotes .fn {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 40px;
  padding: 8px 0;
}
.footnotes .fn-num { color: var(--accent); }

/* ===== Careers ===== */

/* Role detail bullet lists — red arrow markers echo .map-list / .btn */
.role-list { list-style: none; margin: 18px 0 28px; }
.role-list li {
  position: relative;
  padding: 7px 0 7px 28px;
  line-height: 1.55;
}
.role-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--accent);
}

/* Open-roles index — clickable rows */
.openings { list-style: none; border-top: 1px solid var(--rule); margin: 28px 0; }
.openings li { border-bottom: 1px solid var(--rule); }
.openings a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 26px 0;
  text-decoration: none;
  color: var(--ink);
  transition: padding-left 0.15s;
}
.openings a:hover { padding-left: 8px; }
.opening-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.opening-meta span::before { content: "// "; color: var(--accent); }
.openings h3 {
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.openings p { font-size: 16px; color: var(--ink-soft); line-height: 1.5; max-width: 60ch; }
.openings .arrow {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  transition: transform 0.15s;
}
.openings a:hover .arrow { transform: translateX(4px); }

/* Equal-opportunity statement — sits under an apply CTA, on the dark inversion */
.eo-statement {
  margin-top: 36px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(232, 229, 222, 0.55);
}

/* ===== CTA (dark inversion, both pages) ===== */

.cta {
  background: var(--ink);
  color: var(--bg);
  padding: 100px 40px;
  position: relative;
  overflow: hidden;
}
body.article .cta { padding: 60px 0; }

.cta-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  z-index: 1;
}
body.article .cta-inner { grid-template-columns: 80px 1fr; gap: 40px; padding: 0 40px; }

.cta .marker .num { color: rgba(232, 229, 222, 0.4); }
.cta h2 {
  color: var(--bg);
  font-size: 38px;
  margin-bottom: 24px;
}
.cta h2 em { color: #ff6b5e; }
.cta p {
  color: rgba(232, 229, 222, 0.85);
  font-size: 18px;
  margin-bottom: 32px;
  max-width: 52ch;
}
body.article .cta p { font-size: 19px; max-width: var(--col); }

.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
body.article .cta-actions { margin-top: 36px; gap: 16px; }

.cta .btn { border-color: var(--bg); color: var(--bg); }
.cta .btn.primary { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.cta .btn.accent { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.cta .btn:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.cta .btn.accent:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* ===== Footer ===== */

footer {
  padding: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.investors-row { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.investors-row span:first-child { color: var(--ink); }

/* ===== Animations ===== */

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-text > * { animation: rise 0.6s ease-out backwards; }
.hero-text > *:nth-child(1) { animation-delay: 0.05s; }
.hero-text > *:nth-child(2) { animation-delay: 0.15s; }
.hero-text > *:nth-child(3) { animation-delay: 0.25s; }
.hero-text > *:nth-child(4) { animation-delay: 0.35s; }

body.article .hero > * { animation: rise 0.6s ease-out backwards; }
body.article .hero > *:nth-child(1) { animation-delay: 0.05s; }
body.article .hero > *:nth-child(2) { animation-delay: 0.15s; }
body.article .hero > *:nth-child(3) { animation-delay: 0.25s; }

/* ===== Responsive ===== */

@media (max-width: 900px) {
  /* Landing 2-col grids collapse */
  .hero, .offering-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  /* Article keeps its 80px sidebar grid until 768px */
  body.article .cta-inner { grid-template-columns: 80px 1fr; gap: 40px; }
  .marker { position: static; }
  article .marker { position: sticky; }
}

@media (max-width: 768px) {
  header.top {
    height: auto;
    padding: 16px 20px;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .logo { height: auto; }
  .logo img { height: 28px; }
  .top-meta a { margin-left: 0; margin-right: 16px; }

  .hero { padding: 50px 20px 40px; }
  body.article .hero { padding: 60px 20px 40px; }

  .lp-section { padding: 60px 20px; }
  .lp-section h2, .cta h2 { font-size: 28px; }
  .feature-grid { grid-template-columns: 1fr; gap: 24px; }
  .benchmark th, .benchmark td { font-size: 13px; padding: 14px 8px; }

  .cta { padding: 60px 20px; }
  body.article .cta-inner { grid-template-columns: 1fr; gap: 16px; padding: 0 20px; }

  article { padding: 20px 20px 0; }
  article section { grid-template-columns: 1fr; gap: 16px; padding: 40px 0; }
  article .marker { position: static; padding-top: 0; }
  body.article h2 { font-size: 26px; }
  body.article .subhead { font-size: 18px; }

  .footnotes { padding: 30px 20px 60px; }
  .footnotes .fn { grid-template-columns: 1fr; gap: 4px; }

  .map-list { font-size: 12px; }
  .map-list li { grid-template-columns: 1fr 20px 1fr; }

  footer { padding: 30px 20px; }
}
