/* ==========================================================================
   Infinity Justice — infinityjusticegame.com
   Design tokens (shared DNA with infinityjustice.com)
   ========================================================================== */

:root {
  /* brand palette */
  --bg: #0a0e1a;
  --panel: #0d1225;
  --gold: #c9a84c;
  --gold-hot: #ffd700;
  --cyan: #4fc3f7;
  --red: #c41e3a;
  --chrome: #dfe6ee;
  --text: #e0e0e0;
  --muted: #8d94a3;
  --hairline: rgba(201, 168, 76, 0.28);

  /* nation accents */
  --melvaris: #a9dcf5;
  --korrath: #ff6b2b;
  --avarion: #e9c96b;
  --celvaris: #8b5fd6;
  --morthis: #9d7fd6;
  --akrion: #f2c23e;
  --elyndra: #46b878;
  --ovrakis: #b2432f;

  /* grade tiers */
  --t-common: #8f98a3;
  --t-uncommon: #5cbf7a;
  --t-rare: #4fc3f7;
  --t-epic: #9b6df0;
  --t-legend: #ff8c3b;
  --t-ancient: #e04f4f;
  --t-mythic: #d94fd0;

  /* type */
  --font-display: "Texturina", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --fs-hero: clamp(2rem, 6.5vw, 4.1rem);
  --fs-h2: clamp(1.6rem, 3.2vw, 2.3rem);
  --fs-h3: 1.25rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;

  /* rhythm */
  --section-pad: clamp(4.5rem, 13vh, 8rem);
  --content-max: 68rem;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold-hot);
}

:focus-visible {
  outline: 2px solid var(--gold-hot);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: rgba(201, 168, 76, 0.3);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Atmosphere — starfield + nebula tint, pure CSS
   -------------------------------------------------------------------------- */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 22px 34px, rgba(223, 230, 238, 0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 118px 92px, rgba(223, 230, 238, 0.35) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 66px 152px, rgba(79, 195, 247, 0.4) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 190px 58px, rgba(201, 168, 76, 0.35) 50%, transparent 51%);
  background-size: 180px 180px, 240px 240px, 300px 300px, 340px 340px;
  opacity: 0.5;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 12% 6%, rgba(79, 195, 247, 0.055), transparent 70%),
    radial-gradient(55% 45% at 88% 92%, rgba(201, 168, 76, 0.05), transparent 70%);
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.section {
  padding-block: var(--section-pad);
}

.kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  margin: 0 0 0.9rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  color: var(--chrome);
}

h2 {
  font-size: var(--fs-h2);
  margin-bottom: 1.4rem;
}

h3 {
  font-size: var(--fs-h3);
}

.lede {
  max-width: 62ch;
}

.lede p {
  margin: 0 0 1.2rem;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
}

.divider span {
  font-family: var(--font-display);
  color: var(--gold);
  opacity: 0.75;
  font-size: 1.1rem;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 26, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.14);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--chrome);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  white-space: nowrap;
}

.brand:hover {
  color: var(--gold-hot);
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(79, 195, 247, 0.25);
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-left: auto;
}

.site-nav a {
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--gold-hot);
}

.site-nav a.nav-hot {
  color: var(--gold);
}

.socials {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.site-header .socials {
  margin-left: clamp(0.5rem, 2vw, 1.5rem);
}

.socials a {
  color: var(--muted);
  line-height: 0;
}

.socials a:hover {
  color: var(--gold-hot);
}

.socials svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  min-height: 92svh;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  background:
    linear-gradient(180deg, rgba(10, 14, 26, 0.5) 0%, rgba(10, 14, 26, 0.78) 55%, var(--bg) 96%),
    url("../assets/hero.webp") center / cover no-repeat;
  padding-block: 6rem 4rem;
}

.hero-inner {
  display: grid;
  justify-items: center;
  gap: 1.3rem;
  padding-inline: 1.25rem;
}

.emblem {
  position: relative;
  width: clamp(120px, 18vw, 170px);
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 40px rgba(79, 195, 247, 0.18),
    0 0 90px rgba(201, 168, 76, 0.12);
}

.emblem::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 36px 18px var(--bg);
}

.hero .kicker {
  margin: 0;
}

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f3e7c3 20%, var(--gold) 60%, #8f7538 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(201, 168, 76, 0.25);
}

.hero .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--chrome);
  margin: 0;
}

.hero .sub {
  color: var(--muted);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  margin: 0;
}

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85em 1.9em;
  border-radius: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-solid {
  background: linear-gradient(180deg, #dcbb60, #ab8a38);
  color: #10131f;
}

.btn-solid:hover {
  color: #10131f;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(201, 168, 76, 0.3);
}

.btn-ghost {
  border: 1px solid var(--hairline);
  color: var(--gold);
}

.btn-ghost:hover {
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold-hot);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   The Game — stats + grade ladder
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.stat {
  text-align: center;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1.6rem 1rem 1.4rem;
}

.stat .num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 0.45rem;
}

.stat .lbl {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.tiers {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
  margin-top: 2.2rem;
}

.tier i {
  display: block;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}

.tier span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.tier-common i { background: var(--t-common); }
.tier-uncommon i { background: var(--t-uncommon); }
.tier-rare i { background: var(--t-rare); }
.tier-epic i { background: var(--t-epic); }
.tier-legend i { background: var(--t-legend); }
.tier-ancient i { background: var(--t-ancient); }
.tier-mythic i { background: var(--t-mythic); }
.tier-infinity i { background: linear-gradient(90deg, var(--gold), #fff3c4); }
.tier-infinity span { color: var(--gold); }

.tiers-caption {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-small);
  font-style: italic;
  font-family: var(--font-display);
}

/* --------------------------------------------------------------------------
   Foundation
   -------------------------------------------------------------------------- */

.foundation {
  background: linear-gradient(180deg, rgba(13, 18, 37, 0.55), rgba(13, 18, 37, 0.85));
  border-block: 1px solid rgba(255, 255, 255, 0.05);
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem 2.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 56rem;
}

.checklist li {
  position: relative;
  padding-left: 1.8rem;
  color: var(--text);
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Progress timeline
   -------------------------------------------------------------------------- */

.progress {
  position: relative;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(10, 14, 26, 0.88) 18%, rgba(10, 14, 26, 0.88) 82%, var(--bg) 100%),
    url("../assets/band.webp") center / cover no-repeat;
}

.timeline {
  position: relative;
  margin: 2.5rem 0 0;
  padding: 0 0 0 2.2rem;
  list-style: none;
  max-width: 46rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--hairline), rgba(201, 168, 76, 0.08));
}

.timeline li {
  position: relative;
  padding-bottom: 1.9rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -2.2rem;
  top: 0.45rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--gold);
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.4);
}

.timeline li.current::before {
  background: var(--bg);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(79, 195, 247, 0.55);
}

.timeline li.future::before {
  background: var(--bg);
  border-color: rgba(141, 148, 163, 0.5);
  box-shadow: none;
}

.timeline .m-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--chrome);
  letter-spacing: 0.04em;
}

.timeline .m-tag {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-left: 0.6rem;
}

.timeline li.current .m-tag {
  color: var(--cyan);
}

.timeline li.future .m-title,
.timeline li.future .m-tag {
  color: var(--muted);
}

.timeline p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: var(--fs-small);
}

.progress .honest {
  margin: 2.4rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
  max-width: 46rem;
}

/* --------------------------------------------------------------------------
   World band (nation chips)
   -------------------------------------------------------------------------- */

.world-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.2rem;
}

.chip {
  --accent: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 0.5rem 1.1rem 0.5rem 0.8rem;
  background: var(--panel);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.chip:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

.chip svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.chip span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text);
}

.world-link {
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   Devlog teaser rows + devlog page
   -------------------------------------------------------------------------- */

.devrows {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.devrow {
  display: grid;
  grid-template-columns: 7.5rem 8.5rem 1fr;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1rem 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.devrow time {
  color: var(--muted);
  font-size: var(--fs-small);
}

.devrow .title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--chrome);
}

.devrow .title:hover {
  color: var(--gold-hot);
}

.devrow .excerpt {
  display: block;
  color: var(--muted);
  font-size: var(--fs-small);
  font-family: var(--font-body);
  font-weight: 400;
  margin-top: 0.15rem;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.15em 0.7em;
  border-radius: 3px;
  white-space: nowrap;
}

.tag-milestone {
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.4);
}

.tag-infra {
  color: var(--cyan);
  border: 1px solid rgba(79, 195, 247, 0.4);
}

.more-link {
  display: inline-block;
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* devlog page */

.page-head {
  padding-block: clamp(3rem, 8vh, 5rem) 0;
}

.page-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.06em;
}

.page-head .intro {
  color: var(--muted);
  max-width: 58ch;
  margin-top: 1rem;
}

.entries {
  position: relative;
  margin-top: 3rem;
  padding-left: 2.2rem;
}

.entries::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--hairline), rgba(201, 168, 76, 0.06));
}

.entry {
  position: relative;
  padding-bottom: 3.2rem;
  max-width: 62ch;
}

.entry::before {
  content: "";
  position: absolute;
  left: -2.2rem;
  top: 0.5rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--gold);
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.4);
}

.entry.current::before {
  background: var(--bg);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(79, 195, 247, 0.55);
}

.entry .meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.5rem;
}

.entry .meta time {
  color: var(--muted);
  font-size: var(--fs-small);
}

.entry h2 {
  font-size: 1.45rem;
  margin-bottom: 0.8rem;
}

.entry p {
  margin: 0 0 1rem;
  color: var(--text);
}

.entry p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid rgba(201, 168, 76, 0.14);
  padding-block: 2.5rem;
  margin-top: var(--section-pad);
}

.site-footer .wrap {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  text-align: center;
}

.site-footer .socials svg {
  width: 20px;
  height: 20px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-small);
}

.site-footer .crosslink {
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

.stagger > :nth-child(2) { transition-delay: 0.08s; }
.stagger > :nth-child(3) { transition-delay: 0.16s; }
.stagger > :nth-child(4) { transition-delay: 0.24s; }
.stagger > :nth-child(5) { transition-delay: 0.32s; }
.stagger > :nth-child(6) { transition-delay: 0.4s; }
.stagger > :nth-child(7) { transition-delay: 0.48s; }
.stagger > :nth-child(8) { transition-delay: 0.56s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .chip { transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .tiers {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 1rem;
  }
}

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

  .devrow {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }

  .site-header .socials {
    margin-left: auto;
  }
}
