/* Layout: bright, sunlit marketing site; left-aligned text over a dawn-to-savanna hero holding the Equipment Train + Lab Train scene; 1160px column. */
:root {
  --bg: #f7f8f5;          /* morning light */
  --surface: #ffffff;
  --ink: #12211c;         /* deep forest */
  --muted: #4f5e58;
  --line: #d8e0dc;
  --accent: #d4521c;      /* laterite orange */
  --accent-ink: #ffffff;
  --sun: #f2a51a;         /* machine amber */
  --green: #0e6b54;       /* growth green */
  --green-soft: #e3f1ec;
  --sun-soft: #fff1d6;
  --hero-top: #fff3dc;
  --hero-bottom: #e4f1ec;
  --band: #12211c;
  --band-ink: #f7f8f5;
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Public Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1714; --surface: #16211d; --ink: #e8efec; --muted: #9eb0a9; --line: #2a3833;
    --accent: #ef7440; --accent-ink: #12211c; --green: #4cc29d; --green-soft: #183029; --sun-soft: #2d2513;
    --hero-top: #1d2a25; --hero-bottom: #12201b; --band: #e8efec; --band-ink: #12211c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1714; --surface: #16211d; --ink: #e8efec; --muted: #9eb0a9; --line: #2a3833;
  --accent: #ef7440; --accent-ink: #12211c; --green: #4cc29d; --green-soft: #183029; --sun-soft: #2d2513;
  --hero-top: #1d2a25; --hero-bottom: #12201b; --band: #e8efec; --band-ink: #12211c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
svg text { font-family: var(--mono); }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.06em; line-height: 1; }
.brand-tag { display: block; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; color: var(--muted); margin-top: 3px; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; padding-block: 4px; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--sun); font-weight: 600; }
.nav .nav-cta { background: var(--accent); color: var(--accent-ink); padding: 6px 14px; border-radius: 999px; border: 0; font-weight: 600; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--hero-top), var(--hero-bottom)); }
.hero .wrap { padding-block: clamp(40px, 6vw, 72px) 0; }
.hero-text { max-width: 46rem; }
.eyebrow { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); margin: 0 0 14px; font-weight: 500; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.04; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.7rem, 6vw, 4.8rem); letter-spacing: 0.005em; }
h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 1.18rem; max-width: 38em; margin: 20px 0 0; }
.hero .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.scene { margin-top: clamp(24px, 4vw, 40px); }
.scene svg { width: 100%; height: auto; display: block; }
.page-hero .wrap { padding-block: clamp(40px, 6vw, 72px); }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); max-width: 18em; }

.btn { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1.12rem; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; padding: 12px 24px; border-radius: 999px; border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.light { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }

/* Legend under the scene */
.legend { list-style: none; margin: 0; padding: 18px 0 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 20px; font-size: 0.92rem; }
.legend li { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.legend .n { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-grid; place-items: center; font-family: var(--mono); font-size: 0.75rem; background: var(--sun); color: #12211c; }
.legend .n.lab { background: var(--green); color: #fff; }
.legend b { font-weight: 600; }

/* Sections */
section.block { padding-block: clamp(52px, 7vw, 92px); }
section.block.alt { background: var(--surface); border-block: 1px solid var(--line); }
section.block.sun { background: var(--sun-soft); }
section.block.green { background: var(--green-soft); }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); margin-bottom: 16px; }
h3 { font-size: 1.45rem; margin-bottom: 8px; }
.prose { max-width: 42em; }
.prose p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 44em; margin: 0 0 28px; }
.muted { color: var(--muted); }
.label { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin: 0 0 10px; font-weight: 500; }

/* Figures strip */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 3px solid var(--ink); }
.figure { padding: 22px 22px 4px 0; }
.figure + .figure { padding-left: 22px; border-left: 1px solid var(--line); }
.figure .num { font-family: var(--display); font-weight: 700; font-size: clamp(2.5rem, 4.6vw, 3.6rem); line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.figure .num.g { color: var(--green); }
.figure p { margin: 8px 0 0; color: var(--muted); font-size: 0.98rem; }
.source { font-size: 0.85rem; color: var(--muted); margin-top: 18px; }

/* Grids */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 48px; align-items: start; }
.split > * { min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); padding: 24px; border-radius: 14px; min-width: 0; }
.card p { margin: 0; color: var(--muted); }
.card .tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); margin-bottom: 10px; display: block; }
.card .icon { width: 44px; height: 44px; margin-bottom: 14px; display: block; }
.card ul { margin: 12px 0 0; padding-left: 1.1rem; color: var(--muted); }
.card li { margin-bottom: 4px; }

/* Compare: CAPEX vs OPEX */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.compare .col { border-radius: 14px; padding: 26px; min-width: 0; }
.compare .old { background: var(--surface); border: 1px dashed var(--line); }
.compare .new { background: var(--ink); color: var(--bg); }
.compare h3 { margin-bottom: 14px; }
.compare ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.compare li { padding-left: 26px; position: relative; }
.compare .old li::before { content: "×"; position: absolute; left: 0; color: var(--muted); font-weight: 700; }
.compare .new li::before { content: "✓"; position: absolute; left: 0; color: var(--sun); font-weight: 700; }
.compare .old { color: var(--muted); }

/* Road types */
.roads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.road { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-width: 0; }
.road svg { display: block; width: 100%; height: auto; }
.road .txt { padding: 20px 24px 24px; }
.road .txt p { margin: 0; color: var(--muted); }

/* Steps (a real sequence) */
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.steps li { padding: 0 20px 0 0; }
.steps li::before { content: ""; display: block; height: 6px; background: var(--ink); margin-bottom: 16px; border-radius: 3px; }
.steps li:first-child::before { background: var(--sun); }
.steps .pk { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.06em; }
.steps h3 { font-size: 1.35rem; margin: 6px 0; }
.steps p { margin: 0; font-size: 0.97rem; color: var(--muted); }

/* Corridors */
.corridor { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.corridor .km { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1; color: var(--green); font-variant-numeric: tabular-nums; }
.corridor p { margin: 0; color: var(--muted); }
.corridor .src { font-size: 0.82rem; margin-top: auto; padding-top: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { font-family: var(--display); font-weight: 600; font-size: 1.1rem; letter-spacing: 0.03em; padding: 6px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { padding-left: 24px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 12px; border-radius: 50%; background: var(--sun); }

.callout { background: var(--green-soft); border-left: 4px solid var(--green); padding: 20px 24px; max-width: 48em; border-radius: 0 10px 10px 0; }
.callout p { margin: 0; }

.cta-band { background: var(--band); color: var(--band-ink); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 44px; }
.cta-band h2 { margin: 0; color: var(--band-ink); }
.cta-band p { margin: 6px 0 0; color: var(--band-ink); opacity: 0.8; }

/* Contact */
.contact-card { background: var(--surface); border: 1px solid var(--line); padding: 28px; display: grid; gap: 18px; border-radius: 14px; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.email { font-family: var(--mono); font-size: 1.15rem; word-break: break-all; }
.copy { font: inherit; font-size: 0.85rem; padding: 6px 14px; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; cursor: pointer; }

.site-footer { background: var(--band); color: var(--band-ink); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 28px; opacity: 0.85; }
.site-footer a { color: var(--band-ink); }

@media (max-width: 920px) {
  .split, .compare, .roads { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure:nth-child(3) { padding-left: 0; border-left: 0; }
  .figure:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4, .figures, .steps { grid-template-columns: minmax(0, 1fr); }
  .figure + .figure { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .brand-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 700px) {
  .scene { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .scene svg { min-width: 760px; }
}
.lang { font-family: var(--mono); font-size: 0.8rem; display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang a, .lang span { padding: 4px 10px; text-decoration: none; color: var(--muted); border: 0 !important; }
.lang > span { background: var(--ink); color: var(--surface); }
.card.villain { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card.villain .tag { color: var(--accent); }
a.card.persona { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s; }
a.card.persona:hover { border-color: var(--accent); transform: translateY(-2px); }
a.card.persona .more { margin-top: auto; padding-top: 12px; color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.card[id] { scroll-margin-top: 96px; }
/* Justified text, site-wide (founder's choice) */
.prose p, .lede, .hero p.lead, .card p, .card li, .compare li, .corridor p, .road .txt p, .steps p, .callout p, .ticks li, .muted, .form .check {
  text-align: justify; -webkit-hyphens: auto; hyphens: auto;
}
/* Contact form */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: grid; gap: 16px; min-width: 0; }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; min-width: 0; }
.form input[type=text], .form input[type=email], .form select, .form textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0;
}
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.form textarea { resize: vertical; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.form .check input { margin-top: 4px; }
.form .btn { justify-self: start; }
.form .btn:disabled { opacity: .6; cursor: progress; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; min-height: 1.5em; font-weight: 600; }
.form-status.ok { color: var(--green); }
.form-status.err { color: var(--accent); }
.paths { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-anchor, #form { scroll-margin-top: 80px; }
@media (max-width: 920px) { .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .paths, .form .row { grid-template-columns: minmax(0, 1fr); } }

.block.tight { padding-top: 32px; padding-bottom: 32px; }
a.more { color: var(--accent); font-weight: 600; }
.card .icon { margin-bottom: 8px; }
.grid-3 .card.persona .source { margin: 10px 0 0; }

/* spec tables */
.tablewrap { overflow-x: auto; margin-top: 28px; }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.97rem; background: var(--surface); border: 1px solid var(--line); }
table.spec th, table.spec td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; color: var(--ink); }
table.spec thead th { background: var(--band); color: var(--band-ink); font-weight: 600; }
table.spec tbody th { width: 20%; font-weight: 600; background: var(--green-soft); }
@media (max-width: 720px) { table.spec { font-size: .9rem; min-width: 560px; } }
.grid-4 .card li, .grid-3 .card li { text-align: left; hyphens: auto; }

/* logo */
.brand-logo { height: 40px; width: auto; display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { background: #f3f5ef; border-radius: 8px; padding: 3px; } }
:root[data-theme="dark"] .brand-logo { background: #f3f5ef; border-radius: 8px; padding: 3px; }
