/* Legends of the Game — studio hub. No external files: system fonts only, so
   the hub makes no request to any other server. */

:root {
  --bg: #f4efe4;
  --bg-deep: #ebe3d2;
  --surface: #fffaf0;
  --ink: #221d16;
  --ink-soft: #5b5244;
  --line: #d9cdb4;
  --accent: #8a5a12;
  --accent-ink: #fffaf0;
  --live: #2f6b3a;
  --soon: #7a6a50;
  --glow: rgba(138, 90, 18, 0.10);
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12131c;
    --bg-deep: #0c0d14;
    --surface: #1b1d29;
    --ink: #ece4d2;
    --ink-soft: #a89f8c;
    --line: #2e3142;
    --accent: #e0b25c;
    --accent-ink: #12131c;
    --live: #7fc48b;
    --soon: #a89f8c;
    --glow: rgba(224, 178, 92, 0.08);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.prose { max-width: 68ch; }

/* ---- Header ---- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; padding-bottom: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.1rem; letter-spacing: .02em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: .95rem; }
.top nav a { color: var(--ink-soft); text-decoration: none; }
.top nav a:hover { color: var(--accent); }

/* ---- Hero ---- */
.hero {
  background:
    radial-gradient(1200px 400px at 15% 0%, var(--glow), transparent 70%),
    linear-gradient(var(--bg), var(--bg-deep));
  border-bottom: 1px solid var(--line);
}
.hero .wrap { padding-top: 72px; padding-bottom: 80px; }
.eyebrow { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 14px; }
h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.02; letter-spacing: -.01em;
  margin: 0 0 18px;
}
.tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.6vw, 1.75rem); color: var(--accent); margin: 0 0 22px; }
.lede { font-size: 1.1rem; color: var(--ink-soft); margin: 0; }

/* ---- Sections ---- */
section { padding: 64px 0; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; margin: 0 0 8px; }
.section-note { color: var(--ink-soft); margin: 0 0 32px; }

/* ---- Project grid ---- */
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; min-width: 0;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin: 0; }
.kind { font-size: .82rem; color: var(--ink-soft); margin: 0 0 14px; }
.card p.desc { margin: 0 0 18px; }
.card .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }

.status { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.status.live { color: var(--live); }
.status.soon { color: var(--soon); border-style: dashed; }

.btn {
  display: inline-block; padding: 9px 16px; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.btn:hover { filter: brightness(1.08); }
.card.is-soon { background: transparent; border-style: dashed; }
.card.is-soon .soon-note { color: var(--ink-soft); font-size: .92rem; }

.repo-url {
  display: block; width: 100%; margin: 0 0 6px;
  font: .8rem/1.45 var(--mono); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; overflow-wrap: anywhere; user-select: all;
}
.hint { font-size: .82rem; color: var(--ink-soft); margin: 0 0 16px; }

ul.sub { margin: 0 0 18px; padding-left: 20px; }

/* ---- Plugin list ---- */
.howto { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 28px; }
.howto summary { cursor: pointer; font-weight: 600; }
.howto ol { margin: 14px 0 10px; padding-left: 22px; }
.howto li { margin-bottom: 6px; }
.howto .hint { margin: 0 0 4px; }
code { font-family: var(--mono); font-size: .88em; }
.all-repo { border: 1px solid var(--accent); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 28px; background: var(--surface); }
.all-repo h2 { font-size: 1.5rem; margin: 0 0 6px; }
.all-repo > p { margin: 0 0 14px; max-width: 80ch; }
.all-repo .hint { margin: 12px 0 0; }
.count { color: var(--ink-soft); font-size: .9rem; margin: 0 0 12px; }
.plugin-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plugin { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.plugin img, .plugin-icon-blank { width: 64px; height: 64px; border-radius: 12px; flex: none; }
.plugin-icon-blank { border: 1px dashed var(--line); }
.plugin-body { flex: 1; min-width: 0; }
.plugin-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.plugin h2 { font-size: 1.4rem; margin: 0; }
.ver { font: .82rem var(--mono); color: var(--ink-soft); }
.plugin-head .status { margin-left: auto; }
.punch { font-family: var(--serif); font-style: italic; color: var(--accent); margin: 2px 0 8px; }
.plugin .desc { margin: 0 0 10px; max-width: 80ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.tags span { font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--bg-deep); color: var(--ink-soft); }
.repo-row { display: flex; gap: 8px; align-items: stretch; max-width: 820px; }
.repo-row .repo-url { margin: 0; flex: 1; }
.copy { font: 600 .85rem var(--sans); padding: 0 14px; border-radius: 6px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; }
.copy:hover { background: var(--accent); color: var(--accent-ink); }
.links { margin: 10px 0 0; font-size: .92rem; }
.plugin.is-soon .soon-note { color: var(--ink-soft); }
.top nav a[aria-current="page"] { color: var(--accent); }

/* ---- Process page ---- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps li::before { content: counter(step); display: block; font: 600 1.8rem var(--serif); color: var(--accent); margin-bottom: 6px; }
.steps h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--ink-soft); }
.rules { padding-left: 20px; }
.rules li { margin-bottom: 8px; }
.toolbox { margin: 16px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; }
.toolbox dt { font-weight: 600; }
.toolbox dd { margin: 0; color: var(--ink-soft); }

/* ---- About ---- */
.about { background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-cols { display: grid; gap: 48px; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.about h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; margin: 0 0 6px; }
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.principles p { margin: 0; color: var(--ink-soft); }

/* Ad slot. One fixed unit below the content, height reserved before it loads
   so nothing on the page moves. Not in use yet: see README. */
.ad-slot { min-height: 280px; margin: 0 auto; }

/* ---- Footer ---- */
footer { padding: 40px 0 56px; color: var(--ink-soft); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--ink-soft); }
footer a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .top { flex-direction: column; align-items: flex-start; }
  .hero .wrap { padding-top: 40px; padding-bottom: 48px; }
  section { padding: 44px 0; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .about-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
