:root {
  --ink: #14130f;
  --paper: #f3ead7;
  --paper-deep: #e7d9bf;
  --signal: #f5b82e;
  --signal-deep: #c77a11;
  --cream: #fff8e9;
  --muted: #786f60;
  --screen: #080907;
  --blue: #b7d8df;
  --line: rgba(20, 19, 15, 0.18);
  --shadow: 0 24px 80px rgba(44, 31, 11, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(245, 184, 46, 0.2), transparent 30rem),
    linear-gradient(180deg, var(--cream) 0, var(--paper) 38rem, var(--paper-deep) 100%);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.site-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 4.5rem);
}

.topbar {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
}

.wordmark-badge {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.wordmark strong,
.wordmark small {
  display: block;
}

.wordmark strong {
  font-size: 0.93rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.wordmark small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.runtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 248, 233, 0.72);
  padding: 0.6rem 0.84rem;
  color: #4f493e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.runtime-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4e9f50;
  box-shadow: 0 0 0 4px rgba(78, 159, 80, 0.14);
}

main {
  padding: clamp(2.5rem, 7vw, 7rem) 0 4rem;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(17rem, 0.65fr);
  align-items: end;
  gap: clamp(2rem, 7vw, 7rem);
  margin-bottom: clamp(2.25rem, 5vw, 4.75rem);
}

.eyebrow,
.boot-kicker,
.guide-number,
.console-model,
.console-label,
.console-footer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--signal-deep);
  font-size: clamp(0.67rem, 1vw, 0.78rem);
  font-weight: 800;
}

h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(3rem, 7.2vw, 7.4rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.86;
}

h1 span {
  display: block;
  margin-top: 0.14em;
  color: var(--signal-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.55em;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.intro-copy {
  margin: 0 0 0.4rem;
  color: #5f574b;
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.68;
}

.console {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: clamp(1.2rem, 2vw, 2rem);
  background: #22221d;
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.1);
  color: var(--cream);
}

.console-rail,
.console-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.console-rail {
  min-height: 68px;
  padding: 0 clamp(1rem, 3vw, 2.2rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.console-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.67rem;
}

.console-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 14px rgba(245, 184, 46, 0.85);
}

.console-model {
  color: rgba(255, 248, 233, 0.48);
  font-size: 0.62rem;
}

.screen-bezel {
  padding: clamp(0.75rem, 2.3vw, 1.6rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 35%),
    #151512;
}

.game-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: clamp(0.7rem, 1.5vw, 1.15rem);
  background: var(--screen);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8), inset 0 0 80px rgba(0, 0, 0, 0.7);
}

.game-stage.ejs_parent {
  aspect-ratio: 4 / 3;
}

.boot-panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(1.25rem, 5vw, 5rem);
  background:
    radial-gradient(circle at 77% 18%, rgba(245, 184, 46, 0.28), transparent 28%),
    linear-gradient(145deg, #171812, #070806 60%);
}

.boot-grid {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, transparent, black 22%, black 76%, transparent);
  transform: perspective(520px) rotateX(57deg) scale(1.45) translateY(25%);
  transform-origin: bottom;
}

.boot-content {
  position: relative;
  z-index: 1;
  width: min(100%, 44rem);
  text-align: center;
}

.boot-kicker {
  margin: 0 0 1rem;
  color: var(--signal);
  font-size: clamp(0.6rem, 1.1vw, 0.74rem);
}

.boot-content h2 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(2.4rem, 7vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.92;
}

.boot-content > p:not(.boot-kicker):not(.launch-note) {
  max-width: 39rem;
  margin: 1.2rem auto 1.6rem;
  color: rgba(255, 248, 233, 0.66);
  font-size: clamp(0.85rem, 1.4vw, 1.04rem);
  line-height: 1.6;
}

.launch-button {
  display: inline-flex;
  min-width: min(100%, 16rem);
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--signal);
  padding: 0.86rem 0.92rem 0.86rem 1.5rem;
  box-shadow: 0 9px 28px rgba(245, 184, 46, 0.24);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease;
}

.launch-button:hover:not(:disabled) {
  background: #ffd057;
  transform: translateY(-2px);
}

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

.launch-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.launch-arrow {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-size: 1.15rem;
}

.launch-note {
  margin: 0.9rem 0 0;
  color: rgba(255, 248, 233, 0.42);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.63rem;
}

.console-footer {
  min-height: 58px;
  padding: 0 clamp(1rem, 3vw, 2.2rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 248, 233, 0.45);
  font-size: 0.58rem;
}

.guide {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 1px;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--line);
}

.guide-card {
  display: grid;
  min-height: 15rem;
  grid-template-columns: auto 1fr;
  align-content: space-between;
  gap: 1.25rem;
  background: rgba(255, 248, 233, 0.72);
  padding: clamp(1.4rem, 3vw, 2.3rem);
}

.guide-card-primary {
  background: var(--blue);
}

.guide-number {
  margin: 0.2rem 0 0;
  color: var(--signal-deep);
  font-size: 0.66rem;
  font-weight: 800;
}

.guide-card h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  letter-spacing: -0.04em;
}

.guide-card p:last-child {
  margin: 0;
  color: #625b50;
  font-size: 0.88rem;
  line-height: 1.6;
}

footer {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
}

footer a {
  text-underline-offset: 0.22rem;
}

footer a:hover {
  color: var(--signal-deep);
}

@media (max-width: 860px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .intro-copy {
    max-width: 42rem;
  }

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

  .guide-card {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .site-shell {
    padding-inline: 0.75rem;
  }

  .topbar {
    min-height: 80px;
  }

  .wordmark strong {
    font-size: 0.8rem;
  }

  .wordmark small,
  .runtime-pill {
    display: none;
  }

  main {
    padding-top: 2.5rem;
  }

  h1 {
    font-size: clamp(3.15rem, 17vw, 5.25rem);
  }

  .console-rail {
    min-height: 54px;
  }

  .console-model,
  .console-footer span:nth-child(2) {
    display: none;
  }

  .screen-bezel {
    padding: 0.45rem;
  }

  .boot-panel {
    padding: 1rem;
  }

  .boot-content h2 {
    font-size: clamp(2rem, 10vw, 3.6rem);
  }

  .boot-content > p:not(.boot-kicker):not(.launch-note) {
    display: none;
  }

  .launch-button {
    margin-top: 1.2rem;
  }

  .launch-note {
    display: none;
  }

  .console-footer {
    min-height: 46px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 1.4rem 0;
  }
}

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

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