/* Dark Node: Initiation — Rules / How-to-Play page.
   Reuses the tokens + chrome from style.css (:root vars, .hero, .crt, footer);
   this file only adds the rules-specific layout + the hint mini-diagrams. */

.rules {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.rules__back {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.rules__back:hover { color: var(--cyan); }

.rules h1 {
  font-family: var(--display-heavy);
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0 0 0.4rem;
}
.rules h1::after {
  content: "";
  display: block;
  width: 64px; height: 3px;
  margin-top: 0.9rem;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(34, 224, 255, 0.6);
}
.rules__intro { color: var(--ink-dim); max-width: 640px; font-size: 1.05rem; }
.rules__intro em { color: var(--cyan); font-style: normal; }

.rules h2 {
  font-family: var(--display-heavy);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(1.15rem, 3.4vw, 1.5rem);
  color: var(--ink);
  margin: 3.5rem 0 1.25rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.rules p { color: var(--ink-dim); }
.rules strong { color: var(--ink); }
.rules .accent { color: var(--cyan); }
.rules .mag { color: var(--mag); }

/* ---------- Action / mechanic cards ---------- */
.rules__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  background: linear-gradient(180deg, var(--bg-surface), var(--bg-deep));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
}
.card__head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}
.card__glyph {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
}
.card__glyph img { width: 100%; height: 100%; }
.card h3 {
  font-family: var(--display);
  letter-spacing: 0.04em;
  color: var(--cyan);
  margin: 0;
  font-size: 1.05rem;
}
.card p { margin: 0; color: var(--ink-dim); font-size: 0.96rem; }
.card p + p { margin-top: 0.6rem; }

/* ---------- Legend ---------- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin: 1.25rem 0 0;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 19, 34, 0.6);
}
.legend__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-dim);
}
.swatch {
  width: 26px; height: 26px;
  flex: 0 0 26px;
  border-radius: 6px;
  border: 1px solid var(--line-bright);
  position: relative;
  background: var(--bg-surface);
  display: grid;
  place-items: center;
}
.swatch--wall { background:
    repeating-linear-gradient(-45deg, transparent 0 3px, rgba(244,247,255,0.5) 3px 4px),
    var(--bg-surface); }
.swatch--hint { background: rgba(34, 224, 255, 0.10); border-color: var(--cyan); }
.swatch__img { width: 78%; height: 78%; }
.legend__foot { font-size: 0.9rem; color: var(--ink-faint); margin: 0.75rem 0 0; }
.legend__foot .mag { color: var(--mag); }

/* ---------- Hint reference grid ---------- */
.hints {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
}
.hint-card {
  background: linear-gradient(180deg, var(--bg-surface), var(--bg-deep));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
}
.hint-card__top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.hint-card__icon { width: 34px; height: 34px; flex: 0 0 34px; }
.hint-card__icon img { width: 100%; height: 100%; }
.hint-card__name {
  font-family: var(--display);
  letter-spacing: 0.03em;
  color: var(--ink);
  font-size: 1.02rem;
  margin: 0;
}
.hint-card__desc {
  color: var(--ink-dim);
  font-size: 0.93rem;
  margin: 0 0 1.1rem;
}

/* ---------- Real in-game field capture ---------- */
.hint-card__shot { margin-top: auto; }
.hint-card__shot img {
  width: 100%;
  max-width: 240px;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.hint-card__note {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.84rem;
  margin: 0.8rem 0 0;
}

/* ---------- Ray/scan showcase figure ---------- */
.rays-shot {
  margin: 1.5rem auto 0;
  max-width: 320px;
  text-align: center;
}
.rays-shot img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.rays-shot figcaption {
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin-top: 0.8rem;
}

/* ---------- Coming-soon teaser card ---------- */
.hint-card--soon {
  border-style: dashed;
  border-color: var(--line-bright);
  opacity: 0.82;
}
.hint-card--soon .hint-card__icon { opacity: 0.7; }
.hint-card__soon-badge {
  margin-left: auto;
  align-self: flex-start;
  font-family: var(--display);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .hints { grid-template-columns: 1fr; }
}
