:root {
  --bg: #100f0d;
  --bg-2: #17130f;
  --panel: rgba(35, 29, 23, 0.78);
  --panel-solid: #211a14;
  --text: #f5ead8;
  --muted: #c6b59c;
  --copper: #d98237;
  --copper-2: #ffb35f;
  --blue: #4dd5ff;
  --purple: #a778ff;
  --gold: #ffd166;
  --green: #9cf060;
  --danger: #ff6d5e;
  --line: rgba(255, 206, 142, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  --font: "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% 12%, rgba(217, 130, 55, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 16%, rgba(77, 213, 255, 0.13), transparent 26rem),
    radial-gradient(circle at 72% 80%, rgba(156, 240, 96, 0.1), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%) 0 0 / 28px 28px,
    linear-gradient(225deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%) 0 0 / 28px 28px,
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

code {
  color: #fff7db;
  font-family: "Lucida Console", Monaco, monospace;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--gold);
  color: #1a1208;
  padding: 0.65rem 1rem;
  font-weight: 800;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 15, 13, 0.78);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  background:
    linear-gradient(90deg, transparent 35%, #16110c 35% 65%, transparent 65%) center / 100% 18% no-repeat,
    linear-gradient(#4dd5ff, #4dd5ff) 50% 50% / 42% 42% no-repeat,
    conic-gradient(from 45deg, #d98237, #ffd166, #9cf060, #4dd5ff, #d98237);
  border: 3px solid #2a1d12;
  box-shadow: 0 0 18px rgba(217, 130, 55, 0.32);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a {
  border-radius: 999px;
  color: var(--muted);
  padding: 0.55rem 0.8rem;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.nav-links .nav-cta {
  border: 1px solid rgba(255, 179, 95, 0.5);
  background: rgba(217, 130, 55, 0.14);
  color: #ffe5bd;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.65rem;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px;
  background: var(--text);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(3rem, 7vw, 6rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.eyebrow,
.section-kicker {
  color: var(--copper-2);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0 0 0.8rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  font-size: clamp(3rem, 8.2vw, 7.1rem);
  line-height: 0.9;
  margin-bottom: 1.3rem;
  text-wrap: balance;
  text-shadow: 0 0 28px rgba(217, 130, 55, 0.22);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1;
  margin-bottom: 1rem;
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.hero-lede {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.server-copy {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  margin: 1.6rem 0;
  border: 1px solid rgba(255, 179, 95, 0.42);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), var(--shadow);
  overflow: hidden;
}

.server-copy code {
  display: grid;
  place-items: center;
  padding: 0.9rem 1.1rem;
  font-size: clamp(1.1rem, 2.5vw, 1.75rem);
  font-weight: 900;
  letter-spacing: 0.04em;
}

button,
.button {
  cursor: pointer;
  font: inherit;
}

.copy-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.copy-button {
  border: 0;
  background: linear-gradient(135deg, var(--copper), var(--gold));
  color: #211208;
}

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

.copy-button.copied {
  box-shadow: 0 0 0 4px rgba(156, 240, 96, 0.22), 0 0 24px rgba(156, 240, 96, 0.32);
}

.hero-actions,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button.primary {
  background: linear-gradient(135deg, #ff9f43, #ffd166);
  color: #211208;
  box-shadow: 0 14px 38px rgba(217, 130, 55, 0.24);
}

.button.secondary,
.inline-copy {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.hero-visual {
  position: relative;
  min-height: 470px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(transparent 22px, rgba(255, 255, 255, 0.045) 23px, transparent 24px) 0 0 / 100% 24px,
    linear-gradient(90deg, transparent 22px, rgba(255, 255, 255, 0.045) 23px, transparent 24px) 0 0 / 24px 100%,
    radial-gradient(circle at 50% 55%, rgba(156, 240, 96, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(217, 130, 55, 0.18), rgba(77, 213, 255, 0.1));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.particle-field i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--gold);
  box-shadow: 0 0 18px currentColor;
  animation: floaty 5s ease-in-out infinite;
}

.particle-field i:nth-child(1) { left: 12%; top: 18%; color: var(--blue); animation-delay: -1s; }
.particle-field i:nth-child(2) { left: 78%; top: 12%; color: var(--green); animation-delay: -2s; }
.particle-field i:nth-child(3) { left: 22%; top: 72%; color: var(--purple); animation-delay: -3s; }
.particle-field i:nth-child(4) { left: 86%; top: 68%; color: var(--gold); animation-delay: -0.5s; }
.particle-field i:nth-child(5) { left: 46%; top: 22%; color: var(--copper-2); animation-delay: -4s; }
.particle-field i:nth-child(6) { left: 60%; top: 78%; color: var(--blue); animation-delay: -2.8s; }
.particle-field i:nth-child(7) { left: 10%; top: 48%; color: var(--green); animation-delay: -1.7s; }
.particle-field i:nth-child(8) { left: 72%; top: 42%; color: var(--purple); animation-delay: -3.3s; }

.machine-stack {
  position: absolute;
  inset: 11%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 0.34fr 0.8fr;
  gap: 16px;
  transform: rotate(-2deg);
}

.terminal,
.reactor-core,
.pipe-row,
.bee-box {
  border: 4px solid rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 16px 38px rgba(0, 0, 0, 0.3);
  image-rendering: pixelated;
}

.terminal {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  padding: 16px;
  background: #1b3440;
}

.terminal span {
  background: linear-gradient(135deg, rgba(77, 213, 255, 0.9), rgba(77, 213, 255, 0.12));
  box-shadow: 0 0 18px rgba(77, 213, 255, 0.6);
}

.reactor-core {
  grid-row: 1 / 3;
  grid-column: 2;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, #252016 0 14px, #332513 14px 28px);
}

.reactor-core span {
  width: min(56%, 160px);
  aspect-ratio: 1;
  border: 10px solid #1d2b16;
  background: radial-gradient(circle, #f2ff9b, #9cf060 45%, #244018 70%);
  box-shadow: 0 0 42px rgba(156, 240, 96, 0.85);
  animation: reactorPulse 2.6s ease-in-out infinite;
}

.pipe-row {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #2b2117;
}

.pipe-row span {
  width: 22%;
  height: 30%;
  background: linear-gradient(90deg, #815028, #d98237, #815028);
}

.bee-box {
  grid-column: 1 / -1;
  position: relative;
  background:
    radial-gradient(circle at 23% 42%, #ffd166 0 6px, transparent 7px),
    radial-gradient(circle at 52% 58%, #ffd166 0 6px, transparent 7px),
    radial-gradient(circle at 74% 35%, #ffd166 0 6px, transparent 7px),
    repeating-linear-gradient(90deg, #3b2c16 0 18px, #ffd166 18px 28px, #2b2117 28px 44px);
}

.section {
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}

.split {
  display: grid;
  grid-template-columns: 0.33fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.panel,
.mod-card,
.info-card,
.status-console,
.scene {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(1.35rem, 3vw, 2.25rem);
}

.panel p {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 1.8rem;
}

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

.mod-card {
  position: relative;
  min-height: 280px;
  padding: 1.15rem;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mod-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% 20%;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 179, 95, 0.22), transparent 70%);
}

.mod-card:hover {
  transform: translateY(-7px);
  border-color: rgba(255, 179, 95, 0.5);
  background: rgba(43, 35, 27, 0.88);
}

.mod-card p {
  color: var(--muted);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 1.3rem;
  border: 4px solid rgba(0, 0, 0, 0.35);
  image-rendering: pixelated;
}

.card-icon span {
  display: block;
  width: 42px;
  height: 42px;
}

.ae-icon { background: #15313c; box-shadow: 0 0 24px rgba(77, 213, 255, 0.18); }
.ae-icon span { background: linear-gradient(90deg, var(--blue) 0 20%, transparent 20% 40%, var(--blue) 40% 60%, transparent 60% 80%, var(--blue) 80%); }
.greg-icon { background: repeating-linear-gradient(135deg, #3a2b1e 0 12px, #1c1712 12px 24px); }
.greg-icon span { background: linear-gradient(#aaa, #5e5e5e); border: 8px solid #d98237; }
.reactor-icon { background: #182516; }
.reactor-icon span { border-radius: 2px; background: radial-gradient(circle, #f5ff9b, var(--green) 50%, #223d18 51%); box-shadow: 0 0 28px rgba(156, 240, 96, 0.8); }
.bee-icon { background: #312414; }
.bee-icon span { background: repeating-linear-gradient(90deg, #ffd166 0 10px, #2a1b08 10px 18px); clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%); }

.info-section {
  background: linear-gradient(90deg, rgba(77, 213, 255, 0.06), rgba(217, 130, 55, 0.08));
}

.info-grid,
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 1rem;
  align-items: stretch;
}

.info-card,
.status-console {
  padding: clamp(1.35rem, 3vw, 2.1rem);
}

.server-details {
  display: grid;
  gap: 0.85rem;
  margin: 1.5rem 0;
}

.server-details div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 900;
  text-align: right;
}

.status-badge {
  display: inline-flex;
  border: 1px solid rgba(156, 240, 96, 0.55);
  border-radius: 999px;
  background: rgba(156, 240, 96, 0.12);
  color: #dcffc7;
  padding: 0.25rem 0.65rem;
}

.console-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.console-bar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--danger);
}

.console-bar span:nth-child(2) { background: var(--gold); }
.console-bar span:nth-child(3) { background: var(--green); }

pre {
  overflow: auto;
  margin: 0;
  color: #b7ff8f;
  font: 900 1rem/1.75 "Lucida Console", Monaco, monospace;
  text-shadow: 0 0 16px rgba(156, 240, 96, 0.25);
}

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

.scene {
  overflow: hidden;
  margin: 0;
}

.scene > div {
  height: 210px;
  image-rendering: pixelated;
}

.machine-scene > div {
  background:
    linear-gradient(90deg, transparent 48%, #4dd5ff 48% 52%, transparent 52%),
    radial-gradient(circle at 30% 46%, #4dd5ff 0 12px, transparent 13px),
    repeating-linear-gradient(90deg, #2d2016 0 26px, #d98237 26px 34px, #17130f 34px 52px);
}

.reactor-scene > div {
  background:
    radial-gradient(circle at 50% 45%, #f5ff9b 0 24px, #9cf060 25px 58px, transparent 59px),
    repeating-linear-gradient(45deg, #172114 0 18px, #30451f 18px 36px);
}

.magic-scene > div {
  background:
    radial-gradient(circle at 50% 38%, #a778ff 0 18px, transparent 19px),
    radial-gradient(circle at 36% 58%, #ffd166 0 8px, transparent 9px),
    radial-gradient(circle at 66% 62%, #ffd166 0 8px, transparent 9px),
    linear-gradient(135deg, #211738, #3b2417);
}

.bee-scene > div {
  background:
    radial-gradient(circle at 25% 35%, #ffd166 0 7px, transparent 8px),
    radial-gradient(circle at 62% 45%, #ffd166 0 7px, transparent 8px),
    radial-gradient(circle at 78% 28%, #ffd166 0 7px, transparent 8px),
    linear-gradient(90deg, transparent 20%, #d98237 20% 24%, transparent 24%),
    repeating-linear-gradient(0deg, #1b2814 0 20px, #2f461f 20px 40px);
}

figcaption {
  color: var(--muted);
  padding: 1rem;
}

.check-list,
.step-list {
  padding-left: 1.2rem;
  color: var(--muted);
}

.check-list li,
.step-list li {
  margin: 0.65rem 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #0b0a09;
  padding: 2rem 0;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.footer-grid p {
  margin: 0;
}

.footer-grid a {
  color: #ffe5bd;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes reactorPulse {
  0%, 100% { transform: scale(0.96); filter: brightness(0.9); }
  50% { transform: scale(1.04); filter: brightness(1.22); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-18px) rotate(90deg); }
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: fixed;
    inset: 74px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(16, 15, 13, 0.96);
    padding: 1rem;
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    padding: 0.9rem 1rem;
  }

  .hero-grid,
  .split,
  .info-grid,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 390px;
  }

  .mod-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 22px, 1120px);
  }

  .hero {
    padding-top: 3rem;
  }

  .server-copy,
  .server-copy code,
  .server-copy .copy-button,
  .button,
  .inline-copy {
    width: 100%;
  }

  .hero-visual {
    min-height: 320px;
  }

  .machine-stack {
    inset: 8%;
    gap: 10px;
  }

  .mod-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .server-details div {
    display: block;
  }

  dd {
    margin-top: 0.25rem;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
