/* Histerium — void, crystal, and arc-lightning. Palette drawn from the key art
   (images/): storm-violet sky, amethyst/ice crystals, gold lightning = heat. */

:root {
  --void: #0a0612;        /* page background — the storm sky's darkest corner */
  --ruin: #150d22;        /* raised panels — castle stone at dusk */
  --border: #2c2140;
  --amethyst: #b46bff;
  --crystal: #4cc3ff;
  --arc: #f2c14e;         /* the gold lightning — heat's color everywhere */
  --siege: #ff5d5d;
  --text: #ece7f4;
  --text-dim: #a396bd;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Alegreya Sans", system-ui, sans-serif;
  --font-pixel: "Silkscreen", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ================= hero ================= */

.hero {
  position: relative;
  background:
    /* scrim: readable text over busy art, dissolving into the void bg */
    linear-gradient(to bottom,
      rgba(10, 6, 18, 0.55) 0%,
      rgba(10, 6, 18, 0.75) 55%,
      var(--void) 96%),
    url("img/hero-bg.png") center 20% / cover no-repeat,
    var(--void);
  padding: clamp(3.5rem, 10vh, 7rem) 1.5rem 5rem;
  text-align: center;
}

.hero-inner {
  max-width: 44rem;
  margin: 0 auto;
  animation: rise 0.9s ease-out both;
}

.crest {
  width: clamp(96px, 18vw, 138px);
  height: auto;
  filter: drop-shadow(0 6px 24px rgba(180, 107, 255, 0.35));
}

.kicker {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--crystal);
  margin-top: 1.25rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  letter-spacing: 0.14em;
  margin-right: -0.14em; /* optically recenter tracked caps */
  color: var(--text);
  text-shadow:
    0 0 18px rgba(242, 193, 78, 0.35),
    0 0 46px rgba(180, 107, 255, 0.45);
  animation: arc-flicker 2.4s ease-out 1;
}

.tagline {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.6vw, 1.2rem);
  letter-spacing: 0.32em;
  margin-right: -0.32em;
  text-transform: uppercase;
  color: var(--amethyst);
  margin-top: 0.4rem;
}

.tagline span { color: var(--arc); }

.pitch {
  max-width: 33rem;
  margin: 1.75rem auto 2.25rem;
  font-size: 1.15rem;
  text-wrap: balance;
}

.pitch strong { color: var(--arc); font-weight: 700; }

/* ---- address + status ---- */

.address-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.address {
  display: inline-flex;
  align-items: baseline;
  gap: 0.8rem;
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--text);
  background: rgba(21, 13, 34, 0.85);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.address:hover {
  border-color: var(--arc);
  box-shadow: 0 0 14px rgba(242, 193, 78, 0.25);
}

.copy-hint {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.address-inline { font-size: 0.85rem; padding: 0.2rem 0.6rem; }

.status {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.status::before { content: "●"; margin-right: 0.45rem; }
.status.online::before { color: #4ade80; }
.status.offline::before { color: var(--text-dim); }

/* ---- buttons ---- */

.hero-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transition: filter 0.15s, border-color 0.15s;
}

.btn:hover { filter: brightness(1.15); }

.btn-primary {
  background: linear-gradient(115deg, var(--amethyst), #7d3fd4);
  color: #120826;
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(10, 6, 18, 0.5);
}

.btn-ghost:hover { border-color: var(--amethyst); }

/* ================= sections ================= */

.section {
  max-width: 46rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 1.5rem;
}

.eyebrow {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--crystal);
  margin-bottom: 0.5rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.section-lede {
  color: var(--text-dim);
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-lede, .card p { font-size: 1rem; }

/* ================= the heat rail ================= */
/* A run rendered as rising heat: rail fills cold-blue -> arc-gold on scroll;
   tick marks sit at the game's three real escalation thresholds. */

.run {
  list-style: none;
  position: relative;
  padding-left: 2.6rem;
  display: grid;
  gap: 1.6rem;
  --heat-fill: 1; /* no-JS / reduced-motion default: fully lit */
}

.run::before {                     /* unlit rail */
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 3px;
  background: var(--border);
  border-radius: 2px;
}

.run::after {                      /* heat fill */
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(to bottom,
    var(--crystal), var(--amethyst) 40%, var(--arc) 78%, var(--siege));
  transform-origin: top;
  transform: scaleY(var(--heat-fill));
  transition: transform 0.2s linear;
}

.moment { position: relative; }

.moment::before {                  /* node on the rail */
  content: "";
  position: absolute;
  left: -2.31rem;
  top: 0.45rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--void);
  border: 2px solid var(--text-dim);
  z-index: 1;
}

.moment h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.moment p { color: var(--text-dim); margin-top: 0.2rem; }
.moment em { color: var(--arc); font-style: italic; }

.threshold {
  position: relative;
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--arc);
  padding: 0.1rem 0;
}

.threshold::before {               /* gold diamond tick at the threshold */
  content: "";
  position: absolute;
  left: -2.27rem;
  top: 0.35rem;
  width: 9px;
  height: 9px;
  background: var(--arc);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(242, 193, 78, 0.6);
  z-index: 1;
}

/* ================= feature grid ================= */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.card {
  background: var(--ruin);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.3rem;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--amethyst); }

.card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.card p { color: var(--text-dim); }

/* ================= join ================= */

.join-steps {
  display: grid;
  gap: 0.8rem;
  padding-left: 1.25rem;
  color: var(--text-dim);
}

.join-steps strong { color: var(--text); }
.join-steps a { color: var(--amethyst); }
.join-steps a:hover { color: var(--arc); }

/* ================= footer ================= */

footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

footer a { color: var(--text-dim); }
footer a:hover { color: var(--arc); }

footer p { margin-top: 0.6rem; }

.fine-print {
  font-size: 0.8rem;
  color: var(--text-dim);
  opacity: 0.7;
}

/* ================= motion ================= */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes arc-flicker {
  0%, 55%, 61%, 100% {
    text-shadow: 0 0 18px rgba(242, 193, 78, 0.35),
                 0 0 46px rgba(180, 107, 255, 0.45);
  }
  57%, 59% {
    text-shadow: 0 0 26px rgba(242, 193, 78, 0.8),
                 0 0 60px rgba(180, 107, 255, 0.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-inner { animation: none; }
  .wordmark { animation: none; }
  .run::after { transition: none; }
}
