/* The Shireseat website. It is dressed in the game's own interface, with values copied from
   client/src/style.css: the dark top bar, the title card over a view of the map, parchment
   panels, the buttons, the picture tiles from the build menu, and the Wiki's section list. */

@font-face {
  font-family: "Cinzel";
  src: url("fonts/cinzel-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("fonts/cinzel-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #2b2216;
  --muted: #6f6046;
  --parchment: #f1e7cc;
  --card: #faf3df;
  --line: #c2ab74;
  --line-dark: #a48a52;
  --bar: #2a1f17;
  --bar-2: #3b2c20;
  --bar-ink: #f1e6cc;
  --gold: #e3c26a;
  --accent: #8f3b22;
  --accent-2: #a9492c;
  --accent-ink: #fff5e2;
  --display: "Cinzel", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body {
  margin: 0;
  background: #1f1711;
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid #c98a2b; outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); margin: 0; }
p { margin: 0 0 12px; }

.btn {
  display: inline-block; text-decoration: none; text-align: center;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink);
  border: 1px solid #5f2414; border-radius: 6px; padding: 8px 18px; font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(0, 0, 0, 0.25); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn.wide { display: block; padding: 11px; font-size: 17px; }

/* ---------- the top bar, as in the game ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 56px; padding: 0 16px;
  background: linear-gradient(180deg, var(--bar-2), var(--bar)); color: var(--bar-ink);
  border-bottom: 2px solid #b9974a; box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font: 700 20px var(--display); letter-spacing: 0.06em; color: var(--gold); text-decoration: none; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a:not(.btn) { color: var(--bar-ink); }
.topbar nav a:not(.btn):hover { color: var(--gold); }

/* ---------- the title card over the map, as on the game's sign-in screen ---------- */
.title { position: relative; max-width: 1180px; margin: 20px auto 0; border: 1px solid #8f7641; border-radius: 10px; overflow: hidden; background: var(--bar); }
.title .scene { width: 100%; height: 500px; object-fit: cover; object-position: 60% 50%; }
.title::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(26, 19, 13, 0.8) 0, rgba(26, 19, 13, 0.5) 36%, rgba(26, 19, 13, 0) 68%); pointer-events: none; }
.titlecard {
  position: absolute; z-index: 1; left: 6%; top: 50%; transform: translateY(-50%); width: 340px; text-align: center;
  border: 1px solid #8f7641; border-radius: 12px; padding: 26px 26px 20px;
  background: radial-gradient(130% 70% at 0% 0%, rgba(255, 252, 238, 0.9) 0, transparent 60%), var(--parchment);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35), inset 0 0 0 4px rgba(164, 138, 82, 0.55), 0 18px 50px rgba(0, 0, 0, 0.55);
}
.titlecard img { margin: 0 auto 6px; }
.titlecard h1 { font-size: 34px; letter-spacing: 0.05em; color: var(--accent); }
.titlecard .tagline { color: var(--muted); margin: 6px 0 18px; }
.titlecard .under { margin: 12px 0 0; }

/* ---------- the page: a list of sections beside the panels, as in the game's Wiki ---------- */
.wrap { max-width: 1180px; margin: 20px auto 40px; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: start; padding: 0 12px; }
.contents { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
.contents a { padding: 7px 10px; border-radius: 6px; border-left: 3px solid transparent; color: #d9cba6; text-decoration: none; }
.contents a:hover { background: rgba(255, 245, 215, 0.08); color: #fff3cf; }
main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

.panel {
  background:
    radial-gradient(130% 70% at 0% 0%, rgba(255, 252, 238, 0.9) 0, transparent 60%),
    radial-gradient(110% 60% at 100% 100%, rgba(214, 196, 150, 0.7) 0, transparent 60%),
    var(--parchment);
  border: 1px solid #8f7641; border-radius: 10px; padding: 22px 24px 14px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35), inset 0 0 0 4px rgba(164, 138, 82, 0.55), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.panel h2 { font-size: 25px; font-weight: 700; letter-spacing: 0.02em; color: #3d2011; padding-bottom: 7px; margin-bottom: 14px; border-bottom: 3px double var(--line-dark); }
.panel h3 { font-size: 17px; font-weight: 700; color: #3d2011; margin: 22px 0 8px; }
.panel ul:not(.roster) { margin: 0 0 12px; padding-left: 22px; }
.panel li { margin: 4px 0; }
.panel > p, .panel > ul:not(.roster) { max-width: 46rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 12px; }
figure { margin: 4px 0 14px; }
figure img { width: 100%; border: 1px solid #8f7641; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
figcaption { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* tables, as in the Wiki */
.scroll { overflow-x: auto; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px dashed var(--line); }
thead th { background: rgba(255, 250, 232, 0.7); white-space: nowrap; }
tbody th { font-weight: 650; white-space: nowrap; }
.units td, .units th { vertical-align: middle; }
.units { min-width: 660px; }
.units td:first-child { width: 68px; padding-right: 0; }
.units img { width: 52px; max-width: none; }

/* the little pictures of the game's models, on the same green as in the build menu */
.roster img, .units img, .levels img {
  border-radius: 8px; border: 1px solid var(--line-dark); object-fit: contain;
  background: radial-gradient(circle at 50% 62%, #d3e2ae 0, #a9c57f 62%, #8fae66 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.roster { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.roster li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.roster b, .roster span, .roster small { display: block; }
.roster span { font-size: 14px; line-height: 1.35; margin: 2px 0 3px; }
.roster small { font-size: 13px; color: var(--muted); }
.levels { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.levels li { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.levels img { margin-bottom: 4px; }

@media (max-width: 1000px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .contents { position: static; flex-direction: row; flex-wrap: wrap; }
  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .split, .pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .title { margin: 0; border: 0; border-radius: 0; }
  .title .scene { height: 210px; }
  .title::after { display: none; }
  .titlecard { position: static; transform: none; width: auto; margin: -40px 12px 14px; position: relative; }
  .wrap { margin-top: 6px; }
  .panel { padding: 18px 16px 10px; }
  .roster { grid-template-columns: minmax(0, 1fr); }
  .levels img { width: 84px; height: 84px; }
  .topbar nav a:not(.btn) { display: none; }
}
