/* Flint and Steel Network
   Fonts: Press Start 2P, Russo One, Source Sans 3. See fonts/OFL.txt. */

@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/press-start-2p-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Russo One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/russo-one-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
}

:root {
  --soot: #0e0c0a;
  --coal: #16130f;
  --iron: #211b16;
  --steel: #3a312a;
  --ash: #d2c6b8;
  --parchment: #f6efe4;
  --ember: #ff6a2a;
  --ember-deep: #c2410c;
  --spark: #ffc56b;
  --gold: #e8b15a;
  --online: #d8ffb0;
  --offline: #ffd0c8;
  --shadow: #070605;
  --header: 4.25rem;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-display: "Russo One", "Arial Black", Impact, sans-serif;
  --font-pixel: "Press Start 2P", "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--soot);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(255, 106, 42, 0.22), transparent 55%),
    radial-gradient(700px 420px at -10% 8%, rgba(255, 197, 107, 0.08), transparent 50%),
    var(--soot);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 236, 214, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 236, 214, 0.035) 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

::selection {
  background: var(--ember);
  color: #1a0d06;
}

:focus-visible {
  outline: 2px solid var(--spark);
  outline-offset: 3px;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p {
  margin: 0;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  background: var(--ember);
  color: #1a0d06;
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
}

.skip:focus {
  top: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.kicker {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  line-height: 1.7;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ember);
}

h2 {
  margin: 0.35rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 #2a1208;
}

.section-intro,
.lede,
.blurb,
.rules-intro,
.track-detail,
.rank p,
.rules li,
.note,
.instructions,
.checked {
  color: var(--ash);
}

.section {
  margin-top: 4rem;
  scroll-margin-top: 5.25rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem 1rem;
}

.section-intro {
  max-width: 42rem;
  margin-top: 0.35rem;
}

.checked {
  min-height: 1.5rem;
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 12, 10, 0.92);
  border-bottom: 2px solid #2a211b;
  backdrop-filter: blur(12px);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: var(--header);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
  color: var(--parchment);
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 36px;
  height: 36px;
  flex: none;
  box-shadow: 3px 3px 0 var(--shadow);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-name-short {
  display: none;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

.nav-link {
  color: var(--parchment);
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
}

.nav-link.is-current {
  color: var(--spark);
  box-shadow: inset 0 -2px 0 var(--ember);
}

.nav-toggle {
  display: inline-flex;
}

.nav-mobile {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
  background: var(--coal);
  border: 2px solid var(--steel);
  box-shadow: 6px 6px 0 var(--shadow);
}

.nav-mobile[hidden] {
  display: none;
}

.nav-mobile a {
  color: var(--parchment);
  text-decoration: none;
  font-weight: 600;
  padding: 0.85rem 0.9rem;
}

.nav-mobile a:hover,
.nav-mobile a:focus-visible {
  background: #2a211b;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border: 2px solid transparent;
  box-shadow: 3px 3px 0 var(--shadow);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--shadow);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--shadow);
}

.btn-ember {
  background: linear-gradient(#ff934f, #e85d04);
  color: #1a0d06;
  border-color: #ffd7a8;
}

.btn-steel {
  background: var(--iron);
  color: var(--parchment);
  border-color: var(--steel);
}

.btn-vote {
  background: #241c16;
  color: var(--parchment);
  border-color: #5a4030;
  box-shadow: 3px 3px 0 var(--shadow);
}

.btn-vote:hover {
  border-color: var(--ember);
  color: #ffe7c4;
}

.btn-discord .short {
  display: none;
}

.hero {
  display: grid;
  gap: 2rem;
  padding-top: 2.4rem;
}

.lockup {
  display: grid;
  margin-top: 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 12vw, 7.2rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.84;
  text-transform: uppercase;
  text-shadow: 6px 6px 0 #2a1208;
}

.lockup span {
  display: block;
}

.amp {
  color: var(--ember);
}

.network {
  margin-top: 0.85rem;
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  color: var(--spark);
}

.tagline {
  margin-top: 1rem;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-transform: uppercase;
}

.about-line,
.lede {
  max-width: 38rem;
  font-size: 1.12rem;
}

.about-line {
  margin-top: 0.85rem;
  color: var(--parchment);
  font-weight: 600;
}

.lede {
  margin-top: 0.3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.heat {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.4rem;
  max-width: 28rem;
}

.heat-label {
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.heat-bar {
  height: 10px;
  background: #241c16;
  border: 2px solid #000;
  box-shadow: inset 0 0 0 1px #4a3024;
}

.heat-bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #7a2e12, #ff6a2a 45%, #ffe1ad 72%, #ff6a2a);
}

.hero-plate {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 1.25rem 1rem 1.4rem;
  background:
    linear-gradient(180deg, rgba(255, 106, 42, 0.14), transparent 46%),
    var(--coal);
  border: 2px solid var(--steel);
  box-shadow: 8px 8px 0 var(--shadow);
}

.mark-wrap {
  position: relative;
  width: min(220px, 68vw);
}

.mark-wrap img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 8px 8px 0 var(--shadow);
}

.embers {
  position: absolute;
  inset: -10% 0 auto;
  height: 80%;
  pointer-events: none;
}

.embers i {
  position: absolute;
  bottom: 18%;
  width: 4px;
  height: 4px;
  background: var(--spark);
  box-shadow: 0 0 8px var(--ember);
  opacity: 0;
  animation: rise 4.2s linear infinite;
}

.embers i:nth-child(1) { left: 18%; animation-delay: 0.1s; }
.embers i:nth-child(2) { left: 32%; animation-delay: 1.1s; background: #fff1c9; }
.embers i:nth-child(3) { left: 46%; animation-delay: 0.6s; }
.embers i:nth-child(4) { left: 58%; animation-delay: 1.8s; background: var(--ember); }
.embers i:nth-child(5) { left: 70%; animation-delay: 0.3s; }
.embers i:nth-child(6) { left: 40%; animation-delay: 2.4s; width: 3px; height: 3px; }
.embers i:nth-child(7) { left: 24%; animation-delay: 2.9s; background: var(--ember); }
.embers i:nth-child(8) { left: 64%; animation-delay: 3.4s; }

@keyframes rise {
  0% { transform: translateY(12px); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(-130px); opacity: 0; }
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  padding: 0.35rem 0.6rem;
  background: #120f0c;
  border: 2px solid #3a312a;
  font-weight: 600;
}

.server-grid,
.join-grid,
.vote-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.15rem;
}

.server-card,
.join-track,
.vote-group,
.rank {
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 106, 42, 0.07), transparent 38%),
    var(--iron);
  border: 2px solid var(--steel);
  box-shadow: 6px 6px 0 var(--shadow);
}

.server-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1rem 1.05rem;
}

.server-card:focus-within,
.rank.is-highlight,
.join-track:focus-within {
  border-color: #8a4b2c;
}

.server-card.is-online {
  border-color: #6a3a22;
}

.server-card.is-offline {
  border-color: #5a3330;
}

.card-kicker,
.card-actions,
.vote-actions,
.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
}

.code,
.chip,
.rank-index {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  line-height: 1.85;
  letter-spacing: 0.04em;
}

.code {
  color: var(--spark);
}

.chip {
  padding: 0.2rem 0.4rem;
  color: var(--parchment);
  background: #120f0c;
  border: 2px solid #3a312a;
}

.server-card h3,
.join-track h3,
.vote-group h3,
.rank h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-transform: uppercase;
}

.platform {
  color: var(--gold);
  font-weight: 600;
}

.address {
  display: block;
  margin: 0;
  padding: 0.75rem 0.8rem;
  background: #0c0b0a;
  border: 2px solid #2c261f;
  color: #ffe7c2;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.confirm-note {
  padding: 0.55rem 0.7rem;
  background: #2a1c10;
  border: 2px dashed var(--gold);
  color: #ffd7a8;
  font-weight: 600;
}

.card-actions {
  margin-top: auto;
}

.status {
  min-height: 1.6rem;
}

.lamp {
  width: 10px;
  height: 10px;
  flex: none;
  background: #5c564e;
  box-shadow: 0 0 0 2px #000;
}

.status-label {
  font-weight: 600;
}

.is-online .lamp {
  background: #ffb020;
  box-shadow: 0 0 10px #ff6a2a, 0 0 0 2px #000;
  animation: pulse 1.6s ease-in-out infinite;
}

.is-online .status-label { color: var(--online); }
.is-offline .lamp { background: #ff6b5a; }
.is-offline .status-label { color: var(--offline); }
.is-unknown .status-label,
.is-unconfirmed .status-label { color: var(--spark); }
.is-code .lamp { background: var(--ember); }

.status-meta {
  color: var(--ash);
}

.join-code-block {
  display: grid;
  gap: 0.25rem;
}

.code-label {
  font-weight: 600;
  color: var(--gold);
}

.join-code {
  font-family: var(--font-pixel);
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  letter-spacing: 0.12em;
  line-height: 1.85;
  color: var(--spark);
}

.join-track,
.vote-group,
.rank {
  padding: 1rem;
}

.join-track ol {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.pack-links {
  display: grid;
  gap: 0.3rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.note,
.instructions {
  margin-top: 0.15rem;
}

.rank-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.15rem;
}

.rank {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) 1fr;
  gap: 0.35rem 1rem;
  align-items: center;
}

.rank.is-highlight {
  background:
    linear-gradient(90deg, rgba(255, 106, 42, 0.18), transparent 55%),
    var(--iron);
  border-color: var(--ember);
}

.rank-name {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.rank-index {
  color: var(--gold);
}

.rules {
  display: grid;
  gap: 0.65rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: rule;
}

.rules li {
  position: relative;
  padding: 0.9rem 0.95rem 0.9rem 3.5rem;
  background: #14110e;
  border: 2px solid #2c261f;
  color: var(--parchment);
  counter-increment: rule;
}

.rules li::before {
  content: counter(rule, decimal-leading-zero);
  position: absolute;
  left: 0.75rem;
  top: 1.05rem;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  color: var(--spark);
}

.vote-message {
  margin-top: 0.55rem;
  max-width: 40rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
}

.vote-hint {
  margin-top: 0.35rem;
  color: var(--ash);
}

.vote-group h3 {
  margin-bottom: 0.7rem;
}

.site-footer {
  margin-top: 4rem;
  border-top: 2px solid var(--ember);
  background: #100e0c;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.2rem;
  padding: 1.3rem 0 1.7rem;
}

.footer-id {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.footer-brand {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-about {
  max-width: 24rem;
  color: var(--ash);
}

.soon {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  line-height: 1.7;
  color: var(--spark);
}

.noscript {
  padding: 2rem 0 3rem;
}

.clipboard-sink {
  position: fixed;
  left: -9999px;
  top: 0;
}

#app:empty::before {
  content: "Lighting the forge…";
  display: block;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--ash);
}

@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

@media (max-width: 420px) {
  .brand-name-long { display: none; }
  .brand-name-short { display: inline; }
}

@media (max-width: 720px) {
  .btn-discord .long { display: none; }
  .btn-discord .short { display: inline; }
  .rank { grid-template-columns: 1fr; }
  .heat { grid-template-columns: 1fr; }
}

@media (min-width: 800px) {
  .server-grid { grid-template-columns: 1fr 1fr; }
  .rules { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
    align-items: center;
    gap: 2.5rem;
    padding-top: 3.2rem;
  }

  .join-grid { grid-template-columns: 1.25fr 0.9fr 0.9fr; }
}

@media (min-width: 880px) {
  .nav-desktop { display: flex; }
  .nav-toggle,
  .nav-mobile { display: none !important; }
}

@media (hover: hover) {
  .server-card:hover,
  .rank:hover,
  .join-track:hover {
    border-color: var(--ember);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
