/* wc3-nightelf-theme: a fan-made Jekyll theme in the style of the Warcraft III Night Elf interface.
   Everything is drawn with CSS and the SVG files next to it; no game files are used. */

:root {
  --ne-night: #07060f;          /* behind everything */
  --ne-stone: #11162a;          /* dialog inside: dark blue stone */
  --ne-stone-dark: #0a0d1a;
  --ne-wood: #36274f;           /* Night Elf carved wood, violet */
  --ne-wood-light: #5a4580;
  --ne-wood-dark: #1d1430;
  --ne-trim: #c9bdf5;           /* silver-lavender trim */
  --ne-leaf: #5fb39a;
  --ne-gold: #fcd20d;           /* the game's yellow text */
  --ne-text: #e2deef;
  --ne-text-dim: #a29cc0;
  --ne-green: #3cdc3c;          /* "No Upkeep" green */
  --ne-select-top: #3e63c8;     /* the blue of a highlighted menu button */
  --ne-select-bottom: #172a6a;
  --ne-title: "Marcellus", "Friz Quadrata", Georgia, serif;
  --ne-body: "Alegreya Sans", system-ui, sans-serif;
  --ne-outline: 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000, 0 -1px 0 #000;   /* black edge around game text */
}

* { box-sizing: border-box; }
html { background: var(--ne-night); }
body.ne {
  margin: 0; min-height: 100vh; color: var(--ne-text); font: 400 1.05rem/1.6 var(--ne-body);
  /* the game world behind the menu, dimmed the way the game dims it */
  background:
    linear-gradient(rgba(5, 4, 12, 0.5), rgba(5, 4, 12, 0.72)),
    url("../images/ashenvale.svg") center bottom / cover no-repeat fixed,
    var(--ne-night);
  overflow-x: clip;
}
.ne a { color: #c3b4ff; }
.ne a:hover { color: #fff; }
.ne :focus-visible { outline: 2px solid var(--ne-gold); outline-offset: 2px; }

/* ---------- top bar ---------- */
.ne-topbar {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start;
  height: 42px; padding: 0 14px;
  background:
    url("../images/noise.svg"),
    linear-gradient(var(--ne-wood-light), var(--ne-wood) 45%, var(--ne-wood-dark));
  border-bottom: 2px solid #07050d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -3px 0 rgba(201, 189, 245, 0.35),
              0 4px 14px rgba(0, 0, 0, 0.7);
}
.ne-topbar__tabs { display: flex; gap: 6px; padding-top: 7px; overflow-x: auto; }
.ne-tab {
  flex: none; padding: 2px 14px 3px; font: 400 0.95rem/1.4 var(--ne-title); white-space: nowrap;
  color: var(--ne-gold) !important; text-decoration: none; text-shadow: var(--ne-outline);
  background: linear-gradient(#1a1f33, #0b0d17);
  border: 1px solid; border-color: #8a74b8 #1a1228 #1a1228 #8a74b8;     /* recessed into the wood */
  box-shadow: inset 0 0 0 1px #000;
}
.ne-tab:hover, .ne-tab.is-current { color: #fff !important; background: linear-gradient(var(--ne-select-top), var(--ne-select-bottom)); }
.ne-orb { display: block; width: 180px; margin: 0 8px; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.75)); }
.ne-orb svg { display: block; width: 100%; height: auto; }
.ne-topbar__right { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding-top: 9px;
                    font: 400 1rem var(--ne-title); white-space: nowrap; }
.ne-stat { padding-left: 24px; color: #fff; text-shadow: var(--ne-outline);
           background: no-repeat left center / 20px 20px; }
.ne-stat--gold { background-image: url("../images/icon-gold.svg"); }
.ne-stat--lumber { background-image: url("../images/icon-lumber.svg"); }
.ne-stat--food { background-image: url("../images/icon-food.svg"); }
.ne-topbar__note { color: var(--ne-green); text-shadow: var(--ne-outline); }

/* ---------- main area ---------- */
.ne-main { width: min(900px, 100% - 32px); margin: 0 auto; padding: 88px 0 24px; }

/* ---------- the dialog (like the in-game Game Menu window) ---------- */
.ne-dialog {
  position: relative; padding: 40px clamp(12px, 3.6vw, 40px) 30px;
  border: 46px solid transparent;
  border-image: url("../images/frame.svg") 40 stretch;      /* carved wood, moonstones in the corners */
  background:
    url("../images/noise.svg"),
    radial-gradient(ellipse at 50% 0%, rgba(201, 189, 245, 0.07), transparent 60%),
    linear-gradient(var(--ne-stone), var(--ne-stone-dark));
  background-clip: padding-box;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.8));
}
.ne-dialog__body { position: relative; }
.ne-crest { position: absolute; top: -80px; left: 50%; width: 160px; transform: translateX(-50%);
            filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.85)); }
.ne-crest svg { display: block; width: 100%; height: auto; }
.ne-dialog__title {
  margin: 0 0 24px; text-align: center; font: 400 clamp(1.6rem, 3.6vw, 2.15rem)/1.2 var(--ne-title);
  color: #fff; text-shadow: var(--ne-outline), 0 0 22px rgba(201, 189, 245, 0.35);
}
.ne-dialog__title::after { content: ""; display: block; height: 12px; margin: 14px auto 0; width: min(340px, 75%);
  background:
    radial-gradient(ellipse 8px 4px at 50% 50%, var(--ne-leaf) 90%, transparent 100%),
    linear-gradient(90deg, transparent, var(--ne-trim) 25%, var(--ne-trim) 75%, transparent) center / 100% 1px no-repeat; }

/* ---------- text inside ---------- */
.ne h2 { font: 400 1.5rem/1.25 var(--ne-title); color: var(--ne-gold); margin: 1.6em 0 0.5em; text-shadow: var(--ne-outline); }
.ne h3 { font: 400 1.2rem/1.3 var(--ne-title); color: #d8cfff; margin: 1.4em 0 0.4em; text-shadow: var(--ne-outline); }
.ne p, .ne li { max-width: 70ch; }
.ne p { margin: 0 0 1em; }
.ne strong { color: #fff; }
.ne code { font-size: 0.92em; padding: 1px 5px; background: rgba(0, 0, 0, 0.45); border: 1px solid #2c2645; }
.ne pre { padding: 12px 14px; overflow-x: auto; background: rgba(0, 0, 0, 0.5); border: 1px solid #2c2645;
          box-shadow: inset 0 0 0 1px #000; }
.ne pre code { padding: 0; border: 0; background: none; }
.ne hr { height: 12px; margin: 2.2em auto; border: 0; width: min(440px, 80%);
         background:
           radial-gradient(ellipse 8px 4px at 50% 50%, var(--ne-leaf) 90%, transparent 100%),
           linear-gradient(90deg, transparent, var(--ne-trim) 25%, var(--ne-trim) 75%, transparent) center / 100% 1px no-repeat; }
.ne table { border-collapse: collapse; margin: 0 0 1em; }
.ne th, .ne td { padding: 6px 14px; border-bottom: 1px solid #2c2645; text-align: left; }
.ne th { font: 400 1rem var(--ne-title); color: var(--ne-gold); text-shadow: var(--ne-outline); }
.ne blockquote { margin: 0 0 1em; padding: 8px 16px; border-left: 3px solid var(--ne-trim); color: var(--ne-text-dim); }

/* ---------- buttons (like the menu buttons in the game) ---------- */
.ne-button, .ne a.ne-button, .ne-dialog button, .ne-dialog input[type="submit"] {
  display: inline-block; padding: 8px 26px; font: 400 1.08rem/1.3 var(--ne-title); color: var(--ne-gold);
  text-decoration: none; text-shadow: var(--ne-outline); cursor: pointer;
  background: url("../images/noise.svg"), linear-gradient(#232a42, #0c0f1c);
  border: 3px solid; border-color: #8a74b8 #2a1e3d #1a1228 #6b5590;       /* bevel: light top-left, dark bottom-right */
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000, inset 0 2px 0 rgba(255, 255, 255, 0.08);
}
.ne-button:hover, .ne a.ne-button:hover, .ne-dialog button:hover, .ne-dialog input[type="submit"]:hover,
.ne-button:focus-visible, .ne-dialog button:focus-visible, .ne-button.is-selected, .ne a.ne-button.is-selected {
  color: #fff; border-color: #b9c8ff #23357a #172a6a #8ea3f0;
  background: linear-gradient(var(--ne-select-top), var(--ne-select-bottom));
  text-shadow: var(--ne-outline), 0 0 8px rgba(170, 195, 255, 0.9);
}
.ne-button:active, .ne-dialog button:active { transform: translateY(1px); border-color: #1a1228 #6b5590 #8a74b8 #2a1e3d; }
.ne-menu { display: grid; gap: 10px; width: min(320px, 100%); margin: 0 auto 1.4em; }   /* stacked like the Game Menu */
.ne-menu .ne-button { width: 100%; text-align: center; }
.ne-menu__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* an inset panel inside the dialog (like the boxes in the game console) */
.ne-panel { padding: 14px 16px; background: rgba(2, 3, 9, 0.6);
            border: 2px solid; border-color: #1a1228 #6b5590 #8a74b8 #2a1e3d;   /* sunk into the stone */
            box-shadow: inset 0 0 0 1px #000, inset 0 0 26px rgba(0, 0, 0, 0.7); }

/* ---------- footer: a carved strip ---------- */
.ne-footer { width: min(900px, 100% - 32px); margin: 36px auto 0; padding: 14px 0 26px; text-align: center;
             color: var(--ne-text-dim); font-size: 0.9rem; text-shadow: var(--ne-outline); }
.ne-footer::before { content: ""; display: block; height: 12px; margin: 0 auto 12px; width: min(440px, 80%);
  background:
    radial-gradient(ellipse 8px 4px at 50% 50%, var(--ne-leaf) 90%, transparent 100%),
    linear-gradient(90deg, transparent, var(--ne-trim) 25%, var(--ne-trim) 75%, transparent) center / 100% 1px no-repeat; }
.ne-footer p { margin: 0.2em auto; max-width: none; }

@media (max-width: 720px) {
  .ne-topbar { grid-template-columns: 1fr auto; padding: 0 10px; }
  .ne-topbar__right { display: none; }
  .ne-orb { width: 128px; }
  .ne-main { width: calc(100% - 20px); padding-top: 64px; }
  .ne-dialog { border-width: 30px; padding-top: 36px; }
  .ne-crest { width: 124px; top: -58px; }
}
@media (prefers-reduced-motion: reduce) { .ne-button:active { transform: none; } }
