:root {
  color-scheme: dark;
  --bg: #0b1114;
  --panel: #121d22;
  --panel-2: #17262c;
  --text: #f3f8ea;
  --muted: #a9bab4;
  --line: rgba(210, 238, 219, 0.18);
  --green: #8bd05c;
  --green-dark: #4f9f42;
  --gold: #f1c95a;
  --blue: #287fb3;
  --brown: #c5763d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 12% 10%, rgba(139, 208, 92, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 22%, rgba(40, 127, 179, 0.16), transparent 28rem),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 20, 0.84);
  backdrop-filter: blur(14px);
}

.brand,
.nav-links,
.hero-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 900;
  font-size: 20px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  background:
    linear-gradient(90deg, transparent 0 25%, #153925 25% 75%, transparent 75%),
    linear-gradient(#82cf5e 0 25%, #f2ce59 25% 50%, #287fb3 50% 75%, #c5763d 75%);
  box-shadow: 0 0 0 3px #23343a, 0 0 0 5px rgba(241, 201, 90, 0.55);
}

.nav-links {
  gap: 8px;
}

.nav-links a,
.button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 16px;
  color: #edf7ef;
  font-size: 14px;
  font-weight: 800;
  background: rgba(23, 38, 44, 0.86);
}

.nav-links a:hover,
.button:hover {
  transform: translateY(-1px);
  border-color: rgba(241, 201, 90, 0.55);
}

.hero {
  min-height: calc(100svh - 72px);
  display: grid;
  grid-template-columns: minmax(320px, 0.62fr) minmax(520px, 1.38fr);
  align-items: center;
  gap: 40px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 48px 40px 56px;
}

.hero h1,
.section-copy h2,
.system-panel h2 {
  margin: 0;
  color: var(--text);
  font-weight: 950;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(44px, 5.4vw, 82px);
  line-height: 0.94;
}

.hero p,
.section-copy p,
.system-panel p {
  margin: 24px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

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

.button.primary {
  background: #f1c95a;
  color: #182018;
  border-color: #f1c95a;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.06);
}

.world-section,
.loop-section,
.systems-section {
  max-width: 1480px;
  margin: 0 auto;
  padding: 78px 40px;
}

.world-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.34fr) minmax(0, 0.66fr);
  gap: 36px;
  align-items: start;
}

.section-copy h2,
.system-panel h2 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
}

.demo-frame,
.world-frame {
  min-height: 620px;
  border: 1px solid rgba(241, 201, 90, 0.32);
  border-radius: 8px;
  background: #071014;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-demo {
  min-height: 680px;
}

.demo-frame iframe,
.world-frame iframe {
  display: block;
  width: 100%;
  height: 680px;
  border: 0;
  background: #080f12;
}

.world-frame {
  border-color: rgba(139, 208, 92, 0.34);
}

.loop-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}

.loop-steps article,
.system-panel,
.systems-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 29, 34, 0.86);
}

.loop-steps article {
  padding: 24px;
}

.loop-steps span {
  color: var(--gold);
  font-weight: 950;
  font-size: 13px;
}

.loop-steps h3 {
  margin: 26px 0 10px;
  font-size: 26px;
}

.loop-steps p,
.systems-grid span {
  color: var(--muted);
  line-height: 1.55;
}

.systems-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 16px;
  padding-bottom: 96px;
}

.system-panel {
  padding: 32px;
}

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

.systems-grid div {
  padding: 24px;
}

.systems-grid strong {
  display: block;
  margin-bottom: 10px;
  color: #fbf7df;
  font-size: 18px;
}

.systems-grid span {
  display: block;
  font-size: 15px;
}

.site-footer {
  justify-content: space-between;
  gap: 16px;
  padding: 24px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer a {
  color: #f4d36d;
  font-weight: 800;
}

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

  .nav-links {
    display: none;
  }

  .hero,
  .world-section,
  .systems-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 18px;
    gap: 28px;
  }
  .world-section,
  .loop-section,
  .systems-section {
    padding: 54px 18px;
  }

  .loop-steps,
  .systems-grid {
    grid-template-columns: 1fr;
  }

  .hero-demo,
  .demo-frame,
  .world-frame {
    min-height: 520px;
  }

  .demo-frame iframe,
  .world-frame iframe {
    height: 520px;
  }
}

@media (max-width: 560px) {
  .hero h1 {
    font-size: 42px;
  }

  .hero p,
  .section-copy p,
  .system-panel p {
    font-size: 16px;
  }

  .button {
    width: 100%;
    text-align: center;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 18px;
  }
}
