/* deckwerk.org — the site wears the deck's own theme: warm paper, ink,
   Charter display type over Avenir prose, monospace for anything the
   editor would show in monospace. */

:root {
  --paper: #faf9f5;
  --paper-2: #f2f0ea;
  --ink: #191918;
  --ink-2: #3d3b37;
  --muted: #6b6862;
  --rule: #e2dfd7;
  --accent: #c96442;
  --accent-ink: #a94f31;
  --blue: #6a8fab;
  --green: #71815d;
  --editor: #1c1c1e;
  --editor-2: #26262a;
  --editor-ink: #e8e6df;
  --editor-muted: #8e8b83;
  --serif: Charter, "Iowan Old Style", "New York", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Monaspace Krypton", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
p a, li a, .prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
p a:hover, li a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
code, pre, kbd { font-family: var(--mono); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: 22px; line-height: 1.45; color: var(--ink-2); max-width: 46ch; }

/* ---- top bar ------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: 0.01em; }
.brand img { width: 26px; height: 26px; border-radius: 6px; }
.top nav { display: flex; gap: 22px; margin-left: auto; font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; }
.top nav a { color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; }
.top nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.top nav a.cta { color: var(--paper); background: var(--ink); padding: 7px 14px; border-radius: 6px; border: 0; }
.top nav a.cta:hover { background: var(--accent); }

/* ---- hero ---------------------------------------------------------- */
.hero { padding: 88px 0 0; text-align: center; }
.hero h1 {
  font-size: clamp(64px, 12vw, 148px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.hero h1 sup { font-size: 0.32em; font-weight: 400; vertical-align: 0.9em; margin-left: 0.05em; color: var(--muted); letter-spacing: 0; }
.hero .tag {
  font-family: var(--serif);
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 26px auto 0;
  max-width: 24ch;
  color: var(--ink);
}
.hero .sub { margin: 18px auto 0; max-width: 56ch; color: var(--muted); font-size: 18px; }
.hero .sub b { color: var(--ink-2); font-weight: 600; }
.actions { display: flex; gap: 12px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.02em;
  padding: 12px 20px; border-radius: 8px; border: 1px solid var(--ink);
  transition: background .15s, color .15s, border-color .15s;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.footnote { margin: 22px auto 0; font-size: 13px; color: var(--muted); max-width: 60ch; }
.footnote i { font-family: var(--serif); }

.shot {
  margin: 56px auto 0;
  max-width: 1180px;
  padding: 0 16px;
}
.shot .frame {
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  border: 1px solid #2a2a2e;
  border-bottom: 0;
  background: var(--editor);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.05) inset, 0 40px 80px -30px rgba(25,25,24,0.45);
}
.shot img { width: 100%; height: auto; }

/* ---- dark band ------------------------------------------------------ */
.band {
  background: var(--editor);
  color: var(--editor-ink);
  padding: 96px 0 104px;
}
.band .eyebrow { color: var(--accent); }
.band h2 { color: #fff; }
.band .lede { color: var(--editor-ink); }
.band p { color: #c9c6bd; }
.band a { color: #e9c2b1; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 64px; align-items: start; }
.cols h2 { font-size: clamp(38px, 5vw, 56px); margin-bottom: 20px; }
.cols p { margin: 0 0 16px; font-size: 18px; }
.principles { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid #34343a; }
.principles li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 18px 0; border-bottom: 1px solid #34343a; }
.principles .n { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 6px; }
.principles h3 { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 6px; font-family: var(--serif); letter-spacing: -0.01em; }
.principles p { margin: 0; font-size: 16px; color: #b8b5ac; }

/* ---- features ------------------------------------------------------- */
.section { padding: 96px 0; }
.section-head { max-width: 62ch; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(36px, 5vw, 56px); margin: 10px 0 18px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 26px 26px 28px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  box-shadow: 0 1px 0 rgba(25,25,24,0.03);
  aspect-ratio: 16 / 10;
  justify-content: flex-end;
}
.card .n { position: absolute; top: 20px; left: 26px; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.card h3 { font-size: 26px; font-weight: 700; }
.card p { margin: 0; font-size: 15.5px; color: var(--ink-2); line-height: 1.45; }
.card.dark { background: var(--editor); border-color: #2a2a2e; color: var(--editor-ink); }
.card.dark h3 { color: #fff; }
.card.dark p { color: #b8b5ac; }
.card.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.card.accent h3 { color: #fff; }
.card.accent p { color: #fbe3d9; }
.card.accent .n, .card.dark .n { color: rgba(255,255,255,0.7); }
.card.blue { background: var(--blue); border-color: var(--blue); }
.card.blue h3 { color: #fff; } .card.blue p { color: #eef4f8; } .card.blue .n { color: #eef4f8; }
.card.green { background: var(--green); border-color: var(--green); }
.card.green h3 { color: #fff; } .card.green p { color: #edf0e8; } .card.green .n { color: #edf0e8; }

/* ---- screenshots row --------------------------------------------------- */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.shots figure { margin: 0; }
.shots .frame { border-radius: 8px; overflow: hidden; border: 1px solid var(--rule); background: var(--editor); }
.shots img { width: 100%; height: auto; }
.shots figcaption { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 10px; letter-spacing: 0.02em; }

/* ---- install --------------------------------------------------------- */
.install { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.install .grid { grid-template-columns: repeat(3, 1fr); }
.pkg {
  background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.pkg h3 { font-size: 22px; }
.pkg p { margin: 0; font-size: 15px; color: var(--ink-2); }
pre.cmd {
  margin: 4px 0 0;
  background: var(--editor);
  color: var(--editor-ink);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
}
pre.cmd .p { color: var(--accent); user-select: none; }
.pkg .alt { font-size: 13.5px; color: var(--muted); }
.source { margin-top: 20px; background: transparent; border: 1px dashed #cfcbc0; }
.source pre.cmd { max-width: 100%; }

/* ---- good at / files ------------------------------------------------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 72px; }
.two h2 { font-size: clamp(30px, 3.6vw, 40px); margin: 10px 0 16px; }
.two p { color: var(--ink-2); margin: 0 0 14px; }
.plain { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.plain li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-size: 21px; display: flex; gap: 14px; }
.plain li::before { content: "—"; color: var(--accent); }
.tree { font-family: var(--mono); font-size: 13.5px; line-height: 1.7; background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; color: var(--ink-2); margin: 0; }
.tree .c { color: var(--muted); }

/* ---- name / footer --------------------------------------------------- */
.name { text-align: center; padding: 88px 0 72px; }
.name .word { font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.02em; }
.name .word i { color: var(--accent); }
.name p { color: var(--muted); max-width: 52ch; margin: 14px auto 0; }
.status { display: inline-block; margin-top: 26px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 12px; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }
footer a:hover { color: var(--ink); }
footer .spacer { flex: 1; }

/* ---- manual ---------------------------------------------------------- */
.manual { display: grid; grid-template-columns: 240px 1fr; gap: 64px; padding: 56px 0 96px; align-items: start; }
.manual aside { position: sticky; top: 84px; }
.manual aside ul { list-style: none; margin: 10px 0 0; padding: 0; }
.manual aside li a { display: grid; grid-template-columns: 30px 1fr; padding: 8px 0; font-size: 15px; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.manual aside li a:hover { color: var(--ink); }
.manual aside li.current a { color: var(--accent-ink); font-weight: 600; }
.manual aside .n { font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding-top: 3px; }
.prose { max-width: 68ch; }
.prose h1 { font-size: clamp(38px, 5vw, 56px); margin-bottom: 22px; }
.prose h2 { font-size: 30px; margin: 44px 0 12px; }
.prose h3 { font-size: 22px; margin: 34px 0 8px; font-family: var(--serif); }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; font-size: 0.86em; }
.prose pre { background: var(--editor); color: var(--editor-ink); border-radius: 8px; padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose blockquote { margin: 18px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose ol.toc { padding-left: 1.4em; font-family: var(--serif); font-size: 22px; }
.prose ol.toc li { margin: 10px 0; }
.prose ol.toc a { color: var(--ink); text-decoration: none; }
.prose ol.toc a:hover { color: var(--accent-ink); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 13.5px; }
.pager a { color: var(--ink-2); } .pager a:hover { color: var(--accent-ink); }

/* ---- responsive ----------------------------------------------------- */
@media (max-width: 900px) {
  .cols, .two, .shots, .manual { grid-template-columns: 1fr; }
  .grid, .install .grid { grid-template-columns: 1fr 1fr; }
  .manual aside { position: static; }
  .top nav a:not(.cta) { display: none; }
}
@media (max-width: 600px) {
  .grid, .install .grid { grid-template-columns: 1fr; }
  .card { aspect-ratio: auto; padding-top: 52px; }
  .hero { padding-top: 56px; }
  .section, .band { padding: 64px 0; }
}

/* Grid and flex children must be allowed to shrink below the width of the
   widest <pre> they contain, or install commands push the page sideways. */
.grid > *, .cols > *, .two > *, .shots > *, .manual > * { min-width: 0; }
pre { max-width: 100%; overflow-x: auto; }
