/* Spoils of Midgard - built to the design the user supplied on 2026-09-21
 * (downloads\web_design_mockup.png; the images come from tools\make_web_assets.py).
 *
 * The mockup's composition is characters at the edges and content down the middle, and
 * that is exactly how it is rebuilt here: two sharp art panels anchored left and right,
 * a blurred wash of the same painting behind them, and everything readable or clickable
 * as real HTML in the centre column. Nothing in the artwork had to be retouched, because
 * every element the mockup painted on sits in the middle third.
 *
 * The one picture that carries text is the emblem, and it is a picture on purpose: it is
 * lettering, not prose. It still ships with an alt text and an <h1> around it.
 *
 * Colours sampled from the mockup rather than guessed - the top bar really is a
 * horizontal gradient from near-black at the left to a lit blue at the right.
 */

:root {
  --ink:      #0a1120;
  --ink-2:    #070f1e;
  --panel:    #101a2c;
  --raised:   #16223a;
  --line:     #24324b;
  --bar-a:    #061927;
  --bar-b:    #021a3c;
  --bar-c:    #0e3866;
  --foot:     #011224;
  --gold:     #f0cf7a;
  --gold-hi:  #fde39a;
  --gold-mid: #d9b45c;
  --gold-dim: #8d6f33;
  --cream:    #f3efe4;
  --muted:    #9eb0c7;
  --ok:       #6fd58a;
  --bad:      #ef8080;
  --display:  Cambria, Georgia, "Times New Roman", serif;
  --body:     system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap:     1000px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }

/* ------------------------------------------------------------------- the top bar ---- */
.bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  height: 64px; padding: 0 22px;
  background: linear-gradient(90deg, var(--bar-a) 0%, var(--bar-b) 45%, var(--bar-c) 100%);
  border-bottom: 1px solid var(--gold-dim);
}
/* The emblem overhangs the bar in the mockup, so it does here too. */
.brand { flex: 0 0 auto; line-height: 0; margin-bottom: -26px; position: relative; z-index: 2; }
.brand img { height: 86px; width: auto; display: block;
              filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .55)); }

.bar nav { display: flex; gap: 24px; flex-wrap: wrap; margin-left: 14px; }
.bar nav a {
  display: flex; align-items: center; gap: 7px;
  color: #dce7f4; text-decoration: none;
  font-family: var(--display); font-size: .93rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 0 4px; border-bottom: 2px solid transparent;
}
.bar nav a svg { width: 16px; height: 16px; flex: 0 0 auto; opacity: .85; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
.bar nav a:hover svg, .bar nav a[aria-current="page"] svg { opacity: 1; }
.bar .spacer { flex: 1 1 auto; }

/* ---------------------------------------------------------------------- buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; text-decoration: none; font: inherit;
  font-family: var(--display); font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: #20170a;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 48%, var(--gold-mid) 100%);
  border: 1px solid #6f551f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 2px 10px rgba(0, 0, 0, .45);
  padding: 11px 26px; font-size: .86rem;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { background: linear-gradient(180deg, #fff0bf 0%, var(--gold-hi) 48%, var(--gold) 100%); }
.btn.big { padding: 16px 52px; font-size: 1.16rem; letter-spacing: .16em; }
.btn.ghost {
  background: rgba(8, 16, 30, .55); color: var(--cream);
  border-color: var(--gold-dim); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); background: rgba(8, 16, 30, .8); }

/* ------------------------------------------------------------------------- hero ----- */
.hero {
  position: relative; overflow: hidden;
  min-height: 648px;
  display: flex; align-items: center; justify-content: center;
  padding: 44px 20px 30px;
  background: var(--ink-2) url("hero-bg.jpg") center / cover no-repeat;
}
/* The two sharp panels of the painting.
 *
 * They fade with a MASK, not with a gradient of ink laid over the top. An ink overlay
 * was the first attempt and it put a dark bar down the middle of the hero: the art faded
 * to solid ink while the wash behind it is a lighter blue, so the two met on a visible
 * step. A mask fades the art's own opacity, letting the wash show through, and the
 * transition reads as depth of field - sharp foreground, soft distance.
 *
 * Where mask-image is unsupported the panels simply end on a hard edge, which is
 * tidy enough to live with.
 */
.hero-side {
  position: absolute; bottom: 0; top: 0; width: 385px;
  background-repeat: no-repeat; background-size: auto 100%;
  pointer-events: none;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;  mask-size: 100% 100%;
}
.hero-side.left {
  left: 0; background-image: url("art-left.jpg"); background-position: left bottom;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 26%, transparent 97%);
          mask-image: linear-gradient(90deg, #000 0%, #000 26%, transparent 97%);
}
.hero-side.right {
  right: 0; background-image: url("art-right.jpg"); background-position: right bottom;
  -webkit-mask-image: linear-gradient(270deg, #000 0%, #000 26%, transparent 97%);
          mask-image: linear-gradient(270deg, #000 0%, #000 26%, transparent 97%);
}

.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 760px; }

/* The emblem IS the heading. It keeps a real <h1> and a real alt text. */
.wordmark { margin: 0 0 4px; line-height: 0; }
.wordmark img {
  width: min(560px, 64vw); height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6));
}

.tag {
  margin: 10px 0 0; font-family: var(--display); font-style: italic;
  font-size: clamp(1.15rem, 2.5vw, 1.72rem); color: #fbf7ec;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8), 0 0 2px rgba(0, 0, 0, .9);
}
.sub {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 10px auto 0; max-width: 460px;
  font-family: var(--display); font-style: italic; font-size: 1.02rem; color: #e7eefb;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .85);
}
.sub::before, .sub::after { content: ""; flex: 1; height: 1px; background: rgba(240, 207, 122, .55); }

.cta { margin-top: 26px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------------- pillars ----- */
.pillars {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 8px 30px; margin: 40px 0 0; padding: 0; list-style: none;
}
.pillars li { width: 150px; text-align: center; }
.pillars .hex {
  width: 52px; height: 58px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(180deg, rgba(240, 207, 122, .22), rgba(240, 207, 122, .06));
  border: 0;
}
.pillars .hex svg { width: 24px; height: 24px; color: var(--gold); }
.pillars b {
  display: block; font-family: var(--display); font-size: 1rem; color: #fbf7ec;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .9);
}
.pillars span {
  display: block; font-size: .84rem; color: #cfdcec;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .9);
}

/* ------------------------------------------------------------------------ layout ---- */
main { max-width: var(--wrap); margin: 0 auto; padding: 48px 20px 10px; }

h1, h2 { font-family: var(--display); color: var(--cream); }
main h1 { font-size: clamp(1.75rem, 4vw, 2.3rem); line-height: 1.15; margin: 0 0 10px; }
main h1 + p { color: var(--muted); }
h2 { font-size: 1.55rem; margin: 44px 0 6px; }
h2:first-child { margin-top: 0; }
h2 + .lead { margin: 0 0 20px; color: var(--muted); }
/* standalone note; the footer keeps its own .foot .note, which is more specific */
main .note { color: var(--muted); font-size: .93rem; border-left: 2px solid var(--gold-dim);
             padding: 2px 0 2px 14px; margin: 0 0 26px; }
p { margin: 0 0 14px; }

code {
  font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: .9em;
  color: var(--gold); background: rgba(240, 207, 122, .09);
  border: 1px solid rgba(240, 207, 122, .18); border-radius: 2px; padding: .08em .4em;
}

/* a hairline with the mockup's little gold lozenge on it */
.rule { display: flex; align-items: center; gap: 14px; margin: 26px 0; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--gold-dim); }
.rule i { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }

/* ------------------------------------------------------------------------- cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  display: block; text-decoration: none; color: inherit; position: relative;
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line); border-top: 2px solid var(--gold-dim);
  padding: 22px; transition: border-color .15s, transform .15s, background .15s;
}
.card:hover { border-color: var(--gold); transform: translateY(-2px); background: var(--raised); }
.card .step { display: block; font-family: var(--display); font-size: .72rem;
              letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 8px; }
.card h3 { margin: 0 0 6px; font-family: var(--display); font-size: 1.12rem; color: var(--gold); }
.card p  { margin: 0; color: var(--muted); font-size: .94rem; }

/* -------------------------------------------------------------------- what we are --- */
.feature { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 34px; margin: 6px 0 0; padding: 0; list-style: none; }
.feature li { border-top: 1px solid var(--line); padding: 15px 0 15px 20px; position: relative; }
.feature li::before { content: ""; position: absolute; left: 0; top: 22px; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.feature b { display: block; font-family: var(--display); color: var(--cream); font-size: 1.04rem; }
.feature span { color: var(--muted); font-size: .92rem; }

ul.rules { list-style: none; padding: 0; margin: 6px 0 0; }
ul.rules li { border-top: 1px solid var(--line); padding: 12px 0 12px 20px; position: relative; }
ul.rules li::before { content: ""; position: absolute; left: 0; top: 19px; width: 6px; height: 6px; background: var(--gold-dim); transform: rotate(45deg); }

/* ------------------------------------------------------------------------- forms ---- */
form {
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line); border-top: 2px solid var(--gold-dim); padding: 24px;
}
label { display: block; margin-bottom: 16px; font-size: .92rem; }
label small, legend small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
input, select {
  width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit;
  color: var(--cream); background: #060c18; border: 1px solid var(--line); border-radius: 2px;
}
input:focus, select:focus { outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 2px rgba(240, 207, 122, .14); }
fieldset { border: 1px solid var(--line); padding: 14px 16px 2px; margin: 0 0 16px; }
legend { padding: 0 8px; font-family: var(--display); color: var(--gold); }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; margin: 0; }
button { font-family: var(--display); }

/* -------------------------------------------------------------------------- misc ---- */
.flash { padding: 12px 16px; margin-bottom: 16px; border-left: 3px solid; background: var(--panel); }
.flash.error { border-color: var(--bad); color: #ffdcdc; }
.flash.ok    { border-color: var(--ok);  color: #d8ffe4; }

.status { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
.status td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.status tr:last-child td { border-bottom: 0; }
.up   { color: var(--ok);  font-weight: 700; }
.down { color: var(--bad); font-weight: 700; }
.muted { color: var(--muted); }

/* ------------------------------------------------------------------------ footer ---- */
.foot {
  margin-top: 60px; padding: 20px 26px;
  background: var(--foot); border-top: 1px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.foot .said { font-family: var(--display); font-style: italic; color: #cfe0f4; font-size: 1.02rem; }
.foot .who {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display); color: var(--muted); font-size: .92rem; letter-spacing: .04em;
}
.foot .who i { width: 7px; height: 7px; background: var(--gold-dim); transform: rotate(45deg); }
.foot .note { color: #5c708a; font-size: .82rem; }

/* screen-reader only: used where the emblem image carries the name visually */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --------------------------------------------------------------------- responsive --- */
@media (max-width: 1180px) {
  .hero-side { width: 300px; }
}
@media (max-width: 980px) {
  /* The side panels are the first thing to go: they are scenery, and below this width
     they crowd the emblem instead of framing it. */
  .hero-side { display: none; }
  .bar nav a span { display: none; }       /* icons only, so six items still fit */
  .bar nav { gap: 18px; }
}
@media (max-width: 720px) {
  .bar { height: 56px; padding: 0 14px; gap: 10px; }
  .brand img { height: 66px; }
  .brand { margin-bottom: -18px; }
  .bar nav { margin-left: 0; gap: 14px; }
  .hero { min-height: 0; padding: 30px 16px 26px; }
  .wordmark img { width: min(420px, 82vw); }
  .btn.big { padding: 14px 32px; font-size: 1rem; }
  .pillars { gap: 18px; }
  .pillars li { width: 132px; }
  .foot { justify-content: center; text-align: center; }
}
