/* Steel and Sorcery -- site styles. Dark medieval: aged wood, parchment, gold (matches the in-game
   Dark Brown GUI kit and the old download page). */
:root {
  --bg: #120d08;
  --bg-2: #1b140c;
  --panel: rgba(28, 21, 13, 0.92);
  --panel-edge: #6f5630;
  --gold: #e8c77a;
  --gold-deep: #b98e3e;
  --ink: #efe4cf;
  --ink-dim: #bfae8e;
  --ink-faint: #8d7c5f;
  --ok: #7fd08a;
  --bad: #e07a6a;
  --radius: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(ellipse at top, #2a1d10 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.6;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, .brand, .btn, nav a { font-family: "Cinzel", Georgia, serif; letter-spacing: 0.04em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.1; margin: 0; color: var(--gold); text-shadow: 0 0 24px rgba(232, 199, 122, 0.35); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); color: var(--gold); margin: 0 0 0.6em; }
h3 { font-size: 1.2rem; color: var(--gold); margin: 1.4em 0 0.4em; }

/* ---------------------------------------------------------------- header / nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 10, 6, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(111, 86, 48, 0.6);
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; max-width: 1180px; margin: 0 auto; }
.brand { font-size: 1.25rem; color: var(--gold); white-space: nowrap; }
.brand span { color: var(--ink-dim); font-size: 0.8em; }
nav { display: flex; gap: 6px; flex-wrap: wrap; }
nav a { color: var(--ink-dim); padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; }
nav a:hover, nav a.active { color: var(--gold); background: rgba(232, 199, 122, 0.08); text-decoration: none; }
.menu-toggle { display: none; background: none; border: 1px solid var(--panel-edge); color: var(--gold); border-radius: 6px; padding: 6px 10px; font-size: 1rem; }
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: rgba(14, 10, 6, 0.97); padding: 10px 16px 16px; border-bottom: 1px solid var(--panel-edge); }
  nav.open { display: flex; }
}

/* ---------------------------------------------------------------- layout */
main { max-width: 1180px; margin: 0 auto; padding: 0 20px 60px; }
section { margin: 64px 0; }
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
}
.grid { display: grid; gap: 22px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.muted { color: var(--ink-dim); }
.small { font-size: 0.85em; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 80px 20px;
  background:
    linear-gradient(180deg, rgba(12, 8, 4, 0.45) 0%, rgba(12, 8, 4, 0.75) 60%, var(--bg) 100%),
    url("../img/hero-archer-bear.webp") center 35% / cover no-repeat; /* 2026-10-15: Eric's archer and bear (was the old starter village, village-hillside.png) */
  border-bottom: 1px solid rgba(111, 86, 48, 0.5);
}
.hero .tagline { font-size: clamp(1.1rem, 2.4vw, 1.45rem); color: var(--ink); max-width: 720px; margin: 18px auto 30px; text-shadow: 0 2px 8px #000; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1rem;
  border: 1px solid var(--gold-deep);
  color: var(--gold);
  background: rgba(20, 15, 9, 0.8);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 22px rgba(232, 199, 122, 0.25); }
.btn.primary { background: linear-gradient(180deg, #d9b25f, #a7792f); color: #1b1208; border-color: #f0d38f; font-weight: 700; }
.btn.primary:hover { background: linear-gradient(180deg, #e8c77a, #b98e3e); }

/* ---------------------------------------------------------------- server status */
.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(14, 10, 6, 0.8); border: 1px solid var(--panel-edge);
  font-family: "Cinzel", Georgia, serif; font-size: 0.85rem; color: var(--ink-dim);
  margin-bottom: 22px;
}
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-faint); }
.status.online .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status.offline .dot { background: var(--bad); }

/* ---------------------------------------------------------------- feature cards */
.card { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #0c0905; }
.card .body { padding: 18px 20px 22px; }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--ink-dim); }

/* ---------------------------------------------------------------- news */
.post { margin-bottom: 26px; }
.post .date { font-family: "Cinzel", Georgia, serif; color: var(--ink-faint); font-size: 0.85rem; }
.post h2 { margin-top: 4px; }
.post ul { padding-left: 1.2em; }
.post li { margin: 0.3em 0; }

/* ---------------------------------------------------------------- guide */
.guide-layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; margin-top: 40px; }
.guide-toc { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; }
.guide-toc a { display: block; color: var(--ink-dim); padding: 5px 10px; border-radius: 6px; font-family: "Cinzel", Georgia, serif; font-size: 0.85rem; }
.guide-toc a:hover { color: var(--gold); background: rgba(232, 199, 122, 0.07); text-decoration: none; }
.guide-section { margin-bottom: 30px; scroll-margin-top: 90px; }
.guide-section ul { padding-left: 1.2em; margin: 0.3em 0 0.8em; }
.guide-table { width: 100%; border-collapse: collapse; margin: 0.6em 0 1em; font-size: 0.95em; }
.guide-table td { padding: 5px 10px; border-bottom: 1px solid rgba(111, 86, 48, 0.35); vertical-align: top; }
.guide-table tr:first-child td { border-bottom-color: var(--gold-deep); }
@media (max-width: 860px) { .guide-layout { grid-template-columns: 1fr; } .guide-toc { position: static; max-height: none; } }

/* ---------------------------------------------------------------- gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); overflow: hidden; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: #0c0905; cursor: zoom-in; }
.gallery figcaption { padding: 10px 14px; color: var(--ink-dim); font-size: 0.9em; }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.88); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; border-radius: 8px; box-shadow: var(--shadow); }

.streams { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid rgba(111, 86, 48, 0.5); padding: 30px 20px; text-align: center; color: var(--ink-faint); font-size: 0.85rem; }
footer a { color: var(--ink-dim); }

/* ---------------------------------------------------------------- under construction (Eric 2026-09-26)
   A hazard-stripe bar on every page and a caution-tape ribbon across the hero's top-right corner.
   Remove at launch: delete this block and the .construction-bar / .caution-tape elements. */
.construction-bar {
  background: repeating-linear-gradient(-45deg, #f2c200 0 22px, #111 22px 44px);
  padding: 7px 12px;
  text-align: center;
  border-bottom: 2px solid #000;
}
.construction-bar span {
  display: inline-block;
  background: #111;
  color: #f2c200;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  padding: 4px 14px;
  border: 2px solid #f2c200;
  border-radius: 4px;
}
.hero { overflow: hidden; }
.caution-tape {
  position: absolute;
  top: 64px; right: -92px;
  width: 380px;
  transform: rotate(38deg);
  background: repeating-linear-gradient(-45deg, #f2c200 0 18px, #111 18px 36px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  padding: 6px 0;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}
.caution-tape span {
  background: #f2c200;
  color: #111;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  padding: 3px 12px;
}
@media (max-width: 600px) { .caution-tape { top: 52px; right: -104px; width: 340px; } }

/* ---------------------------------------------------------------- profession ledgers (2026-10-02) */
.ledger-head { text-align: center; margin-top: 48px; }
.ledger-head .sub { max-width: 760px; margin: 14px auto 0; color: var(--ink-dim); }
.ledger-head .crumbs { font-family: "Cinzel", Georgia, serif; font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 10px; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 30px; margin: 0; padding: 0; list-style: none; }
.rules li { border-top: 1px solid rgba(111, 86, 48, 0.55); padding-top: 10px; color: var(--ink-dim); }
.rules li b { display: block; font-family: "Cinzel", Georgia, serif; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 3px; }
.scroll { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.ledger th { text-align: left; font-family: "Cinzel", Georgia, serif; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); padding: 8px 10px; border-bottom: 1px solid var(--gold-deep); white-space: nowrap; }
.ledger td { padding: 9px 10px; border-bottom: 1px solid rgba(111, 86, 48, 0.35); vertical-align: top; }
.ledger td.name { font-family: "Cinzel", Georgia, serif; color: var(--gold); white-space: nowrap; }
.ledger .num, .ledger td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { display: inline-block; font-size: 0.82em; padding: 0 8px; border-radius: 4px; margin: 2px 4px 2px 0; border: 1px solid currentColor; white-space: nowrap; }
.tag.pro { color: var(--ok); }
.tag.con { color: var(--bad); }
.tag.plain { color: var(--ink-dim); }
.trait-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.trait-cards .t { background: rgba(14, 10, 6, 0.6); border: 1px solid rgba(111, 86, 48, 0.6); border-radius: 8px; padding: 12px 14px; }
.trait-cards .t h3 { margin: 0 0 4px; font-size: 1rem; }
.trait-cards .t p { margin: 0; color: var(--ink-dim); font-size: 0.92em; }
.trait-cards .t.pro h3 { color: var(--ok); }
.trait-cards .t.con h3 { color: var(--bad); }
.note { color: var(--ink-faint); font-size: 0.88em; margin: 10px 0 0; }
.prof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.prof-card { display: block; background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); color: var(--ink); transition: transform 0.15s, box-shadow 0.15s; }
.prof-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 22px rgba(232, 199, 122, 0.2); }
.prof-card .kind { font-family: "Cinzel", Georgia, serif; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--ink-faint); text-transform: uppercase; }
.prof-card h3 { margin: 4px 0 6px; }
.prof-card p { margin: 0; color: var(--ink-dim); font-size: 0.95em; }
.prof-card.soon { opacity: 0.55; pointer-events: none; }

/* 2026-10-29: "Coming soon" label for planned features, and a figure with a caption under it in the world sections */
.soon { display: inline-block; font-family: "Cinzel", Georgia, serif; font-size: 0.7rem; letter-spacing: 0.08em; color: #1b140c; background: var(--gold); border-radius: 4px; padding: 2px 8px; vertical-align: middle; margin-left: 8px; }
.shot { margin: 0; }
.shot img { border: 1px solid var(--panel-edge); border-radius: var(--radius); width: 100%; }
.shot figcaption { color: var(--ink-faint); font-size: 0.85rem; margin-top: 6px; font-style: italic; }
.toc-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.toc-row a { border: 1px solid var(--panel-edge); border-radius: 6px; padding: 4px 12px; font-size: 0.9rem; }
.panel > h3:first-child { margin-top: 0; }
.panel > h3:first-child + p { margin-bottom: 0; }
