:root {
  --ink: #071c2c;
  --night: #10314a;
  --paper: #f4e8c1;
  --moss: #6ca752;
  --amber: #f5b84b;
  --brick: #c8583d;
  --soil: #653f2b;
  --shadow: #04101a;
  color-scheme: dark;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    linear-gradient(rgba(7, 28, 44, 0.94), rgba(7, 28, 44, 0.98)),
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(244, 232, 193, 0.04) 7px 8px),
    var(--ink);
  font-family: "Courier New", ui-monospace, monospace;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.14;
  background-image:
    radial-gradient(circle at 20% 20%, var(--amber) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 62%, var(--moss) 0 1px, transparent 1px);
  background-size: 22px 22px, 29px 29px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

button,
a {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-180%);
}

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

.page-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 80px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.site-header {
  border-bottom: 2px solid rgba(244, 232, 193, 0.2);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--paper);
  text-decoration: none;
}

.wordmark-ant {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--ink);
  background: var(--amber);
  border: 3px solid var(--paper);
  box-shadow: 4px 4px 0 var(--shadow);
}

.build-tag {
  color: var(--moss);
}

.hero {
  display: grid;
  grid-template-columns: minmax(540px, 1.18fr) minmax(360px, 0.82fr);
  grid-template-areas:
    "console copy"
    "form form";
  gap: clamp(2rem, 4.5vw, 4.5rem) clamp(2.5rem, 6vw, 6rem);
  align-items: start;
  padding: clamp(1.75rem, 4vw, 3.25rem) 0 clamp(4rem, 7vw, 6rem);
}

.hero-copy {
  grid-area: copy;
  align-self: center;
  max-width: 520px;
  padding-block: clamp(0.5rem, 3vw, 2.75rem);
}

.eyebrow {
  margin: 0 0 1.5rem;
  color: var(--moss);
  font-size: clamp(0.66rem, 1vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.eyebrow span {
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--amber);
  animation: signal-blink 1.5s steps(1, end) infinite;
}

h1 {
  margin: 0;
  color: var(--paper);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(4.25rem, 7vw, 7rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 6px 6px 0 var(--shadow);
}

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

.lede {
  max-width: 36rem;
  margin: 2rem 0 0;
  color: rgba(244, 232, 193, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.75;
}

.waitlist-form {
  grid-area: form;
  margin-top: 0.25rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: rgba(4, 16, 26, 0.72);
  border: 3px solid rgba(244, 232, 193, 0.3);
  border-right-color: rgba(244, 232, 193, 0.12);
  border-bottom-color: rgba(244, 232, 193, 0.12);
  box-shadow: 8px 8px 0 var(--shadow);
}

.jump-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.7rem;
  color: var(--amber);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-underline-offset: 0.28em;
}

.jump-link span {
  font-size: 1.1rem;
}

.panel-titlebar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: calc(clamp(1.25rem, 2.5vw, 2rem) * -1) calc(clamp(1.25rem, 2.5vw, 2rem) * -1) 1.5rem;
  padding: 0.8rem clamp(1.25rem, 2.5vw, 2rem);
  color: var(--ink);
  background: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.feature-select {
  padding: 0;
  margin: 0 0 1.5rem;
  border: 0;
}

.feature-select legend {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--paper);
  font-size: clamp(0.92rem, 1.4vw, 1.08rem);
  font-weight: 700;
  letter-spacing: 0.09em;
}

.feature-select legend span {
  float: right;
  color: rgba(244, 232, 193, 0.68);
  font-size: 0.78rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.feature-card {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 92px;
  padding: 0.9rem;
  color: var(--paper);
  text-align: left;
  background: rgba(4, 16, 26, 0.58);
  border: 2px solid rgba(244, 232, 193, 0.16);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.feature-marker {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--paper);
  border: 2px solid rgba(244, 232, 193, 0.58);
  box-shadow: inset 2px 2px 0 rgba(4, 16, 26, 0.42);
}

.feature-marker::after {
  content: "+";
  translate: 0 -1px;
  font-size: 0.9rem;
}

.feature-card strong {
  display: grid;
  gap: 0.24rem;
  font: inherit;
}

.feature-card small {
  color: rgba(244, 232, 193, 0.66);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

.feature-card:hover {
  color: var(--paper);
  border-color: rgba(244, 232, 193, 0.46);
}

.feature-card[aria-pressed="true"] {
  color: var(--ink);
  background: var(--amber);
  border-color: var(--paper) var(--soil) var(--soil) var(--paper);
  box-shadow: 3px 3px 0 var(--shadow);
}

.feature-card[aria-pressed="true"] .feature-marker {
  color: var(--paper);
  background: var(--brick);
  border-color: var(--ink);
  box-shadow: none;
}

.feature-card[aria-pressed="true"] .feature-marker::after {
  content: "✓";
}

.feature-card[aria-pressed="true"] small {
  color: rgba(7, 28, 44, 0.74);
}

.feature-card:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.loadout-meter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.9rem;
  color: rgba(244, 232, 193, 0.7);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.loadout-meter b {
  color: var(--moss);
}

.waitlist-form > label {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--moss);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.waitlist-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.waitlist-controls input {
  min-width: 0;
  min-height: 56px;
  padding: 1rem;
  color: var(--paper);
  caret-color: var(--amber);
  background: rgba(4, 16, 26, 0.74);
  border: 3px solid rgba(244, 232, 193, 0.44);
  border-right-color: rgba(244, 232, 193, 0.18);
  border-bottom-color: rgba(244, 232, 193, 0.18);
  border-radius: 2px;
  outline: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.waitlist-controls input::placeholder {
  color: rgba(244, 232, 193, 0.58);
}

.waitlist-controls input:focus-visible {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 184, 75, 0.18);
}

.start-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 188px;
  padding: 1rem 1.15rem;
  color: var(--ink);
  background: var(--brick);
  border: 0;
  border-top: 4px solid #e48463;
  border-left: 4px solid #e48463;
  border-right: 4px solid #763323;
  border-bottom: 4px solid #763323;
  border-radius: 2px;
  box-shadow: 6px 6px 0 var(--shadow);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.start-button:hover {
  background: #d86748;
}

.start-button:active,
.start-button.is-pressed {
  translate: 3px 3px;
  box-shadow: 3px 3px 0 var(--shadow);
}

.start-button:focus-visible,
.wordmark:focus-visible {
  outline: 4px solid var(--amber);
  outline-offset: 5px;
}

.button-light {
  width: 10px;
  height: 10px;
  background: var(--paper);
  border: 2px solid #763323;
  border-radius: 50%;
}

.launch-note {
  margin: 0.75rem 0 0;
  color: rgba(244, 232, 193, 0.74);
  font-size: 0.72rem;
  line-height: 1.55;
  letter-spacing: 0.1em;
}

.launch-note[data-state="success"] {
  color: var(--moss);
}

.launch-note[data-state="error"] {
  color: #ef8f78;
}

.privacy-note {
  margin: 0.4rem 0 0;
  color: rgba(244, 232, 193, 0.66);
  font-size: 0.66rem;
  line-height: 1.5;
  letter-spacing: 0.07em;
}

.privacy-note a {
  color: var(--moss);
  text-underline-offset: 0.2em;
}

.cf-turnstile {
  width: 100%;
  margin-top: 0.8rem;
}

.lost-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  width: min(760px, calc(100% - 40px));
  margin: auto;
  text-align: center;
}

.lost-page h1 {
  font-size: clamp(4rem, 15vw, 8rem);
}

.lost-page .lede {
  margin-inline: auto;
}

.lost-page .start-button {
  justify-content: center;
  margin-top: 2rem;
  text-decoration: none;
}

.policy-page {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.policy-page > .eyebrow {
  margin-top: 5rem;
}

.policy-page h1 {
  font-size: clamp(3.8rem, 12vw, 7rem);
}

.policy-copy {
  margin: 3rem 0;
  color: rgba(244, 232, 193, 0.8);
  font-size: 0.94rem;
  line-height: 1.75;
}

.policy-copy h2 {
  margin: 2rem 0 0.4rem;
  color: var(--amber);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.policy-copy p {
  margin: 0;
}

.privacy-form {
  display: grid;
  gap: 0.75rem;
  padding: 1.2rem;
  background: rgba(4, 16, 26, 0.7);
  border: 2px solid rgba(244, 232, 193, 0.25);
}

.privacy-form label {
  color: var(--moss);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.privacy-form input,
.privacy-form select {
  min-height: 48px;
  padding: 0.75rem;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid rgba(244, 232, 193, 0.5);
  font: inherit;
}

.privacy-form .start-button {
  justify-content: center;
  margin-top: 0.4rem;
}

.farm-trap:not([hidden]) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.console {
  position: relative;
  grid-area: console;
  width: 100%;
  padding: 18px 18px 14px;
  background: #aeb0a5;
  border: 4px solid #d8d7c9;
  border-right-color: #61655e;
  border-bottom-color: #61655e;
  border-radius: 8px 8px 38px 8px;
  box-shadow: 14px 16px 0 rgba(4, 16, 26, 0.7);
  transform: rotate(-0.45deg);
}

.console::after {
  position: absolute;
  right: 14%;
  bottom: -18px;
  left: 14%;
  height: 14px;
  content: "";
  background: #434740;
  border-radius: 0 0 6px 6px;
}

.console-topline {
  display: flex;
  justify-content: space-between;
  padding: 0 2px 11px;
  color: #2e3536;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.farm-paused .live-label span,
.farm-paused .eyebrow span {
  animation-play-state: paused;
}

.live-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.live-label span {
  width: 8px;
  height: 8px;
  background: var(--brick);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(200, 88, 61, 0.25);
  animation: signal-blink 1.5s steps(1, end) infinite;
}

.screen-bezel {
  position: relative;
  overflow: hidden;
  padding: 13px;
  background: #151a1d;
  border: 5px solid #4e5552;
  border-top-color: #2b302f;
  border-left-color: #2b302f;
  border-radius: 9px;
}

#colony-view {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  background: var(--soil);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.scanlines {
  position: absolute;
  inset: 13px;
  pointer-events: none;
  opacity: 0.18;
  background: repeating-linear-gradient(
    to bottom,
    rgba(7, 28, 44, 0.1) 0,
    rgba(7, 28, 44, 0.1) 2px,
    rgba(244, 232, 193, 0.08) 2px,
    rgba(244, 232, 193, 0.08) 4px
  );
}

.console-controls {
  display: grid;
  grid-template-columns: 70px minmax(190px, 1fr) 98px;
  gap: clamp(0.8rem, 2vw, 1.5rem);
  align-items: center;
  min-height: 94px;
  padding: 16px 8px 0;
  color: #343a38;
}

.d-pad {
  position: relative;
  width: 54px;
  height: 54px;
}

.d-pad i {
  position: absolute;
  background: #292d2c;
  box-shadow: inset 3px 3px 0 #3e4441, inset -3px -3px 0 #121514;
}

.d-pad i:first-child {
  top: 18px;
  left: 0;
  width: 54px;
  height: 18px;
}

.d-pad i:last-child {
  top: 0;
  left: 18px;
  width: 18px;
  height: 54px;
}

.system-buttons {
  display: flex;
  justify-content: center;
  gap: clamp(0.6rem, 2vw, 1.2rem);
}

.system-button {
  display: grid;
  grid-template-columns: 46px;
  justify-items: center;
  min-width: 78px;
  min-height: 52px;
  padding: 0;
  color: #292d2c;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.system-button > span {
  display: block;
  width: 46px;
  height: 12px;
  margin-bottom: 0.35rem;
  background: #484d49;
  border: 2px solid #242826;
  border-radius: 999px;
  box-shadow: inset 3px 3px 0 #666b66, 2px 2px 0 #7d8077;
}

.system-button strong {
  font-size: 0.68rem;
}

.system-button small {
  margin-top: 0.2rem;
  color: #343a38;
  font-size: 0.64rem;
}

.system-button:hover > span,
.system-button[aria-pressed="true"] > span {
  background: #333836;
  box-shadow: inset 2px 2px 0 #1e2220, 1px 1px 0 #7d8077;
}

.system-button:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

.action-buttons {
  display: flex;
  gap: 11px;
  align-items: center;
  rotate: -10deg;
}

.action-buttons i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: rgba(244, 232, 193, 0.58);
  background: #9e3e35;
  border-radius: 50%;
  box-shadow: inset 4px 4px 0 #c06054, inset -4px -4px 0 #6e2824, 2px 3px 0 #676960;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
}

.console-status {
  display: flex;
  justify-content: center;
  gap: clamp(0.8rem, 3vw, 2rem);
  padding: 0.45rem 0 0.1rem;
  color: #343a38;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.jump-link:focus-visible,
.privacy-note a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 4px;
}

.site-footer {
  min-height: 70px;
  color: rgba(244, 232, 193, 0.68);
  border-top: 2px solid rgba(244, 232, 193, 0.12);
  font-size: 0.68rem;
}

@keyframes signal-blink {
  0%,
  62% {
    opacity: 1;
  }
  63%,
  100% {
    opacity: 0.28;
  }
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(480px, 1.08fr) minmax(320px, 0.92fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .page-shell {
    width: min(820px, calc(100% - 32px));
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "console"
      "copy"
      "form";
    gap: 3rem;
    padding: 2rem 0 5rem;
  }

  .hero-copy {
    max-width: none;
    padding-block: 0;
  }

  h1 {
    font-size: clamp(4rem, 15vw, 7rem);
  }

  .console {
    transform: none;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 24px, 440px);
  }

  .site-header {
    min-height: 68px;
  }

  .build-tag {
    display: none;
  }

  .wordmark {
    font-size: 0.66rem;
  }

  .hero {
    gap: 2.5rem;
    padding-top: 1.25rem;
  }

  h1 {
    font-size: clamp(3.25rem, 17vw, 4.75rem);
    text-shadow: 4px 4px 0 var(--shadow);
  }

  .waitlist-controls {
    grid-template-columns: 1fr;
  }

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

  .feature-card {
    min-height: 88px;
  }

  .feature-select legend span,
  .panel-titlebar span:last-child,
  .loadout-meter > span {
    display: none;
  }

  .panel-titlebar {
    justify-content: center;
  }

  .start-button {
    width: 100%;
    justify-content: center;
  }

  .launch-note {
    max-width: none;
  }

  .console {
    padding: 10px;
    border-radius: 6px 6px 22px 6px;
    box-shadow: 8px 10px 0 rgba(4, 16, 26, 0.7);
  }

  .screen-bezel {
    padding: 7px;
  }

  .scanlines {
    inset: 7px;
  }

  .console-controls {
    grid-template-columns: 54px minmax(150px, 1fr) 72px;
    gap: 0.55rem;
    min-height: 74px;
    padding-top: 10px;
  }

  .system-buttons {
    gap: 0.35rem;
  }

  .system-button {
    min-width: 68px;
  }

  .action-buttons {
    gap: 7px;
  }

  .action-buttons i {
    width: 28px;
    height: 28px;
  }

  .console-status {
    gap: 0.55rem;
    font-size: 0.46rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
  }
}

@media (max-width: 380px) {
  .console-controls {
    grid-template-columns: 54px 1fr;
  }

  .action-buttons {
    display: none;
  }

  .console-topline {
    font-size: 0.58rem;
  }

  .console-status span:nth-child(2) {
    display: none;
  }
}

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