:root {
  --navy: #081126;
  --ink: #142033;
  --muted: #5c6b7f;
  --paper: #f7fbff;
  --surface: #ffffff;
  --surface-strong: #edf7ff;
  --line: #d6e4f3;
  --pink: #ff4fb7;
  --cyan: #14c7ee;
  --teal: #22bea5;
  --gold: #f2b84b;
  --coral: #ff7d67;
  --shadow: 0 18px 50px rgba(8, 17, 38, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 1000;
  transform: translateY(-160%);
  background: var(--surface);
  color: var(--navy);
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 5vw;
  background: rgba(8, 17, 38, 0.9);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand span {
  display: grid;
  min-width: 0;
}

.brand strong {
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.site-nav a,
.nav-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.site-nav .nav-action {
  background: #fff;
  color: var(--navy);
  font-weight: 800;
}

.site-nav .nav-action:hover,
.site-nav .nav-action:focus-visible {
  background: var(--gold);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.hero {
  position: relative;
  min-height: calc(100svh - 128px);
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-items: center;
  padding: 76px 5vw 96px;
  color: #fff;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  z-index: -3;
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(8, 17, 38, 0.9) 0%, rgba(8, 17, 38, 0.58) 48%, rgba(8, 17, 38, 0.22) 100%),
    linear-gradient(0deg, rgba(8, 17, 38, 0.75) 0%, rgba(8, 17, 38, 0.06) 56%);
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.84rem;
}

.hero h1 {
  margin: 0;
  max-width: 10ch;
  font-size: 4.5rem;
  line-height: 0.96;
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  border: 1px solid transparent;
}

.button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button.primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 14px 34px rgba(242, 184, 75, 0.26);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.hero-panel {
  position: absolute;
  right: 5vw;
  bottom: 28px;
  width: min(520px, 90vw);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-panel div {
  padding: 16px;
  background: rgba(8, 17, 38, 0.42);
}

.hero-panel strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
}

.hero-panel span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

.section {
  padding: 84px 5vw;
}

.section-head {
  max-width: 900px;
  margin-bottom: 32px;
}

.section-head.narrow {
  max-width: 760px;
}

.section-head h2,
.gear-copy h2,
.legal-page h1 {
  margin: 0;
  font-size: 2.55rem;
  line-height: 1.08;
}

.section-head p:not(.eyebrow),
.gear-copy p {
  max-width: 740px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-weight: 750;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 32px rgba(20, 32, 51, 0.08);
}

.game-card[hidden] {
  display: none;
}

.cover-link {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-strong);
}

.cover-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 480ms ease;
}

.game-card:hover .cover-link img {
  transform: scale(1.035);
}

.game-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.tag {
  width: fit-content;
  border-radius: 8px;
  background: #eaf8ff;
  color: #0d6f83;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 850;
}

.game-copy h3,
.journal-card h3,
.gear-list h3,
.world-list h3 {
  margin: 0;
  line-height: 1.18;
}

.game-copy p,
.journal-card p,
.gear-list p,
.world-list p {
  margin: 0;
  color: var(--muted);
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: auto 0 0;
}

.game-stats div {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.game-stats dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.game-stats dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.compact-card {
  min-height: 390px;
}

.compact-art {
  min-height: 220px;
  aspect-ratio: 3 / 2;
  background-image:
    linear-gradient(135deg, rgba(8, 17, 38, 0.1), rgba(255, 255, 255, 0.12)),
    url("../assets/hero/game-portal-hero.png");
  background-size: cover;
  background-position: center;
}

.gear-rally {
  background-position: left center;
}

.rune-harbor {
  background-position: right center;
}

.worlds-section {
  background: var(--surface);
}

.world-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: stretch;
}

.world-map {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-image:
    linear-gradient(0deg, rgba(8, 17, 38, 0.45), rgba(8, 17, 38, 0.05)),
    url("../assets/hero/game-portal-hero.png");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.world-node {
  position: absolute;
  min-width: 84px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--navy);
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.world-node.cyber {
  left: 10%;
  top: 36%;
}

.world-node.shrine {
  left: 38%;
  top: 22%;
}

.world-node.ruins {
  right: 24%;
  top: 42%;
}

.world-node.cloud {
  right: 8%;
  top: 28%;
}

.world-list {
  display: grid;
  gap: 14px;
}

.world-list article,
.journal-card,
.gear-list article,
.legal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.world-list article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 16px;
  align-content: start;
  padding: 22px;
}

.world-list span {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.journal-card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  box-shadow: 0 8px 26px rgba(20, 32, 51, 0.07);
}

.journal-card .date {
  color: var(--teal);
  font-weight: 850;
}

.journal-card a {
  width: fit-content;
  margin-top: auto;
  color: var(--navy);
  font-weight: 900;
  border-bottom: 2px solid var(--gold);
}

.gear-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 32px;
  align-items: start;
  background:
    linear-gradient(120deg, rgba(20, 199, 238, 0.13), rgba(255, 79, 183, 0.09) 46%, rgba(242, 184, 75, 0.14)),
    var(--paper);
}

.gear-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gear-list article {
  min-height: 210px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 5vw;
  background: var(--navy);
  color: #fff;
}

.site-footer p {
  max-width: 460px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: flex-end;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
}

.legal-page {
  min-height: 70vh;
  padding: 78px 5vw;
  background:
    linear-gradient(180deg, rgba(20, 199, 238, 0.12), transparent 360px),
    var(--paper);
}

.legal-page .section-head {
  margin-bottom: 24px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.legal-card {
  padding: 22px;
}

.legal-card h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
}

.legal-card ul {
  margin: 0;
  padding-left: 20px;
}

.redirect-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  background: var(--navy);
  color: #fff;
}

.redirect-page a {
  color: var(--gold);
  font-weight: 900;
}

@media (max-width: 1180px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gear-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    padding: 9px 18px;
  }

  .brand small {
    display: none;
  }

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

  .site-nav {
    position: absolute;
    left: 18px;
    right: 18px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border-radius: 8px;
    background: rgba(8, 17, 38, 0.98);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding: 62px 18px 130px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-copy {
    font-size: 1.05rem;
  }

  .hero-panel {
    left: 18px;
    right: 18px;
    width: auto;
    grid-template-columns: 1fr;
  }

  .hero-panel div {
    padding: 12px 14px;
  }

  .section {
    padding: 62px 18px;
  }

  .section-head h2,
  .gear-copy h2,
  .legal-page h1 {
    font-size: 2rem;
  }

  .world-layout,
  .gear-section,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .world-map {
    min-height: 390px;
  }

  .journal-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .brand img {
    width: 48px;
    height: 48px;
  }

  .brand strong {
    font-size: 0.95rem;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .hero-actions,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .filter-button {
    width: 100%;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-stats {
    grid-template-columns: 1fr;
  }

  .world-node {
    min-width: 72px;
    font-size: 0.83rem;
  }
}
