@font-face {
  font-family: "EB Garamond";
  src: url("/shared/eb-garamond-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

/* Same palette as the Eclipse launcher and wiki. The site is dark only, like the launcher. */
:root {
  color-scheme: dark;
  --bg: rgb(6 5 12);
  --bg-2: rgb(15 8 15);
  --accent: rgb(232 112 122);
  --peach: rgb(234 160 116);
  --steel: rgb(157 170 193);
  --text: rgb(226 220 224);
  --text-dim: rgb(150 146 162);
  --card: rgb(20 12 19);
  --card-border: rgb(76 34 50);
  --btn-top: rgb(232 98 58);
  --btn-bottom: rgb(160 34 60);
  --btn-text: rgb(255 243 232);
  --serif: "EB Garamond", Garamond, "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: linear-gradient(var(--bg), var(--bg-2)) fixed;
  background-color: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  overflow-x: hidden;
}
a { color: var(--peach); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; background: rgb(6 5 12 / 0.82); backdrop-filter: blur(8px); border-bottom: 1px solid rgb(76 34 50 / 0.5); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 20px/1 var(--serif); letter-spacing: 0.04em; }
.brand img { width: 26px; height: 26px; }
.top nav { margin-left: auto; display: flex; gap: 22px; }
.top nav a { color: var(--text-dim); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--text); }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: 0.01em; }
h3 { font-size: 22px; }
.eyebrow { font: 600 13px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.lede { font-size: 18px; color: var(--text-dim); max-width: 60ch; }

section { padding: 72px 0; }
section + section { border-top: 1px solid rgb(76 34 50 / 0.35); }
.section-head { margin-bottom: 32px; }
.section-head p { margin: 12px 0 0; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 26px;
  border-radius: 4px; text-decoration: none; font: 600 16px/1 var(--sans); letter-spacing: 0.02em;
  border: 1px solid var(--card-border); color: var(--text); background: rgb(24 15 22 / 0.8);
}
.btn:hover { color: var(--text); border-color: var(--accent); }
.btn-primary { background: linear-gradient(var(--btn-top), var(--btn-bottom)); border-color: rgb(255 140 110 / 0.5); color: var(--btn-text); box-shadow: 0 0 28px rgb(233 57 52 / 0.35); }
.btn-primary:hover { color: var(--btn-text); filter: brightness(1.08); }
.btn svg { width: 18px; height: 18px; flex: none; }
.fineprint { margin-top: 14px; font-size: 14px; color: var(--text-dim); }

/* Cards and grids */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 6px; overflow: hidden; }
.card-body { padding: 20px 22px 22px; }
.card-body p { margin: 8px 0 0; color: var(--text-dim); }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }

/* Footer */
footer { padding: 40px 0 56px; border-top: 1px solid rgb(76 34 50 / 0.35); color: var(--text-dim); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
footer p { margin: 0; }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  section { padding: 52px 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .top nav { gap: 14px; }
  .top nav a.hide-sm { display: none; }
  .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { a.card { transition: none; } a.card:hover { transform: none; } }
