:root {
  --font-geist-sans: "Segoe UI";
  --font-geist-mono: "Cascadia Mono";
  --ink: #f3f0e9;
  --muted: #9ea5a6;
  --faint: #687174;
  --background: #0b0d0e;
  --surface: #111516;
  --surface-strong: #171c1e;
  --line: #293134;
  --amber: #f3a533;
  --amber-bright: #ffb84d;
  --green: #63d39a;
  --red: #ef6a67;
  --status-neutral: #8b9496;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  background: var(--background);
  color: var(--ink);
  font-family: var(--font-geist-sans), Inter, Arial, sans-serif;
  margin: 0;
}

body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
summary {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(11, 13, 14, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  height: 88px;
  justify-content: space-between;
  left: 0;
  padding: 0 clamp(24px, 4.7vw, 76px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.045em;
  gap: 12px;
}

.brand-mark {
  align-items: center;
  border: 1px solid var(--amber);
  color: var(--amber);
  display: inline-flex;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.67rem;
  height: 34px;
  justify-content: center;
  letter-spacing: -0.05em;
  clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%);
  width: 34px;
}

.site-header nav {
  display: flex;
  gap: clamp(24px, 3.2vw, 52px);
}

.site-header nav a {
  color: #d6d3cd;
  font-size: 0.94rem;
  position: relative;
}

.site-header nav a::after {
  background: var(--amber);
  bottom: -9px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
  width: 100%;
}

.site-header nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  display: flex;
  flex-direction: column;
  min-height: 900px;
  overflow: hidden;
  padding: 88px clamp(24px, 4.7vw, 76px) 36px;
  position: relative;
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  inset: 88px 0 0;
  mask-image: linear-gradient(to bottom, black 0%, transparent 92%);
  position: absolute;
}

.hero-network {
  background: url("/bear-network.png") center / contain no-repeat;
  filter: saturate(0.88) drop-shadow(0 0 42px rgba(243, 165, 51, 0.2));
  height: min(68vw, 790px);
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 18%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 13%, #000 87%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 18%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 13%, #000 87%, transparent 100%);
  opacity: 0.48;
  position: absolute;
  right: clamp(-170px, -8vw, -70px);
  top: 105px;
  width: min(68vw, 790px);
}

.hero-network::after {
  background: linear-gradient(90deg, rgba(11, 13, 14, 0.76) 0%, transparent 42%);
  content: "";
  inset: 0;
  position: absolute;
}

.hero-glow {
  background: radial-gradient(circle, rgba(243, 165, 51, 0.2), transparent 68%);
  filter: blur(12px);
  height: 480px;
  position: absolute;
  right: 8vw;
  top: 270px;
  width: 480px;
}

.hero-content {
  margin: auto 0;
  max-width: 900px;
  padding: 72px 0 52px;
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-label {
  color: var(--amber);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow {
  align-items: center;
  display: flex;
  gap: 11px;
  margin: 0 0 24px;
}

.eyebrow span {
  background: var(--amber);
  height: 1px;
  width: 28px;
}

.hero h1 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(4.4rem, 7.4vw, 7.7rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.91;
  margin: 0;
  max-width: 880px;
  text-transform: uppercase;
}

.hero h1 span {
  color: var(--amber);
}

.hero-copy {
  color: #c3c1bb;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.55;
  margin: 28px 0 34px;
  max-width: 590px;
}

.hero-connect {
  align-items: stretch;
  background: rgba(11, 13, 14, 0.74);
  border: 1px solid #4a5051;
  border-radius: 10px;
  display: flex;
  max-width: 750px;
  padding: 9px;
}

.address-block {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 7px 18px;
}

.address-kicker {
  color: var(--faint);
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.address-block code {
  color: var(--ink);
  font-family: var(--font-geist-mono), monospace;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  font-weight: 650;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-button,
.connection-terminal button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--amber);
  border-radius: 7px;
  color: var(--amber-bright);
  cursor: pointer;
  display: inline-flex;
  font-weight: 650;
  gap: 10px;
  justify-content: center;
  padding: 0 24px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.copy-button svg,
.connection-terminal button svg {
  fill: none;
  height: 21px;
  stroke: currentColor;
  stroke-width: 1.7;
  width: 21px;
}

.copy-button:hover,
.connection-terminal button:hover {
  background: var(--amber);
  color: #17130c;
  transform: translateY(-1px);
}

.hero-status {
  align-items: center;
  color: #d6d4ce;
  display: inline-flex;
  font-size: 0.88rem;
  gap: 10px;
  margin-top: 19px;
}

.hero-status > :last-child {
  color: var(--amber);
  margin-left: 3px;
  transition: transform 160ms ease;
}

.hero-status:hover > :last-child {
  transform: translateX(4px);
}

.status-dot {
  background: var(--status-color, var(--status-neutral));
  border-radius: 50%;
  box-shadow: 0 0 14px color-mix(in srgb, var(--status-color, var(--status-neutral)) 45%, transparent);
  height: 9px;
  width: 9px;
}

.hero-game-strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  position: relative;
  z-index: 3;
}

.hero-game-strip button {
  align-content: center;
  align-items: center;
  background: rgba(11, 13, 14, 0.66);
  border: 1px solid #353c3e;
  border-radius: 7px;
  color: #aaa9a4;
  cursor: pointer;
  display: flex;
  font-size: 0.76rem;
  gap: 10px;
  justify-content: flex-start;
  min-height: 66px;
  padding: 0 14px;
  flex-wrap: wrap;
  row-gap: 4px;
  transition: border 160ms ease, color 160ms ease, transform 160ms ease;
}

.hero-game-strip button > span:first-child {
  color: var(--amber);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.68rem;
}

.hero-game-strip .game-tile-status {
  flex-basis: 100%;
}

.hero-game-strip button:hover,
.hero-game-strip button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--amber) 8%, rgba(11, 13, 14, 0.66));
  border-color: var(--amber);
  color: var(--ink);
  transform: translateY(-2px);
}

.section {
  border-top: 1px solid var(--line);
  margin: 0 auto;
  max-width: 1600px;
  padding: clamp(88px, 10vw, 148px) clamp(24px, 4.7vw, 76px);
}

.section-label {
  margin: 7px 0 0;
}

.game-overview h2 {
  font-size: clamp(2.5rem, 4.2vw, 4.8rem);
  font-weight: 680;
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 0;
}

.game-overview > p:not(.section-label):not(.selected-game-label) {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0;
}

.selected-game-label {
  color: var(--faint);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  margin: 52px 0 12px;
  text-transform: uppercase;
}

.connection-type {
  border: 1px solid var(--line);
  border-radius: 100px;
  color: #c5c2bc;
  display: inline-block;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.7rem;
  margin-top: 24px;
  padding: 10px 14px;
}

.connection-terminal {
  background:
    linear-gradient(135deg, rgba(243, 165, 51, 0.055), transparent 52%),
    var(--surface);
  border: 1px solid #3e4749;
  border-radius: 12px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.22);
  padding: clamp(24px, 4vw, 52px);
  position: relative;
}

.connection-terminal::before {
  background: var(--amber);
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  top: -1px;
  width: 28%;
}

.terminal-topline {
  color: var(--faint);
  display: flex;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.68rem;
  justify-content: space-between;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-live {
  align-items: center;
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  letter-spacing: 0.04em;
  max-width: 76%;
  text-align: right;
}

.terminal-live i {
  border-radius: 50%;
  flex: 0 0 auto;
  height: 6px;
  width: 6px;
}

.live-state {
  align-items: center;
  color: var(--status-color, var(--status-neutral));
  display: inline-flex;
  font-family: var(--font-geist-mono), monospace;
  gap: 7px;
}

.live-state i {
  background: var(--status-color, var(--status-neutral));
  box-shadow: 0 0 10px color-mix(in srgb, var(--status-color, var(--status-neutral)) 35%, transparent);
}

.live-state--online {
  --status-color: var(--green);
  color: var(--green);
}

.live-state--offline {
  --status-color: var(--red);
  color: var(--red);
}

.live-state--checking,
.live-state--unknown {
  --status-color: var(--amber);
  color: var(--amber);
}

.live-state--unconfigured,
.live-state--disabled,
.live-state--unavailable {
  --status-color: var(--status-neutral);
  color: var(--status-neutral);
}

.game-tile-status {
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  line-height: 1.35;
}

.game-tile-status i {
  border-radius: 50%;
  flex: 0 0 auto;
  height: 6px;
  width: 6px;
}

@keyframes status-pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.78);
  }
}

.live-state--checking i,
.status-dot.live-state--checking {
  animation: status-pulse 1.4s ease-in-out infinite;
}

.selected-game-art {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 28px 0 0;
  overflow: hidden;
}

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

.selected-game-art img {
  aspect-ratio: 460 / 215;
  display: block;
  object-fit: cover;
  width: 100%;
}

.connection-terminal > code {
  display: block;
  font-family: var(--font-geist-mono), monospace;
  font-size: clamp(1.25rem, 2.7vw, 2.35rem);
  font-weight: 650;
  margin: 48px 0;
  overflow-wrap: anywhere;
}

.connection-terminal button {
  min-height: 58px;
  width: 100%;
}

.game-hub-section {
  background:
    linear-gradient(145deg, rgba(243, 165, 51, 0.035), transparent 38%),
    rgba(17, 21, 22, 0.32);
  max-width: none;
  padding-top: clamp(54px, 6vw, 88px);
}

.game-hub-section > * {
  margin-left: auto;
  margin-right: auto;
  max-width: 1448px;
}

.game-workspace {
  display: grid;
  gap: clamp(24px, 3vw, 42px);
  grid-template-columns: minmax(300px, 0.88fr) minmax(420px, 1.12fr);
}

.game-overview {
  min-width: 0;
}

.game-overview .selected-game-label {
  margin-top: 0;
}

.game-overview h2 {
  margin-bottom: 14px;
}

.game-overview .game-summary {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 620;
  margin-bottom: 10px;
}

.game-overview #selected-game-detail {
  max-width: 620px;
}

.game-overview .selected-game-art {
  margin-top: 30px;
}

.game-actions {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.hub-panel {
  background: var(--surface);
  border: 1px solid #353e40;
  border-radius: 12px;
  padding: clamp(24px, 3.2vw, 42px);
}

.panel-topline {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.panel-topline .section-label {
  margin: 0;
}

.status-card h3,
.selected-guide h3 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  letter-spacing: -0.025em;
  margin: 28px 0 10px;
}

.status-card > p {
  color: #c8c6c0;
  line-height: 1.6;
  margin: 0;
}

.status-card .selected-status-freshness {
  color: var(--faint);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.7rem;
  margin-top: 14px;
}

.selected-status-freshness[data-stale="true"] {
  color: var(--amber);
}

.terminal-topline .connection-type {
  margin: 0;
  padding: 7px 11px;
}

.selected-guide {
  grid-column: 1 / -1;
}

.selected-guide > .section-label {
  margin: 0;
}

.selected-guide > h3 {
  margin-top: 16px;
}

.selected-guide ol {
  color: #c8c6c0;
  counter-reset: guide-step;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}

.selected-guide li {
  counter-increment: guide-step;
  display: grid;
  gap: 12px;
  grid-template-columns: 28px 1fr;
  line-height: 1.55;
}

.selected-guide li::before {
  color: var(--amber);
  content: counter(guide-step, decimal-leading-zero);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.68rem;
  padding-top: 4px;
}

.selected-guide details {
  border-top: 1px solid var(--line);
  margin-top: 36px;
}

.selected-guide summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 650;
  justify-content: space-between;
  list-style: none;
  min-height: 70px;
}

.selected-guide summary::-webkit-details-marker {
  display: none;
}

.selected-guide summary i {
  color: var(--amber);
  font-size: 1.6rem;
  font-style: normal;
  font-weight: 250;
  transition: transform 180ms ease;
}

.selected-guide details[open] summary i {
  transform: rotate(45deg);
}

.selected-guide details ol {
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding-top: 24px;
}

footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 30px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1600px;
  padding: 48px clamp(24px, 4.7vw, 76px);
}

footer .brand {
  color: var(--ink);
  font-size: 1.1rem;
}

footer .brand-mark {
  height: 26px;
  width: 26px;
}

footer p,
footer > a:last-child {
  font-size: 0.78rem;
}

footer > a:last-child {
  color: #d5d2cb;
}

@media (max-width: 1050px) {
  .hero {
    min-height: 860px;
  }

  .hero-network {
    opacity: 0.3;
    right: -210px;
    width: 720px;
  }

  .hero-game-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .connection-terminal {
    max-width: 760px;
    width: 100%;
  }

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

  .game-actions,
  .game-overview {
    width: 100%;
  }

  .selected-guide {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .site-header {
    height: 72px;
  }

  .site-header .brand {
    font-size: 1.2rem;
  }

  .site-header nav {
    gap: 14px;
  }

  .site-header nav a {
    font-size: 0.72rem;
  }

  .site-header nav a:nth-child(3) {
    display: none;
  }

  .brand-mark {
    height: 28px;
    width: 28px;
  }

  .hero {
    min-height: 830px;
    padding-top: 72px;
  }

  .hero-grid {
    inset: 72px 0 0;
  }

  .hero-network {
    height: 520px;
    opacity: 0.24;
    right: -180px;
    top: 105px;
    width: 520px;
  }

  .hero-content {
    padding-top: 90px;
  }

  .hero h1 {
    font-size: clamp(3.65rem, 18vw, 5.5rem);
  }

  .hero-copy {
    max-width: 85%;
  }

  .hero-connect {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-button {
    min-height: 52px;
  }

  .hero-game-strip {
    gap: 8px;
  }

  .hero-game-strip button {
    min-height: 54px;
  }

  .game-hub-section {
    padding-bottom: 72px;
    padding-top: 48px;
  }

  .panel-topline,
  .terminal-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .terminal-live {
    justify-content: flex-start;
    max-width: 100%;
    text-align: left;
  }

  .connection-terminal > code {
    margin: 34px 0;
  }

  .selected-guide ol {
    grid-template-columns: 1fr;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .live-state--checking i,
  .status-dot.live-state--checking {
    animation: none;
  }
}
