/* RecompHUB site. Looks like the printed manual that came in the box: paper, black ink, one
   red, thin rules instead of cards. */
:root {
  --paper: #f1ece2;
  --paper-2: #e8e1d4;
  --ink: #1b1916;
  --ink-2: #4a453e;
  --muted: #6e675d;
  --rule: #1b1916;
  --hair: #cfc6b6;
  --red: #c8381f;
  --wide: "Archivo", "Arial Black", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --page: 1120px;
  --gutter: max(16px, calc((100% - var(--page)) / 2));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
b { font-weight: 650; }

h1, h2, h3 {
  font-family: var(--wide);
  font-stretch: 118%;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.05;
}
h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 0 0 20px; }
.sub { color: var(--muted); margin: -8px 0 28px; }
.fine { color: var(--muted); font-size: 14.5px; max-width: 34em; }

/* ---- Top bar ---- */
.top {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 14px var(--gutter);
  border-bottom: 2px solid var(--rule);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--wide); font-stretch: 125%; font-weight: 900; font-size: 19px;
  color: var(--ink); text-decoration: none;
}
.brand img { border-radius: 6px; }
.top nav { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--red); }

main > section { padding: 64px var(--gutter); scroll-margin-top: 16px; }

/* ---- Opening ---- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: end;
  padding-top: 72px !important;
}
h1 { font-size: clamp(36px, 5.4vw, 64px); margin: 0 0 24px; max-width: 13em; }
.lead { font-size: 19px; color: var(--ink-2); margin: 0 0 30px; max-width: 32em; }
.cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.btn {
  display: inline-block; padding: 15px 26px;
  background: var(--ink); color: var(--paper);
  font-family: var(--wide); font-stretch: 112%; font-weight: 800; font-size: 17px;
  text-decoration: none; border-radius: 3px;
  box-shadow: 4px 4px 0 var(--red);
  transition: box-shadow .1s, transform .1s;
}
.btn:hover { color: var(--paper); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--red); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.dl-info { font-family: var(--mono); font-size: 14px; color: var(--muted); }

.spec { margin: 0; border-top: 2px solid var(--rule); }
.spec div {
  display: grid; grid-template-columns: 7.5em 1fr; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--hair);
}
.spec div:last-child { border-bottom: 2px solid var(--rule); }
.spec dt { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 3px; }
.spec dd { margin: 0; font-weight: 600; }

.shot { margin: 0; padding: 0 var(--gutter) 24px; }
.shot img { border: 2px solid var(--rule); border-radius: 4px; }
.shot figcaption { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
.shot figcaption span, .feature h3::before { font-family: var(--mono); color: var(--red); }
.shot figcaption span { margin-right: 8px; font-size: 13px; }

.origin p { font-size: 19px; max-width: 38em; margin: 0; color: var(--ink-2); }
.origin { border-bottom: 2px solid var(--rule); }

/* ---- Features: same layout every time, a rule between each ---- */
.feature {
  display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px;
  padding: 32px 0; border-top: 1px solid var(--hair); align-items: start;
}
.feature:first-of-type { border-top: 2px solid var(--rule); }
.feature h3 { font-size: 22px; margin: 4px 0 0; font-stretch: 112%; }
.feature p { margin: 0 0 12px; color: var(--ink-2); }
.feature p:last-child { margin-bottom: 0; }
.feature img { border: 1.5px solid var(--rule); border-radius: 3px; }

.extras {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px;
  margin: 8px 0 0; border-top: 2px solid var(--rule);
}
.extras div { padding: 16px 0; border-bottom: 1px solid var(--hair); }
.extras dt { font-weight: 700; margin-bottom: 2px; }
.extras dd { margin: 0; color: var(--ink-2); }

/* ---- Ports: a compatibility table ---- */
.ports { background: var(--paper-2); border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule); }
.port-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.port-table th {
  text-align: left; font-family: var(--mono); font-weight: 400; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  padding: 0 16px 8px 0; border-bottom: 2px solid var(--rule);
}
.port-table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.port-table td:first-child { font-weight: 700; }
.port-table .sys {
  display: inline-block; font-family: var(--mono); font-size: 12px; padding: 1px 6px;
  border: 1.5px solid var(--ink); border-radius: 3px;
}
.port-table .by { display: block; color: var(--muted); font-size: 14px; }
.port-table .needs { color: var(--ink-2); font-size: 14.5px; }

/* ---- Steps ---- */
.steps ol { list-style: none; counter-reset: step; margin: 0; padding: 0; max-width: 46em; }
.steps li {
  counter-increment: step; position: relative;
  padding: 16px 0 16px 3em; border-bottom: 1px solid var(--hair); color: var(--ink-2);
}
.steps li:first-child { border-top: 2px solid var(--rule); }
.steps li::before { content: counter(step) "."; position: absolute; left: 0; top: 14px; font-family: var(--wide); font-weight: 900; font-size: 22px; color: var(--red); line-height: 1.2; }
.steps li b { color: var(--ink); }

/* ---- Questions ---- */
.faq { max-width: calc(46em + 2 * var(--gutter)); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq details:first-of-type { border-top: 2px solid var(--rule); }
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 650; list-style: none; display: flex; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; font-family: var(--mono); color: var(--red); width: 1em; }
.faq details[open] summary::before { content: "−"; }
.faq details p { margin: 0 0 16px 1.9em; color: var(--ink-2); }

/* ---- News ---- */
.news { border-top: 2px solid var(--rule); }
.news .release { padding: 16px 0; border-bottom: 1px solid var(--hair); max-width: 46em; }
.news .release h3 { margin: 0; font-size: 20px; font-stretch: 112%; }
.news .release .date { font-family: var(--mono); color: var(--muted); font-size: 13px; }
.news .release ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); }

/* ---- Donations ---- */
.donate { border-top: 2px solid var(--rule); }
.donate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 14px; }
.donate-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px;
  border: 2px solid var(--rule); border-radius: 4px; background: var(--paper); color: var(--ink); text-decoration: none;
}
a.donate-card:hover { box-shadow: 4px 4px 0 var(--red); color: var(--ink); }
.donate-card b { font-size: 18px; }
.donate-card .muted { color: var(--muted); font-size: 14px; }
.donate-card .go { margin-top: auto; color: var(--red); font-size: 14px; }
.donate-card code { font-family: var(--mono); background: var(--paper-2); border-radius: 3px; padding: 6px 8px; word-break: break-all; font-size: 13px; }
.donate-card .btn { align-self: flex-start; padding: 8px 14px; font-size: 14px; border: 0; cursor: pointer; }

footer {
  border-top: 2px solid var(--rule); color: var(--muted); font-size: 14px;
  padding: 28px var(--gutter) 48px;
}
footer p { max-width: 52em; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 48px !important; }
  .feature { grid-template-columns: 1fr; gap: 14px; }
  main > section { padding-top: 48px; padding-bottom: 48px; }
  .port-table thead { display: none; }
  .port-table, .port-table tbody, .port-table tr, .port-table td { display: block; }
  .port-table tr { padding: 14px 0; border-bottom: 1px solid var(--hair); }
  .port-table td { padding: 2px 0; border: 0; }
}
@media (max-width: 560px) {
  .top nav { display: none; }
  .extras { grid-template-columns: 1fr; }
  .btn { width: 100%; text-align: center; }
  .spec div { grid-template-columns: 6.5em 1fr; }
}

[hidden] { display: none !important; }
