/* Shared structure of the project pages. Each page defines its own tokens and fonts in an inline :root block:
   --bg --surface --ink --muted --line --accent --on-accent --screen --screen-ink --screen-muted
   --display --body --mono --display-case --display-track --display-weight */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code { font: 400 .9em/1 var(--mono); }
p code, li code, td code { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: .12em .35em; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: 62ch; }

/* Header */
.top { padding-block: 20px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font: var(--display-weight) 21px/1 var(--display); letter-spacing: var(--display-track); text-transform: var(--display-case); }
.mark img, .mark svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: 6px 20px; flex-wrap: wrap; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding-block: 36px 0; }
.eyebrow { font: 600 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight); text-transform: var(--display-case); letter-spacing: var(--display-track); text-wrap: balance; }
.hero h1 { font-size: clamp(42px, 7.4vw, 92px); line-height: .95; margin: 0 0 22px; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(18px, 2.1vw, 21px); color: var(--muted); margin: 0 0 30px; max-width: 58ch; text-wrap: pretty; }
.lead strong { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.facts { list-style: none; margin: 40px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 40px; }
.facts li { display: grid; gap: 2px; }
.facts span { font: 600 11px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts b { font-weight: 600; font-variant-numeric: tabular-nums; }

.showcase { padding-block: 40px 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 600 15px/1 var(--body);
  padding: 13px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* Screen frame for demos */
.monitor { background: var(--screen); border-radius: 14px; padding: 10px; margin: 0; }
.monitor .bar { display: flex; align-items: center; gap: 8px; padding: 2px 6px 10px; font: 400 12px/1 var(--mono); color: var(--screen-muted); }
.monitor .bar::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.monitor img { border-radius: 6px; width: 100%; height: auto; background: #000; }
.monitor figcaption { font-size: 13px; color: var(--screen-muted); padding: 10px 6px 2px; line-height: 1.45; }

/* Sections */
.section { padding-block: 96px 0; scroll-margin-top: 12px; }
.section > .wrap > h2, .section-head h2 { font-size: clamp(34px, 5vw, 58px); line-height: 1; margin: 0 0 14px; }
.section-head { margin-bottom: 40px; }
.section-head p { color: var(--muted); margin: 0; max-width: 62ch; font-size: 18px; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 40px 48px; }
.cols > * { min-width: 0; }
.group h3 { font-size: 26px; line-height: 1.1; margin: 0 0 14px; padding-top: 14px; border-top: 2px solid var(--ink); }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.list li { padding-left: 20px; position: relative; color: var(--muted); }
.list li::before { content: ""; position: absolute; left: 0; top: .66em; width: 9px; height: 2px; background: var(--accent); }
.list b { color: var(--ink); font-weight: 600; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.split h2 { font-size: clamp(34px, 5vw, 58px); line-height: 1; margin: 0 0 16px; }
.split p { color: var(--muted); margin: 0 0 16px; }

/* Ordered procedures */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); grid-row: span 2; font: var(--display-weight) 34px/1 var(--display); color: var(--accent); }
.steps b { font-weight: 600; }
.steps span { color: var(--muted); }

/* Command blocks */
.cmd { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 0 0 16px; min-width: 0; }
.cmd header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); font: 600 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cmd button { font: 600 12px/1 var(--body); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; cursor: pointer; flex: none; }
.cmd button:hover { border-color: var(--accent); }
.cmd pre { margin: 0; padding: 14px; overflow-x: auto; font: 400 13px/1.65 var(--mono); }
.cmd .p { color: var(--muted); user-select: none; }
.cmd .c { color: var(--muted); }

/* Tables */
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font: 600 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 16px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { font-weight: 600; white-space: nowrap; }
.table td.muted { color: var(--muted); }

/* Logo chips for integrations */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; background: var(--surface); }

/* Closing call to action */
.closing { padding-block: 104px 0; }
.closing .box { background: var(--screen); color: var(--screen-ink); border-radius: 18px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; }
@media (max-width: 880px) { .closing .box { grid-template-columns: minmax(0, 1fr); } }
.closing h2 { font-size: clamp(34px, 5vw, 56px); line-height: 1; margin: 0 0 12px; color: var(--screen-ink); }
.closing p { color: var(--screen-muted); margin: 0 0 22px; }
.closing .cmd { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); color: var(--screen-ink); margin: 0; }
.closing .cmd header { border-color: rgba(255,255,255,.12); color: var(--screen-muted); }
.closing .cmd button { color: var(--screen-ink); border-color: rgba(255,255,255,.2); }
.closing .cmd .p, .closing .cmd .c { color: var(--screen-muted); }
.closing .btn { background: transparent; color: var(--screen-ink); border-color: rgba(255,255,255,.2); }
.closing .btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

footer { padding-block: 72px 56px; color: var(--muted); font-size: 15px; }
footer .wrap > div { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; }
footer a { color: var(--ink); }
