/* ============================================================
   spiretcg.com: what every page shares. The faces, the palette, the
   header (emblem, nav, Play), the footer (Play / Learn / Community /
   On-chain testnet), the icon kit, the Discord button, the skip link.
   Each page keeps its own layout in its own <style>.
   Icons: <svg class="ico"><use href="/img/icons.svg#i-leaf"/></svg>
   (art/icons/make-web-icons.py writes the sprite).
   ============================================================ */

@font-face { font-family: "Grenze Gotisch"; src: url("/fonts/GrenzeGotisch.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/Cinzel.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond-Italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  --char: #16110c; --char-soft: #221a12; --char-line: #3a2e21;
  --parchment: #e7d9bb; --parchment-soft: #cdbb97; --parchment-dim: #a8977a;
  --ink: #211a12; --ink-soft: #5a4c39;
  --ember: #b3491a; --ember-hot: #d0602a;
  --green: #4f7434; --blue: #33639a; --orange: #b8521d;
  /* the same three on a dark ground */
  --green-lit: #8fb86a; --blue-lit: #7fa8d8; --orange-lit: #e58a50;
  --discord: #5865f2; --discord-hover: #4752c4;
  --display: "Grenze Gotisch", "Cinzel", serif;
  --eyebrow: "Cinzel", serif;
  --body: "EB Garamond", Georgia, serif;
  --ui: "Inter", system-ui, -apple-system, sans-serif;
}

/* ---------- icons ---------- */
.ico { display: inline-block; width: 1em; height: 1em; flex: none; fill: currentColor; vertical-align: -0.14em; }
.ico-green { color: var(--green); }
.ico-blue { color: var(--blue); }
.ico-orange { color: var(--orange); }
.on-dark .ico-green, .site-top .ico-green, .site-foot .ico-green { color: var(--green-lit); }
.on-dark .ico-blue, .site-top .ico-blue, .site-foot .ico-blue { color: var(--blue-lit); }
.on-dark .ico-orange, .site-top .ico-orange, .site-foot .ico-orange { color: var(--orange-lit); }

/* A line with the three colors in its middle: between sections. */
.ornament { display: flex; align-items: center; gap: 0.8rem; margin: 0 auto; max-width: 22rem; font-size: 1.05rem; color: var(--ink-soft); }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.45; }
.ornament .ico { opacity: 0.9; }

/* ---------- skip link ---------- */
.skip {
  position: absolute; left: 0.75rem; top: -3rem; z-index: 50;
  background: var(--parchment); color: var(--ink); font: 600 0.95rem var(--ui);
  padding: 0.5rem 0.9rem; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 0.75rem; outline: 3px solid var(--ember); outline-offset: 2px; }

/* ---------- header ---------- */
.site-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.75rem;
  padding: 0.85rem 0; font-family: var(--ui); color: var(--parchment);
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--parchment); }
.brand img { display: block; width: 36px; height: 36px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); }
.brand span { font-family: var(--display); font-weight: 600; font-size: 1.75rem; line-height: 1; }
.brand small { font-family: var(--eyebrow); font-weight: 600; font-size: 0.7rem; letter-spacing: 0.16em; color: var(--parchment-dim); align-self: flex-end; margin-bottom: 0.2rem; }
.site-nav { display: flex; align-items: center; gap: 0.25rem 1.15rem; margin-left: auto; margin-right: 0.2rem; font-size: 0.92rem; }
.site-nav a { color: var(--parchment-soft); text-decoration: none; white-space: nowrap; padding: 0.3rem 0; }
.site-nav a:hover { color: var(--parchment); }
/* The page you're on: full-strength text with an ember underline. */
.site-nav a[aria-current] { color: var(--parchment); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ember); }
.nav-discord {
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.92rem; text-decoration: none; white-space: nowrap;
  color: #fff; background: var(--discord); border-radius: 999px; padding: 0.38rem 0.85rem;
}
.nav-discord:hover { background: var(--discord-hover); }
.nav-discord .ico { width: 1.15em; height: 1.15em; }
.nav-play {
  font-weight: 600; font-size: 0.95rem; color: #fff; background: var(--ember); text-decoration: none;
  border-radius: 999px; padding: 0.42rem 1.05rem; white-space: nowrap;
}
.nav-play:hover { background: var(--ember-hot); }
.site-top a:focus-visible, .site-foot a:focus-visible { outline: 2px solid var(--parchment); outline-offset: 3px; border-radius: 3px; }

/* Phones: emblem and Play on the first row, the nav below, scrolling if it must. */
@media (max-width: 720px) {
  .site-top { gap: 0.5rem 0.6rem; }
  .brand small { display: none; }
  .nav-discord { margin-left: auto; }
  .site-nav {
    order: 3; flex: 1 0 100%; margin: 0; gap: 0.2rem 1rem; overflow-x: auto; scrollbar-width: none;
    padding: 0.1rem 0.1rem 0.2rem;
  }
  .site-nav::-webkit-scrollbar { display: none; }
}

/* ---------- the Discord button (big) ---------- */
.btn-discord {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 600 1rem/1.6 var(--ui); letter-spacing: 0.01em; text-decoration: none;
  color: #fff; background: var(--discord); border: 1.5px solid var(--discord);
  padding: 0.85rem 1.4rem; cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.btn-discord .ico { width: 1.35em; height: 1.35em; vertical-align: middle; }
.btn-discord:hover { background: var(--discord-hover); border-color: var(--discord-hover); transform: translateY(-1px); }
.btn-discord:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }

/* ---------- a "testnet" tag ---------- */
.tag-testnet {
  display: inline-block; font: 600 0.68rem var(--ui); letter-spacing: 0.08em; text-transform: uppercase;
  color: #6b3c00; background: #f3d79a; border: 1px solid #c9a253; border-radius: 4px; padding: 0.05rem 0.4rem;
  vertical-align: 0.15em;
}

/* ---------- footer ---------- */
.site-foot { font-family: var(--ui); font-size: 0.9rem; color: var(--parchment-dim); padding: 2.75rem 0 2.25rem; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem 2rem; }
.site-foot h2 {
  font-family: var(--eyebrow); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--parchment-soft); margin: 0 0 0.7rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem;
}
.site-foot h2 .tag-testnet { letter-spacing: 0.06em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-foot a { color: var(--parchment); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-foot .foot-discord { display: inline-flex; align-items: center; gap: 0.45rem; }
.site-foot .foot-discord .ico { color: #8d97ff; }
.foot-note { margin: 0.7rem 0 0; font-size: 0.8rem; line-height: 1.45; color: var(--parchment-dim); }
.foot-base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem;
  margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--char-line); font-size: 0.82rem;
}
.foot-base .marks { display: inline-flex; gap: 0.55rem; font-size: 1rem; }
.foot-base p { margin: 0; }
@media (max-width: 820px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .foot-cols { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .btn-discord, .nav-play { transition: none; }
}
