/* Layout: one hero band. Copy and the survey button on the left; the brand's signature
   template-to-PDF picture on the right (the template in a code window, then the page it
   generates). Stacks to one column on phones.
   Single deliberate theme: Forest (dark), the site palette of the Tardigrade design system. */
:root {
  --surface: #2d353b;
  --surface-sunken: #232a2e;
  --line: #3d484d;
  --line-strong: #859289;
  --ink: #d3c6aa;
  --ink-muted: #a7b1a8;
  --moss: #a7c080;
  --moss-hover: #b8cf92;
  --moss-soft: #384339;
  --on-moss: #232a2e;
  --ember: #e69875;
  --sky: #7fbbb3;
  --ember-paper: #a65210;
  --sheet: #fdf6e3;
  --sheet-ink: #3f4d55;
  --sheet-line: #e6e2cc;
  --shadow-sheet: 0 30px 60px rgba(0, 0, 0, 0.45);

  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --doc-serif: "Source Serif 4", Georgia, serif;
  --doc-sans: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--surface); }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--moss); }
a:hover { color: var(--moss-hover); }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }

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

/* Nav */
.nav { border-bottom: 1px solid var(--line); }
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.wordmark { font-family: var(--mono); font-weight: 700; font-size: 22px; line-height: 22px; letter-spacing: -0.5px; }
.lang { display: flex; gap: 4px; padding: 4px; background: var(--surface-sunken); border-radius: 8px; }
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 400 13px/18px var(--mono);
  min-height: 36px;
  min-width: 44px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--ink-muted);
  text-decoration: none;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { background: var(--moss); color: var(--on-moss); font-weight: 700; }

/* Hero */
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  padding-block: 48px 64px;
}
@media (min-width: 960px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
    padding-block: 80px 96px;
  }
}
.copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 400 13px/18px var(--mono);
  color: var(--moss);
  background: var(--moss-soft);
  padding: 7px 12px;
  border-radius: 999px;
}
h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--moss); }
.lead { margin: 0; font-size: 20px; line-height: 31px; color: var(--ink-muted); max-width: 36em; }
.lead code { font-family: var(--mono); font-size: 0.85em; color: var(--ink); }

.join {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-sunken);
}
.join p { margin: 0; color: var(--ink-muted); max-width: 34em; }
.join strong { color: var(--ink); font-weight: 500; }
.cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 8px;
  background: var(--moss);
  color: var(--on-moss);
  font-weight: 700;
  text-decoration: none;
}
.cta:hover { background: var(--moss-hover); color: var(--on-moss); }
.contact { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.contact a { font-family: var(--mono); font-size: 13px; }

/* Template to PDF: the code window, a "generate" step, then the printed page it produces.
   Bound values share the ember colour in both, so the eye maps each one across. */
.art { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 560px; width: 100%; justify-self: center; }
.window {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  max-width: 560px;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font: 400 13px/18px var(--mono);
  color: var(--ink-muted);
}
.dots { display: flex; gap: 6px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dialect { margin-left: auto; font-size: 11px; letter-spacing: 1px; padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 4px; }
pre {
  margin: 0;
  padding: 20px 24px 24px;
  overflow-x: auto;
  font: 400 14px/26px var(--mono);
  color: var(--ink-muted);
}
.t-tag { color: var(--moss); }
.t-val { color: var(--ember); }
.t-mk { color: var(--sky); }

.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 400 13px/18px var(--mono);
  color: var(--moss);
}
.sheet {
  align-self: center;
  width: min(380px, 100%);
  background: var(--sheet);
  color: var(--sheet-ink);
  border-radius: 4px;
  box-shadow: var(--shadow-sheet);
  padding: 24px 24px 22px;
  font-family: var(--doc-sans);
  font-size: 13px;
  line-height: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; }
.sheet-title { font-family: var(--doc-serif); font-weight: 600; font-size: 24px; line-height: 28px; }
.sheet-meta { color: #5e6b65; }
.rule { height: 2px; background: var(--sheet-ink); margin: 4px 0 2px; }
.row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.row.total { border-top: 1px solid var(--sheet-line); padding-top: 6px; font-weight: 600; font-size: 15px; }
.bound {
  text-decoration: underline dotted var(--ember-paper);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.row.total .bound { color: var(--ember-paper); }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 24px;
  font: 400 13px/18px var(--mono);
  color: var(--ink-muted);
}

@media (max-width: 520px) {
  .lead { font-size: 18px; line-height: 28px; }
  .join { padding: 16px; }
  .cta { align-self: stretch; justify-content: center; }
  pre { font-size: 12.5px; line-height: 23px; padding: 16px; }
}
