/* FuelInject website — Bauhaus design system, mirrored from the app's
   lib/design_system tokens (colors, Space Grotesk, 4-based spacing,
   near-square radii, stroke weights). */

:root {
  /* Base */
  --off-white: #F4F1E8;
  --black: #111111;
  --charcoal: #2A2A2A;
  --gray: #A6A6A6;
  --light-gray: #D9D6CE;
  /* Meaning */
  --red: #D7262E;     /* critical / destructive */
  --blue: #1557C0;    /* information */
  --yellow: #F2C230;  /* attention */

  /* Palette (light) */
  --background: var(--off-white);
  --surface: #FFFFFF;
  --structure: var(--black);
  --text: var(--black);
  --text-muted: var(--charcoal);
  --divider: var(--light-gray);

  /* Spacing */
  --xxs: 4px; --xs: 8px; --sm: 12px; --md: 16px;
  --lg: 24px; --xl: 32px; --xxl: 48px; --xxxl: 64px;

  /* Shape + stroke */
  --r-sharp: 2px; --r-small: 4px;
  --hairline: 1px; --bold: 2px; --heavy: 4px;

  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #0C0C0C;
    --surface: #1C1C1C;
    --structure: #EDEAE0;
    --text: #EDEAE0;
    --text-muted: var(--gray);
    --divider: #2E2E2E;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --background: #0C0C0C;
  --surface: #1C1C1C;
  --structure: #EDEAE0;
  --text: #EDEAE0;
  --text-muted: var(--gray);
  --divider: #2E2E2E;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: var(--hairline); }
a:hover { text-decoration-thickness: var(--bold); }
:focus-visible { outline: var(--bold) solid var(--blue); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--lg); }
@media (max-width: 600px) { .wrap { padding: 0 var(--md); } }

/* ── Structure ───────────────────────────────────────────── */

.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-header { border-top: var(--heavy) solid var(--structure); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--md); padding-top: var(--md); padding-bottom: var(--md);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--sm);
  color: var(--text); text-decoration: none;
  font-weight: 700; letter-spacing: 1.2px; font-size: 14px;
}
.brand svg { display: block; }

/* Hero: oversized type is the architecture of the page. */
.hero { padding: var(--xxl) 0 var(--xl); border-bottom: var(--bold) solid var(--structure); }
.hero h1 {
  margin: var(--sm) 0 var(--xl);
  font-size: clamp(48px, 11vw, 112px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -2px;
}
.hero h1 .dot { color: var(--red); }
.meta { display: flex; flex-wrap: wrap; gap: 0; }
.meta > div { padding-right: var(--lg); margin-right: var(--lg); border-right: var(--hairline) solid var(--divider); }
.meta > div:last-child { border-right: 0; }
.meta .value { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.1; margin-top: var(--xxs); }
@media (max-width: 600px) {
  .meta > div { padding-right: var(--md); margin-right: var(--md); }
  .meta .value { font-size: 20px; }
}

/* Short version: geometric grid of the six things that matter most. */
.summary { padding: var(--xxl) 0; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--hairline) solid var(--structure);
  border-left: var(--hairline) solid var(--structure);
  margin-top: var(--md);
}
.summary-grid > div {
  padding: var(--lg);
  border-right: var(--hairline) solid var(--structure);
  border-bottom: var(--hairline) solid var(--structure);
  background: var(--surface);
}
.summary-grid h3 { margin: var(--md) 0 var(--xs); font-size: 15px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.summary-grid p { margin: 0; font-size: 15px; color: var(--text-muted); }
@media (max-width: 820px) { .summary-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .summary-grid { grid-template-columns: 1fr; } }

.glyph { width: 24px; height: 24px; display: block; }

/* Body: index column + document column. */
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--xxl); padding-bottom: var(--xxxl); }
.doc > article { min-width: 0; } /* let wide tables scroll inside .table-scroll */
.toc { position: sticky; top: var(--lg); align-self: start; }
.toc ol { list-style: none; margin: var(--sm) 0 0; padding: 0; border-left: var(--bold) solid var(--structure); }
.toc a {
  display: grid; grid-template-columns: 28px 1fr;
  padding: 6px 0 6px var(--sm);
  color: var(--text); text-decoration: none; font-size: 14px;
}
.toc a span { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.toc a:hover { background: var(--surface); }

@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: var(--lg); }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: var(--lg); }
}
@media (max-width: 520px) { .toc ol { columns: 1; } }

section.part {
  display: grid; grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--md);
  padding: var(--xl) 0;
  border-top: var(--hairline) solid var(--divider);
  scroll-margin-top: var(--md);
}
section.part:first-of-type { border-top: 0; padding-top: 0; }
.num { font-size: 28px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  section.part { grid-template-columns: minmax(0, 1fr); gap: var(--xs); }
  .num { font-size: 20px; }
}

.part h2 { margin: 0 0 var(--md); font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.2px; text-transform: uppercase; }
.part h3 { margin: var(--lg) 0 var(--xs); font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.part p, .part li { max-width: var(--measure); font-size: 15px; line-height: 1.6; }
.part p { margin: 0 0 var(--sm); }
.part ul { margin: 0 0 var(--sm); padding-left: 0; list-style: none; }
.part li { position: relative; padding-left: var(--lg); margin-bottom: var(--xs); }
.part li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 7px; height: 7px; background: var(--structure);
}
.muted { color: var(--text-muted); }

/* Data tables: label header, hairline rows, horizontal scroll inside on small screens. */
.table-scroll { overflow-x: auto; margin: var(--md) 0; border-top: var(--bold) solid var(--structure); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th {
  text-align: left; vertical-align: bottom;
  padding: var(--sm) var(--sm) var(--xs) 0;
  font-size: 11px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted);
  border-bottom: var(--hairline) solid var(--structure);
}
td { padding: var(--sm) var(--sm) var(--sm) 0; vertical-align: top; border-bottom: var(--hairline) solid var(--divider); }
td:first-child { font-weight: 500; }

/* Callouts: a coloured bar carries the meaning, not a tinted box. */
.callout {
  margin: var(--lg) 0;
  padding: var(--md) var(--lg);
  background: var(--surface);
  border-left: var(--heavy) solid var(--blue);
  max-width: calc(var(--measure) + 48px);
}
.callout.attention { border-left-color: var(--yellow); }
.callout.critical { border-left-color: var(--red); }
.callout p:last-child { margin-bottom: 0; }

.steps { counter-reset: step; margin: var(--md) 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; padding-left: 40px; }
.steps li::before {
  content: counter(step);
  left: 0; top: 0; width: 26px; height: 26px;
  background: var(--structure); color: var(--background);
  font-size: 13px; font-weight: 700; line-height: 26px; text-align: center;
}

.site-footer { border-top: var(--heavy) solid var(--structure); padding: var(--xl) 0 var(--xxl); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--md); }
.site-footer p { margin: 0; font-size: 13px; color: var(--text-muted); }

/* ── Site chrome: navigation + buttons ──────────────────── */

.site-nav { display: flex; align-items: center; gap: var(--lg); }
.site-nav a:not(.btn) {
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: var(--xxs) 0; border-bottom: var(--bold) solid transparent;
}
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--structure); }
@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { gap: var(--md); flex-wrap: wrap; }
  .site-nav .nav-optional { display: none; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--xs);
  min-height: 48px; padding: 0 var(--lg);
  border: var(--bold) solid var(--structure); border-radius: var(--r-sharp);
  background: var(--structure); color: var(--background);
  font: 700 13px/1 var(--font); letter-spacing: 1.2px; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: transform 120ms ease-out;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn.secondary { background: transparent; color: var(--structure); }
.btn.small { min-height: 36px; padding: 0 var(--md); font-size: 11px; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sm); }

/* ── Home ──────────────────────────────────────────────── */

.home-hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--xxl); align-items: center;
  padding: var(--xxxl) 0;
}
.home-hero h1 {
  margin: var(--sm) 0 var(--lg);
  font-size: clamp(52px, 9vw, 104px); line-height: 0.95; font-weight: 700; letter-spacing: -2px;
}
.home-hero h1 .dot { color: var(--red); }
.lede { font-size: 19px; line-height: 1.5; max-width: 34ch; margin: 0 0 var(--xl); color: var(--text-muted); }
@media (max-width: 900px) { .home-hero { grid-template-columns: minmax(0, 1fr); gap: var(--xl); padding: var(--xxl) 0; } }

/* Instrument panel illustration */
.instrument { background: var(--surface); border: var(--hairline) solid var(--structure); }
.instrument-head { display: flex; justify-content: space-between; padding: var(--md) var(--lg); border-bottom: var(--hairline) solid var(--divider); }
.gauge { position: relative; padding: var(--md) var(--lg) 0; }
.gauge svg { display: block; width: 100%; max-width: 320px; margin: 0 auto; }
.gauge .track { stroke: var(--divider); }
.gauge .fill { stroke: var(--structure); stroke-dasharray: 100; stroke-dashoffset: 29; }
.gauge .ticks line { stroke: var(--text-muted); stroke-width: 2; }
.gauge-readout { position: absolute; left: 0; right: 0; top: 46%; text-align: center; }
.gauge-readout .metric { display: block; font-size: 56px; font-weight: 700; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.instrument-row { display: grid; grid-template-columns: 1fr 1fr; border-top: var(--hairline) solid var(--divider); }
.instrument-row > div { padding: var(--md) var(--lg); }
.instrument-row > div + div { border-left: var(--hairline) solid var(--divider); }
.instrument-row .value { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.alert-block {
  display: flex; align-items: center; gap: var(--sm);
  padding: var(--md) var(--lg); border-top: var(--hairline) solid var(--divider);
  font-weight: 700; font-size: 14px; letter-spacing: 1.2px; text-transform: uppercase;
}
.alert-block::before { content: ""; width: 14px; height: 14px; background: var(--yellow); flex: none; }
.caption { display: block; margin-top: var(--xs); font-size: 12px; color: var(--text-muted); }

/* Inverted statement band */
.band { background: var(--structure); color: var(--background); padding: var(--xxl) 0; }
.band p {
  margin: 0; font-size: clamp(28px, 5.5vw, 56px); line-height: 1.05; font-weight: 700; letter-spacing: -1px;
}
.band .accent { color: var(--yellow); }

.block { padding: var(--xxxl) 0; border-bottom: var(--hairline) solid var(--divider); }
.block-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--xl); align-items: end; margin-bottom: var(--xl); }
.block-head h2 { margin: var(--sm) 0 0; font-size: clamp(32px, 5vw, 48px); line-height: 1; letter-spacing: -1px; text-transform: uppercase; }
.block-head p { margin: 0; color: var(--text-muted); max-width: 44ch; }
@media (max-width: 720px) { .block-head { grid-template-columns: minmax(0, 1fr); gap: var(--sm); } .block { padding: var(--xxl) 0; } }

.feature-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: var(--bold) solid var(--structure);
}
.feature-grid > div { padding: var(--lg) var(--lg) var(--xl) 0; border-bottom: var(--hairline) solid var(--divider); }
.feature-grid > div:not(:nth-child(3n+1)) { padding-left: var(--lg); border-left: var(--hairline) solid var(--divider); }
.feature-grid .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--lg); }
.feature-grid h3 { margin: 0 0 var(--xs); font-size: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.feature-grid p { margin: 0; font-size: 15px; color: var(--text-muted); }
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid > div:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .feature-grid > div:nth-child(2n) { padding-left: var(--lg); border-left: var(--hairline) solid var(--divider); }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-grid > div:nth-child(2n) { padding-left: 0; border-left: 0; }
}

.step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--xl); counter-reset: s; }
.step-grid > div { border-top: var(--heavy) solid var(--structure); padding-top: var(--md); }
.step-grid .n { display: block; font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -1px; margin-bottom: var(--md); }
.step-grid h3 { margin: 0 0 var(--xs); font-size: 18px; text-transform: uppercase; }
.step-grid p { margin: 0; color: var(--text-muted); font-size: 15px; }
@media (max-width: 720px) { .step-grid { grid-template-columns: minmax(0, 1fr); gap: var(--lg); } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--xxl); }
@media (max-width: 720px) { .split { grid-template-columns: minmax(0, 1fr); gap: var(--lg); } }
.checklist { list-style: none; margin: 0; padding: 0; border-top: var(--bold) solid var(--structure); }
.checklist li { display: grid; grid-template-columns: 32px 1fr; padding: var(--md) 0; border-bottom: var(--hairline) solid var(--divider); }
.checklist li::before { content: ""; width: 12px; height: 12px; margin-top: 6px; background: var(--blue); }
.checklist strong { display: block; text-transform: uppercase; letter-spacing: 0.4px; }
.checklist span { color: var(--text-muted); font-size: 15px; }

.roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--md); }
.roadmap > div { border: var(--hairline) dashed var(--text-muted); padding: var(--lg); }
.roadmap h3 { margin: var(--xs) 0; font-size: 16px; text-transform: uppercase; }
.roadmap p { margin: 0; font-size: 14px; color: var(--text-muted); }
@media (max-width: 720px) { .roadmap { grid-template-columns: minmax(0, 1fr); } }

/* FAQ: + turns into × when open — the motion states what happened. */
.faq { border-top: var(--bold) solid var(--structure); }
.faq details { border-bottom: var(--hairline) solid var(--divider); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: var(--md);
  padding: var(--md) 0; font-weight: 700; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 28px; height: 28px; line-height: 26px; text-align: center;
  border: var(--bold) solid var(--structure); font-size: 20px; font-weight: 500;
  transition: transform 200ms ease-out;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 var(--md); max-width: var(--measure); color: var(--text-muted); }

.cta { padding: var(--xxxl) 0; text-align: left; }
.cta h2 { margin: 0 0 var(--lg); font-size: clamp(40px, 8vw, 88px); line-height: 0.95; letter-spacing: -2px; }

/* Footer columns */
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--xl); width: 100%; }
.footer-grid h4 { margin: 0 0 var(--sm); font-size: 11px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: var(--xs); font-size: 14px; }
.footer-grid li a { color: var(--text); text-decoration: none; }
.footer-grid li a:hover { text-decoration: underline; }
.footer-base { width: 100%; margin-top: var(--xl); padding-top: var(--md); border-top: var(--hairline) solid var(--divider); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Simple centred page (404) */
.plain { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; padding: var(--xxxl) 0; }
.plain h1 { margin: var(--sm) 0 var(--md); font-size: clamp(64px, 14vw, 160px); line-height: 0.9; letter-spacing: -3px; }

@media (prefers-reduced-motion: reduce) {
  .btn, .faq summary::after { transition: none; }
}
